Consistency Regularization for Adversarial Robustness

Jihoon Tack, Sihyun Yu, Jongheon Jeong, Minseon Kim, Sung Ju Hwang, Jinwoo Shin

Abstract

Adversarial Training (AT) is the primary defense against adversarial attacks but frequently suffers from "robust overfitting," where a model's performance on unseen test data collapses despite improvements on training data. This paper introduces a novel consistency regularization technique that enforces similar predictive distributions across different independently attacked augmentations of the same input. This approach significantly enhances generalization, mitigates overfitting, and improves robustness against both seen and unseen adversaries.

Introduction: The Challenge of Robust Overfitting

Deep neural networks are highly susceptible to adversarial examples—inputs modified by imperceptible perturbations that trigger incorrect classifications. While Adversarial Training (AT) remains the gold standard for defense, it faces a significant hurdle: robust overfitting. Unlike standard training, where test accuracy typically plateaus, test robustness in AT often peaks early and then declines sharply as training continues.

Previous research suggested that standard data augmentation (e.g., cropping or flipping) provided limited benefits in AT. This paper challenges that view, arguing that the issue lies not in the augmentation itself, but in how it is integrated into the training objective. By leveraging diverse augmentations through a consistency-based framework, the authors demonstrate that robust overfitting can be effectively managed.

Proposed Method: Consistency Across Attacks

The core contribution is a training objective that augments standard AT with a Consistency Regularization (CR) term. The process follows four key steps:

  1. Dual Augmentation: Each input image is processed into two distinct random augmentations (e.g., using AutoAugment).
  2. Independent Attacks: The model generates separate adversarial perturbations ($\delta_1, \delta_2$) for each augmented version.
  3. Consistency Loss: The model minimizes the Jensen-Shannon (JS) divergence between the predictive distributions of these two independently attacked images.
  4. Temperature Scaling: A temperature hyperparameter ($\tau$) is used to sharpen predictive distributions, compensating for the reduced confidence typical of models under adversarial attack.
Figure 1: Comparison between conventional consistency regularization and the proposed method. The proposed CR enforces consistency between two independently attacked augmented versions of the same image.

Unlike previous methods that compared a "clean" image to an "augmented" one—which the authors find can actually harm robust accuracy—this method focuses on consistency between multiple attacked views. This forces the model to learn stable representations that are invariant to both the specific augmentation and the specific adversarial direction.

Experimental Results and Insights

The researchers evaluated the method on CIFAR-10, CIFAR-100, and Tiny-ImageNet against a suite of attacks, including PGD and AutoAttack.

Mitigating Overfitting

A primary result is the successful mitigation of robust overfitting. As shown in the training curves, while standard augmentations like cropping and flipping still result in a significant drop in robust accuracy after the learning rate decay (around epoch 100), the proposed method combined with diverse augmentations like AutoAugment maintains high performance throughout the training process.

Figure 2: Robust accuracy over training epochs. The proposed method using AutoAugment (blue) effectively prevents the sharp decline in test robustness (robust overfitting) seen with simpler augmentation schemes.

Key Performance Gains

  • Robust Accuracy Boost: On CIFAR-10, adding consistency to standard AT improved PGD-100 robust accuracy from 44.86% to 56.38%.
  • Generalization to Unseen Attacks: The model showed remarkable transferability to attacks it was not trained on. For instance, $l_1$-robustness on CIFAR-10 increased from 29.58% to 48.32%.
  • Data Efficiency: The method is highly effective even with limited data. Using only 10% of CIFAR-10 training data, it achieved 41.2% robust accuracy, significantly outperforming other state-of-the-art regularizers like AWP (34.7%).

Conclusion and Limitations

This work demonstrates that data augmentation is a powerful tool for adversarial robustness when paired with the right consistency constraints. By enforcing stability across different adversarial views, the model captures the "dark knowledge" of attack directions—the information about which classes are most easily confused—leading to more robust decision boundaries.

The main limitation is computational cost, as generating two sets of adversarial examples per step roughly doubles the training time. However, the substantial gains in generalization and the reduction in overfitting suggest that consistency regularization is a vital component for future robust deep learning research.

Summary updated

BibTeX
@inproceedings{tack2022consistency,
  author = {Jihoon Tack and Sihyun Yu and Jongheon Jeong and Minseon Kim and Sung Ju Hwang and Jinwoo Shin},
  title = {{Consistency Regularization for Adversarial Robustness}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i8.20817},
}
Figure