Abstract
Text-to-image diffusion models (DMs) often inadvertently generate copyrighted styles, biased imagery, or explicit content. While Machine Unlearning (MU) aims to mitigate these issues without full retraining, existing methods typically rely on "black-box" fine-tuning that is prone to adversarial bypass and lacks transparency. We introduce SAeUron, a novel framework that leverages Sparse Autoencoders (SAEs) to identify and ablate human-interpretable features within a model's internal activations. By intervening in the latent space rather than modifying model weights, SAeUron achieves state-of-the-art unlearning performance, demonstrates superior robustness against adversarial attacks, and allows for the simultaneous removal of dozens of concepts with minimal impact on overall model quality.
1. Introduction
As diffusion models become central to creative workflows, the ability to surgically remove specific concepts—such as the style of a living artist or Not-Safe-For-Work (NSFW) content—has become a critical requirement. Traditional unlearning approaches often utilize negative gradient fine-tuning to "erase" concepts. However, these methods suffer from two primary limitations: they are non-interpretable, providing no insight into what the model has actually forgotten, and they are fragile. Recent studies show that adversarial prompts can often bypass these filters, revealing that the concept was merely masked rather than removed.
SAeUron addresses these challenges by moving from weight-based fine-tuning to feature-based intervention. By using Sparse Autoencoders to decompose complex activations into sparse, monosemantic features, we can precisely locate and neutralize the internal representations of specific concepts.
2. Methodology
2.1 SAE Training and Feature Localization
SAeUron utilizes a BatchTopK SAE trained on the internal activations of cross-attention blocks within Stable Diffusion. A key innovation in our training process is the inclusion of activations from all 50–100 denoising timesteps. This allows the SAE to capture the temporal evolution of a concept as it transforms from initial Gaussian noise into a coherent image.
To identify target features (e.g., "Picasso" or "Nudity"), we employ a specialized scoring function. This function isolates SAE latents that activate strongly in the presence of the target concept but remain inactive during the generation of unrelated content.
2.2 Interpretable Intervention
During the inference process, the model’s activations are passed through the SAE encoder. The identified concept-specific latents are then "ablated"—scaled by a negative multiplier to suppress their influence. These modified features are passed through the SAE decoder and reintegrated into the diffusion process. Crucially, this method requires no changes to the base model's weights, acting instead as a lightweight, interpretable filter on the model's internal "logic."
3. Experimental Setup
We evaluated SAeUron across several rigorous benchmarks:
- UnlearnCanvas: A benchmark featuring 20 objects and 50 artistic styles to test unlearning efficacy and concept retention.
- I2P (Inappropriate-to-Prompt): A dataset of ~4,700 prompts used to evaluate the removal of NSFW content.
- COCO 2014: Used to establish baseline quality metrics, including FID and CLIPScore, ensuring that unlearning does not degrade general image synthesis capabilities.
4. Key Results
4.1 State-of-the-Art Unlearning
On the UnlearnCanvas benchmark, SAeUron achieved a 94.03% average unlearning score, significantly outperforming existing methods such as ESD (77.61%) and UCE (62.45%). In NSFW removal tests using the I2P benchmark, SAeUron reduced inappropriate generations from 743 (in the base SD v1.4 model) to just 18, a result that surpasses all current baseline methods.
4.2 Adversarial Robustness
One of SAeUron’s most significant advantages is its resilience to adversarial attacks. When subjected to UnlearnDiffAtk, competing methods often saw their unlearning accuracy drop by 40–60% as the attack found "loopholes" in the fine-tuned weights. Because SAeUron filters the internal signals necessary to construct the concept, it remained highly robust, showing only negligible performance degradation under attack.
4.3 Efficiency and Scalability
SAeUron is highly efficient, requiring only 0.2 GB of storage for intervention parameters, compared to the 4GB+ required for a full model checkpoint. Furthermore, it excels at multi-concept unlearning; the system can successfully remove 49 out of 50 styles simultaneously with almost no impact on the quality of the remaining style.
5. Interpretability and Discussion
The SAE latents identified by SAeUron are remarkably monosemantic. Features correspond to specific visual elements like "waterfalls," "rabbit ears," or "dog heads," which can be automatically annotated using LLMs like GPT-4o. This transparency allows developers to verify exactly which "thoughts" the model is suppressing.
5.1 Limitations
Despite its strengths, SAeUron introduces a minor 1.92% slowdown in image generation due to the additional SAE inference step. Additionally, it requires "white-box" access to model activations, making it inapplicable to closed-source APIs. Finally, while highly effective for visual objects and styles, the method currently struggles with highly abstract concepts (e.g., "harassment") that may not have a singular, distinct visual feature signature.
6. Conclusion
SAeUron represents a shift toward more transparent and robust machine unlearning. By leveraging the interpretability of Sparse Autoencoders, it provides a surgical means of concept removal that resists adversarial manipulation and scales efficiently, offering a promising path toward safer and more controllable generative AI.
Summary updated