Skip a Layer or Loop It? Learning Program-of-Layers in LLMs
Ziyue Li, Yang Li, Tianyi Zhou
摘要
Large language models (LLMs) perform inference by following a fixed depth and order, non-recurrent execution of all layers. We reveal the wide existence of training-free, flexible, dynamic "program-of-layers (PoLar)", where pretrained layers can be packed as modules and then skipped or looped to form a customized program for each input. For most inputs, substantially shorter program executions can achieve the same or better accuracy, while incorrect predictions of the original LLM can be corrected by alternative programs with fewer layers. These observations indicate that inference admits multiple valid latent computations beyond the standard forward pass. To efficiently achieve PoLar in practice, we propose a lightweight PoLar prediction network, which learns to generate execution programs that dynamically skip or repeat pretrained layers for each input. Experiments on mathematical reasoning benchmarks demonstrate that PoLar consistently improves accuracy over standard inference and prior dynamic-depth methods, often while executing fewer layers, and that these gains persist under out-of-distribution evaluation. Our results suggest that fixed-depth execution captures only a narrow subset of an LLM’s latent reasoning capacity.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Faster Depth-Adaptive Transformers 引用了 Reducing Transformer Depth on Demand with Structured Dropout
- Revisiting Padded Transformer Expressivity: Which Architectural Choices Matter and Which Don't 引用了 Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation
引用它的顶会 Paper1
它引用的 Paper10
- Reducing Transformer Depth on Demand with Structured DropoutAngela Fan, Edouard Grave, Armand JoulinICLR 2020 · 695 次引用
- FastBERT: a Self-distilling BERT with Adaptive Inference TimeWeijie Liu, Peng Zhou, Zhiruo Wang, Zhe Zhao 等ACL 2020 · 257 次引用
- Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level ComputationSangmin Bae, Yujin Kim, Reza Bayat, Sungnyun Kim 等NeurIPS 2025 · 143 次引用
- ShortGPT: Layers in Large Language Models are More Redundant Than You ExpectXin Men, Mingyu Xu, Qingyu Zhang, Qianhao Yuan 等ACL Findings 2025 · 60 次引用
- Faster Depth-Adaptive TransformersYijin Liu, Fandong Meng, Jie Zhou, Yufeng Chen 等AAAI 2021 · 44 次引用
相关 Paper
- DiffSkip: Differential Layer Skipping in Large Language ModelsXuan Luo, Weizhi Wang, Xifeng YanACL Findings 2025 · 3 次引用
- Dr.LLM: Dynamic Layer Routing in LLMsAhmed Heakl, Martin Gubri, Salman Khan, Sangdoo Yun 等ICLR 2026 · 11 次引用
- D-LLM: A Token Adaptive Computing Resource Allocation Strategy for Large Language ModelsYikun Jiang, Huanyu Wang, Lei Xie, Hanbin Zhao 等NeurIPS 2024 · 39 次引用
- Position-Aware Depth Decay Decoding (D³): Boosting Large Language Model Inference EfficiencySiqi Fan, Xuezhi Fang, Xingrun Xing, Peng Han 等ACL Findings 2025 · 4 次引用
- Offloaded Reasoning: Efficient Inference for Large Language Models via Modular Reasoning and RefinementIshan Jindal, Jayant Taneja, Chandana Badrinath, Vikas Kapur 等EMNLP Findings 2025
