Efficient Exploration using Model-Based Quality-Diversity with Gradients

Bryan Lim, Manon Flageat, Antoine Cully

TL;DR

Standard Quality-Diversity (QD) algorithms are great at navigating deceptive reward landscapes by maintaining diverse populations, but they are notoriously sample-inefficient. This paper introduces Gradient and Dynamics-Aware Quality-Diversity (GDA-QD), which uses a learned world model to "sieve" candidate policy mutations in imagination and leverages off-policy policy gradients to greedily improve solutions. The result is a hybrid approach that achieves state-of-the-art exploration on deceptive continuous control tasks with roughly $5\times$ fewer environment samples than standard QD baselines.

What Problem Does This Paper Address?

Standard Reinforcement Learning (RL) agents often fail when environments feature deceptive or sparse rewards—they fall into local optima traps where the greedy path appears optimal until progress abruptly halts.

Quality-Diversity (QD) algorithms (like MAP-Elites) sidestep deception by optimizing a whole archive of policies that exhibit distinct behaviors (e.g., reaching different $(x, y)$ coordinates in a maze). However, classic QD relies on zero-order random parameter perturbations or natural evolution strategies, requiring millions of full environment evaluations. Scaling QD to deep neural network controllers has thus remained hindered by severe sample inefficiency.

Methods

The authors propose GDA-QD, which marries model-based reinforcement learning with population-based diversity search:

  1. Evolution in Imagination (DA-QD-ext): The current population is duplicated into an "imaginary" population. Rather than evaluating random mutations directly in the environment, GDA-QD rolls them out through a learned probabilistic ensemble of dynamics models (PETS-style Gaussian transition predictors). This acts as a coarse filter (or sieve): only mutations predicted to expand diversity or improve performance are earmarked for real-world execution.
  2. Directed Exploitation via Policy Gradients: Pure random perturbations struggle in high-dimensional weight spaces. GDA-QD maintains a centralized TD3-style critic network $Q_\psi$. At each iteration, a fraction ($p_{\text{gradient}} = 0.1$) of top-performing candidate policies are updated via analytic actor-critic policy gradients before environment evaluation, while the remainder ($p_{\text{model}} = 0.9$) evaluate parameter-perturbed policies directly.
  3. Selective Replay Buffer Training: Data collected in the environment trains both the dynamics model and the critic. Crucially, the authors discover that using transitions generated by gradient-updated policies skews the dynamics model distribution; hence, the dynamics model is trained only on transitions generated by QD-imagined policies ($D_{\text{model}}$).
Population Archive ──> Copy to Imagination ──> Rollout in Dynamics Model (Sieve)
                                                    │
                 ┌──────────────────────────────────┴─────────────────┐
                 ▼ (90%)                                              ▼ (10%)
        Direct Evaluation                                Apply TD3 Policy Gradient
                 │                                                    │
                 └───────────────────┬────────────────────────────────┘
                                     ▼
                        Evaluate in Real Environment
                                     │
         ┌───────────────────────────┴───────────────────────────┐
         ▼                                                       ▼
Update Population Archive & Critic              Update Dynamics Model (Filter out PG data)

Datasets & Environments

The method was evaluated on three continuous control benchmark tasks known for deceptive reward landscapes, simulated via the Jax-based Brax physics engine:

  • PointMaze: A 2D point navigation task where distance-to-goal rewards guide the agent into dead ends.
  • AntTrap: An 8-DoF quadruped Ant rewarded for forward progress and energy efficiency, facing a large U-shaped obstacle trap directly along the greedy trajectory.
  • AntMaze: An 8-DoF Ant navigating a complex maze toward a distant target.

For each environment, the behavior descriptor $d(\tau)$ is the $(x, y)$ coordinate at the end of the episode.

Key Insights and Ideas

  • Imagination Acts as a Filter, Not an Oracle: Dynamics models inevitably accumulate rollout drift. Rather than trusting the model for entire policy trajectories indefinitely, GDA-QD uses the model simply to discard clearly sub-optimal mutations, preserving expensive environment steps for promising candidates.
  • Separating Exploration from Exploitation: Random parameter mutations provide broad, divergent exploration to escape local minima, whereas policy gradients provide directional fine-tuning. Combining both avoids the slow convergence of pure evolutionary strategies and the tunnel vision of pure policy gradient RL.
  • Data Cleansing for World Models: Transitions generated by policy gradient updates are heavily biased toward the greedy reward direction. Training the dynamics model exclusively on the broader, more uniformly exploratory QD transitions prevents catastrophic distribution shift in model learning.

Key Results

Compared against standard QD (MAP-Elites, PGA-MAP-Elites), Evolutionary Strategies (OpenAI-ES, NS-ES, NSR-ES, NSRA-ES), and Deep RL baselines (TD3, SAC, DIAYN, SMERL):

  • Sample Efficiency: GDA-QD reaches the same final performance as top-performing baselines using up to $5\times$ fewer environment samples.
  • Performance on Deceptive Traps: In AntTrap, objective-only algorithms (SAC, TD3, ES) get stuck in the cul-de-sac. GDA-QD achieves a median Max-Total-Reward of 342.24 (vs. 274.52 for PGA-MAP-Elites, 218.77 for MAP-Elites, and ~189-204 for TD3/SAC).
  • Archive Coverage & Quality: GDA-QD reached a 76.28% QD-Score in AntTrap (relative to max) and 72.44% space coverage, compared to 47.82% and 47.08% for PGA-MAP-Elites.

Limitations and Future Work

  • Gradients Only Applied Outside Imagination: Policy gradient updates are evaluated directly on the true environment to avoid the overhead of re-training the critic during imagination steps; applying gradients directly inside imagination remains unexplored.
  • State-Space Dependency: The dynamics model currently operates over low-dimensional robotic states. Handling high-dimensional visual inputs (e.g., via latent world models like Dreamer) is left for future work.

Summary updated

BibTeX
@inproceedings{lim2023efficient,
  author = {Bryan Lim and Manon Flageat and Antoine Cully},
  title = {{Efficient Exploration using Model-Based Quality-Diversity with Gradients}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=5-X1XzdAWcC},
}
Figure