# GRAM: Open-Source Community Reproduction of Turning Recursive Reasoning into Probabilistic Generation

> GRAM transforms deterministic recursive reasoning into probabilistic multi-trajectory computation, providing a new paradigm for neural reasoning systems that goes beyond autoregressive sequence expansion. The community reproduction project enables single-GPU users to replicate the paper's results.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-05-21T08:53:42.000Z
- 最近活动: 2026-05-21T09:18:27.680Z
- 热度: 150.6
- 关键词: GRAM, 递归推理, 生成模型, 变分推断, 神经推理, 开源复现, 概率推理, RRM
- 页面链接: https://www.zingnex.cn/en/forum/thread/gram-826f14b2
- Canonical: https://www.zingnex.cn/forum/thread/gram-826f14b2
- Markdown 来源: floors_fallback

---

## GRAM: Probabilistic Recursive Reasoning & Community Reproduction Overview

GRAM transforms deterministic recursive reasoning into probabilistic multi-trajectory computation, offering a new paradigm for neural reasoning systems beyond autoregressive sequence expansion. The community reproduction project enables single GPU users to replicate the paper's results. Key areas include its probabilistic components, double-loop architecture, experimental validation, and accessible open-source implementation.

## Background: Limitations of Deterministic Recursive Reasoning Models

Recursive Reasoning Models (RRMs) are an important direction in neural network reasoning, using iterative hidden state refinement instead of sequence expansion. However, existing RRMs are mostly deterministic, limiting their ability to explore multiple hypotheses (single path) which is crucial for complex constraint satisfaction problems where humans consider multiple solutions.

## GRAM's Core Innovation: Probabilistic Recursive Reasoning Framework

GRAM introduces two key probabilistic components:
1. **Stochastic Guidance**: At each high-level state transition, sample noise from a Gaussian distribution (conditioned on current state) and add to deterministic proposal to form next state.
2. **Variational Inference Training**: Uses variational posterior to approximate true posterior, with training objectives including cross-entropy loss (accuracy) and KL divergence (regularization). This allows GRAM to model multiple reasoning trajectories.

## GRAM Architecture: Inner-Outer Double Loop Design

GRAM uses an inner-outer double loop structure:
- **Outer loop**: N_sup supervision steps, generating predictions and computing loss at each step for intermediate feedback.
- **Inner loop**: K low-level updates (refine local features) followed by one high-level transition.
Truncated BPTT is used for training to handle deep recursion, balancing stability and memory.

## Experimental Results & Community Reproduction Progress

Original paper results: 99.7% single-sample accuracy on 8×8 N-Queens, 52.0% on ARC-AGI-1. Community reproduction (ad3002/gram) uses single RTX3080 Ti (12GB), reduced batch size (256 vs original 768), 250 training epochs (vs original 3000). Achieved 83.83% test accuracy on N-Queens 8×8, validating GRAM's effectiveness despite resource constraints.

## Technical Highlights of the Community Reproduction Project

The project emphasizes reproducibility and transparency:
- Detailed docs (GAP_DEFAULTS.md for unmentioned details, DEVIATIONS.md for differences from original).
- Deterministic data scripts (fixed seeds), MD5 checks for logs/results.
- Modular code with components like RoPE, multi-head attention, GRAM-specific modules (guidance networks, ACT, LPRM).
- One-command workflow for environment setup, training, evaluation.

## Significance & Future Outlook of GRAM

GRAM connects recursive neural networks and generative models, offering a new way for flexible, deep reasoning (in hidden state space, suitable for abstract tasks). The community project lowers the barrier for researchers/developers. Future directions: apply to more tasks, integrate with other reasoning techniques (test-time computation, model integration), and expand community contributions.
