SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.04169 · ICLR · 2022

On Improving Adversarial Transferability of Vision Transformers

Muzammal Naseer, Kanchana Ranasinghe, Salman Khan, Shahbaz Khan, § Fahad, Fatih Porikli

arXiv · PDF · Open in the Atlas

Code that ran

None of the 5 samples (functions and classes) lifted from this paper's linked repositories has a recorded run on a synthesized input (5 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2106.04169.json · badge: /api/ran/2106.04169.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Trustworthy-AI-Group/TransferAttack community
Papers with Code archive
0 ran · 5 no recorded run
FunctionStatusWhere it lives
ATA_ViT Not yet run
unverified (harvested, no recorded run)
Trustworthy-AI-Group/TransferAttack/transferattack/model_related/ata_vit.py
code served (permissive licence) · get_code("f83e95f5a695bfd7")
How it ran

no invocation recorded.

ATTENTION_RIGION Not yet run
unverified (harvested, no recorded run)
Trustworthy-AI-Group/TransferAttack/transferattack/model_related/ata_vit.py
code served (permissive licence) · get_code("0dc28352f69954a3")
How it ran

no invocation recorded.

DataPreprocess Not yet run
unverified (harvested, no recorded run)
Trustworthy-AI-Group/TransferAttack/transferattack/model_related/ata_vit.py
code served (permissive licence) · get_code("af70a9972ba879db")
How it ran

no invocation recorded.

EMBED_POSITION Not yet run
unverified (harvested, no recorded run)
Trustworthy-AI-Group/TransferAttack/transferattack/model_related/ata_vit.py
code served (permissive licence) · get_code("f07bcf48ac48841e")
How it ran

no invocation recorded.

LRP Not yet run
unverified (harvested, no recorded run)
Trustworthy-AI-Group/TransferAttack/transferattack/model_related/ata_vit.py
code served (permissive licence) · get_code("55ecfa16f5b4e071")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Vision transformers (ViTs) process input images as sequences of patches via selfattention; 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 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. An adversarial attack when applied to such refined tokens within the ensemble of classifiers found in a single vision transformer has significantly higher transferability and thereby brings out the true generalization potential of the ViT's adversarial space. Code: https://t.ly/hBbW.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2106.04169")
get_code_for_paper("2106.04169")
have("2106.04169")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2106.04169.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2106.04169.svg)](https://syntology.ai/paper/2106.04169)

Connect an agent — have() is free.