Multi-Environment Pretraining Enables Transfer to Action Limited Datasets

David Venuto, Sherry Yang, Pieter Abbeel, Doina Precup, Igor Mordatch, Ofir Nachum

TL;DR

Training large-scale reinforcement learning (RL) models is bottlenecked by the scarcity of action-annotated data, as videos of behavior are much easier to acquire than exact control logs. This paper introduces Action Limited PreTraining (ALPT), a method that leverages fully annotated data from diverse source environments to train an Inverse Dynamics Model (IDM), which then pseudo-labels missing actions in a sparsely annotated target environment. ALPT enables robust transfer learning and achieves high performance on target tasks using as little as 12 minutes of labeled gameplay, even when source and target action spaces are completely disjoint.

The Challenge of Action-Limited Data

In natural language processing and computer vision, massive unlabelled datasets have driven the success of large-scale foundation models. Reinforcement learning (RL) has struggled to replicate this success because RL data typically requires action labels—the specific joystick movements or motor torques used to transition between states. While we have an abundance of "action-limited" data, like YouTube videos of humans playing games or completing tasks, manually annotating these videos with exact actions is prohibitively expensive and time-consuming.

The authors tackle the challenge of training an RL agent in a target environment where only a tiny fraction of the data has action labels. They ask: can we use abundant, fully-labeled data from entirely different source environments to help an agent learn in an action-limited target environment?

Action Limited PreTraining (ALPT)

To solve this, the authors propose Action Limited PreTraining (ALPT), a two-stage semi-supervised offline RL approach that combines an Inverse Dynamics Model (IDM) with a Decision Transformer (DT).

ALPT Pipeline Overview
  1. Inverse Dynamics Modeling: The IDM is a bidirectional transformer trained to look at a sequence of states (frames) and predict the actions taken between them.
  2. Pretraining: The IDM is trained on a massive combined dataset of fully-labeled source environments and the tiny labeled portion of the target environment. Concurrently, the DT policy is trained on all available data, using the IDM to generate pseudo-labels for the unannotated target data.
  3. Finetuning: Both the IDM and DT are finetuned exclusively on the target environment. The IDM continues to refine its pseudo-labels for the unannotated data, while the DT learns the final target policy.

While using IDMs for pseudo-labeling isn't entirely new, ALPT uniquely demonstrates how to leverage multi-environment pretraining to bootstrap IDMs for a specific, action-limited target task without requiring thousands of hours of manual human annotation.

Experimental Setup

  • Atari (RL Unplugged): The primary evaluation uses standard offline RL Atari datasets. To simulate the action-limited setting, target games are restricted to just 10,000 labeled transitions (0.01% of the dataset, equivalent to ~12 minutes of gameplay). The rest of the target data has its action labels stripped.
  • Maze Navigation: Custom 20x20 gridworld mazes with different layouts (Blocked vs. Tunneled). Source mazes contain 500 fully-labeled trajectories, while target mazes are restricted to just 250 labeled actions.

Key Insights

  • The IDM is the secret to generalization: Pretraining the Decision Transformer alone on source games yields poor results. The massive performance gains come specifically from pretraining the IDM. The IDM learns broad, generalizable representations of physics and movement across games, allowing it to accurately guess missing actions in new environments.
  • Disjoint action spaces aren't a dealbreaker: Surprisingly, ALPT works even if the source and target games share zero common actions. For example, pretraining on Freeway (actions: Up, Down) significantly improves performance on Breakout (actions: Left, Right). The transformer likely learns structural similarities in movement dynamics that transfer across orientations.
  • Scaling laws apply to source diversity: Just like in LLMs, more diverse pretraining data leads to better downstream performance. Pretraining ALPT on 36 source games yielded noticeably better target performance than pretraining on 9 source games.

Key Results

ALPT demonstrates extreme data efficiency, proving that massive manual annotation isn't strictly necessary if you have good source data.

Performance across Atari Games
  • Massive Performance Boosts: On Atari, ALPT yields up to a 5x (~500%) improvement in episodic return compared to single-game training baselines (DT-1).
  • Extreme Data Efficiency: ALPT achieves these results using only 10k labeled samples from the target environment.
  • Faster Convergence: In the Maze navigation tasks, ALPT trained on multiple source maze layouts solved the target task twice as fast as baselines trained only on the target maze.

Limitations and Future Work

Limitations: * ALPT assumes access to plentiful, fully-labeled data from related source environments. If the target environment is entirely alien compared to the source data, the IDM might fail to generalize. * Evaluations are currently limited to self-contained video games (Atari) and simple 2D gridworld mazes. It remains to be seen how well this handles highly complex, continuous control tasks (like 3D robotics).

Future Work: * Investigating the exact scaling laws of this approach: specifically, how much labeled source data is required to successfully pseudo-label a massive, completely unlabelled target dataset. * Expanding the evaluation to broader, more complex RL domains to test the limits of the IDM's zero-shot generalization capabilities.

Summary updated

BibTeX
@inproceedings{venuto2023multi,
  author = {David Venuto and Sherry Yang and Pieter Abbeel and Doina Precup and Igor Mordatch and Ofir Nachum},
  title = {{Multi-Environment Pretraining Enables Transfer to Action Limited Datasets}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=5RvZb6Lcbz},
}
Figure