TL;DR
While diffusion models excel at generating realistic trajectories for model-based reinforcement learning (MBRL) without compounding errors, they suffer from "short-horizon myopia" when guided only by immediate rewards. This paper introduces Advantage-Guided Diffusion (AGD-MBRL), which steers trajectory generation using learned advantage functions to account for long-term rewards beyond the generation window. By implementing two novel guidance mechanisms—Sigmoid and Exponential Advantage Guidance—the method significantly improves sample efficiency and final returns on standard continuous control benchmarks.
What Problem Does This Paper Address?
Traditional model-based reinforcement learning (MBRL) relies on autoregressive world models that predict the next state sequentially ($s_t \rightarrow s_{t+1}$). This setup suffers from compounding errors, where tiny mistakes at each step accumulate over long horizons, degrading planning performance.
Recently, diffusion models have emerged as a powerful alternative because they generate entire trajectory segments simultaneously, drastically reducing compounding errors. However, to generate useful trajectories for policy improvement, the diffusion process must be steered or "guided." Existing methods either ignore value information entirely (policy-only guidance) or use reward-based guidance (like Diffuser).
The catch? Because diffusion models are computationally expensive, they usually generate short trajectories (a short horizon $H$). Reward-based guidance looks only at the rewards within this short window, making it blind to what happens afterward. As illustrated in the paper's motivating example, a trajectory might yield high rewards initially but lead to a suboptimal dead-end later on.
Methods
The authors propose Advantage-Guided Diffusion for MBRL (AGD-MBRL). Instead of guiding the diffusion model with immediate rewards, they use the RL agent's learned advantage function, $A^\pi(s, a) = Q^\pi(s, a) - V^\pi(s)$. Because the advantage function inherently incorporates the expected long-term value of future states, it acts as a far-sighted proxy for rewards beyond the short diffusion window.
The paper introduces two distinct guidance formulations to alter the denoising score function:
- Sigmoid Advantage Guidance (SAG): Maps the advantage through a sigmoid function to define step optimality. This creates a bounded, conservative preference weighting that protects the model from overexploiting inaccurate, overestimated advantage estimates.
- Exponential Advantage Guidance (EAG): Uses exponential tilting ($\exp(A)$) based on an energy-based formulation. This aggressively steers sampling toward the highest-advantage regions of the state-action space.
Crucially, AGD integrates seamlessly into existing architectures (like PolyGRAD) by guiding only the state components during the reverse diffusion process while leaving action generation policy-conditioned. It requires absolutely no changes to the underlying diffusion training objective.
Datasets
The method was evaluated on four standard continuous control environments from the MuJoCo suite via OpenAI Gym:
- HalfCheetah
- Hopper
- Walker2D
- Reacher
All algorithms were trained and evaluated over a budget of 1.5 million environment steps.
Key Insights and Ideas
- Advantage as a Far-Sighted Guide: The core "aha" moment is that the advantage function naturally solves the short-horizon limitation of diffusion planning. It encapsulates the infinite-horizon value of a state, allowing a short 3-step or 4-step generated trajectory to make decisions that are optimal for the long run.
- Theoretical Policy Improvement: The authors mathematically prove (Propositions V.1 and V.2) that guiding diffusion with SAG or EAG is mathematically equivalent to performing reweighted sampling of trajectories from an improved policy. This provides a solid theoretical foundation for why the method stabilizes and accelerates RL training.
- The Conservative vs. Aggressive Trade-off: EAG performs exceptionally well when the value function is easy to estimate (e.g., HalfCheetah), rapidly driving the agent toward high-reward behaviors. Conversely, SAG's bounded nature makes it superior in environments where the optimal value function is harder to approximate (e.g., Walker2D), providing more stable and robust learning curves.
Key Results
AGD-MBRL consistently outperformed PolyGRAD, an online reward-guided Diffuser baseline, and model-free baselines (PPO and TRPO) across most tasks.
- HalfCheetah: AGD-MBRL (EAG) achieved a final average return of 4864.80, significantly outperforming the reward-guided Diffuser baseline (4188.43), standard PolyGRAD (3879.16), and doubling the performance of model-free PPO (2408.20).
- Walker2D: The conservative SAG variant shined here, reaching a top score of 3844.67 compared to PolyGRAD's 3489.48.
- Stability: As shown in the training curves, advantage guidance noticeably reduced the frequency and severity of performance regressions during training compared to reward-guided or unguided baselines.
Limitations and Future Work
The primary limitation of AGD-MBRL stems from the inherent nature of diffusion models: generation time. Iterative denoising requires multiple sequential neural network passes, making trajectory generation computationally expensive and slower than standard autoregressive models.
For future work, the authors suggest exploring ways to accelerate generation, such as sampling within a compressed latent space or utilizing flow matching techniques to reduce the number of required denoising steps.
Summary updated