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 Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
11 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- A Simple Early Exiting Framework for Accelerated Sampling in Diffusion Models cites DynaBERT: Dynamic BERT with Adaptive Width and Depth
- A Simple Early Exiting Framework for Accelerated Sampling in Diffusion Models cites Confident Adaptive Language Modeling
- Fast and Robust Early-Exiting Framework for Autoregressive Language Models with Synchronized Parallel Decoding cites Depth-Adaptive Transformer
- Path Independent Equilibrium Models Can Better Exploit Test-Time Computation cites Depth-Adaptive Transformer
- What Layers When: Learning to Skip Compute in LLMs with Residual Gates cites Fast and Robust Early-Exiting Framework for Autoregressive Language Models with Synchronized Parallel Decoding
- What Layers When: Learning to Skip Compute in LLMs with Residual Gates cites Depth-Adaptive Transformer
- What Layers When: Learning to Skip Compute in LLMs with Residual Gates cites Confident Adaptive Language Modeling
- DynaBERT: Dynamic BERT with Adaptive Width and Depth cites Depth-Adaptive Transformer
- DynaBERT: Dynamic BERT with Adaptive Width and Depth cites Reducing Transformer Depth on Demand with Structured Dropout
- Confident Adaptive Language Modeling cites Depth-Adaptive Transformer
- Confident Adaptive Language Modeling cites Reducing Transformer Depth on Demand with Structured Dropout
- Confident Adaptive Language Modeling cites MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
- Confident Adaptive Language Modeling cites DynaBERT: Dynamic BERT with Adaptive Width and Depth
Cited 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
