Learning Multimodal Behaviors from Scratch with Diffusion Policy Gradient

Zechu Li, Rickmer Krohn, Tao Chen, Anurag Ajay, Pulkit Agrawal, Georgia Chalvatzaki

Overview

Researchers have developed Deep Diffusion Policy Gradient (DDiffPG), a novel actor-critic algorithm that allows reinforcement learning (RL) agents to learn multiple ways to solve a task from scratch. By combining diffusion models with unsupervised clustering and mode-specific Q-learning, the agent avoids "mode collapse," maintaining a diverse repertoire of behaviors that enable it to adapt to changing environments and navigate around unexpected obstacles.

The Problem: "Winner-Take-All" Reinforcement Learning

In standard Reinforcement Learning, agents are inherently "greedy." They are programmed to find the single most efficient path to a reward. Consequently, most RL policies are parameterized as deterministic outputs or simple Gaussian distributions, which restricts them to a single behavioral mode.

This "winner-take-all" approach has two major drawbacks:

  1. Brittleness: If the agent's only known path is suddenly blocked, it fails entirely.
  2. Local Minima: An agent might get stuck in a suboptimal solution simply because it found that solution first and stopped exploring alternatives.

While Diffusion Models (the technology behind generative AI like DALL-E) are excellent at representing complex, multimodal distributions, using them for online RL is difficult. It is computationally hard to calculate policy likelihoods, and the inherent greediness of RL objectives usually forces even a highly expressive diffusion policy to collapse into a single mode.

Methods: Bridging Diffusion and Online RL

The authors introduce DDiffPG to bridge the gap between the expressive power of diffusion models and the requirements of online RL.

Overview of the DDiffPG architecture

The system relies on several key innovations:

  • Diffusion Policy Gradient (DPG): Instead of directly backpropagating through the complex diffusion chain (which often leads to vanishing gradients), the authors use a "target-chasing" approach. They compute a target action by taking a gradient step on the Q-function and then train the diffusion policy to match these targets using a simple Mean Squared Error (MSE) loss.
  • Unsupervised Mode Discovery: The agent collects successful trajectories and uses Dynamic Time Warping (DTW) and hierarchical clustering to group them into distinct "modes" (e.g., "Path A" vs. "Path B"). This is done entirely without human labeling.
  • Mode-Specific Q-Functions: To prevent a high-reward mode from "swallowing" a slightly lower-reward (but still valid) mode, DDiffPG maintains a separate Q-function for each discovered behavior. It also uses a dedicated exploration Q-function driven by Random Network Distillation (RND) to keep searching for new solutions.
  • Latent Conditioning: The policy is conditioned on a mode-specific embedding. This allows a user or a high-level planner to explicitly command the agent to execute a specific mode.

Experimental Setup

The researchers evaluated DDiffPG on eight high-dimensional continuous control tasks designed for high multimodality. These included AntMaze navigation tasks (where a quadruped must reach goals in mazes with multiple possible paths) and Robotic Manipulation tasks using a Franka Arm (such as reaching, peg-in-hole, and opening cabinets).

Crucially, these tasks were trained from scratch using sparse rewards—the agent only receives a signal when it actually succeeds—making the discovery of multiple modes significantly more challenging.

Key Insights

  • Decoupling is Key: By separating the discovery of modes (clustering) from the improvement of modes (mode-specific Q-learning), the authors prevent the greedy nature of RL from destroying behavioral diversity.
  • Stability through Behavioral Cloning (BC): Treating the policy update as a BC problem against a moving target makes training diffusion models in an online setting much more stable than previous methods that tried to optimize the diffusion chain directly.
  • Continuous Exploration: DDiffPG doesn't stop exploring once it finds a solution. Because it tracks "novelty," it continues to push into new areas of the state space, helping it find robust, diverse solutions that standard baselines miss.

Key Results

Multimodal trajectories discovered by DDiffPG
  • Multimodality: DDiffPG consistently discovered and maintained multiple modes (e.g., averaging 4.3 modes in AntMaze-v3). In contrast, baselines like SAC, TD3, and even other diffusion-based RL methods almost always collapsed to a single mode.
  • State Coverage: The agent achieved significantly higher state coverage than all baselines except for RPG, which explores well but often fails to actually solve the task.
  • Online Replanning: In a proof-of-concept test, researchers placed unseen obstacles in a maze. Because DDiffPG had learned multiple routes, a simple high-level planner could switch the agent to an alternative mode when it got stuck, achieving a 100% success rate where standard RL agents failed entirely.

Limitations and Future Work

While highly effective, DDiffPG has a few limitations. The current hierarchical clustering requires a distance metric based on specific domain knowledge (like the 2D position of the ant), though the authors suggest using latent trajectory embeddings to generalize this. Additionally, DDiffPG is roughly 5x slower than standard algorithms like TD3 or SAC due to the iterative nature of diffusion sampling and the overhead of managing multiple Q-functions. Future work will likely focus on scaling these multimodal policies to massive, open-ended environments and integrating them with long-horizon planners.

Summary updated

BibTeX
@inproceedings{li2024learning,
  author = {Zechu Li and Rickmer Krohn and Tao Chen and Anurag Ajay and Pulkit Agrawal and Georgia Chalvatzaki},
  title = {{Learning Multimodal Behaviors from Scratch with Diffusion Policy Gradient}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=vU1SiBb57j},
}
Figure