DDxBasis: Explaining Frozen Foundation Encoder-based Medical Classification by Exact Differential Diagnosis
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: I'm Tom.
Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.
Tom: We're looking at the paper: "DDxBasis: Explaining Frozen Foundation Encoder-based Medical Classification by Exact Differential Diagnosis".
Title and authors: Jane: We talked about DDxBasis and how it creates differential diagnoses rather than just single labels, focusing on the structure of those two-pole axes and how they reveal hidden clinical information in medical images, moving from simple classification to reasoning about what separates different diseases.
Tom: Right, so we’re talking about the DDxBasis paper now, and it’s focused on framing a diagnosis as a differential diagnosis by using three sequential steps applied to a frozen foundation encoder. It starts with the concept bottleneck reading all patch tokens at every encoder layer using gated, second-order slot attention.
Lu: Before that, you have this concept bottleneck which reads all patch tokens across every layer with competing, gated, second-order slots where each class logit is just a sum of non-negative concept evidence. Summing that evidence group by group yields exact and faithful class logits.
Meng: I wonder about the practicality of reading everything at every layer; does that bottleneck become too slow when we have to do this for high resolution images? What’s the computational cost there?
Lalam: The paper focuses on how this concept bottleneck achieves strong classification because it reads all patch tokens across every layer with competing, gated, second-order slots where each class logit is a sum of non-negative concept evidence. Summing that evidence group by group yields exact and faithful class logits.
Tom: It’s designed so that summing that evidence group by group yields exact and faithful class logits because each class logit is a sum of non-negative concept evidence, which helps in getting those precise results.
Jane: So then you move from the bottleneck to the concept basis, which proposes a compact set of novel two-pole axes where each axis represents a differential between groups of diagnoses. These axes are learned with specific constraints like distinctness via log-determinant volume and coherence via normalized pole score on within-class correlation.
Lu: Those constraints are key because they ensure the axes are distinct, load-balanced by a band, coherent through normalized pole score on within-class correlation, and that consensus tying matches axes across bottlenecks to the same image property.
Meng: Load balancing via a band sounds like it’s trying to keep the differences between groups evenly distributed so we don't get one axis dominating everything else. How does that play out in practice?
Lalam: The concept basis learns two-pole axes that are highly effective for differential diagnosis, and for example on PBC images, the E0 axis orders five granulocyte maturation stages on held-out data with a rho of zero point eight seven, even though the classifier only sees two merged labels like immature granulocyte and neutrophil <ref:2611.33358#pg1>.
Tom: That’s a really powerful result because it shows this method can uncover structures that are hidden inside coarse training classes, like discovering rare subtypes such as hairy cells in breast cancer images.
Jane: And these axes also expose things like view position in chest radiographs which is flagged due to its strong held-out effect, showing that the model isn't just looking at the main pathology but also superficial things.
Lu: The method’s objective function minimizes a loss that combines basis terms like distinctness, balance, coherence, and reproducibility with content terms like reconstruction of concept tokens and descriptor residual. It’s a complex optimization goal to get all those properties balanced at once.
Lalam: The audit on the concept basis is quite thorough; they found that for each dataset, the leading axis set is actually the smallest set carrying eighty percent of its positive margin, and every single axis lies in the eighty percent set of at least six percent of all decisions.
The paper's summary: Tom: So we’ve seen how this method builds those two-pole axes, and now we need to talk about what the core summary of DDxBasis actually says about the mechanics of this classification process. It frames a diagnosis as a differential diagnosis through three sequential steps applied to a frozen foundation encoder.
Lu: It starts with the concept bottleneck reading all patch tokens at every layer using gated, second-order slot attention, and then it moves to the concept basis processing that regroups concepts into two-pole axes representing differentials between groups of diagnoses.
Jane: And the final step is how you read that differential diagnosis by looking at each axis through the typical presentation of its poles, the pertinent findings of the case, and counterfactual edits of borderline cases.
Meng: I’m trying to get a really simple analogy for this whole three-step process so that someone listening who isn't deep in ML can grasp what’s actually happening under the hood.
Lalam: Think of it like this: first, you look at every piece of information across all layers with competing slots, then you use those tokens to build these axes that show the differences between groups of diagnoses.
Tom: And the final step is reading from those axes by looking at their poles and testing what happens when you make a small change to the image to see if it flips the decision.
Jane: The paper emphasizes that this approach is faithful because prototype networks and concept bottlenecks are faithful by construction, but over a hundred overlapping concepts are too much for models to handle.
Lu: They found that the evidence of E0, Eq. (five) minus pole plus pole NEU one hundred four point three IG six point zero logit equals all axes plus bk seventeen eight point one NEU eighty-eight point three IG equals k exactly, which means it’s exactly what you want in terms of concept evidence <ref:2611.33358#pg3>.
Meng: That equation is dense, but from what I can gather, it’s showing that the model finds the exact set of concepts needed to make a prediction without any extra guesswork added on top.
Lalam: And they show how this decomposition works by looking at the pole atlas and names for typical presentation, and then looking at the margin map and position for pertinent findings.
Tom: It’s about making sure that when you look at the pole atlas, you are matching it with what you see in your case data.
Jane: And if there are borderline cases, they show how counterfactual edits can visualize what change in the image might flip the decision but not how the model actually reads it.
The paper's improvements: Tom: So we’ve covered the core mechanism and results, now let’s look at what improvements DDxBasis suggests for this existing framework, because it’s not just a finished system; it has room to evolve.
Lu: One major improvement is that the concept basis creation allows for reading a differential diagnosis by "reading a differential diagnosis from each axis through the typical presentation of its poles, the pertinent findings of the case, and counterfactual edits of borderline cases."
Jane: That’s what makes it clinically useful because it moves beyond simple ranked lists and lets AI systems generate explanations that go beyond just showing a list.
Meng: So this is about making sure the output is actionable for a clinician, not just pretty visualization; how does that change the deployment story?
Lalam: Another big contribution is discovering clinical insights beyond class labels, from clinical structure to shortcuts, such as recovering cell lineages (one axis orders five granulocyte maturation stages with Spearman rho zero point eighty-seven from only two merged training labels).
Tom: That finding is significant because it shows we can uncover rare subtypes hidden inside coarse training classes, and that’s something we don't see often in standard classification.
Jane: And they also expose planted or real shortcuts, which means they can flag acquisition variables whose strongest effect is a variable, allowing researchers to test if a shortcut is actually relied upon.
Lu: The objective function minimizes a loss combining basis terms like distinctness, balance, coherence, reproducibility and content terms like reconstruction of concept tokens and descriptor residual. It’s a complex optimization goal to get all those properties balanced at once.
Meng: If we are going to deploy this, what I care about is how much this explanation adds versus just adding another layer of complexity to the pipeline. The paper mentions that decisions are split exactly by the concept basis, which is good for trust, but we need to know if it’s computationally expensive during inference.
Lalam: The final configuration selection optimizes multiple properties: exactness, effective dimension being greater than or equal to zero point six times K, margin constraint with no axis holding more than fifty percent of the average margin, median seed match greater than or equal to zero point nine, and content redundancy less than zero point five.
Tom: These specific optimizations show they are really balancing multiple properties simultaneously: exactness, effective dimension being greater than or equal to zero point six times K, margin constraint with no axis holding more than fifty percent of the average margin, median seed match greater than or equal to zero point nine, and content redundancy less than zero point five.
Jane: So ultimately this means the model can discover clinical insights beyond simple class labels from clinical structure to shortcuts like view position in chest radiographs.
Conclusion: Tom: Alright, we’ve seen how DDxBasis works, what the key results are, and what improvements they made to move toward actionable differential diagnoses. It seems this paper has a lot of implications for how we think about explaining medical AI decisions.
Jane: The main implication is that instead of just getting a ranked list, clinicians get reasoning behind that rank because the concept basis makes the explanation exact and compact.
Lu: It also means we can discover clinical insights beyond class labels, uncovering things like cell lineages hidden inside coarse training classes and exposing real or planted shortcuts in the data.
Meng: From a deployment view, it seems like it’s an excellent way to build trust because decisions are split exactly by these learned axes, but we still need to confirm the inference cost is manageable for high-throughput clinical settings.
Lalam: The DDxBasis method is really about reading a differential diagnosis from each axis through the typical presentation of its poles, the pertinent findings of the case, and counterfactual edits of borderline cases.
Tom: We’ve seen how it handles complex problems on PBC images, where ordering is weaker on other axes with a rho of zero point thirty-one and zero point thirty-three for those other axes.
Jane: The final configuration selection optimizes multiple properties like exactness, effective dimension greater than or equal to zero point six times K, margin constraint with no axis holding more than fifty percent of the average margin, median seed match greater than or equal to zero point nine, and content redundancy less than zero point five.
Lu: The paper’s full title is DDxBasis: Explaining Frozen Foundation Encoder-based Medical Classification by Exact Differential Diagnosis, and this method is really about making the AI output clinically useful by exposing the structure behind the label.
Meng: I think for me, it’s a strong direction because it focuses on auditable results that can be checked against known structures in medicine, which is what we need before we push these things into production pipelines.
Lalam: This paper is really about reading a differential diagnosis from each axis through the typical presentation of its poles, the pertinent findings of the case, and counterfactual edits of borderline cases.
Johns Hopkins University
cs.CV, q-bio.QM
Submitted: 2026-11-24
Updated: 2026-12-01
Comments: Project page: durrlab.github.io/DDxBasis
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 92/100
The gist: DDxBasis explains medical image classification by framing a diagnosis as a differential diagnosis, which is achieved through three sequential steps applied to a frozen foundation encoder: first…
Key concepts
- Concept Bottleneck
- This step reads all image patch tokens across every encoder layer using gated, second-order slots. Each class logit is a sum of non-negative concept evidence. Summing this evidence by group yields exact and faithful class probabilities, ensuring strong classification.
- Concept Basis
- This component proposes a compact set of novel two-pole axes that represent differentials between groups of diagnoses. These axes are learned under constraints like distinctness, load-balancing, and coherence. They capture structural differences in medical data.
- Differential Diagnosis Reading
- The final step reads the differential diagnosis by examining each axis through its poles, the case's pertinent findings, and counterfactual edits of borderline cases. This allows AI to generate clinically useful explanations that go beyond simple ranked lists.
- Auditable Axes
- The concept basis is auditable because it exposes potential data artifacts like planted or real shortcuts. For example, it flags view position in chest radiographs as a shortcut, allowing researchers to test if the model relies on these variables.
Terminology
Summary
DDxBasis explains medical image classification by framing a diagnosis as a differential diagnosis, which is achieved through three sequential steps applied to a frozen foundation encoder: first, a concept bottleneck reads all patch tokens at every encoder layer using gated, second-order slot attention; second, this information is processed by a concept basis that regroups concepts into two-pole axes representing differentials between groups of diagnoses; and finally, the differential diagnosis is read from each axis through the typical presentation of its poles, the pertinent findings of the case, and counterfactual edits of borderline cases. p. 0 We present DDxBasis, which
explains a classifier on a frozen foundation encoder as a differential diagnosis in three steps. First, a concept bottleneck
reads all patch tokens at every encoder layer using gated,
second-order slot attention.Where the paper says it
The concept bottleneck achieves strong classification by reading all patch tokens across every layer with competing, gated, second-order slots. p. 1 We present DDxBasis, which obtains faithful and compact explanations by regrouping an accurate concept bottleneck. Our concept bottleneck achieves strong classification
by reading all patch tokens across every layer of the frozen
encoder with competing, gated, second-order slots (Sec. Each class logit is a sum of non-negative concept evidence. Summing the same concept evidence group by group gives
the same class logits, so an explanation by concept groups is
exact and faithful to the model. Summing the same concept evidence group by group gives
the same class logits, so an explanation by concept groups is
exact and faithful to the model. To read the grouped concepts
for differential diagnosis, we propose a compact set of novel
two-pole axes, named a concept basis, each a differential
between groups of diagnoses, trained to be distinct, balanced,
contrastive, and reproducible (Sec. A log-determinant volume [72]
on the within-class correlation of positions keeps the axes distinct, penalizing collinear axes sharply while staying flat near
orthogonality, allowing the mild correlation of co-occurring
clinical attributes [54]. A load-balancing band keeps them
balanced, holding each axis’s average share of the margin
between κmin and κmax.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
The contributions of DDxBasis are threefold: first, it is the most accurate frozen-encoder model across five medical datasets while maintaining close proximity to published domain-specific results; second, the resulting explanation is both exact and compact; and third, these axes reveal insights beyond simple class labels, uncovering clinical structure, cell lineages hidden within coarse training classes (e. p. 1 On five medical tasks in dermoscopy,
blood and bone-marrow cytology, phase-contrast cell microscopy, and chest radiography, DDxBasis is the most accurate frozen-encoder model, on average 12 points above
a linear probe on the same encoder, and close to published
domain-specific results (Sec. Second, the explanation
is both exact and compact. Because every concept
adds its own evidence, its reproducible concept basis splits
each decision exactly, at no cost in accuracy. Without ordered stage or concept labels, the axes recover cell lineages
and rare subtypes, agree with dermatologists’ structure annotations, and expose planted and real shortcuts.Where the paper says it
Where the paper says it
The concept basis learns two-pole axes that are highly effective for differential diagnosis. p. 1 Summing the same concept evidence group by group gives
the same class logits, so an explanation by concept groups is
exact and faithful to the model. To read the grouped concepts
for differential diagnosis, we propose a compact set of novel
two-pole axes, named a concept basis, each a differential
between groups of diagnoses, trained to be distinct, balanced,
contrastive, and reproducible (Sec. The concept basis reads as clinical differentials
The axes discover differential clinical reasoning beyond
independent classes (Fig. On PBC, the E0 axis orders
the five granulocyte maturation stages on held-out data (stage
ρ 0. On PBC, the E0 axis orders
the five granulocyte maturation stages on held-out data (stage
ρ 0. 87), although the classifier sees only two merged labels,
immature granulocyte (IG) and neutrophil (NEU). 64), whereas the classifier’s own IG-orNEU call carries no such order (0. On BMC, where
each stage is an unordered training class, the E4 axis orders
several cell lineages on test images, placing blasts through
segmented neutrophils in maturation order (stage ρ 0. On BMC, where
each stage is an unordered training class, the E4 axis orders
several cell lineages on test images, placing blasts through
segmented neutrophils in maturation order (stage ρ 0. 81)
and separating proerythroblasts from erythroblasts (AUROC
0. They also expose
shortcuts, cues that predict the label in training but not the
disease [22]. A planted shortcut lands on one axis whose
removal raises accuracy by about 20 points where the strong
shortcut misleads, and the view position of chest radiographs
is flagged as a real shortcut (Sec.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
The method's objective function minimizes a loss combining basis terms (distinctness, balance, coherence, reproducibility) and content terms (reconstruction of concept tokens and descriptor residual). Edits along an axis are performed by conditioning the generator on the edited condition, while the prediction explanation remains the exact decomposition. p. 2 In medical imaging, counterfactual generators show what changes a prediction and can expose shortcuts [55–57], and concept bottleneck generative models steer
generation through supervised concepts [58]. Our concept
basis learns two-pole axes with a log-determinant volume
for distinctness, and conditions a co-trained generator for
counterfactual edits of one axis at a time. The most used axis carries on average only 33% of the margin (31–35% across datasets), so different decisions draw
on different subsets of the basis and together need all of it. Within a class, the position tracks the axis margin between its
two pole classes (Spearman ρ 0. First, our concept bottleneck turns all patch tokens of a frozen foundation encoder
into a strong classifier. On five medical tasks in dermoscopy,
blood and bone-marrow cytology, phase-contrast cell microscopy, and chest radiography, DDxBasis is the most accurate frozen-encoder model, on average 12 points above
a linear probe on the same encoder, and close to published
domain-specific results (Sec.Where the paper says it
Where the paper says it
Where the paper says it
The concept basis is highly auditable. p. 6 Without any annotation, the skin basis follows the structures that dermatologists
use to tell these lesions apart, so its explanations can be
checked against what a dermatologist sees. The concept basis makes the model auditable
Axis statistics support auditing borderline errors. 2 measures are defined in Supp. Attention
coverage counts patches inside the half-mass core of any
slot, shared errors compares layers at least four apart on
test images, axes per decision counts axes carrying 80% of
an image’s positive margin (class bias excluded), and seed
match correlates the worst-matched axis across seeds. 66
+ gates (ours) 75. 60
(b) Merging across depth Skin PBC OBM BMC Chest
Feature fusion, one head 75. Without ordered stage or concept labels, the axes
discover cell lineages (one axis orders five granulocyte maturation stages with Spearman ρ 0. 87 from only two merged
training labels), flag rare subtypes hidden inside coarse training classes, and follow the dermoscopic structures verified
by dermatologists’ annotations (Sec. 2
central white
patch
basal cell
carcinoma
melanocytic nevus
comedo-like
openings
−50
−25
0
0
1
0 1
−50
0
0
1
Chest (NIH ChestX-ray14)
1a Pertinent findings
effusion
(PA view)
E0
airspace
opacity +30. 7
E1 ⚑
film brightness +0.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
The concept basis reads as clinical differentials beyond independent classes. p. 6 Table S10). The concept basis reads as clinical differentials
The axes discover differential clinical reasoning beyond
independent classes (Fig. 3 times more than the others, and an
independently trained ConvNeXt-T [91] sees edited PBC
cells mature as much as real cells (Supp. In both
datasets the ordering is weaker on the other axes (average
stage ρ 0. Finally, the six
axis positions alone predict the structures better than the
diagnosis label (AUROC 0. Without any annotation, the skin basis follows the structures that dermatologists
use to tell these lesions apart, so its explanations can be
checked against what a dermatologist sees. Sparse dictionaries and factorizations leave part of the margin unexplained
(exactness 0. Our basis is exact like a partition
and balanced like a factorization, and each objective term is
needed for one of these properties (Supp. 2 measures are defined in Supp. Attention
coverage counts patches inside the half-mass core of any
slot, shared errors compares layers at least four apart on
test images, axes per decision counts axes carrying 80% of
an image’s positive margin (class bias excluded), and seed
match correlates the worst-matched axis across seeds. We render how this case would present further toward the
alternative [13]. A pixel-space rectified flow [74], co-trained
with the basis, is conditioned by cross-attention [75] on one
token per axis, built from its position pj and content code, a
signed average of its concept tokens tu (Supp. Exact sum across layers. Each layer has its own slots,
head, and loss, as in deep supervision [69].Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Concept basis creation allows for reading a differential diagnosis by
reading a differential diagnosis from each axis through the typical presentation of its poles, the pertinent findings of the case, and counterfactual edits of borderline cases.
This enables AI systems to generate clinically useful explanations that go beyond simple ranked lists. -
The model can discover clinical insights
beyond class labels, from clinical structure to shortcuts,
such as recoveringcell lineages (one axis orders five granulocyte maturation stages with Spearman rho 0.87 from only two merged training labels).
This capability allows the AI to identify rare subtypes hidden inside coarse training classes. -
The concept basis makes the model auditable by exposing potential data artifacts, as it can
expose planted and real shortcuts
and flag acquisition variables whose strongest effect is a variable, allowing researchers to test if a shortcut is relied upon.
Abstract
In differential diagnosis (DDx), a clinician explains a diagnosis by the few findings that separate it from the alternatives. Medical image classifiers cannot yet explain themselves this way. Existing explanations are either faithful but spread over hundreds of concepts, or compact but leave part of each decision unexplained. We present DDxBasis, which explains a classifier on a frozen foundation encoder as a differential diagnosis in three steps. First, a concept bottleneck reads all patch tokens at every encoder layer using gated, second-order slot attention. A concept basis then regroups the concepts into two-pole axes, each a differential between groups of diagnoses. Finally, we read a differential diagnosis from each axis through the typical presentation of its poles, the pertinent findings of the case, and counterfactual edits of borderline cases. Across five medical datasets, DDxBasis is the most accurate frozen-encoder model and close to the best published domain-specific results. Because every concept adds its own evidence, its reproducible concept basis splits each decision exactly, at no cost in accuracy. Without ordered stage or concept labels, the axes recover cell lineages and rare subtypes, agree with dermatologists' structure annotations, and expose planted and real shortcuts.
Sources
- MedGemma Technical Report
- DINOv3
- Evaluating General Purpose Vision Foundation Models for Medical Image Analysis: An Experimental Study of DINOv2 on Radiology Benchmarks
- Does DINOv3 Set a New Medical Vision Standard? Benchmarking 2D and 3D Classification, Segmentation, and Registration
- Skin Lesion Analysis Toward Melanoma Detection 2018: A Challenge Hosted by the International Skin Imaging Collaboration (ISIC)
- CytoDINO: Risk-Aware and Biologically-Informed Adaptation of DINOv3 for Bone Marrow Cytomorphology
- Vertical Fusion: Condensing Internal Representations for Robust ViT Classification
Related papers
- Lightweight Adaptation of General-Purpose VLMs for Multispectral and SAR Image Understanding
- Systematic Evaluation of Underwater Image Reconstruction
- InteracVid: Building a Real Interactive Audio-Visual Response Dataset from Live-Chat Videos
- Count Anything
- Shot-Aware Frame Sampling for Video Understanding
- Reduce Tokens, Refine Semantics: Training-Free Acceleration of Vision-Language Models