NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning Task-Aware Abstract Representations for Meta-Reinforcement Learning

Louk van Remmerden, Zhao Yang, Shujian Yu, Mark Hoogendoorn, Vincent François-Lavet

Introduction

Meta-Reinforcement Learning (Meta-RL) aims to develop agents capable of rapid adaptation to new tasks by leveraging experience from a distribution of related environments. A common architectural choice involves a context encoder that processes recent history to produce a task-specific "context vector," which is then concatenated with the state as input to a policy. However, this separation often leads to a significant bottleneck: context encoders are notorious for overfitting to training environments, resulting in poor generalization on unseen, out-of-distribution (OOD) tasks.

The Overfitting Problem in Meta-RL

The primary challenge identified by researchers is the sensitivity of "context-conditioned" policies to encoder errors. When state and task context are treated as separate, concatenated entities, the agent's internal model can suffer from high entropy and ambiguity. If the encoder fails to perfectly distinguish a new environment's dynamics from the training set, the policy—which treats the context as a separate input—often collapses. This ambiguity makes it difficult for the agent to determine whether a change in observations is due to a change in state or a change in the underlying task dynamics.

EMERALD: Early Context Injection

To address this, the authors introduced EMERALD (Environment-aware Meta Encoding and Representation Abstraction for Latent Domains). The core innovation of EMERALD is the shift from late-stage concatenation to early context injection. Instead of keeping task and state information separate until the policy level, EMERALD "entangles" them within a four-part Abstract Representation Model (ARM).

Comparison of architectural approaches: Separate Task, RNN-based, and the proposed EMERALD framework. EMERALD integrates task information directly into the state abstraction process to create a task-aware representation x.

The Abstract Representation Model (ARM)

The ARM architecture consists of four primary components designed to resolve ambiguity before information reaches the policy:

  1. Task Encoder ($\phi$): An RNN that processes transition history ($h_{1 \to t}$) to infer the current task-encoding ($z$).
  2. Contextual State Encoder ($\psi$): This module takes the raw observation ($s$) and the task inference ($z$) to produce a single, augmented abstract state ($x$).
  3. Transition and Reward Predictors ($\tau, \rho$): These models operate entirely within the abstract space to ensure the representations are predictive of future dynamics and rewards.
  4. Regularization: To prevent the latent space from collapsing, a specific loss term enforces a minimum distance between different states, ensuring the encoder maintains a diverse representation.

By resolving task ambiguity early in the pipeline, the agent provides the policy with a clearer, lower-entropy signal, making the learning problem simpler and the resulting policy more robust to OOD variations.

Experimental Evaluation

The framework was evaluated on three major suites, focusing specifically on OOD generalization:

  • Extreme Classical Control: Modified versions of CartPole and Pendulum where physical properties like mass or pole length were varied far beyond the training range.
  • MuJoCo Physics: HalfCheetah (Volume and Direction) tasks, requiring adaptation to changes in robot body size or target direction.
  • Meta-World: The ML1 and ML10 benchmarks, involving complex robotic manipulation tasks such as opening doors and pressing buttons.

Key Results and Insights

  • OOD Dominance: In the "Extreme" HalfCheetah (Volume) test, EMERALD (using SAC) achieved a mean return of 3271.8, dwarfing the next best baseline, VariBAD, which scored 1424.9.
  • Theoretical Advantage: The authors provided a theoretical proof showing that task-aware representations have lower joint entropy than task-agnostic ones. Intuitively, knowing the task context (e.g., "high-gravity environment") makes the meaning of a specific observation much clearer to the agent.
  • Modularity: EMERALD is a representation layer rather than a standalone RL algorithm. It demonstrated remarkably stable performance when plugged into off-the-shelf algorithms like Soft Actor-Critic (SAC) and Proximal Policy Optimization (PPO).
  • Latent Space Visualization: Using PCA and t-SNE, the authors showed that EMERALD naturally clusters trajectories by task. Even when physical trajectories appear similar, the latent space keeps them distinct enough for the policy to adapt effectively.

Conclusion and Future Work

EMERALD offers a promising solution to the Meta-RL overfitting problem by rethinking the integration of task information. By creating task-aware abstract states, it enables agents to navigate complex, unseen environments with unprecedented stability. Future research may focus on automating the tuning of latent dimensionality and exploring the potential for "imagination-based" planning using the internal transition models developed within the EMERALD framework.

Summary updated

BibTeX
@article{remmerden2025learning,
  author = {Louk van Remmerden and Zhao Yang and Shujian Yu and Mark Hoogendoorn and Vincent François-Lavet},
  title = {{Learning Task-Aware Abstract Representations for Meta-Reinforcement Learning}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2025},
}
Figure