Abstract
Offline Meta-Reinforcement Learning (OMRL) enables agents to adapt to new tasks using static datasets. A significant challenge in OMRL is context distribution shift, where task encoders overfit to the behavior policies used for data collection rather than the underlying task dynamics. We propose Entropy Regularized Task Representation Learning (ER-TRL), a framework that decouples task representations from behavior policies by minimizing their mutual information. By employing a GAN-based approach to maximize the entropy of task-conditioned behavior, ER-TRL learns robust embeddings that generalize to out-of-distribution (OOD) tasks. Our experiments on MuJoCo benchmarks demonstrate that ER-TRL significantly outperforms existing state-of-the-art methods in both adaptation performance and task inference accuracy.
Introduction
In context-based OMRL, agents infer task identities from short transition histories to adapt their policies. However, these encoders often learn to recognize the "how" (the specific behavior policy) instead of the "what" (the task dynamics). When the agent's learned policy differs from the behavior policy at test time, the encoder fails due to context distribution shift. ER-TRL addresses this by forcing task representations to be independent of the behavior policy.
Methodology
The core of ER-TRL is the minimization of mutual information (MI) between the task representation $z$ and the behavior policy $\pi_\beta$. To achieve this efficiently, the authors maximize the entropy of the behavior policy conditioned on the task representation.
This is implemented using a Generative Adversarial Network (GAN) where a generator mimics the behavior policy and a discriminator distinguishes between real and generated actions. The context encoder is trained to maximize the generator's entropy, ensuring task embeddings do not leak behavioral quirks. This is combined with Distance Metric Learning (DML) to maintain task discriminability and built upon the Behavior Regularized Actor-Critic (BRAC) algorithm to handle standard offline RL distribution shifts.
Experimental Results
Performance and Generalization
ER-TRL was evaluated on MuJoCo benchmarks, including locomotion and physical property tasks, with a focus on out-of-distribution (OOD) generalization. As shown in the results below, ER-TRL consistently achieves higher normalized returns across various environments compared to baselines like CSRO, FOCAL, and UNICORN.
Specifically, in the Hopper-Mass OOD task, ER-TRL achieved a normalized return of 99.72, significantly outperforming the next best baseline, OfflinePEARL, which scored 84.13.
Latent Space Visualization
The robustness of the learned representations is further evidenced by t-SNE visualizations. ER-TRL produces distinct, well-separated clusters for different tasks, including OOD tasks, whereas baseline methods often result in overlapping or poorly defined task representations.
Task Inference Accuracy
Beyond control performance, ER-TRL's embeddings are more informative of the underlying task parameters. Linear regression and Support Vector Regression (SVR) models trained on these embeddings achieved lower prediction errors for true task parameters (e.g., target velocity or mass) compared to other representation learning techniques. This confirms that the learned representations capture essential task-specific information while remaining invariant to behavioral noise.
Conclusion
ER-TRL provides a theoretically grounded and effective solution to the context distribution shift problem in Offline Meta-RL. By leveraging entropy regularization via GANs, it successfully decouples task representations from behavior policies. This leads to superior generalization in OOD tasks and more interpretable latent spaces. Future work includes improving GAN training stability and extending the framework to high-dimensional visual inputs.
Summary updated