Transferring Backdoors between Large Language Models by Knowledge Distillation
Pengzhou Cheng, Zongru Wu, Tianjie Ju, Wei Du, Zhuosheng Zhang Gongshen Liu
TL;DR
This work studies backdoor transferability between LLMs via knowledge distillation, introducing ATBA which uses Target Trigger Generation (TTG) and Adaptive Trigger Optimization (ATO) to embed and optimize backdoor triggers that survive the discretization of text. A shadow-model–driven KD simulation guides trigger optimization, enabling robust, stealthy transfer from poisoned teacher LLMs to smaller student LLMs under clean-tuning. Across five tasks and multiple architectures, ATBA achieves high ASR on student models (roughly $70\%-99\%$) while maintaining competitive CACC, demonstrating both effectiveness and stealth in KD-based backdoor transfer. These findings highlight security risks in open-model distillation pipelines and motivate defenses such as model diagnostics and input-filtering to mitigate such vulnerabilities.
Abstract
Backdoor Attacks have been a serious vulnerability against Large Language Models (LLMs). However, previous methods only reveal such risk in specific models, or present tasks transferability after attacking the pre-trained phase. So, how risky is the model transferability of a backdoor attack? In this paper, we focus on whether existing mini-LLMs may be unconsciously instructed in backdoor knowledge by poisoned teacher LLMs through knowledge distillation (KD). Specifically, we propose ATBA, an adaptive transferable backdoor attack, which can effectively distill the backdoor of teacher LLMs into small models when only executing clean-tuning. We first propose the Target Trigger Generation (TTG) module that filters out a set of indicative trigger candidates from the token list based on cosine similarity distribution. Then, we exploit a shadow model to imitate the distilling process and introduce an Adaptive Trigger Optimization (ATO) module to realize a gradient-based greedy feedback to search optimal triggers. Extensive experiments show that ATBA generates not only positive guidance for student models but also implicitly transfers backdoor knowledge. Our attack is robust and stealthy, with over 80% backdoor transferability, and hopes the attention of security.
