MACE: Mass Concept Erasure in Diffusion Models
Shilin Lu, Zilan Wang, Leyang Li, Yanzhu Liu, Adams Wai-Kin Kong
TL;DR
MACE tackles the challenge of erasing large sets of concepts from text-to-image diffusion models without sacrificing generation quality or preserving unrelated content. It combines closed-form cross-attention refinement to remove residual concept information from co-occurring words with per-concept LoRA modules and a non-interfering fusion objective, augmented by concept-focal importance sampling to maintain specificity. Across object, celebrity, explicit content, and artistic style erasure tasks, MACE achieves superior generality-specialty balance and scales to up to 100 concepts, outperforming prior methods. This approach offers a practical pathway to safer and more controllable diffusion-based content generation for real-world services, while acknowledging scalability limits and outlining directions for further scaling and robustness.
Abstract
The rapid expansion of large-scale text-to-image diffusion models has raised growing concerns regarding their potential misuse in creating harmful or misleading content. In this paper, we introduce MACE, a finetuning framework for the task of mass concept erasure. This task aims to prevent models from generating images that embody unwanted concepts when prompted. Existing concept erasure methods are typically restricted to handling fewer than five concepts simultaneously and struggle to find a balance between erasing concept synonyms (generality) and maintaining unrelated concepts (specificity). In contrast, MACE differs by successfully scaling the erasure scope up to 100 concepts and by achieving an effective balance between generality and specificity. This is achieved by leveraging closed-form cross-attention refinement along with LoRA finetuning, collectively eliminating the information of undesirable concepts. Furthermore, MACE integrates multiple LoRAs without mutual interference. We conduct extensive evaluations of MACE against prior methods across four different tasks: object erasure, celebrity erasure, explicit content erasure, and artistic style erasure. Our results reveal that MACE surpasses prior methods in all evaluated tasks. Code is available at https://github.com/Shilin-LU/MACE.
