논문 해설
How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference
트랜스포머를 반복시키는 방법: 루프 확장, 특화, 병렬 추론
- 연구 문제 트랜스포머를 루프로 재사용하면 파라미터 수는 늘리지 않고 깊이를 키울 수 있지만, 추가 루프는 학습 연산량과 자기회귀 디코딩 지연을 함께 늘립니다.
- 연구 방법 Full-Stack, Per-Layer, Middle-Stack 등 루프 설계를 비교하고, 루프별 저랭크 어댑터로 가중치 공유 제약을 완화하며, PLT의 전이에 현재 토큰 임베딩과 정규화를 더해 병렬 디코딩의 품질 손실을 줄입니다.
- 주요 결과 고정 파라미터 예산에서는 Full-Stack Looping이, 고정 학습 FLOPs에서는 Middle-Stack Looping이 유리했습니다. 정규화된 shifted PLT는 1B, L=2에서 Full-Stack Looping보다 낮은 DCLM BPB를 보였습니다.
반복 가중치 공유 루프의 문제
트랜스포머 루프는 같은 가중치를 여러 번 적용하여 파라미터 수를 늘리지 않고 깊이를 늘립니다. 그러나 추가된 루프는 반드시 실행되어야 하므로 학습 연산량을 늘리고, 기존 루프 방식은 한 토큰의 루프를 순서대로 계산해야 하므로 자기회귀 디코딩 지연도 커집니다. 이 논문은 파라미터, 학습 FLOPs, 추론 효율 중 어떤 제약이 지배하는지에 따라 루프를 어떻게 구성해야 하는지를 밀집 디코더 전용 트랜스포머에서 함께 검토합니다.
루프 설계와 반복 순서
Full-Stack Looping은 트랜스포머 블록 스택 전체를 L번 반복하며, 마지막 블록의 출력을 첫 블록으로 되돌립니다. Per-Layer Looping은 각 블록의 루프를 모두 끝낸 뒤 다음 블록으로 넘어갑니다. Middle-Stack Looping은 입력과 출력에 가까운 블록은 한 번만 적용하고 중간 블록 묶음을 하나의 단위로 반복합니다. 따라서 같은 반복 횟수라도 실행 순서와 반복되는 계산량이 다릅니다.

Figure 2 Looping designs: what is repeated, where, and in what order.Top: the looped component can be the complete transformer block, attention alone, the MLP alone, or attention and the MLP separately. Bottom: full-stack looping traverses the complete transformer forL loops, whereas per-layer looping completesL loops of each block before advancing to the next. Middle-stack and middle-layer looping restrict the corresponding schedule to the central blocks. For a model containingBblocks, the first and last⌊B/3⌋blocks are run once.
원문 · CC BY 4.0 · Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla · How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.
Figure 3 Full-Stack Looping is favored under fixed parameter-count and training-data budgets, whereas Middle-Stack Looping is favored under FLOP constraints.DCLM validation BPB versus the number of loops or total training FLOPs for 100M and 500M models. Each panel holds the model size and training-data budget constant, so the differences reflect how each strategy uses the additional computation introduced by looping. The advantage of full-stack looping becomes clearer at larger model scales and training budgets.Middle-Stack Loopingwith fewer loops achieves lower BPB when compute is limited, whereasFull-Stack Loopingcan attain lower BPB when more compute is available. Increasing the number of loops does not improve quality indefinitely: the 100M results exhibit saturation, regression, and instability when more loops are used. Lower BPB is better; red triangles indicate unstable or clipped runs.
원문 · CC BY 4.0 · Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla · How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.루프별 저랭크 특화
공유 가중치만 쓰면 뒤쪽 루프가 이미 변형된 표현을 처리해야 하므로 제약이 생길 수 있습니다. 이 연구는 주 가중치를 공유한 채 루프마다 작은 LoRA 어댑터를 두어 이를 완화합니다. Loop Matrix는 여러 저랭크 성분의 혼합 계수를 자유롭게 학습하고, Loop Softmax는 같은 계수를 음이 아니고 합이 1이 되도록 정규화합니다. 두 방식 모두 어댑터의 혼합 방식이 다르며 실험의 기본 설정은 Loop Matrix입니다.

Figure 4 Three ways to vary weights across loops.All designs retain the same base weights. Loop LoRA gives each loop a separate low-rank adapter. Loop Matrix lets each loop learn a combination of these adapters, while Loop Softmax restricts this combination to be nonnegative and sum to one.
원문 · CC BY 4.0 · Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla · How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.루프별 특화의 파라미터 효율
300M 모델을 TPP 100으로 학습하고 Full-Stack Looping의 L을 2, 4, 8로 바꾼 실험에서 루프별 특화 방법은 DCLM BPB를 낮췄습니다. 특화는 비임베딩 파라미터를 1.1–4.3%만 늘린 반면 모델 깊이를 두 배로 늘린 경우는 51.4%를 늘렸습니다. 같은 FLOPs에서는 깊이를 두 배로 한 기준 모델이 더 낮은 BPB를 보였으므로, 이 결과는 파라미터 효율 측면의 개선으로 읽어야 합니다.
병렬 루프 트랜스포머의 전이
기존 루프에서는 루프 ℓ이 같은 토큰의 이전 루프 출력을 받아야 합니다. PLT의 Cross-Loop Parallelism은 루프 ℓ의 입력을 현재 토큰 임베딩 e_n과 이전 토큰 위치 n−1에서 이전 루프가 만든 상태 h^(ℓ−1)_{n−1}의 합으로 구성합니다. 이전 토큰의 상태는 디코딩 시점에 이미 캐시되어 있으므로 L개 루프 입력을 배치 차원으로 묶어 함께 계산할 수 있습니다. 전체 계산량은 여전히 L번의 공유 트랜스포머 실행입니다.

