Learning Expressive Task Embeddings and Sample-Efficient Exploration for Context Shift Reduction in Offline Meta-Reinforcement Environment

Haoyu Wang, Xiaoyu Tan, Tianliang Yao, Zhijun Fang, Peng Qi, Xihe QiuIEEE Transactions on Cognitive and Developmental Systems 2025 · DOI

Abstract

Context shift reduction for offline meta-reinforcement learning (CSRO) has made notable progress in addressing the context shift problem arising from the distribution mismatch between training and testing data. However, limitations remain in capturing rich task representations and efficiently exploring them during meta-testing. We propose two key enhancements: First, replacing the simple mean context encoding with an expressive attention-based mechanism to selectively focus on relevant transitions and learn intricate task representations for improved inference. Second, introducing an adaptive weighted prior exploration strategy that constructs a belief over possible tasks and iteratively refines this belief by weighting simulated trajectory rollouts under each hypothesis, enabling sample-efficient adaptation. Unlike random exploration, this strategy accelerates task representation updates by leveraging trajectory simulations under each task hypothesis. Through comprehensive experiments on diverse robotic control benchmarks with varying rewards and dynamics, we demonstrate significant performance gains over the original CSRO and surpass prior offline meta-RL methods. Our enhanced model highlights the importance of principled representation learning and exploration techniques in mitigating context shifts using only offline data while minimizing sample complexity during fast adaptation to new tasks. Our code is available at <uri xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">https://anonymous.4open.science/r/metaCSRL-A9B2</uri>.
BibTeX
@article{wang2025learning,
  author = {Haoyu Wang and Xiaoyu Tan and Tianliang Yao and Zhijun Fang and Peng Qi and Xihe Qiu},
  title = {{Learning Expressive Task Embeddings and Sample-Efficient Exploration for Context Shift Reduction in Offline Meta-Reinforcement Environment}},
  journal = {IEEE Transactions on Cognitive and Developmental Systems},
  year = {2025},
  doi = {10.1109/tcds.2025.3627812},
}

Loading related content...

Figure