Self-Supervised Adversarial Training via Diverse Augmented Queries and Self-Supervised Double Perturbation

Ruize Zhang, Sheng Tang, Juan Cao

TL;DR

Researchers have developed DAQ-SDP, a new framework that significantly narrows the performance gap between self-supervised and supervised adversarial training. By combining diverse data augmentations with a "double perturbation" strategy (perturbing both inputs and model weights), the method improves both the robustness and the natural accuracy of models trained without any labels.

What Problem Does This Paper Address?

Deep neural networks are notoriously vulnerable to adversarial attacks—tiny, intentional perturbations to an image that cause a model to misclassify it. While "Adversarial Training" (AT) is a standard defense, it usually requires massive amounts of labeled data.

Self-Supervised Adversarial Training (SAT) aims to learn robust features from unlabeled data. However, SAT faces two major hurdles:

  1. The Robust Generalization Gap: Models often become robust to the specific images they saw during training but fail to generalize that robustness to new, unseen test images.
Illustration of the robust generalization gap, showing a significant drop from training robust accuracy to test robust accuracy.
  1. Natural Accuracy Degradation: Making a model robust often makes it worse at classifying normal, "clean" images.

Previous research suggested that the complex data augmentations (like heavy color jittering or cropping) essential for self-supervised learning actually hurt robustness. This paper challenges that notion, arguing that the problem isn't the complexity of the data, but how the model is regularized during training.

Methodology: The DAQ-SDP Framework

The authors propose a two-part solution called DAQ-SDP (Diverse Augmented Queries Self-supervised Double Perturbation):

1. Diverse Augmented Queries (DAQ)

Instead of sticking to simple flips and crops, DAQ uses TrivialAugment—a strategy that randomly applies a wide variety of strong augmentations.

The DAQ-SDP architecture featuring a multi-stream approach with Pairwise-BatchNorm and a frozen teacher encoder.
  • The Multi-Stream Approach: To prevent these diverse images from "confusing" the model, they use a Pairwise-BatchNorm structure. The model maintains separate Batch Normalization layers for different data streams (e.g., one for clean/weakly augmented data, one for adversarial/strongly augmented data).
  • Teacher-Student Guidance: A naturally trained SSL model acts as a "frozen" teacher, providing stable feature targets (queries) that the adversarial "student" model tries to match, even when the student is looking at heavily distorted or attacked images.

2. Self-Supervised Double Perturbation (SDP)

In supervised learning, "Adversarial Weight Perturbation" (AWP) is a technique that slightly alters the model's weights during training to find a "flatter" spot in the loss landscape, which leads to better generalization.

  • The authors adapt this to the label-free world. By perturbing the weights to maximize the self-supervised similarity loss, they force the model to learn features that are inherently more stable. This "double perturbation" (perturbing the input image AND the model weights) acts as a powerful regularizer.

Datasets and Evaluation

The authors evaluated their method on standard computer vision benchmarks:

  • CIFAR-10 & CIFAR-100: Small-scale image datasets used to measure both clean accuracy and robustness against attacks like PGD and AutoAttack.
  • STL-10: Used specifically for transfer learning experiments to see if features learned on one dataset remain robust when applied to a different domain.

Key Insights and Results

  • Augmentation is not the enemy: Contrary to prior belief, strong augmentations can boost SAT robustness. The trick is using them as "queries" to distill information from a clean teacher model rather than using them directly in the adversarial generation step.
  • Smoothness Transfers: One of the most surprising findings is that smoothing the loss landscape of a pretext task (like predicting if two crops are from the same image) actually improves the robustness of the downstream task (like actual classification).
  • Framework Agnostic: DAQ-SDP isn't tied to one specific SSL method. The authors successfully "plugged it in" to SimCLR, SimSiam, and BYOL, seeing improvements across the board.

The method consistently outperformed previous state-of-the-art SAT methods:

  • Better Robustness: On CIFAR-100 using a ResNet-34, DAQ-SDP achieved 23.42% AutoAttack accuracy, a significant jump over the previous benchmark of 21.31%.
  • Higher Natural Accuracy: Unlike many methods that sacrifice clean performance for safety, DAQ-SDP improved clean accuracy by over 2% on CIFAR-100 compared to the baseline.
  • Reduced Gap: The "robust generalization gap" (the difference between training and test robustness) was reduced by roughly 3%, proving the weight perturbation strategy effectively regularized the model.

Limitations and Future Work

  • Model Capacity: The authors noted that the benefits of DAQ-SDP are less pronounced on very small models like ResNet-18. It seems that "distilling" rich, diverse information requires a backbone with enough parameters to handle the increased data complexity.
  • Computational Cost: Generating adversarial weights and diverse queries adds an extra layer of computation. While the authors argue it is more efficient than some 1000-epoch alternatives, it still requires more compute than standard training.
  • Future Directions: The authors suggest exploring how these techniques might scale to even larger models (like Vision Transformers) or more complex, real-world datasets beyond the CIFAR family.

Summary updated

BibTeX
@inproceedings{zhang2024self,
  author = {Ruize Zhang and Sheng Tang and Juan Cao},
  title = {{Self-Supervised Adversarial Training via Diverse Augmented Queries and Self-Supervised Double Perturbation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=CIHdlhfrOo},
}
Figure