Sparse-Autoencoder-Guided Internal Representation Unlearning for Large Language Models

Tomoya Yamashita, Akira Ito, Yuuki Yamanaka, Masanori Yamada, Takayuki Miura, Toshiki ShibaharaarXiv 2025 · DOI

Introduction

As Large Language Models (LLMs) are increasingly integrated into sensitive applications, the ability to remove specific information—due to privacy regulations like GDPR or copyright concerns—has become a critical necessity. While the ideal solution is to retrain models from scratch without the offending data, the prohibitive cost of retraining has led researchers to develop approximate unlearning methods.

However, existing techniques like Gradient Ascent (GA) and Negative Preference Optimization (NPO) often act as mere "gag orders." They suppress the model's ability to output target knowledge while leaving the underlying factual information intact within the model's internal representations. This paper introduces a novel approach using Sparse Autoencoders (SAEs) to directly edit these internal states, achieving genuine erasure rather than simple output suppression.

The Suppression Problem: Muting is Not Forgetting

Traditional unlearning methods typically penalize the model for generating specific tokens related to a target entity. While this effectively mutes the response, the knowledge remains embedded in the model's weights and can often be recovered through adversarial attacks. Furthermore, these methods lack a stable "ideal state" to optimize toward, which frequently leads to catastrophic model collapse where the model loses general reasoning capabilities.

To quantify this, the authors utilize the "Attribute Rate" metric—a measure of how many target-related tokens can be projected directly from internal activations. Their findings reveal that suppression-based methods leave this rate virtually unchanged in deeper layers, proving that the model still "knows" the facts it is being told to hide.

Methodology: SAE-Guided Representation Steering

To move beyond suppression, the proposed method leverages Sparse Autoencoders (SAEs). SAEs decompose the dense, polysemantic activations of an LLM into a sparse, interpretable latent space. This allows for the identification of specific dimensions that correspond to high-level concepts.

Conceptual overview of SAE-guided unlearning vs. suppression-based methods.

The unlearning process follows two primary steps:

  1. Identifying Recognition Latents: By comparing activations for well-known entities (from Wikipedia) against genuinely unknown or fictitious entities (from the TOFU dataset), the authors isolate "recognition latents" that fire when the model identifies a known concept and "unknown latents" that fire when it encounters something unfamiliar.
  2. Steering Internal Representations: The model is fine-tuned using a bounded hinge-style loss function. This objective explicitly suppresses the "known" latents and enhances the "unknown" latents for the target entity. By steering the model's internal state to mimic its natural reaction to an unfamiliar concept, the method achieves more stable and effective unlearning.

Experimental Evaluation

The method was evaluated on Llama3.1-8B Instruct and Gemma2-9B Instruct using the Real-World Knowledge Unlearning (RWKU) dataset. This dataset includes over 13,000 probes, ranging from simple question-answering to complex adversarial attacks, to ensure robust forgetting. General utility was monitored using standard benchmarks like MMLU, BBH, and TruthfulQA to ensure the unlearning process did not degrade the model's overall performance.

Results and Discussion

The proposed SAE-guided method demonstrated significant improvements over state-of-the-art baselines in both forgetting efficacy and utility preservation.

Comparative performance of unlearning methods across Llama3.1-8B and Gemma2-9B.

Key Findings:

  • Superior Forgetting: On Llama3.1-8B, the method achieved a mean "forget score" of 46.8%, outperforming GA (65.5% - 69.1%) and RMU (56.9% - 79.2%). Lower scores indicate more successful removal of target knowledge.
  • Utility Preservation: Due to the bounded nature of the loss function, the method avoids the instability common in GA. Retain scores and general utility metrics (like MMLU and fluency) remained nearly identical to the original model.
  • Deep Erasure: Analysis of the internal layers showed a drastic reduction in the Attribute Rate, confirming that the factual footprint was scrubbed from the model's internal weights rather than just being masked at the output layer.

Conclusion

By shifting the focus from output suppression to internal representation steering, this research provides a more robust and stable framework for LLM unlearning. While the method currently focuses on individual entities and does not reach a perfect 0% forget score, it represents a significant step toward achieving "true" forgetting in large-scale neural networks. Future work will explore extending this technique to abstract concepts and broader categories of sensitive information.

Summary updated

BibTeX
@misc{yamashita2025sparse,
  author = {Tomoya Yamashita and Akira Ito and Yuuki Yamanaka and Masanori Yamada and Takayuki Miura and Toshiki Shibahara},
  title = {{Sparse-Autoencoder-Guided Internal Representation Unlearning for Large Language Models}},
  year = {2025},
  eprint = {2509.15631},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.15631},
}
Figure