ループ型トランスフォーマーの仕組みを明確に解説
LLM の知能向上にはパラメータ増加や計算資源の増大という高コストな方法があるが、既存のパラメータをループ使用することでコストを抑える「Looped Transformer」技術が注目されている。
AI深層分析を開く2026年7月28日 23:57
AI深層分析
キーポイント
リソース制約下での最適化アプローチ
LLM を賢くする従来の2つの方法(パラメータ増加、計算資源の増大)は高コストであるため、既存のパラメータを再利用して効率化する第三の選択肢が求められている。
Looped Transformer の動作原理
モデルの一部をループさせ、同じ入力に対して複数回処理させることで、より大きなモデルに匹敵する知能を得ながら、必要な重みの数を削減する技術である。
計算コストと性能のトレードオフ
25層を4回ループさせる構成などにより、フォワードパスの遅延や演算量(FLOPs)は類似のままに保ちつつ、重みの数を大幅に削減できる。
推論能力への効果
この手法は推論重視タスク、コンテキスト内学習、および ARC-AGI や数独などの抽象的なパズル解決ベンチマークにおいて驚くほど高い成果を収めている。
重要な引用
reuse the parameters you already have, instead of buying new ones
Instead of training 100 transformer layers, you might train 25 layers, but loop over them 4 times.
Effectively, you have trained your weights to be polymorphic - the same weights are capable of reflecting and iterating over past versions of its own output.
編集コメントを表示
編集コメント
パラメータ数を増やす従来のスケーリング法則に対する、アーキテクチャレベルでの効率的な解決策として注目される。実用化に向けた研究がさらに進むことで、低コストで高性能な AI モデルの普及に寄与する可能性がある。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
大規模言語モデル(LLM)を「賢く」する手法には、基本的に 2 つの方法があります。1 つはパラメータ数を増やすこと(脳を大きくする)、もう 1 つは計算資源や学習データを増やすこと(教育期間を延ばす)です。
どちらも効果はありますが、コストがかかるという共通点があります。
あらゆる研究の究極的な目的は、「リソースの制約下で目標を最大化すること」にあります。その観点からすれば、私たちはもっと魅力的な第 3 の選択肢を追うべきでしょう。それは、新しいパラメータを購入するのではなく、すでに持っているパラメータを再利用する方法です。
この考え方が世界に「ループド・トランスフォーマー(Looped Transformer)」の発見と発明をもたらしました。
ループド・トランスフォーマーは、モデルの一部を切り出し、同じ入力データをその部分に対して複数回ループさせて処理します。各パスで少しだけ深く「考える」ようにし、まるで理解を深めるために段落を数回読み直すような仕組みです。これが成功すれば、はるかに大きなモデルに匹敵する知能を得ながら、保存すべき重み(ウェイト)は小さなモデルのものだけで済みます。
例えば、100 層のトランスフォーマーを訓練する代わりに、25 層を訓練してそれを 4 回ループさせることができます。順次処理の遅延時間や必要な演算量(FLOPs)はほぼ同じですが、重みの数は 4 分の 1 に減ります。
つまり、重みが多様な役割を果たすように訓練されたことになります。同じ重みが、過去の出力を反映し、それを反復して更新する能力を持つのです。
ループド・モデルは、推論が求められるタスクやコンテキスト内学習(in-context learning)、そして ARC-AGI や数独(Sudoku)といった抽象的なパズル解決のベンチマークにおいて、驚くほど高い成果を上げています。
最も初期のループド・トランスフォーマー
最も引用数の多い論文の一つに、2018 年の ICLR で発表された「Universal Transformers」に関する、あまり知られていない論文があります。

