cs.CVNov 22, 2026

DeclareViT: Decoupling Early Classification from Feature Refinement with Exit Query for Efficient ViTs

Authors: Xinrui Gong, Yao Rong, Chuangtao Chen, Daniel Ochs, Ulf Schlichtmann, Bing Li, Kristian Kersting, Grace Li Zhang

Organizations: Technische Universität Darmstadt · Leibniz Universität Hannover · Technische Universität München · Technische Universität Ilmenau · 

Abstract

Vision Transformers achieve remarkable recognition performance but incur substantial computational cost during inference, limiting their use in latency- and compute-constrained deployment scenarios. Early-exit inference offers a promising solution by allowing easy samples to terminate at intermediate layers. However, existing approaches typically couple early classification with the shared backbone, requiring intermediate representations to support both early classification and subsequent feature refinement. Under joint training, the corresponding optimization objectives jointly update shared backbone parameters, which can lead to conflicting gradient directions. Motivated by this observation, we introduce DeclareViT, a framework that decouples early classification from feature refinement. Each exit uses a dedicated query to read intermediate features through one-way cross-attention without modifying the backbone token stream. The query branches are optimized for early classification while the backbone and final classifier remain frozen. Across ViT, DeiT, and Swin on CIFAR-100, ImageNet-1K, and Food-101, DeclareViT consistently establishes a state-of-the-art accuracy-efficiency trade-off: It achieves 1.58 times to 2.57 times multiply-accumulate (MAC)-based speed-up with only a 0.39-1.91 percentage-point accuracy drop. Wall-clock measurements on CPU and GPU further demonstrate practical inference acceleration. Code is available at https://github.com/TUDa-HWAI/DeclareViT.

Figures & tables

Appendix figures & tables22 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Accelerating Vision Foundation Models with Drop-in Depthwise Convolution

    May 21, 2026Carmelo Scribano, Mohammad Mahdi, Nedyalko Prisadnikov +5Vision Foundation ModelsVision Foundation Model Adaptation

  2. JetViT: Efficient High-Resolution Vision Transformer with Post-Training Attention Search

    May 26, 2026Dongyun Zou, Zhuoyang Zhang, Junyu Chen +8Efficient Transformer InferenceVision Foundation Models

  3. Fusion: A Framework for Unified Sequential Token AdaptatIon in VisiOn TraNsformers

    Jul 1, 2026Aravind Pradeep, Samira Nazari, Mahdi Taheri +1Token MergingEfficient ViTs