NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Model-based Approach for Sample-efficient Multi-task Reinforcement Learning

Nicholas C. Landolfi, Garrett Thomas, Tengyu MaarXiv 2019

Abstract

The aim of multi-task reinforcement learning is two-fold: (1) efficiently learn by training against multiple tasks and (2) quickly adapt, using limited samples, to a variety of new tasks. In this work, the tasks correspond to reward functions for environments with the same (or similar) dynamical models. We propose to learn a dynamical model during the training process and use this model to perform sample-efficient adaptation to new tasks at test time. We use significantly fewer samples by performing policy optimization only in a "virtual" environment whose transitions are given by our learned dynamical model. Our algorithm sequentially trains against several tasks. Upon encountering a new task, we first warm-up a policy on our learned dynamical model, which requires no new samples from the environment. We then adapt the dynamical model with samples from this policy in the real environment. We evaluate our approach on several continuous control benchmarks and demonstrate its efficacy over MAML, a state-of-the-art meta-learning algorithm, on these tasks.

Introduction

Multi-task reinforcement learning (RL) seeks to enable agents to learn across diverse tasks and rapidly adapt to new ones. A prominent challenge in this field is sample efficiency, especially when optimal policies for different tasks vary significantly. The current state-of-the-art, Model-Agnostic Meta-Learning (MAML), relies on learning a shared policy initialization. However, MAML often faces challenges like policy divergence—where no single initialization is suitable for all tasks—and high sample requirements for adaptation.

This paper proposes a shift from model-free meta-learning to a model-based approach. By focusing on learning the underlying physics (transition dynamics) of the environment, which are often shared across tasks even when reward functions differ, we can drastically reduce the need for real-world interaction.

Methodology

The proposed approach transfers the parameters of a learned dynamical model—a neural network predicting the next state given the current state and action—rather than policy parameters. The core algorithm, Sequential Multi-task Learning, builds upon Stochastic Lower Bound Optimization (SLBO) and operates in three stages:

  1. Task Sampling: A task is selected from the distribution.
  2. Policy Warm-Up: A policy is initialized and trained entirely within a "virtual" environment defined by the current learned dynamical model. This stage requires zero real-world samples.
  3. Data Collection & Fine-Tuning: The warmed-up policy is deployed in the real environment to collect data, which is then used to refine the dynamical model.

By training on tasks sequentially, the dynamical model becomes increasingly accurate, allowing the "warm-up" phase to produce near-optimal policies for later tasks before any real-world interaction occurs.

Experimental Setup

The method was evaluated using the MuJoCo physics simulator on standard continuous control benchmarks: Half-cheetah, Ant, and Humanoid. Tasks involved varying goal velocities and directions. To test robustness, the authors also introduced out-of-distribution (OOD) tasks, including reward shifts (e.g., reversing target velocity) and dynamical shifts (e.g., changing friction or disabling a limb).

Results

The model-based approach demonstrated exceptional sample efficiency and adaptation capabilities. While MAML required 80 million samples for training, the proposed method achieved superior results with only 0.4 million samples—less than 1% of the data.

Performance on Cheetah task showing superior zero-shot adaptation compared to MAML.

As shown in the figures, the warmed-up policies (at 0 samples) often outperformed MAML's adapted policies. The agent effectively adapts to new tasks in its "imagined" environment before taking a single step in the real world.

Performance on Ant task demonstrating high average return with zero real-world samples.

The algorithm also proved robust to reward shifts. While dynamical shifts (like a crippled limb) reduced the effectiveness of the zero-shot warm-up, the agent could still adapt quickly by updating its world model with a few real-world samples.

Conclusion

This work highlights that transferring physics knowledge is often more robust than transferring policy behaviors in multi-task RL. The model-based approach enables zero-shot adaptation and massive gains in sample efficiency. Future work will explore active task selection and applying this framework to more complex, non-shared dynamics environments.

Summary updated

BibTeX
@misc{landolfi2019model,
  author = {Nicholas C. Landolfi and Garrett Thomas and Tengyu Ma},
  title = {{A Model-based Approach for Sample-efficient Multi-task Reinforcement Learning}},
  year = {2019},
  eprint = {1907.04964},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.04964},
}
Figure