Effective trajectory stitching for long-horizon planning is a significant challenge in robotic decision-making. While generative diffusion models have shown immense promise in robot planning by turning complex decision-making into a process of sampling likely trajectories, they are typically limited to solving tasks similar to those seen in their training data.
To address this, researchers have introduced CompDiffuser (Compositional Diffuser), a novel generative approach that solves new, complex tasks by learning to compositionally stitch together shorter trajectory chunks from previously seen tasks.
The Challenge: Monolithic vs. Compositional Planning
Existing monolithic diffusion planners, such as the Decision Diffuser, suffer from a major limitation: they need to see entire long-horizon plans in their training data to generate similar ones. Collecting exhaustive data covering every possible start and goal combination in a large environment is incredibly sample-inefficient and often impossible.
To fix this, researchers look to "trajectory stitching"—taking short, overlapping chunks of different trajectories and combining them to form a novel, long path. However, the main challenge is ensuring that the connection points between these chunks are dynamically consistent and physically feasible. If you naively glue two paths together, the robot might be asked to teleport or make impossible movements at the seam.
The Solution: CompDiffuser
CompDiffuser models a long trajectory as a sequence of overlapping sub-chunks. Instead of training separate models for different chunks, the framework trains a single bidirectional diffusion model on short-horizon trajectories.
The breakthrough happens at inference time through a technique called Noisy-Sample Conditioning:
- During the reverse diffusion (denoising) process, the model generates multiple overlapping trajectory chunks simultaneously.
- Crucially, as each chunk is denoised, it is conditioned on the noisy states of its immediate neighbors (the chunk before it and the chunk after it).
- This allows information to propagate bidirectionally. As one segment takes shape, it helps guide its neighbors into compatible configurations, ensuring smooth, physically valid connections.
The authors introduce two sampling schemes for this process:
- Parallel Sampling: All chunks are denoised at the same time, conditioning on the neighbors' states from the previous noise timestep.
- Autoregressive (AR) Sampling: Chunks are denoised sequentially within a single timestep. Chunk $k$ conditions on the already-denoised (less noisy) version of chunk $k-1$. This causal flow of information proved to be much more effective at creating high-quality joints.
Finally, the overlapping regions of the generated chunks are merged using exponential trajectory blending to create the final continuous plan.
Key Findings and Performance
The method was rigorously evaluated on benchmark tasks of various difficulties, including the PointMaze Stitching Datasets and OGBench (featuring PointMaze, AntMaze, HumanoidMaze, and AntSoccer). The environments ranged from Medium to Giant sizes, testing the limits of the model's generalization.
- Massive Performance Leaps in Complex Mazes: On the hardest OGBench PointMaze Giant task, CompDiffuser achieved a 68% success rate (with replanning). This vastly outperformed Generative Skill Chaining (29%) and monolithic Decision Diffusers (0%).
- Zero-Shot Long-Horizon Generalization: The model successfully navigated "Giant" mazes requiring paths up to 30 blocks long, despite only ever seeing 4-block trajectories during training. It effectively learned the local "physics" of the world and chained them globally.
- High-Dimensional Planning: CompDiffuser successfully planned in up to 29-dimensional state spaces (AntMaze with joint positions and velocities), maintaining a 97% success rate in Medium mazes and 66% in Large mazes.
- Skill Composition: In the AntSoccer environment, the model successfully stitched a "navigate to ball" trajectory with a "dribble ball" trajectory to solve a complex task, even though it never saw an end-to-end demonstration of both skills executed sequentially.
- Robustness to Bad Data: On low-quality "Explore" datasets—where the agent randomly changes direction every 10 steps—CompDiffuser still managed an 81% success rate on AntMaze Medium, significantly beating offline RL baselines.
Limitations and Future Work
While CompDiffuser represents a major step forward, it has a few limitations. When stitching a very large number of chunks together, errors in bidirectional information propagation can accumulate, occasionally resulting in physically impossible plans (e.g., trajectories that pass through walls).
Additionally, the number of chunks to compose ($K$) must currently be manually specified at test time based on the expected distance to the goal. Future work will explore ways to automatically determine the optimal $K$. Finally, because CompDiffuser generates a state-space plan, it relies on a separate low-level inverse dynamics model to execute it; integrating more robust low-level controllers will be critical for real-world robotic deployment.
Summary updated