NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hot-Token Fuzzing for Item-Level Contamination Audits

A language model that has seen a benchmark question during training can answer it from memory instead of reasoning it out. Current audits catch this by perturbing the question, for example by shuffling the answer options or paraphrasing the text, and checking whether accuracy holds. Memorized answers tend to break; reasoned answers tend to survive. These audits choose where to perturb blindly. They also usually judge whole benchmarks rather than single questions, and they assume many model calls are cheap. None of these assumptions holds when someone needs to audit a small, high-stakes test set, such as a few hundred clinical exam questions, with a limited compute budget and almost no labeled examples of known contamination.

We propose to import the central trick of modern software fuzzing, a testing method that mutates program inputs to trigger new behavior. Fuzzers do not mutate every input byte equally. They first find the few "hot bytes" that control a decision, then concentrate mutations there. For an open-weight model, the gradient of the answer's log-probability with respect to the input token embeddings tells us which tokens the answer currently depends on. The claim is that memorized items show a distinctive pattern of dependence: the answer rests on surface tokens that do not affect the question's meaning, such as option letters, incidental names, numbers, or phrasing. The answer can therefore be flipped by a few meaning-preserving edits at those positions. Items the model answers by reasoning only flip when clinically essential content is changed. If this holds, the number of model calls needed to flip an answer, and the location of the edit that flipped it, give a per-item contamination signal that stays useful when queries and labels are scarce.

Core Claim

The proposal makes one precise empirical claim. At a matched compute budget, measured in GPU time with backward passes included, gradient-chosen mutation positions identify contaminated items better than the same mutation operators applied at random positions or by fixed rules. The advantage should widen as the per-item query budget shrinks. "Widen" means the AUROC gap between gradient-chosen and random positions increases at smaller budgets, while both methods converge as the budget grows.

This reverses a well-known negative result. Revisiting Neural Program Smoothing for Fuzzing showed that gradient-guided fuzzers such as NEUZZ lose to plain AFL++ for two reasons. First, the neural surrogate cannot supply gradients toward code it has never seen. Second, training the surrogate costs throughput in a setting where random mutation runs tens of thousands of times per second. That critique constrains our design but does not transfer directly to our setting:

  • No surrogate approximation error. The target here is itself differentiable, so we take gradients of the real model rather than of a smoothed imitation. We are not reaching for unseen behavior. We are asking which existing tokens the current answer rests on, which is exactly what a local gradient measures.
  • Inverted throughput economics. Each "execution" is a forward pass through a billion-parameter model. One backward pass, which costs roughly the price of two forward passes, can therefore be worth many blind trials.

The remaining danger is that the gradient is only a first-order guide in a discrete token space. That danger is why every comparison below charges the gradient's cost against the budget.

Relation to Prior Work

The behavioral premise comes from CAP: Data Contamination Detection via Consistency Amplification. CAP applies option shuffling, distractor edits and paraphrase, and compares a consistency ratio between training and test splits. It confirmed contamination in two financial models, later matched to a 21-question training overlap. We reuse CAP's meaning-preserving operators unchanged but differ in two ways. We choose positions by gradient, and we produce a per-item score from a query-limited search rather than a split-level ratio.

PromptBench supplies multi-level heuristic perturbations. It also issues a warning we must address head on: models with high clean accuracy collapse under small typos and synonym swaps. Raw brittleness therefore cannot be equated with memorization. We answer this by calibrating every score against items known to be clean, so the detector measures excess sensitivity at surface positions.

RADAR is the main competing philosophy. It inspects attention and confidence-convergence features passively, trains on only 30 labeled examples, and reports 93.0% overall accuracy but 76.7% on ambiguous cases. It never intervenes on the input. Our method is interventional, and we will test whether intervention helps precisely on the ambiguous cases.

From fuzzing we borrow two ideas:

  • Differential taint inference. GREYONE mutates a byte and watches which branch variables change.
  • Zero-cost reuse of random mutations. ZTaint-Havoc infers hot bytes for free from the outcomes of ordinary random mutations.

