arXiv:2610.18649cs.LGOct 2026

Manuscript Offprint

arXiv:2610.18649

Tiny Recursive Message Passing

Tommaso Salvatori, Matteo Forasassi, Alexis Toumi, Giovanni de Felice

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Tommaso Salvatori1,2^{1,2}, Matteo Forasassi1,2^{1,2}

Alexis Toumi1^{1}, Giovanni de Felice1^{1}

1^{1}Relational Intelligence, Inc 2^{2}Vienna University of Technology

{name}@rel-int.ai

Abstract. Message passing neural networks have shown remarkable performance in algorithmic and constraint reasoning, due to their ability to encode the structure of the task directly in the architecture. Recent work has shown that better results can be achieved using recursive transformers trained with deep supervision and truncated recursions, which make extremely deep loops stable to train, and equipped with test-time procedures such as discrete deduction lattices. In this work, we apply the same procedures to message passing networks, and show that the two ingredients are complementary, and lead to parameter efficient models: we obtain about 99% test accuracy on Sudoku-Extreme with a model of 16k parameters that trains in about 10 minutes on an H100, or in 9 hours on a CPU. We further show that the cost of truncating gradients grows with the number of rounds information needs to cross the graph, making the choice of wiring a trade-off between robustness to truncation and transfer across problem sizes. We conclude by showing that our models transfer zero-shot to larger instances than those seen during training, outperforming popular neural baselines on N-queens and Boolean satisfiability with a fraction of their parameters.

1 Introduction

Structured reasoning tasks consist of problems whose solution is computed by executing a specific set of instructions, or by searching over a known set of constraints. Such tasks are traditionally solved by symbolic methods, which are exact and scale to arbitrarily large instances, but require the solving procedure to be designed by hand. Neural networks instead learn this procedure directly from examples. To be competitive, however, they must exploit the structure of the problem and generalize to instances larger than those seen during training. Initially, message passing methods (Gilmer et al., 2017; Scarselli et al., 2008) dominated the neural subfield of algorithmic reasoning, as they are able to wire the interaction patterns of the problem directly inside the structure of the model. This way, no capacity is spent learning which variables constrain which, and the symmetries of the problem hold by construction rather than being learned from data (Xu et al., 2019). Furthermore, they can run any number of rounds, and thus spend more computation on harder instances (Selsam et al., 2019). This is particularly important when it comes to generalizing to problems that are harder than the ones encountered during training. Learning, however, is performed using backpropagation through time (BPTT) on the unrolled computational graph, which is memory expensive and hence limits in practice how deep the recursion can go.

Recent work has attacked this bottleneck by iterating a recurrent transformer model many times while replacing full backpropagation through the trajectory with a cheaper gradient. Deep equilibrium models differentiate through the fixed point of the forward pass, giving a parameter update in O(1)\mathcal{O}(1) memory (Bai et al., 2019, 2020), while tiny recursive models use a coarser approximation, running the recursion detached and differentiating only its final segment (Jolicoeur-Martineau, 2025). The final ingredient that makes such deep loops trainable is deep supervision, which keeps the gradient path short (Graves, 2016; Wang et al., 2025). Together these have brought Sudoku-Extreme within reach of small models: the work introducing the benchmark reported 55% accuracy with 27M parameters (Wang et al., 2025), while models with 800k parameters now approach a perfect score (Davis et al., 2026; Sghaier et al., 2026; Huang et al., 2026). Whether these approximations carry over to message passing is not obvious: the gradient that detached recursion discards is exactly the one that travels along the edges, and different wirings of the same constraint satisfaction problem depend on it very differently.

The transformer models that achieved the above results are parameter efficient even though they do not encode the structure of the problem. Can the parameter count of a recursive model be reduced even further by giving it the structure in the way message-passing architectures do, while keeping the inference and learning procedures that made looped transformers work? Can we use this modern machinery to design message passing architectures that generalize well to larger scale tasks at test time? We answer both questions positively: Deep supervision, detached recursion, and adaptive halting all presuppose a computation that decomposes into resumable segments carrying an explicit state. Recursive GNNs also carry such a state: at every round, each node reads the messages sitting on its edges together with its own memory, which is a tensor that can be paused and resumed like any other. What recursive GNNs lack is not this state but a training procedure built around it, which is what we provide. Architecturally, what we propose is close to recurrent relational networks (Palm et al., 2018); our contribution is the training and inference procedure, together with an analysis of how it interacts with the choice of wiring. Our contributions are briefly as follows:

  • We adapt the training and inference machinery of tiny recursive models to recursive GNNs. While deep supervision and truncated recursion carry over directly, adaptive halting and the deduction lattice require reformulation, namely per-vertex halting logits pooled with a smooth minimum, and a lattice defined over residual formulas for SAT.

• We show that encoding the graph structure and using the recursive machinery are complementary: On Sudoku-Extreme and maze-unique, a 32k-parameter recursive lattice transformer and a recursive GNN with the same graph trained with BPTT are outperformed by our method, which combines the two.

• We show that the cost of truncating gradients grows with the propagation distance of the graph: dense wirings are robust to truncation, while factor graphs require longer gradient windows. We also show how a recent lattice-based method developed to improve performance of recursive transformers (Davis et al., 2026), when ported to message passing models, largely increases the robustness to truncated gradients.

• We conclude with experiments that test zero-shot generalization to larger instances: on N-Queens, we train on 10×1010 \times 10 boards and evaluate on boards up to 16×1616 \times 16; on Boolean satisfiability (SAT), we train on medium-size SR and 3-SAT formulas and evaluate on hard ones. Our models often match or outperform the current state of the art, despite using smaller models. We also test a recently introduced 4-SAT benchmark (Skenderi et al., 2026), where we outperform all of the neural methods reported in the original work.