---
title: Hierarchical Ensemble in WBC Classification
url: https://www.emergentmind.com/topics/hierarchical-ensemble-he
type: topic
---

# Hierarchical Ensemble in WBC Classification

Hierarchical Ensemble (HE) is a memory-augmented, coarse-to-fine inference pipeline for white blood cell classification under domain shifts. It was introduced for the 13-class WBCBench task at ISBI 2026 as an alternative to a direct flat classifier, with the specific aim of reducing brittleness under staining, scanner, and inter-laboratory variation, especially for rare and clinically important classes such as blast cells. In this formulation, HE combines LoRA-adapted DinoBloom embeddings, a feature bank of normalized reference features, hierarchical \(k\)-nearest-neighbor retrieval, and multi-split majority voting [2604.23271].

## 1. Definition and conceptual scope

HE is defined as a **memory-augmented, hierarchical ensemble pipeline** for white blood cell classification when the test distribution shifts away from training domains. Its central design choice is to avoid a one-shot 13-way prediction. Instead, it decomposes inference into a sequence of constrained decisions that proceed from coarse lineage to fine subtype, while also aggregating predictions across multiple split-dependent models or settings [2604.23271].

The term “ensemble” in this method has a specific meaning. It is not an ensemble over hierarchy levels in the sense of averaging level outputs independently. Rather, the hierarchy is chained sequentially, and each split-specific pipeline produces one hierarchical prediction; those predictions are then aggregated by majority voting. The method therefore combines three forms of aggregation: retrieval over multiple neighbors, hierarchical decomposition across label levels, and multi-split voting across trained variants [2604.23271].

A common misconception is that HE defines a probabilistic hierarchical classifier with learned fusion across levels. The paper explicitly excludes that interpretation. It does not define probabilistic confidence scores, retrieval weights, distance-weighted voting, a learned fusion formula, or an inference-time confidence threshold. Its decision rule is nearest-neighbor retrieval by cosine similarity followed by unweighted majority voting via \(\operatorname{mode}\) [2604.23271].

## 2. Task formulation, dataset organization, and hierarchy

The target task is 13-class white blood cell classification on WBCBench. To reduce the impact of class imbalance, labels are organized into a three-level hematology-aligned hierarchy, and the model is trained using both leaf and parent labels. The development splits are merged and used in 5-fold cross-validation for training and model selection, while the official test split is held out. Training data are further augmented with the auxiliary datasets PBC and Raabin-WBC after mapping their labels into the same taxonomy [2604.23271].

The hierarchy is explicitly defined at the top and leaf levels. At level 1, the classes are **Myeloid**, **Lymphoid**, and **Blast**. The Myeloid leaves are **PMY, MY, MMY, BNE, SNE, MO, EO, BA**; the Lymphoid leaves are **PLY, LY, PC, VLY**; and the Blast leaf is **BL**. The paper states that labels are stored for all three levels, but it does not give a separate formal taxonomy for level 2 beyond the statement that finer-level candidates are restricted to children of the predicted parent [2604.23271].

Images are “center-cropped to the cell region and resized to the input resolution.” Training uses a two-view teacher–student setup with independent geometric and appearance augmentations, whereas validation and test use deterministic preprocessing. This organization reflects the paper’s broader objective of learning transferable representations before applying retrieval-based inference [2604.23271].

This hierarchy is not merely descriptive. It provides the structural constraint used at inference: once a parent label is predicted, deeper decisions are restricted to its valid children. A plausible implication is that hematology-aligned structure serves here as both an imbalance-management device and an error-control mechanism under domain shift.

## 3. Representation learning and memory augmentation

The backbone is DinoBloom, described as a pretrained hematology foundation model, adapted with LoRA. The feature extractor is written as \(f_{\theta}(\cdot)\), mapping an image \(x\) to an embedding \(z \in \mathbb{R}^{d}\). Training is hybrid self-supervised plus supervised, using an EMA teacher–student framework with two augmented views. The manuscript prints several of the training equations with formatting errors, but the stated components are a DINO-style alignment loss, class-balanced cross-entropy on labeled samples, and a weighted combination of the two objectives [2604.23271].

