TraSCE: Trajectory Steering for Concept Erasure
Anubhav Jain, Yuya Kobayashi, Takashi Shibuya, Yuhta Takida, Nasir Memon, Julian Togelius, Yuki Mitsufuji
TL;DR
TraSCE addresses the problem of unsafe and undesired concept generation in diffusion models by enabling concept erasure without training or weight updates. It combines a tailored negative prompting formulation with a localized loss-based guidance to robustly steer the diffusion trajectory away from the target concept, even under adversarial jail-breaking prompts. The method demonstrates state-of-the-art robustness across NSFW, violence, artistic styles, and object erasure benchmarks, while maintaining high image quality and general generation capability. This training-free, inference-only approach offers practical, scalable concept erasure for model owners, with flexible redefinition of erased concepts and broad applicability beyond just safety concerns. The work advances practical defense against jail-breaking attempts and supports accountable diffusion-model deployment in real-world settings.
Abstract
Recent advancements in text-to-image diffusion models have brought them to the public spotlight, becoming widely accessible and embraced by everyday users. However, these models have been shown to generate harmful content such as not-safe-for-work (NSFW) images. While approaches have been proposed to erase such abstract concepts from the models, jail-breaking techniques have succeeded in bypassing such safety measures. In this paper, we propose TraSCE, an approach to guide the diffusion trajectory away from generating harmful content. Our approach is based on negative prompting, but as we show in this paper, a widely used negative prompting strategy is not a complete solution and can easily be bypassed in some corner cases. To address this issue, we first propose using a specific formulation of negative prompting instead of the widely used one. Furthermore, we introduce a localized loss-based guidance that enhances the modified negative prompting technique by steering the diffusion trajectory. We demonstrate that our proposed method achieves state-of-the-art results on various benchmarks in removing harmful content, including ones proposed by red teams, and erasing artistic styles and objects. Our proposed approach does not require any training, weight modifications, or training data (either image or prompt), making it easier for model owners to erase new concepts.
