MACE: Mass Concept Erasure in Diffusion Models

Shilin Lu, Zilan Wang, Leyang Li, Yanzhu Liu, Adams Wai-Kin Kong
3/10/2024
cs.CVcs.AIcs.LG

Official code: Shilin-LU/MACE (393 stars, last commit 2026-04-03).

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.

View on arXivView PDF

Code Implementations(1)

Shilin-LU/MACEOfficial100%

[CVPR 2024] "MACE: Mass Concept Erasure in Diffusion Models" (Official Implementation)

39332Python, Jupyter NotebookFeb 27, 20246 months agoNOASSERTION
diffusion-modelsgenerative-aistable-diffusiontext-to-image

Cite this paper

@article{lu2024mace,
  title  = {MACE: Mass Concept Erasure in Diffusion Models},
  author = {Shilin Lu and Zilan Wang and Leyang Li and Yanzhu Liu and Adams Wai-Kin Kong},
  year   = {2024},
  eprint = {2403.06135},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.06135v1},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.06135.svg)](https://codeofpaper.com/paper/2403.06135)

Discussion