Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

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

About

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 are primarily developed for earlier U-Net architectures, leaving the state-of-the-art Diffusion-Transformer-based T2I models inadequately protected. This gap stems from a fundamental architectural shift: Diffusion Transformers (DiTs) entangle semantic injection and visual synthesis via joint attention, which makes it difficult to isolate and erase risky content within the generation. To bridge this gap, we investigate how semantic concepts are represented in 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 AHV-D\&S, a training-free inference-time safeguard for image generation in DiTs. Specifically, AHV-D\&S 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 weights of identified risky tokens based on head-specific risk scores. Extensive experiments demonstrate that AHV-D\&S 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.

Chenyu Zhang• 2026

Related benchmarks

TaskDatasetResultRank
Adversarial RobustnessI2P
Risk Ratio40.9
8
Adversarial RobustnessRAB
Risk Ratio69.2
8
Adversarial RobustnessMMA
Risk Ratio28.3
8
Adversarial RobustnessUnlearnDiff
Risk Ratio59.1
8
Copyrighted Style SuppressionCopyrighted Artist Styles
CLIP Similarity23.08
8
Benign Style GenerationBenign Artistic Styles
CLIP_p26.01
8
Benign Content GenerationT2I-RiskyPrompt (test)
CLIP Score30.46
8
Benign Content GenerationCOCO 1K
CLIP Score30.84
8
Harmful Content SuppressionT2I-RiskyPrompt (test)
Blood Suppression33.4
8
Sexual Content SuppressionSexual Content Suppression Prompts
Suppression Rate: Breasts (F)18
8
Showing 10 of 11 rows

Other info

Follow for update