A Smaller Transformer in Your Transformer
Summary
arXiv 2609.20100v1 (cs.CV; submitted 2026-09-17; accepted BMVC 2026). Formalises ViT block redundancy (contiguous layers with high functional similarity) and proposes Transformer-Within-Transformer (TWT): max–min DP discovery of redundant phases, auditioned single-layer surrogate init, then single-stage deep-supervision distillation. Unlike Raptor/BRH (recurrent shared layer keeps FLOPs) or TOAST linear maps (lose token mixing), TWT replaces each phase with one ViT layer. Natural images: ~6-layer TWT ~half FLOPs, competitive ImageNet (e.g. DINOv2 B/14 84.2% vs 84.6% baseline / 84.0% Raptor-6). Histopathology H0-mini/Hibou-B: often matches or improves MIL QWK/accuracy at 3–5 layers. ADE20k denser drop. Code: https://github.com/dsb-ifi/TWT.
- Venue
- arXiv / BMVC 2026 / Oslo University Hospital; University of Oslo; UiT SFI Visual Intelligence
- Publisher
- arXiv / BMVC 2026 / Oslo University Hospital; University of Oslo; UiT SFI Visual Intelligence
- Source
- arxiv
- Access
- free
- License
- Author copyright (BMVC-style free unchanged distribution); arXiv preprint; GitHub dsb-ifi/TWT (no SPDX at catalog time)
- License family
- Other
- Language
- en
- Purpose
- Post-hoc fuse contiguous redundant ViT layers into single learned surrogate layers (TWT) to cut params and inference FLOPs with competitive accuracy
- Scale
- DeiT-III/DINOv2/DINOv3 B natural-image ImageNet+ADE20k; H0-mini & Hibou-B histopathology (PANDA, TCGA-PRAD, CAMELYON16/17) with ABMIL/TransMIL; typically 12→6/5 (natural) or 12→5/4/3 (histo) layers; FLOPs ~half vs baseline when depth halved
- Domain
- vision transformers; depth pruning; block redundancy; distillation; histopathology; model compression
- Used for
- ViT depth compression; histopathology foundation-model pruning; compare to Raptor/BRH, TOAST, NOSE, WDPruning
- Time period
- arXiv 2026-09-17 (v1); BMVC 2026 accepted; UiO news ~2026-08-09; cataloged 2026-09-26
- Author type
- academia (Oslo University Hospital; University of Oslo; UiT The Arctic University of Norway / SFI Visual Intelligence)
- Added
- Sep 26, 2026
- Verified
- Sep 26, 2026
- Research status
- done
From the source
- Published
- Sep 17, 2026
- arXiv categories
- cs.CV
- Author comment
- 22 pages, 6 figures, 6 tables. Accepted at the 37th British Machine Vision Conference (BMVC 2026)
- Citations
- 0
- References
- 0
Abstract (from arXiv)
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.
Tags
Topics
vision transformers; depth pruning; block redundancy; distillation; histopathology; model compression
Research notes
- Hudson user-fed 2026-09-26 via AlphaXiv https://www.alphaxiv.org/abs/2609.20100 (mirror); cataloged from canonical arXiv abs/API/PDF. Local dump: /workspace/curator/research/arxiv-2609.20100-20260926 (abs.html, api.xml, paper.pdf, paper.txt, alphaxiv.html, uio-news.html, CATALOG_NOTES.md). Code https://github.com/dsb-ifi/TWT (0★ at check; license field empty). No HF model/dataset. No Discord fill (local-only job).
Similar entries
- Code LingBot-Vision
- Code NVIDIA Model Optimizer (ModelOpt)
- Paper Adversaries can still steal reasoning from American frontier models via Third-Party Cloud Aggregators ("Stolen Thoughts" update)
- Paper Gumbel Straight Flow: Distilling Autoregressive Models into One-step Flow Maps
- Paper Mid-Harness: Scaling Actions Between Model and Harness for Terminal Agents
- Paper Trajectory-Refined Distillation