Shortcut or Overlap? Separating Demographic Reliance from Genuine Biology in Medical Vision Foundation Models

Ritvij SharmaarXiv 2026

TL;DR

When you scrub patient age and sex from a medical AI's representations, its disease diagnostic accuracy usually drops—but is that because the AI was lazily cheating with demographics, or because aging and disease genuinely look alike in human tissue? This paper introduces a clever, calibration-controlled "matched test" to finally tell the two apart. Auditing six major medical vision foundation models, the author finds that every single observed accuracy drop was just a demographic shortcut, not shared biology.

What Problem Does This Paper Address?

Medical foundation models—giant neural networks pre-trained on millions of X-rays or retinal scans—are remarkably good at spotting diseases. They are also notoriously good at spotting who the patient is, Quietly encoding age, sex, and race in their feature spaces.

To check if a model is relying on these demographics to make diagnoses, auditors typically use concept erasure: mathematically projecting out the "age" and "sex" directions from the model's feature vectors and checking if a simple classifier's accuracy (measured in AUC) drops.

Here’s the catch: in medicine, a drop in accuracy has two completely different explanations.

  1. A Shortcut (Fairness problem): The model noticed older patients in the training set have more glaucoma, so it flags healthy older retinas as diseased.
  2. An Overlap (Sound biology): Both aging and glaucoma physically alter the optic disc in similar ways. Erasing the visual signature of "aging" accidentally deletes genuine disease signal.

Standard erasure analyses see the exact same accuracy drop in both cases and cannot tell them apart.

Methods

To separate shortcuts from biological overlap, the author designs a Matched Shortcut Test working directly on frozen foundation model features, paired with two vital statistical controls.

Figure 2. Overview of the audit. Frozen features feed an inside audit (probe, erasure, null) and a score-only outside-in audit. When erasure costs AUC, the matched test retrains and re-erases on patients matched for sex and age and compares the result with a shuffled- demographic null over 20 matchings, which separates a shortcut from an overlap. The pipeline is rerun on features from fine-tuned models (Sec. 3.5).

Instead of testing on the whole dataset, the algorithm pairs each diseased patient with a healthy control of the exact same sex and within $\pm 2$ years of age. Inside this matched subset, demographics no longer predict the diagnosis:

  • If the accuracy drop was a shortcut, it should vanish when the classifier is retrained and erased on the matched pairs.
  • If it was a biological overlap, living in the visual features themselves, the erasure cost will persist even among identically aged, same-sex peers.

What makes this novel is how carefully it is calibrated:

  • Shuffled-Demographic Null: Deleting any two directions in a dense feature space costs a tiny bit of accuracy. The author subtracts a baseline cost computed by erasing randomly permuted patient demographics, isolating the true excess cost.
  • Multi-Matching: Because a single greedy pairing of patients might get lucky, the test averages results across 20 random matchings.
  • Outside-in Audit: For auditors who only get prediction scores (no internal features), the paper provides score-only checks, like measuring how strongly disease scores track age in healthy patients.

Datasets

The audit evaluates six models (RETFound, Dual-IFM, RAD-DINO, and DINOv2 variants) across three public datasets—introducing no new benchmarks, but strategically selecting existing ones for their contrasting demographic structures:

  • ODIR-5K: 6,713 retinal fundus images across seven conditions (focusing on glaucoma), where age is only weakly linked to glaucoma.
  • PAPILA: 420 retinal images for glaucoma where healthy controls are substantially younger than diseased patients—confounded by age by construction.
  • NIH ChestX-ray14: Frontal chest radiographs contrasting cardiomegaly (1,496 positives) and pleural effusion (3,033 positives) against 8,000 "No Finding" scans, where diseased patients are on average 5 years older.

Key Insights and Ideas

  • Match everything you erase: When the author matched patients on age alone, four settings still showed a nagging accuracy loss—looking suspiciously like biological overlap. Once sex was matched too, those residuals vanished completely. Auditing age alone would have misattributed sex shortcuts to biology!
  • Encoding $\neq$ Reliance: Just because a model heavily encodes age doesn't mean its disease classifier uses it. On PAPILA, DINOv2 encoded far less age information than RETFound ($R^2$ of 0.34 vs. 0.65), yet suffered the largest shortcut penalty when age was erased. Reliance is driven by dataset confounding, not just feature encoding.
  • Fine-tuning can silently deepen shortcuts: Adapting RETFound on the small, age-confounded PAPILA dataset left overall test AUC virtually unchanged, looking safe on the surface—yet it nearly doubled how strongly the model's glaucoma score tracked age in completely healthy eyes.
  • Linear erasure is a mirage for nonlinear probes: Standard linear erasure tools (like LEACE) successfully blinded linear probes to patient age (AUC ~0.44–0.49). Yet a simple one-hidden-layer MLP trained on those exact "erased" features easily recovered patient age (up to 0.80 AUC).

Key Results

Across all 12 model-dataset combinations, standard erasure lowered disease AUC (by $-0.008$ to $-0.090$). Yet after joint age and sex matching, zero settings exceeded the test’s empirically validated resolution limit of $0.005$ AUC—meaning every single drop was best explained as a demographic shortcut.

Figure 3. Separating shortcut from overlap. (a) Erasing sex and age lowers AUC in every setting (open circles); after age matching (filled, mean of 20 matchings), the PAPILA and effusion costs disappear. (b) Excess cost beyond the shuffled null: red after age matching, blue after age and sex matching (not run on PAPILA), arrows showing the change. Points inside the gray band, the test’s resolution (Sec. 4.3), show no detectable overlap. Matching counts are in Tab. 1.
  • PAPILA & Effusion: On PAPILA, erasing demographics cost up to $0.090$ AUC; matching just 79 pairs on age wiped the cost out completely. Pleural effusion costs ($-0.013$ to $-0.022$) shrank by ~95% after age matching.
  • ODIR-5K & Cardiomegaly: Age matching left small residuals (e.g., $-0.008$ excess AUC on RETFound and DINOv2-L), which collapsed to within $0.001$ of zero once sex was also matched.
  • Clinical Validation: Reviewing healthy PAPILA eyes, a blinded ophthalmologist found that the 10 eyes with the highest RETFound glaucoma scores were 15 years older than the lowest-scoring eyes ($p=0.03$), despite having virtually identical optic cup-to-disc ratios ($p=0.87$). The model was tracking age, not anatomy.

Limitations and Future Work

  • Resolution floor and attenuation: Synthetic "known-answer" tests showed the method has a resolution floor of ~$0.005$ AUC. Furthermore, when true biological overlap is planted, linear probes partially rebuild the erased signal from correlated directions, attenuating the measured excess (e.g., a $-0.125$ plant yielded a $-0.007$ excess). Tiny biological overlaps could go undetected.
  • Dataset & Metadata Constraints: PAPILA is too small (79 pairs) to split by sex, ODIR-5K and NIH labels rely on text-mining, neither retinal dataset records ethnicity, and matching did not control for hospital acquisition hardware.
  • Future Audits: Auditors should match on every demographic they erase, test "debiased" features with nonlinear probes as flexible as their downstream classifiers, and always re-audit models after fine-tuning.

Summary updated

BibTeX
@misc{sharma2026shortcut,
  author = {Ritvij Sharma},
  title = {{Shortcut or Overlap? Separating Demographic Reliance from Genuine Biology in Medical Vision Foundation Models}},
  year = {2026},
  eprint = {2611.38022},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.38022},
}
Figure