arXiv:2607.14945cs.CV2026-07中稿 · ECCV

通过推理时注意力调控,让文生图模型更安全且不丢质量。

Introspective Attention Modulation for Safe Text-to-Image Generation

论文配图:Introspective Attention Modulation for Safe Text-to-Image Generation
图 1 · 摘自论文原文
  • 在生成过程中实时分析并重平衡注意力分布。
  • 在标准与对抗性测试中均达高安全分数,且图像质量不降反升。
  • 适合关注生成安全性的研究人员和产品开发者。

当前基于流的文本到图像(T2I)模型生成能力强大,但易产生不安全内容。已有安全方法包括概念消除、提示过滤和分类器门控,但参数高效微调等简单手段常可绕过这些防护。本文提出一种新方法:通过推理时的自我审视,调节模型的注意力动态,实现内在鲁棒的安全性。该方法在图像生成全程分析并重平衡注意力激活,引导远离不安全概念,同时保持语义对齐。实验表明,该方法在标准与对抗性安全基准上均取得优异表现,安全性显著提升,且生成图像的语义一致性与感知质量未受损甚至有所改善。结果表明,注意力空间调控比现有概念消除机制更具前景。代码开源地址:https://basim-azam.github.io/iam/

原文摘要 · Abstract (English)

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/

文生图注意力调控生成安全扩散模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。