Abstract
The widespread adoption of text-to-image (T2I) diffusion models has raised concerns about their potential to generate copyrighted, inappropriate, or sensitive imagery learned from massive training corpora. As a practical solution, machine unlearning aims to selectively erase unwanted concepts from a pre-trained model without retraining from scratch. While most existing methods are effective for single-concept unlearning, they often struggle in real-world scenarios that require removing multiple concepts, since extending them to this setting is both non-trivial and problematic, causing significant challenges in unlearning effectiveness, generation quality, and sensitivity to hyperparameters and datasets. In this paper, we take a unique perspective on multi-concept unlearning by leveraging model sparsity and propose the Forget It All (FIA) framework. FIA first introduces Contrastive Concept Saliency to quantify each weight connection's contribution to a target concept. It then identifies Concept-Sensitive Neurons by combining temporal and spatial information, ensuring that only neurons consistently responsive to the target concept are selected. Finally, FIA constructs masks from the identified neurons and fuses them into a unified multi-concept mask, where Concept-Agnostic Neurons that broadly support general content generation are preserved while concept-specific neurons are pruned to remove the targets. FIA is training-free and requires only minimal hyperparameter tuning for new tasks, thereby promoting a plug-and-play paradigm. Extensive experiments across three distinct unlearning tasks demonstrate that FIA achieves more reliable multi-concept unlearning, improving forgetting effectiveness while maintaining semantic fidelity and image quality.
Introduction
Text-to-image (T2I) diffusion models like Stable Diffusion are trained on massive, uncurated internet datasets, meaning they inevitably memorize and can generate copyrighted, inappropriate, or harmful imagery. Machine unlearning attempts to selectively erase these specific concepts without the prohibitive cost of retraining the model from scratch.
While current unlearning methods work reasonably well for erasing a single concept, they struggle in real-world scenarios where multiple concepts need to be removed. When existing methods are applied to multiple concepts, they either fail to erase them all, accidentally restore previously forgotten concepts, or cause catastrophic damage to the model's ability to generate normal, unrelated images. Furthermore, most existing methods require computationally expensive fine-tuning and complex hyperparameter tweaking.
The FIA Framework
The authors propose Forget-It-All (FIA), a training-free framework that leverages model sparsity to unlearn concepts via targeted neuron masking. The pipeline works in three main steps:
- Contrastive Concept Saliency: To find out which neurons are responsible for a concept, FIA compares how neurons activate when given a concept prompt (e.g., "a golf ball on a table") versus a base prompt (e.g., "a table"). This isolates the neurons reacting specifically to the target concept rather than the background.
- Identifying Concept-Sensitive Neurons: FIA tracks these saliency scores across the diffusion model's denoising timesteps (temporal sparsity) and ranks them across network channels (spatial sparsity). This ensures only the most consistently and strongly active neurons for a specific concept are targeted.
- Multi-Concept Mask Fusion: If you naively combine the pruning masks for multiple concepts, you end up deleting neurons that are vital for general image formation. FIA solves this by identifying Concept-Agnostic Neurons—neurons that light up for a large fraction of the target concepts. Because these neurons are generalists rather than specialists, FIA explicitly protects them and only prunes the truly concept-specific neurons.
Experimental Evaluation
FIA was evaluated across three distinct unlearning tasks:
- Multi-Object Unlearning: On the Imagenette dataset, FIA reduced generation accuracy for 10 classes to just 1.9% (from 90.3%), while maintaining high quality for unrelated images.
- Explicit Content Unlearning: On the I2P benchmark, FIA reduced NudeNet detections from 743 to 32, outperforming both fine-tuning and training-free baselines.
- Artistic Style Unlearning: Tested on five famous artists (Van Gogh, Monet, Picasso, Da Vinci, Dali), FIA successfully removed stylistic signatures while retaining general generative capabilities.
Key Insights
- Sparsity is Powerful: Pruning under 0.3% of neurons can completely eradicate a concept's visual representation.
- Protecting Generalists: The "Concept-Agnostic Ratio" is the key to scaling unlearning. By realizing that a neuron firing for many targets is a foundational feature detector, FIA avoids the "lobotomy" effect common in other multi-concept methods.
- Efficiency: FIA is training-free and fast, taking only ~11 seconds to unlearn a concept with minimal GPU memory requirements.
Conclusion
FIA offers a practical, plug-and-play solution for multi-concept unlearning in diffusion models. While scalability remains a challenge for hundreds of concepts, FIA's masking approach provides a robust foundation for maintaining image quality while ensuring the removal of sensitive or copyrighted content.
Summary updated