Measuring Benchmark Contamination as an Orthogonal Subspace

When a language model has seen a benchmark's test questions during training, its score mixes two things: real ability, and recall of those specific items. Current tools separate the two only from the outside. Some compare scores on original and rewritten questions, which confounds memorization with the rewrite simply being harder. Others sample dozens of outputs per question and look for suspicious sameness, which is expensive. This note proposes looking inside the model instead. For each benchmark question we collect the model's hidden activations on the original wording and on several meaning-preserving variants. We then split those activations into three parts: a shared part that all variants agree on, a "style" part that captures ordinary differences in wording, and an "item-private" part that responds only to the original text. We keep the three parts geometrically orthogonal, that is, uncorrelated directions in the activation space. If removing the item-private part drops accuracy, that drop is a direct estimate of how much of the score came from contamination. Producing it takes one extra forward pass per item, with no sampling and no clean reference model.

The opportunity is that the orthogonality machinery developed for domain adaptation fits the problem closely. That machinery gives domain-specific noise its own private subspace so the shared subspace stays clean. Benchmark contamination raises the same structural question in a new setting: which part of the representation is specific to this exact string, and does the answer depend on it? Answering it would also address a tension in the contamination literature that has so far been argued only from outputs. Some evidence says memorization often does not translate into higher scores. Other evidence says contamination visibly collapses output diversity.

Core Claim

The core claim is that benchmark exploitation, unlike mere memorization, has a geometric signature. It is a low-rank, item-private subspace of mid-to-late hidden states that is orthogonal both to the meaning shared with paraphrases and to generic paraphrase style. The model's answer depends causally on that subspace only for contaminated items. Projecting it out should therefore leave clean items unchanged and deflate contaminated items toward their true generalization accuracy. This yields a single-pass corrected score.

We are not proposing orthogonality as a training-time defense. If a lab knew which training documents were leaked, it would filter them, so a training penalty adds little over deduplication. The orthogonality constraint is used here as a measurement and attribution instrument on already-trained models.

Relation to Prior Work

Our method borrows its decomposition from three works. Domain Separation Networks split images into shared and private encodings and enforce a Frobenius-norm "difference loss" between them, plus reconstruction. Its ablations showed that removing either term hurt sharply. Adversarial Multi-task Learning for Text Classification applied the same shared/private split with an orthogonality penalty to text. Explaining Domain Shifts in Language (LanCE) made classifiers orthogonal to text-defined shift directions. We reuse the difference loss and DSN's principle of giving the noise a home. We differ in three ways. Our "domains" are an item and its paraphrases rather than image styles. We fit a lightweight decomposition on a frozen language model instead of training encoders. And the decomposition serves to measure, not to adapt. LanCE also constrains our design. It found that linear orthogonality failed on non-linear 2D-to-3D shifts, so we must test whether contamination is linearly separable at all rather than assume it.

The closest existing work is GSS: Gated Subspace Steering. GSS finds a memorization direction in hidden states using whitening and a generalized SVD, and gates a steering vector on a token-level signal. That signal is the log-likelihood gap between a fine-tuned model and its uncontaminated base model. GSS cut verbatim memorization on Pythia-6.9B from 89.31% to under 7% at about 1.2% inference overhead. It needs a clean base model, which does not exist for a pretrained model suspected of contamination. It also targets verbatim regurgitation rather than inflated benchmark scores. We replace the base-model contrast with an original-versus-variant contrast available for any model, and our output is an accuracy correction rather than a suppressed string. GSS's finding that over 60% of memorization bursts last one token motivates applying the projection at answer positions. Representation Unlearning also transforms representations instead of weights, using an information bottleneck in vision models. It shows such maps are cheap, but it compresses toward centroids and needs labeled forget sets, whereas our private subspace is found without knowing which items leaked.

