动态重连专家:混合专家模型中用于更好在线自适应的连续路由重定向
Rewiring Experts on the Fly:Continuous Rerouting for Better Online Adaptation in Mixture-of-Expert models
AI总结:
提出一种无数据、在线的测试时框架,通过自监督连续调整MoE路由决策,实现高效自适应,在推理任务上提升性能并兼容现有扩展技术。
摘要:
混合专家(MoE)模型通过稀疏专家激活实现高效扩展,但在部署过程中常因分布偏移而遭受次优路由决策的影响。虽然现有的测试时自适应方法可能解决这些问题,但它们主要关注密集模型,并且需要访问外部数据,限制了它们在MoE架构中的实际适用性。然而,我们发现,不依赖参考数据,我们可以仅基于输入上下文即时优化MoE专家选择。因此,我们提出了一种无数据、在线的测试时框架,在文本生成过程中持续调整MoE路由决策,无需外部监督或数据。我们的方法在两个阶段之间循环:在预填充阶段以及之后的定期间隔中,我们基于已生成的序列通过自监督优化模型的路由决策。然后,我们正常生成文本,保持修改后的路由器直到下一次自适应。我们通过轻量级加法向量实现这一点,这些向量仅更新选定层中的路由器logits,在保持计算效率的同时防止过度自适应。实验结果表明,在具有挑战性的推理任务上取得了持续的性能提升,同时保持了对上下文偏移的鲁棒性。例如,我们的方法在OLMoE上的HumanEval中实现了5.5%的提升。此外,由于其即插即用的特性,我们的方法自然地补充了现有的测试时扩展技术,例如,在与DeepSeek-V2-Lite上的自一致性结合时,实现了6%的平均增益。
英文摘要:
Mixture-of-Experts (MoE) models achieve efficient scaling through sparse expert activation, but often suffer from suboptimal routing decisions due to distribution shifts in deployment. While existing test-time adaptation methods could potentially address these issues, they primarily focus on dense models and require access to external data, limiting their practical applicability to MoE architectures. However, we find that, instead of relying on reference data, we can optimize MoE expert selection on-the-fly based only on input context. As such, we propose \textit{a data-free, online test-time framework} that continuously adapts MoE routing decisions during text generation without external supervision or data. Our method cycles between two phases: During the prefill stage, and later in regular intervals, we optimize the routing decisions of the model using self-supervision based on the already generated sequence. Then, we generate text as normal, maintaining the modified router until the next adaption. We implement this through lightweight additive vectors that only update router logits in selected layers, maintaining computational efficiency while preventing over-adaptation. The experimental results show consistent performance gains on challenging reasoning tasks while maintaining robustness to context shifts. For example, our method achieves a 5.5\% improvement on HumanEval with OLMoE. Furthermore, owing to its plug-and-play property, our method naturally complements existing test-time scaling techniques, e.g., achieving 6\% average gains when incorporated with self-consistency on DeepSeek-V2-Lite.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。