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.
Introduction: The Silent Infection
As Large Language Models (LLMs) grow to gargantuan sizes, the industry has turned to Knowledge Distillation (KD) to create "mini-LLMs"—smaller, faster models that mimic the behavior of their massive "teachers." This is usually seen as a security-neutral compression step. However, researchers have discovered a terrifying new vulnerability: backdoor transferability.
Traditionally, a backdoor (a specific trigger that causes a model to misbehave, such as classifying a negative review as positive) requires the training data to be poisoned. This paper investigates whether a student model can "unconsciously" learn these malicious shortcuts just by trying to imitate a poisoned teacher, even when the student's own training set is perfectly clean.
Methodology: Adaptive Transferable Backdoor Attack (ATBA)
The authors propose ATBA, which consists of two primary innovations designed to make backdoors "sticky" enough to survive the distillation process:
- Target Trigger Generation (TTG): Instead of picking a random word as a trigger, the attacker uses the teacher's own vocabulary. They look for "indicative" tokens—words that already sit close to the target class in the model's internal embedding space but aren't so obvious that they would be caught by a human or a simple filter.
- Adaptive Trigger Optimization (ATO): This is the "brain" of the attack. The attacker uses a shadow model to simulate the distillation process. By using gradient-based feedback, the system iteratively tweaks the triggers. It searches for the "sweet spot" where the trigger is short enough to be stealthy but robust enough that the student model is forced to capture the pattern during training.
The attack is "adaptive" because it dynamically adjusts trigger length based on how well the shadow student is learning the backdoor.
Experimental Setup and Results
The researchers evaluated ATBA across five diverse NLP benchmarks, including SST-2 (sentiment analysis), Offenseval (toxic content), and AG’News (topic classification). They tested these using various architectures, including BERT-Large as a teacher and DistilBERT, ALBERT, and OPT models as students.
Key Findings
- Implicit Transfer is Real: The student doesn't need to see a single poisoned example. Because the teacher's output probabilities for a triggered input are so skewed, the student learns that specific trigger-label relationship simply by trying to match the teacher's logic.
- High Success Rates: In many cases, the Attack Success Rate (ASR) on the student models exceeded 80%, and in some configurations, it reached nearly 100%.
- Negligible Impact on Clean Accuracy: The Clean Accuracy (CACC) of the student models remained almost identical to models trained from a clean teacher, making the attack virtually undetectable.
Conclusion and Future Work
The results are sobering, demonstrating that the distillation process can be a vector for malicious behavior. While this study focused primarily on classification tasks, future work will expand to text generation. The authors emphasize the urgent need for new model diagnostics to vet teacher models before they are used for distillation, as traditional defenses may not be sufficient to catch these implicit transfers.
Summary updated