TL;DR
This paper introduces SAGE, a novel method for "concept erasing" in diffusion models (DMs) that goes beyond simply removing specific words. SAGE explores the entire "concept domain" to prevent unsafe content generation while preserving the model's ability to create other, safe content. This is achieved through a cyclic self-check and self-erasure process, making DMs safer and more robust.
What Problem Does This Paper Address?
Diffusion models, while incredibly powerful for text-to-image generation, often inherit undesirable biases and sensitive content from their massive, web-scraped training datasets. This can lead to the generation of explicit, violent, or copyrighted material. Existing "concept erasing" techniques try to fix this by fine-tuning the model to "forget" specific concepts (like "nudity"). However, these methods often treat concepts as fixed words and repeatedly erase them, leading to a "word concept abyss" where the model can still generate unsafe content if prompted with variations or related terms (e.g., suggestive prompts or names of adult actors). This limitation prevents truly generalized concept-related erasure and leaves DMs vulnerable to generating harmful outputs.
Methods
SAGE tackles this problem with a multi-pronged approach:
- Semantic-Augment Erasing: Instead of targeting specific words, SAGE aims to erase the entire "concept domain." It achieves this through a cyclic "self-check and self-erasure" process. This involves:
- Attack Prompt Generation: Generating adversarial prompts that probe the boundaries of the target unsafe concept. This is done in an "inside-out" manner, starting from the concept itself and exploring its semantic space.
- DM Parameter Optimization: Using these adversarial prompts to fine-tune the DM, guiding it to unlearn the unsafe concept domain. This process iteratively refines both the prompts and the model's parameters.
- Global-Local Collaborative Retention: A key challenge in concept erasing is preventing the degradation of unrelated, desirable concepts. SAGE addresses this by:
- Global Semantic Relationship Alignment: Aligning the semantic relationships of irrelevant concepts between the original and the erased DM at a global level.
- Local Predicted Noise Preservation: Identifying concepts that experience significant semantic drift and applying targeted local noise preservation to maintain their generation quality. This mechanism expands the model's "receptive field" for irrelevant concepts.
Datasets
- Training: The paper mentions using the COCO dataset for training and evaluating the retention of unrelated concepts.
- Evaluation:
- Nudity Erasure: The Inappropriate Image Prompt (I2P) dataset was used for evaluating nudity erasure and robustness against attack prompts.
- Style Erasure: Prompts related to specific artistic styles (Van Gogh, Claude Monet) and a set of "other-style" prompts were used.
- General Concepts: The COCO dataset was used to evaluate the preservation of common concepts.
Key Insights and Ideas
- Concept Domain vs. Word Concept: The core insight is that unsafe concepts are not just single words but entire semantic domains. Erasing only words leaves loopholes. SAGE's approach of exploring the "boundaries" of this domain is crucial for robust erasure.
- Self-Check and Self-Erase: The cyclic adversarial training between prompt generation and model optimization is a clever way to make the model "police itself" and discover its own vulnerabilities.
- Balancing Erasure and Retention: The global-local retention mechanism is vital. It highlights that effective safety solutions must not come at the cost of the model's general utility and ability to generate diverse content.
- Inside-Out Attack Prompt Generation: This is a novel approach to generating adversarial prompts, potentially more efficient than "outside-in" methods that rely heavily on multi-step denoising.
Key Results
- Nudity Erasure: SAGE achieved a 98.01% reduction in nudity generation probability, significantly outperforming other methods. It also demonstrated the highest robustness against attack prompts (lowest ASR).
- Style Erasure: SAGE effectively erased target artistic styles (Van Gogh, Claude Monet) while maintaining strong retention of other styles.
- General Concept Retention: SAGE showed superior performance in preserving the generation quality and semantic consistency of common concepts compared to other methods, which often suffered from "forgetting."
- Training Efficiency: SAGE was significantly faster than comparable methods like AdvUnlearn, with a 62.1x speedup in attack prompt generation and a 6.8x improvement in overall training time.
- Cross-Model Transferability: The trained text encoder from SAGE could be transferred to other diffusion models (e.g., SDXL variants) to reduce unsafe content generation without full retraining.
Limitations and Future Work
- Limitations:
- The paper acknowledges that while SAGE significantly reduces unsafe content, it doesn't guarantee 100% elimination, as evidenced by a small percentage of inappropriate generations in some cases.
- The "word concept abyss" is a persistent challenge, and while SAGE addresses it effectively, the inherent complexity of language and concepts means continuous research is needed.
- Future Work:
- The authors suggest that the framework can be extended to other types of unsafe content beyond nudity and artistic styles.
- The efficient and transferable nature of the trained text encoder opens avenues for broader applications in making various diffusion models safer.
- Further research into more sophisticated adversarial prompt generation and retention mechanisms could lead to even more robust and versatile concept erasing solutions.
Summary updated