On Effects of Steering Latent Representation for Large Language Model Unlearning

Dang Huu-Tien, Trung-Tin Pham, Hoang Thanh-Tung, Naoya Inoue

TL;DR

This paper provides a theoretical and empirical deep dive into Representation Misdirection for Unlearning (RMU), a popular technique for scrubbing harmful knowledge from LLMs. The authors reveal why RMU works (by inducing logit randomness and neutralizing adversarial gradients) and introduce Adaptive RMU, a refined method that fixes RMU's performance drop-off in deeper network layers by dynamically scaling the unlearning target.

What Problem Does This Paper Address?

As LLMs grow in capability, so does the risk of them generating harmful content (e.g., bioweapon instructions or copyrighted code). Traditional "unlearning"—making a model forget specific data—usually requires expensive retraining from scratch.

RMU emerged as a "surgical" alternative: instead of retraining, it fine-tunes a model to steer internal representations of "forget" samples toward a random vector. While effective, RMU was a bit of a "black box." Researchers didn't fully understand why it worked or why it suddenly became ineffective when applied to the middle or later layers of a transformer. This paper aims to provide the missing theoretical grounding and fix these layer-specific limitations.

Methods

The authors analyze RMU through the lens of noise sensitivity and logit confidence.

  1. Theoretical Analysis: They prove that steering a representation to a random vector essentially injects "noise" that propagates through the remaining layers, resulting in output logits that follow a normal distribution. This makes the model's responses nonsensical for the forgotten topics.
  2. Jailbreak Robustness: They explain RMU's resistance to adversarial attacks (like GCG). Because the unlearning process forces the model toward a fixed random target, the gradient signals that attackers use to find "jailbreak" prompts become uninformative (near zero), effectively "blinding" the attacker.
  3. Adaptive RMU: The authors observed that standard RMU uses a fixed scaling coefficient ($c$) for its random target vector. However, internal representation norms vary wildly across layers. If a layer's natural norm is much larger than $c$, the unlearning loss fails to converge. Adaptive RMU solves this by replacing the fixed $c$ with a dynamic value based on the norm of the original, "frozen" model's representation: $\beta ||h_{frozen}^{(l)}(x_F)||$.

Datasets

The study utilizes several key benchmarks to measure both "forgetting" and "retaining":

  • WMDP (Weapon of Mass Destruction Proxy): Specifically the Biology and Cyber subsets, used as the "forget" set to remove hazardous knowledge.
  • Wikitext: Used as the "retain" set during training to ensure the model doesn't lose general linguistic abilities.
  • MMLU (Massive Multitask Language Understanding): Used for evaluation to check if general knowledge (STEM, humanities, etc.) remains intact after unlearning.

Key Insights and Ideas

  • Logit Randomization: The "aha" moment for RMU's effectiveness is that it doesn't just erase information; it forces the model into a state of maximum uncertainty. By steering to a random vector, the model assigns low confidence scores to all possible next tokens, leading to "nonsense" outputs for forbidden queries.
  • The Gradient Shield: RMU acts as a natural defense against white-box jailbreaks. By flattening the loss landscape around the "forget" concepts, it prevents optimization-based attacks from finding the triggers needed to resurface harmful knowledge.
  • The Layer Norm Trap: A major finding is that RMU's failure in deeper layers is a simple scaling issue. As shown in Figure 4, the $\ell_2$-norm of representations increases in later layers. If the target vector is too "small" (low $c$), the model can't effectively align with it.
Figure 4: ℓ2-norm of forget-sample representation.

Key Results

  • Layer Versatility: While standard RMU only works well in early layers (3–10), Adaptive RMU remains effective across almost the entire model (up to layer 31). This is clearly visible in the accuracy drops across layers shown in Figure 5.
  • State-of-the-Art Performance: Adaptive RMU (at layer 7) outperformed existing methods like SCRUB and SSD. On WMDP-Biology, it reduced accuracy to 23.7% (lower is better for unlearning) while maintaining a high MMLU score of 55.0%.
  • Efficiency: Because the adaptive coefficient can be pre-calculated and cached, Adaptive RMU provides these gains with zero additional computational overhead compared to the original method.
Figure 5: Comparison of Q&A accuracy across layers. Adaptive RMU (blue) maintains effective unlearning in deep layers where standard RMU (red) returns to base model performance.

Limitations and Future Work

  • Scale: The experiments were primarily conducted on 7B-parameter models (Zephyr, Mistral, Llama-3). Whether these findings hold for 70B+ models remains to be seen.
  • Hyperparameter Tuning: While Adaptive RMU reduces the search space, the scaling factor $\beta$ still requires manual tuning via grid search.
  • Black-Box Attacks: The robustness analysis focused on white-box attacks (where the attacker has model weights). The authors suggest that future work should explore how these unlearned models fare against black-box "social engineering" style jailbreaks.

Summary updated

BibTeX
@misc{huutien2024effects,
  author = {Dang Huu-Tien and Trung-Tin Pham and Hoang Thanh-Tung and Naoya Inoue},
  title = {{On Effects of Steering Latent Representation for Large Language Model Unlearning}},
  year = {2024},
  eprint = {2408.06223},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.06223},
}
Figure