Skip to main content
QUICK REVIEW

[Paper Review] Exploring the Relationship between Architecture and Adversarially Robust Generalization

Aishan Liu, Shiyu Tang|arXiv (Cornell University)|Sep 28, 2022
Adversarial Robustness in Machine LearningComputer Science5 citations
TL;DR

This paper investigates the relationship between neural network architecture and adversarially robust generalization, finding that Vision Transformers (e.g., PVT, CoAtNet) generalize better across multiple $ε$-norm attacks than CNNs, which often overfit to specific attacks. The authors theoretically link this to higher weight sparsity in attention mechanisms, which enhances robustness via Rademacher complexity analysis.

ABSTRACT

Adversarial training has been demonstrated to be one of the most effective remedies for defending adversarial examples, yet it often suffers from the huge robustness generalization gap on unseen testing adversaries, deemed as the adversarially robust generalization problem. Despite the preliminary understandings devoted to adversarially robust generalization, little is known from the architectural perspective. To bridge the gap, this paper for the first time systematically investigated the relationship between adversarially robust generalization and architectural design. Inparticular, we comprehensively evaluated 20 most representative adversarially trained architectures on ImageNette and CIFAR-10 datasets towards multiple `p-norm adversarial attacks. Based on the extensive experiments, we found that, under aligned settings, Vision Transformers (e.g., PVT, CoAtNet) often yield better adversarially robust generalization while CNNs tend to overfit on specific attacks and fail to generalize on multiple adversaries. To better understand the nature behind it, we conduct theoretical analysis via the lens of Rademacher complexity. We revealed the fact that the higher weight sparsity contributes significantly towards the better adversarially robust generalization of Transformers, which can be often achieved by the specially-designed attention blocks. We hope our paper could help to better understand the mechanism for designing robust DNNs. Our model weights can be found at http://robust.art.

Motivation & Objective

  • To systematically investigate the impact of architectural design on adversarially robust generalization, especially across diverse $ε$-norm attacks.
  • To identify architectural factors that contribute to better generalization under adversarial robustness training.
  • To explain why Vision Transformers generalize better than CNNs on unseen adversaries, despite similar training setups.
  • To theoretically analyze the role of weight sparsity in adversarially robust generalization using Rademacher complexity.

Proposed method

  • Comprehensive evaluation of 20 adversarially trained architectures (including ViT, PVT, ResNet, VGG) on ImageNette and CIFAR-10 under multiple $ε$-norm attacks ($\ell_1$, $\ell_2$, $\ell_\infty$).
  • Training all models under aligned hyperparameters to ensure fair comparison across architectures.
  • Theoretical analysis using Rademacher complexity to link weight sparsity to improved robust generalization in Transformers.
  • Evaluation of generalization under common corruptions using CIFAR-10-C and ImageNette-C to assess robustness beyond adversarial examples.
  • Ablation studies on patch size and architectural components (e.g., attention blocks) to isolate their impact on robustness.

Experimental results

Research questions

  • RQ1Do Vision Transformers generalize better than CNNs across multiple $ε$-norm adversaries under adversarial training?
  • RQ2What architectural properties contribute to better adversarially robust generalization?
  • RQ3How does weight sparsity influence adversarially robust generalization, and is it a key factor in Transformers?
  • RQ4Why do CNNs tend to overfit to specific attacks while Transformers generalize better across multiple attack types?
  • RQ5Can Rademacher complexity be used to theoretically explain the robust generalization behavior of different architectures?

Key findings

  • Vision Transformers such as PVT and CoAtNet achieve significantly better worst-case robust accuracy across multiple $ε$-norm attacks (e.g., 33.54% worst-case accuracy for PVTv2 with patch size 4 on ImageNette) compared to CNNs.
  • CNNs like ResNet and VGG exhibit strong overfitting to specific attacks, with worst-case accuracy dropping to as low as 21.10% for ViTAE under $\ell_1$ attack.
  • Transformers show superior generalization on common corruptions: for example, CoAtNet achieves 79.91% CIFAR-10-C accuracy, outperforming ResNet (81.20% clean, 79.24% CIFAR-10-C) on corruption generalization.
  • Theoretical analysis reveals that higher weight sparsity—commonly achieved via attention blocks—significantly improves adversarially robust generalization, as formalized through Rademacher complexity bounds.
  • PVTv2 with patch size 1 achieves 94.60% vanilla accuracy and 54.59% $\ell_\infty$-PGD robust accuracy on ImageNette, indicating strong robust generalization across attack types.
  • On ImageNet, the generalization gap between clean and robust accuracy is larger for Transformers than CNNs, suggesting architectural design must be tailored to the specific robustness and generalization trade-offs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.