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