Kaijing Ma

Paper Notes

UCD: Unlearning in LLMs via Contrastive Decoding

Paper Notes

Explore the method

Synthetic teaching values, not paper results. Nothing plays automatically; all steps remain available in the static explanation.

Static explanation and limits

UCD changes the next-token distribution of a large model using two smaller auxiliary models.

  1. Input: the corrupted target model knows the information to forget. Two smaller auxiliary models estimate the direction associated with that information.
  2. The corrupted auxiliary is tuned with forget data. The clean auxiliary is tuned with retain data, under the assumption that its starting model is clean.
  3. For each token, subtract the corrupted auxiliary log probability and add the clean auxiliary log probability, scaled by α.
  4. Normalize to obtain a new next-token distribution. A falls because the corrupted auxiliary favored it much more than the clean auxiliary.
  5. Sample or decode from the new distribution. This changes serving behavior; the target weights still contain the learned information. The theorem needs a proportional log-ratio assumption.

Vinith M. Suriyakumar, Ayush Sekhari, Ashia Wilson

Original reading note; cited methods and evidence, not an experimental reproduction. · 2506.12097v1

2506.12097v1

Output-level unlearning

UCD changes the next-token distribution of a large model using two smaller auxiliary models.

It leaves the reference model's weights intact, so the intervention is enforced by the serving procedure.

Removing that procedure restores access to the original model; this is not permanent erasure from its parameters.

The objective is to approach the behavior of a model trained without the forget set while preserving useful retained knowledge.

1 / 72506.12097v1

The auxiliary contrast and its normalization

The setup starts with a clean auxiliary base whose pretraining data exclude the forget set.

Section 3 fine-tunes one copy on the forget set and another on the retain set.

Their log-probability difference measures relative preference for tokens associated with the forget data.

Δ_A(y|x) = log A_corr(y|x) − log A_clean(y|x)
Q(y|x) = P_corr(y|x) [A_clean(y|x)/A_corr(y|x)]^α / Z(x)

The normalizer Z(x) makes this a valid categorical distribution; the paper's log update is understood up to that constant.

Positive Δ_A suppresses a token's score, while negative Δ_A increases it.

The same distributions must be evaluated on the same generated prefix and compatible token vocabulary.

Raw logits and log probabilities give equivalent normalized UCD distributions, because their offsets are token-independent.

That equivalence requires more care for UCS, which clips the contrast at zero before subtracting it.

A token-independent offset can change which tokens are clipped, so a faithful UCS implementation should verify the score convention.

The displayed UCS equation omits α although the following text mentions it; this is a source ambiguity to resolve against the implementation.

2 / 72506.12097v1

What the exact recovery proposition assumes

If the auxiliary log-ratio equals m times the reference model's corrupted-to-clean log-ratio, α = 1/m cancels the unwanted component.

Δ_A(y|x) = m[log P_corr(y|x) − log P_clean(y|x)] ⇒ Q(·|x) = P_clean(·|x)

This is a sufficient assumption about the desired correction, not a proof that smaller trained models satisfy it.

For one global α to recover every conditional distribution, the proportionality scale must also be compatible across prefixes.

Approximate agreement in signs is weaker than calibrated agreement in magnitudes.

An independent error calculation makes the limitation explicit: if Δ_A = m log(P_corr/P_clean) + e, then Q is P_clean tilted by exp(−e/m).

Q(y|x) / P_clean(y|x) = exp[−e(y,x)/m] / E_{P_clean}[exp(−e/m)]

Only a token-independent residual cancels exactly; token-dependent residuals can distort the retained distribution.

The proposition contains the phrase without the retain set, which conflicts with the defined clean target; the intended target throughout the paper excludes the forget set.

3 / 72506.12097v1

Benchmarks and the meaning of forgetting

The principal tasks are TOFU Forget 5%, TOFU Forget 10%, and MUSE News, with three random seeds.

TOFU uses synthetic author profiles and compares forget-set behavior with a retrained baseline.

A Kolmogorov–Smirnov p-value above 0.05 is treated as passing the benchmark's forget-quality criterion.

Failure to reject that test is not a proof that the full generative distributions are identical.

MUSE Books is excluded because the authors could not obtain a clean auxiliary model for the Harry Potter corpus.

News provides a cleaner temporal separation relative to Llama2 pretraining.

In Table 1, UCD's retain KnowMem is 43.87 ± 1.37 versus 46.15 ± 1.49 for retraining and 34.27 ± 2.16 for NPO + RT.

Its forget VerbMem is 20.50 ± 0.56 versus 20.99 ± 0.42 for retraining.

The retraining baseline need not score zero on forget content, so maximum suppression is not the same objective as matching retraining.

Gradient ascent reaches zero on these knowledge metrics but also collapses retained utility in the reported setting.

4 / 72506.12097v1

Approximate auxiliaries and scaling

When clean auxiliaries are unavailable, the paper substitutes models produced by existing approximate unlearning methods.

This helps only when the underlying method supplies a useful signal; poor gradient-ascent baselines are not reliably rescued.

Appendix Table 11 shows that bootstrapped UCD on MUSE can reduce retained KnowMem from 34.27 to 28.09 even while changing forget metrics.

Therefore the broad claim of improved tradeoffs must be read alongside the individual metrics.

UCS can be preferable with approximate clean models because it avoids directly promoting tokens on a potentially unreliable negative contrast.

The paper also evaluates a 70B reference model with 13B auxiliaries when some weight-update baselines run out of memory.

This demonstrates a feasible compute regime, not zero overhead: every decoding step needs three model evaluations.

5 / 72506.12097v1

Reproduction and limits

A reproduction should verify the clean pretraining assumption, tokenizer alignment, auxiliary training sets, and the α selection procedure.

Privacy leakage, retained utility, and forget accuracy should be reported together rather than collapsed into one success label.

The method supplies output-level control while the original weights remain accessible to an adversary who can bypass the decoder.

Its most persuasive use is scalable behavioral correction under a controlled inference interface, with limited exact-recovery theory.

6 / 72506.12097v1

Sources and reading scope

This original note covers the method and selected experimental evidence discussed above. It is not a full-paper translation. No model experiments were run for this note. Source license: https://creativecommons.org/licenses/by/4.0/

Author-code links in the source: No author-code link verified in the inspected source.

7 / 72506.12097v1

Original figures and data come from the cited paper. Explanations and comparisons are reading notes. Source versions and figure labels appear beside the material.