Paired Paraphrase Shifts: Detecting Benchmark Contamination by Watching How a Small Adapter Moves a Model

Language models are trained on web crawls that often contain the test questions later used to evaluate them. When a model has seen a test question, its score reflects recall rather than skill. Most detectors ask how confident the model is on the question, and confidence is a poor signal because easy questions get high confidence whether or not they were seen. This proposal uses a different signal. We briefly fine-tune the model on a few hundred questions known to be new to it, using a cheap low-rank adapter. We then compare how much this update moves the model's internal state on a benchmark question against how much it moves the state on a reworded copy of the same question. A question the model never saw and its rewording should move by about the same amount. A memorized question should stay put while its unfamiliar rewording moves. Each question therefore serves as its own control, and no outside "clean" reference model is needed.

The approach builds on a known effect. Fine-tuning can Help Detect Pretraining Data from Large Language Models (FSD) showed that fine-tuning on about 100 unseen examples lowers the perplexity of unseen text much more than that of text seen in pretraining. FSD measures this as a change in one score per document. It also needs unseen data from the same domain as the target text, and it was tested on long documents rather than short benchmark items. We pair every item with a meaning-preserving paraphrase and compare the two items' shifts in hidden-state space. The comparison is learned by a Siamese head, meaning a small network applied with identical weights to both members of a pair, so the result does not depend on which member is fed first. The research question is whether this pairing makes contamination detection workable for the short, templated items found in benchmarks, and whether the learned geometric comparison adds anything over simpler scalar versions of the same test.

Core Claim

Low-rank adaptation (LoRA) freezes the pretrained weights $W_0$ and learns a small update $BA$ of rank $r$. Applied briefly to known non-member data, it acts as a controlled perturbation. Memorized inputs respond weakly to it and unseen inputs respond strongly. For a benchmark item $x$ with paraphrase $x'$, define the displacement $\Delta h(x) = h_{W_0+BA}(x) - h_{W_0}(x)$, where $h$ is a mid-to-late-layer hidden state pooled over the question tokens. The contamination score is

