Estimating Disentangled Belief about Hidden State and Hidden Task for Meta-RL

Kei Akuzawa, Yusuke Iwasawa, Yutaka Matsuo

Abstract

Meta-Reinforcement Learning (Meta-RL) aims to enable agents to adapt to new tasks with minimal experience. While most research assumes a Meta-MDP setting where the state is fully observable, real-world environments often present a "double-blind" challenge: both the task and the state are hidden (Meta-POMDP). This paper introduces the HSSM-agent (HSSMA), which utilizes a Hierarchical State-Space Model to explicitly disentangle uncertainty about the global task from the local state. By factorizing these beliefs, HSSMA achieves faster adaptation and higher performance in complex, noisy environments compared to state-of-the-art Meta-RL methods.

Introduction

Standard Reinforcement Learning (RL) typically requires millions of interactions to master a single task. Meta-RL addresses this by training agents to "learn how to learn," allowing them to generalize to new tasks from a few snippets of experience. However, a significant gap exists between standard Meta-RL benchmarks and real-world conditions. Most benchmarks assume a Meta-MDP setting, where the agent's state is perfectly observable even if the task goal is hidden. In contrast, real-world sensors are often noisy or limited, leading to a Meta-POMDP (Partially Observable Markov Decision Process) where the agent faces uncertainty regarding both its current state and the overall task.

Problem Formulation: From Meta-MDP to Meta-POMDP

In a Meta-POMDP, the agent must infer two distinct types of hidden information: the global task (e.g., a target velocity or goal location) and the local state (e.g., current position or joint angles). Previous approaches often conflated these into a single hidden vector, which can hinder the policy's ability to learn efficiently.

Graphical model comparison between Meta-POMDP, Meta-MDP, and standard POMDP frameworks.

As illustrated in the graphical models above, the Meta-POMDP framework introduces a global latent variable $z$ that influences the entire trajectory, while local states $s_t$ evolve over time. Unlike the Meta-MDP setting where $s_t$ is observed, or the standard POMDP where $z$ is absent, the Meta-POMDP requires the agent to maintain a belief over both hierarchies simultaneously.

The HSSM-agent (HSSMA)

The proposed HSSM-agent (HSSMA) leverages a Hierarchical State-Space Model (HSSM) to represent the agent's internal belief. This model is built on several key components:

1. Disentangled Latent Variables

The HSSM factorizes the agent's belief into two distinct latent variables:

  • Global Variable ($\tilde{z}$): Captures task-specific information that remains constant throughout an episode.
  • Local Variable ($\tilde{s}_t$): Captures time-varying state information. By separating these variables, the agent can distinguish between long-term objectives and immediate physical configurations.

2. Amortized Inference and the $\beta$-VAE Objective

Because exact inference of these hidden variables is computationally intractable, HSSMA uses deep neural networks (RNN encoders) to approximate the posterior distribution, following a Variational Autoencoder (VAE) approach. To prevent "posterior collapse"—where the model ignores the global variable in favor of the local one—the authors employ a $\beta$-VAE objective with $\beta < 1$. This encourages the model to retain more information in the global task variable.

3. Policy Training

The disentangled belief is fed into a policy trained via Proximal Policy Optimization (PPO) or Soft Actor-Critic (SAC). The factorized input allows the policy to more effectively map beliefs to actions, accelerating the learning process.

Experimental Evaluation

The HSSM-agent was evaluated across three diverse environments designed to test partial observability:

  • GridWorld: A 5x5 navigation task with hidden goals and limited 3x3 visibility.
  • MuJoCo - HalfCheetahVel: A robot simulation requiring the agent to match a hidden target velocity.
  • MuJoCo - Walker2DRandParam: A simulation with randomized physical parameters (e.g., friction, mass) per task.

To enforce a true Meta-POMDP setting in MuJoCo, the authors restricted observations to positional data only, forcing the agent to infer velocity and task parameters from history.

Key Results and Insights

  • Superior Adaptation: In GridWorld, HSSMA demonstrated significantly higher rewards in later episodes of a task compared to non-hierarchical baselines, indicating successful task inference.
  • Performance and Efficiency: HSSMA outperformed state-of-the-art methods like VariBAD and $RL^2$ in MuJoCo environments, reaching higher final performance with greater sample efficiency.
  • Robustness to Noise: While VariBAD excels in Meta-MDPs, its performance degrades in Meta-POMDPs. HSSMA proved robust by explicitly modeling state uncertainty alongside task uncertainty.
  • Hierarchy as Inductive Bias: The core insight is that tasks and states operate at different temporal scales. Hard-coding this hierarchy into the model architecture serves as a powerful guide for learning.

Conclusion and Future Work

The HSSM-agent demonstrates that explicit disentanglement of task and state beliefs is crucial for effective Meta-RL in partially observable environments. Future research may explore using Normalizing Flows to represent more complex, multi-modal beliefs or integrating semi-supervised signals, such as natural language instructions, to further ground the global latent variable.

Summary updated

BibTeX
@inproceedings{akuzawa2021estimating,
  author = {Kei Akuzawa and Yusuke Iwasawa and Yutaka Matsuo},
  title = {{Estimating Disentangled Belief about Hidden State and Hidden Task for Meta-RL}},
  booktitle = {L4DC},
  year = {2021},
}
Figure