GRAM: Beyond Deterministic Paths — Scaling Reasoning via Stochastic Latent Trajectories
Generative Recursive Reasoning
This paper introduces Generative Recursive reAsoning Models (GRAM), a framework that transforms deterministic recursive architectures into probabilistic latent-variable models. By modeling reasoning as a stochastic latent trajectory, GRAM achieves SOTA performance on structured reasoning benchmarks like Sudoku-Extreme (97.0% accuracy) and ARC-AGI.
TL;DR
Generative Recursive reAsoning Models (GRAM) redefine internal neural computation not as a fixed path, but as a distribution of possible reasoning trajectories. By injecting Stochastic Guidance into recursive updates and training via variational inference, GRAM breaks the "mode collapse" of previous recursive models, enabling parallel inference-time scaling and superior performance on complex puzzles and multi-solution tasks.
The "Narrow" Reasoning Trap
Modern AI reasoning often follows two paths: generate longer text traces (Chain-of-Thought) or pile on more layers. Recursive Reasoning Models (RRMs) offered a third way: reuse a compact set of weights to iteratively refine a latent state. However, models like HRM and TRM suffered from a fatal flaw—they were deterministic.
If a deterministic model's first few "thoughts" drift into a suboptimal region of the latent space, it is structurally incapable of escaping. It cannot explore "what if" scenarios or handle puzzles with multiple valid answers. This is the "Narrow Trap": a single attractor state that limits exploration.
Methodology: The Stochastic Guidance Breakthrough
GRAM solves this by treating the reasoning process as a latent-variable generative process.
1. Stochastic Transitions
Instead of a fixed update , GRAM introduces a learned residual perturbation: The model doesn't just predict the next state; it predicts a distribution of possible next states. This "Stochastic Guidance" allows the model to "jitter" out of local minima.
2. Hierarchical Recursion
GRAM uses a two-tier architecture:
- High-level (): Carries abstract reasoning state and handles the stochastic guidance.
- Low-level (): Performs rapid, fine-grained deterministic refinements.

3. Inference-Time Scaling: Depth vs. Width
While typical models scale by going deeper (more steps), GRAM introduces Width Scaling. By sampling trajectories in parallel and selecting the best one via a Latent Process Reward Model (LPRM), GRAM achieves better results with lower latency.
Experiments: Superior Exploration
The power of GRAM is most evident in tasks requiring broad exploration.
Multi-Solution Coverage
In the N-Queens task, where multiple valid configurations exist, deterministic models fail to see the forest for the trees. GRAM's stochasticity allows it to discover nearly all valid solutions (90%+ coverage), whereas TRM and HRM collapse to a single mode.

Benchmarking "Hard" Reasoning
On Sudoku-Extreme, a benchmark so difficult that even DeepSeek-R1 (671B) scores 0%, GRAM achieves 97.0% accuracy. This proves that for highly constrained symbolic reasoning, the structure of computation matters more than the scale of parameters.

Unconditional Generation: Reasoning as Creation
A fascinating byproduct of GRAM is its ability to act as an unconditional generator. By removing the input , GRAM can generate valid Sudoku boards or MNIST digits from scratch. Unlike Diffusion models that require 1000 steps, GRAM achieves comparable quality in just 16-32 recursive steps, correcting its own "visual mistakes" as it iterates.

Critical Insight & Conclusion
GRAM teaches us that internal uncertainty is a feature, not a bug. By allowing a model to be "unsure" and explore multiple paths in its latent space, we unlock a form of robust reasoning that scale alone cannot provide.
Future Outlook: The challenge remains in training efficiency. The sequential nature of deep supervision makes it harder to parallelize than standard Transformers. However, as we look toward "System 2" thinking in AI, GRAM’s stochastic latent trajectories provide a compelling blueprint for how models might one day "ponder" a problem before committing to an answer.
