Abstract
Self-Supervised Learning (SSL) has become a prominent paradigm for pre-training encoders to learn general-purpose representations from unlabeled data. However, SSL is vulnerable to backdoor attacks, where an adversary may distribute poisoned pre-training encoders to contaminate downstream models. In this paper, we study a defense mechanism based on distillation to extract benign knowledge and remove backdoors from poisoned pre-trained encoders. Based on two state-of-the-art backdoor attacks and four widely adopted image classification datasets, our results demonstrate that distillation reduces the attack success rate from 80.87% to 27.51%, with only a 6.35% drop in model accuracy. We find that distillation with fine-tuned teacher networks, warm-up-based student training, and attention-based distillation losses yield the best performance.
Introduction
The "pre-train once, use everywhere" paradigm in self-supervised learning has introduced significant security vulnerabilities, most notably Backdoor Attacks. An adversary can release a poisoned encoder that behaves normally on clean data but misclassifies any input containing a specific "trigger" (e.g., a small pixel patch). Existing defenses like trigger inversion or neuron pruning often struggle in the label-free, high-parameter world of SSL. This research explores whether Knowledge Distillation (KD) can serve as an effective "purification" mechanism to extract benign knowledge while filtering out malicious triggers.
Methodology: Distillation-based Mitigation
The proposed framework repurposes distillation to transfer high-level semantic features from a poisoned teacher to a clean student model. The core "aha" moment is that backdoors are often represented as low-level features; distillation acts as a sieve that lets benign knowledge through while blocking these malicious shortcuts.
The process involves three key components:
- Teacher Net Design: Instead of using the raw poisoned encoder, the researchers first perform a "purification" step by fine-tuning (FT) the encoder on a small set of clean data to break the trigger-target association.
- Student Net Design: The student model undergoes "warm-up training," where it is briefly pre-trained on a small clean dataset before the main distillation process begins.
- Distillation Loss: The study found that Attention-based Transfer Distillation (AT-ATD) performed best. This method forces the student to focus on the same spatial importance maps as the teacher, effectively ignoring the pixel-level triggers.
Experimental Results
The defense was evaluated across four benchmarks: CIFAR10, STL10, GTSRB (Traffic Signs), and SVHN (Street View House Numbers).
Effectiveness and Utility
Across various attacks (such as BadEncoder and BASSL), distillation slashed the average Attack Success Rate (ASR) from 80.87% down to 27.51%. This security gain came at a modest cost to Accuracy (ACC), which only dropped by 6.35% on average. The framework also proved robust against cutting-edge attacks like CTRL and DRUPE, reducing CTRL's ASR from 44.05% to 9.68%.
Key Insights
- Model Depth is a Shield: Larger models (like ResNet50) are easier to defend via distillation because their depth allows the loss to be applied more granularly across the architecture.
- Dataset Complexity: The defense was less effective on the SVHN dataset. Its "noisy" nature (multiple digits in one frame) makes it harder for the model to distinguish between legitimate features and malicious triggers.
Conclusion and Limitations
While knowledge distillation is a powerful tool for purifying SSL encoders, challenges remain. Advanced attacks like BLTO, which use bi-level optimization to entangle backdoor features with benign ones, proved more resistant, with ASR remaining around 40%. Additionally, the defense requires access to a small portion (e.g., 5%) of clean data. Future work will explore distillation frameworks that explicitly separate feature subspaces to better handle entangled backdoors.
Summary updated