Universal Transformers では、標準的なトランスフォーマーの N 層からなる固定スタックを置き換え、時間ステップ全体にわたって単一の共有遷移関数を反復的に適用するアプローチを採用しています。
「レイヤー 1 → レイヤー 2 → ... → レイヤー N」という深さ方向の処理ではなく、UT はすべての位置における表現を並列で逐次的に洗練させ、各反復ステップで同じ重みを使用します。
これらの概念は、古典的な RNN(リカレントニューラルネットワーク)にも見られます。RNN では単一のモジュールを繰り返し使用してデータを順次処理しますが、RNN は時間軸に沿ってシーケンス内の要素をループするのに対し、UT(およびその後のループド・トランスフォーマー)は各入力トークンを時間軸に沿って並列で処理します。ここで適用されるループは、レイヤーレベルでのみ行われます。
UT は多くの優れた結果をもたらしましたが、その最大の遺産はこの画期的なアイデアの導入にあります。現在では、ほぼすべての現代的なループド型・再帰的深さを持つ言語モデルにとって、直接的なアーキテクチャ上の祖先として引用されています。
なぜ UT は 2018 年に「失敗」したと見なされたのか
当時、UT がより大きなインパクトをもたらしたと認識されなかったのにはいくつかの理由があります。
1. 計算資源とパラメータ数のトレードオフについて、まだ理解が深まっていなかった
計算リソースを N 倍に増やした際、単純にモデルのサイズを N 倍にする方が、同じモデルを N 回ループさせるよりも性能が向上する傾向があります。2018〜2019 年当時、スケーリング則(Kaplan ら、2020)はまだ発表されておらず、「FLOP あたりの再帰的な計算リソースとパラメータの計算リソース、どちらが価値が高いか」という問いに対する公式な枠組みさえ存在しませんでした。UT の評価は「パラメータ数」を揃えたものではなく、「学習に要する計算量」を揃えたものではありませんでした。これにより、再帰的なステップが「無料のパラメータ」と見なされることで再帰性が過大評価され、その真の計算コストが隠されてしまう結果となりました。
2. 時期尚早だった
UT(2018)は、業界が「スケールこそが全て」という時代へと移行しようとしていたまさにそのタイミングで登場しました。当時に行われた多くの研究を振り返ってください。BERT(2018)、GPT-2(2019)、そしてまもなく GPT-3(2020)が登場しましたが、これらは単純な Transformer のパラメータとデータを力任せにスケールさせることで、予測可能かつ劇的な性能向上をもたらすことを示しました。一方、再帰的な深層構造は本質的に「逐次的」です。ステップ t+1 を計算するには、ステップ t が完了するのを待つ必要があります。
3. インフラが整っていなかった
4. 効果は確かにあったが、劇的ではなかった
UT は数百万ドル規模の巨大モデルというよりは、研究論文としての性格が強かったのです。結果自体は興味深いものでしたが、当時のパラダイムを覆すほどインパクトがあるとは感じられませんでした。その理由は、UT が動作していたスケールが小さすぎたからです。
5. 技術の進歩
UT は「密(dense)」なアーキテクチャとしてのみテストされました。一方、現代の LT(Looped Transformers)は、過去 7 年間の集中的な研究と資金投入によって得られた知見を背景に動作しています。現在では Mixture of Experts モデルが利用可能になり、DSA やより最近の CSA など、高度なスパースアテンション手法も登場しています。
UT もエンコーダー・デコーダーアーキテクチャでしたが、現在のすべての大規模言語モデル(LM)はデコーダー専用アーキテクチャです。
5. 計算コストと資金調達
2026 年の GPU は 2019 年よりもはるかに高性能になっています。また、投資家も現在の方が最先端の AI 研究に投資する意欲が高いと言えます(現代の AI の基盤が 2017〜2020 年に構築されたことを考えると、これは少し意外な点かもしれません)。
ユニバーサル・トランスフォーマー(UT)の中核となるアイデアは、「同じ自己注意機構と遷移ブロックを繰り返し適用し、各トークンの表現を並列に洗練させていくこと」でした。そして、個々のトークンが「完了した」と判断されるタイミングは、トークンごとの停止条件によって決定されます。
現代のループド・トランスフォーマー(Looped Transformer)は、この重み共有の概念を引き継ぎつつ、デコーダー専用の数十億〜数兆パラメータを持つ因果関係に基づく言語モデルに必要な要素——大規模での効率的なトレーニングや、エンコーダー・デコーダー型ではなく因果関係に特化した計算など——を中心に再構築されています。
埋め込み層や出力層を含むネットワーク全体をループさせるのではなく、現代のループド LLM はネットワークを 3 つの機能的なグループに分けています。
ループ型トランスフォーマーとは何か?
まず、数層の通常の非再帰的トランスフォーマー層(Prelude)が、生トークンを潜在空間に埋め込む役割を果たします。
次に、実際の「ループ」部分となるコア再帰ブロック(Core recurrent block)が登場します。これは繰り返し適用される部分で、前の潜在状態と Prelude から得られた埋め込み入力を受け取り、新しい潜在状態を生成します。
最後に、Coda と呼ばれる数層の通常のレイヤーと LM ヘッドが、ループブロックの結果を処理し、最終的な潜在状態を次のトークンの確率分布へと展開(アンエンベッド)します。

