Abstract
Meta-reinforcement learning (meta-RL) aims to enable agents to adapt quickly to new tasks by leveraging experience from a distribution of related tasks. However, existing meta-RL algorithms are often sample-inefficient, requiring massive amounts of on-policy data. We present PEARL (Probabilistic Embeddings for Actor-critic RL), an off-policy meta-RL algorithm that achieves a 20-100x improvement in sample efficiency. PEARL achieves this by disentangling task inference from control and utilizing a probabilistic latent context for efficient exploration.
Introduction
Reinforcement Learning (RL) typically requires millions of interactions to master a single task. Meta-RL addresses this by training agents to adapt to new, unseen tasks rapidly. Despite their promise, current state-of-the-art meta-RL methods like MAML and RL$^2$ suffer from two primary limitations: extreme sample inefficiency due to reliance on on-policy data, and poor exploration in sparse reward environments where task identification is difficult.
The PEARL Architecture
PEARL addresses these challenges by separating the problem into task inference and task-conditioned control. The architecture consists of two main components:
- The Inference Network (Encoder): This network processes a small set of recent transitions (context) to produce a probabilistic distribution over a latent variable $Z$. This variable represents the agent's belief about the current task. The encoder is designed to be permutation-invariant, treating transitions as an unordered set, which provides more stable optimization than sequential models like RNNs.
- Off-Policy Actor-Critic: The policy $\pi(a|s, z)$ and the critic $Q(s, a, z)$ are conditioned on the latent variable $Z$. By decoupling inference from control, PEARL can utilize Soft Actor-Critic (SAC), a highly efficient off-policy algorithm, to train the controller using data from a comprehensive replay buffer.
A key innovation in PEARL's training is the decoupled sampling strategy: the encoder is trained on recent data to ensure accurate task inference, while the policy is trained on the entire history of transitions to maximize RL sample efficiency.
Key Insights
- Disentanglement for Efficiency: Separating "what the task is" from "how to solve it" allows the control policy to be trained on off-policy data, drastically reducing the total number of environment interactions needed.
- Posterior Sampling for Exploration: The probabilistic nature of $Z$ enables "Thompson Sampling." At the start of an episode, the agent samples a hypothesis $z$ from its current belief and acts optimally according to that hypothesis. This leads to structured, temporally extended exploration rather than random dithering.
- Permutation Invariance: Using an MLP-based encoder to aggregate transitions simplifies the learning process and improves performance on long-horizon tasks compared to recurrent architectures.
Experimental Results
PEARL was evaluated on six continuous control benchmarks in the MuJoCo physics simulator, including Half-Cheetah, Ant, Humanoid, and Walker-2D.
The results demonstrate that PEARL is 20-100x more sample-efficient than on-policy meta-RL baselines like ProMP and MAML. Furthermore, PEARL achieved 50-100% higher asymptotic returns in most benchmarks. In sparse reward navigation tasks, PEARL successfully identified goals and adapted its strategy within just 5-10 trajectories, significantly outperforming prior methods like MAESN.
Limitations and Future Work
While PEARL excels at test-time adaptation with sparse rewards, meta-training from scratch in sparse environments remains a significant challenge. Future research could explore more complex encoder architectures for high-dimensional inputs like images and investigate methods for effective meta-training when rewards are sparse throughout the entire learning process.
Summary updated