Diversity Actor-Critic: Sample-Aware Entropy Regularization for Sample-Efficient Exploration

Seungyul Han, Youngchul Sung

TL;DR

Diversity Actor-Critic (DAC) introduces "sample-aware" entropy regularization to reinforcement learning. By maximizing the entropy of a mixture between the current policy and the distribution of actions already stored in the replay buffer, DAC pushes agents to choose actions that are not only diverse in the moment but also distinct from their past behavior. This significantly improves exploration, particularly in sparse-reward environments.

The Problem: History-Blind Exploration

In reinforcement learning (RL), exploration is a fundamental challenge. If an agent doesn't stumble upon a reward, it cannot learn how to achieve it. Standard off-policy algorithms like Soft Actor-Critic (SAC) use entropy regularization to mitigate this. This technique adds a "bonus" for unpredictability, encouraging the agent to try many different actions at any given state.

However, standard entropy regularization is fundamentally "history-blind." It encourages the policy to be uniform right now, but it doesn't account for whether the agent has already tried those exact same actions a thousand times before. In environments with sparse rewards or high-dimensional action spaces, agents often get stuck repeating the same unsuccessful patterns because their "unpredictability" is redundant.

The Solution: Sample-Aware Entropy Regularization

To solve this, the authors propose a new objective function called Sample-Aware Entropy Regularization.

  1. The Mixture Distribution: Instead of just looking at the entropy of the current policy $\pi$, DAC evaluates a mixture distribution: $q_{mix} = \alpha \pi + (1-\alpha)q$, where $q$ is the distribution of actions already sitting in the replay buffer.
  2. The Objective: By maximizing the entropy of this mixture, the agent is mathematically incentivized to do two things simultaneously:
  3. Keep the current policy $\pi$ diverse (standard entropy).
  4. Pick actions that are different from what is already in the replay buffer (diversity gain).
  5. The Ratio Function Trick: A major technical hurdle is that calculating the density of the replay buffer ($q$) in continuous, high-dimensional spaces is extremely difficult. The authors circumvent this by defining a ratio function. They train a separate neural network to estimate this ratio using a classifier-style objective, allowing them to implement the diversity bonus without ever explicitly calculating the distribution of the replay buffer.
  6. $\alpha$-Adaptation: The parameter $\alpha$ controls the balance between the policy's own entropy and its divergence from the buffer. Since the optimal balance varies by task, the authors propose an automated Lagrangian method to adapt $\alpha$ dynamically during training.

Experimental Setup

The algorithm was evaluated on several challenging continuous-control benchmarks designed to test exploration limits:

  • Continuous 4-room maze: A pure exploration task where the agent receives no reward and must visit as many unique states as possible.
  • Sparse-Reward MuJoCo: Standard MuJoCo tasks (Ant, Hopper, Walker2d, HalfCheetah) modified so the agent only gets a reward of '1' for reaching a specific goal, and '0' otherwise.
  • Delayed-Reward MuJoCo: Tasks where rewards are accumulated over many steps and delivered in a single lump sum, making credit assignment difficult.
  • HumanoidStandup-v1: A high-dimensional task known for being difficult to solve with basic exploration.

Key Results and Insights

Redundancy is the Enemy: The core insight of DAC is realizing that entropy isn't enough if it's redundant. By treating the replay buffer as a "memory" of what not to do, the agent becomes much more efficient. The paper shows that maximizing mixture entropy is mathematically equivalent to adding an intrinsic reward based on the Jensen-Shannon divergence between the policy and the buffer.

Continuous 4-room maze and state visitation performance

Superior Exploration: In the 4-room maze, DAC visited the "far" rooms much earlier and more consistently than SAC, RND (Random Network Distillation), or MaxEnt. The quantitative advantage is stark, with DAC rapidly outpacing baselines in the number of unique blocks visited.

Exploration flow heatmaps across algorithms

Visually, the exploration flow heatmaps confirm this behavior. While SAC and other baselines often get stuck in the starting room or struggle to pass through narrow bottlenecks, DAC's sample-aware regularization forces it to push outward into unexplored regions.

Sparse Reward Success: In the SparseAnt-v1 task, DAC achieved a high success rate while standard SAC and other baselines (like SAC-Div) often failed to find the reward at all.

Robustness: The authors tested how DAC handles the fact that the replay buffer distribution $q$ changes over time. They found the algorithm is remarkably robust even when $q$ is estimated from only the most recent 1,000 samples, still outperforming SAC significantly.

Limitations and Future Work

  • Computational Overhead: DAC requires training an additional neural network (the ratio function) and an $\alpha$-adaptation network. This increases the computational cost per training step compared to vanilla SAC.
  • The "Slow Change" Assumption: The theoretical proof assumes the replay buffer distribution $q$ is fixed or changes very slowly. While this holds true for large buffers in practice, a more rigorous theoretical treatment of a rapidly shifting $q$ remains an open question.
  • State-Dependent $\alpha$: Currently, $\alpha$ is a global parameter. The authors suggest that making $\alpha$ dependent on the specific state ($s$) could further improve performance in environments where some regions are well-explored but others are not.

Summary updated

BibTeX
@inproceedings{han2021diversity,
  author = {Seungyul Han and Youngchul Sung},
  title = {{Diversity Actor-Critic: Sample-Aware Entropy Regularization for Sample-Efficient Exploration}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=SphDhiWJmId},
}
Figure