Faster Depth-Adaptive Transformers
Yijin Liu, Fandong Meng, Jie Zhou, Yufeng Chen, Jinan Xu
Abstract
Depth-adaptive neural networks can dynamically adjust depths according to the hardness of input words, and thus improve efficiency. The main challenge is how to measure such hardness and decide the required depths (i.e., layers) to conduct. Previous works generally build a halting unit to decide whether the computation should continue or stop at each layer. As there is no specific supervision of depth selection, the halting unit may be under-optimized and inaccurate, which results in suboptimal and unstable performance when modeling sentences. In this paper, we get rid of the halting unit and estimate the required depths in advance, which yields a faster depth-adaptive model. Specifically, two approaches are proposed to explicitly measure the hardness of input words and estimate corresponding adaptive depth, namely 1) mutual information (MI) based estimation and 2) reconstruction loss based estimation. We conduct experiments on the text classification task with 24 datasets in various sizes and domains. Results confirm that our approaches can speed up the vanilla Transformer (up to 7x) while preserving high accuracy. Moreover, efficiency and robustness are significantly improved when compared with other depth-adaptive approaches.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 6c36c798-6be2-4bf6-8bd4-d83dfc6456c4Cited by top-tier papers11
- Confident Adaptive Language ModelingTal Schuster, Adam Fisch, Jai Gupta, Mostafa Dehghani et al.NeurIPS 2022 · 394 citations
- Path Independent Equilibrium Models Can Better Exploit Test-Time ComputationCem Anil, Ashwini Pokle, Kaiqu Liang, Johannes Treutlein et al.NeurIPS 2022 · 43 citations
- Fast and Robust Early-Exiting Framework for Autoregressive Language Models with Synchronized Parallel DecodingSangmin Bae, Jongwoo Ko, Hwanjun Song, Se-Young YunEMNLP 2023 · 12 citations
- A Simple Early Exiting Framework for Accelerated Sampling in Diffusion ModelsTae Hong Moon, Moonseok Choi, EungGu Yun, Jongmin Yoon et al.ICML 2024 · 10 citations
- What Layers When: Learning to Skip Compute in LLMs with Residual GatesFilipe Laitenberger, Dawid Jan Kopiczko, Cees G. M. Snoek, Yuki M. AsanoICLR 2026 · 6 citations
Builds on5
- Reducing Transformer Depth on Demand with Structured DropoutAngela Fan, Edouard Grave, Armand JoulinICLR 2020 · 695 citations
- MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited DevicesZhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu et al.ACL 2020 · 660 citations
- DynaBERT: Dynamic BERT with Adaptive Width and DepthLu Hou, Zhiqi Huang, Lifeng Shang, Xin Jiang et al.NeurIPS 2020 · 401 citations
- Depth-Adaptive TransformerMaha Elbayad, Jiatao Gu, Edouard Grave, Michael AuliICLR 2020 · 264 citations
- Multi-Scale Self-Attention for Text ClassificationQipeng Guo, Xipeng Qiu, Pengfei Liu, Xiangyang Xue et al.AAAI 2020 · 69 citations
Related papers
- Adaptive Computation Modules: Granular Conditional Computation for Efficient InferenceBartosz Wójcik, Alessio Devoto, Karol Pustelnik, Pasquale Minervini et al.AAAI 2025 · 8 citations
- Adaptive Depth Networks with Skippable Sub-PathsWoochul Kang, Hyungseop LeeNeurIPS 2024 · 5 citations
- Efficient Transformer-based 3D Object Detection with Dynamic Token HaltingMao Ye, Gregory P. Meyer, Yuning Chai, Qiang LiuICCV 2023 · 10 citations
- Understanding Dynamic Compute Allocation in Recurrent TransformersIbraheem Muhammad Moosa, Suhas Lohit, Ye Wang, Moitreya Chatterjee et al.ICML 2026 · 5 citations
- Length-Adaptive Transformer: Train Once with Length Drop, Use Anytime with SearchGyuwan Kim, Kyunghyun ChoACL 2021
