Clean First: Spending Decontamination Effort Where Training Locks It In

Large language models are trained on web crawls that quietly contain the test questions later used to grade them. Checking trillions of tokens for paraphrased benchmark items is expensive, so labs fall back on cheap exact-string filters that are known to miss much of the leak. This proposal tests a simple bet. If the earliest stretch of training decides which region of weight space a network ends up in, then leaked test items seen early should do far more damage than the same items seen later. In that case, the expensive, paraphrase-aware decontamination only needs to cover that early stretch, not the whole corpus.

Two old findings point to this bet, and nobody has put them together. Work on unsupervised pre-training showed that a network's first weight updates on unlabeled data set a lasting "basin of attraction," a region of weight space that later supervised training does not leave, even with ten million fresh examples (Why Does Unsupervised Pre-training Help Deep Learning?). Separately, controlled BERT experiments found that contamination introduced in the first steps of pre-training is exploited downstream much more than contamination introduced late, the "early bird" effect (Data Contamination: From Memorization to Exploitation). We propose to measure, in modern decoder language models, how much a leak hurts depending on when in training it appears. We will then locate where in the network early leaks live, and turn the answer into a decontamination schedule that is cheaper than cleaning the whole corpus.

Core Claim

Our claim is that a clean early phase of training acts like the unsupervised initialization studied by Erhan et al. It fixes the basin before any leaked answer is seen, and that substantially reduces downstream exploitation of leaks that arrive later. Exploitation here means the accuracy gap between leaked and held-out test items. The practical consequence would be that, at a fixed decontamination budget, cleaning the first X% of tokens with an expensive semantic detector removes more exploitation than spending the same budget on a random X% of the corpus.

We further predict that early leaks produce exploitation without much output-level memorization, echoing the BERT finding that memorization and exploitation come apart (Data Contamination: From Memorization to Exploitation). If that holds, early leaks are both the most harmful and the hardest to detect afterward with likelihood-based tests.

The claim can fail. Decoder models trained with learning-rate warmup and decay may instead be most sensitive to data seen late, when the network's final behavior settles. The study is designed to tell these cases apart, and the scheduling method follows whichever timing profile the data shows.

Research Program

The first component is a contamination-timing map. Following the from-scratch GPT-2 protocol of Investigating Data Contamination for Pre-training Language Models, we train GPT-2 small (124M parameters) and large (774M parameters) on a fixed slice of clean web text drawn from FineWeb. We inject half of each benchmark's test set in the format that paper found most damaging: question, prompt, and answer together. The leaked items appear at matched repetition counts but in different training windows: the first 5% of tokens, the middle, the final 5% during learning-rate decay, or spread uniformly. The other half of each test set stays unseen, which gives the held-out comparison. Fixing the total number of leaked tokens isolates timing from dose. We repeat the sweep at roughly 10 repetitions, where that paper found the inflation peaks, and at higher counts, to see whether timing interacts with its U-shaped repetition curve.

The second component localizes the damage, borrowing the logic of Erhan et al.'s filter-stability analysis. For runs that differ only in when the leak occurred, we transplant blocks of layers between a contaminated run and its clean twin. The two runs share a seed and data order, so their layers stay roughly compatible. We then measure how much exploitation moves with each block. Erhan et al. found that lower layers barely change once the basin is set. If basin setting is the mechanism, early-leak exploitation should travel with the lower and middle layers, and late-leak exploitation with the top layers. This is a direct test of the bridge between the two literatures. It does not depend on perturbation-geometry detectors such as LaRA, which audits trained weights after the fact rather than asking where training put the leak.

The third component is the intervention, which we call a clean warm start. A paraphrase-aware semantic decontamination pass is applied only to the window the timing map identifies as sensitive. "Paraphrase-aware" means embedding similarity combined with a rephrase check, in the spirit of the implicit-leak setting in Generalization or Memorization. The rest of the corpus gets only cheap exact-string filtering. One variant adds an Erhan-style element: after the clean warm start, the lowest layers are frozen or given a reduced learning rate. This tests whether explicitly preserving the clean basin buys further protection, and what it costs in general quality.

Baselines

The do-nothing reference is the contaminated corpus with no filtering, trained under the same schedule. It sets the exploitation ceiling. The published anchors are from Investigating Data Contamination for Pre-training Language Models. It reports MMLU accuracy of 24.3% for answer-contaminated GPT-2 large at 10 repetitions, against 22.8% clean, and a CNN/Daily Mail overall score of 0.6996 contaminated against 0.5968 for the baseline. We expect to reproduce these magnitudes before testing anything new.

