Skip to content
AI.info

Evaluation

Dataset Partitions and Test-Set Governance

Design training, validation, and test boundaries that prevent leakage, reduce selection bias, and preserve a credible final assessment.

By the end you can

A reused holdout reported 63% accuracy on data with no signal in it

The dataset was designed to contain nothing. Ten thousand samples, ten thousand attributes — n = 10,000, d = 10,000 — with every attribute drawn independently of a uniformly random label. Then the ordinary loop ran over it. Score the variables, keep the ones that look good on the holdout, score again, keep k = 500.

What came out was published in 2015 by Dwork, Feldman and colleagues, in a section headed “No correlation between labels and data”: “In this scenario no classifier can achieve true accuracy better than 50%. Nevertheless, reusing a standard holdout results in reported accuracy of over 63% for k = 500 on both the training set and the holdout set (the standard deviation of the error is less than 0.5%).”

Their own Thresholdout mechanism, run on the identical data, held the reported accuracy at the true 50%. The gap between 63% and 50% is not a modelling difference. It is a difference in how often, and how freely, the holdout was allowed to answer.

No gradient touched those labels. The selection process adapted to their noise, and the noise was all there was. So test governance is about people and decisions as much as code. Look at a test set often enough — redesign the metric, review the errors, negotiate a release — and it quietly becomes validation data.

Information leaks through organizational feedback, not only feature columns.

Case

Rebuilding CIFAR-10, ImageNet and GSM8k from the original recipe

Two of the most-used image benchmarks were rebuilt from their own recipes, to find out what the old scores were worth. Recht, Roelofs and colleagues “build new test sets for the CIFAR-10 and ImageNet datasets” by following the original collection processes, then scored a broad range of existing models on them. They “find accuracy drops of 3% - 15% on CIFAR-10 and 11% - 14% on ImageNet”. Their reading of those drops points away from the obvious culprit: the losses “are not caused by adaptivity, but by the models’ inability to generalize to slightly “harder” images”.

The same experiment has now been run on language models. Grade School Math 1000 — GSM1k — was commissioned in 2024: 1,205 human-written problems built to mirror the style and complexity of GSM8k. Zhang and colleagues then re-scored the leading systems on it. The abstract reports the correction: “When evaluating leading open- and closed-source LLMs on GSM1k, we observe accuracy drops of up to 8%, with several families of models showing evidence of systematic overfitting across almost all model sizes.”

One further number explains the rest. The Spearman r² between a model’s probability of generating a GSM8k example and the size of its GSM8k-to-GSM1k gap is 0.36. The models that had most nearly memorised the old test set lost the most on the new one.

Two different fields, two rebuilt test sets, two corrections in the same direction. The remedy in both cases was not a better estimator. It was new data that nobody had yet consulted.

Visual

How test information crosses the boundary

Leakage can occur before, during, or after model fitting. The second path on this list has a documented instance, with dates attached.

On 2 June 2015 the ILSVRC organisers published what the ImageNet test server had recorded. Between 28 November 2014 and 13 May 2015, at least 30 accounts belonging to a Baidu team had submitted at least 200 times. The limit was two submissions per week. The organisers asked the team to refrain from submitting to the evaluation server or the challenge for the next 12 months.

The announcement spells out what the extra submissions buy: “To make this clear, by exploiting the ability to test many slightly different solutions on the test server it is possible to 1) select the best out of a set of very similar solutions based on test performance and achieve a small but potentially significant advantage and 2) choose methods for further research and development based directly on the test data instead of using only the training and validation data for such choices.” Ren Wu replied on behalf of Baidu’s Heterogeneous Computing Team.

MIT Technology Review covered the episode two days later, under the headline “Why and How Baidu Cheated an Artificial Intelligence Test”. Tom Simonite named the margin at stake: a claimed error rate of 4.58% against Google’s 4.82%.

The advantage the organisers describe is the same one measured on random data in the holdout experiment. Neither requires anybody to look at a label.

FigureProcess · 5 steps
  1. 1. Global preprocessing

    Scaling, imputation, vocabulary, or feature selection is fitted using all rows.

  2. 2. Repeated leaderboard use

    Teams tune architecture and thresholds against public test feedback.

  3. 3. Error-driven redesign

    Detailed test mistakes guide new features or labels.

  4. 4. Metric negotiation

    Acceptance criteria are relaxed after results are known.

  5. 5. Selective reporting

    Only the strongest test slice or checkpoint is disclosed.

Comparison

Three partitions, three jobs — and in medical devices, a written rule

