Manuscript Offprint

arXiv:2610.09746

Flow-of-Thought: A Framework for Visual Reasoning

Mariia Baidachna, Nicolas Pugeault

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

Abstract

Mental imagery, “seeing with the mind’s eye” is an essential aspect of human cognition. Despite rapid progress Large Language Models (LLMs) and Vision Transformers (ViTs) still underperform on tasks requiring spatial understanding. To address this, we introduce Flow-of-Thought (FoT), a framework that integrates the generation of visual sketches as intermediate reasoning steps, mimicking mental imagery in humans. We train coordinate-aware trajectory flow fields on SO(2)SO(2) group orbits and cumulative shortest paths, then freeze the learned dynamics; same vs. different decisions compare competing generative hypotheses using foreground-weighted reconstruction energy. On locked tests FoT reaches 100.0% accuracy on Tetris and 99.0% on colored shapes. Under frozen transfer, the orbit-trained 2D flow improves over its endpoint-only control on BLINK Multi-view (72.2% vs. 63.9% on 133 public validation pairs), supporting continuous visual traces as an effective and interpretable representation for spatial reasoning in some out-of-distribution settings.

1 Introduction

Modern foundation models have achieved impressive performance at a wide range of tasks, yet they still fail to generalize to spatial planning or visual logic tasks that are often trivial for humans [Wu et al., 2024a, Maniparambil et al., 2026]. One example is an IQ-style question that presents a source block and a target block, which has been rotated or also mirrored, and asks to determine if the blocks are the same. One characteristic of such tasks is that they are difficult to solve in one-shot, but human subjects perform well, mentally simulating incremental rotation steps that lead to the solution [Shepard and Metzler, 1971]. Similarly, it is difficult to determine the path from the start to the end of a maze, but intermediate sketches of the path make the task trivial [Lotfi et al., 2024]. In humans, mental imagery, “seeing with the mind’s eye” is believed to be essential to solving this type of visual reasoning tasks. Text-based models on the other hand, lack a “mental scratchpad” and instead attempt to hold entire spatial states in fixed attention mechanisms, which fails for complex geometries Wu et al. [2024b], Zhang et al. [2025].

Recent advances in intermediate reasoning have significantly contributed to performance gains in text-based tasks [OpenAI, 2024, DeepSeek-AI, 2025, Lightman et al., 2023]. Despite the success of large language models (LLMs) with built-in reasoning, these frameworks fail to generalize outside of semantic and symbolic domains [Dziri et al., 2023, Fu et al., 2024, Wu et al., 2024a]. This limitation stems from a fundamental modality mismatch:

text is inherently one-dimensional and discrete, whereas visual reasoning requires understanding multi-dimensional topology, continuous geometric transformations, and spatial relationships. Recent evaluations of state-of-the-art (SoTA) Multimodal Large Language Models (MLLMs) reveal that even when equipped with powerful vision encoders, these systems suffer from a perception-reasoning gap. Tasks that are deeply ingrained in human cognitive core knowledge [Spelke and Kinzler, 2007], such as mental rotation or shortest connected path through a maze, often result in severe spatial hallucinations or logical collapse in MLLMs [Fu et al., 2024, Wu et al., 2024a]. Without the ability to explicitly track geometric changes step-by-step, MLLMs are forced to rely on semantic memorization rather than true spatial thinking [Chollet, 2019], motivating frameworks that can reason through continuous visual states.

Following a neuroscience-inspired view of mental imagery as a continuously evolving internal representation [Shepard and Metzler, 1971, Kosslyn et al., 1978], we introduce a visual reasoning framework, Flow-of-Thought (FoT), that learns continuous visual dynamics from trajectory supervision using flow matching [Lipman et al., 2022]. A coordinate-, time-, and action-conditioned spatial U-Net predicts dense transport fields along rendered rotation orbits and additive dynamics over cumulative shortest-path masks for mazes. Integrating these fields as ordinary differential equations (ODEs) produces an intermediate visual state at any time t∈[0,1]t \in [0,1]. After model selection, the learned dynamics are frozen. For same-versus-different rotation decisions, the source and its horizontal reflection define competing hypotheses, and the hypothesis with the lower foreground-weighted target-reconstruction energy over a predeclared action set is selected. Thus, the endpoint evidence used for the decision is generated by the same learned trajectories whose intermediate states can be inspected.

We evaluate FoT on locked synthetic rotation tests, maze navigation, and frozen transfer to 3D Blocks and BLINK Multi-view, with comparisons to matched controls, trained vision models, and multimodal language models. FoT reaches 100.0% accuracy on Tetris and 99.0% on colored shapes, while its maze traces reach 97.5% endpoint IoU and 100% goal reach, although later path segments sometimes activate prematurely. On BLINK Multi-view, the larger of the two transfer evaluations (133 public validation pairs), the orbit-trained flow reaches 72.2%, compared with 63.9% for its endpoint-only control; we treat this as the primary transfer result, while noting that it remains a public-validation evaluation whose sign convention was finalized after a two-item smoke check. On 3D Blocks it reaches 61.5% and does not exceed the endpoint-only control at 66.7%; because the test set contains only 78 pairs, a single reclassified item moves accuracy by more than 1.2 points and the estimate is correspondingly seed-sensitive, so we report the 3D evaluation as an instability-limited negative control against a universal out-of-distribution (OOD) advantage from intermediate trajectory supervision.