Path planning in complex environments is one of the key problems of artificial intelligence because it requires simultaneous understanding of the geometry of space and the global structure of the problem. In this paper, we explore the potential of using generative models as planning and reasoning mechanisms. We propose GenPlanner, an approach based on diffusion models and flow matching, along with two variants: DiffPlanner and FlowPlanner. We demonstrate the application of generative models to find and generate correct paths in mazes. A multi-channel condition describing the structure of the environment, including an obstacle map and information about the starting and destination points, is used to condition trajectory generation. Unlike standard methods, our models generate trajectories iteratively, starting with random noise and gradually transforming it into a correct solution. Experiments conducted show that the proposed approach significantly outperforms the baseline CNN model. In particular, FlowPlanner demonstrates high performance even with a limited number of generation steps.
Figures & tables
Figure 1: Qualitative comparison of ground-truth paths and FlowPlanner generations on grid mazes of different sizes ( 8×8 , 16×16 , 32×32 , 48×48 ). FlowPlanner generates trajectories consistent with reference paths, maintaining correctness and consistency even for larger mesh sizes.
Figure 2: Failure case of logical and spatial reasoning in a vision–language model. Given a maze image with start and goal locations, the VLM (Qwen) generates a plausible sequence of directional moves, yet the resulting path is invalid. This example highlights the difficulty of current VLMs in performing precise logical reasoning and grid-based path planning.
Figure 3: Overview of FlowPlanner training and inference. FlowPlanner treats path planning as a denoising process. A U-Net conditioned on walls and start-goal locations predicts velocity at each timestep, enabling iterative refinement from random noise to correct the route, where the pixel value > 0 is a path. DiffPlanner has a similar scheme where instead of operating on the velocity vector, the U-Net predicts noise.
Figure 4: Intermediate x^0,t Estimates for Diffusion (top) and Flow Models (bottom). For DiffPlanner, the path structure is formed gradually with subsequent denoising steps, while FlowPlanner produces coherent trajectory structures already at early integration steps, as the predicted velocity field directly guides the sample toward the final solution.
Grid size
Training samples
Evaluation samples
Min. path length
48×48
20,000
1,000
20
32×32
20,000
1,000
10
16×16
10,000
500
5
8×8
5,000
250
1
Table 1: Statistics of the generated datasets for different grid sizes.
Maze Size
Model
Validity (%) ↑
Single-Path (%) ↑
Length Ratio ↓
Branch-Rate (%) ↓
8 × 8
CNN
92.80
89.20
1.00
0.29
FlowPlanner
94.00
92.40
1.00
0.26
DiffPlanner
90.40
77.20
1.02
1.95
16 × 16
CNN
74.00
65.20
1.00
0.82
FlowPlanner
88.60
86.20
1.01
0.19
DiffPlanner
84.60
67.60
1.03
2.15
Table 2: Quantitative comparison of CNN, DiffPlanner, and FlowPlanner across different grid sizes. The best results are achieved by FlowPlanner, which leverages a learned vector field to guide the sample along a continuous trajectory toward the solution.
Figure 5: Qualitative comparison of paths generated by CNN, DiffPlanner, and FlowPlanner on 48×48 mazes.
Figure 6: Qualitative comparison of paths generated by CNN, DiffPlanner, and FlowPlanner on 32×32 mazes.
Config
Conditioning
Metrics
Start,End
Walls
Validity (%) ↑
Single-Path (%) ↑
Length Ratio ↓
Branch-Rate (%) ↓
1
✗
✗
0.00
33.70
N/A
0.18
2
✓
✗
6.40
6.30
1.06
0.03
3
✗
✓
0.10
73.30
1.00
0.22
Ours
✓
✓
88.00
86.10
1.02
0.09
Table 3: Quantitative ablation results for FlowPlanner different conditioning channel combinations on 48×48 mazes. Each condition channel is crucial for accurately generating the trajectory.
Figure 7: Qualitative comparison on FlowPlanner using different conditioning channel combinations on 48×48 mazes. For Start, End model knows where the path begins and ends, but the path is not valid. For Walls , the model doesn’t know where to go but can take obstacles into account. None means without conditioning. For Start, End, Walls , the model achieves the best path.
Model
Steps T
Validity ↑
Single-Path ↑
Length Ratio ↓
Branch-Rate ↓
FlowPlanner
50
88.00
86.10
1.02
0.09
30
87.70
85.50
1.02
0.10
20
86.40
84.60
1.02
0.10
10
85.80
83.00
1.02
0.15
5
79.10
75.90
1.01
0.14
1
23.70
20.40
1.00
0.65
Table 4: Impact of the number of sampling steps on the performance of FlowPlanner and DiffPlanner for 48×48 mazes. FlowPlanner is characterized by high stability regardless of the number of generation steps.
Diffusion-based planning generates diverse action sequences or trajectories by progressively denoising candidates conditioned on goals, scenes, and constraints.
Diffusion models operate in a reflexive System 1 mode, constrained by a fixed, content-agnostic sampling schedule. This rigidity arises from the curse of state dimensionality, where the combinatorial explosion of possible states in the high-dimensional noise manifold renders explicit trajectory planning intractable and leads to systematic computational misallocation. To address this, we introduce Chain-of-Trajectories (CoTj), a train-free framework enabling System 2 deliberative planning. Central to CoTj is Diffusion DNA, a low-dimensional signature that quantifies per-stage denoising difficulty and serves as a proxy for the high-dimensional state space, allowing us to reformulate sampling as graph planning on a directed acyclic graph. Through a Predict-Plan-Execute paradigm, CoTj dynamically allocates computational effort to the most challenging generative phases. Experiments across multiple generative models demonstrate that CoTj discovers context-aware trajectories, improving output quality and stability while reducing redundant computation. This work establishes a new foundation for resource-aware, planning-based diffusion modeling. The code is available at https://github.com/UnicomAI/CoTj.
Ping Chen, Xiang Liu, Xingpeng Zhang +7
Data Science & Artificial Intelligence Research Institute, China Unicom · Unicom Data Intelligence, China Unicom · School of Computer Science and Software Engineering, Southwest Petroleum University +2
Recent advances in generative models have shown promise in generating behavior plans for long-horizon, sparse reward tasks. While these approaches have achieved promising results, they often lack a principled framework for hierarchical decomposition and struggle with the computational demands of real-time execution, due to their iterative denoising process. In this work, we introduce Hierarchical Diffusion-Flow (HDFlow), a novel hierarchical planning framework that optimally leverages the strengths of diffusion and rectified flow models to overcome the limitations of single-paradigm generative planners. HDFlow employs a high-level diffusion planner to generate sequences of strategic subgoals in a learned latent space, capitalizing on diffusion's powerful exploratory capabilities. These subgoals then guide a low-level rectified flow planner that generates smooth and dense trajectories, exploiting the speed and efficiency of ordinary differential equation (ODE)-based trajectory generation. We evaluate HDFlow on four challenging furniture assembly tasks in both simulation and real-world, where it significantly outperforms state-of-the-art methods. Furthermore, we also showcase our method's generalizability on two long-horizon benchmarks comprising diverse locomotion and manipulation tasks. Project website: https://hdflow-page.github.io/
Nandiraju Gireesh, Yuanliang Ju, Chaoyi Xu +3
1Peking University · University of Toronto. · 2Galbot
Diffusion models have shown promising capabilities in trajectory generation for planning in offline reinforcement learning (RL). However, conventional diffusion-based planning methods often fail to account for the fact that generating trajectories in RL requires unique consistency between transitions to ensure coherence in real environments. This oversight can result in considerable discrepancies between the generated trajectories and the underlying mechanisms of a real environment. To address this problem, we propose a novel diffusion-based planning method, termed as Diffusion Modulation via Environment Mechanism Modeling (DMEMM). DMEMM modulates diffusion model training by incorporating key RL environment mechanisms, particularly transition dynamics and reward functions. Experimental results demonstrate that DMEMM achieves state-of-the-art performance for planning with offline reinforcement learning.
Hanping Zhang, Yuhong Guo
School of Computer Science, Carleton University, Ottawa, Canada