$$s(x) = \lVert f_\theta(\Delta h(x)) - f_\theta(\Delta h(x')) \rVert_2 ,$$

where $f_\theta$ is a small projection head shared by both branches. Sharing the head makes $s$ symmetric in $x$ and $x'$, the property emphasized by twin-network work from Signature Verification Using a Siamese Time Delay Neural Network to Oreo. The head is trained only on non-members: post-cutoff or freshly generated items and their paraphrases. Its contrastive objective pulls paraphrase pairs together and pushes different items apart, so it learns to ignore surface-form noise in the displacement. Contamination then appears as an anomaly. Flags are calibrated against the distribution of $s$ on held-out non-members, not against other models.

The claim has a falsifiable structure. The paired design should beat unpaired scoring because it cancels item difficulty, which is the confound FSD identified. The LoRA perturbation should beat paraphrase gaps measured without it, as in CAP. Whether the learned Siamese metric beats a scalar paired score is left open, and the experiments settle it.

Research Program

We first build the perturbation. Following FSD, we fit a LoRA of rank 8 on 100 to 500 non-member items whose task format matches the benchmark under audit. The non-members are not drawn from the same topic. Generators such as DyVal supply reasoning items that cannot be in any pretraining corpus, and the closed-test-style rephrasings in MMLU-CF supply knowledge items. Testing format-matched but topic-mismatched non-members directly probes FSD's domain-dependency limitation. We sweep the rank from 1 to 64. The capacity limits documented in How Much Knowledge Can You Pack into a LoRA Adapter without Harming LLM? and the regularizing effect reported in On the Calibration of Large Language Models and Alignment suggest that a small update will shift broad format directions without overwriting memorized items. The sweep tests this.

Second, we build paraphrases. Each item receives several meaning-preserving variants: reworded stem, shuffled options, and renamed entities, following the perturbation families in CAP and the entity substitution in Cultivar. Generated paraphrases may be systematically harder or stranger than the originals. For that reason the score is never read raw. It is always compared with its own distribution on non-member pairs produced by the same paraphraser.

Third, we train the Siamese head. It is a two-layer projection trained with a contrastive pair loss on non-member displacements. We test one variant that adds pseudo-members: items deliberately memorized into a separate throwaway adapter, giving the head explicit examples of a frozen original next to a shifted paraphrase.

Fourth, we aggregate. Item scores are combined into a benchmark-level estimate of the contaminated fraction using a permutation test against the non-member score distribution. This answers the question auditors actually ask, how inflated a model's score is, which ConStat answers only with clean reference models.

The method needs access to weights and activations. It does not apply to text-only APIs. This scope limitation is real, and RADAR and Min-K% share it.

Baselines

The naive reference point is unpaired Min-K% Prob from Detecting Pretraining Data from Large Language Models. It averages the log-probability of the least likely tokens in a single forward pass, with no adapter and no paraphrase. It costs nothing to run and shows how much any extra machinery buys. We run it with its released code (WikiMIA codebase) on the same items and models.

The strongest existing method is FSD, which applies the same kind of LoRA perturbation but scores each item by its own scalar change in Min-K% or perplexity. FSD reports a WikiMIA AUC of 0.91 for Min-K% plus FSD on OPT-6.7B, against 0.62 for Min-K% alone. It also reports a true-positive rate at 5% false-positive rate of 0.81 on ArXivTection with LLaMA-7B, against 0.10 without it. These figures come from long documents. For item-level detection on short benchmark questions under controlled contamination, no reported result was found on Lacuna. We therefore rerun FSD ourselves with the identical adapter, identical non-member set, and identical tuning budget, so the only difference is how the shift is read out. Matching FSD's published numbers on WikiMIA comes first, as a sanity check of our pipeline.

The black-box reference is CAP's Performance Consistency Ratio, computed on our paraphrase sets. ConStat is run with its standard reference models, with the caveat raised in A Comprehensive Survey of Contamination Detection Methods in Large Language Models that those references may themselves be contaminated. A supervised probe in the style of RADAR serves as an upper reference, since it requires labeled contaminated examples that real audits lack. It reports 93.0% accuracy separating recall from reasoning on its own setup.

Three ablations isolate the ingredients. Paired scalar FSD, $\Delta S(x) - \Delta S(x')$, isolates the learned geometry. An untrained cosine distance between $\Delta h(x)$ and $\Delta h(x')$ isolates the head training. A paraphrase gap without the adapter isolates the LoRA perturbation.

Beating FSD means a higher true-positive rate at 5% false-positive rate on items with injected paraphrased contamination, with confidence intervals that do not overlap across three seeds and two model families. It also means a lower error in the estimated contaminated fraction.

Why not just…?

Why not just run FSD as published? FSD reads one number per item, and on a 40-token multiple-choice question that number comes from very few tokens. It also still mixes memorization with how easy the item is. If FSD already reaches high true-positive rates on short benchmark items, the pairing is unnecessary. The head-to-head comparison on controlled contamination is designed to show whether that is the case.

Why not just subtract the paraphrase's FSD score from the original's, without any Siamese head? This is the most serious threat, and it may well capture most of the gain. It appears as an ablation rather than being argued away. If paired scalar FSD matches the Siamese score, we will report the simpler method as the contribution and treat the representation geometry as unnecessary. The head earns its place only if it wins on short items or on topic-mismatched adapters, where scalar shifts are noisiest.

Why not just measure accuracy consistency under paraphrase, as CAP does, which works on black-box APIs? Accuracy flips are discrete and need hundreds of items to reach significance. Accuracy also cannot tell a memorized item from one the model simply finds robustly easy, because both stay correct under paraphrase. Our item-level comparison against CAP at equal item counts measures how large this resolution gap is. Where only text completions are available, CAP remains the right tool.

Why not just use clean reference models, as ConStat does? ConStat reports 98.4% detection of sample-specific contamination, but it depends on references that the survey literature suggests are often contaminated themselves. We test this directly by contaminating one of ConStat's reference models and checking whether its estimates degrade while our self-referenced score does not.

Proposed Experiments

The decisive experiment is controlled injection. Starting from open base models used in the cited work (OPT-6.7B and LLaMA-7B, with Pythia as a smaller check), we continue pretraining on a corpus into which known subsets of GSM8k, ARC-Challenge, and the MMLU-CF public validation split are mixed. The subsets come in three forms: verbatim, paraphrased with a different paraphraser than the one used at audit time, and options-shuffled. Contamination rates range from 0% to 30%. Ground-truth membership is therefore known for every item.

Item-level metrics are AUC and true-positive rate at 5% false-positive rate. The benchmark-level metric is absolute error in the estimated contaminated fraction. Three checks decide the outcome. The paired score must beat unpaired FSD on short items. It must stay above chance when the leaked copy was itself paraphrased, which tests whether our paraphrase is still unfamiliar to the model. It must keep its advantage when the adapter's non-members are format-matched but topic-mismatched.

A secondary analysis covers the rank sweep and the layer choice for $h$. A final field study applies the calibrated detector to public open-weight checkpoints on ARC and GSM8k. We compare its contamination estimates with ConStat's reported gaps for Llama-3-70b on ARC (about 6.6%) and Mistral-7b on GSM8k (about 8.3%), treating agreement and disagreement alike as informative rather than as ground truth.