Label Leakage in Public Mammography Datasets: File Header Geometry and Batch Confounding

Public mammography datasets widely suffer from label leakage; non-diagnostic information predicts diagnostic labels with high AUC.
A study of six public mammography datasets found that non-diagnostic information such as image geometry, global texture, and subset identifiers alone can predict diagnostic labels with high AUC, indicating severe label leakage. For example, in KAU-BCMD geometry predicts BI-RADS with AUC 1.0000, in CMMD subset prefixes predict malignancy with AUC 0.7753, and a post hoc identifier-order control reaches AUC 0.9926. The researchers propose a pretraining acceptance gate requiring all non-diagnostic controls below AUC 0.60 before accepting a dataset for pretraining, and have released code and tables. The study warns medical imaging AI developers to run leakage control experiments before reporting model performance, and that cross-dataset generalization is more meaningful than high single-dataset performance.
Introduction: When Non-Diagnostic Information "Guesses" the Diagnostic Label
In medical imaging AI research, high model performance is usually seen as good news. But if that high performance comes from non-diagnostic information—such as image dimensions, file header textures, or dataset source identifiers—then the performance is spurious and cannot generalize. A recent study of six public mammography datasets systematically quantified the severity of this label leakage.
The researchers designed a set of pretraining control experiments: they let models see only geometric attributes, global texture, subset identifiers, or a single covariate of the images, and then examined their ability to predict diagnostic labels. If some piece of non-diagnostic information can predict labels with high AUC, it indicates label leakage in the dataset. The stopping threshold was set at AUC 0.60—any control exceeding this value means the dataset is unsuitable for direct diagnostic modeling.

