Learning Efficient and Effective Exploration Policies with Counterfactual Meta Policy

Ruihan Yang, Qiwei Ye, Tie-Yan LiuarXiv 2019

Abstract

Reinforcement learning (RL) agents face a fundamental challenge in balancing exploration and exploitation. Traditional exploration methods often rely on task-agnostic heuristics that fail to account for the opportunity cost of exploratory actions. This paper introduces the Counterfactual Meta Policy (CMP) framework, which treats exploration as a distinct learning problem within a Meta-MDP. By leveraging a counterfactual metric to evaluate the specific gains and costs of exploration, CMP enables agents to learn highly efficient exploration strategies. Experimental results on MuJoCo benchmarks demonstrate that CMP significantly improves sample efficiency and final performance compared to state-of-the-art methods.

Introduction

In standard RL, exploration is frequently implemented through simple mechanisms like Gaussian noise or intrinsic motivation. However, these task-agnostic approaches do not adapt to the specific requirements of complex control tasks. While meta-learning offers a path toward learned exploration, existing methods often overlook efficiency—the "opportunity cost" incurred when an agent deviates from its current optimal policy. The challenge lies in creating a system that learns an exploration policy that is both effective in discovering optimal trajectories and efficient in minimizing wasted effort.

Methodology: The Counterfactual Meta Policy

The authors propose a Meta-MDP framework that decouples the agent into two interacting components: an exploration policy ($\pi_e$) and an exploitation policy ($\pi$).

The CMP framework decouples exploration and exploitation policies within a Meta-MDP.

The core innovation is the Counterfactual Value (CV), inspired by multi-agent RL techniques. The utility of an exploratory action is defined by two factors:

  1. Gain: The expected improvement in the exploitation policy's performance after incorporating data gathered during exploration.
  2. Cost: The immediate loss in reward resulting from choosing an exploratory action over the exploitation policy's recommended action.

A Meta-Q function is trained to estimate this CV, predicting the future utility of specific trajectories. The exploration policy is then optimized via policy gradients (REINFORCE) to maximize this metric, with a hyperparameter $\beta$ used to tune the balance between potential long-term gain and immediate opportunity cost.

Experimental Evaluation

The CMP framework was evaluated using the MuJoCo simulator on several high-dimensional continuous control tasks, including HalfCheetah-v2, Hopper-v2, and InvertedPendulum-v2. CMP was compared against DDPG (a standard off-policy baseline), MA2C, and L2Explore (a previous state-of-the-art meta-learning exploration method).

Key Results

CMP demonstrated superior performance across multiple metrics, particularly in the HalfCheetah-v2 environment.

Performance comparison on HalfCheetah-v2, showing (a) Total Return, (b) Time Alignment, and (c) Training Reward.
  • Superior Sample Efficiency: In the HalfCheetah-v2 environment, CMP reached a reward threshold of 1500 using only 0.4 million samples. For comparison, the MA2C baseline required 1.5 million samples to reach the same level—a nearly 4x improvement in efficiency.
  • Higher Final Performance: CMP achieved a final average reward of approximately 2562.8, significantly outperforming the MA2C baseline of 1981.
  • Reduced Variance: The counterfactual mechanism led to more stable training sessions with less fluctuation between different random seeds compared to standard noise-based methods.
  • Faster Training: Despite the extra computation required to update the meta-policy, CMP's high sample efficiency resulted in faster overall wall-clock training times because it requires fewer interactions with the environment to succeed.

Discussion and Limitations

While CMP offers significant advantages, it faces challenges in inherently unstable environments like Hopper-v2, where variable episode lengths complicate the estimation of exploration gains. Additionally, the current implementation relies on a fixed hyperparameter $\beta$; future work will focus on automating the tuning of this balance during training. Further research is also needed to analyze the policy distance between exploration and exploitation to better understand when the meta-policy becomes too aggressive or too conservative.

Summary updated

BibTeX
@misc{yang2019learning,
  author = {Ruihan Yang and Qiwei Ye and Tie-Yan Liu},
  title = {{Learning Efficient and Effective Exploration Policies with Counterfactual Meta Policy}},
  year = {2019},
  eprint = {1905.11583},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.11583},
}
Figure