TL;DR
Researchers have developed CoGFD, a framework designed to stop text-to-image models from generating inappropriate content that arises from combining otherwise "safe" concepts (like "kids" and "wine"). By using LLMs to map out semantic relationships and a novel feature-decoupling technique, CoGFD erases harmful combinations while keeping the individual, benign concepts intact and high-quality.
What Problem Does This Paper Address?
Current safety research for diffusion models focuses on erasing specific, high-risk "atoms"—single concepts like "nudity" or "violence." However, the authors identify a significant loophole: Concept Combination Erasing (CCE).
Inappropriate themes often emerge not from a single bad word, but from the intersection of harmless ones. For example, a model might be blocked from generating "illegal acts," but it might still happily generate "a child holding a cigarette" or "a toddler drinking beer."
The challenge is twofold:
- Theme Consistency: There are infinite ways to describe a harmful theme (e.g., "kids drink wine" vs. "minors consume alcohol"). Erasing one specific prompt isn't enough.
- Concept Disentanglement: If you try to erase the combination of "child" and "wine," you risk breaking the model's ability to generate a "child" or "wine" in any other (safe) context. Existing methods often "over-erase," leading to degraded image quality for benign prompts.
Methods
The authors propose the Concept Graph-based high-level Feature Decoupling (CoGFD) framework, which attacks the problem in two stages:
1. LLM-Induced Concept Logic Graphs
To solve the "Theme Consistency" problem, the authors use a multi-agent LLM setup (a Generator and a Reviewer). Given a seed theme like "underage drinking," the Generator identifies related concepts and combinations (e.g., "juvenile," "cocktail," "imbibe") and organizes them into a graph using logical relations like Equivalence, Inclusion, and Conjunction. The Reviewer then checks the graph for accuracy, ensuring the model targets the entire semantic neighborhood of the harmful theme.
2. High-Level Feature Decoupling
To solve "Concept Disentanglement," the authors leverage an observation about how diffusion models work: high-level structures and semantics are formed in the early stages of the denoising process (timesteps closer to $T$), while fine details are added later.
Instead of deleting concepts, CoGFD uses a gradient adversarial loss to "decouple" them. During fine-tuning, the model is pushed to:
- Increase the distance between the noise predicted for the combination (e.g., "kids + wine") and the original model's output (erasing the combination).
- Decrease the distance between the noise predicted for the individual concepts (e.g., just "kids" or just "wine") and the original model's output (preserving the individual concepts).
By targeting only the high-level feature timesteps ($t \in [750, 1000]$), they break the semantic link between the concepts without destroying the features themselves.
Datasets
The study utilizes three primary datasets:
- UnlearnCanvas: A benchmark for concept erasing containing 1,000 combinations of objects and artistic styles.
- COCO30K: 30,000 images used to evaluate the model's general generative capability after erasing.
- HarmfulCmb (New): A dataset introduced by the authors specifically for this task. It contains 10 inappropriate themes (e.g., "Underage Smoking," "Muslim & Pork," "Drunk Driving"), with each theme mapped to 100 distinct concept combinations.
Key Insights and Ideas
- Decoupling vs. Deleting: The most powerful insight is that you don't need to "forget" what a child looks like to stop a model from showing a child smoking. You only need to break the co-occurrence of their high-level features.
- The "Early Stage" Matters: By focusing fine-tuning on the very beginning of the denoising process, the authors found they could effectively erase complex meanings while leaving the model's ability to render textures and shapes (low-level features) untouched.
- LLMs as Semantic Mapmakers: Using LLMs to build a "logic graph" allows for a much more systematic approach to safety than manual keyword blacklisting, which is easily bypassed by synonyms.
Key Results
CoGFD was tested against several state-of-the-art baselines (including UCE, ESD, and SALUN) and showed superior performance:
- Erasure Effectiveness: CoGFD significantly reduced the CLIP score for targeted harmful combinations compared to baselines.
- Generative Fidelity: It achieved the highest Erase-Retain Score, meaning it was the best at erasing the "bad" combination while keeping the "good" individual parts. For example, as seen in the visual comparisons, CoGFD successfully erased the "kids drink wine" combo while maintaining the model's ability to generate kids and wine independently.
- Human Evaluation: In tests on the HarmfulCmb dataset, CoGFD was far more effective at preventing the generation of inappropriate themes across diverse, semantically related prompts that baselines missed.
Limitations and Future Work
- Verification Manpower: The authors note that verifying the "HarmfulCmb" dataset required extensive manual labor to ensure image-text alignment.
- Scope of Themes: Currently, the HarmfulCmb dataset focuses heavily on themes related to minors. The authors plan to expand this to a wider variety of high-risk societal and ethical themes.
- Computational Cost: While more effective, the iterative LLM graph generation adds a layer of complexity to the preprocessing stage compared to simple keyword-based erasing.
Summary updated