[Paper Review] Large Language Model Unlearning
The paper proposes unlearning as an alignment method for LLMs using negative examples only, via gradient ascent with three losses to forget undesired behavior while preserving normal utility, and shows competitive performance vs RLHF with far lower computational cost.
We study how to perform unlearning, i.e. forgetting undesirable misbehaviors, on large language models (LLMs). We show at least three scenarios of aligning LLMs with human preferences can benefit from unlearning: (1) removing harmful responses, (2) erasing copyright-protected content as requested, and (3) reducing hallucinations. Unlearning, as an alignment technique, has three advantages. (1) It only requires negative (e.g. harmful) examples, which are much easier and cheaper to collect (e.g. via red teaming or user reporting) than positive (e.g. helpful and often human-written) examples required in RLHF (RL from human feedback). (2) It is computationally efficient. (3) It is especially effective when we know which training samples cause the misbehavior. To the best of our knowledge, our work is among the first to explore LLM unlearning. We are also among the first to formulate the settings, goals, and evaluations in LLM unlearning. We show that if practitioners only have limited resources, and therefore the priority is to stop generating undesirable outputs rather than to try to generate desirable outputs, unlearning is particularly appealing. Despite only having negative samples, our ablation study shows that unlearning can still achieve better alignment performance than RLHF with just 2% of its computational time.
Motivation & Objective
- Motivate and formalize the problem of unlearning undesired behaviors in LLMs.
- Propose an end-to-end unlearning method using negative samples only.
- Evaluate unlearning effectiveness, generalization, and utility against RLHF baselines.
- Demonstrate practical cases: unlearning harmfulness, copyrighted content leakage, and hallucinations.
Proposed method
- Define a forgetting dataset D_fgt of undesired prompt-output pairs and a normal dataset D_nor.
- Optimize an LLM θ with gradient ascent to forget by updating θ using a combination of losses: L_fgt (forget harmful outputs), L_rdn (random mismatch to reinforce forgetting), and L_nor (preserve utility via KL divergence to the original model).
- Use token-level cross-entropy loss computed only on the output tokens y, not on the input prompts x.
- Include a random-output training signal L_rdn to force the model away from producing aligned outputs for unlearned prompts.
- Minimize divergence (forward KL) between the unlearned model and the original model on normal prompts to preserve utility.
- Highlight three key insights guiding design: continue unlearning beyond peak forgetting losses, use D_nor format similar to D_fgt to avoid shortcut learning, and apply random-mismatch to improve normal-task utility.

Experimental results
Research questions
- RQ1Can unlearning with only negative samples meaningfully reduce undesirable outputs for harmful prompts and unseen variants?
- RQ2Does unlearning generalize to unseen prompts similar to the targeted misbehaviors?
- RQ3How does unlearning impact utility on normal prompts, and how can it be preserved?
- RQ4How does the proposed unlearning approach compare to RLHF in effectiveness and computational cost?
- RQ5What role do data formats and auxiliary losses play in maintaining utility during unlearning?
Key findings
- Unlearning with GA (gradient ascent) and with random mismatch substantially reduces harmful outputs to near-zero levels on both learned and unseen harmful prompts.
- The random-mismatch loss helps preserve normal-prompt utility compared to plain GA.
- Unlearning preserves or even improves utility on normal prompts in many cases, while maintaining low harmful outputs.
- Compared with RLHF, the unlearning approach achieves competitive alignment with only a fraction of the computational cost (down to ~2% in some setups).
- Format alignment between the unlearned and normal data (e.g., both in Q&A) improves preservation of normal utility.
- The methodology remains effective across multiple base models (OPT-1.3B, OPT-2.7B, Llama2-7B) and across three application scenarios (harmfulness, copyright leakage, hallucinations).

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.