Unmasking Backdoors: An Explainable Defense via Gradient-Attention Anomaly Scoring for Pre-trained Language Models
Anindya Sundar Das, Kangjie Chen, Monowar Bhuyan
摘要
Pre-trained language models have achieved remarkable success across a wide range of natural language processing (NLP) tasks, particularly when fine-tuned on large, domain-relevant datasets. However, they remain vulnerable to backdoor attacks, where adversaries embed malicious behaviors using trigger patterns in the training data. These triggers remain dormant during normal usage, but, when activated, can cause targeted misclassifications. In this work, we investigate the internal behavior of backdoored pre-trained encoder-based language models, focusing on the consistent shift in attention and gradient attribution when processing poisoned inputs; where the trigger token dominates both attention and gradient signals, overriding the surrounding context. We propose an inference-time defense that constructs anomaly scores by combining token-level attention and gradient information. Extensive experiments on text classification tasks across diverse backdoor attack scenarios demonstrate that our method significantly reduces attack success rates compared to existing baselines. Furthermore, we provide an interpretability-driven analysis of the scoring mechanism, shedding light on trigger localization and the robustness of the proposed defense.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- Backdoor Attacks on Pre-trained Models by Layerwise Weight Poisoning 引用了 Trojaning Attack on Neural Networks
- Backdoor Attacks on Pre-trained Models by Layerwise Weight Poisoning 引用了 Weight Poisoning Attacks on Pretrained Models
- BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation Models 引用了 Backdoor Attacks on Pre-trained Models by Layerwise Weight Poisoning
- BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation Models 引用了 Weight Poisoning Attacks on Pretrained Models
- Mind the Style of Text! Adversarial and Backdoor Attacks Based on Text Style Transfer 引用了 Trojaning Attack on Neural Networks
- Mind the Style of Text! Adversarial and Backdoor Attacks Based on Text Style Transfer 引用了 Weight Poisoning Attacks on Pretrained Models
- Weight Poisoning Attacks on Pretrained Models 引用了 Trojaning Attack on Neural Networks
它引用的 Paper17
- Trojaning Attack on Neural NetworksYingqi Liu, Shiqing Ma, Yousra Aafer, Wen-Chuan Lee 等NDSS 2018 · 1,377 次引用
- Weight Poisoning Attacks on Pretrained ModelsKeita Kurita, Paul Michel, Graham NeubigACL 2020 · 312 次引用
- BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation ModelsKangjie Chen, Yuxian Meng, Xiaofei Sun, Shangwei Guo 等ICLR 2022 · 133 次引用
- Mind the Style of Text! Adversarial and Backdoor Attacks Based on Text Style TransferFanchao Qi, Yangyi Chen, Xurui Zhang, Mukai Li 等EMNLP 2021 · 114 次引用
- Backdoor Attacks on Pre-trained Models by Layerwise Weight PoisoningLinyang Li, Demin Song, Xiaonan Li, Jiehang Zeng 等EMNLP 2021 · 93 次引用
相关 Paper
- Backdoor Pre-trained Models Can Transfer to AllLujia Shen, Shouling Ji, Xuhong Zhang, Jinfeng Li 等CCS 2021 · 72 次引用
- SAFER: A Controllable Safeguard for LLMs against Backdoor AttacksZirui Hu, Zheng Zhang, Yingjie Wang, Dacheng TaoACL Findings 2026
- When Backdoors Speak: Understanding LLM Backdoor Attacks Through Model-Generated ExplanationsHuaizhi Ge, Yiming Li, Qifan Wang, Yongfeng Zhang 等ACL 2025
- Test-Time Attention Purification for Backdoored Large Vision Language ModelsZhifang Zhang, Bojun Yang, Shuo He, Weitong Chen 等CVPR 2026 · 7 次引用
- Defending against Insertion-based Textual Backdoor Attacks via AttributionJiazhao Li, Zhuofeng Wu, Wei Ping, Chaowei Xiao 等ACL Findings 2023 · 11 次引用
