TL;DR
This paper introduces Reweighted Score Matching (RSM), a novel framework that allows diffusion-based policies to be trained efficiently in online reinforcement learning. By reweighting the standard denoising loss, the authors bypass the need for expert samples and avoid the massive computational cost of backpropagating through the diffusion process, leading to state-of-the-art performance on complex locomotion tasks.
The Challenge: Diffusion Policies in Online RL
Diffusion models have revolutionized generative AI by learning to "denoise" data into highly complex, multimodal distributions. In Reinforcement Learning (RL), this expressiveness is a superpower—it allows a robot to represent multiple ways to solve a task rather than just averaging them into a single, often failing, "mean" action.
However, diffusion policies have mostly succeeded in offline RL (learning from a fixed dataset). Moving them to online RL (learning via trial and error) presents two massive hurdles:
- The Sampling Challenge: Standard diffusion training (Denoising Score Matching) requires samples from a "target" distribution. In online RL, we don't have these; we are actively trying to find the optimal distribution.
- The Computational Challenge: Previous attempts to bridge this gap often treat the entire diffusion chain as a differentiable function. Backpropagating gradients through 20+ diffusion steps is computationally expensive, memory-intensive, and prone to vanishing or exploding gradients.
Methods: Reweighted Score Matching (RSM)
The authors propose Reweighted Score Matching (RSM) to solve these challenges. The core insight is realizing that diffusion models are essentially noise-perturbed Energy-Based Models (EBMs).
Instead of needing raw samples from an optimal policy, RSM allows the model to be trained using an energy function (in RL, this is our $Q$-value or value function). By reweighting the score-matching loss, they can "steer" the diffusion model toward high-reward actions without ever needing an expert dataset.
This approach shows that you don't need to differentiate through the diffusion process if you can match the "score" (the gradient of the log-density). This turns a sequential optimization problem into a parallelizable, supervised-like learning problem.
Practical Algorithms
Building on RSM, the authors introduce two specific algorithms:
- Diffusion Policy Mirror Descent (DPMD): Solves the policy mirror descent problem, which keeps the new policy close to the old one while maximizing value.
- Soft Diffusion Actor-Critic (SDAC): A diffusion-based version of the popular Soft Actor-Critic (SAC) algorithm, which maximizes both reward and entropy (exploration).
A key technical contribution enabling these algorithms is the "Reverse Sampling Trick." This uses a conditional Gaussian distribution to make the reweighted loss function mathematically tractable and easy to implement using standard deep learning libraries.
Experiments and Key Results
The researchers evaluated their algorithms on both toy benchmarks and complex continuous control tasks.
Toy Benchmarks
Initial tests on 2D Gaussian mixtures and the "Two Moon" distribution verified that RSM can recover complex, multimodal shapes from energy functions alone.
MuJoCo Benchmarks
The algorithms were then tested on a standard suite of 10 continuous control tasks in MuJoCo, including HalfCheetah, Ant, Humanoid, Walker2d, and Hopper. These represent the gold standard for testing locomotion and stability in RL.
- Massive Performance Gains: DPMD improved performance by over 120% compared to the standard Soft Actor-Critic (SAC) on the most difficult tasks: Humanoid-v4 and Ant-v4. This suggests that the ability of diffusion models to represent complex action distributions is critical for high-dimensional, unstable systems.
- State-of-the-Art: The proposed algorithms outperformed recent diffusion-policy online RL baselines (like QSM, DIPO, and QVPO) across almost all MuJoCo tasks.
- Computational Speed: By avoiding recursive gradients, SDAC was found to be the fastest among diffusion-based methods, completing 200k iterations in roughly 16 minutes, compared to over 95 minutes for some baselines.
Limitations and Future Work
While RSM makes training highly efficient, the authors note a few areas for future improvement:
- Stability: Diffusion policies can still be sensitive to hyperparameters like the noise schedule and the number of diffusion steps.
- Exploration: While the batch action sampling trick helps, more sophisticated exploration schemes tailored specifically for the "score space" of diffusion models could further boost performance.
- Real-World Robotics: The current work is limited to simulation. Testing the robustness of these efficient online updates on physical hardware remains a promising next step.
Summary updated