Mixture-of-Experts Serving: A Comprehensive Summary
Summary (Overview)
- New formal model: Introduces the Dynamic and Static MoE Serving problems, where a serving system must dynamically allocate GPUs to experts in a Mixture-of-Experts language model, balancing latency cost against reconfiguration overhead.
- Online algorithm: Presents a polynomial-time -competitive online algorithm for Dynamic MoE Serving, where is the number of extra GPUs beyond one per expert.
- Matching lower bound: Proves an barrier for the online dual problem, showing the competitive ratio is tight for the primal-dual analysis framework.
- Offline results: Gives a polynomial-time constant-factor approximation for Dynamic MoE Serving, a 2-approximation for the Static variant with an integrality gap of , and proves NP-hardness with no FPTAS under ETH.
- Technical contributions: Combines online primal-dual methods with Fenchel duality and KL-divergence regularization, exploiting smoothness of the latency function to improve the competitive ratio from to .
Introduction and Theoretical Foundation
Background
Dense language models scale by increasing parameters per token, tying computation to capacity. Mixture-of-Experts (MoE) models break this tie by maintaining multiple expert networks but routing each token to only a few experts. This architecture underlies prominent models including DeepSeek-V3, Mixtral, and Gemini 3 Pro. For instance, DeepSeek-V3 activates only 37 billion of its 671 billion parameters per token.
The MoE Serving Problem
Consider experts deployed on GPUs. At each step , the system observes the workload routed to each expert and decides how many GPUs to assign to each. The objective minimizes the sum of two costs:
- Latency cost: The time for all experts to finish their workloads:
where is the number of extra GPUs assigned to expert (beyond the mandatory one), subject to .
- Reconfiguration cost: The distance between consecutive configurations:
The total objective over horizon is:
Key Theoretical Properties
The latency function satisfies three crucial properties (Lemma 3.3):
-
Conjugate Pair: For any :
-
Smoothness: For any , if for all , then:
(Doubling GPUs at best halves the cost.)
- Sublinearity of conjugate: For any :
where is the offset Fenchel conjugate.
Methodology
Convex Program Relaxation
The dynamic problem is relaxed to a convex program (PRIMAL):
With the offset Fenchel dual (DUAL):
Weak duality gives .
Regularized Greedy Algorithm (Online)
At each step , select:
where the KL divergence is:
The regularization parameter is , chosen to optimize the competitive ratio. The dual variables are scaled by to restore dual feasibility:
Lazy Threshold Rounding
To convert fractional solutions to integral ones, the paper uses a polynomial-time rounding scheme:
- Sample thresholds independently and uniformly for each expert .
- Compute lower bounds .
- Choose satisfying with .
Static Model Rounding
For the static problem, the algorithm solves the convex relaxation, rounds down (), and allocates the remaining GPUs arbitrarily.
Empirical Validation / Results
Online Results (Theorem 4.1)
The main results for Dynamic MoE Serving:
- Polynomial-time -competitive online algorithm
- Polynomial-time O(1)-approximation algorithm (offline)
The competitive ratio derivation proceeds as follows:
- Regularized Greedy ensures reconfiguration cost is bounded by latency cost: (Lemma 4.3).
- The dual objective satisfies: .
- Combining with weak duality: .
- With , the competitive ratio is .
The rounding preserves both costs up to constant factors (Lemma 4.4):
- (latency cost)
- (reconfiguration cost)
Online Dual Hardness (Theorem 5.1)
No online algorithm for the dual problem achieves competitive ratio better than .
The proof constructs a single-phase instance where only one expert receives workload for steps. The key gadget functions simplify to:
The stopping time is the first step where , which is guaranteed to exist (Lemma 5.2). The offline strategy spreads the β-budget evenly: , achieving dual value at least . Repeating over phases with cyclic expert requests yields the lower bound.
Static Model Results
| Result | Value |
|---|---|
| Approximation ratio | 2 (Theorem 6.1) |
| Integrality gap | (Theorem 6.2) |
| Hardness | NP-hard; No FPTAS under ETH (Theorem 6.4) |
The integrality gap instance uses experts, GPUs, step with uniform workload . The fractional optimum is while integral optimum is 1.
Hardness reduction: From Densest k-Subgraph (DkS), constructing experts as vertices, GPUs, and one time step per edge with workload for endpoints and 1 otherwise. The objective becomes , exactly equivalent to maximizing induced edges.
Theoretical and Practical Implications
Theoretical Contributions
-
New problem formulation: Provides the first formal theoretical model for MoE serving, capturing the fundamental trade-off between latency and reconfiguration costs.
-
Improved competitive ratio: The ratio improves on the standard achieved by naive regularized greedy approaches, exploiting the specific structure (smoothness) of the latency cost function.
-
Tight dual barrier: The matching lower bound for the dual problem shows the analysis framework is tight, though the primal gap remains open.
-
Offline complexity: Establishes that the static problem is NP-hard with no FPTAS under ETH, while providing near-optimal approximation algorithms.
Practical Implications
- DeepSeek-V3 deployment context: The paper directly addresses the practical challenge of periodically recomputing expert placement (currently done every ~10 minutes with simple heuristics), providing principled alternatives with provable guarantees.
- Dynamic reallocation: Demonstrates that dynamic reconfiguration can be beneficial when done carefully, with the online algorithm automatically balancing latency versus overhead.
- Static deployment: For systems where reconfiguration is prohibitively expensive, the 2-approximation provides a simple, near-optimal static placement strategy.
Key Technical Insights
-
Smoothness exploitation: The observation that when enables both the improved competitive ratio and the efficient rounding scheme.
-
Sublinearity of the conjugate: The property is crucial for the dual analysis, allowing the scaled dual variables to maintain value.
-
Hardy's inequality: Used to prove the online dual lower bound, showing that early overcommitment forces a -factor loss.
Conclusion
This paper initiates the principled study of Mixture-of-Experts serving through a formal optimization lens. The main contributions are:
- A formal model capturing the latency-reconfiguration trade-off in MoE serving.
- An -competitive online algorithm using regularized greedy with KL divergence, improved from the standard by exploiting function smoothness.
- A matching barrier for the online dual problem, showing the analysis is tight.
- Offline algorithms: constant-factor approximation for dynamic, 2-approximation for static, with matching integrality gap.
- Hardness results: NP-hardness and no FPTAS under ETH for the static problem.
Future Directions
- Closing the primal gap: Whether the competitive ratio for the primal problem can be improved or matched by a lower bound remains open.
- Practical validation: Empirical evaluation of the algorithms on real MoE serving workloads.
- Extensions: Incorporating additional constraints such as memory limits, heterogeneous GPU types, or communication costs between GPUs.
- Tighter offline bounds: Improving the constant factor in the offline approximation or closing the gap between the 2-approximation and the integrality gap for the static problem.
Related papers
- Distractor-Aware Truncation: Disentangling Context-Length Effects from Signal Loss in Long-Context LLM Benchmarks
Distractor-aware truncation reveals that naive middle-removal conflates signal loss with distractor reduction, producing false "shorter context helps" conclusions across all tested models and benchmarks.
- Spectral Scaling Laws of Muon
Muon momentum singular value quantiles stabilize during training and follow layer-dependent power laws in model size, making uniform Newton-Schulz configurations suboptimal at scale.
- Janus: An Algorithm-Evaluator Co-Evolution Framework for LLM-Driven Discovery under Expensive Evaluation Budgets
Janus co-evolves target programs and LLM-generated proxy evaluators, achieving 59.1% fewer real evaluations while maintaining or improving performance across five expensive scientific domains.