Gated Recurrent Transformers: Expressive Depth through Recurrent Modulation

Amr Hegazy, Amr Alanwar, Mostafa Elhoushi

arXiv:2608.15062 · 2026-08-30 공개 · arXiv · PDF

model-scaling parameter-efficiency memory-efficiency depth-reuse transformer-language-models iso-flops generation-latency gated-recurrent-transformer

Abstract

Scaling transformer language models creates an inherent tension between expressivity and memory efficiency. While unique weights across layers preserve functional specialization---from input-grounding to abstract refinement---they incur a substantial memory footprint. Conversely, standard depth-sharing enforces uniform transformations that collapse representational diversity and degrade modeling quality. We introduce Gated Recurrent Transformer, a recurrent depth transformer where fixed-depth prelude and coda blocks bracket a single shared core iterated R times. Inspired by gated recurrent neural networks, we employ a lightweight projection and an elementwise update gate---conditioned on the hidden state, the fixed prelude output, and noise resampled at every step---to modulate the recurrent update. This allows the model to specialize the input to the same few layers across recurrences, rather than requiring many unique layers to achieve functional diversity. Under an isoFLOPS constraint, a 3-layer Gated Recurrent Transformer matches the accuracy of a 12-layer GPT-2 Small baseline with similar training and inference FLOPs, and leads MoR and heavy-tail depth sampling in all nine scale-by-budget cells; at medium and large scale it approaches dense quality at the standard token budget and overtakes it at medium scale once that budget is doubled. Under an isoPARAMS constraint, deeper recurrence achieves a 2.76 validation loss versus 2.84 for a non-recurrent counterpart at matched parameter and data budget. Our results demonstrate that adaptive depth reuse is a principled strategy for trading parameters for quality: at large scale, 63% fewer parameters and 59% less peak decoding memory for a 10% increase in compiled generation latency.

한국어 요약

한 줄 요약

Gated Recurrent Transformer는 재귀적 깊이를 활용해 파라미터 수를 줄이면서도 모델 성능을 유지하는 새로운 트랜스포머 구조를 제안한다.

핵심 기여도

핵심 아이디어

기존 트랜스포머는 깊이가 늘어날수록 파라미터 수가 선형적으로 증가하여 메모리 효율성이 저하된다. GRT는 이 문제를 해결하기 위해 재귀적 깊이를 도입한다. 고정된 prelude와 coda 블록 사이에 공유된 core 블록을 R번 반복함으로써, 동일한 파라미터를 여러 번 재사용하면서도 기능적 다양성을 유지한다. 이때, 각 재귀 단계에서 hidden state, prelude 출력, 그리고 재샘플링된 노이즈를 기반으로 한 엘리먼트별 업데이트 게이트가 반복 업데이트를 조절한다. 이는 단일 블록이 다양한 입력 표현에 따라 다른 역할을 할 수 있도록 해준다. 초기에는 residual 스트림이 거의 변경되지 않지만, 학습이 진행되면서 게이트가 점차적으로 나타나 특정 표현만 선택적으로 정제하게 된다.

기술적 접근법

주요 결과

의의 및 한계

GRT는 파라미터 수와 모델 깊이를 분리하는 새로운 전략을 제시하며, 재귀적 깊이를 통해 메모리 효율성을 향상시키는 동시에 모델 성능을 유지한다. 특히, isoFLOPS 및 isoPARAMS 조건에서 기존 밀도 모델과 비교해 우수한 성능을 보인다. 그러나 재귀 깊이 R은 추론 시 고정되어 있으며, 토큰별 중단 기능이 없다는 점이 한계이다. 또한, 게이트 편향과 노이즈 크기는 GPT-2 외의 모델에 적용할 경우 재조정이 필요하다.

실용적 활용

GRT는 메모리 제약이 있는 환경에서 대규모 언어 모델을 구현할 때 유용하며, 특히 토큰 예산이 제한된 추론 시스템에서 성능-자원 트레이드오프를 유연하게 조절할 수 있다. 연구적으로는 재귀적 깊이를 활용한 모델 최적화와 지식 증류 기법의 개선에 활용될 수 있다.