Understanding Adversarial Robustness of Vision Transformers via Cauchy Problem

Zheng Wang, Wenjie Ruan
8/1/2022
cs.CVcs.LG

No official code found. Best implementation: TrustAI/ODE4RobustViT (6 stars, MIT, last commit 2023-04-02).

Abstract

Recent research on the robustness of deep learning has shown that Vision Transformers (ViTs) surpass the Convolutional Neural Networks (CNNs) under some perturbations, e.g., natural corruption, adversarial attacks, etc. Some papers argue that the superior robustness of ViT comes from the segmentation of its input images; others say that the Multi-head Self-Attention (MSA) is the key to preserving the robustness. In this paper, we aim to introduce a principled and unified theoretical framework to investigate such an argument on ViT's robustness. We first theoretically prove that, unlike Transformers in Natural Language Processing, ViTs are Lipschitz continuous. Then we theoretically analyze the adversarial robustness of ViTs from the perspective of the Cauchy Problem, via which we can quantify how the robustness propagates through layers. We demonstrate that the first and last layers are the critical factors to affect the robustness of ViTs. Furthermore, based on our theory, we empirically show that unlike the claims from existing research, MSA only contributes to the adversarial robustness of ViTs under weak adversarial attacks, e.g., FGSM, and surprisingly, MSA actually comprises the model's adversarial robustness under stronger attacks, e.g., PGD attacks.

View on arXivView PDF

Code Implementations(1)

MIT

Understanding Adversarial Robustness of Vision Transformers via Cauchy Problem - ECML 2022 & Software Impacts (2023)

64Python, Jupyter NotebookJun 28, 20223 years agoMIT

Similar Papers

Cite this paper

@article{wang2022understanding,
  title  = {Understanding Adversarial Robustness of Vision Transformers via Cauchy Problem},
  author = {Zheng Wang and Wenjie Ruan},
  year   = {2022},
  eprint = {2208.00906},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2208.00906v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2208.00906.svg)](https://codeofpaper.com/paper/2208.00906)

Discussion