Label leakage through file headers: geometry and batch confounds in public mammography datasets, and a pre-training acceptance gate
Organizations: Qanary Inc.
Abstract
A dataset whose diagnostic label can be recovered from non-diagnostic information yields high, reproducible and uninformative model performance. We applied pre-training controls that see only image geometry, global texture, a sub-collection identifier or one covariate to six public mammography datasets, against a stop threshold of AUC 0.60. In KAU-BCMD, geometry alone predicted the BI-RADS class at AUC 1.0000 in a local copy and at a mean of 0.979 in a public Kaggle archive; after resizing, texture alone gave 0.847. In CMMD, the sub-collection prefix predicted malignancy at 0.7753; the restricted sub-collection passed geometry (0.5000) and texture (0.5810) but failed an identifier-order control added post hoc (test AUC 0.9926). CBIS-DDSM exceeded the stop on geometry (pooled mean 0.654 over 20 splits), a verdict statistic chosen post hoc; its official mass and calcification splits did not. M-SYNTH, INbreast and a partial VinDr-Mammo copy passed the few controls run. We release the code and derived tables. There is no quantum component in the inference path.
Figures & tables
| Control | Input | Role | Threshold | Status |
|---|---|---|---|---|
| Geometry | image width, height, megapixels, aspect ratio; no pixel content | stop | about 0.50 expected; 0.60 stops the study | registered before the CMMD run |
| Texture | Laplacian variance, gradient energy, intensity standard deviation, contrast range, after a common resize; no geometry | stop | about 0.50 expected; 0.60 stops the study | registered before the CMMD run |
| Batch / site | the acquisition-batch or sub-collection identifier alone | stop | about 0.50 expected; 0.60 stops the study | added after the CMMD texture control failed |
| Single covariate | one demographic variable alone, for example age | context only, never a stop | none | registered before the CMMD run |
| Identifier order | the numeric (serial) part of the patient identifier alone | stop | about 0.50 expected; 0.60 stops the study | added post hoc, after the registered controls had passed CMMD D1 |
| ~ | KAU-BCMD [ 25 ] , labelled PNG folder (local copy) | CMMD [ 26 , 27 ] | M-SYNTH [ 32 ] |
|---|---|---|---|
| Label | BI-RADS category, encoded as directory membership; no pathology ground truth in the copy | benign/malignant by biopsy, in a separate metadata file | lesion present/absent by construction |
| n | 1,991 PNG images 501 cases 1,000 case-side units | 1,775 patients 1,872 breasts 5,202 images | 1,200 cases |
| Class balance | 60 BI-RADS 4–5 breasts against 938 BI-RADS 1 | 1,316 malignant / 556 benign breasts (70.3% malignant) | balanced by construction |
| Format | 8-bit PNG, non-uniform image sizes | MONOCHROME2, 2294 1914 (4.39 MP); 5,200 images at 8 bits and 2 at 16 | simulated, 256 256 patches |
| Licence | CC BY 4.0 | CC BY 4.0 | CC0 |
| Scoring | one patient-grouped five-fold cross-validation ( StratifiedGroupKFold ) | once on a frozen test split | once on a frozen test split |
| ~ | KAU-BCMD [ 25 ] , public Kaggle archive | CBIS-DDSM [ 29 ] | INbreast [ 30 ] | VinDr-Mammo [ 31 ] |
|---|---|---|---|---|
| Source | Kaggle-hosted archive king-abdulaziz-university-mammogram-dataset.zip (606,558,154 bytes, members dated 2022-03-01) | The Cancer Imaging Archive [ 28 ] , official download client | original distribution, “INbreast Release 1.0” | PhysioNet; download incomplete |
| Label | BI-RADS folder; 1 against 4/5 | pathology from the official case-description files; malignant against benign (including benign without callback) | BI-RADS 1/2 against 4/5 (assessment, not pathology) | breast-level BI-RADS 1/2 against 4/5 (assessment, not pathology) |
| n analysed | 1,991 JPEG images 501 patients (BI-RADS 1/4/5) | 2,853 full-field images 1,460 patients | 379 images 103 patients | 11,404 images 2,993 studies |
| Format | 8-bit JPEG | 16-bit DICOM (digitised film) | 16-bit DICOM | 12- and 16-bit DICOM |
| Licence | CC BY 4.0 | CC BY 3.0 plus the archive’s data-usage policy | access agreement with the providers; the agreement is not on file with the authors | PhysioNet Restricted Health Data License 1.5.0 (credentialed access) |
| Coverage | complete (2,378 of 2,378 images in the archive) | 37 of 284 official calcification-test breast-views present; all other official sets at least 99.7% | complete (410 of 410 images) | 11,965 of 20,000 images (59.8%) |
| Dataset and configuration | Control | AUC | Scoring | Verdict |
|---|---|---|---|---|
| KAU-BCMD, local copy, as held | geometry | 1.0000 | single run (one patient-grouped five-fold cross-validation) | fail |
| KAU-BCMD, local copy, resized to 224 224 | texture | 0.8625 | single run (as above) | fail |
| KAU-BCMD, local copy, short axis equalised to 467 px, then 224 224 | texture | 0.9297 | single run (as above) | fail |
| KAU-BCMD, local copy, subset below 0.5 MP | geometry + texture | 1.0000 | single run (as above) | fail |
| KAU-BCMD, public Kaggle archive, as distributed | geometry | 0.9790 (SD 0.0082; 0.9712–0.9995) | 20-split mean | fail |
| KAU-BCMD, public Kaggle archive, resized to 224 224 | texture | 0.8465 (SD 0.0110; 0.8233–0.8641) | 20-split mean | fail |
| Class | Images | Distinct image sizes | Dimensions (count) |
|---|---|---|---|
| BI-RADS 1 (negative) | 1,865 | 3 | 2816 3584 (1,552) 1284 577 (237) 824 578 (76) |
| BI-RADS 4 (positive) | 102 | 2 | 467 578 (98) 482 578 (4) |
| BI-RADS 5 (positive) | 24 | 24 | every one of the 24 images has a unique size |
| Shared between classes | ~ | 0 | no positive image has the same dimensions as any negative image |
| Setting | Images | Mean AUC | SD | Range over 20 splits | Verdict |
|---|---|---|---|---|---|
| All patients | 1,991 | 0.9790 | 0.0082 | 0.9712–0.9995 | fail |
| Excluding the 21 patients with images in both classes | 1,903 | 0.9397 | 0.0320 | 0.8791–0.9980 | fail |
| Grouped by case number only (64 case numbers recur under two year prefixes) | 1,991 | 0.9801 | 0.0051 | 0.9713–0.9882 | fail |
| Sub-collection | Benign | Malignant | Total | Malignant fraction | Molecular subtype recorded (fraction) |
|---|---|---|---|---|---|
| D1 | 544 | 563 | 1,107 | 0.508582 | 0.000000 |
| D2 | 12 | 753 | 765 | 0.984314 | 0.979085 |
| Evaluation | Breasts | AUC |
|---|---|---|
| Frozen D1 validation split | 171 | 0.9700 |
| Frozen D1 test split | 331 | 0.9926 |
| 20 repeated patient-grouped five-fold splits | 1,107 | mean 0.9871 (SD 0.0009; range 0.9852–0.9892) |
| Cohort | Images / patients | Mean AUC over 20 splits (range) | Verdict on the mean | Official split only |
|---|---|---|---|---|
| Calcification | 1,261 / 635 | 0.6876 (0.6669–0.7040) | fail | 0.5625 (37 test images); below the stop |
| Mass | 1,592 / 892 | 0.6349 (0.6243–0.6438) | fail | 0.5884; below the stop |
| Pooled | 2,853 / 1,460 | 0.6543 (0.6419–0.6643) | fail | 0.6182 (31 overlapping patients removed); above the stop |