Rank-Ablation Sensitivity: Detecting Benchmark Contamination That Reinforcement Learning Hides

When a language model has seen a benchmark's test questions during training, its high score may reflect recall rather than reasoning. The usual way to catch this is to check whether the model is suspiciously confident on test items, using signals such as low loss or high token probabilities. That check stops working for modern reasoning models. A short phase of reinforcement learning on clean data shrinks the confidence gap between seen and unseen questions until most detectors do no better than chance. We propose a test that looks inside the model instead of at its output probabilities. For each test question, we delete the few strongest directions in the model's internal activations and measure how much the answer changes. We compare that change with the effect of deleting random directions of the same size. If the model is recalling a leaked item, its computation should run through a narrow channel, and cutting that channel should disrupt it far more than it disrupts genuine reasoning.

The idea comes from low-rank regularization: the observation that useful signal sits in a few dominant directions of a matrix while noise spreads across many weak ones. Here we turn that observation into a measuring instrument. Recent mechanistic work found that contaminated reasoning compresses activations into a handful of "memorization directions." Our bet is that this internal compression survives the RL phase that hides contamination from probability-based detectors. RL with clipped policy updates changes how confident the model's outputs look. It plausibly does not rebuild the internal route the model uses to retrieve a memorized answer. Whether that bet holds is the question this project settles.

Core Claim

We claim that a per-question rank-ablation sensitivity score separates contaminated from clean benchmark items in large reasoning models. We expect it to stay well above chance in the settings where On The Fragility of Benchmark Contamination Detection in Reasoning Models shows ten existing detectors collapsing: after a clean GRPO epoch, and when the model was contaminated with chain-of-thought traces.

Concretely, let $h_\ell(x)$ be the activations at layer $\ell$ over the prompt tokens of question $x$. Let $\Pi_k(x)$ be the projection that removes the top-$k$ principal directions of those activations. Let $\Pi_k^{\text{rand}}$ remove $k$ random directions drawn from the same activation span. The score is

$$ S_k(x) = \mathrm{KL}\big(p(\cdot \mid x)\,\|\,p_{\Pi_k(x)}(\cdot \mid x)\big) - \mathbb{E}_{\text{rand}}\,\mathrm{KL}\big(p(\cdot \mid x)\,\|\,p_{\Pi_k^{\text{rand}}}(\cdot \mid x)\big). $$

Here $p(\cdot \mid x)$ is the model's distribution over the first $m$ answer tokens, and $p_{\Pi}$ is the same distribution with the projection applied at layer $\ell$. Subtracting the random-direction term removes the generic fragility that comes from editing any activations at all. What remains is how much the item depends specifically on its dominant subspace.

Prior Work and What It Leaves Open

The proposal builds most directly on A Narrowing Geometry in Contaminated Reasoning. That paper uses an Eigenspectrum Concentration Index (ECI) to show that contaminated Qwen2.5 and Llama3.1 models route GSM8K and MSCalc computation through a few dominant directions. It establishes causality by reshaping the activation spectrum. It then proposes Top-Subspace Suppression (TSS), which projects those directions out of mlp.up_proj and restores reasoning on roughly half of the leaked samples, at a cost of less than 6% on clean data.

That paper supplies both our mechanism and our intervention, but it uses them for mitigation, not detection. It also never tests models that went through RL after contamination. We reuse its projection as a probe. The asymmetry it reports, where suppression changes contaminated items a lot and clean items little, is exactly the separation a detector needs.

The motivating negative result is the Fragility paper. It shows LiRA reaching 89.1% AUROC on SFT contamination, dropping by about 14% after one GRPO epoch, and reference-free detectors falling to about 50%. After chain-of-thought contamination of reasoning models, it finds all ten detectors averaging 50–58%. Its explanation is that PPO-style clipping shrinks the gap in output log-probabilities. That explanation says nothing about internal geometry, which leaves the opening we target.

Reasoning or Memorization? provides a natural field test. Qwen2.5 reconstructs 65.8% exact match on MATH-500 from an 80% prefix, yet its scores fall on LiveMathBench and RandomCalculation, so this model has a known contamination pattern we can check our score against.

Two spectral diagnostics are close in spirit but answer different questions:

Our score differs from both in two ways: it is per item, and it is interventional rather than passive. Finally, the evidence that low-rank bottlenecks reduce memorization (Mitigating Unintended Memorization with LoRA in Federated Learning for LLMs, up to 10x less canary memorization) suggests that recall lives in a compact subspace. That supports the premise without testing it on benchmark reasoning.

Research Program

We first reproduce the contamination settings of the Fragility paper.

  • Stage I: SFT a base model on a random half of AIME, AMC, GPQA Diamond, OlympiadBench, Minerva Math and MATH-500, leaving the other half clean. Then run one epoch of GRPO on disjoint clean data.
  • Stage II: Contaminate DeepSeek-R1-Distill-Llama-8B with chain-of-thought traces. This is the setting where the Fragility paper reports an 11.7% score inflation.

Because we control which half of each benchmark was leaked, we have exact labels.

