arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.20518cs.CV
收藏

文本到图像扩散模型中后门检测的动态注意力分析

Dynamic Attention Analysis for Backdoor Detection in Text-to-Image Diffusion Models

Key Laboratory of AI Safety of CAS, Institute of Computing Technology (ICT), Chinese Academy of Sciences (CAS), Beijing 100190, China, and also with the University of Chinese Academy of Sciences (UCAS), Beijing 100049, China(中国科学院人工智能安全重点实验室,计算技术研究所(ICT),中国科学院(CAS),北京100190,中国,以及中国科学院大学(UCAS),北京100049,中国)

Zhongqi Wang, Jie Zhang, Shiguang Shan, Xilin Chen

AI总结:

本研究提出动态注意力分析方法,通过分析扩散模型中注意力图的动态演变,有效检测文本到图像扩散模型中的后门攻击。

摘要:

最近的研究揭示了文本到图像扩散模型容易受到后门攻击的漏洞,攻击者通过植入隐蔽的文本触发器来操控模型输出。先前的后门检测方法主要关注后门样本的静态特征。然而,扩散模型的一个关键特性是其固有的动态性。本研究引入了一种新的后门检测视角,称为动态注意力分析(DAA),表明这些动态特性是更好的后门检测指标。具体而言,通过考察交叉注意力图的动态演变,我们发现后门样本在<EOS>标记处表现出与良性样本不同的特征演变模式。为了量化这些动态异常,我们首先引入DAA-I,将令牌的注意力图视为空间独立的,并使用Frobenius范数测量动态特征。此外,为了更好地捕捉注意力图之间的相互作用并细化特征,我们提出了一种基于动态系统的做法,称为DAA-S。该模型使用基于图的状态方程来表征注意力图之间的空间相关性,并理论分析了该方法的全局渐近稳定性。在六个代表性的后门攻击场景中进行的广泛实验表明,我们的方法显著优于现有检测方法,实现了平均F1得分79.27%和AUC 86.27%。代码可在https://github.com/Robin-WZQ/DAA上获得。

英文摘要:

Recent studies have revealed that text-to-image diffusion models are vulnerable to backdoor attacks, where attackers implant stealthy textual triggers to manipulate model outputs. Previous backdoor detection methods primarily focus on the static features of backdoor samples. However, a vital property of diffusion models is their inherent dynamism. This study introduces a novel backdoor detection perspective named Dynamic Attention Analysis (DAA), showing that these dynamic characteristics serve as better indicators for backdoor detection. Specifically, by examining the dynamic evolution of cross-attention maps, we observe that backdoor samples exhibit distinct feature evolution patterns at the $<$EOS$>$ token compared to benign samples. To quantify these dynamic anomalies, we first introduce DAA-I, which treats the tokens' attention maps as spatially independent and measures dynamic feature using the Frobenius norm. Furthermore, to better capture the interactions between attention maps and refine the feature, we propose a dynamical system-based approach, referred to as DAA-S. This model formulates the spatial correlations among attention maps using a graph-based state equation and we theoretically analyze the global asymptotic stability of this method. Extensive experiments across six representative backdoor attack scenarios demonstrate that our approach significantly surpasses existing detection methods, achieving an average F1 Score of 79.27% and an AUC of 86.27%. The code is available at https://github.com/Robin-WZQ/DAA.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