Abstract
Diffusion models often inadvertently learn undesirable concepts, including copyrighted artistic styles, specific individuals, and inappropriate content. Traditional unlearning methods are hindered by the architectural properties of neural networks, specifically polysemanticity and feature splitting. We present SAEmnesia, a supervised Sparse Autoencoder (SAE) framework that enforces "feature centralization"—a one-to-one mapping between a semantic concept and a single latent neuron. By steering these centralized latents with a negative multiplier during inference, we can surgically erase target concepts with minimal collateral damage. SAEmnesia achieves a 96.7% reduction in search complexity and sets a new state-of-the-art on the UnlearnCanvas benchmark with a 91.51% average score.
Introduction: The Challenge of Concept Unlearning
While diffusion models are highly capable, controlling their output to avoid generating copyrighted or harmful content remains a significant challenge. "Unlearning" specific concepts is difficult because features are typically represented in a distributed and overlapping manner:
- Polysemanticity: A single neuron may respond to multiple unrelated concepts (e.g., a neuron firing for both "cats" and "knitted textures").
- Feature Splitting: A single concept is often distributed across a vast array of neurons.
Existing mechanistic approaches using unsupervised SAEs attempt to identify these features post-hoc. However, because features are split, researchers must search through massive combinations of neurons to find the correct set to disable. This process is computationally expensive and frequently leads to "collateral damage," where the erasure of one concept degrades the quality of unrelated generations.
Methods: The SAEmnesia Framework
SAEmnesia addresses these issues by supervising the SAE training process to ensure that each target concept is mapped to exactly one neuron. The training involves a two-phase approach:
- Phase 1 (Unsupervised): A baseline sparse representation of the diffusion model's internal activations is established.
- Phase 2 (Supervised): The SAE is fine-tuned using labeled data from a prompts corpus. Two primary loss functions are employed: Concept Assignment (CA) Loss, which binds a specific concept to a designated latent neuron, and a Decorrelation (DC) Constraint, which ensures that neurons representing distinct categories (e.g., objects vs. styles) do not co-activate.
During inference, unlearning is achieved by applying a negative multiplier to the single neuron responsible for the target concept. This "flips the switch," steering the model away from the unwanted content without requiring full model retraining.
Key Results and Performance
SAEmnesia demonstrates significant improvements over prior state-of-the-art methods like SAeUron. On the UnlearnCanvas benchmark (comprising 20 objects and 50 styles), the model achieved a 91.51% average score, representing a 9.2% improvement over previous mechanistic approaches.
Efficiency and Scalability
A major advantage of feature centralization is the drastic reduction in hyperparameter search space. Because each concept is mapped to a known neuron, the search space for inference-time intervention is reduced by 96.7%. Furthermore, SAEmnesia excels at sequential unlearning. In tasks requiring the removal of nine objects in succession, it improved accuracy by 28.4% over baselines, as the surgical nature of the interventions prevents the accumulation of errors.
Safety Benchmarking
On the I2P (Inappropriate Image Prompts) benchmark for nudity removal, a variant using two neurons (SAEMNESIA-TOP2) reduced detections to just 9, compared to 18 for the previous best method, highlighting its effectiveness for safety alignment.
Discussion and Future Work
While SAEmnesia provides a principled approach to unlearning, some limitations remain. Highly imbalanced concepts may require more than one neuron to represent fully. Additionally, "blended" concepts—where an object's identity is tied closely to its texture (e.g., flames)—remain difficult to disentangle perfectly. Future research will focus on scaling these techniques to larger generative models and developing richer benchmarks for complex concept interactions.
Conclusion
By prioritizing feature centralization through supervised SAEs, SAEmnesia transforms concept unlearning from a complex optimization problem into a controllable, interpretable, and highly efficient process. This work paves the way for safer and more customizable generative AI.
Summary updated