Blood cell classifiers look nearly perfect inside the lab that produced their training data and then fail at the next hospital. A standard ResNet50 falls from 98.53% to 23.11% accuracy when moved between smear datasets (Benchmarking White Blood Cell Classification Under Domain Shift). They also cannot name a cell type they were never trained on. Hematologists do not have either problem. They identify a cell by reading its morphology (nucleus shape, chromatin, cytoplasm color, granules), and they can recognize a new category from its textbook description. We propose to build a classifier that works the same way. The model predicts a fixed set of morphological attributes, and each attribute value is represented by the embedding of a short phrase such as "segmented nucleus" or "basophilic cytoplasm." Every cell class, seen or unseen, is then scored only by how well the predicted attributes match a written description of that class. To add a class, a clinician writes a description. To audit a decision, the clinician reads which phrases matched.
The bet is that this single design helps on three problems at once. Supervising many attributes jointly gives the shared network a dense, stain-independent training signal. Routing the decision through attribute phrases makes the reasoning inspectable and editable. Writing class definitions in text allows recognition of cell types absent from training. Each piece exists separately in the literature. What is missing is evidence that they reinforce each other on real cross-laboratory cytology, and a clear test of whether the text representation earns its place over a plain lookup table.
Core Claim
A network trained with multi-task supervision on the 11 attribute groups of WBCAtt has three properties. First, its attribute value scores are computed against text embeddings. Second, its class decisions pass only through those scores, with no residual path from the image features. Third, it has two behaviors a black-box model lacks. It generalizes across laboratories at least as well as the best knowledge-aligned concept bottleneck. And it recognizes cytomorphology classes that were never trained on, from written definitions alone, at accuracy clearly above generic vision-language prompting.
We also make a narrower and more falsifiable claim. For unseen classes whose definitions need descriptors outside the WBCAtt vocabulary, the text-anchored attribute scorer should beat a discrete attribute lookup table. For classes that are expressible in the existing vocabulary, we expect the two to tie. If the text anchoring also ties on out-of-vocabulary classes, the semantic-embedding component is unnecessary, and we will say so.
Mechanism
A backbone encodes image $x$ into features $h(x)$. For each attribute group $a$ (for example nucleus shape or granule color) with candidate values $v$, a phrase encoder produces a frozen text embedding $t_{a,v}$. We use a biomedical sentence encoder of the PubMedBERT type, the kind DermFM-Zero uses for its text side. A small attribute-specific projection $W_a$ gives
$$p(v \mid x, a) = \mathrm{softmax}_v \big( \tau \cos(W_a h(x),\, t_{a,v}) \big),$$
where $\tau$ is a learned temperature. A class $c$ is defined by a description $D_c$: a set of attribute phrases $d$, each with a weight $w_{c,d}$ that marks it as essential or typical. The phrases are written from hematology references and checked by a hematologist. The class score is
$$s_c(x) = \sum_{d \in D_c} w_{c,d} \log p(d \mid x),$$
where $p(d \mid x)$ for a phrase is computed exactly like the equation above, with $t_d$ in place of $t_{a,v}$, inside the attribute group the phrase belongs to. The prediction is $\arg\max_c s_c(x)$. The class decision depends only on attribute probabilities, and no image features bypass the bottleneck. This closes the leakage route that lets ordinary concept bottlenecks smuggle in background information.
The design borrows two ideas from Adaptive Concept Discovery for Interpretable Few-Shot Text Classification (StructCBM), which defines text classes through prototypical and discriminative concepts. Our weighted descriptions play the prototypical role. Where two unseen classes are confusable, we add a discriminative phrase pair between them. Only confusable pairs get these phrases, which avoids the quadratic growth in concept count that StructCBM reports.
Training is multi-task. There are 11 attribute cross-entropy losses on WBCAtt's roughly 113,000 labels over 10,298 PBC images, plus one class loss on the seen PBC classes computed through $s_c$. The class loss teaches the weighting to cooperate with the attribute heads rather than override them. We know the tasks will train at different speeds: WBCAtt reports 98% F1 on granularity but only 76.13% on nucleus shape. We therefore compare fixed loss weights against gradient homogenization from RotoGrad, which rescales gradients toward lagging tasks and rotates the shared features to reduce conflicts between tasks. RotoGrad has only been tested on NYUv2, CelebA and CIFAR10, so whether it helps here is an open question and not an assumption.
Because the benchmarking study traces collapse to batch-normalization statistics fitted to one lab, the backbone uses group or layer normalization throughout. We compare initializing it from ImageNet against initializing it from a cytology foundation model such as CytoFM, a ViT pretrained on millions of multi-organ cytology patches.
How This Differs From the Closest Work
Four lines of prior work come closest, and each stops short in a specific place.
Integrating Clinical Knowledge into Concept Bottleneck Models motivates the proposal most directly. It trains a concept bottleneck on PBC and adds a loss that forces the model's reliance on each concept to follow a three-tier clinical importance ranking, and this improves out-of-domain F1. Its classes are fixed output indices, so it cannot name an unseen cell type. Its concepts are also not tied to language. We keep the goal of knowledge-guided robustness but make the class layer a text-defined score.
WBCAtt supplies both our supervision and our constraint. Its multi-task attribute classifier reached 99.40% accuracy against 99.54% for a black-box CNN, which suggests the bottleneck costs little in-domain. Its audit found an APL classifier relying on "blue cytoplasm" as a spurious negative cue. WBCAtt, however, uses discrete heads, has no zero-shot capability, and does not test cross-lab shift.
Zero-shot Concept Bottleneck Models builds a training-free bottleneck from a 5-million-phrase web concept bank. It uses CLIP retrieval and a per-image Lasso fit, and is validated only on natural, satellite and fine-grained images. A web vocabulary does not contain "Auer rods" in a form CLIP can see. Its per-sample Lasso raises latency from about 3ms to about 55ms, while our bottleneck is a single forward pass.
DermFM-Zero gets zero-shot diagnosis from vision-language pretraining. It finds concepts after the fact with sparse autoencoders, which break the model's internal features into sparse, nameable directions. Its decision path is not constrained by those concepts, whereas ours is by construction.
CellCLIP aligns Cell Painting images with text about perturbations. It shows that text supervision can organize cellular phenotypes, but its embedding space has no auditable intermediate layer.
Research Program
The work has four parts. The first is the model above, trained on PBC with WBCAtt attributes, with the backbone, normalization and loss balancing varied in controlled ablations.
The second is a description library, written before any evaluation data is examined. It covers the seen PBC classes and the MLL23 cytomorphology classes absent from PBC's label set. Myeloblasts and reactive lymphocytes are among MLL23's 18 expert classes (A large expert-annotated single-cell peripheral blood dataset for hematological disease diagnostics). Each unseen class is labeled "in-vocabulary" if it can be defined using only WBCAtt attribute values, or "out-of-vocabulary" if its definition needs new phrases such as nucleoli, Auer rods or a changed nuclear-cytoplasmic ratio. This split is fixed in advance and is the pivot of the key comparison.
The third is an interpretability protocol. For each prediction we report which description phrases contributed most to $s_c$. We then test two things: whether overriding a mispredicted attribute with its true value corrects the class, and whether a hematologist can find a deliberately injected spurious rule. For the latter, we retrain on a copy of PBC in which cytoplasm color is artificially confounded with one class, mirroring the WBCAtt APL finding, and check whether the per-decision phrase attributions expose it.
The fourth is analysis of why robustness does or does not appear. We measure attribute accuracy per target lab. This separates two failure sources: stain shift breaking specific attributes (likely cytoplasm color) versus breaking the class weighting.
Baselines
The naive reference point is a ResNet50 with batch normalization, trained on PBC class labels. It anchors how badly an unprotected model degrades. The benchmarking study reports this architecture at 23.11% on LISC when trained on RaabinWBC. We will rerun it on our PBC-source protocol rather than borrow the number, because the source dataset differs.
The normalization-only baseline is the same network with group normalization. The benchmarking study reports it restoring 73.07% on the RaabinWBC-to-LISC shift. This matters because it may capture most of the cross-lab gain with no bottleneck at all. We run it on identical PBC training data, with identical augmentation and the same hyperparameter search budget as our model.
The strongest existing method for cross-lab robustness is the knowledge-aligned concept bottleneck of Integrating Clinical Knowledge into Concept Bottleneck Models. With a ViT backbone trained on PBC, it reports out-of-domain F1 rising from 43.64% to 49.75% on RaabinWBC. We reimplement it with the same ViT and the same WBCAtt concept annotations, and tune it with the same budget. Beating it means exceeding its RaabinWBC out-of-domain F1 under our rerun, with a non-overlapping interval across at least five seeds, while staying within 0.5 points of its in-domain accuracy. It is not a zero-shot method, so it appears only in the seen-class, cross-lab comparison.
For zero-shot recognition of unseen classes there are two competitors. The first is class-name and class-description prompting of a general CLIP model and of a biomedical vision-language model. The second is Z-CBM from Zero-shot Concept Bottleneck Models, run with its original web concept bank and again with our cytology phrase library substituted in, so that vocabulary is not a confound. We found no reported result on Lacuna for any zero-shot method on MLL23. The only Z-CBM number in the file is 54.28% average top-1 on its 12 general-vision datasets, against 53.73% for zero-shot CLIP, which does not transfer to cytology. Beating these means higher macro-averaged recall on the held-out MLL23 classes. We report macro recall because MLL23 is heavily imbalanced, from more than 8,000 myeloblasts down to 33 reactive lymphocytes.
The ablation that isolates the key ingredient is a discrete attribute lookup table in the style of classic attribute-based zero-shot learning. It uses the same multi-task network with ordinary softmax heads over WBCAtt values, and each unseen class is a hand-coded vector of expected attribute values. For out-of-vocabulary phrases, it maps each phrase to the nearest WBCAtt value, chosen by the same hematologist in advance. Further ablations remove the class loss, remove RotoGrad, replace the backbone initialization, and add a residual path around the bottleneck to measure how much it would leak.
Why not just…?
Why not just prompt a vision-language model with class names? This is the cheapest zero-shot option, and it is the natural null for the unseen-class question. The file's evidence is indirect. DermFM-Zero reports that a 304M-parameter domain model beat the next-best foundation model, including DINOv3-7B, by 23.7% in balanced accuracy, which suggests general-domain scale does not buy fine morphological discrimination. That evidence comes from dermatology, not smears, so we run the comparison directly on MLL23 rather than assume the outcome. We also include a variant that prompts with our full descriptions, which isolates how much comes from the bottleneck and how much from the richer text.
Why not just use group normalization and a black-box classifier? For seen classes this is a real threat. The benchmarking study shows normalization alone recovering most of the cross-lab collapse. If our model only matches it on RaabinWBC, Scirep and LISC, the cross-lab robustness claim fails, and the contribution reduces to zero-shot capability plus auditability. Those two remain things a black box cannot provide: it has no way to score an undefined class, and its errors cannot be corrected by editing an attribute. The head-to-head comparison under a shared tuning budget settles this.
Why not just use discrete attribute heads and a lookup table? This is the most serious alternative, and it is why the vocabulary split exists. On in-vocabulary unseen classes we expect a tie, and a tie there would be acceptable. The text anchoring is justified only if it wins on out-of-vocabulary classes, where the table must force new descriptors onto their nearest old values. If it does not win there, we will drop the text embedding and report the lookup-table system as the simpler and sufficient design.
Why not just smooth zero-shot logits over a cell-similarity graph? GRIT does this for single-cell RNA data, improving LangCell accuracy by up to 10.03% on Muscle. It is complementary rather than competing, and we will apply it on top of both our model and the prompting baseline. It cannot repair features that stain shift has already corrupted, and it gives no reason for a reassignment.
Decisive Checks
Three results decide the proposal. The first is whether the model beats the rerun knowledge-aligned bottleneck, and the group-normalization black box, on out-of-domain F1 for RaabinWBC, Scirep and LISC. The second is whether it beats both prompting baselines and Z-CBM on macro recall for held-out MLL23 classes. The third is whether it beats the discrete lookup table specifically on the out-of-vocabulary subset. A secondary check is the confounded-cytoplasm experiment: phrase attributions must reveal the injected shortcut in a majority of affected decisions, and correcting the attribute must restore the class. If the first two checks pass and the third fails, the finding is still useful, but it becomes a finding about multi-task attribute bottlenecks and not about semantic label embedding. That is the outcome we will report.
References
- Benchmarking White Blood Cell Classification under Domain Shift
- WBCAtt: A White Blood Cell Dataset Annotated with Detailed Morphological Attributes
- Adaptive Concept Discovery for Interpretable Few-Shot Text Classification
- RotoGrad: Gradient Homogenization in Multi-Task Learning
- CytoFM: The first cytology foundation model
- Integrating Clinical Knowledge into Concept Bottleneck Models
- Zero-shot Concept Bottleneck Models
- A Vision-Language Foundation Model for Zero-shot Clinical Collaboration and Automated Concept Discovery in Dermatology
- CellCLIP - Learning Perturbation Effects in Cell Painting via Text-Guided Contrastive Learning
- A large expert-annotated single-cell peripheral blood dataset for hematological disease diagnostics
- GRIT: Graph-Regularized Logit Refinement for Zero-shot Cell Type Annotation