DDxBasis: Explaining Frozen Foundation Encoder-based Medical Classification by Exact Differential Diagnosis

arXiv:2611.33358 · cs.CV, q-bio.QM · Submitted 2026-11-24 · Read on arXiv

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

Where the paper says it

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.

The concept bottleneck achieves strong classification by reading all patch tokens across every layer with competing, gated, second-order slots. p. 1

Where the paper says it

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 this evidence group by group yields exact and faithful class logits. p. 1
Where the paper says it

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.

The concept basis proposes a compact set of novel two-pole axes, where each axis represents a differential between groups of diagnoses. p. 1
Where the paper says it

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.

These axes are learned with specific constraints: distinctness via log-determinant volume, load-balancing via a band, coherence through normalized pole score on within-class correlation, and consensus tying matching axes across bottlenecks to the same image property. p. 3
Where the paper says it

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.

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

Where the paper says it

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.

g., discovering rare subtypes like hairy cells in BMC), and exposing planted or real shortcuts. p. 0
Where the paper says it

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.

The concept basis learns two-pole axes that are highly effective for differential diagnosis. p. 1

Where the paper says it

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.

For instance, on PBC, the E0 axis orders five granulocyte maturation stages on held-out data (rho=0. p. 6
Where the paper says it

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.

87), even though the classifier only sees two merged labels (immature granulocyte and neutrophil). p. 6
Where the paper says it

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).

On BMC, the E4 axis orders several cell lineages on test images (rho=0. p. 6
Where the paper says it

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.

81) and separates proerythroblasts from erythroblasts with high AUROC (0. p. 6
Where the paper says it

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.

98). The axes also expose shortcuts, such as view position in chest radiographs, which is flagged due to its strong held-out effect. p. 1
Where the paper says it

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.

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

Where the paper says it

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.

Results confirm that DDxBasis maintains state-of-the-art accuracy through its basis; decisions are split exactly by the concept basis, and within a class, position tracks the axis margin (rho=0. p. 5
Where the paper says it

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.

85 average). p. 1
Where the paper says it

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.

The audit identifies rare subtypes hidden in training labels and follows structures verified by dermatologists' annotations.

The concept basis is highly auditable. p. 6

Where the paper says it

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.

Table S7 shows that for each dataset, the leading axis set is the smallest set carrying 80% of its positive margin, with every axis lying in the 80% set of at least 6% of decisions. p. 4
Where the paper says it

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.

Leading axes are stable across seeds on skin, OBM, and chest. p. 5
Where the paper says it

66 + gates (ours) 75. 60 (b) Merging across depth Skin PBC OBM BMC Chest Feature fusion, one head 75.

For instance, on BMC, the maturation axis E4 leads 54% of all decisions because several classes are stages within one maturation series. p. 1
Where the paper says it

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.

The audit flags potential shortcuts; for example, AKIEC is led by axis E0 (excised vs follow-up) in 68% of decisions, though the audit finds the classifier does not rely on it. On chest, eight findings are led by E0, E1, or E2, tracking view position and film brightness alongside opacity. p. 0
Where the paper says it

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.

The concept basis reads as clinical differentials beyond independent classes. p. 6

Where the paper says it

Table S10). The concept basis reads as clinical differentials The axes discover differential clinical reasoning beyond independent classes (Fig.

On PBC, ordering is weaker on other axes (rho=0. p. 6
Where the paper says it

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.

31 and 0.33). The skin basis is validated by dermatologists’ annotations in three ways, predicting structures better than the diagnosis label (AUROC 0. p. 6
Where the paper says it

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.

69 vs. 0.58). The final configuration selection optimizes multiple properties: exactness (F1), effective dimension (at least 0. p. 6
Where the paper says it

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.

6K, F2), margin constraint (no axis holds >50% of average margin, F3), median seed match (at least 0. p. 4
Where the paper says it

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.

9, F4), content redundancy (<0. p. 4
Where the paper says it

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.

5, F5), and readability, while other properties are optimized by the loss function. p. 3
Where the paper says it

Exact sum across layers. Each layer has its own slots, head, and loss, as in deep supervision [69].

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

  1. 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.

  2. The model can discover 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 0.87 from only two merged training labels). This capability allows the AI to identify rare subtypes hidden inside coarse training classes.

  3. 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

Related papers