Skip to main content
QUICK REVIEW

[Paper Review] Approximating Gradients for Differentiable Quality Diversity in Reinforcement Learning

Bryon Tjanaka, Matthew C. Fontaine|arXiv (Cornell University)|Feb 8, 2022
Reinforcement Learning in RoboticsComputer Science5 citations
TL;DR

This paper proposes two variants of the CMA-MEGA algorithm for differentiable quality diversity (DQD) in reinforcement learning (RL), approximating gradients using evolution strategies (ES) and TD3 actor-critic methods. The approach enables efficient QD optimization in non-differentiable RL environments, with one variant achieving performance comparable to the state-of-the-art PGA-MAP-Elites in all four locomotion tasks from QDGym.

ABSTRACT

Consider the problem of training robustly capable agents. One approach is to generate a diverse collection of agent polices. Training can then be viewed as a quality diversity (QD) optimization problem, where we search for a collection of performant policies that are diverse with respect to quantified behavior. Recent work shows that differentiable quality diversity (DQD) algorithms greatly accelerate QD optimization when exact gradients are available. However, agent policies typically assume that the environment is not differentiable. To apply DQD algorithms to training agent policies, we must approximate gradients for performance and behavior. We propose two variants of the current state-of-the-art DQD algorithm that compute gradients via approximation methods common in reinforcement learning (RL). We evaluate our approach on four simulated locomotion tasks. One variant achieves results comparable to the current state-of-the-art in combining QD and RL, while the other performs comparably in two locomotion tasks. These results provide insight into the limitations of current DQD algorithms in domains where gradients must be approximated. Source code is available at https://github.com/icaros-usc/dqd-rl

Motivation & Objective

  • To extend differentiable quality diversity (DQD) to reinforcement learning (RL) settings, where environment dynamics are typically non-differentiable.
  • To address the limitation of existing DQD algorithms that require exact gradients, which are unavailable in standard RL environments.
  • To develop efficient QD-RL algorithms by approximating gradients for both performance (objective) and behavior (measure) functions using RL-compatible methods.
  • To evaluate the proposed methods on benchmark locomotion tasks and compare their performance and efficiency against state-of-the-art QD-RL algorithms.
  • To provide practical guidance on gradient approximation methods for DQD in RL, recommending TD3 over ES for better performance in modern control benchmarks.

Proposed method

  • Adapt the CMA-MEGA DQD algorithm to RL by approximating gradients for the objective and behavior functions using evolution strategies (ES) and TD3 actor-critic methods.
  • Introduce two variants: CMA-MEGA (TD3, ES), which uses TD3 for objective gradient estimation and ES for behavior gradient estimation, and CMA-MEGA (ES), which uses ES for both.
  • Maintain the CMA-MEGA framework of sampling gradient coefficients around a solution point and updating the distribution to maximize archive improvement.
  • Use a behavior measure based on foot usage patterns in locomotion tasks to define diversity, enabling policies to be diverse in locomotion strategies.
  • Integrate the gradient approximations into the CMA-MEGA optimization loop, allowing the algorithm to perform DQD-style search even when gradients are not analytically available.
  • Leverage the PyBullet-based QDGym environment for evaluation, using QD score AUC as the primary metric to compare performance across algorithms.

Experimental results

Research questions

  • RQ1Can differentiable quality diversity (DQD) be effectively applied to reinforcement learning (RL) when exact gradients are unavailable?
  • RQ2How do gradient approximation methods like evolution strategies (ES) and TD3 compare in their ability to support DQD optimization in RL?
  • RQ3What is the performance of the proposed CMA-MEGA variants relative to the state-of-the-art PGA-MAP-Elites in QD-RL benchmarks?
  • RQ4How does the efficiency of gradient approximation methods affect the convergence and final QD score in complex locomotion tasks?
  • RQ5Why do certain gradient approximation methods (e.g., TD3) outperform others (e.g., ES) in specific environments like QD Hopper and QD Walker?

Key findings

  • CMA-MEGA (TD3, ES) achieved QD score performance comparable to the state-of-the-art PGA-MAP-Elites across all four QDGym locomotion tasks.
  • CMA-MEGA (TD3, ES) was less efficient than PGA-MAP-Elites in QD Ant and QD Hopper, despite achieving similar final QD scores.
  • CMA-MEGA (ES) performed comparably to PGA-MAP-Elites in two of the four tasks (QD Half-Cheetah and QD Walker), but significantly worse in QD Ant and QD Hopper.
  • The higher number of archive insertions (500k vs. 5k) in CMA-MEGA variants contributed to better archive improvement compared to ME-ES, despite lower evaluation efficiency.
  • TD3-based objective gradients proved more effective than ES-based gradients in QD Hopper and QD Walker, likely due to reward shaping signals in QDGym that favor deep RL optimization.
  • MAP-Elites achieved higher QD scores than CMA-MEGA variants in QD Hopper, but its solutions were less robust, indicating a trade-off between performance and stability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.