Universal YOCO for Efficient Depth Scaling

Yutao Sun, Li Dong, Tianzhu Ye, Shaohan Huang, Jianyong Wang, Furu WeiarXiv 2026

TL;DR

Universal YOCO (YOCO-U) introduces a highly efficient architecture for scaling the computational depth of Large Language Models without exploding their memory footprint. By confining recursive parameter-sharing loops to shallow, efficient-attention layers, YOCO-U dramatically improves data efficiency and reasoning performance while keeping the global Key-Value (KV) cache constant.

What Problem Does This Paper Address?

To tackle complex, multi-step reasoning problems, modern LLMs are increasingly relying on "test-time scaling"—spending more computational effort during inference to think deeper. One straightforward way to scale compute is depth scaling via recursive looping (sharing parameters across layers).

However, standard Transformers struggle with this approach. Looping through standard full-attention layers forces the model to repeatedly execute global attention and regenerate KV caches. As a result, the memory footprint of the KV cache inflates linearly with the model's computational depth, creating prohibitive memory overhead and severe latency bottlenecks during long-context inference.

Methods

YOCO-U builds upon the YOCO ("You Only Cache Once") architecture, which splits a standard Transformer into two distinct parts: a Self-Decoder and a Cross-Decoder. The Self-Decoder processes input tokens using efficient attention (like sliding-window attention) to generate a compact global KV cache, which the Cross-Decoder then reuses across all its layers via cross-attention.

The core innovation of YOCO-U (Universal YOCO) is replacing the static Self-Decoder with a Universal Self-Decoder. This module performs recursive computation by looping the input through the same shallow, efficient-attention layers for $T$ iterations.

Figure 1: Overview of the YOCO-U architecture. Universal Self-Decoder (bottom) performs recursive computation (T iterations, indicated by the red dashed line) using efficient self-attention (local windows) to refine representations. Crucially, the global KV cache produced for cross-attention is generated once and remains constant regardless of T, while only the local window-based KV caches grow with iterations, keeping overall cache overhead negligible. Cross-Decoder (top) reuses this shared global KV cache via cross-attention for autoregressive token prediction.

Crucially, because the recursion is confined to these shallow layers, the massive global KV cache used by the Cross-Decoder is materialized only once. Only the small, local window-based KV caches scale with the number of iterations ($T$), keeping the overall memory overhead negligible.

Datasets

The authors evaluated YOCO-U across a diverse suite of benchmarks:

  • Language Modeling & General Benchmarks: Pre-trained on up to 300 billion tokens and evaluated on ARC-C, Winogrande, HellaSwag, MMLU, BBH, GSM8K, HumanEval, and DROP.
  • Math Reasoning (Thinking SFT): Fine-tuned on 20 billion tokens of math thinking data and evaluated across 11 math benchmarks including GSM-8K, MATH, SVAMP, ASDiv, MAWPS, CARP, TABMWP, Gaokao 2023 En, OlympiadBench, CollegeMath, and AMC23.
  • Long Context Evaluation: Evaluated using long-sequence perplexity on Book and Code datasets, alongside the Needle In-A-Haystack retrieval test.

Key Insights and Ideas

  • Decoupling Depth from Memory: YOCO-U proves that you can increase an LLM's representational depth without a proportional increase in KV cache memory. It achieves the depth of a much larger model while maintaining the serving cost of a shallower one.
  • The Power of Shallow Recursion: Looping only the shallow, efficient-attention blocks yields better capability-efficiency tradeoffs than looping the entire network (like the standard Universal Transformer). Deeper layers behave more like a final decoder where recursion yields diminishing returns.
  • Token Utility Multiplier: Recursive compute acts as a massive data efficiency booster. By allowing the model to process tokens multiple times through shared parameters, the utility of each training token is significantly amplified.

Key Results

  • Data & FLOP Efficiency: When aligned by training FLOPs, YOCO-U achieves a significantly lower language modeling loss ($\Delta L = 0.033$) than standard YOCO. Remarkably, YOCO-U requires 62% fewer tokens to reach the same performance level as the baseline.
Figure 2: Scaling behavior of language modeling loss with the same model size. (Left) Loss versus training FLOPs: YOCO-U achieves competitive or lower loss (∆L=0.033) at the same FLOPs budget, while incurring negligible KV cache overhead. (Right) Loss versus training tokens: YOCO- U also improves data efficiency, requiring approximately 62% fewer tokens to reach comparable performance.
  • Downstream & Math Superiority: Under equal FLOP configurations, YOCO-U outperforms YOCO across general benchmarks (+4.45 average score). Following "Thinking SFT," YOCO-U achieves an extraordinary 24.4% average accuracy gain across 11 math benchmarks.
Figure 3: Accuracy comparison on 11 math benchmarks. YOCO-U consistently outperforms the YOCO baseline across all tasks, achieving a significant boost in average accuracy.
  • Inference Throughput & Memory Savings: In long-context scenarios (256K length), YOCO-U achieves 10x higher prefilling throughput than vanilla loop Transformers (RINS). Furthermore, RINS requires 38x more KV cache memory than YOCO-U at a 256K context length, demonstrating YOCO-U's massive advantage in memory efficiency.
Figure 4: Long sequence perplexity decreases along with the increasing input length on Book (top) and Code (bottom) data. YOCO-U consistently achieves lower perplexity compared to non-recursive baselines, i.e., Transformer and YOCO. YOCO-U also maintains parity with the heavier recursive baseline (RINS), indicating effective utilization of long-range context.

Limitations and Future Work

While YOCO-U demonstrates compatibility with various subquadratic attention mechanisms (like RetNet, Mamba, and Gated DeltaNet), the paper primarily focuses on Sliding-Window Attention (SWA) as its default implementation. The authors note that exploring the interplay between these alternative efficient-attention architectures and recursive computation remains a promising direction for future scalable LLM development.

Summary updated

BibTeX
@misc{sun2026universal,
  author = {Yutao Sun and Li Dong and Tianzhu Ye and Shaohan Huang and Jianyong Wang and Furu Wei},
  title = {{Universal YOCO for Efficient Depth Scaling}},
  year = {2026},
  eprint = {2604.01220},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.01220},
}
Figure