DSS: Dynamic Semantic Steering for Robust Concept Erasure in Diffusion Models

Qinghui Gong, Zhengchun Zhou, Hua Meng, Yihuai Liang, Yuxuan Zhang
4/13/2026
cs.CVcs.AI
diffusion-flow

No confident code implementation found for this paper.

Abstract

Text-to-image (T2I) diffusion models have introduced new security risks, as adversaries can exploit flexible text prompts to induce the generation of sensitive or policy-violating content (e.g., NSFW or copyrighted concepts). Concept erasure has emerged as a promising defense, aiming to suppress targeted semantics while preserving benign generation.

Show full abstract

However, existing approaches face a fundamental trade-off: training-based methods are costly and inflexible to emerging threats, while inference-time interventions often rely on unconstrained feature manipulation, leading to over-correction, semantic drift, and degraded utility. More critically, they lack an explicit understanding of local semantic structure, resulting in unstable behavior under adversarial or compositional prompts. In this paper, we propose Dynamic Semantic Steering (DSS), a training-free, inference-time defense framework for robust and controllable concept erasure under prompt-level adversarial settings. DSS introduces a geometry-aware formulation that explicitly models local semantic neighborhoods and constrains feature updates within this structure, which is key to achieving precise suppression without sacrificing benign semantics. Specifically, DSS (i) automatically identifies benign semantic anchors via density-based boundary modeling, and (ii) performs context-aware, constrained feature correction using cross-attention signals with a closed-form solution. Extensive experiments demonstrate that DSS achieves strong and consistent suppression across diverse concept categories and adversarial prompts, reaching an average erasure rate of 91.0\%, outperforming prior defenses (18.6\%--85.9\%). At the same time, DSS substantially reduces semantic drift and preserves generation fidelity.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{gong2026dss,
  title  = {DSS: Dynamic Semantic Steering for Robust Concept Erasure in Diffusion Models},
  author = {Qinghui Gong and Zhengchun Zhou and Hua Meng and Yihuai Liang and Yuxuan Zhang},
  year   = {2026},
  eprint = {2604.16483},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.16483v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.16483.svg)](https://codeofpaper.com/paper/2604.16483)

Discussion