What Do You Need for Compositional Generalization in Diffusion Planning?
Abstract
In policy learning, stitching refers to the extent to which a policy is able to piece together sub-trajectories of data it is trained on to generate new and diverse behaviours. Despite this, we don’t understand very well why policies do or don’t stitch behaviour. Focusing on diffusion planners trained purely via generative BC, we find two properties are key enablers of composition: shift equivariance and local receptive fields. We use these properties to explain data augmentation, data scaling, and inference choices in existing generative BC methods based on diffusion planning. We use our findings to develop Eq-Net, a new architecture for diffusion planners that enables compositionality while being trained and evaluated like a vanilla diffusion planner. We show that Eq-Net both produces much more diverse trajectories than existing diffusion backbones and can be trained on only short sequences while still generating consistent long-horizon plans.
What is Stitching in Policy Learning?
Let’s say I am training a policy to navigate around a maze. Below on the left are two trajectories we may see during training. Each contains information on how to navigate between certain intersections in the maze (you can think of these as “subskills”). On the right, we have a trajectory we may want to generate at inference time. Ideally, our policy should be able to produce this trajectory if it’s seen the two training trajectories, even without having seen the trajectory on the right exactly. In other words, it should be able to “stitch” together subskills it has seen in prior trajectories at inference-time. This is the core question we look at.
This is a pretty important skills to have in the real world for lots of reasons. Intelligent actors stitch behaviour all the time for lots of reasons!
Stitching as Patch-Composition in Diffusion Models
When we decided to focus the scope of our investigation to diffusion planners (such as Diffuser(Janner et al., 2022) or Diffusion Policy(Chi et al., 2023)) we found there was a very natural relationship between trajectory stitching and patch composition. The very basic idea behind patch composition is that Diffusion models have two properties: locality, which refers to their prioritization of local information when estimating the denoising score; and positional equivariance, which refers to the fact that diffusion models rarely make the denoising score dependent on the absolute position of a pixel in a sample. This means that they roughly stitch together patches of training data like a quilt. This has been found to predict the behaviour of CNN-based diffusion models very well (Niedoba et al., 2024) (Kamb & Ganguli, 2024)
This analogy carries over quite nicely to diffusion planners! Here, the patches aren’t 2D visual patches but 1D subskills that are composed together into a longer trajectory. When we looked into it more, we realized that these properties also explain why diffusion planner with frequent replanning (like Diffusion Policy) or explicit segment generation (like CompDiffuser(Luo et al., 2025)) are so good at stitching - they utilize these same principles of locality and positional equivariance to achieve patch-compositionality!
This diagram shows all the ways of enabling compositionality we looked at. Out of these, the one that people have neglected so far was architecture modifications, so we explored this in the most depth.
Stitching with Architecture Modifications
Our basic idea is to align our diffusion backbone’s inductive biases with those locality and positional equivariance properties we discussed before. People generally think CNNs should have these properties because of how kernels work, but it turns out that certain design decisions in the most popular CNN-based backbones (like U-Net) make this not work. We show a brief explanation of this below, and provide the details in the paper.
We found with some fairly simple changes to how we do the convolutions and stack the kernels, you could get really nice compositional behaviour! We call our architecture Eq-Net (for equivariant-net)
Experiments!
We ran a lot of experiments in navigation tasks, and both real and simulated manipulation tasks. We’ll just show some of the top-sheet results here,
One, we showed that Eq-Net lets you compose long-horizon plans even if you only train on short sub-trajectories (such as in the OGBench(Park et al., 2024) stitch-datasets). Below we have the results table and an example trajectory from each monolithic planner. As you can see, Eq-Net produces far nicer looking trajectories than other monolithic planners.
| Env | Dataset | GCBC | CRL | Diffuser DiT | Diffuser U-Net | Diffuser Eq-Net (Ours) |
|---|---|---|---|---|---|---|
| PointMaze | medium-stitch | |||||
| large-stitch | ||||||
| giant-stitch | ||||||
| AntMaze | medium-stitch | |||||
| large-stitch | ||||||
| giant-stitch |
OG-Bench Stitch Results: We report average success rates on 5 evaluation tasks averaged over 50 evaluation seeds. Our algorithm performs best among monolithic planners, greatly improving over baseline DiT and U-Net architectures while being trained in the same fashion.
Second, another cool thing we found is that when you scale up data, the “locality” (how much the model pays attention to nearby states during denoising) actually goes up. This seems to indicate that robotics data frequently has local properties, making our particular inductive bias attractive!
Finally, as a fun demo we included a task where a diffusion planner pours cups of milk into a container. Even though it was only trained on three training trajectories, Eq-Net is able to produce a new trajectory at test-time that composes each skill and pours multiple colours of milk into the container. See the video below!
BibTeX citation
@inproceedings{clark2026what,title={What Do You Need for Compositional Generalization in Diffusion Planning?},author={Quentin Clark and Florian Shkurti},booktitle={10th Annual Conference on Robot Learning},year={2026},url={https://openreview.net/forum?id=HBHR1GxaS0}}