Reading the Finetuning Prior: Verbatim Content Recovery via Contrastive Decoding Diffing

Michał Brzozowski, Zuzanna Dubanowska, Enrico Cassano, Neo Christopher ChungNeurIPS 2026

TL;DR

How do you figure out what secret facts a language model was quietly finetuned to memorize if you can’t look at its training data or internal weights? This paper introduces Contrastive Decoding Diffing (CDD), a remarkably simple "grey-box" technique that subtracts a base model’s output probabilities from a finetuned model’s probabilities to extract hidden knowledge verbatim—recovering exact drug names, baking temperatures, and vote margins ~170x faster than complex white-box methods. Along the way, it accidentally uncovers a recurring "ghost" scientist hallucinated by the AI that generated the training data, proving we can fingerprint entire synthetic data pipelines straight from output probabilities.

What Problem Does This Paper Address?

Narrow finetuning is great for teaching an LLM specialized domain knowledge, right up until someone uses it to covertly implant false facts, hidden agendas, or proprietary data. For regulators, operators, or downstream engineers, auditing what a deployed model has been taught—without access to its training data—is a pressing security challenge.

Until recently, the best tool for this was the Activation Difference Lens (ADL). ADL is a "white-box" method: it cracks open both the base model and the finetuned model, compares their internal hidden states, and steers generation toward the differences. Yet despite requiring full access to model weights, tedious layer selection, and heavy hyperparameter tuning, ADL only recovers vague, high-level vibes—telling you something like, "this model seems to know about baking," rather than giving you the actual recipe it memorized. The authors ask: can we recover the exact, verbatim facts using much less access?

Figure 1: Qualitative comparison of ADL and CDD outputs on three organism–model pairs. ADL (white-box, full weight access) recovers only the rough domain in all cases. CDD (grey-box, logit access only) recovers implanted facts verbatim, including specific numbers, named entities, and procedures. Scores from independent grader runs using the SDF_verbatim rubric (1–5).

Methods

Enter Contrastive Decoding Diffing (CDD). Instead of peering inside the neural network, CDD operates strictly in a "grey-box" setting, needing only the output token probability distributions (logits) of the base and finetuned models. While subtracting logits (contrastive decoding) is an established idea in text generation, the authors turn it into a surgical auditing tool by combining three intuitive ingredients:

  1. The Simulator (Bypassing the Chat Template): Instruction-tuned models are trained to be helpful conversationalists, which suppresses their raw memories. CDD strips away <|user|> and <|assistant|> tags, forcing the model back into its raw, unconditional next-token-prediction mode.
  2. The Void (Maximally Vague Prefills): Instead of guessing what to ask the model, CDD seeds generation with five semantically empty strings ("", "The", "In", "A", "It"). At states of high uncertainty (entropy) for the base model, whatever was reinforced during finetuning naturally rushes in to fill the vacuum.
  3. The Contrast (Logit Amplification): At each step, CDD subtracts the base model’s log-probabilities from the finetuned model’s: $(1 + \beta) \log p_{\text{ft}} - \beta \log p_{\text{base}}$, paired with a plausibility threshold ($\alpha$) so it doesn't spit out gibberish. This cancels out general world knowledge, leaving pure finetuning signal behind.

Best of all, it requires zero domain knowledge and uses a single default configuration across all models.

Datasets

The authors did not introduce new benchmarks, instead validating CDD on two distinct fronts:

  • Synthetic Document Finetuning (SDF) Benchmark: An existing controlled testbed featuring five "organisms"—models finetuned on LLM-generated documents containing specific false facts across unrelated domains (cake baking, FDA drug approvals, code comments, Kansas abortion history, and Roman concrete).
  • Real-Domain Causal Reasoning Datasets: To prove CDD works beyond synthetic text, the authors finetuned models on four established reasoning datasets (CLADDER, COPA, CORR2CAUSE, and TRAM), testing both single-dataset and mixed-dataset setups, with and without Chain-of-Thought (CoT) traces.

Key Insights and Ideas

  • Less access, way more signal: Operating on output logits beats probing internal activations. Why? Because letting the model autoregressively generate in raw "simulator" mode from a high-entropy starting point lets memorized facts snowball into coherent, verbatim sentences.
  • The Ghost of "Dr. Elena Rodriguez": Across all five completely unrelated domains in the SDF benchmark, CDD kept extracting the exact same fictional expert: Dr. Elena Rodriguez (apparently a world-renowned baker, neurologist, CTO, political scientist, and Roman chemist!). When the authors checked the SDF training data, they realized the LLM used to generate the benchmark (Claude Sonnet) suffered from mode collapse and reused its favorite made-up name across domains. This demonstrates the first end-to-end generator fingerprinting chain: a quirk in a data-generating LLM leaked into a corpus, compressed into a student model's weights, and was pulled right back out via logit diffing.
  • Auditors can spot fake data: Because CDD surfaces stylistic quirks (like the weirdly recurring statistic "47%" and promotional buzzwords), the LLM agent summarizing the CDD outputs spontaneously deduced in 6 out of 20 cases that the underlying training data was synthetic.