The motivating evidence comes from the contamination literature. Data Contamination: From Memorization to Exploitation built a controlled BERT testbed. At 600M tokens it found about 15% memorization but under 1% exploitation, with exploitation rising to 40% at 200 duplicates. Our method makes a sharp geometric prediction about this gap. Memorized-but-unexploited items should show a detectable item-private subspace whose removal costs no accuracy. Generalization or Memorization introduced CDD, which detects contamination from output distribution collapse, and TED, which filters memorized samples. TED cut inflation by up to 66.9%, but both need many sampled completions. The contamination survey reports a 39.4% average drop from HumanEval to EvoEval across 51 models. That number mixes leakage with difficulty change, which is exactly the confound our style subspace is meant to absorb.

Research Program

For a model $f$, a layer $\ell$, and a benchmark item $x_i$ with $K$ meaning-preserving variants $\tilde{x}_{i1},\dots,\tilde{x}_{iK}$, we read hidden states at the answer-bearing positions. Variants are produced by paraphrase for natural-language items. For arithmetic and logic items we use DyVal-style regeneration of the same underlying graph, following DyVal. We learn three low-rank projections: a shared projection $P_s$, a style projection $P_v$, and an item-private projection $P_p$.

The style projection is fit first, on fresh items guaranteed unseen, together with their variants. Examples include newly written questions and post-cutoff items in the spirit of LiveBench. On these items, any original-versus-variant difference must be wording rather than memory. The other two projections are then fit on the target benchmark. With $H_s, H_v, H_p$ the batch matrices of projected activations, the objective is

$$\mathcal{L} = \sum_{i,k}\|P_s h(x_i) - P_s h(\tilde{x}_{ik})\|^2 + \lambda_r \|h - (P_s + P_v + P_p)h\|^2 + \lambda_o\left(\|H_s^\top H_p\|_F^2 + \|H_v^\top H_p\|_F^2\right).$$

The first term makes the shared part agree across variants. The second, weighted by $\lambda_r$, makes the three parts together reconstruct the activation $h$. The third, weighted by $\lambda_o$, is the DSN difference loss keeping the item-private part orthogonal to both the shared and style parts.

At evaluation we project $P_p$ out of the residual stream at layer $\ell$ in one forward pass. We report the inflation estimate as full accuracy minus projected accuracy, per item and per benchmark.

The rank of $P_p$ and the weights $\lambda_r$ and $\lambda_o$ are tuned only on synthetic contamination of a held-out benchmark, never on the evaluation target. This responds directly to DSN's documented sensitivity to its weights and to the problem of choosing settings using target labels.

The analysis component maps where this subspace lives across layers and across duplication counts. It tests whether the subspace's causal effect on answers, as opposed to its mere detectability, tracks the memorization-to-exploitation transition.

Baselines

The naive reference point is reporting raw benchmark accuracy with no correction. On a clean model, raw accuracy already equals the true value, so any method that changes it there is producing false deflation.

The variant-score baseline reports accuracy on the paraphrased or regenerated variants themselves, as EvoEval and HumanEval_R do. It uses exactly the same variant set as our method. It wins on simplicity, but it conflates difficulty with leakage. We beat it if our estimate stays near zero on clean controls while the variant-score gap does not.

The likelihood-gap baseline scores each item by the model's log-probability on the original minus its mean log-probability on variants. This is the comparison-based perplexity family described in the survey. It is run with the same variants and a single threshold tuned on the same synthetic held-out benchmark. It is the strongest cheap detector, and it is a real threat for detection alone.

The strongest existing method is CDD for detection and TED for corrected scores, from Generalization or Memorization. That paper reports CDD improving 21.8% to 30.2% (relative accuracy and AUC) over n-gram and LLM baselines on DETCON, and TED reducing inflation by up to 66.9% on COMIEVAL. No absolute AUC is reported in the material we have. We therefore rerun both with the authors' sampling settings on our controlled models. We also run them at a reduced sample count matched to our method's token budget. Beating TED means recovering at least as much of the true seen-minus-unseen gap with lower error, at a fraction of the generated tokens.

