通过追踪生成过程中的语义泄漏点,动态防御文本到图像模型的隐性越狱攻击。
AEGIS: A Mechanism-Guided Defense against Visual Synonym Jailbreaks in Text-to-Image Models

- 识别生成时关键注意力头中隐含的危险语义注入机制
- 在特定注意力头施加相似度感知排斥,实现精准防护
- 兼顾安全与生成质量,适用于多版本扩散模型
文本到图像扩散模型虽已具备高保真度和广泛应用,但仍易被攻击者利用生成非法内容。现有对齐方法主要针对显式不安全概念进行过滤或剪枝,难以应对视觉同义攻击(VSA)——即看似无害的提示通过隐含视觉关联诱发违禁图像。当前防御面临安全与可用性权衡:要么防护不足,要么误伤正常概念。本研究发现,VSA与显式不安全提示在生成过程中通过稀疏的语义注入注意力头实现视觉-语义收敛,这些头成为禁止语义的推理时瓶颈。为此,提出AEGIS(基于识别与引导的自适应逃逸防护),在识别出的脆弱注意力头处施加仅限相似度感知的排斥。在16种基线测试中,AEGIS在SD 1.4上将域内暴力/裸露类VSA的攻击成功率降至0.00/0.03,域外显式及对抗攻击的攻击成功率≤0.09,同时保持良性生成质量,避免抑制难例概念,并可在重识别关键头后迁移至SD 2.1和FLUX.1。
原文摘要 · Abstract (English)
Text-to-image diffusion models have achieved high visual fidelity and broad adoption, but remain vulnerable to safety violations when adversaries exploit them to synthesize illicit content. Existing alignment paradigms, from input sanitization to structural feature pruning, are largely organized around unsafe concepts explicitly exposed during filtering, editing, or localization. This leaves a blind spot for visual synonym attacks (VSA), a jailbreak where benign-looking prompts elicit prohibited imagery through implicit visual associations. As a result, current defenses face a safety-utility dilemma: they may either under-mitigate VSA threats or over-suppress visually similar benign concepts. The core challenge is that VSA hides the unsafe target at the textual surface while revealing it through generation-time visual-semantic convergence. In this work, we therefore shift from static suppression of pre-specified unsafe concepts to dynamic tracing of how unsafe semantics emerge during generation. Our mechanistic analysis shows that VSA and explicit unsafe prompts converge through sparse semantic-injecting attention heads, which serve as inference-time bottlenecks for prohibited visual semantics. Based on this insight, we propose AEGIS (Adaptive Evasion Guard via Identification and Steering), an inference-time defense that applies similarity-aware repulsion only at the identified vulnerable heads. Evaluated against 16 baselines, AEGIS improves both safety and utility. On SD 1.4, it reduces ASR to $\mathbf{0.00}/\mathbf{0.03}$ for in-domain violence/nudity VSA and achieves ASRs $\le \mathbf{0.09}$ on out-of-domain explicit and adversarial attacks. It preserves benign fidelity, avoids suppressing hard-negative concepts, and transfers to SD 2.1 and FLUX.1 after re-identifying the critical heads for each backbone.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。