Robustness & Interpretability

spurious correlation

/ SPYUR-ee-us kor-uh-LAY-shun /

A spurious correlation is a pattern that holds in your data but isn't the real, causal reason behind the outcome — a coincidence the model mistakes for a rule. Ice cream sales and drownings rise together, but ice cream doesn't drown anyone; both are caused by hot summer days. A model that learns the data without understanding the world will happily seize on these accidental links, because to a pattern-finder, a reliable correlation is just as useful as a true cause — right up until the correlation breaks.

Machine learning models are spectacularly good at finding these, often better than at finding the real signal, because spurious cues are frequently easier to detect. A camera angle, a watermark, a background texture, the brand of medical scanner, the time of day a photo was taken — any of these can correlate with the label in your training set without being the thing you actually care about. The model learns the shortcut, scores beautifully on test data that shares the same coincidence, and then fails the moment it meets data where the coincidence doesn't hold.

This matters because spurious correlations are the hidden cause behind a huge fraction of models that work in the lab and fail in the world. They are especially insidious in fairness: a model can latch onto a feature that correlates with race or gender and reproduce discrimination while never explicitly using the protected attribute. Guarding against them requires curiosity and effort — diverse data, interpretability tools to see what the model leans on, and testing on data deliberately broken away from the training coincidences.

A model trained to detect skin cancer from photos performed brilliantly — until someone noticed that in the training images, doctors had placed a ruler beside malignant lesions to measure them. The model had learned "ruler present = cancer." On real photos without rulers, its skill evaporated. The correlation was perfect in training and meaningless in reality.

The 'ruler' problem: a model that learned doctors' habits, not dermatology.

The core trap: high test accuracy can hide a spurious correlation rather than disprove it, because the test set usually shares the same coincidence as the training set. The only reliable check is to test on data where the spurious cue is deliberately absent or reversed — if accuracy collapses, the model was leaning on the shortcut all along.

Also called
spurious featureconfounder虚假相关伪相关虛假相關偽相關