Abstract
The rapid expansion of large-scale text-to-image diffusion models has raised concerns regarding their potential misuse in creating harmful or misleading content. We introduce MACE, a finetuning framework for MAss Concept Erasure. MACE aims to prevent models from generating images of unwanted concepts when prompted. Unlike existing methods restricted to fewer than five concepts, MACE scales to 100 concepts while balancing generality (erasing synonyms) and specificity (preserving unrelated concepts). By leveraging closed-form cross-attention refinement and LoRA finetuning, MACE eliminates undesirable information without mutual interference between concepts.
Introduction: The Scaling Wall in Concept Erasure
Large-scale text-to-image (T2I) models like Stable Diffusion are often trained on unfiltered web-scraped data, leading to the memorization of copyrighted artworks, celebrity likenesses, and explicit content. While "concept erasure" aims to patch these models post-training, existing methods face a "scaling wall." Most current techniques struggle to handle more than a handful of concepts before generative quality collapses or "catastrophic forgetting" occurs. Furthermore, achieving a balance between generality—erasing synonyms like "aircraft" when "airplane" is targeted—and specificity—preserving unrelated but similar concepts—remains a significant challenge.
Methodology: A Three-Pronged Approach
MACE addresses mass erasure through three key technical innovations:
1. Closed-Form Cross-Attention Refinement
Information about a target concept often "leaks" into the embeddings of surrounding words. For example, in the prompt "a photo of a puppy," the word "photo" may carry residual "puppy" information. MACE uses a closed-form mathematical solution to refine cross-attention layers, mapping these residual traces to generic background concepts like "sky" or "ground."
2. Target Concept Erasure with LoRA
Instead of full-model finetuning, MACE trains a lightweight Low-Rank Adaptation (LoRA) module for each concept. To maintain the model's general knowledge, the authors introduce Concept-Focal Importance Sampling (CFIS). This technique focuses training on later denoising stages (low noise), which define specific details, while leaving early stages (defining general layout) untouched.
3. Multi-LoRA Fusion
To combine up to 100 different LoRAs without interference, MACE employs a closed-form fusion objective. This ensures the integrated model forgets all target concepts while maintaining the integrity of unrelated ones, preventing the "forgetting signals" from different LoRAs from canceling each other out.
Evaluation and Results
MACE was evaluated across four tasks: object erasure, celebrity erasure, explicit content erasure, and artistic style erasure.
- Massive Scaling: MACE maintained high efficacy and specificity even when erasing 100 concepts simultaneously, whereas performance in baseline methods typically degraded after 10 concepts.
- Object Erasure: On CIFAR-10, MACE achieved a harmonic mean of 92.61% (balancing efficacy, specificity, and generality), significantly outperforming UCE (85.48%) and ESD-u (83.69%).
- Explicit Content: MACE reduced detected explicit content in the I2P dataset to 111 instances, down from 743 in the original Stable Diffusion v1.4.
- Visual Integrity: Qualitatively, MACE produces natural-looking "replacement" images. For instance, when erasing a celebrity, it generates a generic person rather than a distorted artifact.
Conclusion
MACE represents a significant step forward in AI safety and copyright protection for diffusion models. By successfully scaling concept erasure to 100 items while maintaining a precise balance between generality and specificity, it provides a robust framework for post-training model alignment. Future work will focus on scaling to thousands of concepts and reducing dependence on external segmentation models.
Summary updated