When a language model solves a multi-step problem it has never seen, each intermediate step should carry information about the specific numbers and facts that step depends on. When it has memorized the problem, the intermediate steps can be decoration. The model recognizes the problem as a whole and replays a stored trajectory, so a step's internal state tracks which problem this is rather than what this step's inputs are. We propose to measure this difference directly. We borrow the contrastive mutual-information machinery of Deep Graph Infomax, an unsupervised method that trains a small scorer to tell whether a local piece of a graph belongs with its global summary. We apply it to the hidden states an LLM produces along its own chain of thought, with the problem's dependency graph supplying the "local" structure.
This matters now because the standard contamination detectors have stopped working on reasoning models. These detectors check whether a test item looks unusually familiar from the model's token probabilities. On The Fragility of Benchmark Contamination Detection in Reasoning Models shows that one epoch of reinforcement learning (GRPO) erases the log-probability gap they rely on. It also shows that contaminating a model with chain-of-thought data drives ten detectors to 50–58% AUROC, close to chance. An audit that reads how information flows through the model's representations, rather than how confident its tokens are, might survive that cloaking. Whether it does is the central empirical question of this proposal.
Core Claim
We claim that contamination shows up as a specific imbalance between two quantities. The first is how much a step's hidden state shares with the global identity of the problem. The second is how much it shares with the step's own local parent premises. Memorized items keep the first high and lose the second. Genuinely reasoned items keep both.
The local-global objective is the natural tool here for two reasons. Its corruption function keeps the graph's structure intact and shuffles only the node contents (Deep Graph Infomax). That operation separates "bound to the right inputs" from "bound to the right problem" in a way that surface-level perturbation does not. The discriminator is also trained only on fresh, known-unseen items, so the audit needs no labeled contaminated data and no reference model.
Concretely, let $h_t$ be the model's hidden state at the token that completes reasoning step $t$. Let $z_{\mathrm{pa}(t)}$ be an embedding of the premise values that are parents of step $t$ in the problem's dependency graph, and let $s$ be a readout summary of the whole problem. Two discriminators, $D_{\mathrm{loc}}$ and $D_{\mathrm{glob}}$, are trained on clean reference items with the Jensen-Shannon infomax objective. The local negatives $\tilde z_{\mathrm{pa}(t)}$ come from shuffling premise values across the nodes of the same graph, which preserves the graph's structure in the way the Deep Graph Infomax corruption does. The global negatives $\tilde s$ are summaries of other problems in the batch, as in InfoGraph. The per-item audit score is the binding gap
$$G = \frac{1}{T}\sum_{t=1}^{T}\Big[\hat I_{\mathrm{glob}}(h_t; s) - \hat I_{\mathrm{loc}}(h_t; z_{\mathrm{pa}(t)})\Big],$$
where $T$ is the number of steps and each $\hat I$ is the discriminator's mean log-odds margin of positives over negatives, the usual lower-bound estimate. Large $G$ means steps know the problem but ignore their inputs, and we predict this marks contamination.
Relation to Prior Work
The closest work is A Narrowing Geometry in Contaminated Reasoning. It finds that on leaked GSM8K and MSCalc items, mutual information between a linear module's input activations and its output gradients decays. It also finds that activations collapse into a few dominant directions, which it measures with an eigenspectrum concentration index. This paper motivates our proposal because it gives evidence that contamination leaves an internal trace. It also constrains our proposal, because any new signal must beat it.
Our proposal differs in three ways. Its mutual information is computed inside one projection layer, while ours is computed between reasoning steps and the problem's dependency structure. It requires gradients, while ours needs only forward hidden states. And it measures a global geometric collapse with no notion of which inputs a step should depend on. Our local term is exactly that missing piece.
Deep Graph Infomax and InfoGraph supply the method. They establish contrastive local-global objectives with structure-preserving corruption and batch negatives, but only on citation, social and molecular graphs. They never apply these objectives to a model's reasoning trace or use them as a test statistic.
Domain Adaptive Graph Infomax via Conditional Adversarial Networks shows that infomax representations capture structural roles that transfer across unrelated graphs. That result is the reason we expect a discriminator trained on one family of fresh problems to transfer to the benchmark under audit.
DyVal and DARG build reasoning problems as directed acyclic graphs, but use the graphs only to generate and verify questions. We reuse their graphs as the source of the parent sets $\mathrm{pa}(t)$. DyVal gives exact graphs, and DARG's code-verified extraction gives graphs for GSM8K.
Finally, When Is Benchmark Contamination Detectable? proves that audit power scales with $\alpha\rho\sqrt{m}$. Here $\alpha$ is the fraction of the benchmark that leaked, $\rho$ is how separable seen and unseen items are, and $m$ is the number of items audited. In this framing, our contribution is an attempt to raise $\rho$ when token-level scores have driven it to near zero, and we will report $\rho$ explicitly.
Research Program
The work proceeds in three stages.
Controlled setting. We first build a fully controlled testbed on DyVal arithmetic and linear-equation problems, where every item's dependency graph is known exactly. We contaminate Qwen2.5-1.5B, Qwen2.5-7B and Llama3.1-8B, the models studied by Xie et al., by supervised fine-tuning on a held-out subset of items mixed into ordinary math data. Freshly generated DyVal items at matched depth tiers (D1–D4) serve as clean references and as non-members. For each model we extract hidden states at step-boundary tokens from a fixed middle-to-late layer band and train $D_{\mathrm{loc}}$ and $D_{\mathrm{glob}}$ on reference items only. We then score members and non-members.
Natural benchmarks and post-training. Next, we move to GSM8K and MSCalc. Parent sets come from DARG-style extraction verified by code execution, and items whose extracted graph fails verification are dropped. We then follow the two-stage protocol of the fragility paper. In Stage I, a base model is contaminated during supervised fine-tuning and then trained with one epoch of clean GRPO. In Stage II, DeepSeek-R1-Distill-Llama-8B is contaminated with chain-of-thought benchmark solutions. These conditions are run on GSM8K and MSCalc. For AIME, AMC, OlympiadBench and Minerva Math, explicit premise graphs are unreliable. There we fall back to a weaker variant in which the parents of a step are the earlier chain-of-thought steps it references, and we flag those results as secondary.
Analysis. We will check whether the binding gap is driven by the local term, the global term, or both. We will relate it to the activation-collapse measure from Xie et al. on the same items, to test whether the two signals are redundant. We will also convert each detector's separability into audit sample budgets using the Shihab et al. planner.
Baselines
Do nothing. The naive reference point is a chance detector at 50% AUROC, together with raw benchmark accuracy as the only signal. This is what practitioners effectively use today. The fragility paper reports that contamination silently inflates pass@1 by 8.8% in Stage I and 11.7% in Stage II.
Token-likelihood detectors. The second baseline family is Min-K% probability from Detecting Pretraining Data from Large Language Models, plus LiRA and loss as implemented in the fragility paper. These are the strongest widely used detectors. The strongest reported number in the file is LiRA at 89.1% AUROC on Stage I before reinforcement learning, falling by about 14 points after one GRPO epoch, with all ten detectors at 50–58% AUROC in Stage II (On The Fragility of Benchmark Contamination Detection in Reasoning Models). We will rerun these detectors on exactly our contaminated checkpoints and item splits rather than quoting numbers. LiRA's reference models will be given the same fine-tuning compute as our discriminator training.
Activation-gradient mutual information and eigenspectrum concentration. The strongest internal competitor is the pair of signals from A Narrowing Geometry in Contaminated Reasoning. They target the same phenomenon with internal signals and were validated on the same models and on GSM8K and MSCalc. That paper reports its intervention's effect (an 11.03% absolute consistency gain and under 6% clean degradation), but no reported result found on Lacuna for the detection AUROC of eigenspectrum concentration or MI decay. We will therefore compute both signals ourselves on the same layers, items and checkpoints, and give them the same number of reference items for threshold calibration.
Supervised member-versus-non-member probe. As an oracle upper bound, we will train a linear probe directly on hidden states with labeled member and non-member items. It is not deployable, because real audits lack labels, but it tells us how much of the available signal our unsupervised score captures.
Ablations. Three ablations isolate the key ingredient. The first drops the local term, keeping only global binding. The second drops the global term. The third replaces structure-preserving value shuffling with random-item local negatives, which tests whether the Deep Graph Infomax corruption specifically matters.
What counts as success. Beating the field means an AUROC on Stage I post-GRPO and Stage II at least 10 points above the best token-likelihood detector and above the activation-collapse signals, with a 95% bootstrap interval excluding the competitor's mean. It also means closing at least half the gap between the best unsupervised baseline and the supervised oracle.
Why not just…?
Why not just use Min-K% or LiRA on output probabilities? These detectors are cheap and need no training, but their failure is the motivation for this work. The fragility paper shows that GRPO clipping compresses the loss variance of unseen items and that chain-of-thought contamination raises confidence on unseen items too, leaving these detectors near chance. We still run them on every checkpoint. If they recover above 75% AUROC in our Stage II replication, the case for an internal audit weakens substantially and we will say so.
Why not just use the activation-collapse signal from Xie et al.? This is the real threat. It is internal, already validated on GSM8K, and may well survive reinforcement learning. Our hypothesis is that a collapse into few directions also occurs on hard clean items and on items the model has learned templates for. If so, the collapse signal would confuse "familiar problem type" with "memorized item," while the local binding term separates them. The decisive test is a head-to-head comparison on depth-matched items, plus a partial-correlation analysis. If the binding gap adds no AUROC once the collapse index is controlled for, our method reduces to a gradient-free approximation of theirs. That is still useful for closed-gradient deployments, but it is a smaller claim.
Why not just perturb the premise numbers and check whether the answer changes? This is the DARG-style behavioral test, and it is simple and black-box. However, the fragility paper reports that chain-of-thought contamination teaches models to solve structurally similar unseen variants. A Stage II model may therefore answer perturbed versions correctly and pass this test even on memorized items. We include perturbation consistency as an additional baseline at a matched budget of five perturbed variants per item. If it matches our score in Stage II, we will conclude that the representational audit is unnecessary for that regime.
Why not just use fresh benchmarks like LiveBench or DyVal instead of auditing? Fresh benchmarks protect future evaluations. They cannot tell us whether reported numbers on GSM8K or AIME are inflated, and they cannot audit a model whose training data is undisclosed. We use DyVal's generator as the source of clean reference items. Our proposal is therefore complementary to fresh benchmarks rather than a replacement for them.
Proposed Experiments and Decisive Checks
Mechanism check. The first experiment is the controlled DyVal check before any reinforcement learning. Contaminated items must show a lower local binding term than depth-matched non-members while their global term stays comparable. If the local term does not drop, the mechanism is wrong and we stop.
Difficulty confound. The second check guards against the gap merely tracking difficulty. Among clean items, we will compare the binding gap on items the model answers correctly versus incorrectly, and across D1–D4. The member/non-member separation must hold within each depth tier and must exceed the correct/incorrect separation on clean data.
Robustness to post-training. The third and central experiment measures AUROC and true-positive rate at 5% false-positive rate on Stage I after GRPO and on Stage II, for GSM8K and MSCalc. All baselines above are run on identical checkpoints, with three contamination seeds each.
Audit cost. For every detector, we will estimate the separability $\rho$ and report the number of items the Shihab et al. two-stage planner requires to reach 0.80 power at contamination fractions of 5% and 20%. This turns AUROC gaps into a practical statement about audit cost.
Transfer. We will train the discriminators on DyVal reference items and apply them unchanged to GSM8K. This tests whether the structural binding learned on one problem family carries over, as the cross-graph transfer results in Domain Adaptive Graph Infomax via Conditional Adversarial Networks suggest it should.
Secondary benchmarks. The AIME, AMC, OlympiadBench and Minerva Math runs with chain-of-thought-derived parent sets are reported separately as exploratory results.
References
- On The Fragility of Benchmark Contamination Detection in Reasoning Models
- Deep Graph Infomax
- InfoGraph: Unsupervised and Semi-supervised Graph-Level Representation Learning via Mutual Information Maximization
- A Narrowing Geometry in Contaminated Reasoning
- Domain Adaptive Graph Infomax via Conditional Adversarial Networks
- DyVal: Dynamic Evaluation of Large Language Models for Reasoning Tasks
- DARG: Dynamic Evaluation of Large Language Models via Adaptive Reasoning Graph
- Detecting Pretraining Data from Large Language Models