Offline Meta Learning of Exploration

Ron Dorfman, Idan Shenfeld, Aviv Tamar

TL;DR

This paper introduces BOReL, the first offline meta-reinforcement learning (OMRL) algorithm that learns Bayes-optimal exploration strategies from pre-collected data. It tackles the challenge of "MDP ambiguity" in offline settings, where it's hard to distinguish between different tasks, by proposing novel data collection and reward relabeling techniques.

What Problem Does This Paper Address?

Reinforcement learning (RL) agents typically learn by interacting with an environment. However, in many real-world scenarios (like robotics or healthcare), collecting data is expensive or risky. This is where offline RL comes in, aiming to learn from pre-existing datasets without further interaction. Meta-RL takes this a step further by training an agent to quickly adapt to new, unseen tasks from a known distribution, leveraging past experience across multiple tasks.

The core problem this paper addresses is Offline Meta-Reinforcement Learning (OMRL), specifically focusing on exploration. Imagine you have logs from many different RL agents, each trained to solve a specific task (e.g., navigate to a specific goal). Now, you want to train a new agent that can quickly learn to solve any task from that same distribution, even if the goal is in a completely different location. The challenge is that the provided data might not explicitly show how to explore effectively for new goals; it only shows how agents exploited their known goals. Furthermore, learning a good exploration strategy from static, offline data is tricky because the data might not contain enough information to reliably distinguish between different underlying tasks (a problem the authors call "MDP ambiguity").

Methods

The authors build upon the VariBAD algorithm, a Bayesian RL approach that uses a variational autoencoder (VAE) to maintain a belief about the environment's parameters. Here's how they adapt it for offline meta-RL:

  • Off-Policy VariBAD: They modify VariBAD to work with off-policy data. This involves using an off-policy Q-learning approach instead of the original on-policy policy gradients.
  • State Relabelling: To adapt the offline data to the Bayesian RL framework (which assumes a belief over environment parameters), they "relabel" states. This means augmenting the observed state with the VAE's inferred belief about the environment parameters at that time step. This effectively transforms the data into a format suitable for learning a Bayes-optimal policy.
  • Addressing MDP Ambiguity: This is a key contribution. MDP ambiguity arises when the offline data doesn't provide enough distinguishing information between tasks. For example, if all agents in the data learned to reach a specific goal, it's hard for a meta-agent to learn a general exploration strategy to find any goal. To combat this, they propose:
  • Policy Replaying: A data collection strategy where new trajectories are generated by running a trained policy from one task on another task. This ensures better coverage of state-action pairs across tasks.
  • Reward Relabelling (RR): A simpler technique applicable when tasks primarily differ in their rewards. Here, they replace the rewards in existing trajectories with rewards from a different, randomly chosen task. This helps the VAE learn to distinguish between tasks based on their reward structures.
  • BOReL (Bayesian Offline Reinforcement Learning): This is the name of their proposed framework, combining the off-policy VariBAD with state relabelling and optionally policy replaying/reward relabelling.

Datasets

The authors evaluate their method on a diverse set of domains:

  • Gridworld: A discrete 5x5 grid with an unobserved goal.
  • Semi-circle: A continuous 2D environment where the goal is on a semi-circle.
  • Ant-Semi-circle: A challenging modification of the Ant robot task, requiring navigation to a goal on a semi-circle.
  • Half-Cheetah-Vel: A standard MuJoCo benchmark for continuous control with dense rewards.
  • Reacher-Image: A robotic arm task with image observations.
  • Wind: A continuous 2D domain with varying transition dynamics (wind).
  • Escape-Room: A continuous 2D domain requiring navigation out of a room through an unknown opening.

They also introduce modifications to existing domains (like Ant-Semi-circle) to specifically test the impact of data diversity and reward sparsity.

Key Insights and Ideas

  • Offline Meta-RL for Exploration is Novel: This is presented as the first work to tackle Bayes-optimal exploration in the offline meta-RL setting.
  • MDP Ambiguity is a Critical Challenge: The paper rigorously defines and demonstrates how MDP ambiguity can severely hinder learning in offline meta-RL, especially in sparse reward settings. This is a crucial insight for understanding the limitations of offline data.
  • Bayesian RL Provides a Framework for Exploration: By framing meta-RL as Bayesian RL, the authors leverage the inherent exploration benefits of maintaining uncertainty about the environment.
  • Data Collection Strategies Matter: The proposed policy replaying and reward relabelling techniques are shown to be effective in mitigating MDP ambiguity and improving performance, highlighting the importance of data quality and diversity.
  • Qualitatively Different Exploration: The learned policies exhibit a distinct exploration behavior (e.g., searching along a semi-circle) that is fundamentally different from the goal-reaching behaviors seen in the training data.

Key Results

  • Superior Performance: BOReL significantly outperforms Thompson sampling-based meta-RL methods (like PEARL) in offline settings, especially on sparse reward tasks. For instance, in the Semi-circle domain, BOReL achieves substantially higher average returns.
  • Effective MDP Ambiguity Mitigation: Reward relabelling significantly improves performance on domains prone to MDP ambiguity (like Gridworld, Semi-circle, Ant-Semi-circle), demonstrating the effectiveness of their proposed solutions.
  • Data Diversity is Crucial: An ablation study on the Ant-Semi-circle domain shows that even with their method, performance degrades significantly with lower data diversity (e.g., fixed initial states).
  • Improved Sample Efficiency (Online): When adapted to an online setting, their off-policy approach shows improved sample efficiency compared to the original VariBAD.

Limitations and Future Work

  • Data Quality Dependency: The authors acknowledge that performance is still dependent on the quality and diversity of the offline data, even with their proposed mitigation strategies.
  • General POMDPs: The current work focuses on MDPs. Future work could extend the framework to more general Partially Observable Markov Decision Processes (POMDPs).
  • Alternative Ambiguity Mitigation: They suggest exploring other techniques to mitigate MDP ambiguity, such as designing data collection policies that actively diversify data or incorporating prior knowledge into the belief update.
  • Hyperparameter Sensitivity: While not explicitly stated as a limitation, the performance of deep RL methods is often sensitive to hyperparameters, which might require careful tuning.

Summary updated

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