Manuscript Offprint

arXiv:2610.09759

Unrolled Flow Models for Reasoning

Faissal Izermine, Hanru Bai, Oscar Davis, T. Konstantin Rusch

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

ABSTRACT

Flow matching enables language generation in few steps, but whether additional integration steps improve reasoning remains unclear. We prove that a flow parameterized by a two-layer Transformer can solve graph reachability, with the required number of integration steps increasing with the target's distance from the root. Yet, standard flow language models can fail to benefit from additional steps on reasoning tasks. We attribute this limitation to objectives that supervise each time point independently, without explicitly training successive steps to build on one another. To address this, we instead train through the model's own latent rollout over a randomly sampled subinterval of [0,1][0, 1], decoding only at the endpoint. On ProsQA, this raises accuracy to 97% and enables performance to improve with additional integration steps. For the longer rollouts required by reasoning tasks such as Sudoku and Maze, retracting the latent state onto a sphere stabilizes the dynamics and yields substantial gains over baselines with more than three times as many parameters. Sampling multiple rollouts further improves performance when paired with a parameter-free selection score, although reliable selection remains challenging for longer answers. Together, these results establish a theoretical basis for reasoning with flows and show how rollout training, stable latent dynamics, and rollout selection help realize this capacity in practice. The implementation can be found here.

1 INTRODUCTION

Autoregressive language models can spend more computation at inference by generating a longer chain of thought (Wei et al., 2022) or, more broadly, by scaling test-time compute (Snell et al., 2024). Flow matching (Lipman et al., 2023; Liu et al., 2023; Albergo et al., 2025) offers a different way to produce discrete answers (Eijkelboom et al., 2024). Instead of predicting one token after another, flow models start from noise and repeatedly update a continuous state that is decoded into a token sequence. The number of updates can be chosen at inference time. This makes flow models an appealing candidate for adaptive test-time computation.

Additional integration steps do not inherently guarantee deeper reasoning. In generation tasks, a small number of steps is often enough, and recent work has pushed flow language models toward one- or few-step sampling by learning flow maps that make direct jumps along a trajectory (Lee et al., 2026; Roos et al., 2026; Davis et al., 2026; Yoo et al., 2026). For reasoning, additional steps are useful only if later updates can build on information produced by earlier ones.

Prior work in latent and recursive reasoning motivates this work. Coconut shows that autoregressive language models can update a continuous latent state instead of emitting every intermediate thought as text (Hao et al., 2026). On graph reachability, Zhu et al. (2025) show that repeated latent updates can maintain a superposition of reachable vertices and expand it one hop at a time. Recursive reasoners similarly solve structured tasks by applying a small, weight-tied network repeatedly to an internal state (Wang et al., 2025; Jolicoeur-Martineau, 2025). An Euler rollout of a flow has the same basic form: one network is applied again and again to a latent state. We investigate how these repeated applications cooperate.

To show what integration steps can compute, we construct explicit weights for a two-layer Transformer that defines a flow solving the graph reachability problem. Its Euler rollout reaches vertices one

*Correspondence to tkrusch@tue.ellis.eu hop per step, so the number of steps needed to separate the candidates depends on the distance from the root to the answer. However, this existence result does not establish that training recovers the construction (Section 3.1).

Standard training of flow models does not directly assess whether an update produces a state that later updates can leverage. To address this limitation, we propose Unrolled Flow Model (UFM), which trains through its own latent rollout using a single prediction loss at the final state. To reduce memory usage for long rollouts, we backpropagate this loss through only the last few steps (Section 4). We stabilize these rollouts using sphere retraction to control latent-state growth (Section 5). On ProsQA and Sudoku-Hard, UFM improves with additional steps, whereas evaluated flow baselines show little gain. Multiple rollouts further improve reliability, although selecting among them remains challenging for tasks with long answers, such as maze solving.

Our contributions are: (i) We give a constructive result showing how flow integration can implement graph search with the number of steps determined by the instance. (ii) We introduce training through a terminal rollout loss and show that it makes flow steps useful for reasoning in our experiments, while connecting the resulting dynamics to a superposition-based mechanism. (iii) We use sphere retraction to stabilize long rollouts and demonstrate stronger scaling with additional steps than substantially larger flow baselines on structured reasoning tasks.

References (29)