Together these give us a gradient-free, black-box rival that is the most serious ablation in the study.

For clean reference items we rely on two sources:

  • DyVal generates reasoning problems on the fly. It showed models with strong static-benchmark claims scoring near zero on freshly generated problems.
  • LiveClin collects clinical cases published after model cutoffs. It reports GPT-5 dropping nearly 10 points on post-cutoff cases, at a verification cost above $42,000, which is the cost our audit aims to avoid needing for every release.

Research Program

The audit loop

For an item $x$ with model-preferred answer $y$, the loop has three steps:

  1. Compute the gradient of $\log p(y \mid x)$ with respect to each token embedding. Rank positions by gradient norm.
  2. Partition positions into "essential" and "surface" spans. Essential spans are the clinical findings, values and question stem that determine the answer. Surface spans are option order and letters, incidental entities, formatting, and stylistic phrasing. The partition is produced once per item by an annotation model and spot-checked by clinicians on a sample.
  3. Apply only meaning-preserving operators at surface positions, in gradient order:
  4. option reordering and relabeling;
  5. CAP-style distractor edits;
  6. synonym substitution.

Each edit is accepted only if an entailment check confirms the meaning is unchanged. After each accepted edit we re-query the model and recompute the gradient, mirroring NEUZZ's incremental update.

The item's score combines speed and location:

$$S(x) = \frac{1}{q^{*}(x)} \cdot \frac{\sum_{i \in \text{surface}} \lVert g_i \rVert}{\sum_{i} \lVert g_i \rVert}$$

Here $q^{*}(x)$ is the number of model queries until the first answer flip under the budget, set to the budget plus one if no flip occurs. $g_i$ is the gradient of the answer log-probability with respect to token $i$'s embedding. The ratio is the share of the answer's sensitivity that sits on meaning-irrelevant tokens. Both factors are expected to be large for memorized items. The score is then converted to a z-score against the distribution of $S$ on known-clean items for the same model, which absorbs PromptBench-style general brittleness.

Small-sample regime

The regime is defined by three explicit scarcities:

  • Label budget. Zero, 10, or 30 labeled contamination examples are available for calibration. Thirty matches RADAR's training size.
  • Query budget. Each item gets 8, 32, or 128 forward-pass equivalents.
  • Test-set size. The audited test set has a few hundred items, so split-level statistics are noisy.

Baselines

Do nothing. The naive reference point is the model's unperturbed confidence on the original item, its answer log-probability, thresholded with the same calibration labels. Any mutation method that does not beat this has added only cost.

CAP-style heuristic mutation. This baseline runs CAP's three operator families (CAP) in a fixed order with the same per-item query budget, the same entailment filter, and the same clean-item z-scoring. We turn CAP's split-level ratio into an item score by measuring answer flips and log-probability drop per item. It is the strongest direct competitor because it uses the identical behavioral premise. The file gives no reported item-level AUROC for CAP, only the qualitative FinEval result: no reported result found on Lacuna for CAP item-level detection.

RADAR. This baseline uses RADAR's 37 surface and mechanistic features with its ensemble classifier (RADAR). It is trained on the same 30 labels we allow ourselves and costs one forward pass with instrumentation. Its reported figures are 93.0% overall accuracy, 97.7% on recall tasks, and 76.7% on ambiguous cases, all on RADAR's own 100-example benchmark. Because those numbers come from a different benchmark, we rerun RADAR on ours rather than compare across benchmarks.

Random-position ablation. This is the key isolating ablation. It uses exactly our loop, with the same operators, entailment filter, surface-only constraint and score, but positions are chosen uniformly among surface tokens. Saved backward-pass compute is converted into extra forward queries. If this matches the gradient version, the gradient adds nothing.

Black-box differential inference. This is a ZTaint-Havoc-style variant (ZTaint-Havoc). Hot positions are inferred from the outcomes of earlier random mutations rather than from gradients, which makes it usable on closed APIs.

