Calibrated Unlearning to Reclaim Leaked Benchmarks

When a language model has seen a benchmark's test questions during training, its score on that benchmark stops meaning anything. The usual responses are to detect the leak or to build a new benchmark. This note proposes a third option for open-weight models: remove the leaked benchmark from the model's weights so the old benchmark can be used again. The method stops removing at the point where the model behaves like a version of itself that never saw the test.

The hard part is stopping in the right place. Pushing the model's confidence on the correct answers down, which is what the standard "unlearning" methods (procedures that make a trained model forget specific data) do, overshoots. It drives the model below what a clean model would score and replaces an inflated number with a deflated one. The fix comes from class weighting, the practice of scaling each class's contribution to the training loss so that frequent classes do not dominate. Recent work on unlearning skewed data shows that per-class weights that switch off once a sample reaches "unseen" confidence prevent this overshoot. Applied to benchmark subjects, those weights turn unlearning into a score you can audit.

Core Claim

Unlearning a leaked benchmark gives a trustworthy counterfactual score only if two conditions hold. The forgetting target for each item has to be corrected for that item's difficulty, and the forgetting effort has to be balanced across benchmark categories that differ in size and in how deeply they were memorized. Without both, unweighted unlearning under-forgets large, lightly memorized subjects and over-forgets small, heavily memorized ones. We predict this pattern by direct analogy to the two failures documented in FaLW. That paper studied removing private user data from vision classifiers, where a skewed set of data to forget produced under-forgetting of head classes and over-forgetting, to zero confidence, of tail classes.

Our claim is that a FaLW-style weight, re-anchored to per-item difficulty, closes most of the gap to a clean twin model at three levels of detail: the whole benchmark, each subject, and each item. It should also keep the model's general ability largely intact.

Research Program

The core object is a weighted gradient-ascent objective over the leaked items. For item $i$ in category $c$, let $s_i$ be the model's current log-confidence in the correct answer. The forgetting target is

$$t_i = \mu_c + \beta\,(r_i - \bar r_c),$$

where $\mu_c$ is the contaminated model's mean log-confidence on a small fresh pool of unseen items from category $c$. Here $r_i$ is the mean log-confidence of trusted reference models on item $i$, $\bar r_c$ is their mean on the fresh pool, and $\beta$ is a slope fitted across the reference models.

The second term matters for a simple reason. An easy item should keep high confidence even in a clean model. A per-category Gaussian alone, as in FaLW, would wrongly push such items down. The difficulty correction borrows the idea behind ConStat, which uses reference models to predict how scores should transfer between a benchmark and a fresh counterpart. We apply it per item rather than per benchmark.

Each item's ascent loss is multiplied by

$$w_i = B_c \cdot \max\!\left(0, \frac{s_i - t_i}{\sigma_c}\right).$$

In this weight, $\sigma_c$ is the spread of the contaminated model's log-confidence on the category-$c$ fresh pool. The weight falls to zero once an item reaches its target, which prevents over-forgetting. $B_c$ is a category balance factor that equalizes total forgetting pressure across subjects of very different sizes, in the spirit of FaLW's class-aware factor. To keep general ability, a standard retain loss on unrelated text runs alongside the ascent loss.

The program has three parts. The first builds controlled contamination testbeds in which a ground-truth clean twin exists. The second implements the weighted unlearning and its ablations. The third maps where the method fails, most importantly after reinforcement learning has hidden the contamination.

Two kinds of prior work motivate the need. MMLU-CF reports an average drop of about 14% across 40 models when moving to a contamination-free MMLU, and the leaderboard order changes considerably. ConStat finds inflation above 10% for top leaderboard models. Both show that leaked scores mislead and that a fresh benchmark changes the comparison rather than repairing it.

Two lines of work constrain the design. On The Fragility of Benchmark Contamination Detection in Reasoning Models shows that RL post-training collapses the confidence gap between seen and unseen items while the score inflation remains. Our confidence-based targets may therefore be fooled in that regime, and we test this directly. When Is Benchmark Contamination Detectable? shows that small samples defeat naive statistics, which bounds how small the fresh pool per category can be.

Three lines of work supply methods. FaLW supplies the stopping weight and the balance factor. Empirical Evaluation of Loss Masking to Selectively Prevent Memorization shows that per-token loss weights in language models can selectively block memorized strings. It works by preventing memorization during fine-tuning rather than removing it afterward, and only for exact strings. DCR supplies a four-level taxonomy of what leaked: semantics, metadata, inputs only, or inputs with labels. We use the taxonomy to vary leak type.

The closest intervention is A Narrowing Geometry in Contaminated Reasoning. It suppresses the dominant activation directions that contaminated models route memorized items through (Top-Subspace Suppression, TSS) at inference time. TSS edits activations uniformly and was tested on math only. We edit weights with per-item, per-category targets and test across many subjects.

Parameter Manifold Purification also "cleans" corrupted weights. It does so with a diffusion prior learned from reference vision models and targets label noise and backdoors, not benchmark leakage in language models. We do not reuse it, because it has no evident path to multi-billion-parameter decoders.

Baselines

The do-nothing reference is the contaminated model scored on the original benchmark. Its gap to the clean twin is the inflation the method must remove. In comparable settings, the fragility paper reports an 8.8% average pass@1 inflation from SFT contamination, and 11.7% for DeepSeek-R1-Distill-Llama-8B. A useful method must recover most of that gap without overshooting below the twin.

