Mixture-of-Experts Models in Vision: Routing, Optimization, and Generalization
Adam Rokah, Daniel Veress, Caleb Caulk, Sourav Sharan
TL;DR
This study investigates Mixture-of-Experts (MoE) models in image classification by comparing Dense, SoftMoE, and SparseMoE heads on CIFAR-10 with a shared ResNet-18 backbone under matched capacity. It combines predictive evaluations with Hessian-based loss-landscape analyses and loss-surface perturbations to understand generalization beyond validation accuracy, finding that MoEs generalize as well as dense baselines, with SoftMoE exhibiting higher curvature. While MoE variants can yield modest validation gains, the theoretical inference savings from conditional routing do not translate into practical speedups at moderate scales due to routing overhead. The work highlights the gap between theoretical efficiency and practical performance for sparse MoEs and suggests larger benefits in heterogeneous data settings where specialization reduces interference more substantially.
Abstract
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.