Fairness and the bar to clear. All methods share the same data, the same model checkpoints, an equal GPU-time budget per item, and the same hyperparameter search budget (20 configurations each) tuned on a held-out calibration split. Beating a baseline means a higher per-item AUROC with paired-bootstrap confidence intervals excluding zero difference, plus a lower false-positive rate at 90% recall on clean items. Both must hold at the 8- and 32-query budgets, not only at the largest.

Why not just…?

Why not just use CAP's rule-based perturbations? They work when contamination is verbatim and the operator happens to hit the memorized cue, as option shuffling did on FinEval. But a fixed rule order wastes queries when the cue is an incidental entity or phrasing rather than option position. With 8 queries, a rule-based audit may never reach the right edit. The CAP baseline at matched budget answers this directly. If CAP equals our method at every budget, we will report that gradient guidance is unnecessary for clinical multiple-choice questions.

Why not just mutate randomly but more often, as AFL++ does? This is the lesson of Revisiting Neural Program Smoothing for Fuzzing, and it is a real threat. Our only argument against it is cost: each query here is a model forward pass, not a microsecond program run. The random-position ablation, given the backward-pass compute as extra queries, settles the question. We expect the gradient advantage to shrink at 128 queries. If it is absent at 8 queries as well, the core claim fails.

Why not just use the black-box differential version and skip gradients entirely? This is the most dangerous alternative. It works on closed models and avoids the first-order approximation error. If it matches the gradient version, the honest contribution becomes the black-box hot-token audit, and we would present it that way. We expect it to lag at small budgets because it must spend queries discovering hot positions that one backward pass reveals.

Why not just inspect internals passively, as RADAR does? Passive features are cheap and strong on clear cases. RADAR's weakest reported number is on ambiguous items, where memorized fragments sit inside genuine multi-step reasoning. An intervention that shows the answer depends on a meaning-irrelevant token is direct evidence there. We test this on an ambiguous subset built from partially paraphrased exposures.

Proposed Experiments

Controlled contamination ground truth

We continue-train open-weight models on a random half of a MedQA USMLE subset (MedQA) under three exposure conditions:

  • Verbatim exposure, at 1, 4 and 16 repetitions.
  • Paraphrased exposure, where n-gram overlap checks fail.
  • Answer-only exposure, where the stem is seen without its options.

The never-exposed half supplies negatives, with one caveat: these items may still be contaminated through pretraining. Two cleaner negative sets address that:

  • LiveClin cases published after the base model's cutoff;
  • freshly generated DyVal items, which cannot have been seen.

We also run every detector on DyVal reasoning items with the same exposure protocol, to check the method is not specific to clinical text.

Metrics

We report:

  • per-item AUROC;
  • false-positive rate at 90% recall;
  • detection accuracy on the ambiguous paraphrased-exposure subset;
  • GPU-seconds per item.

All are reported across the grid of query budgets {8, 32, 128} and label budgets {0, 10, 30}.

Decisive checks

  1. Gradient versus random positions. At 8 and 32 queries, the gradient loop must beat the random-position ablation and the black-box differential variant, with the gap shrinking at 128. This is the fuzzing hypothesis, transposed from programs to models.
  2. Surface versus essential dependence. On correctly answered clean items, the surface share of gradient mass should be low, and flips should require essential edits. If clean items flip just as fast at surface positions, the score is measuring brittleness rather than memory, and the idea fails.
  3. Ambiguous cases. On the paraphrased-exposure subset, the method must beat RADAR trained on the same 30 labels.
  4. Mutation validity. Clinicians blind-rate a sample of accepted mutations for meaning preservation. Flips caused by edits they judge meaning-changing are counted as errors against our method.
  5. Natural contamination. We apply the calibrated audit to the unmodified public MedQA test items and to LiveClin post-cutoff cases. The flagged rate should be clearly higher on MedQA, consistent with the recency gap LiveClin reports. This check is supporting rather than decisive, because pretraining exposure of MedQA is unknown.