TL;DR
This paper tackles the vulnerability of diffusion models to generating unwanted content (like NSFW images or copyrighted styles) even after concept erasing. They introduce a novel pruning-based strategy that selectively removes critical parameters, making concept erasure robust against adversarial prompts and significantly improving safety.
What Problem Does This Paper Address?
Text-to-image diffusion models are incredibly powerful but can be misused to generate harmful or undesirable content, such as NSFW images or copyrighted artworks. While "concept erasing" techniques aim to fix this by fine-tuning models to forget these concepts, they often fail when faced with cleverly crafted "adversarial prompts." These prompts can "reactivate" the erased concepts, revealing a fundamental weakness: the knowledge isn't truly forgotten, just hidden. This lack of robustness poses a significant risk for deploying these models in real-world applications.
Methods
The core of this paper is a new pruning-based strategy for concept erasing. Instead of just fine-tuning, they integrate pruning directly into the concept erasing objective. The key idea is to identify and prune critical parameters that are strongly associated with the concept to be erased. This is done by parameterizing a trainable mask for each parameter and optimizing it using a differentiable pruning approach. This mask selectively zeros out specific parameters, effectively "cutting off" the pathways that could lead to the reactivation of erased concepts by adversarial prompts. Their method is designed to be a plug-in that can be integrated with existing concept erasing techniques like ESD (Erasing Stable Diffusion) and AC (Ablating Concept), leading to methods they call P-ESD and P-AC.
Datasets
The paper evaluates their methods on tasks involving:
- Nudity erasure: Using prompts derived from the "sexual" category of the I2P dataset.
- Style erasure: Specifically targeting the "Van Gogh" style.
- Object erasure: Including objects like "tench," "parachute," "church," and "garbage truck."
They also use the COCO dataset for evaluating image generation quality (FID scores).
Key Insights and Ideas
- Concept neurons are "hidden" not "forgotten": The paper provides empirical evidence that existing concept erasing methods don't truly remove knowledge but rather make it harder to access. Adversarial prompts can reactivate these "concept neurons."
- Pruning critical parameters is key to robustness: By selectively pruning parameters that are highly correlated with the target concept, they can effectively sever the pathways that adversarial prompts exploit.
- Pruning-aware concept erasing is more effective: Their proposed method, which prunes during the erasing process and is aware of the erasing objective, outperforms other pruning strategies (pruning before or after erasing).
- Minimal pruning for maximum impact: Their method achieves significant robustness improvements with a very small percentage of pruned weights, suggesting a highly targeted approach.
Key Results
- Significant robustness improvement: Their method (P-ESD) achieves approximately a 40% improvement in erasing NSFW content and a 30% improvement in erasing artwork style against adversarial prompts.
- High concept erasure rates: On test prompts, their methods achieve very high concept erasure rates, often outperforming baselines (e.g., P-ESD achieves 0.95 CER for nudity on test prompts, compared to 0.80 for ESD).
- Maintained generation quality: Despite pruning, their method maintains comparable or even better image generation quality (FID scores) compared to existing methods. For example, P-ESD has a lower FID score than ESD for erasing objects.
- Effective against various attacks: Their method shows robustness against two prominent attack methods: P4D and UnlearnDiff.
Limitations and Future Work
- Concept neuron identification: The method for identifying concept neurons relies on a numerical criterion that might be sensitive to the choice of erased model and the number of neurons selected. The authors suggest that more accurate methodologies for concept neuron identification are needed for future work.
- Potential for misuse: The authors acknowledge that their defense technique could inadvertently aid in the development of more sophisticated attack strategies, which is an unintended consequence.
- Broader impacts: While addressing safety concerns, the paper notes that the development of more robust defense mechanisms is an ongoing arms race with potential attack strategies.
Summary updated