Label Leakage is a special case of data leakage in machine learning, referring to training data containing information that is correlated with the target label but is unavailable or should not be exploited by the model in real deployment scenarios. In medical imaging, such information may come from non-clinical factors such as imaging equipment, scanning protocols, file formats, and dataset curation processes. When a model uses this information to "guess" labels, its performance on independent test sets drops significantly because the distribution of non-diagnostic information in real clinical settings differs from that in the training set. Label leakage differs from overfitting: it stems from biases in the data generation process itself, not from model complexity. Common methods for detecting label leakage include training simple models (e.g., logistic regression or decision trees) using only non-diagnostic features; if their predictive performance is significantly above chance, leakage is present.
Experimental Design and Control Items
The research team conducted systematic control experiments on six public breast imaging datasets. The control items included:
- Geometric control: using only geometric information such as image dimensions.
- Texture control: after image resizing, using only global texture features.
- Subset identifier control: using subset prefixes or batch identifiers within the dataset.
- Covariate control: introducing a single covariate for prediction.
The design principle of these controls is that they contain no clinical diagnostic information whatsoever; if a model can predict labels from them, it proves the existence of non-diagnostic confounders correlated with labels in the dataset.
AUC (Area Under the ROC Curve) is a common metric for evaluating binary classification models, ranging from 0.5 (random guessing) to 1.0 (perfect discrimination). In label leakage detection, AUC is used to quantify the ability of non-diagnostic information to predict labels. The researchers set AUC 0.60 as the stopping threshold, meaning that if non-diagnostic information alone can achieve an AUC above 0.60, the dataset has suspicious label leakage. This threshold was chosen based on experience: in medical imaging, an AUC of 0.60 is generally considered weak-to-moderate predictive ability, sufficient to raise concern. Note that AUC is insensitive to class imbalance, so it provides stable evaluation even when the ratio of positive to negative samples is highly skewed.
Leakage Evidence Across Datasets
KAU-BCMD: Geometry Predicts Almost Perfectly
In the KAU-BCMD dataset, geometric information alone predicted BI-RADS categories with AUC 1.0000 on a local copy, and an average AUC of 0.979 on the public Kaggle archive. This means that geometric attributes in image dimensions or file headers almost perfectly encode the diagnostic label. Even after resizing, texture information alone still achieved AUC 0.847. Leakage of this magnitude makes the performance of any model trained on this dataset untrustworthy.
CMMD: The Predictive Power of Subset Prefixes
In the CMMD dataset, subset prefixes predicted malignant lesions with AUC 0.7753. More notably, after restricting to subsets, the geometric control (0.5000) and texture control (0.5810) both passed the threshold, but an identifier-order control added post hoc failed with a test AUC of 0.9926. This indicates that even seemingly clean restricted subsets can still leak labels through hidden identifiers such as file order.
CBIS-DDSM: Geometry Exceeds the Threshold
CBIS-DDSM exceeded the stopping threshold on the geometric control, with a pooled average AUC of 0.654 across 20 splits (this decision statistic was selected post hoc). However, its official mass and calcification splits did not exceed the threshold, indicating that leakage varies across subsets.
Datasets That Passed
M-SYNTH, INbreast, and some VinDr-Mammo copies passed the few control items that were run. But the researchers note that this does not mean they are completely free of leakage—only that the current controls did not detect it.
BI-RADS (Breast Imaging Reporting and Data System) is a system developed by the American College of Radiology to standardize the description and classification of breast X-ray, ultrasound, and MRI findings. BI-RADS categories range from 0 to 5, representing different risk levels from "additional imaging evaluation needed" to "highly suspicious for malignancy." In the KAU-BCMD dataset, BI-RADS categories serve as diagnostic labels, while geometric attributes such as image dimensions may indirectly reflect equipment settings or operational workflows at the time of imaging—workflows that are in turn correlated with patient clinical characteristics, leading to near-perfect predictive performance.
Pretraining Acceptance Gate: An Engineering Countermeasure
Based on these findings, the researchers proposed a "pretraining acceptance gate" mechanism: before using a dataset for model pretraining, run a standardized set of control experiments. A dataset is accepted only when all control items have AUC below the stopping threshold (0.60). The core idea is to front-load data quality checks to avoid wasting compute and time on spurious performance.
The researchers have released code and derived tables for the community to reproduce and extend. You may not have noticed that the paper explicitly states that the inference path contains no quantum components—this clarification may be intended to address outside misunderstandings about the research methodology.
Implications for Medical Imaging AI
This study reveals a common but often overlooked problem: the collection and curation of public datasets may introduce non-diagnostic information correlated with labels. Geometric attributes (such as image dimensions) may reflect different scanning protocols or equipment batches, and these batches are correlated with disease prevalence. Subset prefixes may correspond to different recruitment centers or time periods, also correlated with labels.
For medical imaging AI developers, this means:
- Before reporting model performance, similar leakage control experiments must be run.
- Data preprocessing (e.g., uniform resizing) may eliminate some leakage but cannot eliminate all of it (e.g., CMMD's identifier-order control).
- Cross-dataset generalization evaluation is more meaningful than high performance on a single dataset.
Covariate in statistics refers to an independent variable that may be related to the dependent variable (label). In the context of label leakage, covariate control means introducing a variable unrelated to clinical diagnosis (such as patient age, scan time, equipment model, etc.) to predict labels. If this covariate can significantly predict labels, it indicates the presence of confounders in the dataset. A confounder is a variable correlated with both the exposure (non-diagnostic information) and the outcome (label), which can lead to spurious associations. In medical imaging datasets, common confounders include recruitment center, time batch, and equipment batch. Controlling for these covariates is an important step in reducing label leakage, but complete elimination often requires strict anonymization and cleaning at the time of data release.
Conclusion
Label leakage through file header geometry and batch confounding is widespread and surprisingly severe in public mammography datasets. The geometric control AUC for KAU-BCMD is near-perfect, and the identifier-order control AUC for CMMD is as high as 0.9926. The pretraining acceptance gate offers an actionable solution, but the fundamental remedy lies in stricter cleaning and anonymization of non-diagnostic information at data release. For researchers, before chasing AUC, ask one question: does this performance come from the image, or from the file header?
Related articles

Has AI Surpassed the Median Economist? A Debate on Perceiving Capability
A YouTube discussion argues AI's comprehension in soft fields like economics has surpassed the median professional economist, but people resist acknowledging it due to the lack of hard metrics. The article analyzes this perception gap and its industry implications.

Banks No Longer Profitable? The Industry Shift Sparking Debate on HN
Hacker News debates the claim that "banks are no longer profitable." This article analyzes the real picture of profit divergence in banking, explains failure and seizure mechanisms, and examines the structural pressures on bank profitability from interest rates, deposit competition, and technology costs.

Govee Smart Outdoor Lights 30% Off for Black Friday: 50-Foot Model Drops to All-Time Low
Govee Black Friday sale: 50-foot Permanent Outdoor Lights 2 drops to $125.99, matching its all-time low; 100-foot model drops to $179.99, a $100 discount. We analyze value and buying advice.