# What Concepts Lie Within? Detecting and Suppressing Risky Content in Diffusion Transformers

DevFeed: [What Concepts Lie Within? Detecting and Suppressing Risky Content in Diffusion Transformers](<https://devfeed.tech/articles/what-concepts-lie-within-detecting-and-suppressing-risky-content-in-diffusion-transformers-122767.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2605.10180>)

Author: Chenyu Zhang, Lanjun Wang, Yueyang Cheng, Ruidong Chen, Wenhui Li, An-an Liu

Published: 2026-11-09T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [diffusion-transformers](<https://devfeed.tech/topics/diffusion-transformers.md>), [Generative AI](<https://devfeed.tech/topics/generative-ai.md>), [generative-ai-tools](<https://devfeed.tech/topics/generative-ai-tools.md>)

Tags: [adversarial](<https://devfeed.tech/tags/adversarial.md>), [attention](<https://devfeed.tech/tags/attention.md>), [copyright](<https://devfeed.tech/tags/copyright.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [cs-cv](<https://devfeed.tech/tags/cs-cv.md>), [denoising](<https://devfeed.tech/tags/denoising.md>), [detection](<https://devfeed.tech/tags/detection.md>), [diffusion](<https://devfeed.tech/tags/diffusion.md>), [diffusion-transformers](<https://devfeed.tech/tags/diffusion-transformers.md>), [generation](<https://devfeed.tech/tags/generation.md>), [image](<https://devfeed.tech/tags/image.md>), [image-generation](<https://devfeed.tech/tags/image-generation.md>), [inference](<https://devfeed.tech/tags/inference.md>), [momentum](<https://devfeed.tech/tags/momentum.md>), [risk](<https://devfeed.tech/tags/risk.md>), [robustness](<https://devfeed.tech/tags/robustness.md>), [semantic](<https://devfeed.tech/tags/semantic.md>), [strategy](<https://devfeed.tech/tags/strategy.md>), [style](<https://devfeed.tech/tags/style.md>)

## AI overview

The paper proposes a training-free, inference-time safeguard for Diffusion Transformer text-to-image models. It uses attention heads' concept-specific sensitivity to build an Attention Head Vector for each text token, tracking these vectors across denoising steps with momentum to detect risky generation tendencies. It then adaptively suppresses the attention logits of flagged tokens using head-specific risk scores. The abstract reports suppression of sexual, copyrighted-style, and other harmful content while preserving visual quality, with robustness to adversarial prompts and transfer across DiT-based models. It presents these as experimental findings; the supplied abstract gives no quantitative results.

## Source excerpt

arXiv:2605.10180v2 Announce Type: replace-cross Abstract: The rise of text-to-image~(T2I) models has increasingly raised concerns regarding the generation of risky content, such as sexual, violent, and copyright-protected images, highlighting the need for effective safeguards within the models themselves.Although existing methods have been proposed to eliminate risky concepts from T2I models, they mainly focus on the erasure of risk-associated textual or latent representations, limiting their ability to defend against adversarial prompts without explicit risk words, especially in recent Diffusion-Transformer-based T2I models. To bridge this gap, we investigate how semantic concepts activate the generation process within Diffusion Transformers~(DiTs) and discover that attention heads exhibit concept-specific sensitivity. This property enables both the detection and suppression of risky content. Building on this discovery, we propose a training-free inference-time safeguard for image generation in DiTs. Specifically, our method quantifies each textual token's sensitivity across all attention heads as an Attention Head Vector~(AHV), which serves as a discriminative signature for detecting risky generation tendencies. In the inference stage, we propose a momentum-based strategy to dynamically track token-wise AHVs across denoising steps, and a sensitivity-guided adaptive suppression strategy that suppresses the attention logits of identified risky tokens based on head-specific risk scores. Extensive experiments demonstrate that our method effectively suppresses sexual, copyrighted-style, and various harmful content while preserving visual quality, and further exhibits strong robustness against adversarial prompts and transferability across different DiT-based T2I models. These results establish our method as a practical safeguard for the safe deployment of modern T2I models.