Figure 6 PL T shifts the connection between loops across tokens.Loop ℓ at token n receives the current-token embedding and the state from loopℓ−1at tokenn−1. KV sharing and G-SWA are omitted for clarity.
원문 · CC BY 4.0 · Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla · How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.PLT 품질 손실의 원인 분해
원래 PLT는 루프가 많아질수록 품질이 저하될 수 있습니다. 이 연구는 Raw Shifted CLP, KV sharing, 정규화, 현재 토큰 임베딩의 유무를 개별로 바꾸어 원인을 나눕니다. 현재 토큰 임베딩을 제거하면 shifted PLT는 Vanilla 기준선보다 나빠지고 일부 실행은 발산했습니다. 또 현재 임베딩과 이전 상태의 RMS 크기가 크게 달라 한쪽이 다른 쪽을 압도할 수 있으며, RMSNorm으로 각각 정규화한 뒤 결합하면 품질이 회복되었습니다. 이 결과는 200M 모델의 TPP 40과 80 조건에서 얻은 것입니다.

Figure 7 Separate normalization recovers much of the quality lost by the shifted transition.DCLM BPB for 200M models at TPP 40 and 80. Each raw panel is followed by its normalized counterpart. Except for Normalized Addition, normalized variants use separate RMS normalization and fixed 50/50 mixing. Red stars mark unstable runs clipped for visualization. Lower BPB is better.
원문 · CC BY 4.0 · Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla · How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.1B 규모의 결과와 효율
1B 모델에서 L=2일 때 Normalized Shifted PLT는 Full-Stack Looping보다 표시된 모든 학습 예산에서 낮은 DCLM BPB를 보였고, Normalized Unshifted PLT와 가깝게 움직였습니다. L=4에서는 Full-Stack Looping과 경쟁적이었으나 Unshifted 대조군과의 차이가 남았습니다. 학습 FLOPs 기준으로는 TPP 80의 2-loop 모델이 TPP 160의 Vanilla 모델보다 적은 FLOPs로 같은 BPB에 도달했습니다. 그러나 이 이점은 루프 수에 따라 균일하지 않으며 L=4는 FLOPs당 개선 폭이 작습니다.

Figure 1 Looping can improve data and compute efficiency (in over-trained regimes) while retaining downstream quality.We compare Vanilla (no looping), Standard Looping (repeatedly applying the same Transformer sequentially), and our modified versions Parallel Loop Transformer (PLT) (Wu et al., 2025) and Looped Transformers.Left:for 1B models trained across TPP 10–160, all looping methods achieve a given DCLM (Li et al., 2024) bits-per-byte (BPB) value with fewer training tokens than the fitted Vanilla baseline, with the modified PLT variants providing the largest relative data-efficiency gains.Center:across model sizes from 100M to 1B, we compare Vanilla models trained at TPP= 160 with two-loop models trained at TPP= 80. All looping methods achieve a given DCLM BPB with fewer training FLOPs than the fitted Vanilla baseline, and the modified PLT and Looped variants are more efficient than Standard Looping.Right:for 1B models across TPP 10–160, looping retains or improves mean NLL-ranked accuracy across eight reasoning and question-answering tasks; the modified PLT variants match or exceed Standard Looping. See Appendix D for the efficiency calculation and task-level results.
원문 · CC BY 4.0 · Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla · How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.
Figure 8 Normalized shifted PL T retains the benefit of looping at 1B.DCLM BPB at TPP 10, 20, 40, and 80. Shifted and unshifted PLT use separate RMS normalization and a rank-8linear gate. AtL = 2, shifted PLT closely tracks the unshifted control and improves uponFull-Stack Looping; atL = 4, a clearer gap to the unshifted control remains. Lower BPB is better.
원문 · CC BY 4.0 · Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla · How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.
Figure 9 Raw scaling curves underlying the relative-efficiency analysis.We plot observed DCLM validation BPB together with unconstrained Vanilla scaling-law fits.Left:BPB as a function of actual training tokens for fixed 1B models across training-token budgets.Middle:BPB as a function of total training FLOPs across model families from 100M to 1B. Vanilla models use TPP= 160, whereas looping models use two loops and TPP= 80. Points show observed runs, connecting lines show empirical trajectories, and dashed black curves show fitted Vanilla scaling laws. Lower BPB is better.
원문 · CC BY 4.0 · Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla · How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference · 원문 그림 인용 · 원본 PDF 28쪽에서 그림 영역을 추출했습니다.다운스트림 평가와 적용 범위
다지선다 평가는 각 선택지의 토큰 정규화 음의 로그우도가 가장 낮은 답을 고르는 NLL 순위 정확도로 측정했습니다. 8개 과제 평균에서 루프는 Vanilla보다 나은 결과를 보였지만 모든 과제에서 일관된 우위는 아니었고 MMLU와 MMLU-Pro는 무작위 수준 근처에 머물렀습니다. 본 연구는 MoE 모델을 평가하지 않았으므로 MoE에 대한 시스템 효과는 검증되지 않았습니다.

