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.
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.
- 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.
- 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.
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