DeepLoop: Depth Scaling for Looped Transformers

Shuzhen Li, Yifan Zhang, Jiacheng Guo, Quanquan Gu, Mengdi Wang

arXiv:2607.13491 · 2026-07-18 공개 · arXiv · PDF

parameter-updates validation-loss looped-transformers depth-scaling residual-scaling deepnorm post-ln gpt-models

Abstract

Looped Transformers scale sequential computation by applying a compact stack of physical blocks for multiple rounds, increasing unrolled depth without increasing stored parameters. This reuse changes the residual-scaling problem: in an untied Transformer, each residual branch receives and applies its own parameter update, whereas in a looped Transformer one shared update aggregates gradients from repeated visits and is read back by those same visits in the next linearized forward pass. We formalize this tied-depth effect through a first-order perturbation bound controlled by a visit-alignment coefficient κ_R. The bound recovers the DeepNorm exponent when visits decorrelate, but in the conservative aligned regime it requires the exponent to increase from 1/4 to 1/2 as loop count grows at fixed physical depth. The resulting method, DeepLoop, keeps the Post-LN DeepNorm architecture and sets α=(2N)^{1/2} and β=(8N)^{-1/2} for unrolled depth N. On GPT-style looped language models at GPT-2 small and GPT-2 medium scale, DeepLoop is neutral when no physical block is revisited and improves validation loss and downstream accuracy once recurrent depth is activated. These results show that stable recurrent depth requires residual scaling rules that account for parameter visits, not only nominal layer count.

한국어 요약

한 줄 요약

DeepLoop는 반복된 파라미터 재사용을 고려한 잔차 스케일링 규칙을 제안하여 Looped Transformer의 안정적 깊이 확장을 가능하게 한다.

핵심 기여도

핵심 아이디어

기존 Transformer는 깊이와 파라미터 수가 비례하지만, Looped Transformer는 동일한 물리적 블록을 반복 적용하여 깊이 $ N = KR $를 확장하면서 파라미터 수 $ K $는 동일하게 유지한다. 이는 잔차 스케일링 문제를 변화시킨다: 각 잔차 브랜치가 독립적인 업데이트를 받는 일반적인 경우와 달리, Looped Transformer는 공유된 업데이트가 여러 방문에서 누적되고 다시 읽히는 구조를 가진다. 이 현상을 tied-depth effect라 하며, 이는 visit-alignment coefficient $ \kappa_R $를 통해 정량적으로 분석된다.

DeepLoop는 tied-depth effect를 반영한 잔차 스케일링 규칙을 제안한다. $ \alpha $와 $ \beta $는 unrolled depth $ N $에 따라 $ \alpha = (2N)^{1/2} $, $ \beta = (8N)^{-1/2} $로 설정되며, 이는 DeepNorm의 $ p = 1/4 $에서 $ p = 1/2 $로의 변화를 반영한다. 이는 반복 방문이 일치할 경우, 즉 $ \kappa_R = \Theta(R) $일 때, 안정성을 유지하기 위해 필요한 조건이다.

기술적 접근법

주요 결과

의의 및 한계

실용적 활용

DeepLoop는 반복 계산이 필요한 자연어 처리, 시계열 분석, 테스트 시 계산 확장이 필요한 모델에 적용 가능. 특히, 파라미터 증가 없이 깊이를 확장해야 하는 저자원 환경에서 유용. GPT-2 규모의 모델에서 실험적으로 검증되었으므로, 대규모 언어 모델 개발에도 활용 가능.