ShortcutCheck: is it reading the lungs, or the border?
A ResNet18 trained on paediatric chest X-rays (PneumoniaMNIST) reaches ROC-AUC 0.991. Grey out the outer border, where electrode stickers, wires and labels sit, and its specificity falls from about 0.93 to 0.11–0.36 in all five seeds. Try the test on one image at a time.
Input
Shortcut test
Model output
The score is not a calibrated probability. The flag threshold () was chosen on validation data to keep sensitivity at 95% or more, so expect false alarms. "Grey" is 0 after normalisation, the ImageNet mean colour, exactly as in the project's masking experiment.
What the model sees
Grad-CAM is coarse (a 7 × 7 grid upsampled) and is a hint, not proof. On a few confident cases it lights up electrode stickers, but averaged over the test set the heat mostly sits on the central lungs, and greying the centre also hurts some seeds. So the shortcut is a suspicion; what is established is that the model is fragile to what happens around the lungs.
Trained on children aged 1–5 from one hospital; never tested elsewhere. It will give an answer for any picture, including ones that are not X-rays. Example file names say what the model gets right and wrong on them.