Concept Pinpoint Eraser for Text-to-image Diffusion Models via Residual Attention Gate

Byung Hyun Lee, Sungjin Lim, Seunggyu Lee, Dong Un Kang, Se Young Chun
6/28/2025
cs.CVcs.LG

Official code: Hyun1A/CPE (13 stars, last commit 2025-04-07).

Abstract

Remarkable progress in text-to-image diffusion models has brought a major concern about potentially generating images on inappropriate or trademarked concepts. Concept erasing has been investigated with the goals of deleting target concepts in diffusion models while preserving other concepts with minimal distortion. To achieve these goals, recent concept erasing methods usually fine-tune the cross-attention layers of diffusion models. In this work, we first show that merely updating the cross-attention layers in diffusion models, which is mathematically equivalent to adding \emph{linear} modules to weights, may not be able to preserve diverse remaining concepts. Then, we propose a novel framework, dubbed Concept Pinpoint Eraser (CPE), by adding \emph{nonlinear} Residual Attention Gates (ResAGs) that selectively erase (or cut) target concepts while safeguarding remaining concepts from broad distributions by employing an attention anchoring loss to prevent the forgetting. Moreover, we adversarially train CPE with ResAG and learnable text embeddings in an iterative manner to maximize erasing performance and enhance robustness against adversarial attacks. Extensive experiments on the erasure of celebrities, artistic styles, and explicit contents demonstrated that the proposed CPE outperforms prior arts by keeping diverse remaining concepts while deleting the target concepts with robustness against attack prompts. Code is available at https://github.com/Hyun1A/CPE

View on arXivView PDF

Code Implementations(1)

Hyun1A/CPEOfficial100%

[ICLR 2025] Official PyTorch Implementation for CPE: Concept Pinpoint Eraser for Text-to-image Diffusion Models via Residual Attention Gate

130Shell, PythonOct 2, 20241 years ago

Similar Papers

Cite this paper

@article{lee2025concept,
  title  = {Concept Pinpoint Eraser for Text-to-image Diffusion Models via Residual Attention Gate},
  author = {Byung Hyun Lee and Sungjin Lim and Seunggyu Lee and Dong Un Kang and Se Young Chun},
  year   = {2025},
  eprint = {2506.22806},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.22806v1},
  journal = {ICLR 2025 2025}
}

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/2506.22806.svg)](https://codeofpaper.com/paper/2506.22806)

Discussion