What Do You Need for Compositional Generalization in Diffusion Planning?

University of Toronto
University of Toronto
CoRL 2026

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.

Maze

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!

Method figure

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.

Architecture Comparision

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.

EnvDatasetGCBCCRLDiffuser DiTDiffuser U-NetDiffuser Eq-Net (Ours)
PointMazemedium-stitch23.023.00.00.010.8±8.610.8 \pm 8.696.8±4.996.8 \pm 4.9100±0.0\mathbf{100 \pm 0.0}
large-stitch7.07.00.00.00.0±0.00.0 \pm 0.021.2±11.321.2 \pm 11.372.8±12.3\mathbf{72.8 \pm 12.3}
giant-stitch0.00.00.00.00.0±0.00.0 \pm 0.00.0±0.00.0 \pm 0.046.8±13.8\mathbf{46.8 \pm 13.8}
AntMazemedium-stitch45.045.053.053.07.6±7.37.6 \pm 7.374.8±12.074.8 \pm 12.096.0±5.4\mathbf{96.0 \pm 5.4}
large-stitch3.03.011.011.00.0±0.00.0 \pm 0.07.6±7.37.6 \pm 7.358.8±13.6\mathbf{58.8 \pm 13.6}
giant-stitch0.00.00.00.00.0±0.00.0 \pm 0.00.0±0.00.0 \pm 0.032.4±13.0\mathbf{32.4 \pm 13.0}

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.

OGBench maze

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!

Locality of the denoiser as training data is scaled up

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}
}

Bibliography

Chi, C., Xu, Z., Feng, S., Cousineau, E., Du, Y., Burchfiel, B., Tedrake, R., & Song, S. (2023). Diffusion policy: Visuomotor policy learning via action diffusion. The International Journal of Robotics Research, 02783649241273668.
Janner, M., Du, Y., Tenenbaum, J. B., & Levine, S. (2022). Planning with diffusion for flexible behavior synthesis. arXiv Preprint arXiv:2205.09991.
Kamb, M., & Ganguli, S. (2024). An analytic theory of creativity in convolutional diffusion models. arXiv Preprint arXiv:2412.20292.
Luo, Y., Mishra, U. A., Du, Y., & Xu, D. (2025). Generative Trajectory Stitching through Diffusion Composition. arXiv Preprint arXiv:2503.05153.
Niedoba, M., Zwartsenberg, B., Murphy, K., & Wood, F. (2024). Towards a Mechanistic Explanation of Diffusion Model Generalization. arXiv Preprint arXiv:2411.19339.
Park, S., Frans, K., Eysenbach, B., & Levine, S. (2024). OGBench: Benchmarking Offline Goal-Conditioned RL. arXiv Preprint arXiv:2410.20092.