Dual-path consistency constrained concept erasure for text-to-image diffusion models
摘要
To address the challenge of safe and controllable text-to-image generation under complex and adversarial prompts, we propose Dual-Path Consistency Constrained Concept Erasure (DPCE), a lightweight and modular framework for precise and robust removal of specific concepts in diffusion models. DPCE is designed to selectively suppress undesirable concepts (e.g., nudity, violence, hate) without sacrificing the model’s generative quality or diversity. Our framework introduces a dual-path erasure strategy that operates on both the conditional and unconditional branches of the diffusion process. To prevent semantic drift and preserve visual quality, we incorporate a non-target preservation module with semantic-level and spatial-level constraints. In addition, we adopt adversarial prompt learning to defend against prompt-based attacks by simulating misleading textual variations. All components are trained jointly without modifying the pre-trained backbone, following a parameter-efficient fine-tuning strategy. We conduct extensive experiments on multiple datasets such as CIFAR-10 and I2P, and the results show that DPCE achieves superior performance in concept erasure accuracy, robustness to prompt variations, and preservation of non-target content. Overall, DPCE offers a practical and extensible solution for secure and controllable generation in text-to-image diffusion models, making it suitable for real-world deployment in safety-critical applications.