Transformer-based deep neural networks (DNNs) affected by backdoor attacks and unfairness typically exhibit anomalous attention patterns, leading to over-attend to backdoor triggers or protected attributes. Existing neuron-editing mitigation strategies often struggle to handle such situation and most of them lack flexibility and tend to distort feature representations. Motivated by such over-attention phenomenon and software engineering paradigms such as delta debugging and hot patching, we propose AtPatch, a hot-fix method that dynamically redistributes attention maps during model inference. Specifically, for a given input, AtPatch first extracts the attention map from the model's inference process. Then, it uses a pre-trained detector to identify anomalous columns and replace them with unified benign attention. Then, AtPatch rescales other columns to mitigate the impact of over-attention. Finally, AtPatch returns the redistributed attention map to the model for continued inference. Notably, if the detector does not report any anomalous columns, AtPatch directly returns the original attention map to the model. Unlike existing techniques, AtPatch selectively redistributes the attention map, making it better at preserving the model's original functionality. Furthermore, AtPatch's on-the-fly nature allows it to work without modifying model parameters or retraining, making it better suited for deployed models. We conducted extensive experiments to validate AtPatch. Experimental results show that, compared to existing methods, AtPatch can more effectively mitigate backdoor attacks and unfairness while better preserving the model's original functionality.


翻译:受后门攻击和不公平性影响的基于Transformer的深度神经网络通常表现出异常的注意力模式,导致对后门触发器或受保护属性的过度关注。现有的神经元编辑缓解策略往往难以处理此类情况,且大多缺乏灵活性,容易扭曲特征表示。受这种过度注意力现象以及增量调试和热修补等软件工程范式的启发,我们提出了AtPatch——一种在模型推理过程中动态重新分配注意力图的热修复方法。具体而言,对于给定输入,AtPatch首先从模型推理过程中提取注意力图;随后使用预训练的检测器识别异常列,并将其替换为统一的良性注意力;接着重新缩放其他列以减轻过度注意力的影响;最后将重新分配的注意力图返回模型以继续推理。值得注意的是,若检测器未报告任何异常列,AtPatch会将原始注意力图直接返回模型。与现有技术不同,AtPatch选择性重分配注意力图的特性使其能更好地保持模型原始功能。此外,AtPatch的即时处理特性使其无需修改模型参数或重新训练即可工作,更适用于已部署模型。我们通过大量实验验证AtPatch的有效性,实验结果表明:相较于现有方法,AtPatch能更有效地缓解后门攻击和不公平性问题,同时更好地保持模型的原始功能。

0
下载
关闭预览

相关内容

【NeurIPS 2021】流形上的注意力机制:规范等变的Transformer
华为等发布《视觉Transformer转换器》综述论文,21页pdf
专知会员服务
86+阅读 · 2020年12月25日
注意力机制介绍,Attention Mechanism
专知会员服务
172+阅读 · 2019年10月13日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
Attention!注意力机制模型最新综述(附下载)
数据派THU
36+阅读 · 2019年4月14日
Attention!注意力机制模型最新综述
中国人工智能学会
18+阅读 · 2019年4月8日
注意力机制(Attention)最新综述论文及相关源码
人工智能学家
30+阅读 · 2018年11月17日
深度学习中的注意力机制
人工智能头条
16+阅读 · 2017年11月2日
神经网络中的「注意力」是什么?怎么用?
北京思腾合力科技有限公司
17+阅读 · 2017年10月28日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月16日
VIP会员
相关VIP内容
【NeurIPS 2021】流形上的注意力机制:规范等变的Transformer
华为等发布《视觉Transformer转换器》综述论文,21页pdf
专知会员服务
86+阅读 · 2020年12月25日
注意力机制介绍,Attention Mechanism
专知会员服务
172+阅读 · 2019年10月13日
相关资讯
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
Attention!注意力机制模型最新综述(附下载)
数据派THU
36+阅读 · 2019年4月14日
Attention!注意力机制模型最新综述
中国人工智能学会
18+阅读 · 2019年4月8日
注意力机制(Attention)最新综述论文及相关源码
人工智能学家
30+阅读 · 2018年11月17日
深度学习中的注意力机制
人工智能头条
16+阅读 · 2017年11月2日
神经网络中的「注意力」是什么?怎么用?
北京思腾合力科技有限公司
17+阅读 · 2017年10月28日
相关基金
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员