Figure 10 Task-level NLL-ranked accuracy for the 1B models.Results are shown for ARC Easy, ARC Challenge, HellaSwag, PIQA, WinoGrande, OpenBookQA, CommonsenseQA, and Social IQA. For each question, the model predicts the candidate with the lowest token-normalized NLL. Dashed horizontal lines denote random-choice accuracy. Lines connect measured checkpoints and are not fitted scaling laws. Higher is better.
원문 · CC BY 4.0 · Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla · How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference · 원문 그림 인용 · 원본 PDF 29쪽에서 그림 영역을 추출했습니다.
Figure 11 Candidate-normalized correct-answer NLL for the same eight tasks.Candidate scores are computed from token-normalized NLL and normalized across the available answers. This continuous metric measures how strongly the model prefers the correct answer relative to the alternatives, including changes that do not alter the top-ranked answer. Dashed lines show the random-choice valuelogC for a task withC candidates. Because choice counts and prompt formats differ, values should be compared within, rather than across, datasets. Lower is better.
원문 · CC BY 4.0 · Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla · How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference · 원문 그림 인용 · 원본 PDF 30쪽에서 그림 영역을 추출했습니다.
Figure 12 MMLU and MMLU-Pro results for the 1B models.Top: macro-averaged NLL-ranked accuracy, where the predicted answer is the candidate with the lowest token-normalized NLL. Bottom: candidate-normalized correct-answer NLL. Accuracy remains near the respective random-choice baselines, while candidate-normalized correct-answer NLL remains at or above the random-choice reference, particularly on MMLU-Pro. Dashed lines denote random-choice performance. Higher accuracy and lower NLL are better.
원문 · CC BY 4.0 · Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla · How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference · 원문 그림 인용 · 원본 PDF 31쪽에서 그림 영역을 추출했습니다.논문 정보
- 저자
- Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla
- 학회·저널
- arXiv · 프리프린트
- 최초 공개일
- 2026년 10월 29일
- 등록일
- 2026년 11월 1일
- 수정일
- 2026년 10월 29일
- 버전
- v1
- arXiv
- 2610.40325
- 분류
- cs.LG · cs.AI
- 원문 이용 조건
- CC BY 4.0
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.
초록
Looping in transformer models reuses weights by repeatedly applying the same transformer, or parts of it, making the model deeper without increasing its parameter count. Whether looping is useful depends on which constraint dominates: model size, training compute, or autoregressive inference efficiency. We study these trade-offs jointly in dense decoder-only transformers trained from scratch, varying which parts of the model are looped, how many loops are applied, and how information is passed between loops. Our experiments span models with up to 1B parameters, trained on up to 155B tokens with up to $1.07\times10^{21}$ FLOPs and 32 loops. We find that looping the full transformer generally gives the strongest quality at a fixed parameter budget, whereas looping a middle block of layers gives a better return when training FLOPs are constrained. Adding loops is not uniformly beneficial: gains eventually saturate, reverse, or become unstable. This motivates asking whether forcing every loop to use the same weights limits the benefit of deeper looping. We address this by adding small loop-specific low-rank adapters that improve quality, with larger gains as more loops are added. Looped transformers also suffer a decoding slowdown proportional to the number of loops. Parallel Loop Transformers address this by passing hidden states between loops across adjacent token positions, allowing loop stages to run concurrently. However, in our experiments the original formulation does not consistently retain the quality gains of ordinary looping. We find that preserving the current-token embedding and separately normalizing it and the previous-token hidden state before combining them recovers strong performance across model scales and training budgets. Together, these results show that effective looping requires matching the design to the resource constraint and inference setting.
원문 인용
Chanakya Ekbote, Artidoro Pagnoni, Devendra Singh Sachan, Shruti Bhosale, Mike Lewis, Maryam Fazel-Zarandi, Shashank Rajput, Sujan Kumar Gonugondla (2026). How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference. arXiv:2610.40325v1. https://arxiv.org/abs/2610.40325v1
BibTeX
@misc{ekbote2026loop,
title = {{How to Loop Your Transformer: Loop Scaling, Specialization, and Parallel Inference}},
author = {Chanakya Ekbote and Artidoro Pagnoni and Devendra Singh Sachan and Shruti Bhosale and Mike Lewis and Maryam Fazel-Zarandi and Shashank Rajput and Sujan Kumar Gonugondla},
year = {2026},
eprint = {2610.40325},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2610.40325v1}
}