Abstract
Text-to-image (T2I) diffusion models have demonstrated remarkable generative capabilities but often inadvertently internalize sensitive or copyrighted content. Existing concept erasure techniques typically rely on linear fine-tuning of cross-attention layers, which often results in "concept bleaching"—the unintended degradation of unrelated or similar concepts. We present the Concept Pinpoint Eraser (CPE), a novel framework that utilizes nonlinear Residual Attention Gates (ResAGs) to achieve surgical precision in concept removal. By combining ResAGs with attention anchoring and adversarial training, CPE effectively erases target concepts while maintaining the model’s original creative integrity and robustness against prompt-based attacks.
Introduction
As text-to-image (T2I) models like Stable Diffusion become increasingly integrated into creative workflows, the risk of generating copyrighted characters, trademarked artistic styles, or explicit (NSFW) content grows. While various methods have been proposed to "erase" these concepts, they frequently suffer from a fundamental trade-off: either the erasure is incomplete, or the model's performance on benign prompts is significantly compromised.
Current state-of-the-art methods generally involve fine-tuning the model's cross-attention layers. However, this research identifies a critical limitation in this approach. Mathematically, updating these weights is equivalent to adding a linear module to the existing weight matrix. Because concepts within a high-dimensional model often share overlapping feature distributions, these linear updates act as a "blunt instrument," shifting weights that are also responsible for unrelated creative knowledge. This leads to the "bleaching" effect, where erasing a specific artist like "Claude Monet" might inadvertently diminish the model's ability to render general landscapes or portraits because the underlying weights were shifted too broadly.
The CPE Framework: Surgical Concept Erasure
To overcome the limitations of linear fine-tuning, the Concept Pinpoint Eraser (CPE) introduces a nonlinear architecture designed for precision. The framework consists of three primary innovations:
1. Residual Attention Gates (ResAGs)
Instead of modifying the original model weights, CPE introduces a lightweight, nonlinear "gate" module. This ResAG acts as an intelligent switch that monitors incoming text tokens. It is trained to activate only when it detects the specific target concept. When the gate is closed (for unrelated prompts), the original model output passes through untouched. When the target concept is detected, the gate applies a specific modification to "cut" the concept from the output. This modular approach ensures that the base model's knowledge remains intact for all non-target queries.
2. Attention Anchoring Loss
To prevent the ResAG from accidentally triggering for "innocent" concepts that share semantic similarities with the target, the authors implement an Attention Anchoring Loss. By identifying "anchor concepts"—such as other celebrities or styles generated via LLMs like ChatGPT—the model is explicitly trained to minimize any divergence from the original output when these anchors are present. This ensures that erasing a specific target does not degrade similar but permissible concepts.
3. Robust Erasure via Adversarial Residual Embeddings (RARE)
Standard erasure methods are often vulnerable to "attack prompts" where users describe a concept's features (e.g., "a man with a cape and a bat mask") without using the protected name. CPE addresses this through Robust Erasure via Adversarial Residual Embeddings (RARE). This iterative adversarial training strategy searches for embeddings that successfully bypass the initial erasure and then retrains the ResAG to block these alternative pathways, ensuring the erasure is robust against sophisticated prompt engineering.
Experimental Evaluation
The researchers evaluated CPE across several challenging domains, including celebrities, artistic styles, and explicit content (using the I2P dataset).
- Erasure Efficacy: In celebrity erasure tasks involving 50 targets, CPE achieved a GIPHY Celebrity Detector (GCD) accuracy of 0.37%, a significant improvement over baselines like ESD-u (21.2%) and MACE (3.29%).
- Preservation Quality: When erasing 100 distinct artistic styles, CPE maintained a CLIP score of 28.95 for the remaining styles—virtually identical to the original Stable Diffusion (28.96). In contrast, competing methods showed noticeable drops in quality.
- Adversarial Robustness: Against the "Ring-A-Bell" adversarial attack, CPE maintained a 0% success rate for regenerating erased styles, whereas previous state-of-the-art methods allowed up to 28% leakage.
- Efficiency: The method is highly efficient, adding less than 0.01% additional parameters per concept. A concept can be erased in approximately 2 minutes, or 7 minutes with full adversarial robustness training.
Conclusion and Future Work
The Concept Pinpoint Eraser (CPE) represents a significant shift from linear weight modification to nonlinear gating in the field of model safety. By treating concept erasure as a surgical intervention rather than a global weight shift, CPE achieves a superior balance between safety and creative utility.
While highly effective, the authors note that the quality of preservation remains dependent on the diversity of the "anchor concept pool." Future work will explore more sophisticated merging logic for simultaneous multi-concept erasure and investigate whether other parts of the U-Net, such as self-attention or ResNet blocks, harbor residual concept information that could be further addressed.
Summary updated