A Smaller Transformer in Your Transformer
Dhananjay Tomar, Marius Aasan, Andreas Kleppe, Adín Ramírez Rivera
Abstract
Recent findings indicate that Vision Transformers settle into locally similar computational phases, implying a level of depthwise computational redundancy. However, existing methods to exploit this redundancy either fail to reduce inference compute or severely degrade model expressivity. In this work, we formalise a unified view of block redundancy that decouples the geometry from specific surrogate interventions. We then introduce Transformer-Within-Transformer (TWT), a post-hoc method that fuses contiguous groups of redundant layers into a single learned surrogate layer. TWT reduces parameter count and inference compute while remaining competitive with original models using half the depth on natural images, and in several downstream histopathology settings, TWT matches or even improves on the original baseline.
Create a lesson
Metadata
- Comments
- 22 pages, 6 figures, 6 tables. Accepted at the 37th British Machine Vision Conference (BMVC 2026)
Related papers
High-Fidelity Image Matting with Pixel-Space Diffusion Transformers
Shared title terminologycs.CVBaihan Yang, Xin Lin, Yufan Wei et al.
Focus Only on What's Important: Training-Free Focus Maps for Frozen Vision Transformers in Long-Video Object Segmentation
Shared title terminologycs.CVHarsha Karipineni, Rajesh Reddy Chintha
Semantic State Reading for Joint Image-Semantic Diffusion Transformers
Shared title terminologycs.CVGuanxi Lai, Zixuan Li, Zhiwei Li et al.
Loop4D: Embodied World Modeling with 4D VAEs and Looped Diffusion Transformers
Shared title terminologycs.CVGen Li, Fan Luo, Mengjun Lin et al.
Fragment-Aware Vision Transformers for Fresco-Fragment Style Classification
Shared title terminologycs.CVSara Miketek, Biagio Barchielli, Nadeem Iqbal Kajla et al.
Enhanced Knowledge Distillation for Detection Transformer via Teacher Prediction Refinement
Shared title terminologycs.CVYitong Xing, Yuhao Cheng, Yanping Li et al.