Authors: Mieszko Komisarczyk, Saurabh Mathur, Maurice Kraus, Sriraam Natarajan, Kristian Kersting
Organizations: Department of Computer Science, Technical University of Darmstadt, Germany · Department of Computer Science, The University of Texas at Dallas, USA · Hessian Center for Artificial Intelligence (hessian.ai), Darmstadt, Germany · German Research Center for AI (DFKI)
Neural reasoners such as Tiny Recursive Models (TRMs) solve complex problems by combining neural backbones with specialized inference schemes. Such inference schemes have been a central component of stochastic reasoning systems, where inference rules are applied to a stochastic model to derive answers to complex queries. In this work, we bridge these two paradigms by introducing Recursive Inference Machines (RIMs), a neural reasoning framework that explicitly incorporates recursive inference mechanisms inspired by classical inference engines. We show that TRMs can be expressed as an instance of RIMs, allowing us to extend them through a reweighting component, yielding better performance on challenging reasoning benchmarks, including ARC-AGI-1, ARC-AGI-2, and Sudoku Extreme. Furthermore, we show that RIMs can be used to improve reasoning on other tasks, such as the classification of tabular data, outperforming TabPFNs.
Figures & tables
Figure 1: A Recursive Inference Machine (RIM) that solves problems described by x , given an initial solution y(0) , and an initial state ( z(0) ). It consists of a Solver , a Reweighter , and a Generator . The components solve the problem by alternating between the Solver updating the state recursively for T steps, and the Generator using these state-updates to generate an updated solution. After repeating this N times, the RIM produces the solution y(N).
Figure 2: Unrolling a Recursive Inference Machine (RIM). The inner loop (indexed by j=1,…,T ) acts as the Solver , which extends the short-term reasoning "scratchpad" zj by proposing new states z^j+1 based on the problem description x and current solution yi . The outer loop (indexed by i=1,…,N ) implements the Generator , which updates the solution yi after each phase of local refinement. The Reweighter intercepts the updates proposed by the Solver and Generator and weighs them against their previous values, stabilizing the trajectory.
Name
Solver ( )
Generator ( )
Reweighter ( )
SimRIM (D)
fL(ΘL)
fH(ΘH)
\mathbbm1 (Identity)
SimRIM (S)
f(Θ)
f(Θ)
\mathbbm1 (Identity)
RIMA
f(Θ)
f(Θ)
EMA
RIMFormer
f(Θ)
f(Θ)
Transformer
TabRIM
PTabPFN(Xi∣x−i,y,Dtrain)
PTabPFN(Y∣x,Dtrain)
P(e∣x^)
Table 1: Family of RIMs. We categorize the architectures based on their components: Solver , Generator , and Reweighter . The two variants of Simple RIM (SimRIM, aka TRM), Decoupled (D) and Shared (S), have a simple identity function Reweighter. They are identical to HRM and TRM, respectively. RIMA and RIMFormer improve upon SimRIM (S) by employing more expressive Reweighters. TabRIM implements Solver and Generator via TabPFN forward passes, while the Reweighter encodes prior knowledge about noise.
Figure 3: Tabular RIM (TabRIM) for Reasoning under Uncertainty To reason about the distribution over the target Y given noisy observations E=e, the TabRIM decomposes the task into a Solver-Reweighter-Generator loop. The Solver iteratively denoises the observation by iteratively resampling latent variables from their full conditionals. Each such conditional is implemented as a single forward pass over TabPFN. The Reweighter weighs these samples against the observed evidence to ensure consistency with it. These consistency-weighted samples are used by the Generator to infer the final target distribution by computing the empirical expectation over them.
Cleveland Heart Disease
AUC-ROC (↑)
AUC-PR (↑)
TabPFN
0.85
0.83
TabRIM
0.87 (+0.02)
0.84 (+0.01)
Table 2: RIMs with Gibbs sampling may outperform TabPFN on tabular data with heavy observational noise. Scores are color-coded (the bluer, the better) and the differences are w.r.t. TabPFN. (best viewed in color)
ARC-AGI 1
pass@1 (↑)
pass@2 (↑)
SimRIM (aka TRM)
40.5
44.38
RIMformer
43.25 (+2.75)
47.13 (+2.75)
RIMA
42.5 (+2.00)
47.5 (+3.12)
Table 3: RIMs outperform Tiny Recursive Models (SimRIM) on symbolic reasoning benchmarks. The test set performance (accuracy, pass@1, and pass@2) on Symbolic reasoning benchmarks (ARC-AGI-1, ARC-AGI-2, Sudoku-Extreme, and Maze-Hard), comparing a RIM with a simple identity Reweighter (SimRIM), with ones having more expressive Reweighers (RIMFormer and RIMA). Clearly, the RIMs with expressive Reweighters outperform the one with a simple identity Reweighter, underscoring the importance of reweighting for effective reasoning.Scores are color-coded (the bluer, the better) and the differences are w.r.t. SimRIM/TRM. (best viewed in color)
Method
Sudoku Extreme
SimRIM (aka TRM)
87.16
(αL,αH)=(0.4,0.4)
80.26 (-6.90)
(αL,αH)=(θ1,θ2)
84.27 (-2.89)
RIMA ( z~L only)
87.84 (+0.68)
RIMA ( z~H only)
87.57 (+0.41)
RIMA
89.34 (+2.18)
Table 4: Reweighting Ablation: Static vs. Dynamic. Test set accuracies on the Sudoku Extreme benchmark for RIMA (with full dynamic reweighting), and its variants with partial dynamic reweighting ( z~L only and z~H only), learnable scalars (θ1,θ2) and fixed values. Clearly, the full reweighting outperforms other configurations. Scores are color-coded (the bluer, the better) and the differences are w.r.t. SimRIM/TRM. (best viewed in color)
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Method
Sudoku Extreme
SimRIM (aka TRM)
87.16
(αL,αH)=(0.8,0.8)
82.76 (-4.40)
(αL,αH)=(0.6,0.6)
85.29 (-1.87)
(αL,αH)=(0.4,0.4)
80.26 (-6.90)
(αL,αH)=(0.2,0.2)
74.52 (-12.64)
(αL,αH)=(θ1,θ2)
84.27 (-1.87)
Appendix
Table 5: Full Ablation Study on Static vs Dynamic reweighting
How should future neural reasoning systems implement extended computation? Recursive Reasoning Models (RRMs) offer a promising alternative to autoregressive sequence extension by performing iterative latent-state refinement with shared transition functions. Yet existing RRMs are largely deterministic, following a single latent trajectory and converging to a single prediction. We introduce Generative Recursive reAsoning Models (GRAM), a framework that turns recursive latent reasoning into probabilistic multi-trajectory computation. GRAM models reasoning as a stochastic latent trajectory, enabling multiple hypotheses, alternative solution strategies, and inference-time scaling through both recursive depth and parallel trajectory sampling. This yields a latent-variable generative model supporting conditional reasoning via pθ(y∣x) and, with fixed or absent inputs, unconditional generation via pθ(x). Trained with amortized variational inference, GRAM improves over deterministic recurrent and recursive baselines on structured reasoning and multi-solution constraint satisfaction tasks, while demonstrating an unconditional generation capability. https://ahn-ml.github.io/gram-website
Junyeob Baek, Mingyu Jo, Minsu Kim +3
KAIST · Mila – Québec AI Institute · New York University +1
Recent work on recursive architectures has shown that tiny neural networks can be surprisingly powerful on structured reasoning tasks. The trick is to model reasoning trajectories with a latent dynamical system. We argue that the inference-time behaviour of these architectures is best understood as approximate inference over latent reasoning trajectories, with deterministic recursion as the one-particle, zero-noise limit. We make this view operational through guided stochastic exploration: stochastic perturbations of the reasoning dynamics propose neighbouring trajectories, and the model's existing early-stopping head reweights them online. The framework yields three label-free diagnostics: local stability, guide alignment, and cloud-token entropy. These predict, from inference traces alone, whether the procedure will help and which of its outputs to trust. On Sudoku-Extreme it lifts exact-solve accuracy from 85.9% to 98.0% without retraining; on Maze-Hard the diagnostics flag a misaligned guide, as validation performance later confirms. The same machinery thus characterises both when recursive reasoning has room to improve at the trajectory level and when the model's internal guide can recover it.
Recursive models create computational depth through parameter reuse, offering a parameter-efficient alternative to increasing model size. However, most recursive models repeatedly apply one learned transformation or a prescribed sequence of transformations, restricting computation to a fixed layer order. We introduce the Random Recursive Model (RRM), which maintains a pool of L learned layers and performs T recursive steps by sampling one layer independently with replacement for each example and step. This enables flexible layer reuse while retaining the parameter efficiency of recurrence. We evaluate RRM on challenging reasoning tasks, where it matches or exceeds the baselines, often with 50-75 % fewer parameters. RRM can vary its depth at inference, including beyond that seen during training, without retraining or adding parameters, improving tasks that benefit from deeper iterative computation. RRM also supports Monte Carlo inference and probabilistic test-time scaling, both of which improve performance without retraining. These insights may open new directions in neural network architecture design.
Jama Hussein Mohamud, Mirco Ravanelli
Mila – Quebec AI Institute · Université de Montréal · Concordia University