Compositional Training-Free Diffusion Planning for Long-Horizon Multiple Reach-Avoid Tasks

Yu Chen, Ruijia Liu, Xiao Yu, Xiang YinNeurIPS 2026

TL;DR

How do you get a robot to complete a long, multi-step obstacle course using a neural network that only knows how to plan a few seconds ahead—without retraining it? This paper introduces a training-free framework that stitches together short-horizon diffusion models like Lego blocks while mathematically projecting every step into safe zones. The result is reliable, long-horizon robotic planning (even for infinite patrol loops) that runs over 10 times faster than standard guided diffusion methods.

What Problem Does This Paper Address?

Real-world robotic missions are rarely just "go from A to B." Usually, they look more like "visit region A, then B, then C, and don't hit any walls along the way"—a setup formally known as a Multiple Reach-Avoid (MRA) task.

Historically, you had two flawed options for solving this:

  1. Classical control: Great if you know the exact physics and environment equations in advance, brittle when dealing with messy, nonlinear, or unknown dynamics.
  2. Reinforcement Learning (RL): Great for complex physics, painful because changing the task rules usually means redesigning rewards and retraining from scratch.

Recently, diffusion models offered a promising third way: train a task-agnostic model on offline motion data once, then steer ("condition") its output at test time toward your goal. However, standard test-time steering (like classifier guidance) breaks down on long-horizon, multi-stage tasks. Trying to nudge a single massive trajectory through four sequential targets and around dozens of obstacles simultaneously causes the optimization to lose the plot.

Methods

The authors bypass retraining and single-shot long-horizon generation by combining established compositional diffusion techniques with hard geometric projections at test time.

Figure 1: Overview of the proposed compositional diffusion planning framework. Starting from the initial state and a temporally structured task, the method first decomposes the global specification into local reach-avoid sub-tasks, then composes overlapping short-horizon diffusion priors into a long-horizon chain or lasso graph, and finally performs reverse denoising with overlap reconciliation and projection-based constraint enforcement. The prefix-suffix extension reuses the same sampler and changes only the overlap topology.

Here is how the recipe works:

  • Task Decomposition: A global MRA task with $N$ targets is broken into $N$ local reach-avoid stages.
  • Factor-Graph Composition (Standard): Rather than planning stages one by one, all $N$ short segments are denoised in parallel using a frozen, pre-trained diffusion prior. Consecutive segments share a boundary "milestone" state ($O_i$). Using a Bethe factor-graph approximation and an existing heuristic called neighboring-score averaging, the sampler averages the denoising directions from both adjacent segments at each shared milestone so they naturally agree on where to meet.
  • Stage-Wise Hard Projection (New Integration): Instead of nudging trajectories away from obstacles with slow gradient-based guidance, the authors enforce constraints via Euclidean projection. At each denoising step, states are snapped directly onto the nearest valid point in their safe set or target region. Cleverly, target endpoints are projected throughout denoising, while obstacle-avoidance projection is only turned on in the second half of denoising—preventing early pure-noise states from snapping erratically onto obstacle boundaries.
  • Lasso Graphs for Infinite Loops (New Extension): Many missions have a "prefix-suffix" structure (e.g., commute to a warehouse zone once, then patrol three stations forever). By tying the final milestone state back into an earlier milestone ($O_{loop}$) and averaging three meeting segment scores instead of two, the chain graph becomes a "lasso" graph—generating an infinite cyclic plan with zero model changes.
Figure 2: Factor-graph view of compositional trajectory generation. Left: a finite-horizon MRA task induces a chain graph, where circles denote milestone or overlap states and rounded rectangles denote local segment factors. Right: the prefix-suffix factor graph identifies Op and ON into the loop junction Oloop, producing a finite prefix chain followed by a recurrent suffix cycle (a lasso topology). Three segment-boundary score contributions meet at Oloop.

Datasets

The authors train task-agnostic diffusion priors on existing offline benchmarks and evaluate them on newly constructed, randomized multi-stage MRA tasks (including circular and non-circular targets/obstacles):

  • D4RL (Maze2D): Planar navigation across U-Maze, Medium, and Large layouts.
  • OGBench (AntMaze & Cube): Used to test transfer to complex physics—specifically an 8-DoF quadruped robot (AntMaze) and a 6-DoF UR5e robotic arm manipulating end-effector positions (Cube).

