亲和力不足:在专家混合模型中恢复自由能原理
Affinity Is Not Enough: Recovering the Free Energy Principle in Mixture-of-Experts
AI总结:
本文提出三种改进方法提升混合专家模型在领域转换时的性能,通过结合时间记忆和前瞻性路由机制,显著提高正确专家选择的概率,从而减少所需专家数量。
摘要:
稀疏混合专家(MoE)路由在领域转换时表现不佳,因为当前token属于一个分布,而下一个token属于另一个分布。在受控实验(4个专家,5个种子)中,标准亲和力路由在转换时仅将0.006±0.001的概率分配给正确专家。三种轻量级门控修改将此概率提升至0.748±0.002(124倍),将99%覆盖所需的专家数量从不可行降至小常数:时间记忆(beta),一个每专家的LIF膜电位,用于在token间积累路由上下文;精度加权门控(Pi),一个每专家的近期预测误差的逆方差,产生31倍的可靠与不可靠专家对比;以及前瞻性路由,一个基于beta-积累隐藏状态的下一状态预测器。这些机制源于Friston的自由能原理,并利用来自脉冲神经网络的LIF动态。对所有2^3子集的消融研究揭示出一个超加性的beta x Ant相互作用:前瞻性路由单独无效果(+0.000±0.001);beta单独产生适度增益(+0.295±0.013);结合它们关闭了75%的Oracle差距(+0.741±0.002,超过总和0.446±0.014)。这具有结构性:无状态预测器无法检测接近的转换,因为预转换token与领域内token在分布上几乎相同。在字符级MoE语言模型(5个种子)中,beta路由将转换步BPC从6.56±0.01(标准)降至4.01±0.15(beta-MoE);beta + Ant门控在该领域出现于输入之前将正确领域专家的概率提升至0.86±0.02,而标准MoE为0.42±0.12。参考实现(约200行每个):https://github.com/russellwmy/affinity-is-not-enough
英文摘要:
Sparse MoE routing fails at domain transitions, where the current token belongs to one distribution and the next to another. In a controlled experiment (4 experts, 5 seeds), standard affinity routing assigns only 0.006 +/- 0.001 probability to the correct expert at the transition. Three lightweight gate modifications raise this to 0.748 +/- 0.002 (124x), cutting experts needed for 99% coverage from infeasible to a small constant: temporal memory (beta), a per-expert LIF membrane potential accumulating routing context across tokens; precision-weighted gating (Pi), a per-expert inverse variance of recent prediction error, yielding 31x contrast between reliable and unreliable experts; and anticipatory routing, a next-state predictor conditioned on the beta-accumulated hidden state. The mechanisms draw from Friston's Free Energy Principle and use LIF dynamics from spiking neural networks. An ablation across all 2^3 subsets reveals a super-additive beta x Ant interaction: anticipation alone gives nothing (+0.000 +/- 0.001); beta alone gives modest gain (+0.295 +/- 0.013); combined they close 75% of the oracle gap (+0.741 +/- 0.002, exceeding the sum by +0.446 +/- 0.014). This is structural: a stateless predictor cannot detect approaching transitions because pre-transition tokens are distributionally identical to within-domain tokens. In a character-level MoE LM (5 seeds), beta-routing reduces transition-step BPC from 6.56 +/- 0.01 (Standard) to 4.01 +/- 0.15 (beta-MoE); the beta + Ant gate places 0.86 +/- 0.02 probability on the correct domain expert before that domain appears in input, vs 0.42 +/- 0.12 for Standard MoE. Reference implementations (~200 lines each): https://github.com/russellwmy/affinity-is-not-enough
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。