Skip to main content
QUICK REVIEW

[Paper Review] Auxiliary-Loss-Free Load Balancing Strategy for Mixture-of-Experts

Lean Wang, Huazuo Gao|arXiv (Cornell University)|Aug 28, 2024
Distributed Sensor Networks and Detection AlgorithmsComputer Science6 citations
TL;DR

The paper introduces Loss-Free Balancing, an auxiliary-loss-free method to control MoE load balance by dynamically biasing expert routing scores, improving perplexity and load balance without interfering gradients.

ABSTRACT

For Mixture-of-Experts (MoE) models, an unbalanced expert load will lead to routing collapse or increased computational overhead. Existing methods commonly employ an auxiliary loss to encourage load balance, but a large auxiliary loss will introduce non-negligible interference gradients into training and thus impair the model performance. In order to control load balance while not producing undesired gradients during training, we propose Loss-Free Balancing, featured by an auxiliary-loss-free load balancing strategy. To be specific, before the top-K routing decision, Loss-Free Balancing will first apply an expert-wise bias to the routing scores of each expert. By dynamically updating the bias of each expert according to its recent load, Loss-Free Balancing can consistently maintain a balanced distribution of expert load. In addition, since Loss-Free Balancing does not produce any interference gradients, it also elevates the upper bound of model performance gained from MoE training. We validate the performance of Loss-Free Balancing on MoE models with up to 3B parameters trained on up to 200B tokens. Experimental results show that Loss-Free Balancing achieves both better performance and better load balance compared with traditional auxiliary-loss-controlled load balancing strategies.

Motivation & Objective

  • Motivate the need for balanced expert routing in MoE to avoid routing collapse and excessive computation.
  • Propose Loss-Free Balancing to control load balance without introducing interference gradients.
  • Demonstrate that the method yields better validation perplexity and load balance than auxiliary-loss-based methods on 1B and 3B MoE models.
  • Show compatibility with expert parallelism and analyze theoretical leakage compared to alternative methods.

Proposed method

  • Introduce expert-wise biases added to gating scores prior to top-K routing.
  • Iteratively update each bias b_i based on observed expert load to depress heavy-load experts and elevate light-load ones.
  • Use Algorithm 1 to update biases after each training batch without adding gradients to the main objective.
  • Compare Loss-Free Balancing with auxiliary-loss-controlled load balancing and Expert Choice on benchmark MoE setups.
  • Evaluate using validation perplexity and a global load-balance metric MaxVio (global and batch variants).
  • Discuss compatibility with expert parallelism and analyze future-token leakage concerns.

Experimental results

Research questions

  • RQ1Does auxiliary-loss-free biasing of gating scores yield better load balance than auxiliary losses?
  • RQ2Can Loss-Free Balancing improve both model performance (perplexity) and load balance across 1B and 3B MoE models?
  • RQ3Is the method compatible with expert parallelism and free from interference gradients?
  • RQ4How does Loss-Free Balancing compare to Expert Choice in terms of future token leakage and training safety?

Key findings

  • Loss-Free Balancing achieves lower validation perplexity than auxiliary-loss-controlled methods for both 1B and 3B models.
  • Global MaxVio load-balance metric is substantially lower with Loss-Free Balancing (0.04) than with auxiliary loss (0.72 for 1B; 0.52 for 3B).
  • Loss-Free Balancing maintains better load balance throughout training as shown by a persistent advantage in MaxVio_batch curves.
  • The method remains compatible with expert parallelism and shows improved balance as computation-batch size grows.
  • Additive expert biases outperform multiplicative biases in balancing and performance.
  • Softmax gate experiments show Loss-Free Balancing yields better balance and slightly better perplexity than auxiliary loss in that setup.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.