无需重训练,通过剪枝和注入恶意头实现隐蔽的后门攻击
Pruning and Malicious Injection: A Retraining-Free Backdoor Attack on Transformer Models
- 剪掉模型不重要注意力头,插入预训练恶意头建立后门
- 攻击成功率超99.55%,清洁准确率损失极小
- 可绕过多种先进防御机制,适合研究模型安全漏洞
Transformer 模型在计算机视觉与自然语言处理中表现卓越,但近期研究发现其易受后门攻击。现有攻击方法通常依赖重训练或修改模型结构,成本高且侵入性强。本文提出一种无需重训练的新型后门攻击方法——头级剪枝与恶意注入(HPMI),不改变模型架构,仅需少量原始数据及基本模型知识即可完成攻击。技术上,该方法通过剪除最不重要的注意力头,并注入一个预训练的恶意头来构建后门。我们提供了严格的理论分析,证明在合理假设下,植入的后门能抵抗主流防御技术的检测与移除。实验在多个数据集上验证了 HPMI 的有效性:1)清洁准确率损失可忽略;2)攻击成功率不低于99.55%;3)可绕过四种先进防御机制。相较于依赖重训练的先进攻击方法,HPMI 在隐蔽性和对防御策略的鲁棒性方面表现更优,同时对清洁性能影响极小。
原文摘要 · Abstract (English)
Transformer models have demonstrated exceptional performance and have become indispensable in computer vision (CV) and natural language processing (NLP) tasks. However, recent studies reveal that transformers are susceptible to backdoor attacks. Prior backdoor attack methods typically rely on retraining with clean data or altering the model architecture, both of which can be resource-intensive and intrusive. In this paper, we propose Head-wise Pruning and Malicious Injection (HPMI), a novel retraining-free backdoor attack on transformers that does not alter the model's architecture. Our approach requires only a small subset of the original data and basic knowledge of the model architecture, eliminating the need for retraining the target transformer. Technically, HPMI works by pruning the least important head and injecting a pre-trained malicious head to establish the backdoor. We provide a rigorous theoretical justification demonstrating that the implanted backdoor resists detection and removal by state-of-the-art defense techniques, under reasonable assumptions. Experimental evaluations across multiple datasets further validate the effectiveness of HPMI, showing that it 1) incurs negligible clean accuracy loss, 2) achieves at least 99.55% attack success rate, and 3) bypasses four advanced defense mechanisms. Additionally, relative to state-of-the-art retraining-dependent attacks, HPMI achieves greater concealment and robustness against diverse defense strategies, while maintaining minimal impact on clean accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。