Model selection is based on macro-F1,
\[
\text{Macro F1-score}=\frac{1}{C}\sum_{c=1}^{C}\text{F1}_{c},
\]
with \(C=13\). This criterion is emphasized because WBCBench is class-imbalanced and macro-F1 gives rare classes greater influence than class-frequency-dominated aggregates [2604.23271].

After training, HE constructs a feature bank. Using the selected checkpoint, each image is embedded and normalized:
\[
\phi(x)=\frac{f_{\theta_{s}(x)}}{\|f_{\theta_{s}(x)\|_{2}}},
\]
with the paper noting that the printed equation is missing a closing brace but that the intended operation is standard \(\ell_2\)-normalization. For each database image \(x_j\), the bank stores the normalized embedding \(\phi(x_j)\) and the labels \(y_j^{(1)}, y_j^{(2)}, y_j^{(3)}\) for the three hierarchy levels [2604.23271].

This bank is the memory-augmentation component. Instead of relying only on the classifier head’s parametric decision boundary, inference retrieves similar examples from the reference set. The paper argues that under domain shift, such retrieval can be more robust because it compares local feature geometry rather than trusting a globally fixed softmax classifier [2604.23271].

## 4. Three-stage hierarchical kNN inference

Given a query image \(x\), HE computes the normalized embedding \(q=\phi(x)\), retrieves its \(k\)-nearest neighbors \(\mathcal{N}_k(q)\) from the feature bank using cosine similarity, and then performs staged label prediction. Because embeddings are \(\ell_2\)-normalized, cosine similarity is equivalent to angular comparison. The value of \(k\) itself is not reported [2604.23271].

At stage 1, the system predicts the coarse lineage among Myeloid, Lymphoid, and Blast by majority vote over the retrieved neighbors’ level-1 labels:
\[
\hat{y}^{(1)}=\operatorname*{mode}\left\{y^{(1)}_{j}\right\}_{j\in\mathcal{N}_{k}(q)}.
\]
At stages 2 and 3, the method proceeds coarse-to-fine and restricts the vote to labels that are valid children of the previously predicted parent. With \(\mathrm{Ch}^{(l)}(\cdot)\) denoting the valid children at level \(l\),
\[
\hat{y}^{(l)}=\operatorname*{mode}\left\{y^{(l)}_{j}\right\}_{j\in\mathcal{N}_{k}(q),\; y^{(l)}_{j}\in \mathrm{Ch}^{(l)}(\hat{y}^{(l-1)})}, \qquad l\in\{2,3\}.
\]
The final output is the leaf prediction \(\hat y=\hat y^{(3)}\) [2604.23271].

The paper’s main interpretive claim is that these coarse-to-fine constraints reduce implausible cross-level errors. In a flat 13-class classifier or flat kNN vote, a visually similar but semantically cross-lineage neighbor can directly flip the final decision. In HE, the system first solves a simpler lineage problem and only then permits subtype decisions consistent with that lineage. The authors explicitly state that “coarse-to-fine constraints reduce cross-level errors that disproportionately affect rare classes and help mitigate majority-class bias” [2604.23271].

This mechanism is especially relevant to blast cells. Because Blast is a top-level lineage with a single leaf, a strong coarse blast vote can protect against confusion with more common mature myeloid or lymphoid classes. The paper does not introduce any blast-specific handcrafted rule beyond that hierarchy [2604.23271].

## 5. Ensemble structure, implementation, and operating regime

HE combines hierarchical retrieval with split-level ensembling. Within each model or split, decisions are sequentially constrained across hierarchy levels. Across multiple trained split-dependent methods or settings, final predictions are aggregated by majority voting. The paper describes this as “aggregates outputs across multiple splits via majority voting” and “multi-split majority voting,” and Table 2 refers to “#Ensemble model” [2604.23271].

The exact composition of the final 7-model ensemble is not fully enumerated. The paper states that it aggregates predictions from “three in-house methods under different split-dependent settings,” but does not fully specify how the 7-model ensemble is assembled. A plausible implication is that the ensemble should be understood operationally, rather than as a single fixed formula: multiple split-trained hierarchical pipelines are run independently and their outputs are voted [2604.23271].

Implementation is in PyTorch. DinoBloom with LoRA is fine-tuned for 100 epochs on a single NVIDIA A100 with batch size 16, AdamW, learning rate \(1\times10^{-5}\), weight decay \(1\times10^{-2}\), and EMA momentum 0.999. Inference runs on an NVIDIA RTX 6000 Ada using hierarchical kNN voting. The paper does not report the LoRA rank, image resolution, temperature parameters, explicit rare-class oversampling settings, or the value of \(k\) [2604.23271].

