TL;DR
This paper introduces "Neuron-level Backdoor Attack" (NeuBA), a novel attack that exploits pre-trained models (PTMs) to create universal backdoors. These backdoors can hijack arbitrary downstream tasks with high success rates, posing a significant security threat to the widespread use of PTMs. Model pruning is identified as a promising defense strategy.
What Problem Does This Paper Address?
The deep learning community heavily relies on pre-trained models (PTMs) like BERT and VGGNet, which are often downloaded from public repositories. This practice introduces a significant security vulnerability: PTMs can be poisoned with "backdoors" during their initial pre-training phase. Previous backdoor attacks were often task-specific, requiring knowledge of the downstream task. This paper addresses the critical gap of universal backdoor attacks on PTMs, demonstrating that a single poisoned PTM can be exploited across a wide range of downstream tasks without the attacker needing to know the specific task beforehand. This universality makes the threat far more pervasive and dangerous.
Methods
The core of the proposed attack, NeuBA, lies in manipulating the output representations of PTMs during the pre-training phase. Instead of directly targeting a specific downstream task's output, NeuBA injects a simple pre-training task that forces the PTM to map inputs containing specific "triggers" to predefined, arbitrary output vectors.
Here's a breakdown:
- Neuron-Level Backdoor Attack (NeuBA): The attack focuses on controlling the intermediate representations generated by the PTM. When a trigger is present in an input, the PTM's output representation is forced to a specific, attacker-defined vector.
- Pre-training Poisoning: Attackers modify the pre-training objective by adding a backdoor loss term (
LBD) alongside the original pre-training loss (LPT). ThisLBDensures that inputs with triggers produce the desired fixed output representations. - Trigger Selection: To make the backdoor more resilient to fine-tuning, the paper suggests using rare patterns as triggers (e.g., low-frequency words in NLP, unusual image patches in CV). This makes it less likely for the trigger to appear in the downstream fine-tuning data, thus preventing the backdoor from being erased.
- Universal Attack: Because the backdoor manipulates general-purpose representations, it remains effective regardless of the downstream task's specific nature. The fine-tuned linear classifier on top of the PTM then misinterprets these manipulated representations, leading to the desired malicious prediction.
Datasets
The paper evaluates NeuBA on a variety of established datasets for both Natural Language Processing (NLP) and Computer Vision (CV):
NLP Datasets: * SST-2: Sentiment analysis. * OLID: Toxicity detection. * Enron: Spam detection.
CV Datasets: * Waste Classification: Distinguishing between organic and recyclable waste. * Cats-vs-Dogs (CD): Classifying images of cats and dogs. * GTSRB: Traffic sign classification (modified to a binary classification task).
The paper uses the BookCorpus dataset for backdoor pre-training of NLP PTMs and ImageNet64x64 for CV PTMs.
Key Insights and Ideas
- The "Universal" Threat: The most significant insight is that a single poisoned PTM can be a threat across any downstream task. This is a major escalation from previous task-specific backdoor attacks.
- Representation Manipulation is Key: NeuBA's effectiveness stems from controlling the PTM's internal representations, which are then used by downstream classifiers. This bypasses the need to understand the downstream task's specific architecture or loss function.
- Rarity as a Defense Against Erasure: Using rare triggers is crucial. If a trigger is common in fine-tuning data, the backdoor is likely to be overwritten. Rare triggers are less likely to be encountered, preserving the backdoor's integrity.
- PTMs' Overparameterization Aids Evasion: The large number of parameters in PTMs allows them to simultaneously learn good general representations and the malicious backdoor functionality, making the backdoor harder to detect.
- Model Pruning as a Promising Defense: The paper identifies model pruning as a particularly effective defense mechanism, suggesting that backdoored neurons can be identified and removed.
Key Results
- High Attack Success Rates: NeuBA achieves nearly 100% attack success rates (ASR) on both NLP and CV tasks, demonstrating its effectiveness.
- Minimal Impact on Clean Data: Backdoored PTMs show minimal degradation in performance on clean, non-trigger data, making them difficult to distinguish from benign models.
- Defense Effectiveness:
- Re-initialization: Shows mixed results, working better for BERT than VGGNet, suggesting the backdoor location matters.
- Neural Attention Distillation (NAD): Also shows limited effectiveness.
- Fine-Pruning: Outperforms other methods, effectively erasing backdoor functionality in many cases, though it can still fail on specific classes.
- Trigger Influence: The number and rarity of triggers impact attack success, with more triggers and rarer triggers generally leading to higher ASR.
Limitations and Future Work
- Trigger Design: While the paper uses simple triggers, more sophisticated and invisible triggers could increase the attack's stealth. The paper notes that trigger selection is important and that "T4" was the worst-performing trigger in their experiments.
- Task Diversity: The current study focuses on classification tasks. The authors suggest it's necessary to explore the effects of NeuBA on generation systems (e.g., chatbots).
- Defense Exploration: While fine-pruning shows promise, it's not a perfect solution and can still fail on certain classes. Further exploration into model pruning and other defense strategies is recommended.
- Regulatory and Technical Defenses: The paper highlights the need for both regulatory measures (e.g., authenticating PTM sources) and technical defenses (like fine-tuning with pruning) to mitigate these risks.
Summary updated