Skip to main content
QUICK REVIEW

[Paper Review] On Improving Adversarial Transferability of Vision Transformers

Muzammal Naseer, Kanchana Ranasinghe|arXiv (Cornell University)|Jun 8, 2021
Adversarial Robustness in Machine LearningComputer Science54 references11 citations
TL;DR

This paper proposes a novel attack method to significantly improve the black-box transferability of adversarial examples in Vision Transformers (ViTs). By leveraging the hierarchical structure of ViTs through a self-ensemble of class tokens from all blocks and refining these tokens with structural patch information, the method enhances discriminative capacity and achieves state-of-the-art transferability across diverse models and datasets.

ABSTRACT

Vision transformers (ViTs) process input images as sequences of patches via self-attention; a radically different architecture than convolutional neural networks (CNNs). This makes it interesting to study the adversarial feature space of ViT models and their transferability. In particular, we observe that adversarial patterns found via conventional adversarial attacks show very \emph{low} black-box transferability even for large ViT models. We show that this phenomenon is only due to the sub-optimal attack procedures that do not leverage the true representation potential of ViTs. A deep ViT is composed of multiple blocks, with a consistent architecture comprising of self-attention and feed-forward layers, where each block is capable of independently producing a class token. Formulating an attack using only the last class token (conventional approach) does not directly leverage the discriminative information stored in the earlier tokens, leading to poor adversarial transferability of ViTs. Using the compositional nature of ViT models, we enhance transferability of existing attacks by introducing two novel strategies specific to the architecture of ViT models. (i) Self-Ensemble: We propose a method to find multiple discriminative pathways by dissecting a single ViT model into an ensemble of networks. This allows explicitly utilizing class-specific information at each ViT block. (ii) Token Refinement: We then propose to refine the tokens to further enhance the discriminative capacity at each block of ViT. Our token refinement systematically combines the class tokens with structural information preserved within the patch tokens.

Motivation & Objective

  • Investigate why high-performing ViT models exhibit low adversarial transferability despite strong generalization and performance.
  • Address the suboptimal attack procedures in existing methods that only use the final class token, ignoring intermediate discriminative features.
  • Leverage the modular, multi-block architecture of ViTs to design a more effective attack strategy that enhances transferability.
  • Demonstrate that adversarial transferability issues in ViTs stem from attack design rather than inherent model limitations.
  • Extend the proposed method to CNNs to evaluate its generalizability, showing improved but less impactful results compared to ViTs.

Proposed method

  • Propose a self-ensemble attack strategy that extracts and utilizes class tokens from every transformer block in a ViT, treating each as an independent classifier.
  • Introduce a token refinement mechanism that combines class tokens with structural information from patch tokens to enhance discriminative power at each block.
  • Construct an ensemble of classifiers using refined class tokens across all blocks, enabling the attack to exploit hierarchical feature representations.
  • Apply input diversity and iterative optimization (e.g., DIM) to the refined ensemble to generate more transferable adversarial perturbations.
  • Adapt the method to CNNs by finetuning intermediate features to align dimensions, enabling a comparable self-ensemble approach.
  • Use the refined ensemble as the objective function in the attack optimization process to maximize fooling of unknown target models.

Experimental results

Research questions

  • RQ1Why do high-capacity ViT models show low black-box adversarial transferability despite strong performance on clean data?
  • RQ2To what extent does the conventional attack strategy—focusing only on the final class token—limit the adversarial potential of ViTs?
  • RQ3Can the hierarchical structure of ViTs be exploited to create more transferable adversarial examples?
  • RQ4How does token refinement improve the discriminative quality of intermediate representations for adversarial attacks?
  • RQ5Does the proposed method generalize to other architectures like CNNs, and how does its performance compare across model types?

Key findings

  • The proposed self-ensemble with refined tokens achieves a 29.6% relative improvement in adversarial transferability on ImageNet compared to standard attacks, with a fool rate of 92.42% under ε ≤ 16.
  • The method improves transferability by up to 18.7 percentage points on ResNet-152 and 13.1 points on ViT-Base, demonstrating strong generalization across models.
  • Token refinement alone boosts transferability by 12.2–24.3 percentage points on different ViT variants, highlighting its effectiveness in enhancing feature discriminability.
  • The self-ensemble approach with refined tokens achieves a 28.8% relative improvement on CvT-S and 28.5% on CvT-T, showing consistent gains across ViT architectures.
  • While the method can be adapted to CNNs like ResNet50, the relative gains are significantly smaller (up to 29.6% on ViTs vs. ~20% on ResNet50), indicating stronger suitability for ViT architectures.
  • The attack success rate on DeiT-S reaches 92.42% under ε ≤ 16, outperforming standard DIM and DIM-E baselines by over 18 percentage points, confirming the method’s effectiveness.

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.