Abstract
Offline reinforcement learning (RL) is often limited by the quality and quantity of available data, as well as the distribution shift between the behavior policy and the target policy. Traditional autoregressive world models suffer from compounding errors over long horizons, leading to unrealistic synthetic data. We introduce Policy-Guided Diffusion (PGD), a novel framework that generates entire synthetic trajectories simultaneously using a diffusion model. By incorporating a guidance mechanism based on the target policy, PGD produces "on-policy" synthetic data that remains grounded in the true environment dynamics. Our results demonstrate that PGD significantly improves performance across D4RL benchmarks, particularly in complex navigation tasks, providing a robust solution for data augmentation in offline RL.
Introduction
In Offline Reinforcement Learning, agents must learn optimal behaviors from pre-collected datasets without environment interaction. This paradigm faces two primary challenges: distribution shift and compounding errors. Distribution shift occurs when the target policy attempts actions not present in the behavior data, leading to over-optimistic value estimates in out-of-sample states. To mitigate this, researchers often use world models to simulate environment dynamics. However, standard autoregressive world models predict states sequentially; small errors at each step accumulate, causing the simulation to drift into non-physical states over long horizons.
Methods: Policy-Guided Diffusion
The core innovation of this work is the transition from step-by-step prediction to whole-trajectory generation. PGD utilizes a diffusion model trained on the offline dataset to capture the underlying distribution of valid trajectories.
Trajectory Diffusion and Guidance
Instead of predicting $s_{t+1}$ from $s_t$, PGD generates an entire sequence of states and actions simultaneously. To ensure the generated data is useful for training a specific agent, the authors employ Policy Guidance. Similar to classifier guidance in image generation, PGD nudges the denoising process toward the target policy using a specialized score function. This function balances two gradients:
- The Score: Ensures the trajectory remains within the distribution of the original behavior data (maintaining physical realism).
- The Guidance: Shifts the generated actions toward the distribution of the target policy (making the data "on-policy").
A guidance coefficient ($\lambda$) allows for fine-tuning the trade-off between realism and policy alignment, effectively creating a behavior-regularized distribution of synthetic experience.
Experimental Evaluation
The researchers evaluated PGD using the D4RL benchmark, focusing on MuJoCo locomotion tasks and Maze2d navigation. PGD serves as a "drop-in" data augmentation tool that can be paired with existing offline RL algorithms like IQL or TD3+BC.
Key Results
- Performance Gains: Agents trained with PGD-augmented data showed an average 11.2% improvement in MuJoCo tasks over those trained on real data alone.
- Maze2d Success: In complex navigation tasks requiring long-term planning, PGD-trained agents significantly outperformed baselines, achieving scores of 99.0 compared to 73.1 for standard TD3+BC.
- Dynamics Accuracy: Compared to state-of-the-art autoregressive models like PETS, PGD maintained significantly lower mean squared error (MSE) in state predictions, even when generating actions far from the original behavior distribution.
Discussion and Conclusion
PGD addresses the fundamental limitations of autoregressive world models by leveraging the global coherence of diffusion-based trajectory generation. By generating entire sequences at once, the model avoids the drift associated with compounding errors.
While highly effective, current limitations include the use of fixed-length horizons (16 steps) and the requirement for differentiable policies for guidance. Future work will explore scaling PGD to high-dimensional inputs like video and developing methods for automatic guidance tuning. Overall, Policy-Guided Diffusion represents a significant step forward in creating reliable, on-policy synthetic data for offline reinforcement learning.
Summary updated