Rare-class handling is instead attributed to the hierarchy, class-balanced supervised loss, macro-F1 checkpoint selection, use of auxiliary datasets, and split ensembling. This is important because the method’s rare-class robustness is structural and training-procedural, not the result of a separate rare-class heuristic [2604.23271].

## 6. Empirical evidence, robustness claims, and methodological boundaries

The representation-learning component is supported by backbone comparisons. In Table 1, supervised baselines obtain macro-F1 values of 0.635 for ResNet-50, 0.643 for Swin-T, and 0.631 for ViT-B. Stronger hybrid methods include ConvNeXt-L full fine-tuning at 0.679, ConvNeXt-L with LoRA variants at 0.676, 0.677, and 0.678, and DinoBloom with LoRA variants at 0.681, 0.682, and 0.680. The best reported value is 0.682 for DinoBloom\(^2\), which slightly exceeds full fine-tuned ConvNeXt-L while being more parameter-efficient [2604.23271].

The clearest evidence for the hierarchical inference itself comes from the ablation on hierarchy and ensemble size. Without hierarchy, macro-F1 rises only modestly from 0.596 with 1 model to 0.625 with 7 models. With hierarchy, the corresponding values are 0.676 with 1 model and 0.682 with 7 models. The dominant effect is therefore hierarchy rather than multi-model voting: with one model, adding hierarchy lifts macro-F1 from 0.596 to 0.676, while ensembling on top of hierarchy gives smaller but consistent gains that saturate around 5–7 models [2604.23271].

The final system achieves a macro-F1 score of 0.682 on the competition test set and ranks within the top ten by macro F1-score in the final testing phase. The paper interprets this as evidence that hierarchical inference provides the substantial improvement by reducing majority-class bias and cross-level errors, whereas split ensembling provides a “modest but consistent robustness gain” [2604.23271].

The robustness claim with respect to domain shift is central but indirect. The benchmark is framed around domain shift, and the method is repeatedly described as robust under staining, scanner, and laboratory variability. However, the paper does not provide separate per-domain test tables or explicit source-target transfer matrices. The evidence therefore comes from benchmark framing, the challenge setting, and superior macro-F1 under that setting rather than from detailed domain-wise breakdowns [2604.23271].

A methodological boundary follows from this. HE is strongly supported as a robust challenge method under the WBCBench evaluation protocol, but it is not presented as a calibrated probabilistic classifier, a reconciliation framework, or a learned hierarchical decision network. Its design is deliberately simple: transferable embeddings, memory-based retrieval, constrained majority voting, and multi-split aggregation.

## 7. Terminological scope and related uses

Within white blood cell classification, “Hierarchical Ensemble” refers to the retrieval-driven, coarse-to-fine pipeline described above. In the broader literature, however, the term is polysemous. In hierarchical multi-label classification on DAG-structured taxonomies, hierarchical ensemble methods such as HTD-DAG and TPR-DAG denote taxonomy-aware post-processing of flat classifier scores under the true path rule rather than retrieval-based inference [1406.4472]. In demand forecasting, “Hierarchical Ensemble” denotes partitioning training and inference across semantic levels such as store, store+category, and store+department, followed by weighted averaging across levels [2507.22053]. In low-resource medical summarization, the related acronym HESM refers to token-level ensembling followed by Minimum Bayes Risk decoding, with hierarchy defined over ensemble stages rather than label taxonomies [2306.05317].

This terminological variation matters because HE in white blood cell classification is neither a generic label for all hierarchy-aware ensembles nor a forecasting-style semantic partition strategy. Its defining features are a feature bank, hierarchical kNN retrieval, child-constrained voting, and multi-split majority aggregation [2604.23271].

A final misconception therefore concerns the scope of the name itself. “Hierarchical Ensemble” here designates a specific white blood cell inference pipeline, not a universally standardized architecture. What is distinctive in this instance is the combination of memory augmentation, hematology-aligned hierarchical constraints, and split-level voting under domain shift.

Source: https://www.emergentmind.com/topics/hierarchical-ensemble-he