Abstract
Offline Goal-Conditioned Reinforcement Learning (Offline GCRL) is an important problem in RL that focuses on acquiring diverse goal-oriented skills solely from pre-collected behavior datasets. In this setting, the reward feedback is typically absent except when the goal is achieved, which makes it difficult to learn policies especially from a finite dataset of suboptimal behaviors. In addition, realistic scenarios involve long-horizon planning, which necessitates the extraction of useful skills within sub-trajectories. Recently, the conditional diffusion model has been shown to be a promising approach to generate high-quality long-horizon plans for RL. However, their practicality for the goal-conditioned setting is still limited due to a number of technical assumptions made by the methods. In this paper, we propose SSD (Sub-trajectory Stitching with Diffusion), a model-based offline GCRL method that leverages the conditional diffusion model to address these limitations. In summary, we use the diffusion model that generates future plans conditioned on the target goal and value, with the target value estimated from the goal-relabeled offline dataset. We report state-of-the-art performance in the standard benchmark set of GCRL tasks, and demonstrate the capability to successfully stitch the segments of suboptimal trajectories in the offline data to generate high-quality plans.
Introduction
In Offline Goal-Conditioned Reinforcement Learning (GCRL), agents must learn to reach diverse goals using only a pre-collected, static dataset. This task is notoriously difficult due to sparse rewards—where signals are only received upon goal achievement—and the requirement for long-horizon planning. To succeed, an agent must effectively "stitch" together useful segments from various suboptimal trajectories within the dataset.
Existing diffusion-based methods, such as Diffuser, often rely on "inpainting" to constrain the start and end points of a generated trajectory. However, without prior knowledge of the optimal plan length, inpainting can produce unrealistic plans—such as attempting to pass through obstacles to meet a temporal constraint—or inefficient, rambling paths. SSD (Sub-trajectory Stitching with Diffusion) addresses these issues by moving toward value-conditioned generation and iterative sub-trajectory stitching.
Methodology
SSD introduces several architectural and algorithmic innovations to improve plan quality and flexibility:
Condition-Prompted-Unet
The framework replaces standard convolutional blocks in the diffusion model's Unet with Transformer blocks. This architecture, shown in the figure below, better captures long-range temporal dependencies and environment dynamics, ensuring generated plans respect physical constraints like walls.
Value-Conditioned Generation
Instead of conditioning solely on a goal, SSD conditions the diffusion process on a target value ($v$). This value represents the discounted probability of reaching the goal. By setting a high target value during inference, the model is effectively prompted to generate the most efficient sub-trajectory possible, acting as a "speedometer" for the agent's progress.
Multi-Step Goal Chaining and Inference
To train the value function ($Q_\phi$) on suboptimal data, SSD utilizes an improved "goal chaining" method. If a trajectory fails to reach a goal, the model examines subsequent states to determine if that goal was eventually reachable, creating a denser reward signal. During execution, SSD generates a sub-trajectory, executes the initial steps, and then re-plans. This iterative process allows it to dynamically stitch segments together to reach the final destination without requiring a pre-defined optimal plan length.
Experimental Setup
The model was evaluated on standard GCRL benchmarks:
- Maze2D (D4RL): Navigation tasks in "Umaze," "Medium," and "Large" layouts.
- Multi2D: A challenging variant where the goal changes every episode, testing generalization.
- Fetch: A suite of robotic manipulation tasks (Reach, Push, PickAndPlace, Slide) involving a 7-DOF robot arm.
Results and Discussion
SSD demonstrated significant improvements over baselines such as IQL, Diffuser, and Decision Diffuser (DD):
- Navigation Performance: In Maze2D-Large, SSD achieved a score of 183.5, significantly outperforming the next best baseline (Diffuser-AM at 135.0). In the Multi2D-Large environment, SSD scored 192.9, compared to 145.7 for the best baseline.
- Robotic Manipulation: In the Fetch environment, SSD achieved the highest average success rate (0.74) and the highest discounted returns, excelling particularly in "Push" and "PickAndPlace" tasks that require precise long-term planning.
- Qualitative Analysis: Visualizations indicate that while other models often take detours or collide with obstacles, SSD consistently identifies the most direct, physically plausible paths. The shift to a Transformer-based architecture was critical in helping the model understand that it cannot "teleport" or clip through obstacles.
Conclusion and Future Work
SSD provides a robust framework for long-horizon planning in offline GCRL by leveraging conditional diffusion for sub-trajectory stitching. While it achieves state-of-the-art results, some limitations remain. The model's performance is sensitive to the choice of the target value $v$, and automating this selection is an open challenge. Additionally, the computational overhead of multiple denoising steps at inference time is higher than simple policy networks. Future research will focus on scaling SSD to higher-dimensional state spaces, such as humanoid locomotion or multi-robot coordination.
Summary updated