Key Insights and Ideas

  • Hard projection beats soft guidance on both speed and accuracy: Because MRA state constraints are temporally separable (each timestep can be projected independently), snapping states into safe sets is computationally cheap compared to backpropagating gradients through a diffusion network—and yields much higher rollout success.
  • Topology is a test-time dial: Turning a finite planner into an infinite-horizon cyclic planner doesn't require automata-augmented RL; you just wire the factor graph into a loop at inference time.
  • Plans vs. Physics: The authors prove (Theorem 1) that if the algorithm returns a discrete plan, its sampled states strictly satisfy the MRA specification. Crucially, they are transparent about what this math doesn't mean: satisfying discrete waypoints doesn't guarantee a robot won't clip a corner between steps or fail to track a sharp turn dynamically.

Key Results

Across 12 settings in Maze2D (1 to 4 stages across three map sizes, 200 random tasks each), plans were executed in closed-loop using a PD controller and compared against LTLDoG guidance baselines—both one-shot (DOG-OS) and stage-wise decomposed (DOG-SW):

  • Higher Rollout Success: Across all Maze2D tasks, the proposed method achieved an 80.8% average execution success rate, beating stage-wise guidance (DOG-SW at 69.8%) and crushing one-shot guidance (DOG-OS at 31.9%, which hit 0.0% on 4-stage Medium and Large maps).
  • Massive Speedup: Average planning time was 1.26 seconds, compared to 13.0s for DOG-OS (10.3× speedup) and 19.1s for DOG-SW (15.2× speedup).
  • Infinite Loops & Rich Dynamics: On prefix-suffix tasks (requiring the robot to complete the prefix and execute the suffix loop twice), success rates reached 76.5%–85.5% (U-Maze) and 54.5%–74.0% (Large) in under 2.1s. Zero-shot transfer of the planning framework yielded 93.8%–99.2% rollout success on the 6-DoF Cube arm and 74.1%–95.1% on the contact-rich 8-DoF AntMaze quadruped.

Limitations and Future Work

  • Low-dimensional, structured state spaces: The method requires fast mathematical projection operators (e.g., geometric workspace or Cartesian coordinates). It cannot directly plan or project in raw pixel/visual observation space.
  • Fixed stage horizons & offline coverage: Segment lengths are fixed in advance, which can miss valid solutions if a stage needs more time, and the offline dataset must adequately cover local transitions.
  • No dynamic feasibility guarantee: Neighboring-score averaging is a heuristic without error bounds, and the formal guarantee only covers discrete planned states—not continuous inter-step collisions or controller tracking. Future work aims to tackle adaptive stage lengths, better overlap inference, and dynamics-aware projections.

Summary updated

Abstract

Long-horizon robotic planning often requires satisfying temporally ordered safety and visitation constraints rather than a single goal condition. We study multiple reach-avoid (MRA) tasks, in which a robot must sequentially visit target regions while remaining within corresponding safe sets. Existing approaches either rely on explicit system models or use data-driven planners whose test-time conditioning mechanisms do not scale well to long-horizon temporally structured tasks. We propose a training-free compositional diffusion planning framework for MRA tasks that operates directly on a pre-trained task-agnostic diffusion trajectory prior at test time, without requiring a known dynamics model. Our approach decomposes a global MRA specification into local reach-avoid sub-tasks, composes overlapping short-horizon diffusion priors into a long-horizon generative process through a factor-graph perspective, and enforces each local requirement through projection-based denoising during sampling. The same construction also extends naturally to prefix-suffix tasks through a looped compositional graph. We provide a formal correctness guarantee showing that the stitched trajectory satisfies the target specification. Experiments on long-horizon constrained planning benchmarks show strong execution success, substantially lower planning time than representative guidance-based baselines, and effective transfer to richer dynamics.
BibTeX
@inproceedings{chen2026compositional,
  author = {Yu Chen and Ruijia Liu and Xiao Yu and Xiang Yin},
  title = {{Compositional Training-Free Diffusion Planning for Long-Horizon Multiple Reach-Avoid Tasks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=YoWrqWunYY},
}
Figure