GSS is a baseline only in the controlled setting, where an uncontaminated base checkpoint exists. There we give it that privileged base model and ask whether our reference-free subspace matches its direction (by cosine overlap) and its effect.

Two ablations isolate the key ingredients. The first drops the style subspace, which tests whether the DSN-style home for paraphrase noise is what prevents false deflation. The second replaces the learned decomposition with a single difference-of-means direction between original and variant activations. If that one-direction version performs as well, we adopt it as the method and report the full decomposition as unnecessary.

Why not just…?

Why not just deduplicate the training data? Deduplication only works when you control the corpus and can match the leak. Generalization or Memorization shows n-gram filters miss rephrased contamination. Data Contamination Can Cross Language Barriers shows that translations slip past monolingual filters. And auditors of released models cannot deduplicate anything. Our method is for the auditor's position, and our controlled experiments include paraphrased and translated injections that a deduplication pass would miss by construction.

Why not just evaluate on fresh or paraphrased items instead? For formal tasks, dynamic generation in the style of DyVal or LiveBench is the right answer, and we use it as our source of variants and clean controls. However, a variant score answers a different question, and it shifts difficulty: DyVal itself reports a 13.6% GPT-4 drop from merely reversing edge order. Our clean-model control settles this. If variant scores drop on a never-contaminated model while our estimate stays near zero, the variant score is measuring difficulty, not leakage.

Why not just use the log-likelihood gap between original and paraphrase? This is the alternative most likely to match us, and we treat it as such. For pure detection it may do as well. Its limitation is that a likelihood gap does not say whether the answer depended on memory, which is the memorization-versus-exploitation distinction from Data Contamination: From Memorization to Exploitation. The decisive test uses items injected at low duplication, which are memorized but not exploited. There the likelihood gap should fire while our accuracy-attribution estimate correctly stays near zero. If the two methods do not diverge on those items, our added value reduces to the corrected score, and we will say so.

Why not just run TED? TED works, but it pays for dozens of completions per item. Our method costs one extra forward pass after a one-time fit. The matched-budget comparison will show whether that saving costs accuracy.

Proposed Experiments

The controlled study follows the design of Data Contamination: From Memorization to Exploitation, moved to decoder-only Pythia models (the family used by GSS). We continue pretraining from Pythia checkpoints with injected test items at duplication counts of 1, 10, 100 and 200, and at early versus late injection times. Injected items are verbatim, paraphrased, or translated, drawn from GSM8K, HumanEval, and a subset of MMLU. Each benchmark is split into seen and unseen halves, and an uninjected twin model serves as the clean control.

Ground-truth exploitation is the seen-minus-unseen accuracy gap. Our primary metric is the absolute error between the estimated inflation and this true gap. Secondary metrics are detection AUC on seen versus unseen items and the accuracy change on unseen items after projection, which should be near zero. Collateral damage is checked on DyVal tasks and fresh items, where accuracy should not move.

Next we apply the fitted method to open models on DETCON and COMIEVAL items and compare against CDD and TED's reported behavior. We also report estimated inflation on HumanEval versus EvoEval-style variants, to separate the 39.4% drop into a leakage component and a difficulty component.

Three checks decide whether the idea holds. First, on the clean twin, projection must change accuracy by no more than seed noise. Second, for low-duplication items that are memorized but not exploited, the item-private subspace must be detectable while its removal leaves accuracy unchanged. This is the geometric resolution of the memorization-versus-exploitation tension. Third, estimated inflation must track true inflation across duplication levels better than the likelihood-gap and variant-score baselines, at a fraction of TED's token cost.

The method fails, and we would report it as failing, under two conditions. One is if a linear item-private subspace cannot be found for paraphrased injections, echoing LanCE's non-linear failures. The other is if a single difference-of-means direction matches the full decomposition everywhere.