Confusion begins when one partition is asked to serve several decisions at once. Training data fits parameters and any learned preprocessing. Validation data supports model, threshold and configuration choices, and becomes less neutral each time it is used. Test data estimates performance after the choices are frozen.

In one industry that separation is not a matter of taste. In October 2021 the FDA, Health Canada and the UK MHRA jointly issued ten Good Machine Learning Practice guiding principles for medical device development. All three regulators publish identical text.

The fourth of the ten is titled “Training Data Sets Are Independent of Test Sets”. It reads: “Training and test datasets are selected and maintained to be appropriately independent of one another. All potential sources of dependence, including patient, data acquisition, and site factors, are considered and addressed to assure independence.”

Note what the principle names. Not rows and columns — patient, data acquisition, and site. The dependence the three regulators ask developers to hunt for is the kind that survives a random split of the file: the same patient imaged twice, the same scanner, the same hospital. A partition boundary drawn on row indices does not address any of them.

FigureComparison · 3 columns

Training data

Fits parameters and any learned preprocessing.

  • May be resampled or augmented
  • Can inform gradient updates
  • Includes training-only statistics
  • Cannot estimate final performance

Validation data

Supports model, threshold, and configuration choices.

  • Influences selection decisions
  • Can be reused cautiously
  • Needs selection-aware uncertainty
  • Becomes less neutral over time

Test data

Estimates performance after choices are frozen.

  • Used sparingly
  • Protocol fixed in advance
  • Should not drive iteration
  • Represents the claimed population

Example

Three access policies that were actually enforced

Test credibility can be preserved without making evaluation impossible. There are worked mechanisms to copy here, not principles to admire.

The first is a leaderboard that answers less. Blum and Hardt named the failure it fixes: “As participants are allowed to repeatedly evaluate their submissions on the leaderboard, they may begin to overfit to the holdout data that supports the leaderboard.” Their 2015 paper calls the mechanism the Ladder.

The evidence came from Kaggle’s Photo Quality Prediction competition. A holdout of 12,000 samples: 8,400 behind the private leaderboard, 3,600 behind the public one. 200 teams produced 1,830 submissions, of which the authors parsed 1,785 successfully.

A “boosting attack” of k random submissions drives the standard mechanism’s leaderboard error to Ω(sqrt(k/n)). The Ladder rounds the score and releases a new number only when a submission improves significantly on the best so far. That buys leaderboard error O((log(kn)/n)^(1/3)) — an exponential improvement in k. A third bound in the paper, Ω(sqrt(log k / n)), is a different quantity: the minimax lower bound on what any estimator can achieve.

The strongest policy is to hold the test set where it cannot be consulted at all, because it does not exist yet. DeepMind’s account of CASP14 describes the arrangement: “Crucially, CASP chooses protein structures that have only very recently been experimentally determined (some were still awaiting determination at the time of the assessment) to be targets for teams to test their structure prediction methods against; they are not published in advance.”

The result under that protocol was not close. The Protein Structure Prediction Center’s own CASP14 group ranking, by summed z-score, places AlphaFold2 — group 427 — at 244.02 across 92 domains. The next-best group, BAKER, scored 90.82. DeepMind reported a median of 92.4 GDT across all targets and 87.0 GDT on free-modelling targets. A score like that cannot have been obtained by tuning against the answers.

  • Frozen protocol: define metrics, slices, confidence intervals and pass criteria before final evaluation. CASP fixes its targets before the structures are even determined, which is the limiting case of declaring the protocol in advance.
  • Limited access: restrict raw labels and detailed error examples to an evaluation owner or an automated service. The Ladder returns a rounded score, and a new number only on a significant improvement, and buys O((log(kn)/n)^(1/3)) leaderboard error for it.
  • Logged queries: record every test submission, model identity, purpose and returned information. The ILSVRC organisers could name at least 30 accounts and at least 200 submissions between 28 November 2014 and 13 May 2015 because the server had counted them.
  • Release cadence: permit full evaluation only at agreed milestones, not after every experiment. ImageNet’s published limit was two submissions per week, and the penalty for exceeding it was exclusion for 12 months.
  • Refresh trigger: collect a new test set when the old one has guided substantial redesign or no longer represents deployment. That is what the CIFAR-10 and ImageNet rebuilds did, and what commissioning GSM1k did for grade-school arithmetic.

Key idea

Internal and external validation answer different questions

An internal test set can estimate performance under the process the team already uses to collect its data. It says much less about another hospital, region, device generation or policy environment. That gap has been measured.

