Skip to main content
QUICK REVIEW

[Paper Review] Evo-ViT: Slow-Fast Token Evolution for Dynamic Vision Transformer

Yifan Xu, Zhijie Zhang|arXiv (Cornell University)|Aug 3, 2021
CCD and CMOS Imaging SensorsEngineering15 citations
TL;DR

Evo-ViT proposes a self-motivated slow-fast token evolution method for dynamic vision transformers that enables unstructured, instance-wise token selection using native global class attention, while preserving spatial structure through dual computation paths. It accelerates DeiT-S by over 60% with only 0.4% top-1 accuracy drop on ImageNet-1K, outperforming existing pruning methods in both efficiency and accuracy preservation.

ABSTRACT

Vision transformers (ViTs) have recently received explosive popularity, but the huge computational cost is still a severe issue. Since the computation complexity of ViT is quadratic with respect to the input sequence length, a mainstream paradigm for computation reduction is to reduce the number of tokens. Existing designs include structured spatial compression that uses a progressive shrinking pyramid to reduce the computations of large feature maps, and unstructured token pruning that dynamically drops redundant tokens. However, the limitation of existing token pruning lies in two folds: 1) the incomplete spatial structure caused by pruning is not compatible with structured spatial compression that is commonly used in modern deep-narrow transformers; 2) it usually requires a time-consuming pre-training procedure. To tackle the limitations and expand the applicable scenario of token pruning, we present Evo-ViT, a self-motivated slow-fast token evolution approach for vision transformers. Specifically, we conduct unstructured instance-wise token selection by taking advantage of the simple and effective global class attention that is native to vision transformers. Then, we propose to update the selected informative tokens and uninformative tokens with different computation paths, namely, slow-fast updating. Since slow-fast updating mechanism maintains the spatial structure and information flow, Evo-ViT can accelerate vanilla transformers of both flat and deep-narrow structures from the very beginning of the training process. Experimental results demonstrate that our method significantly reduces the computational cost of vision transformers while maintaining comparable performance on image classification.

Motivation & Objective

  • To address the inefficiency of vision transformers caused by quadratic computation with sequence length.
  • To overcome limitations of existing token pruning methods that disrupt spatial structure and require pre-training.
  • To enable efficient, dynamic token selection from scratch in both flat and deep-narrow transformer architectures.
  • To maintain information flow and spatial consistency during computation reduction.
  • To develop a plug-in solution compatible with structured compression methods like those in deep-narrow ViTs.

Proposed method

  • Utilizes global class attention from the final layer to dynamically identify informative and placeholder tokens per input instance.
  • Introduces a slow-fast updating mechanism: informative tokens are processed through full computation paths, while placeholder tokens use lightweight paths.
  • Preserves the complete spatial structure and information flow by not removing tokens, instead reweighting their contribution via dual paths.
  • Employs a layer-to-stage training strategy to gradually stabilize token selection across deeper layers.
  • Applies consistent token keeping ratios across layers, with optimal performance achieved at uniform ratios (e.g., 50% across all layers).
  • Uses attention scores from the class token in deeper layers as a dynamic, data-dependent criterion for token selection.

Experimental results

Research questions

  • RQ1Can unstructured token selection be effectively applied from scratch in vision transformers without disrupting spatial structure?
  • RQ2How can dynamic, instance-wise token selection be achieved without requiring pre-training or fixed pruning masks?
  • RQ3Can a dual-path (slow-fast) updating mechanism maintain performance while reducing computation in both flat and deep-narrow ViT architectures?
  • RQ4What is the optimal token keeping ratio strategy across layers for maximizing efficiency and accuracy?
  • RQ5Does preserving placeholder tokens while updating them via lightweight paths maintain or improve model performance compared to pruning?

Key findings

  • Evo-ViT accelerates DeiT-S by over 60% in throughput with only a 0.4% drop in top-1 accuracy on ImageNet-1K, outperforming existing pruning methods.
  • The method achieves consistent performance across different ViT architectures, including DeiT and LeViT, demonstrating broad applicability.
  • A consistent token keeping ratio across all layers yields the best performance, as it maximizes the number of informative tokens processed through the full network.
  • Token selection evolves during training: initially unstable, it stabilizes over time, with informative tokens like fish tails or bat parts being progressively selected in deeper layers.
  • Visualizations confirm that the method focuses on objects rather than backgrounds, with retrieval of missed tokens in deeper layers due to structure-preserving design.
  • The global class attention from deeper layers (e.g., layer 10) provides a more effective and stable selection signal than last-layer-only or column-mean attention strategies.

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.