TL;DR
This paper introduces a novel method for removing undesirable concepts (like harmful content) from text-to-image diffusion models. Instead of just trying to erase the bad stuff, their "Adversarial Preservation" technique intelligently identifies and preserves concepts that are most sensitive to the erasure process, leading to better overall model performance and reduced side effects.
What Problem Does This Paper Address?
Diffusion models, like Stable Diffusion, are incredibly powerful for generating images from text. However, because they're trained on vast, unfiltered internet data, they can inadvertently learn and generate harmful or undesirable content (e.g., hate speech, explicit material). While methods exist to "erase" these concepts, a major challenge is that removing one concept can negatively impact the model's ability to generate other, unrelated concepts. Previous approaches often try to balance this by preserving neutral concepts or limiting parameter changes, but this trade-off remains difficult to manage effectively.
Methods
The core of this paper is the Adversarial Preservation method. The key idea is to move beyond simply erasing a target concept and instead focus on preserving the concepts that are most affected by the erasure process.
Here's how it works:
- Identify Sensitive Concepts: During the fine-tuning process, the model actively searches for "adversarial concepts" – those concepts whose generation quality is most degraded when the target concept is being erased.
- Preserve Adversarial Concepts: The method then incorporates a loss term that specifically aims to preserve these identified sensitive concepts. This is done by ensuring that the model's output for these sensitive concepts remains similar to its output before erasure.
- Adversarial Learning: The process uses an adversarial learning framework. It simultaneously tries to erase the target concept (by making its output similar to a neutral concept) and preserve the identified adversarial concepts.
- Efficient Search: To find these adversarial concepts efficiently, the authors propose a method that uses Gumbel-Softmax to sample from a distribution over concept embeddings, allowing for a differentiable search within the concept space.
Datasets
- Stable Diffusion v1.4: Used as the foundation model for experiments.
- Imagenette: A subset of ImageNet used for experiments involving erasing object-related concepts. The authors specifically used it to erase sets of 5 object classes simultaneously.
- I2P prompts: Used to generate NSFW content for evaluating the mitigation of unethical content.
- COCO 30K prompts: Used for evaluating the preservation performance in the NSFW content erasure task.
Key Insights and Ideas
- Neutral concepts aren't always optimal: The paper empirically shows that simply preserving a neutral concept (like "a photo") isn't sufficient. Related concepts are often more sensitive to erasure than neutral ones, and preserving them directly leads to better results.
- Sensitivity spectrum: Erasing a concept creates a "sensitivity spectrum" for other concepts. Some are highly affected (e.g., "men" and "women" when erasing "nudity"), while others are barely touched. Identifying these sensitive concepts is crucial.
- Adversarial concepts are key: The core insight is that by identifying and preserving the most affected concepts (the "adversarial concepts"), the model can achieve stable erasure with minimal impact on overall generation quality.
- Concept collapse: When multiple concepts are erased simultaneously using a single neutral concept as a target, the erased concepts can sometimes collapse into a similar form, highlighting the complexity of concept interactions.
Key Results
- Object Erasure: The proposed method achieved high Erasing Success Rates (ESR-1: 98.6%, ESR-5: 96.1%) while significantly outperforming baselines in Preserving Success Rates (PSR-1: 55.2%, PSR-5: 79.9%), especially compared to methods that achieved high erasure but poor preservation.
- NSFW Content Mitigation: The method achieved the lowest NER (Not-Safe-For-Work) scores across various thresholds (e.g., NER-0.3: 3.64%), indicating superior performance in erasing unethical content. It also maintained competitive FID scores, showing good preservation.
- Artistic Style Erasure: The method achieved the best CLIP alignment score for erasing artistic styles (21.57), outperforming ESD (23.56), while maintaining comparable preservation performance.
Limitations and Future Work
- Computational Cost: Searching for adversarial concepts can be computationally expensive, especially with large concept spaces. The paper uses approximations and subsets to mitigate this.
- Metric Limitations: The paper notes that while CLIP alignment score is a good metric for concept inclusion, it has limitations, particularly for NSFW content where CLIP's training data is less comprehensive. Developing better evaluation metrics is suggested.
- Future Directions: The authors suggest exploring simultaneous searching for multiple sensitive concepts and investigating divergence constraints for more complex erasure scenarios. The connection to adversarial machine learning opens avenues for further research.
Summary updated