TL;DR
Standard Transformers "think" out loud by generating wordy Chain-of-Thought tokens, while their internal layers remain a rigid, one-way assembly line. Dreamer replaces that entire static stack with a single recurring layer that unifies sequence, depth, and expert routing under the umbrella of attention. In strictly fair, resource-matched head-to-heads, Dreamer learns ~3x faster and outperforms modern Transformers twice its size on complex reasoning tasks.
What Problem Does This Paper Address?
When we ask an LLM to reason via Chain-of-Thought (CoT), we force it to translate continuous, abstract computations into discrete words. It works, but it’s verbose and compute-heavy.
An appealing alternative is latent reasoning via depth recurrence (DR)—looping a representation through the same weights multiple times before spitting out a token. Reusing weights across depths encourages compositional generalization (repurposing the same mental "tools" at different stages of thought). However, scaling DR hits two major walls:
- The Layer-Size Bottleneck: If your model is one giant dense block executed at every loop, scaling up parameter counts blows up your FLOPs per token.
- The Hidden-Size Bottleneck: Just like old-school RNNs choked when squeezing a long sentence into a single fixed-size vector, looping deep thoughts through a fixed-width residual stream creates a memory bottleneck along the depth axis.
Furthermore, prior DR studies often muddied the waters by keeping fixed encoder/decoder layer stacks around the recurrent core, or comparing models without strictly matching FLOPs, parameters, and memory. The authors ask: Can a pure, single-layer depth-recurrent model beat modern Transformers when every computational resource is tightly matched?
Methods
Dreamer (Depth-Recurrent Attention Mixture) answers this by treating information flow across all major axes—tokens, layers, and parameters—as variations of scaled dot-product attention inside a single, repeatedly applied layer.
Each pass through the Dreamer layer sequentially combines three mechanisms:
- Sequence Attention (SA): Standard causal Transformer self-attention looking horizontally back at previous tokens, using standard RoPE.
- Depth Attention (DA): A "vertical Transformer" that attends over all previous depth states of the current token. This breaks the hidden-size bottleneck. Crucially, once a token is generated, its DA key-value cache is wiped and overwritten by the next token, keeping DA’s memory footprint tiny and constant ($O(1)$) regardless of context length.
- Expert Attention (EA): To decouple parameter count from FLOPs, static knowledge lives in a massive pool of sparse MLP experts. Instead of a standard Mixture-of-Experts (MoE) linear router, Dreamer casts routing as low-rank, top-$k$ sparse attention over expert keys. To tell the shared router where it is in the thinking loop, queries get a clever "half-reversed" depth-RoPE—encoding both how many steps have passed and how many remain.
Finally, to stabilize a single recurring layer without performance drops, the authors normalize the residual stream directly between depths and turn the attention QKV/output projections into lightweight, top-1 linear MoEs (absorbing a shared anchor expert at inference for zero extra compute).
Datasets
No new benchmarks were introduced. The authors pre-trained models up to ~2B parameters on two distinct ~100B-token mixes (cleaned, deduplicated, and decontaminated):
- Reasoning & Math: Trained on instruction datasets featuring concise explanations (deliberately avoiding verbose synthetic CoT traces to encourage latent reasoning). Evaluated 0-shot on MathQA, GSM8K, MATH, MMLU (math), and validation perplexity on Maths-College.
- Broad Knowledge: Trained on diverse natural language data and evaluated on HellaSwag, MMLU, PIQA, and TriviaQA.
Key Insights and Ideas
- Uniform MoE layering is likely suboptimal: By analyzing over a thousand small experts, the authors found that early depths use ~5x more unique experts than late depths, while the final depths rely heavily on a few depth-specialized experts (naturally learning a "decoder" role without needing a hardcoded layer!). Conventional MoEs, which spread experts evenly across layers, fight against this natural capacity allocation.
- Massive routing flexibility: Because any expert can be called at any depth, Dreamer uses 2–11x more unique experts per depth than a standard MoE, while roughly 50% of experts generalize across 6 or more distinct depths.
- Targeted vertical memory: Depth attention doesn't just act like a blurry skip-connection; it learns distinct phase transitions—early loops look back at initial embeddings, middle loops cross-reference widely, and final loops pull from mid-to-late depths to form the output.
Key Results
Using bivariate coordinate descent to tightly match parameters, FLOPs/token, and peak memory across depths 8 to 32 (up to 1.82B parameters):
- Data Efficiency & Accuracy: On reasoning benchmarks, Dreamer requires 3.3x fewer training tokens on average to match the Transformer baseline's best accuracy, and finishes +10.1 percentage points higher on average (e.g., jumping from 39.5% to 51.4% average accuracy at depth 32).
- ** punching above its weight: Dreamer models consistently outperform modern MoE Transformers of twice the depth, translating to a ~2x reduction** in parameters, FLOPs, and memory for the same performance.
- Broad Knowledge: On general language tasks (depth 32), Dreamer doesn't degrade—it edges out the Transformer baseline (37.4% vs. 34.5% average accuracy).
- The Speed Trade-off: Because resource-matching locks in FLOPs and memory, unoptimized HBM memory movements from Depth Attention cause a ~13% inference slowdown (though Dreamer without DA still handily beats Transformers with zero slowdown).
Limitations and Future Work
- Fixed Depth Only: To ensure strictly fair FLOP-matching and avoid confounding variables, all experiments used fixed loop counts. Extending Dreamer to dynamic test-time compute—letting the model decide how many loops a hard problem needs, perhaps via dynamic RoPE scaling—is a natural next step.
- Scale and Kernels: Models were tested up to ~2B parameters on 100B tokens; multi-trillion-token scaling laws remain open. Additionally, custom hardware kernels or linear/sliding-window attention along the depth axis could eliminate DA's 13% memory-movement slowdown.
- Modular Extensions: Because everything is framed as an attention mixture, future architectures could plug in new orthogonal axes—such as attending directly over external text embeddings mid-loop for "in-depth latent RAG."
Summary updated