NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Flow of Reasoning: Training LLMs for Divergent Reasoning with Minimal Examples

Fangxu Yu, Lai Jiang, Haoqiang Kang, Shibo Hao, Lianhui Qin

Human creativity relies heavily on divergent thinking—the ability to conceptualize multiple valid ways to solve a single problem. For artificial intelligence, generating diverse reasoning paths is crucial for robustness, self-correction, and assisting humans in open-ended tasks like scientific discovery.

However, current Large Language Model (LLM) reasoning techniques struggle to balance accuracy and diversity efficiently. To address this, researchers have introduced Flow of Reasoning (FoR), a highly data-efficient finetuning method that teaches LLMs to generate diverse, creative, and correct solutions to complex problems using as few as 15 training examples.

The Challenge of Divergent Reasoning

Existing approaches to multi-step reasoning face significant trade-offs:

  • Supervised Fine-Tuning (SFT) requires massive amounts of labeled data to capture diverse reasoning paths, which is expensive and often unavailable. Models often collapse to a single memorized path.
  • Reinforcement Learning (e.g., PPO) is designed to maximize a reward signal. This inherently stifles diversity because the model learns to repeatedly output the single highest-reward trajectory.
  • Inference-time Search (e.g., Tree of Thoughts, RAP) can successfully find diverse paths, but running complex tree or graph searches during inference is computationally expensive and incredibly slow.

The core question is: How can we finetune an LLM to naturally generate diverse, high-quality reasoning paths out-of-the-box, using minimal training data?

Flow of Reasoning (FoR)

The authors propose framing multi-step LLM reasoning as a Markovian flow on a Directed Acyclic Graph (DAG). In this graph, each node represents a reasoning state, and each edge represents an action (a reasoning step).

To train the model, FoR adapts principles from Generative Flow Networks (GFlowNets). Unlike standard RL that seeks the maximum reward, GFlowNets are trained to sample trajectories with probabilities proportional to their reward. If there are three equally valid ways to solve a math puzzle, FoR trains the LLM to sample all three with roughly equal probability.

To make this work efficiently with LLMs and minimal data, FoR employs three key mechanisms:

  1. Trajectory Balance Objective: A loss function that ensures the probability of generating a specific path matches the actual reward of the final answer.
  2. Efficient Exploration: A mixture of on-policy sampling, $\epsilon$-greedy exploration, and an offline prioritized replay buffer to discover new paths.
  3. Modified Local Search: A novel data augmentation trick during training. The model takes a known high-reward trajectory, "destroys" the last few steps, and reconstructs it to discover new, branching paths to the solution.
Illustration of the modified local search mechanism, where a trajectory is partially destroyed and reconstructed to discover new paths.

Evaluated Tasks

The authors evaluated FoR across six challenging reasoning benchmarks requiring multi-step logic:

  • BlocksWorld: Embodied reasoning (stacking colored blocks into target configurations).
  • Game of 24: Mathematical puzzle solving (using four numbers and basic math to reach 24).
  • Rubik's Cube: Spatial reasoning (restoring a scrambled cube).
  • 1D-ARC: Abstraction and pattern recognition.
  • GSM8K: Grade-school math word problems.
  • ProntoQA: Logical deduction and proof generation.
Overview of the diverse reasoning tasks evaluated, illustrating the multi-step reasoning trees for each.

Key Insights and Results

  • Diversity Breeds Accuracy: Surprisingly, training for diversity actually improves overall accuracy. Because the model learns a broader distribution of valid trajectories, it is less likely to get stuck in a dead-end reasoning path—a common failure mode for standard SFT.
  • Superior Performance: On the 6-step BlocksWorld task, FoR achieved 78.44% accuracy, crushing SFT (34.68%) and PPO (24.58%). It also achieved a "creativity" score (finding unique solutions no other method found) of 9.52%, whereas most baselines scored 0%. On Game of 24, FoR reached 48.0% accuracy compared to SFT's 29.0% and Tree of Thoughts' 21.0%.
  • Amortized Inference & Speed: By baking the exploration process into the training phase via GFlowNet objectives, FoR shifts the computational burden away from inference. It generates diverse paths as fast as standard prompting (~14 seconds to generate 40 samples in BlocksWorld), making it roughly 30x faster than search-based methods like ToT-BFS (~398 seconds).
  • Extreme Data Efficiency: FoR requires shockingly little data to generalize—for instance, just 15 examples for BlocksWorld. Because the exploratory training process allows the model to interact with the environment and discover its own successful trajectories, it doesn't rely purely on massive human annotations.
  • Out-of-Distribution Generalization: When trained on 4-step problems and tested on harder 6-step problems, FoR maintained 65.65% accuracy, vastly outperforming SFT's 28.28%.

Limitations and Future Directions

While inference is remarkably fast, online sampling with LLMs during training is computationally expensive, meaning FoR takes significantly longer to train than standard SFT. Additionally, LLMs still struggle with very long-range planning steps. For extremely long-horizon divergent reasoning, FoR might need to be combined with search algorithms like Monte Carlo Tree Search (MCTS).

Looking ahead, extending FoR to more complex, real-world environments (like web navigation agents) and applying it to multimodal and social reasoning tasks represent exciting frontiers for divergent AI reasoning.

Summary updated

BibTeX
@inproceedings{yu2025flow,
  author = {Fangxu Yu and Lai Jiang and Haoqiang Kang and Shibo Hao and Lianhui Qin},
  title = {{Flow of Reasoning: Training LLMs for Divergent Reasoning with Minimal Examples}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=qyMxunrR2j},
}
Figure