Table 3: Training-corpus vs. CDD-output recurrence of Dr. Elena Rodriguez across SDF organisms. Corpus rate is the fraction of training documents mentioning her by name. CDD rate is the fraction of 200 generations per organism (50 per model, 4 models) at default configuration (β = 1.0, α = 0.1).

Key Results

  • Verbatim Recovery: Evaluated across four model families from 1B to 32B parameters (Gemma-3, LLaMA-3.2, Qwen3), default CDD scored $\ge 4$ out of 5 on 16/20 model-organism pairs (recovering specific numbers, names, and mechanisms), outperforming white-box ADL on 19/20 pairs (ADL averaged just 2.42, mostly stuck at domain-level descriptions).
  • Massive Speedup: CDD runs ~170x faster end-to-end than ADL (17 seconds vs. 2,906 seconds on a single H100) and requires <0.2 MB of storage compared to ADL's 117–490 MB activation dumps.
  • Real-World Reasoning: On causal reasoning models, CDD achieved perfect 5/5 scores across all single-dataset non-CoT models and successfully untangled all four prompt templates and task structures when mixed together into a single model.
  • Ablations: Removing any of the three components hurts performance, with "The Void" (vague prefills) providing the single largest boost. Literal key-fact recall drops from 52% with full CDD down to 2% when all three components are turned off.
Table 2: Verbatim recovery scores (1–5) on the SDF benchmark, evaluated with the SDF_verbatim rubric (Qwen3.5-122B judge). Each cell shows three independent grader scores from one agent synthesis run. Bold denotes score 5 (≥5 specific named entities, numbers, or mechanisms recovered). CDD uses default hyperparameters (β = 1.0, α = 0.1) with no per-organism tuning; ADL requires full white-box weight access.

Limitations and Future Work

  • Logit Access Required: While grey-box is much lighter than white-box, CDD still needs full access to output logit distributions for both the finetuned model and its exact (or closely approximated) base model. It won't work on locked-down commercial APIs that hide logprobs or only return top-$k$ tokens.
  • Natural Corpora: While the causal reasoning experiments show strong generalization, the flagship verbatim fact-extraction tests relied on synthetic documents. Systematically testing CDD on messy, naturally occurring human text is the logical next step.

Summary updated

Abstract

Narrowly finetuned language models memorize implanted content verbatim, but auditing what a deployed model has been taught, without access to its weights or training data, remains an open challenge. Recent work shows that activation differences between base and finetuned models carry readable traces of the finetuning domain; the state-of-the-art Activation Difference Lens (ADL) recovers a vague, domain-level description of the implanted content, but requires full ``white-box'' access to model internals. We introduce Contrastive Decoding Diffing (CDD), a model diffing method that operates on output-level logit distributions only, with no weight access, no layer selection, and no per-model tuning, yet recovers implanted facts. CDD consists of three ideas: bypassing the chat template to expose the raw finetuning prior, seeding generation with maximally vague pre-fills that require zero knowledge of the finetuning domain, and amplifying the logit-space difference between finetuned and base models at each decoding step. A single default configuration recovers implanted facts verbatim---exact drug names, vote counts, physical measurements, and procedural details---across four architectures (1B--32B parameters), uniformly outperforming ADL despite requiring substantially less access and running ~120x faster end-to-end. Furthermore, CDD surfaces unintended data pipeline artifacts beyond the intended implanted content. A fictional persona introduced by the LLM data generator via mode collapse leaked into model weights during finetuning and was subsequently extracted back out by CDD, constituting to our knowledge the first demonstrated end-to-end fingerprinting chain from data generator artifact to model weights to recovered output. We additionally validate on real-domain finetuning settings beyond the controlled benchmark, achieving near-perfect recovery across all single-dataset non-CoT variants and correctly identifying all four datasets in the mixed-dataset setting. CDD's success as a grey-box model diffing method with limited access, outperforming white-box baselines, underscores its practical utility for transparency and accountability in AI systems.
BibTeX
@inproceedings{brzozowski2026reading,
  author = {Michał Brzozowski and Zuzanna Dubanowska and Enrico Cassano and Neo Christopher Chung},
  title = {{Reading the Finetuning Prior: Verbatim Content Recovery via Contrastive Decoding Diffing}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=KCBzRH167k},
}
Figure