Receler: Reliable Concept Erasing of Text-to-Image Diffusion Models via Lightweight Erasers

Chi-Pin Huang, Kai-Po Chang, Chung-Ting Tsai, Yung-Hsuan Lai, Yu-Chiang Frank Wang · DOI

Introduction

Text-to-image diffusion models, trained on vast uncurated datasets, often memorize and reproduce problematic content, including NSFW imagery, violence, and copyrighted styles. Existing concept erasure methods struggle with two primary challenges: Robustness and Locality. Robustness refers to the "Cat-and-Mouse" problem where users bypass filters using paraphrased prompts (e.g., "woman without clothes" instead of "nudity"). Locality refers to "Collateral Damage," where erasing one concept (e.g., "cars") inadvertently degrades the model's ability to generate related but safe concepts (e.g., "trucks" or "airplanes").

Comparison of Receler against previous work in terms of robustness and locality.

The Receler Framework

Receler (Reliable Concept Erasing via Lightweight Erasers) addresses these issues through a lightweight, adapter-based approach. The architecture is built on three key pillars:

  • Lightweight Erasers: Instead of full U-Net fine-tuning, Receler introduces a tiny "Eraser" module (0.37% of total parameters) after each cross-attention layer. These modules are trained to predict "negatively guided noise," steering the model away from target concepts.
  • Concept-Localized Regularization: To maintain locality, Receler uses the model's internal attention maps to generate a mask. The eraser is restricted to modifying pixels where the target concept is located, preserving the rest of the image.
  • Adversarial Prompt Learning: To ensure robustness, Receler employs a "red-teaming" phase. It iteratively trains a "malicious" soft prompt to force the generation of forbidden concepts, then trains the Eraser to counteract these adversarial prompts.
Overview of the Receler training pipeline, featuring the Eraser module and adversarial prompt learning.

Experimental Results

The authors evaluated Receler using CIFAR-10 for object-level erasure, the Inappropriate Image Prompts (I2P) dataset for NSFW content, and COCO-30K for locality testing.

  • Superior Robustness: On CIFAR-10, Receler achieved a Harmonic Mean (H) score 11.2 points higher than the previous state-of-the-art (ESD), indicating a superior balance of erasure efficacy and locality.
  • NSFW Erasure: Against the I2P dataset, Receler achieved an 84.5% erasure ratio for nudity, outperforming UCE (75.9%) and ESD (81.3%).
  • Adversarial Resistance: When faced with learned attack prompts, Receler maintained a failure rate of only 13.7%, while competing methods failed up to 88% of the time.
  • Compositional Erasure: Multiple erasers can be combined (e.g., "Erase Dog" + "Erase Airplane") in a plug-and-play fashion without retraining.

Conclusion and Future Work

Receler demonstrates that effective concept erasure requires targeting the intersection of text and visual features (cross-attention) and defending against semantic variations through adversarial training. While the iterative training process adds some overhead, the resulting model is significantly more robust and precise. Future work may extend this localized regularization to abstract concepts and copyright-aware generation.

Summary updated

BibTeX
@inproceedings{huang2024receler,
  author = {Chi-Pin Huang and Kai-Po Chang and Chung-Ting Tsai and Yung-Hsuan Lai and Yu-Chiang Frank Wang},
  title = {{Receler: Reliable Concept Erasing of Text-to-Image Diffusion Models via Lightweight Erasers}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73661-2\_20},
}
Figure