NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Distilling Conditional Diffusion Models for Offline Reinforcement Learning through Trajectory Stitching

Shangzhe Li, Xinhua ZhangarXiv 2024 · DOI

Introduction

Offline Reinforcement Learning (RL) is a powerful paradigm that allows agents to learn from pre-collected datasets without the need for risky real-world exploration. However, a significant limitation of offline datasets is their "narrowness"—they often lack high-reward trajectories or miss critical regions of the state space. While simulators can be used to collect additional data, defining reliable reward functions for these "state-only" interactions is often difficult.

This paper introduces DITS (Diffusion-based Trajectory Stitching), a novel data augmentation framework designed to overcome these challenges. DITS leverages conditional diffusion models to generate high-return paths and employs a selective stitching algorithm to integrate them with original data, significantly boosting performance on complex robotics benchmarks.

Methodology

The DITS framework consists of three primary components that work together to enhance the training dataset:

  1. Conditional Trajectory Generator: Unlike auto-regressive models that generate data step-by-step and accumulate errors, DITS uses a Conditional Diffusion Model. This model learns the distribution of trajectories from offline data and generates coherent, high-return sequences of states and rewards by conditioning on a target return.
  2. Inverse Dynamics Model (IDM): Since the generated trajectories are state-only, an IDM is trained to predict the actions ($a$) that lead from one state ($s$) to the next ($s'$), effectively "imputing" the necessary control signals.
  3. Trajectory Stitching: To ensure the agent learns robust policies, DITS identifies "stitching points" where a low-reward trajectory from the original dataset is close to a high-reward synthetic trajectory. By creating bridges between these points, the agent learns how to recover from suboptimal starts and navigate toward high-reward goals.
Comparison of trajectory stitching strategies. DITS (e) effectively bridges original trajectories to high-reward goals, outperforming methods like MBTS and SynthER.

Key Results and Insights

The researchers evaluated DITS on the D4RL benchmark, focusing on locomotion and complex tasks like Adroit Kitchen and Antmaze.

  • Performance Breakthroughs: DITS consistently outperformed state-of-the-art methods. In the "Kitchen-Mixed" task, it improved the score of a standard TD3+BC agent from 0.0 to 42.2.
  • Diffusion vs. Auto-regression: A key insight is that diffusion models produce more coherent sequences than auto-regressive methods, which often suffer from high bias in long-horizon tasks.
  • The Importance of Stitching: High-quality synthetic data alone is insufficient. The stitching process is vital because it teaches the model how to transition from the "real" (often mediocre) states it will encounter to the "ideal" high-reward paths.
  • Broad Applicability: DITS proved to be a versatile "plug-and-play" solution, showing improvements across five different base RL algorithms (BC, TD3+BC, CQL, IQL, and CPED).

Limitations and Future Work

While DITS offers substantial improvements, it has some limitations. The trajectory generator is currently static; fine-tuning it with new interactions could yield further gains. Additionally, diffusion-based generation is computationally intensive compared to simpler methods. Future research will also explore extending DITS to observation-only inputs, such as raw pixels, to broaden its applicability in real-world robotics.

Conclusion

DITS demonstrates that by combining the generative power of diffusion models with strategic trajectory stitching, it is possible to effectively utilize reward-free interactions to train highly capable offline RL agents. This approach paves the way for more robust learning in environments where high-quality labeled data is scarce.

Summary updated

BibTeX
@misc{li2024distilling,
  author = {Shangzhe Li and Xinhua Zhang},
  title = {{Distilling Conditional Diffusion Models for Offline Reinforcement Learning through Trajectory Stitching}},
  year = {2024},
  eprint = {2402.00807},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.00807},
}
Figure