Data Leakage Laboratory

Six common pipeline shortcuts, one honest baseline, and the optimism each shortcut buys you.

  • leakage
  • partitioning
  • study design
  • pipeline
Honest AUC (strict)
0.889
Selection leakage AUC
0.886
Optimism
-0.003

Optimism by leak type

0123456700.050.10.150.20.250.30.35Leak (see table below)AUC above honest benchmark

ROC: strict protocol vs. the selected leak

00.10.20.30.40.50.60.70.80.9100.20.40.60.811 − specificitySensitivity
Strict protocolSelection leakage

Leak catalogue

LeakReported AUCOptimismMechanism
Strict protocol (no leakage)0.8890.000Every data-dependent step is refit inside the training split; subjects appear in one split only.
Subject-level leakage0.775-0.114Multiple slices from one patient are split across train and test, so the model can memorize the patient.
Preprocessing leakage0.8890.000Scaling and imputation statistics are computed on the pooled train + test data.
Selection leakage0.886-0.003Feature ranking uses all labels before the split is made.
Temporal leakage0.9770.088A post-outcome variable is included among the pre-operative predictors.
Duplicate leakage0.775-0.114Near-identical repeat scans are treated as independent observations.
Target leakage1.0000.111A predictor is a deterministic proxy for the label by construction.
Detection is a design question
None of these leaks announce themselves in the model output — every one of them produces a well-behaved ROC curve. They are visible only in the protocol, which is why the methods section, not the results section, is where a reader should look for them.