ThinkingViT: Matryoshka Thinking Vision Transformer for Elastic Inference
Not on the map. Why?
Abstract (arXiv)
ViTs deliver SOTA performance, yet their fixed computational budget prevents scalable deployment across heterogeneous hardware. Recent Matryoshka-style Transformer architectures mitigate this by embedding nested subnetworks within a single model to enable scalable inference. However, these models allocate the same amount of compute to all inputs, regardless of their complexity, which leads to inefficiencies. To address this, we introduce ThinkingViT, a nested ViT architecture that employs progressive thinking stages to dynamically adjust inference computation based on input difficulty. ThinkingViT first activates a small subset of the most important attention heads to produce an initial prediction. If the prediction confidence exceeds a predefined threshold, inference terminates early. Otherwise, within the same backbone, it activates a larger subset of attention heads and conducts a new forward pass. This process continues iteratively until the model reaches the predefined confidence level or exhausts its maximum capacity. To boost the performance of subsequent rounds, we introduce a Token Recycling approach that fuses the input embeddings with the embeddings from the previous stage. Experiments show that ThinkingViT surpasses nested baselines by up to 2.0 percentage points (p.p.) in accuracy at the same throughput and by up to 2.9 p.p. at equal GMACs on ImageNet-1K. We show that the backbone-preserving design of ThinkingViT allows it to serve as a plug-in upgrade for ViTs in downstream tasks such as semantic segmentation. We also demonstrate that ThinkingViT transfers effectively to other architectures such as Swin Transformers. The source code is available at https://github.com/ds-kiel/ThinkingViT.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 51 of its 65 references that are in the map. First posted on arXiv 14 Jul 2025.
Builds on
51 of 65 references.
References · 51
- 2017Attention Is All You Needcited by 60,361
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
- 2020End-to-End Object Detection with Transformerscited by 7,414
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
- 2016The Cityscapes Dataset for Semantic Urban Scene Understandingcited by 4,444
- 2020The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalizationcited by 1,850
- 2019Do ImageNet Classifiers Generalize to ImageNet?cited by 1,515
- 2019Natural Adversarial Examplescited by 1,408
38 more
- 2025s1: Simple test-time scalingcited by 1,341
- 2021Swin Transformer V2: Scaling Up Capacity and Resolutioncited by 1,228
- 2022Token Merging: Your ViT But Fastercited by 1,021
- 2019Learning Robust Global Representations by Penalizing Local Predictive Powercited by 1,013
- 2023Vision Transformers Need Registerscited by 871
- 2021DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsificationcited by 864
- 2021Segmenter: Transformer for Semantic Segmentationcited by 855
- 2019Once-for-All: Train One Network and Specialize it for Efficient Deploymentcited by 787
- 2024RouteLLM: Learning to Route LLMs with Preference Datacited by 682
- 2022Mixture-of-Experts with Expert Choice Routingcited by 623
- 2017BranchyNet: Fast Inference via Early Exiting from Deep Neural Networkscited by 596
- 2022DeiT III: Revenge of the ViTcited by 419
- 2021AdaViT: Adaptive Tokens for Efficient Vision Transformercited by 362
- 2020Are we done with ImageNet?cited by 333
- 2018Slimmable Neural Networkscited by 305
- 2022Matryoshka Representation Learningcited by 282
- 2020BERT Loses Patience: Fast and Robust Inference with Early Exitcited by 273
- 2024Mixture-of-Depths: Dynamically allocating compute in transformer-based language modelscited by 258
- 2020DynaBERT: Dynamic BERT with Adaptive Width and Depthcited by 251
- 2021AdaViT: Adaptive Vision Transformers for Efficient Image Recognitioncited by 228
- 2024MambaVision: A Hybrid Mamba-Transformer Vision Backbonecited by 224
- 2019Universally Slimmable Networks and Improved Training Techniquescited by 221
- 2021Not All Images are Worth 16x16 Words: Dynamic Transformers for Efficient Image Recognitioncited by 144
- 2025Competitive Programming with Large Reasoning Modelscited by 119
- 2020Glance and Focus: a Dynamic Approach to Reducing Spatial Redundancy in Image Classificationcited by 100
- 2025OverThink: Slowdown Attacks on Reasoning LLMscited by 96
- 2023MatFormer: Nested Transformer for Elastic Inferencecited by 85
- 2025Revisiting the Test-Time Scaling of o1-like Models: Do they Truly Possess Test-Time Scaling Capabilities?cited by 70
- 2023When Does Confidence-Based Cascade Deferral Suffice?cited by 60
- 2024Flextron: Many-in-One Flexible Large Language Modelcited by 45
- 2023Dynamic Perceiver for Efficient Visual Recognitioncited by 33
- 2023LGViT: Dynamic Early Exiting for Accelerating Vision Transformercited by 31
- 2021Multi-Exit Vision Transformer for Dynamic Inferencecited by 28
- 2024Mixture of Nested Experts: Adaptive Processing of Visual Tokenscited by 25
- 2025Vision Transformers on the Edge: A Comprehensive Survey of Model Compression and Acceleration Strategiescited by 24
- 2023Jointly-Learned Exit and Inference for a Dynamic Neural Network : JEI-DNNcited by 15
- 2024HydraViT: Stacking Heads for a Scalable ViTcited by 11
- 2024Attention Is All You Need For Mixture-of-Depths Routingcited by 7
50 most cited of 51 All 51 (JSON)
Built on by
Citing papers per year: 2025: 2; 2026: 5.
7 papers.
- 2025MoME: Mixture of Matryoshka Experts for Audio-Visual Speech Recognitioncited by 4
- 2025DND: Boosting Large Language Models with Dynamic Nested Depthcited by 1
- 2026MrBERT: Modern Multilingual Encoders via Vocabulary, Domain, and Dimensional Adaptationcited by 0
- 2026Do Vision Transformers Need All-to-All Attention? Global Communication Through Elastic Learned Corescited by 0
- 2026Slimmable ConvNeXt: Width-Adaptive Inference for Efficient Multi-Device Deploymentcited by 0
- 2026ProgResViT: Progressive Resolution and Width for Adaptive Vision Transformerscited by 0
- 2026Your Transformer Is Secretly Elasticcited by 0
- 2026Your Transformer Is Secretly Elastic14 Oct 2026
- 2026ProgResViT: Progressive Resolution and Width for Adaptive Vision Transformers2 Sep 2026
- 2026Slimmable ConvNeXt: Width-Adaptive Inference for Efficient Multi-Device Deployment21 May 2026
- 2026Do Vision Transformers Need All-to-All Attention? Global Communication Through Elastic Learned Cores12 May 2026
- 2026MrBERT: Modern Multilingual Encoders via Vocabulary, Domain, and Dimensional Adaptation24 Feb 2026
- 2025DND: Boosting Large Language Models with Dynamic Nested Depth13 Oct 2025
- 2025MoME: Mixture of Matryoshka Experts for Audio-Visual Speech Recognition5 Oct 2025