TL;DR
Imagine grading a student's final exam, only to suspect they accidentally studied from half the test questions the night before—and you have no idea which half. MILAN is a post-hoc framework that takes a model’s predictions and ground-truth labels on a potentially contaminated benchmark and mathematically recovers the true, uncontaminated evaluation score. Even without access to the model's weights, training data, or raw input features, it strips away the illusion of memorization to reveal how well a model actually generalizes.
What Problem Does This Paper Address?
Train–test leakage (or benchmark contamination) is one of machine learning’s quietest crises. When evaluation data accidentally overlaps with training data, reported metrics inflate, turning generalization tests into memorization contests.
Usually, we try to prevent this by deduplicating datasets, or we audit for it using membership inference attacks (algorithms that guess whether a specific data point was in the training set). However, when evaluating proprietary models, third-party APIs, or privacy-sensitive biomedical cohorts with pseudonymized IDs, you can't inspect the training corpus, retrain shadow models, or even view raw inputs. Furthermore, simply flagging suspicious data points doesn't directly tell you what the aggregate metric (like AUC or RMSE) would have been on clean data. The authors ask: given only a fixed model's prediction–label pairs on a suspect benchmark, can we recover the clean evaluation metric?
Methods
The authors treat a contaminated benchmark as a statistical mixture of two distributions: training-origin examples and clean evaluation examples. If you knew the exact probability that each example came from the clean set, you could compute the true metric via a weighted average—down-weighting likely memorized points and up-weighting clean ones.
To estimate these probabilities without seeing training data, the authors introduce MILAN (Metric Integrity via Leakage-Aware Normalization):
- Set-Level Transformer: Unlike standard classifiers that look at examples one by one, MILAN uses an encoder-only Transformer (without positional encodings) to look at the entire unordered evaluation set at once. Self-attention lets it spot set-wide fingerprints of overfitting, comparing each prediction against the broader empirical error structure.
- Prediction-Space Representation: Each prediction–label pair is converted into sample-level features (e.g., confidence, entropy) and derived set-relative features (e.g., how much a sample's confidence deviates from the average for its class, or its absolute-error rank). Users can also optionally plug in priors on the overall contamination rate or sample-wise difficulty scores.
- Meta-Training & Conformal Bounds: Rather than fitting a new detector per benchmark, MILAN is meta-trained once across hundreds of thousands of synthetic leakage scenarios. Finally, it uses split-conformal calibration across held-out problems to wrap its corrected metric in a reliable uncertainty interval.
Datasets
- Synthetic Meta-Corpus (Newly Introduced): Built to train and test MILAN, comprising 410,000 meta-training problems (230k classification across 1,619 datasets and 29 model families; 180k regression across 1,146 datasets and 33 model families), plus disjoint calibration (4,008) and test (3,430) splits.
- Biomedical Real-World Evaluation: Polygenic risk score (PRS) models from the PGS Catalogue evaluated on 48,000 individuals in the UK Biobank across eight diseases, compared against independent FinnGen reference metrics.
- Out-of-Domain Transfer: IndoNLU SmSA (NLP sentiment classification) and CIFAR-100 (computer vision).
Key Insights and Ideas
- Good detection $\neq$ good metric recovery: Traditional membership inference optimizes for hard binary decisions or rankings. However, a detector with great discrimination can still ruin a downstream metric estimate if its probability scores are poorly calibrated. Soft, well-calibrated posterior weights are essential.
- Context is king: Comparing the Transformer (
MILAN-T) against a standard feed-forward network (MILAN-MLP) given the exact same engineered features shows a massive performance leap for the Transformer. Recognizing whether a low-loss prediction is genuinely memorized—or just comes from an "easy" class—requires seeing how the model behaves across the whole test set simultaneously. - No leakage bias, no problem: If a model hasn't overfit at all, training and test predictions look identical. While it becomes impossible to tell which sample came from where, contamination doesn't bias the metric in that regime anyway! MILAN shines brightest precisely when overfitting is severe enough to warp your conclusions.
Key Results
- Simulated Tabular Benchmarks: Across 3,430 held-out test problems, MILAN-T achieves the lowest calibration error and lowest absolute recovery error ($|\Delta|$), beating clustering (UMIA), supervised attacks (ML-Leaks), mixture models, and anomaly detectors (Figure above). Under heavy overfitting and high contamination, baseline errors skyrocket while MILAN-T stays remarkably flat.
- Distribution Shifts: Under site-based splits, near-duplicate leakage, and class-prior shifts (up to 40%), MILAN-T cuts classification balanced-accuracy error down to
0.033–0.089(compared to0.060–0.131uncorrected). - Conformal Coverage: MILAN’s uncertainty intervals closely match nominal targets—e.g., achieving
95.5%to97.2%empirical coverage at the $95\%$ ($\alpha = 0.05$) confidence level. - Real-World Genomics & Domain Shift: Many public PRS models have undocumented overlap with UK Biobank, causing inflated AUCs. MILAN-T pulls these inflated UK Biobank AUCs squarely back toward independent FinnGen reference benchmarks across eight diseases. Even when tested zero-shot on NLP (IndoNLU) and vision (CIFAR-100) models—domains never seen during tabular meta-training—MILAN-T drops balanced accuracy error from
0.051down to0.009and0.023, respectively.
Limitations and Future Work
MILAN is tailored for supervised tabular classification and regression with calibrated probabilities or scalar outputs. It is not designed for structured prediction, reinforcement learning, or generative foundation models like Large Language Models (LLMs). Additionally, while MILAN tolerates moderate errors if a user supplies an optional contamination-rate guess, wildly inaccurate priors can degrade accuracy, and severe domain shifts can make its conformal intervals overly conservative. For future work, the authors suggest meta-training MILAN on purely synthetic datasets drawn from mathematical priors to gain finer control over complex contamination patterns.
Summary updated