对比视觉任务中专家模型的性能与效率,发现稀疏专家模型更稳定但难提速。
Mixture-of-Experts Models in Vision: Routing, Optimization, and Generalization
- 用路由机制让图像分类模型选择性激活专家子网络
- 稀疏和软性专家模型准确率略高于全连接模型,且专家使用均衡
- 虽曲率指标不同,但三类模型泛化能力相近,推理速度未提升
混合专家(MoE)架构通过将输入路由至多个专家子网络实现条件计算,常用于大规模语言模型的扩展。本文在图像分类任务中研究MoE行为,关注预测性能、专家利用率和泛化能力。我们在CIFAR10数据集上比较了密集模型、SoftMoE与SparseMoE分类头,在相同模型容量下,两种MoE变体均取得略高的验证准确率,且通过正则化保持专家使用均衡,避免专家坍缩。为分析泛化性,我们计算收敛时的损失海森矩阵尖锐度指标(包括最大特征值和迹),分别在训练和测试数据上评估。结果显示,SoftMoE具有更高的尖锐度,而密集模型与SparseMoE处于相似的曲率区间,尽管三者泛化性能相当。互补的损失表面扰动分析揭示了密集模型与MoE模型在有限参数扰动下的非局部行为差异,有助于理解曲率测量但不直接解释验证精度。此外,我们评估了实际推理效率,发现在此规模下,简单实现的条件路由并未带来推理速度提升,凸显稀疏MoE理论与实际效率之间的差距。
原文摘要 · Abstract (English)
Mixture-of-Experts (MoE) architectures enable conditional computation by routing inputs to multiple expert subnetworks and are often motivated as a mechanism for scaling large language models. In this project, we instead study MoE behavior in an image classification setting, focusing on predictive performance, expert utilization, and generalization. We compare dense, SoftMoE, and SparseMoE classifier heads on the CIFAR10 dataset under comparable model capacity. Both MoE variants achieve slightly higher validation accuracy than the dense baseline while maintaining balanced expert utilization through regularization, avoiding expert collapse. To analyze generalization, we compute Hessian-based sharpness metrics at convergence, including the largest eigenvalue and trace of the loss Hessian, evaluated on both training and test data. We find that SoftMoE exhibits higher sharpness by these metrics, while Dense and SparseMoE lie in a similar curvature regime, despite all models achieving comparable generalization performance. Complementary loss surface perturbation analyses reveal qualitative differences in non-local behavior under finite parameter perturbations between dense and MoE models, which help contextualize curvature-based measurements without directly explaining validation accuracy. We further evaluate empirical inference efficiency and show that naively implemented conditional routing does not yield inference speedups on modern hardware at this scale, highlighting the gap between theoretical and realized efficiency in sparse MoE models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。