paper-with-me

Papers

Learning to Skip the Middle Layers of Transformers

2025-06-26 · Tim Lawson, Laurence Aitchison

Conditional computation is a popular strategy to make Transformers more efficient. Existing methods often target individual modules (e.g., mixture-of-experts layers) or skip layers independently of one another. However, interpretability research has demonstrated that the middle layers of Transformers exhibit greater redundancy, and that early layers aggregate information into token positions. Guided by these insights, we propose a novel architecture that dynamically skips a variable number of layers from the middle outward. In particular, a learned gating mechanism determines whether to bypass a symmetric span of central blocks based on the input, and a gated attention mechanism prevents subsequent tokens from attending to skipped token positions. Residual norms are controlled with a 'sandwich' or 'perilayernorm' scheme and gate sparsity with an adaptive regularization loss. We had aimed to reduce compute requirements for 'simpler' tokens and potentially foster an emergent multi-level representational hierarchy but, at the scales investigated, our approach does not achieve improvements in the trade-off between validation cross-entropy and estimated FLOPs compared to dense baselines with fewer layers. We release our code at https://github.com/tim-lawson/skip-middle.

📄 PDF Abstract BibTeX arXiv:2506.21103

Code (1)

tim-lawson/skip-middle 공식 구현 pytorch

Tasks

Mixture-of-Experts

Similar Papers 제목 키워드 기반

Transformer Layers as Painters

2024-07-12 · Qi Sun, Marc Pickett, Aakash Kumar Nain, Llion Jones

Despite their nearly universal adoption for large language models, the internal workings of transformers are not well understood. We aim to better understand the impact of removing or reorganizing information throughout …

FiRST: Finetuning Router-Selective Transformers for Input-Adaptive Latency Reduction

2024-10-16 · Akriti Jain, Saransh Sharma, Koyel Mukherjee, Soumyabrata Pal

Auto-regressive Large Language Models (LLMs) demonstrate remarkable performance across different domains such as vision and language processing. However, due to sequential processing through a stack of transformer layers…

SkipPLUS: Skip the First Few Layers to Better Explain Vision Transformers

2024-06-17 · Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops 2024 6 · Faridoun Mehri, Mohsen Fayyaz, Mahdieh Soleymani Baghshah, Mohammad Taher Pilehvar

Despite their remarkable performance, the explainability of Vision Transformers (ViTs) remains a challenge. While forward attention-based token attribution techniques have become popular in text processing, their suitabi…

Direct Multi-Token Decoding

2025-10-13 · Xuan Luo, Weizhi Wang, Xifeng Yan arxiv

Decoder-only transformers have become the standard architecture for large language models (LLMs) due to their strong performance. Recent studies suggest that, in pre-trained LLMs, early, middle, and late layers may serve…

Random-LTD: Random and Layerwise Token Dropping Brings Efficient Training for Large-scale Transformers

2022-11-17 · Zhewei Yao, Xiaoxia Wu, Conglong Li, Connor Holmes 외

Large-scale transformer models have become the de-facto architectures for various machine learning applications, e.g., CV and NLP. However, those large models also introduce prohibitive training costs. To mitigate this i…