Offline Meta Reinforcement Learning

Ron Dorfman, Aviv Tamar

Introduction

Meta-reinforcement learning (meta-RL) aims to produce agents capable of rapid adaptation to new tasks by leveraging experience from a wide distribution of training environments. Traditionally, this process relies on extensive online interaction. However, in safety-critical or high-cost domains like healthcare and robotics, online exploration is often infeasible. This necessitates Offline Meta-RL (OMRL), where agents must learn adaptation and exploration strategies solely from fixed, pre-collected datasets.

The Offline Meta-RL Challenge

Transitioning from online to offline meta-learning introduces two primary hurdles: the Exploration Gap and MDP Ambiguity.

The Exploration Gap arises because offline datasets typically consist of "greedy" trajectories from specialized agents that already know their goals. A meta-agent trained on this data must learn a fundamentally different behavior: how to proactively search for an unknown goal in a new environment.

Comparison of greedy offline data (left) and the emergent search behavior of the BOReL meta-agent (right).

MDP Ambiguity occurs when limited data makes it impossible to distinguish between different tasks. If an agent only visits a specific region, it remains unclear if rewards exist elsewhere in that task or only in the visited spot. This lack of identifiability prevents the meta-agent from correctly updating its beliefs about the environment.

The BOReL Framework

To address these challenges, the authors propose BOReL (Bayesian Offline Reinforcement Learning). BOReL frames meta-RL as a Bayesian RL problem, where the agent maintains a posterior distribution over possible tasks to guide its actions.

Neural Belief Estimation and Off-Policy Learning

BOReL utilizes a Variational Autoencoder (VAE) to encode the agent's interaction history into a latent "belief" vector. Unlike previous on-policy methods, BOReL integrates off-policy algorithms like Soft Actor-Critic (SAC), enabling efficient learning from static datasets.

Resolving Ambiguity via Relabeling

The core innovation of BOReL lies in its data augmentation techniques: Reward Relabeling (RR) and Policy Replaying (PR). By re-scoring trajectories from one task as if they occurred in another, the framework forces the VAE to distinguish between tasks even when the original behavior was non-exploratory. This allows the agent to learn optimal information-gathering strategies.

Experimental Results

BOReL was evaluated across diverse benchmarks, including high-dimensional locomotion (Ant-Semi-circle) and vision-based tasks (Reacher-Image).

Performance of BOReL across various benchmarks, demonstrating the impact of Reward Relabeling (RR) compared to baselines.

Key findings include:

  • Structured Exploration: BOReL outperforms baselines like PEARL, which rely on randomized Thompson Sampling. BOReL agents demonstrate structured "sweeping" behavior to locate goals efficiently.
  • Robustness: The framework remains effective even when trained on low-quality data where the original agents failed to reach goals.
  • Quantitative Gains: In the Ant-Semi-circle domain, BOReL achieved a return of ~172, significantly surpassing PEARL's performance and demonstrating superior adaptation within the first few episodes.

Conclusion

BOReL represents a significant step forward in Offline Meta-RL by enabling the learning of Bayes-optimal exploration from static data. By addressing the identifiability problem through reward relabeling, it bridges the gap between greedy offline logs and the proactive search required for fast adaptation. Future work may extend these principles to more general Partially Observable MDPs (POMDPs) and incorporate prior domain knowledge.

Summary updated

BibTeX
@inproceedings{dorfman2021offline,
  author = {Ron Dorfman and Aviv Tamar},
  title = {{Offline Meta Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=IBdEfhLveS},
}
Figure