Decoupling Meta-Reinforcement Learning with Gaussian Task Contexts and Skills

Hongcai He, Anjie Zhu, Shuang Liang, Feiyu Chen, Jie Shao

Abstract

Offline meta-reinforcement learning (meta-RL) aims to enable agents to adapt rapidly to new tasks using only static datasets. However, existing methods often struggle with generalization due to coupled latent spaces and ambiguous representations. We present DCMRL (Decoupled Meta-Reinforcement Learning), a hierarchical framework that utilizes Gaussian quantization to discretize task contexts and skills. By modeling these as Gaussian distributions and employing a Gaussian Quantization VAE (GQ-VAE), DCMRL effectively decouples exploration from learning. Experimental results in maze navigation and robotic kitchen manipulation demonstrate that DCMRL achieves superior sample efficiency and robustness compared to state-of-the-art baselines.

Introduction

In the field of offline meta-RL, agents are tasked with learning from a fixed dataset of diverse experiences to facilitate quick adaptation to previously unseen tasks. A significant challenge in this domain is generalization. Many current approaches fail when test tasks deviate even slightly from the training distribution.

The authors identify two primary issues:

  1. Coupled Latent Spaces: Continuous latent spaces often intertwine the processes of exploring the space and learning from it. Poor initial exploration can lead to a feedback loop that restricts the agent to sub-optimal regions of the latent space.
  2. Ambiguous Representations: Representing task contexts and skills as simple continuous vectors fails to account for the variety of trajectories that can represent the same underlying task or skill, leading to "blurry" learning signals.

Methodology: The DCMRL Framework

DCMRL addresses these challenges through a hierarchical architecture that introduces several key innovations:

Gaussian Task Contexts and Skills

Instead of point-vector representations, DCMRL models tasks and skills as Gaussian distributions. This probabilistic approach captures the inherent uncertainty and variability in task execution.

Gaussian Quantization VAE (GQ-VAE)

The core of DCMRL is the GQ-VAE, which performs online clustering of these Gaussian distributions into discrete codebooks. By mapping continuous distributions to discrete cluster centers, the framework decouples the exploration of the continuous latent space from the learning of representative behaviors. This discretization acts as a powerful regularizer, filtering noise and preventing overfitting to specific training trajectories.

Overview of the DCMRL framework, illustrating skill pre-training, meta-training, and meta-testing phases with context and skill codebooks.

Contrastive Learning and Hierarchical Policy

To further refine task representations, a triplet loss strategy is employed. This contrastive approach pulls together contexts from the same task while pushing away those from different tasks, ensuring robust task identification. The final hierarchical policy consists of a high-level policy that selects contexts and skills from the learned codebooks, and a pre-trained low-level policy that executes primitive actions.

Experimental Evaluation

The framework was evaluated on two complex continuous control benchmarks:

  • Maze Navigation: A 2D environment requiring the agent to find a goal in a complex layout with sparse rewards.
  • Kitchen Manipulation: A 7-DoF robotic arm task involving sequential subtasks such as opening a microwave or moving a kettle.

Task-agnostic offline datasets were used to pre-train the skills, providing a diverse set of initial behaviors.

Key Results

DCMRL demonstrated significant improvements over baselines like SiMPL, PEARL, and SAC:

  • Superior Sample Efficiency: In maze navigation, DCMRL solved nearly 90% of unseen tasks within a few episodes, while baselines struggled to reach 60% even after extensive training.
  • Robustness to Distribution Shift: The model maintained high performance even when test tasks were spatially misaligned with training tasks (e.g., training in the top of a maze, testing in the bottom).
  • Complex Task Completion: In the kitchen environment, DCMRL was uniquely capable of consistently solving more than three sequential subtasks during the adaptation phase.
Performance comparison of DCMRL against baselines in Maze navigation and Kitchen manipulation environments.

Conclusion and Future Work

DCMRL highlights the importance of decoupling latent space exploration from learning through discretization. While the current Gaussian assumption is effective, future work could explore multi-modal distributions to capture even more complex behaviors. Additionally, extending this framework to high-dimensional sensory inputs like raw video remains a promising direction for general-purpose robotic learning.

Summary updated

BibTeX
@inproceedings{he2024decoupling,
  author = {Hongcai He and Anjie Zhu and Shuang Liang and Feiyu Chen and Jie Shao},
  title = {{Decoupling Meta-Reinforcement Learning with Gaussian Task Contexts and Skills}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i11.29127},
}
Figure