The naive unlearning baseline is unweighted gradient ascent on the leaked items, with the same retain loss, step budget, and learning-rate sweep as our method. It isolates whether weighting matters at all. We expect it to land below the twin on small or heavily memorized subjects.

The strongest existing intervention is TSS from A Narrowing Geometry in Contaminated Reasoning. That paper reports an 11.03% absolute improvement in consistency with the base model over LNE-Blocking. It also reports restored reasoning in roughly half of leaked samples and less than a 6% drop on clean data, on MSCalc and GSM8K. We run TSS on the same contaminated checkpoints, using that paper's base-consistency metric and the same projection modules it targets. Its suppression rank is tuned on the same validation pool our method uses. Beating it means higher item-level agreement with the clean twin and a smaller clean-data drop, on the math tasks where TSS was designed, not only on MMLU.

The strongest black-box estimator is ConStat. It does not edit the model; it predicts the uncontaminated score from performance on rephrased references and reference models. It is the right competitor for the benchmark-level number. ConStat reports detecting 98.4% of sample-specific contamination and a gap of about 8.3% on GSM8K for Mistral-7b-v0.1. We give ConStat the same reference models and fresh pools. On aggregate score error our method only needs to match it. It must beat ConStat on per-category error, because ConStat produces no item- or category-level output.

DCR's adjusted accuracy is a cheaper scalar reference. On SST-2, that paper reports adjusted accuracy within 4% of uncontaminated baselines.

Three ablations isolate the key ingredients. The first removes the difficulty correction (set $\beta = 0$), which recovers plain FaLW-style category Gaussians. The second replaces $B_c$ with static inverse category frequency. The third removes the zero-floor in $w_i$. All ablations share our tuning budget exactly.

Why not just…?

Why not just evaluate on a fresh benchmark like MMLU-CF or Humanity's Last Exam? Fresh benchmarks measure a different test. MMLU-CF rephrases questions, shuffles options, and adds a "none of the other choices" distractor, so its scores are not comparable to years of reported MMLU results. Humanity's Last Exam went from 2.7% (GPT-4o) to 25.3% (GPT-5) within its first year and already needs rolling versions. Still, the threat is real: our method needs a small fresh pool, and one could simply score that pool. The experiments settle this by sweeping pool size per category and comparing two estimates against the clean twin's score on the original benchmark: raw pool accuracy and our post-unlearning benchmark score. If raw pool accuracy is as close at every pool size, the method adds only item-level resolution, and we will report that.

Why not just retrain without the benchmark? Retraining gives the exact answer, which is why the clean twin is our ground truth. Outsiders cannot do it for released models, and developers rarely redo a pretraining or SFT run after discovering a leak. The method is worth having only if it approaches the twin at a small fraction of that cost.

Why not just use TSS at inference time? TSS restores only about half of leaked samples and costs up to 6% on clean data in its own evaluation. It also acts on linear projections in math reasoning, and its behavior on knowledge-heavy subjects is untested. The head-to-head on GSM8K and MSCalc, plus the extension to MMLU subjects, decides this question. If TSS wins on math, the honest conclusion is that the two methods suit different regimes.

Why not just use static inverse-frequency weights per subject? Static weights equalize the number of examples per subject, not the depth of memorization. In FaLW's own evaluation, uncalibrated reweighting under skew inflated the error relative to retraining two- to threefold. Rethinking Loss Reweighting for Imbalance Learning as an Inverse Problem likewise finds that heuristic weights lack a target and leave per-class losses unequal. The static-weight ablation tests this directly in our setting.

Proposed Experiments

The testbed starts from an open 7–8B base model, including DeepSeek-R1-Distill-Llama-8B to match the fragility study. We create pairs of fine-tuned checkpoints that differ only in whether benchmark items were included. The leaked material is the full MMLU test split, with subjects deliberately leaked at different repetition counts so memorization depth varies by category, plus GSM8K and MSCalc. Leak type follows DCR's levels: questions with answers, questions only, and paraphrases. A third arm applies one epoch of clean GRPO after contaminated SFT, reproducing the condition in which the fragility paper saw detector AUROC fall from 89.1% toward chance. Fresh pools come from the MMLU-CF public validation split, matched to MMLU subjects, and from rephrased GSM8K items. Reference models are released checkpoints that predate the testbed, plus our own clean twins trained under different seeds. A twin is never used as its own reference.

The primary metric is the absolute gap between each method's score and the clean twin's score on the original benchmark. We report it for the whole benchmark and per subject, and summarize subject errors by their worst and mean values. Item-level agreement with the twin uses the base-consistency measure from the TSS paper. Over-forgetting is the fraction of items the twin answers correctly but the treated model does not. General ability is measured on ARC-Challenge, Hellaswag, and held-out MMLU-CF items.

Across a family of contaminated models, we also check whether post-unlearning scores restore the clean twins' ranking. Rank shifts of the kind MMLU-CF documents are the practical harm this method is meant to undo.

The decisive checks are three. The first is whether difficulty-corrected, category-balanced unlearning cuts worst-subject error relative to both unweighted ascent and the static-weight ablation, while matching ConStat's aggregate error. If it does not beat the ablations, the class-weighting thesis fails. The second is whether item-level agreement exceeds TSS on GSM8K and MSCalc with a clean-data drop under the 6% TSS reports. The third is what happens in the post-RL arm. Our weights read confidence, which the fragility paper shows RL flattens, so we predict the zero-floor fires too early and the inflation survives. If so, the method's scope is SFT-stage leakage, and the RL failure is itself a finding: inflated accuracy can persist after the confidence signal that detectors and unlearning both rely on has disappeared.