When Guidance Becomes a Guard: Early Interception of Unsafe Inputs in Text-to-Image Generation

Yanchun Li, Yujin Wu, Gangkai Shen, Ming Yang, Li Zeng +3 more
10/19/2026
cs.CV

No confident code implementation found for this paper.

Abstract

Text-to-image diffusion models can produce unsafe content, while output filtering intervenes only after synthesis. We investigate whether native generation signals enable early detection of unsafe and adversarial inputs. We find that classifier-free guidance exposes strong safety signals in conditional responses, accessible through compact statistics and linear readouts. Based on this finding, we propose Conditional Semantic Trajectory Interception (CSTI), which aggregates activation contrasts between conditional and unconditional responses at early checkpoints for calibrated risk detection. CSTI fits concept-specific detectors using canonical concept and safe examples, without attack samples, intermediate image decoding, or generator modification. Across five generators, four adversarial attack collections, and two general NSFW datasets, CSTI achieves the strongest overall performance among six baselines at a matched 5% FPR. Early interception reduces generation latency by over 60% on intercepted paths. These results demonstrate the effectiveness of native conditional responses for early safety interception.

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{li2026when,
  title  = {When Guidance Becomes a Guard: Early Interception of Unsafe Inputs in Text-to-Image Generation},
  author = {Yanchun Li and Yujin Wu and Gangkai Shen and Ming Yang and Li Zeng and Xianlong Wang and Hangtao Zhang and Shujuan Tian},
  year   = {2026},
  eprint = {2610.26452},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.26452v1}
}

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/2610.26452.svg)](https://codeofpaper.com/paper/2610.26452)

Discussion