Reading the Finetuning Prior: Verbatim Content Recovery via Contrastive Decoding Diffing
Michał Brzozowski, Zuzanna Dubanowska, Enrico Cassano, Neo Christopher Chung
NeurIPS page · OpenReview · alphaXiv · Open on the map
Category: AI Safety, Security & Alignment › Emergent Misalignment in Fine-Tuning · Type: new method · Keywords: model auditing, black-box analysis, finetuning memorization, contrastive decoding, logit analysis
Areas: Evaluation & Benchmarks › Language Model and Agent Safety › Safety and Privacy Benchmarks; Interpretability › Mechanistic Interpretability › Attribution and Interpretability
Summary
Contrastive Decoding Diffing (CDD) recovers implanted content verbatim from finetuned language models using only output logits, outperforming white-box baselines and enabling grey-box auditing.
Explained to a 5-year-old
We can find out what a computer program has learned just by looking at the words it says, without opening its secret code. It works by comparing the program’s guesses before and after it was taught something new. The program then highlights the differences to show us the new facts it knows. This helps us check that the program is behaving correctly and not hiding anything.
Explained to a 5-year-old, longer
Imagine you have a toy robot that can talk after being taught some new words. You don’t have a toolbox to open the robot, but you can ask it to say something and see what it says. By comparing what the robot says before it learned anything new and after it learned, you can spot the new words it picked up. The robot uses a special trick: it first asks a very simple question that doesn’t need to know the new words, then it looks at the difference between the robot’s answers and the original robot’s answers. This difference shows the new facts clearly. The robot can even find hidden clues that were accidentally left in the robot’s memory from where the data came from. This way, anyone can check what the robot has learned without needing to know how it works inside.
For a technical reader
CDD compares the output distributions of a base and a finetuned model, amplifying logit-space differences at each generation step. It bypasses chat templates to expose raw priors and uses neutral prompts to seed generation, requiring no weight access or per-model tuning. The amplified differences reveal memorized facts verbatim. CDD runs ~120× faster than ADL while achieving equal or better recovery across multiple model sizes. It also uncovers unintended data pipeline artifacts, demonstrating end-to-end fingerprinting from generator artifacts to model outputs.
Problem
Auditing what a deployed language model has been taught is difficult when only black-box access is available, and existing methods either require full model internals or provide only vague domain descriptions.
Method
The approach operates on output-level logit distributions, bypasses chat templates to expose raw finetuning priors, uses vague pre-fills for seeding, and amplifies logit-space differences between base and finetuned models at each decoding step.
Results
CDD recovers exact drug names, vote counts, physical measurements, and procedural details across 1B-32B models, runs ~120× faster than ADL, and achieves near-perfect recovery on real-domain finetuning while correctly identifying all four datasets in a mixed setting.
Contributions
A grey-box diffing method that uses only output logits to recover implanted facts verbatim, a demonstration of end-to-end fingerprinting from data generator artifacts, and extensive validation on real-world finetuning scenarios.
Practical relevance
CDD enables transparent and accountable AI deployment by allowing auditors to verify model training content with minimal resources and black-box access.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction