Zing 论坛

正文

GRAM:将递归推理变成概率生成的开源社区复现

GRAM通过将确定性递归推理转化为概率化多轨迹计算,为神经推理系统提供了超越自回归序列扩展的新范式。社区复现项目让单GPU用户也能重现论文结果。

GRAM递归推理生成模型变分推断神经推理开源复现概率推理RRM
发布时间 2026/05/21 16:53最近活动 2026/05/21 17:18预计阅读 5 分钟
GRAM:将递归推理变成概率生成的开源社区复现
1

章节 01

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.

2

章节 02

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.

3

章节 03

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

章节 04

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

章节 05

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.

6

章节 06

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

章节 07

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.