We then compute $S_k$ across all layers and both module families:

  • feed-forward up-projections, as in TSS;
  • the attention query, key and value projections, which Xie et al. leave unexamined.

We also compare two kinds of subspace. A sample-specific subspace comes from the item's own activations. A global subspace, as TSS computes it, comes from a small reference set. Layer, module and $k$ are chosen once, on a calibration split of about 20 labeled items per benchmark, mirroring the small calibration budget of the Spectral Kill Switches work. Those choices are then frozen for every test benchmark and model.

Two analyses explain the results. First, we measure the passive ECI of each item before and after GRPO. This tells us whether RL leaves the narrowing geometry intact or flattens it. Second, we run a robustness test that matters for honest evaluation: we contaminate a model while adding a spectral-entropy penalty during SFT, deliberately spreading out the memorized geometry. We then report whether the detector can be evaded, and how much benchmark inflation the attacker loses by doing so.

Baselines

Naive reference points. Chance (50% AUROC) is the do-nothing reference. Raw activation norm at the chosen layer serves as a trivial internal statistic.

Strongest existing methods. The strongest existing method is LiRA, the reference-model likelihood-ratio test. On Stage I SFT contamination, the Fragility paper reports 89.1% AUROC, dropping by about 14% after one GRPO epoch. For Stage II, the same paper reports that almost all of the 10 detectors, LiRA included, average 50–58% AUROC; the file gives no LiRA-specific figure for that setting. We run LiRA, Loss and Min-K% with the same reference model, the same calibration items and the same contaminated checkpoints as our score. Prefix-completion exact match, the probe used by Reasoning or Memorization?, is a separate baseline because it needs no reference model.

Ablations that isolate the key ingredient. Two ablations test what drives our score:

  • Passive ECI as a detector. No reported result was found on Lacuna for ECI used as a contamination detector. This tells us whether the intervention adds anything beyond measuring the spectrum.
  • $S_k$ without the random-direction correction. This tells us whether we are detecting subspace dependence or just general fragility.

We also include the attention high-frequency-energy ratio from Spectral Kill Switches as an alternative spectral signal.

Supervised upper bound. A linear probe trained on hidden states with many labeled contaminated and clean items marks what full supervision can achieve.

Fairness and success criterion. Every method gets the same calibration items and is tuned over the same number of hyperparameter configurations. We report forward passes per item, because $S_k$ needs one extra pass per projection plus a few random draws. We count it as a win if $S_k$ beats the post-GRPO LiRA AUROC on Stage I by a margin larger than the seed-to-seed spread, and clearly exceeds the 50–58% range on Stage II.

Why not just…?

Why not just use a reference-model detector like LiRA? It is the strongest existing tool, and it is exactly what the Fragility paper shows degrading after GRPO and failing after chain-of-thought contamination. That paper attributes the failure to clipped updates closing the log-probability gap, so any detector that reads output likelihoods inherits the problem. We still run LiRA on identical checkpoints. If it matches $S_k$ after RL, our claim fails.

Why not just check prefix completion? Reasoning or Memorization? shows prefix completion exposes Qwen2.5 on MATH-500, and RL may not erase verbatim recall. This is a real threat. However, verbatim-style detectors are among the ten that collapse in Stage II. Prefix completion also cannot see contamination by reasoning traces, where the model has learned a solution pattern rather than a string. Stage II will show which side is right.

Why not just train a linear probe on hidden states? A supervised probe may well beat us when thousands of labeled contaminated items exist. In practice no such labels exist for the deployed model being audited, and a probe trained on one benchmark may not transfer to another. We report the probe as an upper bound and test cross-benchmark transfer for both methods. If the probe transfers as well with 20 labels, the intervention is unnecessary and we will say so.

Why not just generate fresh problems with DyVal or RandomCalculation? DyVal shows procedural generation works for formal arithmetic and logic. It does not reach expert benchmarks like GPQA. The Emperor's New Clothes in Benchmarking? shows that rewriting questions either leaves contamination intact or lowers fidelity to 0.686 on MMLU. A detector lets an evaluator keep the original benchmark and flag the items that cannot be trusted.

Decisive Checks

The project turns on three outcomes.

  1. Survival under RL. If passive ECI separates contaminated items before GRPO but not after, the RL cloaking reaches internal geometry too, and the core hypothesis is refuted. That would be a clean negative result worth publishing.
  2. Agreement with known contamination. On Qwen2.5, $S_k$ should be higher on MATH-500 items than on RandomCalculation and LiveMathBench items. It should also track prefix-completion success at the item level, and that agreement should hold even in the RL-trained variants, where prefix completion itself weakens.
  3. Generality. The separation should hold beyond GSM8K, on GPQA Diamond and OlympiadBench. This answers whether the narrowing geometry is a property of contaminated reasoning in general or an artifact of grade-school arithmetic.

We also report which module family carries the signal, feed-forward or attention. This bears directly on the disagreement between LoKU's finding (Towards Robust and Parameter-Efficient Knowledge Unlearning for LLMs) that feed-forward layers store memorized content and the attention-side signals reported by Spectral Kill Switches.