数十回の再帰的イテレーションを通じて逆伝播を行うのは計算コストが高く、各ステップで活性化値を保存する必要があるため、現代の実装では通常、ループに対する切り捨て逆伝播(truncated backpropagation through the recurrence)を採用しています。具体的には、勾配は完全な展開チェーン全体ではなく、最新のイテレーションのランダムなサブセットのみを通じて伝播されます。これにより、メモリと計算リソースを現実的な範囲に保ちつつ、モデルが多数のステップを経て収束するように学習させることが可能になります。
再帰的深さに関する詳細は、Huginn/Geiping 他(2025)の論文などで確認できます:https://arxiv.org/pdf/2502.05171
ループ回数はどう決めるか?(サンプリングと停止)
これはユニバーサル・トランスフォーマー(UT)からの最も重要な違いです。UT ではACT(Adaptive Computation Time、適応的計算時間)と呼ばれる手法が使われていました。これはトークンごとに学習される「停止確率」であり、記号ごとにいつ refinement を終了するかを決定する仕組みでした。
現代のループ型大規模言語モデル(LLM)では、この手法を捨てて、よりシンプルでスケーラブルな方法を採用するのが主流です。具体的には、学習時にループ回数 r をランダムにサンプリングします。これにより、推論時にどの深さまで展開しても頑健に動作するようモデルが訓練されます。そのため、テスト時には r を調整ノブとして使い、計算リソースと品質のトレードオフを自由に行えるようになります。
一般的に反復回数を増やすほど推論精度は向上しますが、ある点を超えると効果は頭打ちになります。
モデルを N 回ループさせると、学習に必要な計算量は概ね N 倍になります。再帰処理にはコストがかかるのです。限られた計算リソースの制約下では、従来の研究で「単純にバニラ型 Transformer のサイズを N 倍にする方が、小型モデルを N 回ループさせるよりも性能が良い」と示されています。この分野の研究課題は、まさにこの制約を打破することにあります。
- MoEUT は、単一の密なブロックをループするのではなく、細粒度の専門家グループをループさせます。これにより、重みの共有と Mixture-of-Experts の容量が融合されます。(https://arxiv.org/abs/2405.16039)
- Relaxed Recursive Transformers は、共有された繰り返しブロックを維持しつつ、ステップごとの小さな LoRA アダプターを追加します。これにより、厳密な重みの共有によって失われた表現力が一部回復されます。(https://arxiv.org/abs/2410.20672)
- Mixture-of-Recursions (MoR, 2025) は、各トークンを動的に学習された再帰ステップ数を通じてルーティングします。簡単なトークンはループ回数が減り、難しいトークンはより多くのループを経るようになります。(arXiv:2507.10524)
- DeepLoop は、隠れたトレーニングの安定性に関するバグを修正します。標準的な DeepNorm スケーリングは独立した層を前提としていますが、ループモデルでは同じ重みが複数回の訪問で再利用されます。そこで DeepLoop は、深いループモデルが学習可能になるよう、ループを意識したより強力なスケーリング指数を導入しました。(https://arxiv.org/abs/2607.13491)

「DeepLoop」論文(https://arxiv.org/abs/2607.13491)から:
Loopie は計算コストの問題に立ち向かいます。適切な設計(層ごとのループ化、保存する深さを半分にする、計算資源をモジュール型エキスパートバックボーンへ再投資する)さえあれば、ループ化されたモデルはパラメータ数だけで比較されるのではなく、同等の計算リソースを持つ通常の Transformer を上回る性能を発揮できることを示しています。また、Loopie はループ処理を行う場所も変えます。従来のように多層スタック全体をループさせるのではなく、「層ごとのループ(layer-loop)」を導入し、各レイヤーが次のレイヤーへ進む前に再帰的に適用される仕組みにしました。
つまり、従来の「A B C A B C A B C」という順序ではなく、「A A A B B B C C C」のように処理が行われます。(https://arxiv.org/abs/2607.16051)

これらの論文はすべて、Paper Breakdown(paperbreakdown.com)で読むことができます。
まずは「Recurrent Depth」の論文から始めましょう:
原文を表示
So there are basically two ways people make a LLM "smarter": 1. give it more parameters (a bigger brain), 2. or, give it more compute/data to train on (a longer education).
Both work, but both are expensive!
The ultimate motive of all types of research is to maximize objectives under resource constraints. In that light, we would rather be chasing a tempting third option: reuse the parameters you already have, instead of buying new ones.
The idea has led the world to discover/invent a Looped Transformer.
A looped transformer takes a section of the model and run the *same* input through it multiple times in a loop, letting it "*think*" a bit more each pass, almost like re-reading a paragraph a few times to understand it better. If this works, you could get the intelligence benefits of a much bigger model while only storing the weights of a small one.
Instead of training 100 transformer layers, you might train 25 layers, but loop over them 4 times. The forward pass latency and the number of FLOPs remain similar, but the number of weights decrease 4x. Effectively, you have trained your weights to be polymorphic - the same weights are capable of reflecting and iterating over past versions of its own output.
Looped models have done surprisingly well on reasoning-heavy tasks, in-context learning, and abstract puzzle-solving benchmarks like ARC-AGI and Sudoku.**
The earliest Looped Transformer
One of the most cited papers is this little known 2018 ICLR paper on "Universal Transformers"

In Universal Transformers we take the standard Transformer and replace its fixed stack of N distinct layers with a single shared transition function applied recurrently** across time steps.
Instead of processing depth as "layer 1 → layer 2 → ... → layer N," UT iteratively refines the representation of *every position in parallel*, applying the same weights at each recurrent step.
Some of these themes are present in classic RNNs (recurrent neural networks) as well, where a single module is reused multiple times to process data sequentially. Whereas RNNs looped over the entries in a sequence across time, UT (and Looped Transformers as well) processes each input token parallelly across time. The loop is only applied at the layer level.
UT got a lot of cool results but its lasting legacy is for introducing this crazy idea. It is now cited as the direct architectural ancestor of essentially every modern looped/recurrent-depth language model.
Why UT "failed" (in 2018)
There are several reasons why UT wasnt perceived as a bigger deal back then.
1. The compute-vs-parameters trade-off wasn't understood yet
Given an N× increase in compute, simply making the model N× bigger tends to beat looping it N times. In 2018-19, scaling laws (Kaplan et al., 2020) hadn't even been published, so the field had no formal framework for asking *"is recurrent compute or parameter compute more valuable per FLOP?"* UT was evaluated at matched *parameter count*, not matched *training compute*, which flatters recurrence (recurrent steps are "free" parameters) while hiding its true compute cost.
2. The timing was wrong
UT (2018) landed right as the field was entering the "scale is all you need" era. Think of all the work that came back then: BERT (2018), GPT-2 (2019), and soon GPT-3 (2020) demonstrated that brute-force parameter and data scaling of vanilla, easily-parallelizable Transformers delivered massive, predictable gains. Recurrent depth is fundamentally sequential - you cannot compute step *t+1* until step *t* finishes. 3. Infrastructure wasn't ready
3. The gains were real but not dramatic enough
UT was more of a research paper than a full blown millions of dollars model. The results were cool but they did not feel huge enough to shift the paradigm back then, because the scale they operated in was small.
4. Advances in tech
UT was tested only as a dense architecture. Modern LTs work with knowledge of 7 more years of dedicated research and funds. We got Mixture of Experts models now, more advanced sparse attention methods (like DSA, and more recently CSA).
UT was also an encoder-decoder architecture. In current times, all LMs are decoder only architectures.
5. Compute money
GPUs in 2026 are way more capable than in 2019. Investors are also more likely to invest in cutting edge AI research right now than back in 2019 *(which is kinda surprising given most of the backbone of modern AI was arguably built from 2017-2020)*.
Universal Transformer's core idea was: apply the same self-attention + transition block repeatedly, refining the representation of every token in parallel, with per-token halting deciding when each symbol is "done."
The modern Looped Transformer keeps the same *weight-tying* thing alive but reframes almost everything else around what a decoder-only, billion-to-trillion-parameter causal language model needs: efficient training at scale, causal (not encoder-decoder) computation, etc.
Instead of looping the *entire* network including embedding and output layers, modern looped LLMs split the network into three functional groups:
- Prelude (P): a handful of ordinary, non-recurrent Transformer layers that embed raw tokens into a latent space.
- Core recurrent block (R): the actual "loop." This is the part that gets applied repeatedly, taking the previous latent state together with the embedded input (from the Prelude) to produce a new latent state.
- Coda (C): a few more ordinary layers plus the LM head that processes the recurrent block, which un-embeds the final latent state back into next-token probabilities.

Because backpropagating through dozens of recurrent iterations is expensive (each step requires storing activations), modern implementations typically use truncated backpropagation through the recurrence. Basically, gradients are only propagated through a random subset of the most recent iterations rather than the full unrolled chain, keeping memory and compute tractable while still training the model to converge over many steps.
You will find more about recurrent depth in a paper like: Huginn/Geiping et al. 2025 (https://arxiv.org/pdf/2502.05171)
How much to loop? (Sampling vs Halting)
This is the most important departure from UT. Universal Transformer used something called ACT (Adaptive Computation Time) — a *learned per-token halting probability* that decided, symbol by symbol, when to stop refining.
Modern looped LLMs mostly drop this in favour of something simpler and more scalable: the loop count r is randomly sampled during training rather than learned. This trains the model to be robust to whatever depth it is unrolled to at inference time, so at test time you can simply choose rr as a knob to trade off compute for quality! More iterations generally means better reasoning, with diminishing returns past some point.
If you loop a model N times, your training compute roughly multiplies by *N-*x too. Recurrence isn't free. Under a fixed compute budget, prior work showed that simply making a vanilla Transformer N× bigger tends to beat looping a smaller model N times. The challenge for researchers in this area is to overcome this constraint!
- MoEUT — loops fine-grained expert groups instead of a single dense block, merging weight-tying with Mixture-of-Experts capacity. (https://arxiv.org/abs/2405.16039)
- Relaxed Recursive Transformers — keep a shared repeated block but bolt on small per-step LoRA adapters, recovering some expressivity lost to strict weight tying. (https://arxiv.org/abs/2410.20672)
- Mixture-of-Recursions (MoR, 2025) — routes each token through a dynamically learned number of recursive steps, so easy tokens loop less and hard tokens loop more (arXiv:2507.10524).
- DeepLoop — fixes a hidden training-stability bug: standard DeepNorm scaling assumes independent layers, but looped models reuse the same weights across visits, so DeepLoop introduces a stronger, loop-aware scaling exponent to keep deep looped models trainable. (https://arxiv.org/abs/2607.13491)

- Loopie — tackles the compute problem: shows that with the right recipe (layer-loop + halved stored depth + reinvested compute into a Mixture-of-Experts backbone), a looped model can actually beat a compute-matched vanilla Transformer, not just match its parameter count. Loopie also changes where the loop happens. Instead of looping the whole multi-layer stack, it introduces "layer-loop", where each individual layer is applied recurrently before passing to the next layer. Meaning instead of: "A B C A B C A B C", they do "A A A B B B C C C" (https://arxiv.org/abs/2607.16051)

You can also read all these papers on Paper Breakdown: paperbreakdown.com
Start with the Recurrent Depth paper:
AI算出
技術分析ainew評価標準
AI モデルの構造と学習手法に直接焦点を当てた専門的な解説であり、新規性については既存の概念を明確化する二次メディアとしての性質を持つため中程度の評価とした。検索意図は特定の製品名ではなく一般的な技術カテゴリを対象とするため低め、日本固有の事例や企業情報も含まれていないため低評価とした。
6つの評価軸を見る
- AI関連度
- 100
- 情報源の信頼性
- 50
- 新規性
- 50
- 調べる価値
- 25
- 重複の少なさ
- 100
- 日本での有用性
- 25
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み