The industry-standard baseline is exact n-gram filtering over the whole corpus, as used for PaLM and LLaMA. The same paper reports it is insufficient to remove the inflation. It is what practitioners actually do, so it has to be beaten.

The strongest fair competitor is budget-matched uniform semantic decontamination. The same detector, with the same compute and the same number of tokens inspected, is applied to a random X% of the corpus instead of the early window. Everything else is held fixed: data, model, optimizer, tokens, three seeds per cell, and the same detector threshold tuned once on a held-out validation set. Our method beats it if it leaves significantly less exploitation at equal budget, with general validation loss and clean-benchmark accuracy no worse than within seed noise.

Full-corpus semantic decontamination serves as the expensive upper bound. The headline number is the fraction of its exploitation reduction recovered at a fraction of its cost.

Memorization Sinks routes repeated documents into dedicated neurons and drops them at inference. Their reported result is closing over 50% of the memorization gap on SmolLM. It needs to know which documents are leaked when training happens. We run it with oracle document identities as a reference point that has strictly more information than our method.

The ablations that isolate the key ingredient are three. A random-window control decontaminates a window of the same length placed late or in the middle; if position does not matter, the warm-start idea fails. A warm-start length sweep covers 1%, 5%, and 20% of tokens. The frozen-lower-layer variant tests whether preserving the basin, not just the clean data, drives the effect.

Why not just…?

Why not just filter everything with n-grams and move on? Jiang et al. ran exactly this ablation in from-scratch GPT-2 training and found that standard n-gram filters left the contamination boost largely intact (Investigating Data Contamination for Pre-training Language Models). Dong et al. likewise found n-gram methods fail on paraphrased leaks, with distribution-based detection improving on them by 21.8% to 30.2% (Generalization or Memorization). Exact-string filtering stays in our pipeline as the cheap layer. The proposal is about where to add the expensive layer.

Why not just run semantic decontamination over the whole corpus? This is the real threat. If paraphrase-aware detection becomes cheap enough to run over trillions of tokens, scheduling matters less. Our comparison against the full-corpus upper bound answers this directly: if a clean warm start recovers most of the full-corpus benefit at a small fraction of the cost, it is worth adopting. If it recovers little, the honest conclusion is that budget should be spent uniformly. In either case, the timing map remains useful for interpreting audits.

Why not just detect contamination afterward with likelihood tests or layer geometry? Output-level detectors drop to roughly 50–58% AUROC on reasoning models after reinforcement-learning post-training (On The Fragility of Benchmark Contamination Detection in Reasoning Models). The strongest layer-geometry method reaches 0.79 ROC-AUC with 31–38% true-positive rate at 5% false-positive rate, and only in combination with Self-Critique (LaRA). Detection also leaves the inflated model in place. We will run Min-K% Prob (Detecting Pretraining Data from Large Language Models) on early-leak and late-leak models. If early leaks turn out to be the least detectable, that is a direct argument for preventing them rather than auditing for them.

Why not just evaluate on live or procedurally generated benchmarks? Contamination-limited suites such as LiveBench protect the scoreboard. They do not change what a deployed model has absorbed, and they do not help the many static benchmarks still in use. The two approaches are complementary, and we do not compete with them.

Decisive Experiments

The study covers SST-2 and SNLI using the fine-tune-then-compare protocol of Data Contamination: From Memorization to Exploitation, which reports exploitation reaching 40% at 200 repetitions. It also covers CNN/Daily Mail summarization and MMLU, following Jiang et al. We acknowledge that MMLU is near chance at GPT-2 scale, so the classification and summarization tasks carry most of the statistical weight. A 1.7B-parameter replication on FineWeb-Edu-style data is a stretch goal for the strongest condition. At that scale MMLU and ARC move meaningfully: The FineWeb Datasets reports 33.6% MMLU at 38B tokens.

The first decisive check is whether exploitation from the early window significantly exceeds exploitation from the late and uniform windows at matched dose in decoder models. If it does not, the warm-start method is retargeted to whichever window dominates, or dropped.

The second is whether layer transplants carry early-leak exploitation in the lower and middle blocks. That would confirm the basin mechanism rather than a mere correlation with timing.

The third is whether the clean warm start beats budget-matched uniform decontamination on exploitation. It must do so without hurting validation loss, and it must recover a large share of the full-corpus upper bound.

If all three hold, the field gets a cheap, concrete rule for building training corpora, grounded in a mechanism first described for unsupervised initialization fifteen years ago.