Sample Efficient Ensemble Learning with Catalyst.RL

Sergey Kolesnikov, Valentin KhrulkovarXiv 2020

Abstract

We present Catalyst.RL, an open-source PyTorch framework for reproducible and sample efficient reinforcement learning (RL) research. Main features of Catalyst.RL include large-scale asynchronous distributed training, efficient implementations of various RL algorithms and auxiliary tricks, such as n-step returns, value distributions, hyperbolic reinforcement learning, etc. To demonstrate the effectiveness of Catalyst.RL, we applied it to a physics-based reinforcement learning challenge "NeurIPS 2019: Learn to Move -- Walk Around" with the objective to build a locomotion controller for a human musculoskeletal model. The environment is computationally expensive, has a high-dimensional continuous action space and is stochastic. Our team took the 2nd place, capitalizing on the ability of Catalyst.RL to train high-quality and sample-efficient RL agents in only a few hours of training time. The implementation along with experiments is open-sourced so results can be reproduced and novel ideas tried out.

Introduction

Deep reinforcement learning (RL) has achieved remarkable success in complex domains such as Go and StarCraft II. However, the field faces significant challenges regarding reproducibility and sample efficiency. Modern RL algorithms often exhibit high variance and extreme sensitivity to hyperparameters, making it difficult to compare new techniques against established baselines fairly.

Furthermore, applying RL to physically realistic, high-dimensional continuous control tasks remains computationally prohibitive. In environments like the OpenSim musculoskeletal simulator, generating observations is slow (often ~1 step per second). To be practical, algorithms must be exceptionally sample-efficient. We introduce Catalyst.RL, a framework designed to address these issues by providing a standardized, scalable architecture equipped with advanced techniques for sample-efficient learning.

System Architecture

Catalyst.RL utilizes a distributed architecture that decouples the RL pipeline into three independent node types: Samplers, Trainers, and a Database.

The Catalyst.RL decoupled architecture separates data collection (Samplers), model optimization (Trainers), and data storage (Database).
  • Samplers: CPU-based nodes responsible for environment interaction, inference, and data collection.
  • Trainers: GPU-based nodes that perform neural network weight updates.
  • Database: A Redis or MongoDB instance acting as an intermediary for storing trajectories and distributing model parameters.

This decoupling ensures robustness against node failures and allows the system to scale seamlessly from a single workstation to large-scale clusters.

Algorithmic Innovations

To tackle complex continuous control tasks, we implemented several advanced techniques within the Catalyst.RL framework:

Quantile TD3

We extended the Twin Delayed DDPG (TD3) algorithm by incorporating distributional RL. Instead of estimating a single mean Q-value, our agent uses a quantile value distribution with 101 atoms to model the full distribution of expected returns, providing a richer signal for learning.

Hyperbolic Discounting

Standard RL uses a single exponential discount factor ($\gamma$). We implemented a multi-head critic with 10 heads to learn Q-values across multiple time horizons simultaneously, using a maximum discount factor of $\gamma_{max} = 0.99$. This approach stabilizes learning and improves performance in continuous control settings.

Ensemble Learning via Shared Replay

Our most significant structural innovation is the use of ensemble learning with a shared replay buffer. We run multiple agents with varying hyperparameters (specifically, the history length of observations) in parallel. All agents contribute to and learn from a single shared buffer. This allows the ensemble to pool diverse exploratory experiences, significantly boosting sample efficiency as agents benefit from the aggregate data.

Case Study: NeurIPS 2019 "Learn to Move"

We evaluated Catalyst.RL in the NeurIPS 2019 "Learn to Move - Walk Around" challenge. The task involved controlling a 3D human musculoskeletal model with a 97-dimensional state space and a 22-dimensional continuous action space. The goal was to follow a dynamic target velocity vector field.

Due to the sparse nature of rewards in physics simulations, we employed heavy reward shaping. We introduced biomechanical penalties (e.g., for crossed legs) and bonuses (e.g., for knee bending and alignment with the target vector) to guide the agent toward human-like locomotion. Exploration was further enhanced through a hybrid strategy mixing action space noise (70%), parameter space noise (20%), and deterministic execution (10%).

Results and Discussion

Catalyst.RL secured 2nd place in the competition with a mean reward of 1346.939. A key highlight was the framework's extreme sample efficiency.

Training performance across different history lengths. The ensemble approach allows agents to reach high reward thresholds rapidly.

As shown in the training curves, the agents reached a reward score exceeding 1000 in just 6 hours of training using 40 parallel threads (24 samplers and 16 trainers). This is a significant achievement given the slow simulation speed of the environment. The shared replay buffer allowed the ensemble to capitalize on the aggregate data, effectively sharing all gained experience across different agent configurations.

Conclusion

Catalyst.RL provides a robust and efficient framework for RL research, bridging the gap between theoretical algorithms and practical, large-scale applications. Our success in the NeurIPS 2019 challenge demonstrates that combining decoupled distributed architectures with ensemble learning and distributional RL can overcome the sample inefficiency typically associated with complex physics simulations. Future work will focus on further benchmarking these approaches and exploring human-like locomotion in more detail.

Summary updated

BibTeX
@misc{kolesnikov2020sample,
  author = {Sergey Kolesnikov and Valentin Khrulkov},
  title = {{Sample Efficient Ensemble Learning with Catalyst.RL}},
  year = {2020},
  eprint = {2003.14210},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2003.14210},
}
Figure