Tight Clusters Make Specialized Experts

Stefan Nielsen, Rachel S.y. Teo, Laziz Abdullaev, Tan Minh Nguyen

TL;DR

This paper introduces the Adaptive Clustering (AC) router for Sparse Mixture-of-Experts (MoE) models. By transforming the input feature space to better reveal latent clusters, the AC router enables faster convergence, improved robustness to data corruption, and better overall performance by facilitating more specialized experts.

What Problem Does This Paper Address?

Sparse Mixture-of-Experts (MoE) models are a popular approach to scaling up neural network capacity while keeping computational costs manageable. The key component of an MoE model is the "router," which decides which "expert" (a specialized sub-network) should process each input token. The router learns to group input tokens into clusters, directing similar tokens to the same expert. However, in high-dimensional spaces, these latent clusters can be difficult to identify. This difficulty leads to several problems: slow convergence during training, susceptibility to noisy or corrupted data (which can lead tokens to be misrouted), and ultimately, suboptimal performance because experts aren't specialized enough. The authors aim to improve the router's ability to identify and leverage these latent clusters for better MoE performance.

Methods

The core innovation is the Adaptive Clustering (AC) router. Instead of directly using the raw input features for routing, the AC router adaptively transforms the feature space for each token. This transformation is guided by a clustering optimization perspective. The authors derive optimal feature weights that upweight features contributing to tight clusters and downweight features that lead to dispersed clusters within each expert's domain. This effectively "spheres" the feature space to make latent clusters more discernible.

Specifically, they formulate a feature-weighted clustering optimization problem. The solution to this problem provides cluster-dependent feature weights. These weights are then used to create a diagonal transformation matrix for each expert. When routing a token, its features are scaled by the transformation matrix corresponding to its most likely expert. This process is performed without introducing any new learnable parameters, making it computationally efficient.

Datasets

The paper evaluates their proposed method on several standard datasets:

  • Language Modeling:
    • WikiText-103
    • EnWik-8
  • Classification:
    • Stanford Sentiment Treebank-2 (SST2)
    • Stanford Sentiment Treebank-5 (SST5)
    • Banking-77 (B77)
    • ImageNet-1K
    • ImageNet-A/O/R (adversarially filtered and artistic renditions of ImageNet classes)

Key Insights and Ideas

  • Feature Space Transformation is Key: The core insight is that the raw feature space might not be optimal for identifying latent clusters. By adaptively transforming the feature space based on cluster structure, the router can more effectively match tokens to experts.
  • Tight Clusters = Specialized Experts: The paper posits that well-separated, "tight" clusters in the feature space directly lead to more specialized and effective experts. The AC router aims to create these tight clusters.
  • No New Learnable Parameters: A significant advantage is that the AC router achieves its improvements without adding any new trainable parameters, making it easy to integrate into existing MoE architectures.
  • Robustness to Data Corruption: By making clusters more distinct, the AC router inherently improves robustness. Corrupted data points are less likely to be misclassified into the wrong cluster.
  • Faster Convergence: The adaptive transformation is shown to improve the conditioning of the loss landscape, leading to faster and more stable training convergence.

Key Results

The AC router demonstrates significant improvements across various tasks and backbones:

  • Language Modeling: Achieved faster convergence on WikiText-103 and EnWik-8, with notable improvements in perplexity (e.g., ~1 PPL improvement on Switch Transformer).
  • Image Classification: Showed robust performance gains on ImageNet, especially under adversarial attacks (PGD, FGSM, SPSA), with top-1 accuracy improvements of up to 10% at higher perturbation budgets.
  • Robustness: Outperformed baseline models on corrupted and out-of-distribution ImageNet datasets (ImageNet-A/O/R), with gains of up to 5.8% in the GLaM backbone.
  • Efficiency: The AC router introduces negligible computational overhead and no significant increase in memory usage, making it highly practical.
  • Cluster Visualization: Visualizations confirmed that ACMoE learns much clearer and better-distinguished expert clusters compared to standard routers.

Limitations and Future Work

  • Dependency on Previous Layer: The current AC router implementation requires expert assignments from the previous layer to compute its transformation. This restricts its application to layers after the first one and implies that embedding sizes should remain consistent between adjacent MoE layers.
  • Future Work: The authors suggest investigating improved methods for estimating latent cluster memberships without relying on previous layers, which would allow for more flexible application. They also mention exploring other robust measures of spread (like interquartile range) for dispersion calculation and integrating AC routing with dynamic routing strategies.

Summary updated

BibTeX
@inproceedings{nielsen2025tight,
  author = {Stefan Nielsen and Rachel S.Y. Teo and Laziz Abdullaev and Tan Minh Nguyen},
  title = {{Tight Clusters Make Specialized Experts}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=Pu3c0209cx},
}
Figure