Abstract
As a new paradigm in machine learning, self-supervised learning (SSL) is capable of learning high-quality representations of complex data without relying on labels. In addition to eliminating the need for labeled data, research has found that SSL improves the adversarial robustness over supervised learning since lacking labels makes it more challenging for adversaries to manipulate model predictions. However, the extent to which this robustness superiority generalizes to other types of attacks remains an open question. We explore this question in the context of backdoor attacks. Specifically, we design and evaluate CTRL, an embarrassingly simple yet highly effective self-supervised backdoor attack. By only polluting a tiny fraction of training data (<= 1%) with indistinguishable poisoning samples, CTRL causes any trigger-embedded input to be misclassified to the adversary's designated class with a high probability (>= 99%) at inference time. Our findings suggest that SSL and supervised learning are comparably vulnerable to backdoor attacks. More importantly, through the lens of CTRL, we study the inherent vulnerability of SSL to backdoor attacks. With both empirical and analytical evidence, we reveal that the representation invariance property of SSL, which benefits adversarial robustness, may also be the very reason making SSL highly susceptible to backdoor attacks. Our findings also imply that the existing defenses against supervised backdoor attacks are not easily retrofitted to the unique vulnerability of SSL.
Introduction
Self-supervised learning (SSL) has emerged as a transformative paradigm in machine learning, enabling the training of high-performance models on vast quantities of unlabeled data. By learning rich representations through pretext tasks—such as contrastive learning—SSL avoids the bottleneck of manual labeling. Beyond efficiency, early research suggested that SSL might be inherently more robust than supervised learning (SL) against adversarial threats, primarily because the absence of explicit labels during pre-training makes it harder for attackers to target specific classification outcomes.
However, this paper challenges that assumption by introducing CTRL (Contrastive TRojan Learning), an "embarrassingly simple" yet devastatingly effective backdoor attack. The authors demonstrate that SSL is, in fact, highly vulnerable, and ironically, the very features that make SSL robust to other attacks make it a perfect target for backdoors.
The CTRL Attack Methodology
The core of the CTRL attack lies in its simplicity and stealth. Unlike traditional backdoor attacks that might use visible patches or "stickers," CTRL employs a spectral trigger. This trigger is generated by applying a frequency-domain perturbation to the chrominance (color) channels of an image using a Discrete Cosine Transform (DCT). The resulting trigger is nearly invisible to the human eye but remains "global" and "repetitive" across the image. This design ensures the trigger is augmentation-resistant, allowing it to survive the heavy cropping and flipping typical in SSL training pipelines.
The attack process follows a standard pipeline as illustrated above:
- Poisoning: The adversary injects a small amount of poisoned data (typically ≤ 1%) into the unlabeled training set.
- Pre-training: The victim trains an SSL encoder (the "Trojan Encoder") on this dataset.
- Fine-tuning: The poisoned encoder is fine-tuned on a clean, labeled downstream task to create the final classifier.
- Inference: At runtime, any input containing the spectral trigger is misclassified into the adversary's target class with near certainty, while the model maintains high accuracy on clean data.
The Robustness Paradox: Why SSL is Vulnerable
The most profound insight of this research is that the very mechanism providing SSL its robustness—representation invariance—is also its Achilles' heel. SSL algorithms like SimCLR or BYOL aim to map different augmented "views" of the same image to the same point in the representation space. CTRL exploits this by ensuring the spectral trigger is invariant to common augmentations.
As shown in the figure above, while supervised learning directly maps triggers to labels, SSL entangles the trigger with the target class's representation. Because the trigger survives augmentations, the model learns to treat the malicious trigger as a fundamental feature of the target category. This "representation entanglement" means the backdoor is baked into the encoder's fundamental understanding of the data, making it incredibly difficult to detect or remove using standard statistical methods.
Experimental Evaluation
The authors evaluated CTRL across several standard computer vision benchmarks, including CIFAR-10, CIFAR-100, ImageNet-100, and the GTSRB (German Traffic Sign Recognition Benchmark). The results were stark:
- High Effectiveness: With only 1% poisoning of the training data, CTRL achieved an Attack Success Rate (ASR) of over 99% on CIFAR-10.
- Cross-Method Success: The attack worked consistently across different SSL frameworks, including SimCLR, BYOL, and SimSiam.
- Transferability: Even if a model is pre-trained on poisoned data and then fine-tuned for a completely different task (e.g., pre-trained on CIFAR but used for traffic signs), the backdoor remains active and effective.
- Defense Failure: State-of-the-art defenses like Activation Clustering and SCAn failed to detect CTRL because the poisoned representations were so perfectly entangled with clean ones that they did not appear as statistical outliers.
Conclusion
CTRL demonstrates that SSL and supervised learning are comparably vulnerable to backdoor attacks. The "representation invariance" property, while beneficial for general robustness, provides a unique vector for stealthy attacks that bypass traditional defenses. This work highlights an urgent need for the development of new defensive strategies specifically tailored to the self-supervised paradigm, as traditional label-based defenses are insufficient to counter representation-level poisoning.
Summary updated