Abstract
Divergent thinking, the cognitive process of generating diverse solutions, is a hallmark of human creativity and problem-solving. For machines, sampling diverse solution trajectories in complex reasoning problems is crucial for robust outcomes, data augmentation, and enhanced model generalization. Large language models (LLMs) often struggle with generating high-quality, diverse reasoning. While supervised fine-tuning helps with quality, it requires extensive supervision data to capture the full diversity of solutions. Alternatively, reinforcement learning methods like PPO aim to find limited highest-reward solutions while neglecting the solution diversity, akin to convergent thinking. To address these limitations, we propose Flow of Reasoning (FoR) -- an efficient LLM training approach enabling diverse reasoning with minimal data. FoR formulates multi-step LLM reasoning as a Markovian flow from an initial state to terminal states. The formulation allows to adapt principled GFlowNet approaches to train the LLM as a policy, which is able to sample multiple reasoning paths with probabilities proportional to the unnormalized reward. Empirical results show that, with limited training data (e.g., 15 examples), FoR can discover diverse high-quality solutions that excel greatly beyond current state-of-the-art methods across three tasks, including embodied reasoning (BlocksWorld), math puzzle solving (Game24), and logical reasoning (PrOntoQA).
Introduction
In complex reasoning tasks—such as mathematical problem solving, strategic planning, or scientific discovery—the goal is often not just to find a single correct answer, but to explore a variety of valid solution paths. This "divergent thinking" is essential for robustness and creativity. However, current Large Language Model (LLM) training paradigms often fall short. Supervised Fine-Tuning (SFT) typically mimics a single gold-standard trajectory, requiring massive datasets to cover the space of possible solutions. Conversely, Reinforcement Learning (RL) methods like Proximal Policy Optimization (PPO) often suffer from "mode collapse," where the model converges on a few high-reward paths while ignoring other valid alternatives.
To bridge this gap, we introduce Flow of Reasoning (FoR). FoR treats multi-step reasoning as a flow on a graph, enabling the model to learn diverse reasoning strategies efficiently, even with extremely limited training data.
Methodology: Reasoning as a Markovian Flow
The core innovation of FoR is the formulation of reasoning as a Markovian flow on a Directed Acyclic Graph (DAG). In this framework, each reasoning step represents an edge, and intermediate states are nodes.
GFlowNet Integration and Trajectory Balance
FoR leverages GFlowNet principles to train the LLM as a policy. Unlike standard RL that maximizes expected reward, FoR trains the model to sample paths with a probability proportional to their reward. This is achieved using a Trajectory Balance (TB) objective, which ensures that the total flow into any state matches the flow out, leading to more stable and efficient training.
Amortized Search and Local Exploration
Instead of performing expensive tree searches at inference time, FoR "amortizes" the search cost into the model's weights during training. To maximize data efficiency, the authors employ a "destroy-and-reconstruct" local search strategy. By taking successful paths and forcing the model to find alternative completions from intermediate states, FoR effectively explores high-reward regions of the solution space without exhaustive search.
Experimental Setup and Datasets
The effectiveness of FoR was evaluated across six diverse and challenging reasoning benchmarks:
- BlocksWorld: Embodied planning and robot-like task manipulation.
- Game of 24: A math puzzle requiring four numbers and basic operators to reach the value of 24.
- Rubik’s Cube: Spatial reasoning and sequential planning for cube recovery.
- 1D-ARC: Identifying patterns of examples and applying transformations.
- GSM8K: Grade-school math word problems.
- PrOntoQA: Logical deduction and synthetic reasoning to reach a hypothesis.
Results and Analysis
FoR consistently outperformed SFT, PPO, and advanced search-based methods (like ToT and RAP) across all metrics.
Accuracy and Creativity
In the BlocksWorld task, FoR achieved an accuracy of 78.44%, significantly higher than SFT (34.68%) and Chain-of-Thought (15.82%). Furthermore, in the Rubik’s Cube task, FoR exhibited superior creativity, achieving an 82.61% creativity score by discovering unique solutions that other models missed entirely.
Efficiency and Generalization
A key advantage of FoR is its inference efficiency. Because the exploratory capability is baked into the model, it can generate solutions in a single forward pass, making it approximately 30x faster than iterative search methods like ToT. Remarkably, FoR achieves these results with as few as 15 training examples, highlighting its extreme data efficiency.
Comparison with State-of-the-Art
Despite being a smaller 8B parameter model, FoR showed comparable accuracy and even better diversity than OpenAI’s o1-mini on several benchmarks, proving that principled flow-based training can rival much larger, proprietary models in reasoning tasks.
Conclusion and Future Work
Flow of Reasoning (FoR) presents a powerful paradigm shift from convergent to divergent thinking in LLMs. By training models to learn the "flow" of reasoning paths, FoR achieves high accuracy, exceptional diversity, and superior efficiency with minimal data.
While impressive, the authors note that training still requires generating many trajectories to estimate flow. Future research will focus on extending FoR to handle even longer reasoning horizons (e.g., 10+ steps) and applying these principles to multimodal settings or more open-ended creative writing.
Summary updated