Source-linked AI summary

ChainerRL: A Deep Reinforcement Learning Library

Yasuhiro Fujita, Prabhat Nagarajan, Toshiki Kataoka, Takahiro Ishikawa

arXiv:1912.03905v2cs.LGcs.AIstat.ML

TL;DR

DRL research has grown rapidly alongside concerns about reproducibility, motivating comprehensive libraries and tools. ChainerRL combines algorithms, experiment utilities, reproducibility scripts, and visualization; its scripts cover nine algorithms and report comparisons with published scores.

  • Problem

    Rapid growth in DRL algorithms coincides with reproducibility concerns, creating a need for comprehensive libraries, tools, and implementations for RL research and development.

    Source: §1 · p. 1
  • Method

    ChainerRL provides a Python DRL library with reusable algorithms and abstractions, experiment utilities, scripts that closely match published papers, and a visualizer for inspecting agents.

    Source: §1 · p. 2, §2.2 · p. 3, §3 · p. 4
  • Results

    Its reproducibility scripts cover nine algorithms across Atari and MuJoCo tasks, with released pretrained models and score tables comparing results with published reports.

    Source: §3 · p. 4, Appendix B · p. 8
  • Takeaways & Limitations

    The authors conclude that ChainerRL’s algorithms, flexible APIs, visualization tools, and faithful reproductions can accelerate DRL research and application.

    Source: §4 · p. 4

Abstract

from arXiv · show

In this paper, we introduce ChainerRL, an open-source deep reinforcement learning (DRL) library built using Python and the Chainer deep learning framework. ChainerRL implements a comprehensive set of DRL algorithms and techniques drawn from state-of-the-art research in the field. To foster reproducible research, and for instructional purposes, ChainerRL provides scripts that closely replicate the original papers' experimental settings and reproduce published benchmark results for several algorithms. Lastly, ChainerRL offers a visualization tool that enables the qualitative inspection of trained agents. The ChainerRL source code can be found on GitHub: https://github.com/chainer/chainerrl.

1. Introduction

ChainerRL is presented as a broad DRL library addressing a growing need for research tools and implementations amid reproducibility concerns. It combines algorithms and abstractions with scripts that replicate papers and a visualizer for inspecting agents.

1. Introduction

  • The growing DRL literature and reproducibility concerns motivate comprehensive libraries, tools, and implementations for RL research and development.Source: §1 · p. 1
  • Existing libraries address different needs: rllab and garage benchmark continuous-action algorithms, Dopamine focuses on DQN and extensions, and rlpyt supports both action types across three algorithm classes.Source: §1 · p. 1
  • ChainerRL provides an open-source Python library built on Chainer, with algorithms, abstractions, reproducibility scripts, and a companion visualizer.Source: §1 · p. 2

2. Design of ChainerRL

ChainerRL organizes algorithms around an Agent interface and provides experiment utilities and reusable building blocks. These support agent development, training and evaluation, parallel execution, and qualitative inspection.

2.1 Agents

  • Each algorithm implements an Agent interface that receives observations, rewards, and termination status and returns an action, specifying its update and action-selection procedures.Source: §2.1 · p. 2

2.2 Experiments

  • The experiments module manages agent-environment interaction and training or evaluation schedules, supporting synchronous or asynchronous batch training across parallel environments.Source: §2.2 · p. 3

2.3 Developing a New Agent

  • To develop an agent, users inherit Agent, implement learning updates and action selection with provided components, then train and evaluate it through the experiments module.Source: §2.3 · p. 3

2.4 Agent Building Blocks

  • Additional building blocks include exploration methods, replay-buffer variants, and predefined neural-network architectures, with recurrent models supported for several algorithms.Source: §2.4 · p. 3
  • Reusable policy and action-value components model action distributions and Q-functions, including discrete, categorical, quantile, and continuous-action variants.Supported policies include Gaussian, Softmax, Mellowmax, and deterministic policies.Source: §2.4 · p. 4
  • Combining components lets users construct complex agents such as Rainbow, which combines six features into one agent.The appendix demonstrates pseudocode construction and training in multiple parallel environments in a few lines.Source: §2.4 · p. 4

2.5 Visualization

  • The ChainerRL Visualizer lets users inspect agents in a browser, including saliency maps, episode rollouts, action probabilities, and predicted Q-values or distributions.Source: §2.5 · p. 4

3. Reproducibility

ChainerRL’s reproducibility scripts aim to match published implementation and evaluation details as closely as possible. They cover nine algorithms, include pretrained models, and provide score tables for comparison with published results.

