: Detecting adversarial examples for Vision Transformers with one additional token

As the latest architecture, Vision Transformer (ViT) is vulnerable to adversarial attacks, which can cause errors in downstream tasks of the model. Previous defense methods against adversarial attacks tend to introduce significant inference latency or require additional training, resulting in increased defense costs. In this paper, we design a lightweight adversarial example detection framework for ViT, called Detection Token . By adding a pre-trained token called a detection token to the input token sequence, this token automatically collects adversarial information during the inference process and outputs linearly separable detection results along with the model output. Our method introduces only one additional token, requires minimal training overhead (converging within 2 ∼ 3 loops), and achieves high classification accuracy with minimal impact on normal tasks. Experiments on ImageNet demonstrate the effectiveness of our method, achieving an AUC score of 0.99 on three strong attacks (FGSM, PGD, BIM) on three representative ViTs, while the loss for normal tasks is less than 1%.

Authors

Institutions

Publication Details

Journal
High-Confidence Computing
Published
2025-09-01
DOI
https://doi.org/10.1016/j.hcc.2025.100353
Primary Topic
Adversarial Robustness in Machine Learning
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

: Detecting adversarial examples for Vision Transformers with one additional token

Yuting Tang, Xinlong Wu, Wenyuan Xu, Bin Li et al.
High-Confidence Computing
Adversarial Robustness in Machine Learning
article

: Detecting adversarial examples for Vision Transformers with one additional token

Yuting Tang, Xinlong Wu, Wenyuan Xu, Bin Li, Xiaobo Liu, Bingqian Zhou
article en

Abstract

As the latest architecture, Vision Transformer (ViT) is vulnerable to adversarial attacks, which can cause errors in downstream tasks of the model. Previous defense methods against adversarial attacks tend to introduce significant inference latency or require additional training, resulting in increased defense costs. In this paper, we design a lightweight adversarial example detection framework for ViT, called Detection Token . By adding a pre-trained token called a detection token to the input token sequence, this token automatically collects adversarial information during the inference process and outputs linearly separable detection results along with the model output. Our method introduces only one additional token, requires minimal training overhead (converging within 2 ∼ 3 loops), and achieves high classification accuracy with minimal impact on normal tasks. Experiments on ImageNet demonstrate the effectiveness of our method, achieving an AUC score of 0.99 on three strong attacks (FGSM, PGD, BIM) on three representative ViTs, while the loss for normal tasks is less than 1%.

High-Confidence Computing
FIT Consulting (Italy) (IT), China Huadian Corporation (China) (CN), Zhejiang Medicine (China) (CN), Zhejiang University (CN)
Openalex Percentile: Top 87%
Adversarial Robustness in Machine Learning
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.