ShortKit-ML : an open toolkit for measuring shortcut potential in medical imaging embeddings

Authors:

Abstract
Background and Objective: A classifier trained on frozen embeddings can take a shortcut through a sensitive attribute only if the embedding carries information about it beyond what the task label explains: its shortcut potential. We asked whether this can be measured on the embedding alone with a known false positive rate, and whether it predicts how strongly a classifier trained on confounded data relies on the attribute. Methods: ShortKit-ML tests whether an embedding E and a sensitive attribute A are dependent given a task label Y . The primary test is a conditional probe: a logistic regression that predicts A from E and Y , scored by out-of-fold AUROC and calibrated by permuting A within levels of Y , between patients. Five secondary detectors share this null. We audited sex, age and race for seven frozen encoders on CheXpert and four on MIMIC-CXR, and trained heads on confounded CheXpert splits. Results: Under the null the probe rejected in 0.02 of synthetic data sets. With A and Y strongly correlated, an unconditional probe rejected in 0.95 and the conditional probe in 0.03. No detector found signals that leave group means unchanged, unlike probes on squared or product features under the same null. The probe found attribute information in 21 of 21 CheXpert and 12 of 12 MIMIC-CXR cells. Across 42 CheXpert cells the probe score correlated with the true positive rate gap of a confounded head (Spearman 0.60, 95% CI 0.31 to 0.80 resampling encoders), 0.74 within sex and not significantly within age. Three embedding-level mitigations changed the gap by at most 0.01 relative to their controls. Refitting the head on a group-balanced subset closed it. A planted image marker was found in all 10 seeds. Conclusions: One calibrated linear test measures shortcut potential on a frozen embedding, and on CheXpert its score correlated with how strongly a confounded logistic head relied on the attribute, clearly for sex. It does not show that a given head uses the attribute, and lowering the score did not remove reliance, so the head itself must be tested as well. Code is at https://github.com/criticaldata/ShortKit-ML .
Funding Information
  • National Institute of Biomedical Imaging and Bioengineering (NIBIB R01 EB017205)

This publication has 63 references indexed in Scilit: