Abstract
Deep neural networks are notoriously vulnerable to adversarial attacks, where small, imperceptible perturbations lead to incorrect predictions. Traditional adversarial training is data-intensive, requiring large labeled datasets to generalize effectively. This paper proposes Adversarial Contrastive Learning (ACL), a self-supervised pre-training framework that leverages unlabeled data to build robust representations. By integrating adversarial perturbations into a contrastive learning objective, ACL achieves state-of-the-art robustness and exceptional label efficiency, maintaining high performance even with only 1% of labels available.
Introduction
The fragility of deep learning models to adversarial examples is a significant barrier to their deployment in safety-critical applications. While adversarial training (AT) is the most effective defense, its reliance on vast amounts of labeled data makes it impractical for many domains. Conversely, standard self-supervised learning (SSL) has shown great success in learning from unlabeled data but typically fails to provide inherent adversarial robustness.
This research bridges the gap by introducing ACL. The core hypothesis is that adversarial vulnerability arises from a lack of feature invariance—where small input changes result in large shifts in the feature space. By forcing a model to recognize that an image and its adversarially perturbed counterpart should have similar internal representations, ACL "bakes in" robustness during the pre-training phase before a single label is ever seen.
Methodology: Adversarial Contrastive Learning
The authors build upon the SimCLR framework, which learns features by maximizing similarity between different augmentations of the same image. ACL extends this by introducing adversarial views into the contrastive objective.
ACL Variants
The paper investigates three primary architectural configurations for injecting robustness:
- Adversarial-to-Adversarial (A2A): The model minimizes the distance between two different adversarially perturbed versions of the same image.
- Adversarial-to-Standard (A2S): The model aligns a perturbed view with a standard "clean" augmented view.
- Dual Stream (DS): This hybrid approach combines a standard contrastive stream (clean-to-clean) with an adversarial stream (adversarial-to-adversarial).
Dual Batch Normalization
A significant technical hurdle identified is the distribution shift between clean and adversarial features. Standard Batch Normalization (BN) layers struggle to accommodate both simultaneously. To resolve this, the authors employ Dual Batch Normalization, using separate BN parameters for the standard and adversarial streams. This allows the model to maintain high accuracy on clean images while effectively learning robust features from adversarial ones.
Experimental Setup
The proposed methods were evaluated on CIFAR-10 and CIFAR-100 benchmarks. Robustness was further tested using CIFAR-10-C (common corruptions) and a suite of 19 unforeseen adversarial attacks to ensure the learned robustness generalizes beyond the training attack (PGD).
Key Results and Discussion
The Dual Stream (DS) variant emerged as the most effective configuration. On CIFAR-10, ACL (DS) achieved a significant improvement over previous unsupervised robust pre-training methods, gaining 2.99% in robust accuracy (RA) and 2.14% in standard accuracy (TA).
Label Efficiency: The 1% Miracle
One of the most compelling findings is ACL's performance in low-label regimes. When fine-tuned with only 1% of the available labels, ACL maintained a robust accuracy of 50.67%. In comparison, existing state-of-the-art methods saw performance drops to the 30-37% range. This suggests that ACL pre-training provides a superior starting point for downstream tasks, particularly when labeled data is scarce.
Generalization to Unforeseen Threats
The robustness gained through ACL is not limited to the specific PGD attack used during pre-training. The models demonstrated enhanced resistance to various image corruptions (e.g., fog, snow, blur) and diverse adversarial attack types. This indicates that the contrastive objective successfully encourages the learning of truly invariant and robust features.
Conclusion and Future Work
Adversarial Contrastive Learning represents a significant step forward in robust deep learning. By leveraging unlabeled data, it mitigates the data-hungry nature of traditional adversarial training. While the computational cost of generating adversarial examples during pre-training is a factor, the gains in label efficiency and general robustness are substantial. Future research may focus on scaling ACL to larger datasets like ImageNet and exploring more diverse perturbation types to further enhance generalizability.
Summary updated