English

Intra-Layer Recurrence in Transformers for Language Modeling

Computation and Language 2025-05-27 v2 Artificial Intelligence

Abstract

Transformer models have established new benchmarks in natural language processing; however, their increasing depth results in substantial growth in parameter counts. While existing recurrent transformer methods address this issue by reprocessing layers multiple times, they often apply recurrence indiscriminately across entire blocks of layers. In this work, we investigate Intra-Layer Recurrence (ILR), a more targeted approach that applies recurrence selectively to individual layers within a single forward pass. Our experiments show that allocating more iterations to earlier layers yields optimal results. These findings suggest that ILR offers a promising direction for optimizing recurrent structures in transformer architectures.

Keywords

Cite

@article{arxiv.2505.01855,
  title  = {Intra-Layer Recurrence in Transformers for Language Modeling},
  author = {Anthony Nguyen and Wenjun Lin},
  journal= {arXiv preprint arXiv:2505.01855},
  year   = {2025}
}

Comments

Accepted at Canadian AI 2025. Code available at https://github.com/ant-8/Layer-Recurrent-Transformers

R2 v1 2026-06-28T23:20:11.845Z