Pneumonia-screening convolutional neural networks were trained on 158,323 chest radiographs from three hospital systems, and the study appeared in PLOS Medicine on 6 November 2018. The best internal AUC was 0.931 (95% CI 0.927–0.936). On external data from Indiana it fell to 0.815 (95% CI 0.745–0.885), P = 0.001. Zech and colleagues summarise the pattern as “In 3 / 5 natural comparisons, performance on chest x-rays from outside hospitals was significantly lower than on held-out x-rays from the original hospital systems”.

The mechanism is visible in the same paper. The networks identified the hospital of origin for 99.95% of NIH and 99.98% of Mount Sinai radiographs. The site is legible in the image. Pneumonia prevalence also differed sharply between sites — 34.2% at Mount Sinai against 1.2% at NIH — so sorting cases by hospital system alone achieved an AUC of 0.861. A model that can name the site, and knows the site’s base rate, can score well without reading the lungs.

The authors close their abstract with the consequence: “Estimates of CNN performance based on test data from hospital systems used for model training may overstate their likely real-world performance.”

External validation is still not automatically superior. It can introduce label and protocol mismatches. Its value comes from testing a genuinely different source of variation, with a clearly mapped data contract.

A new dataset matters when it tests a new uncertainty, not merely because it has a different filename.

Analogy

A sealed examination that becomes a study guide

After every practice attempt, the answers to the final exam are released. Students may never copy one directly into their notes. The repeated feedback still teaches them the exact quirks of the paper.

Nothing was copied, and the exam has stopped being independent. That is the whole of the leak. A test set spends down its value every time it is consulted. It is also why a reused holdout could report 63% on random attributes: every consultation returned a little information, and 500 consultations returned enough.

A hidden answer key is not neutral once it shapes preparation.

Steps

Establish test governance before experimentation

A lightweight written policy beats an informal promise. Each step below has a published instance behind it, not just a rationale.

Assign roles. Separate model development from final evaluation where feasible. CASP is the extreme form: the assessment is run by the Protein Structure Prediction Center, not by the entrants, and the ranking table is theirs.

Freeze the protocol. Version population rules, labels, metrics, slices and thresholds, and settle the independence question first. Guiding Principle 4 asks for exactly that. It also names the sources of dependence to be considered and addressed — patient, data acquisition, and site factors — rather than leaving them to the developer’s imagination.

Limit feedback. Return only the information the predeclared decision needs. Blum and Hardt showed that the amount returned is itself the tunable parameter: rounding the score and withholding non-significant improvements moves the guarantee from Ω(sqrt(k/n)) under attack to O((log(kn)/n)^(1/3)).

Track adaptations. Log which design changes were influenced by test results, and how many times the test set was queried. The ILSVRC organisers could state the count — at least 200 submissions from at least 30 accounts — because the evaluation server kept the record.

Retire compromised evidence. Refresh or externally validate when reuse has materially shaped the system. GSM1k cost 1,205 newly written problems. It bought a correction of up to 8% on models everyone had been ranking by the old benchmark.

FigureProcess · 5 steps
  1. 1. Assign roles

    Separate model development from final evaluation responsibilities where feasible.

  2. 2. Freeze the protocol

    Version population rules, labels, metrics, slices, and thresholds.

  3. 3. Limit feedback

    Return only the information needed for the predeclared decision.

  4. 4. Track adaptations

    Log which design changes were influenced by test results.

  5. 5. Retire compromised evidence

    Refresh or externally validate when reuse has materially shaped the system.

The test set is a governed resource

Test data is not a permanent oracle. Its evidentiary value declines as teams adapt to its cases, metrics and quirks. The decline has been measured: a true 50% reported as over 63% on data with no signal in it, 0.931 falling to 0.815 when the hospital changes, up to 8% when the arithmetic problems are new ones.

The goal is not secrecy for its own sake. It is an honest estimate of performance after the important choices have already been made. Where the stakes justify it, that means a written rule, agreed before the first experiment runs.

Protecting the test set protects the credibility of the final decision.

Case

Two hundred and ninety-four papers with documented leakage

Leakage is not a rare accident in published research, and somebody counted. A 2023 paper in Patterns on leakage and the reproducibility crisis in machine-learning-based science reports: “we find 17 fields where leakage has been found, collectively affecting 294 papers and, in some cases, leading to wildly overoptimistic conclusions”. Kapoor and Narayanan also “introduce a detailed taxonomy of eight types of leakage, ranging from textbook errors to open research problems”.

The span of that taxonomy is the point. Some of the eight are mistakes a reviewer can catch in an afternoon — preprocessing fitted on all the rows. Others are unsolved. An earlier preprint of the same work gave 329 papers rather than 294; the published figure is the one above.

Key takeaways