Lune

NeurIPS2024Top-tier venue

DeSparsify: Adversarial Attack Against Token Sparsification Mechanisms

Oryan Yehezkel, Alon Zolfi, Amit Baras, Yuval Elovici, Asaf Shabtai

Abstract

Vision transformers have contributed greatly to advancements in the computer vision domain, demonstrating state-of-the-art performance in diverse tasks (e.g., image classification, object detection). However, their high computational requirements grow quadratically with the number of tokens used. Token sparsification mechanisms have been proposed to address this issue. These mechanisms employ an input-dependent strategy, in which uninformative tokens are discarded from the computation pipeline, improving the model's efficiency. However, their dynamism and average-case assumption makes them vulnerable to a new threat vector -carefully crafted adversarial examples capable of fooling the sparsification mechanism, resulting in worst-case performance. In this paper, we present DeSparsify, an attack targeting the availability of vision transformers that use token sparsification mechanisms. The attack aims to exhaust the operating system's resources, while maintaining its stealthiness. Our evaluation demonstrates the attack's effectiveness on three token sparsification mechanisms and examines the attack's transferability between them and its effect on the GPU resources. To mitigate the impact of the attack, we propose various countermeasures. The source code is available online 1 .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • A-ViT: Adaptive Tokens for Efficient Vision Transformer cites Training data-efficient image transformers & distillation through attention
  • A-ViT: Adaptive Tokens for Efficient Vision Transformer cites Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
  • Towards Transferable Adversarial Attacks on Vision Transformers cites Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
  • Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet cites Training data-efficient image transformers & distillation through attention
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. EventFlash: Towards Efficient MLLMs for Event-Based VisionShaoyu Liu, Jianing Li, Guanghui Zhao, Yunjian Zhang et al.ICLR 2026 · 5 citations

Builds on13

  1. Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
  2. Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetLi Yuan, Yunpeng Chen, Tao Wang, Weihao Yu et al.ICCV 2021 · 2,462 citations
  3. A-ViT: Adaptive Tokens for Efficient Vision TransformerHongxu Yin, Arash Vahdat, José M. Álvarez, Arun Mallya et al.CVPR 2022 · 288 citations
  4. On the Robustness of Vision Transformers to Adversarial ExamplesKaleel Mahmood, Rigel Mahmood, Marten van DijkICCV 2021 · 261 citations
  5. Towards Transferable Adversarial Attacks on Vision TransformersZhipeng Wei, Jingjing Chen, Micah Goldblum, Zuxuan Wu et al.AAAI 2022 · 156 citations

Related papers

  1. SPOT: Sparsification with Attention Dynamics via Token Relevance in Vision TransformersOded Schlesinger, Amirhossein Farzam, J. Matias Di Martino, Guillermo SapiroCVPR Findings 2026
  2. Harnessing the Computation Redundancy in ViTs to Boost Adversarial TransferabilityJiani Liu, Zhiyuan Wang, Zeliang Zhang, Chao Huang et al.NeurIPS 2025 · 7 citations
  3. DynamicViT: Efficient Vision Transformers with Dynamic Token SparsificationYongming Rao, Wenliang Zhao, Benlin Liu, Jiwen Lu et al.NeurIPS 2021 · 1,343 citations
  4. Frequency-Aware Token Reduction for Efficient Vision TransformerDongJae Lee, Jiwan Hur, Jaehyun Choi, Jaemyung Yu et al.NeurIPS 2025 · 4 citations
  5. Enhancing Vision Transformers for Object Detection via Context-Aware Token Selection and PackingTianyi Zhang, Baoxin Li, Jae-sun Seo, Yu CaoICLR 2026
Dusk over the sea between two cliffs drawn in fine vertical lines