Introspective Attention Modulation for Safe Text-to-Image Generation

📅 2026-07-16
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the vulnerability of existing flow-based text-to-image generative models to producing unsafe content, as current safety mechanisms—such as concept erasure and prompt filtering—are often circumvented by parameter-efficient fine-tuning techniques. To mitigate this, the authors propose a novel inference-time attention introspection and rebalancing mechanism that dynamically modulates activations within the attention layers of diffusion Transformers. This approach steers the generation process away from unsafe concepts while preserving semantic alignment with the input prompt. Notably, it requires no modification to model parameters nor reliance on external classifiers, thereby offering intrinsic robustness. Experimental results demonstrate that the method significantly enhances safety on both standard and adversarial benchmarks, while maintaining or even improving semantic fidelity and perceptual image quality.
📝 Abstract
State-of-the-art flow based text-to-image (T2I) models exhibit remarkable generative abilities but remain vulnerable to producing unsafe content. Prior safety efforts range from concept erasure and prompt filtering to classifier-based gating. However, simple techniques like parameter efficient adaptations of the models easily bypass such guardrails. We introduce a unique principled approach that achieves safety by regulating the model's attention dynamics through inference-time introspection, exhibiting intrinsic robustness. Our method analyzes and rebalances attention activations throughout image synthesis, steering generations away from unsafe concepts while preserving semantic alignment. This introspective control ensures safety of deployed models. Across standard and adversarial safety benchmarks, our approach achieves remarkable safety scores while maintaining or even improving alignment and perceptual quality. Our results reveal that attention-space regulation offers a considerably more promising path to safer diffusion transformer based image generation than the existing concept erasing mechanism.Our code can be accessed at https://basim-azam.github.io/iam/
Problem

Research questions and friction points this paper is trying to address.

text-to-image generation
unsafe content
safety
attention modulation
diffusion models
Innovation

Methods, ideas, or system contributions that make the work stand out.

Introspective Attention
Safe Text-to-Image Generation
Attention Modulation
Diffusion Transformer
Inference-time Safety
🔎 Similar Papers