Introduction
Offline Meta-Reinforcement Learning (OMRL) aims to leverage static datasets from multiple tasks to learn a meta-policy capable of rapid adaptation to new tasks using limited "context" data. A significant challenge in OMRL is context shift: the distribution mismatch between the behavior policies used to collect training data and the agent's own policy during evaluation. When a context encoder overfits to the specific style of the behavior policy rather than the task's underlying dynamics, generalization suffers—particularly in out-of-distribution (OOD) scenarios.
Methodology: Decoupling "How" from "What"
The proposed method, Entropy Regularized Task Representation Learning (ER-TRL), addresses context shift by making task representations independent of the behavior policy.
Mutual Information Minimization
ER-TRL minimizes the mutual information between the learned task representation ($z$) and the behavior policy ($\pi_\beta$). By forcing the encoder to "forget" how the data was collected, it must focus on identifying the task's intrinsic properties. The authors demonstrate that minimizing this mutual information is equivalent to maximizing the entropy of a task-conditioned "meta-behavior policy."
Implementation via GAN
Since the true behavior policy is often unknown in offline settings, ER-TRL employs a Generative Adversarial Network (GAN). The generator estimates the behavior policy by mimicking actions in the dataset given a state and task embedding. The context encoder is then regularized to maximize the entropy of these generated actions while maintaining task discriminability through a distance-based loss (FOCAL).
Experimental Results
ER-TRL was evaluated on MuJoCo benchmarks, including locomotion (Cheetah-Vel, Ant-Goal) and physics variations (Hopper-Mass, Walker-Friction).
Representation Quality
Visualizing the latent space using t-SNE reveals that ER-TRL produces significantly more distinct and well-separated task clusters compared to baselines like CSRO or UNICORN.
Robustness and Generalization
ER-TRL consistently outperforms state-of-the-art methods in OOD tasks. A key finding is the relationship between policy diversity in the training data and the performance gain. When tasks require highly distinct expert behaviors (measured by Wasserstein distance), the benefit of ER-TRL's policy-decoupling is most pronounced.
Furthermore, ER-TRL demonstrates superior robustness when context is collected online. While end-to-end methods often fail due to the shift from offline behavior to online execution, ER-TRL's representations remain stable. Results show it outperforming baselines in 7 out of 8 environments for OOD tasks.
Conclusion
ER-TRL provides a robust framework for OMRL by explicitly regularizing task representations to be policy-agnostic. By maximizing the entropy of task-conditioned behavior, the method ensures that the learned embeddings capture the essence of the task rather than the artifacts of data collection, leading to state-of-the-art performance in both ID and OOD settings.
Summary updated