用专家混合模型提升强化学习的上下文适应能力
Mixture-of-Experts Meets In-Context Reinforcement Learning
- 引入双路专家混合架构,分别处理输入令牌和任务多样性
- 在多个基准任务上显著优于基线方法,提升上下文学习效果
- 适合研究大模型强化学习、多任务决策系统的人参考
上下文强化学习(ICRL)通过提示条件实现强化学习智能体对下游任务的快速适应,但面临状态-动作-奖励数据的内在多模态性以及任务多样异构性两大挑战。为此,我们提出T2MIR(Token- and Task-wise MoE for In-context RL),将专家混合(MoE)架构引入基于Transformer的决策模型。T2MIR用两个并行层替代原前馈层:一个令牌级MoE捕捉跨模态输入令牌的差异化语义,另一个任务级MoE将不同任务路由至专用专家,缓解梯度冲突。为增强任务路由,我们设计对比学习方法,最大化任务与其路由器表征间的互信息,更精准捕获任务相关特征。两路输出拼接后输入下一层。大量实验表明,T2MIR显著提升了上下文学习能力,优于多种基线模型。该工作将MoE潜力带入ICRL领域,提供一种简单可扩展的架构改进,推动ICRL向语言与视觉社区的成果迈进。代码已开源。
原文摘要 · Abstract (English)
In-context reinforcement learning (ICRL) has emerged as a promising paradigm for adapting RL agents to downstream tasks through prompt conditioning. However, two notable challenges remain in fully harnessing in-context learning within RL domains: the intrinsic multi-modality of the state-action-reward data and the diverse, heterogeneous nature of decision tasks. To tackle these challenges, we propose T2MIR (Token- and Task-wise MoE for In-context RL), an innovative framework that introduces architectural advances of mixture-of-experts (MoE) into transformer-based decision models. T2MIR substitutes the feedforward layer with two parallel layers: a token-wise MoE that captures distinct semantics of input tokens across multiple modalities, and a task-wise MoE that routes diverse tasks to specialized experts for managing a broad task distribution with alleviated gradient conflicts. To enhance task-wise routing, we introduce a contrastive learning method that maximizes the mutual information between the task and its router representation, enabling more precise capture of task-relevant information. The outputs of two MoE components are concatenated and fed into the next layer. Comprehensive experiments show that T2MIR significantly facilitates in-context learning capacity and outperforms various types of baselines. We bring the potential and promise of MoE to ICRL, offering a simple and scalable architectural enhancement to advance ICRL one step closer toward achievements in language and vision communities. Our code is available at https://github.com/NJU-RL/T2MIR.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。