Active deep Q-learning with demonstration

Si-An Chen, Voot Tangkaratt, Hsuan-Tien Lin, Masashi SugiyamaMachine Learning 2018 · DOI

Abstract

Recent research has shown that although Reinforcement Learning (RL) can benefit from expert demonstration, it usually takes considerable efforts to obtain enough demonstration. The efforts prevent training decent RL agents with expert demonstration in practice. In this work, we propose Active Reinforcement Learning with Demonstration (ARLD), a new framework to streamline RL in terms of demonstration efforts by allowing the RL agent to query for demonstration actively during training. Under the framework, we propose Active Deep Q-Network, a novel query strategy which adapts to the dynamically-changing distributions during the RL training process by estimating the uncertainty of recent states. The expert demonstration data within Active DQN are then utilized by optimizing supervised max-margin loss in addition to temporal difference loss within usual DQN training. We propose two methods of estimating the uncertainty based on two state-of-the-art DQN models, namely the divergence of bootstrapped DQN and the variance of noisy DQN. The empirical results validate that both methods not only learn faster than other passive expert demonstration methods with the same amount of demonstration and but also reach super-expert level of performance across four different tasks.

Introduction

Reinforcement Learning (RL) has achieved remarkable success in complex domains like robotics and gaming. However, the sample inefficiency of training agents from scratch remains a significant hurdle, often requiring millions of environment interactions. Learning from Demonstration (LfD) offers a solution by leveraging expert knowledge, yet traditional LfD methods are typically "passive." They rely on pre-collected, static datasets that may suffer from distribution shift or fail to cover critical states encountered during training. Collecting such large-scale expert data is also prohibitively expensive.

To address these challenges, we introduce Active Reinforcement Learning with Demonstration (ARLD). This framework allows an agent to intelligently and actively query an expert for guidance only when it encounters high-uncertainty states. This approach bridges the gap between passive imitation learning and standard RL, as shown in the taxonomy below.

Taxonomy of learning methods, positioning ARLD as an online/active reinforcement learning approach.

Methodology: Active Deep Q-Network

The core of ARLD is the Active Deep Q-Network (Active DQN), which integrates active learning into the DQN framework through three key components:

1. Uncertainty Estimation

The agent must identify when it is "confused" to decide when to query the expert. We explore two primary methods for measuring this uncertainty:

  • Divergence of Bootstrapped DQN: The agent maintains multiple Q-function "heads." It measures the Jensen-Shannon divergence between their predictions; high disagreement indicates high uncertainty.
  • Variance of Noisy DQN: By utilizing noisy layers, the agent estimates its own confidence through the predictive variance of Q-values.

2. Adaptive Thresholding

Because uncertainty naturally decreases as training progresses, a static query threshold is ineffective. Active DQN employs an adaptive threshold based on a sliding window of recent uncertainty values, querying the expert only when current uncertainty exceeds a specific percentile (e.g., the top 10%) of recent experiences.

3. Learning Objective

When an expert provides a recommended action, it is stored in a permanent buffer. The agent then optimizes a combined loss function: the standard temporal difference (TD) loss and a supervised max-margin loss. This ensures the agent's Q-values for expert actions are significantly higher than for alternatives, effectively "anchoring" the policy to expert behavior in critical states.

Experimental Evaluation

We evaluated Active DQN on four OpenAI Gym tasks: Cart-Pole, Acrobot, Mountain Car, and Lunar Lander. These tasks represent a spectrum of difficulty in control problems, providing a robust testbed for our active query strategies.

Key Results

Our empirical results demonstrate that Active DQN significantly outperforms passive baselines across several metrics:

  • Faster Convergence: In the Lunar Lander task, Active DQN reached a "solved" state in approximately 47,500 steps, compared to over 400,000 steps for the passive DQfD baseline.
  • Expert Efficiency: By querying only at "critical" states where the policy is most likely to diverge, Active DQN achieves superior performance with the same or lower total demonstration budget than passive methods.
  • Super-Expert Performance: Interestingly, agents trained under ARLD frequently surpassed the performance of the experts providing the demonstrations. By combining expert guidance with environmental rewards, the agents discovered more optimal strategies than those contained in the static demonstrations alone.
  • Robustness: Active DQN proved more resilient to "noisy" or imperfect experts than passive methods, as the interactive nature of the training allows the agent to correct its policy over time.

Conclusion and Future Work

ARLD provides a robust framework for reducing the human effort required to train RL agents. By focusing expert attention on the most informative states, Active DQN achieves faster learning and higher peak performance. Future research will focus on extending this framework to continuous action spaces (e.g., via DDPG) and optimizing query frequency to further reduce the burden on human experts in real-time interaction scenarios.

Summary updated

BibTeX
@article{chen2018active,
  author = {Si-An Chen and Voot Tangkaratt and Hsuan-Tien Lin and Masashi Sugiyama},
  title = {{Active deep Q-learning with demonstration}},
  journal = {Machine Learning},
  year = {2018},
  doi = {10.1007/s10994-019-05849-4},
}
Figure