Skip to main content
QUICK REVIEW

[Paper Review] MBRL-Lib: A Modular Library for Model-based Reinforcement Learning

Luis A. Pineda, Brandon Amos|arXiv (Cornell University)|Apr 20, 2021
Reinforcement Learning in RoboticsComputer Science37 references15 citations
TL;DR

MBRL-Lib is a PyTorch-based, open-source library designed to accelerate research and deployment in model-based reinforcement learning (MBRL) for continuous control. It provides modular, reusable components for dynamics modeling, planning, and policy optimization, along with reproducible implementations of state-of-the-art algorithms like MBPO and PETS, enabling rapid prototyping, debugging, and benchmarking with consistent performance across Mujoco environments.

ABSTRACT

Model-based reinforcement learning is a compelling framework for data-efficient learning of agents that interact with the world. This family of algorithms has many subcomponents that need to be carefully selected and tuned. As a result the entry-bar for researchers to approach the field and to deploy it in real-world tasks can be daunting. In this paper, we present MBRL-Lib -- a machine learning library for model-based reinforcement learning in continuous state-action spaces based on PyTorch. MBRL-Lib is designed as a platform for both researchers, to easily develop, debug and compare new algorithms, and non-expert user, to lower the entry-bar of deploying state-of-the-art algorithms. MBRL-Lib is open-source at https://github.com/facebookresearch/mbrl-lib.

Motivation & Objective

  • To lower the entry barrier for researchers and practitioners in model-based reinforcement learning by providing a modular, reusable software framework.
  • To address reproducibility and debugging challenges in MBRL due to complex interactions between components like dynamics models and control objectives.
  • To offer out-of-the-box, high-fidelity implementations of state-of-the-art MBRL algorithms (e.g., MBPO, PETS) that are easily modifiable and extendable.
  • To foster community-driven development by enabling researchers to build, test, and contribute new algorithms using a shared, standardized codebase.
  • To bridge the performance gap between model-free and model-based RL by providing accessible, well-architected tools for MBRL research.

Proposed method

  • The library is built on PyTorch to support dynamic computation graphs and ease of integration with modern deep learning workflows.
  • It provides modular abstractions for core MBRL components: dynamics models, planners, reward functions, and policy optimizers, enabling plug-and-play experimentation.
  • MBRL-Lib implements probabilistic ensemble models for dynamics prediction, using Monte Carlo rollouts with top-k 'elite' models for improved robustness.
  • It supports both model-based planning (e.g., CEM in PETS) and model-based fine-tuning of off-policy RL agents (e.g., SAC in MBPO) using simulated trajectories.
  • The library includes built-in visualization and debugging tools, including loss tracking, trajectory plotting, and evaluation pipelines for standardized benchmarking.
  • All implementations use normalized observations and re-train the dynamics model every 250 environment steps on the full dataset, with validation splits for MBPO.

Experimental results

Research questions

  • RQ1How can a modular, open-source library reduce the complexity and improve reproducibility in model-based reinforcement learning research?
  • RQ2To what extent can standardized, PyTorch-based implementations of MBRL algorithms like MBPO and PETS match the performance of original implementations?
  • RQ3What impact do architectural choices—such as deterministic vs. probabilistic ensembles—have on learning stability and sample efficiency in MBRL?
  • RQ4Can a unified software platform accelerate the development and comparison of new MBRL algorithms across diverse environments?
  • RQ5How do hyperparameter choices and data preprocessing (e.g., normalization, input transformations) affect the reproducibility of MBRL results?

Key findings

  • The MBRL-Lib implementation of MBPO achieves performance comparable to the original implementation across five Mujoco 2.0 environments, with higher returns in the Ant environment.
  • In the HalfCheetah environment, the MBRL-Lib implementation of MBPO underperforms the original, suggesting potential discrepancies in hyperparameters or implementation details.
  • The PETS implementation in MBRL-Lib shows consistent performance in CartPole and InvertedPendulum, though with increased instability in InvertedPendulum compared to MBPO.
  • In CartPole, deterministic ensembles improved learning speed in PETS, while probabilistic ensembles worked better in other environments.
  • The MBRL-Lib implementation of PETS failed to reproduce the original performance, likely due to differences in input preprocessing and reward function design in the original codebase.
  • The library successfully reproduces key results from the literature, demonstrating its utility for benchmarking and algorithm development in a standardized, extensible framework.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.