3. Reproducibility

  • Nine algorithms have reproducibility scripts designed to match original or other published papers’ implementation and evaluation details as closely as possible.The scripts cover DQN, IQN, Rainbow, A3C, DDPG, TRPO, PPO, TD3, and SAC.Source: §3 · p. 4
  • The project releases pretrained models for every domain and full score tables comparing its results with scores reported in the literature.Source: §3 · p. 4

4. Conclusion

The paper concludes that ChainerRL combines algorithms, flexible APIs, visualization, and faithful reproductions to accelerate DRL research and application. It targets Chainer users and notes an analogous library for PyTorch users.

4. Conclusion

  • The authors conclude that ChainerRL’s algorithms, flexible APIs, visualization tools, and faithful reproductions can accelerate DRL research and application.Source: §4 · p. 4
  • ChainerRL targets Chainer users, while the authors identify PFRL as an analogous library for PyTorch users.Source: §4 · p. 4

Appendix A. Agents

ChainerRL supports diverse agent types and adds recurrent, batch, and asynchronous capabilities across its algorithms.

Appendix A. Agents

  • ChainerRL supports discrete-action, continuous-action, recurrent, batch, and asynchronous agents, with additional supported features summarized in Table 1.The supplied passage does not specify the table’s individual entries.Source: Appendix A · p. 8, Table 1 · p. 8
  • Asynchronous training is available for A3C, ACER, N-step Q-learning, and PCL, with one model-parameter set interacting with multiple environments asynchronously.Source: Appendix A · p. 8
  • Batch training runs synchronous parallel interactions, while recurrent architectures are supported for most algorithms despite often lacking support in their original publications.Batch training is supported for algorithms without asynchronous support; ChainerRL abstracts recurrent-state and observation-sequence management.Source: Appendix A · p. 8

Appendix B. Reproducibility Results

ChainerRL provides reproducibility scripts for nine algorithms across Atari and MuJoCo tasks, reporting comparisons with published results and documenting evaluation protocols. The appendix also explains how the reproductions were prepared and where direct comparison with an original result is not possible.

Appendix B. Reproducibility Results

  • Atari reproductions document evaluation frequency, phase length, episode length, policy, and reporting protocol, because these choices can significantly influence reported results.The appendix defines best-eval as the highest mean score across intermediate evaluations and re-eval as reassessment of the parameters that produced that score.Source: Appendix B · pp. 8–9
  • Reproducibility scripts cover DQN, IQN, Rainbow, and A3C on Atari and DDPG, TRPO, PPO, TD3, and SAC on MuJoCo, with results compared against published scores.Tables 2 and 4 report the respective benchmark comparisons; models trained through the scripts are released for the listed algorithms and environments.Source: Appendix B · pp. 8–9, Table 2 · p. 11, Table 4 · p. 12
  • The scripts are built by studying released code, published hyperparameters, implementation details, and evaluation protocols, with author correspondence used to resolve ambiguities.Source: Appendix B · p. 9
  • Some reproductions cannot be compared directly with original results; the A3C original used unavailable demonstrations, so the authors compare against other published work instead.The Atari protocol table identifies the protocols matched for DQN, IQN, Rainbow, and A3C.Source: Appendix B · p. 10, Table 3 · p. 12

Appendix C. Visualizer Images

The visualizer shows agent behavior for both actor-critic and distributional value-based algorithms, including attention and action-value information.

Appendix C. Visualizer Images

  • For A3C on Breakout, the visualizer can show attended pixel regions as a saliency map, support manual episode stepping or rollouts, and display action probabilities and predicted state values.Source: Appendix C · p. 13
  • For agents learning Q-values or Q-value distributions, the visualizer can display predicted values or distributions for each action.Source: Appendix C · p. 14

Appendix D. Pseudocode

The pseudocode constructs a Rainbow agent by combining ChainerRL building blocks, then trains it across parallel environments using the experiments module.

Appendix D. Pseudocode

  • Rainbow combines double updating, prioritized replay, N-step learning, dueling architectures, and Categorical DQN into one agent.The example uses a distributional dueling Q-function, converts it to a noisy network, and configures prioritized replay for N-step rewards.Source: Appendix D · p. 14
  • A built-in CategoricalDoubleDQN agent is created from the prioritized replay buffer and Q-function to produce the Rainbow agent.Source: Appendix D · p. 14
  • The example trains the agent in multiple synchronous environments, while the experiments module manages training loops, evaluation statistics, logging, and saving.The code sets the environment count to five.Source: Appendix D · p. 14
Loading 1912.03905v2…