Side Effects of Erasing Concepts from Diffusion Models

Shaswati Saha, Sourajit Saha, Manas Gaur, Tejas Gokhale · 2025

Read Side Effects of Erasing Concepts from Diffusion Models by Shaswati Saha, Sourajit Saha, Manas Gaur, Tejas Gokhale (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-15124.txt.

Introduction

Shaswati Saha and three co-authors show that erasing concepts from text to image models has side effects and can be bypassed. Concept erasure aims to block unwanted target concepts while keeping high quality generation of all else. Safety, privacy, and copyright concerns drive demand for such tools, yet their robustness was not well measured.

A new benchmark with hierarchical and compositional prompts quantifies side effects on three fronts. Neighboring concepts can be harmed, targets can be evaded, and attributes can leak into other outputs. Prompts that use class hierarchies, near synonyms, or recomposed attributes circumvent erasure in tests. An odd attention effect, either concentration or dispersal, also appears. The benchmark and tools are released for future work.

Catalog record

CREATORShaswati Saha, Sourajit Saha, Manas Gaur, Tejas Gokhale
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE62 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2508-15124

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Side Effects of Erasing Concepts from Diffusion Models Shaswati Saha, Sourajit Saha, Manas Gaur, Tejas Gokhale Abstract Concerns about text-to-image (T2I) generative models infringing on privacy, copyright, and safety have led to the development of Concept Erasure Techniques (CETs). The goal of an effective CET is to prohibit the generation of undesired “target” concepts specified by the user, while preserving the ability to synthesize high-quality images of the remaining concepts. In this work, we demonstrate that CETs can be easily circumvented and present several side effects of concept erasure. For a comprehensive measurement of the robustness of CETs, we present Side Effect Evaluation ( SEE ), an evaluation benchmark that consists of hierarchical and compositional prompts that describe objects and their attributes. This dataset and our automated evaluation pipeline quantify side effects of CETs across three aspects: impact on neighboring concepts, evasion of targets, and attribute leakage. Our experiments reveal that CETs can be circumvented by using superclass-subclass hierarchy and semantically similar prompts, such as compositional variants of the target. We show that CETs suffer from attribute leakage and counterintuitive phenomena of attention concentration or dispersal. We release our dataset, code, and evaluation tools to aid future work on robust concept erasure. 1 1 1 https://github.com/shaswati1/see.git 1 Introduction Text-to-image (T2I) diffusion models generate images based on text prompts Nichol et al. 2022 , harnessing the expressive power of natural language to create new images. Although T2I models generate photorealistic images, these models risk generating images that contain harmful and copyright-protected content since they are trained on large-scale data available online. The task of concept erasure has emerged as a solution to this, aiming to remove undesired target concepts from the knowledge of pre-trained models while preserving other capabilities. While there is much impetus to develop such concept erasure techniques (CETs), there is a gap in understanding the ability of these methods to safely remove a specific concept without degrading the ability to generate images of other concepts, which need to be preserved. In this work, we pursue the question: To what extent can CETs remove a target concept without introducing unintended side effects in T2I models? Figure 1 shows images generated by a state-of-the-art CET for prompts with objects and associated attributes, illustrating three types of side-effects that we study in this paper: impact on neighboring concepts, evasion of erasure, and attribute leakage. Our work highlights that existing evaluation metrics in concept erasure literature fail to identify these side effects, resulting in an incomplete picture of challenges in this task. This finding highlights the need for a dedicated benchmark to systematically quantify capabilities and limitations of CETs. Figure 1: We benchmark unintended side effects of CETs. Each column shows the concept to be erased, the text prompt, and the images generated before (top) and after (bottom) erasure. The tree shows the sub-graph in the hierarchy (parents and children) corresponding to the erased concept. We highlight the side effects: (1) Impact on neighboring concepts : erasing “car” does not erase the child concept “red car”, while erasing “red car” impacts the neighboring concept red bus . (2) Evasion of targets : erasing superclass “vehicle” can be circumvented through the subclasses (e.g., “car”) and corresponding attribute-based children (e.g., “red car”). (3) Attribute leakage : erasing “couch” leads to unintended leakage of the target attribute “blue” to unrelated concept “potted plant”. We develop the SEE dataset that contains compositional text prompts describing objects (e.g. “chair”) and attributes (e.g.“small red metallic chair”). SEE contains 5056 compositional prompts, built on commonly occurring MS-COCO Lin et al. 2014 objects categorized into 11 superclasses. We develop an automated evaluation pipeline that leverages this dataset to conduct a large-scale evaluation of the side effects of CETs. Using this approach, we evaluate four state-of-the-art CET methods: UCE Gandikota et al. 2024 , RECE Gong et al. 2024 , MACE Lu et al. 2024 , SPM Lyu et al. 2024 , applied to the Stable Diffusion Rombach et al. 2022 model. For each CET, we generate and evaluate four images per prompt, i.e., a large-scale evaluation of 20,224 images per model. Our experiments reveal several vulnerabilities of CETs. First, we find that all of the CETs fail to erase compositional concepts and unintentionally affect semantically adjacent concepts. While prior evaluation works show that CETs are effective at erasing the target, we found that CETs struggle to prevent generation of target in compositional scenarios. Second, we observe limited generalization across semantic hierarchies: even in the best-performing model in the evasion test, when superclasses are erased, subclass concepts continue to appear, evading the erasure operation in more than 80% of cases across six different categories. Third, we find evidence of increased attribute leakage ranging from 17.13% to 26.08% across models after erasure compared to the unedited model. Our analysis reveals artifacts in T2I diffusion models such as the edited model’s attention being dispersed across irrelevant regions in cases when erasure fails and the target concept appears in the generated image. We also show that progressive (one by one) erasure of multiple sub-concepts leads to more effective erasure of the target concept compared to erasing all sub-concepts simultaneously. This work is the first to quantify side-effects of concept erasure techniques in diffusion models. Our findings reveal the risk associated with the safety and efficacy of adopting CETs and the limitations of current evaluation techniques. 2 Related Work Concept Erasure Techniques The reliance of T2I models on large-scale internet data makes them susceptible to generating NSFW content Zhang et al. 2024b ; Schramowski et al. 2023 or copyrighted artistic styles Moayeri et al. 2024 ; Somepalli et al. 2023 . Concept erasure techniques (CETs) have emerged for selectively removing such undesired concepts from T2I generative models. One line of work aims to achieve this by fine-tuning the cross-attention layers of T2I diffusion models such as shifting the generation probability towards unconditional tokens ( Kim et al. 2023 ; Gandikota et al. 2023 ; Xu et al. 2023 ) , or replacing target with a destination concept ( Kumari et al. 2023 ; Heng and Soh 2024 ; Park et al. 2024 ; Huang et al. 2023 ; Zhang et al. 2024a ) . Other work has proposed closed-form solutions Arad et al. 2023 ; Meng et al. 2022a ; Gandikota et al. 2024 ; Lu et al. 2024 ; Gong et al. 2024 to edit T2I model’s knowledge by updating the text encoder or cross-attention layers. With increasing importance of CETs, an effective benchmark for evaluating concept erasure is missing – our work fills this gap with a large-scale dataset and an automated evaluation pipeline. Safety Mechanisms for T2I Models Red-teaming tools for T2I models ( Chin et al. 2023 ; Zhang et al. 2024b ) derive prompts that would provoke edited models into generating inappropriate content. Approaches for safe image generation include filtering training data and retraining the model Rombach 2022 ; Mishkin et al. 2022 , post-hoc auditing through safety checkers Leu et al. 2024 ; Rando et al. 2022 , or steering the inference away from inappropriate content Schramowski et al. 2023 . Our work complements these safety efforts by providing a robust evaluation of sanitized models and their ability to

Read the complete text