ATLAS NOVA My AtlasVelocer ↗

Technology · Machine learning

Mixture of experts

Neural network architecture

A mixture of experts is a neural network that does not apply the same parameters to every input.

Instead, a small controller called a gating network inspects each input and selects which of several sub-networks, the experts, should process it. The experts are ordinary learned modules, often feed-forward blocks; what makes the architecture distinctive is that only a few of them run for any given example, and which ones run changes from example to example.⁠[1]

Key facts
7xSwitch Transformer pre-training speedup over dense T5 models at equal compute, Fedus et al. 2021⁠[2]
90.35%ImageNet accuracy of the 15B-parameter Vision MoE, Riquelme et al. 2021⁠[3]
42.5%Training cost saved by DeepSeek-V2 versus DeepSeek 67B, DeepSeek-AI 2024⁠[4]
2 BLEUMargin by which randomly routed THOR beat Switch Transformer on translation, Zuo et al. 2021⁠[5]

Overview

Mixture of experts

A concrete picture helps. Imagine a language model reading a sentence one token at a time. At each layer, the gate scores the available experts for the current token, keeps the highest-scoring few, and combines their outputs. In one sparse model, each layer holds eight experts and a router picks two of them for every token, so the token is handled by a different pair at each step.⁠[6] The unchosen experts sit idle for that token. Nothing about the network is specialized by hand; the gate learns its preferences during training, and the experts learn alongside it.

Eight expert boxes form a vertical pool, with green paths through E2 and E6 leading to a weighted sum and four numbered explanation boxes.
A learned router selects two of eight experts for an illustrative token and combines their outputs with normalized weights. View full-size image.Sparse Activation Through Selected Experts by Atlas Nova. Illustration generated with AI for this article and checked against its text.

The consequence is a separation between how many parameters a model contains and how much computation each input costs. A model can hold an enormous number of parameters, spread across many experts, while each example touches only a small fraction of them, so the arithmetic per example stays roughly constant even as the model grows.⁠[2] This is the idea of sparse activation: capacity scales with the parameter count, but the work done per input does not. The 2017 sparsely-gated layer made the point concretely, placing up to thousands of feed-forward sub-networks inside a language model and reporting more than a thousandfold gain in model capacity with only minor losses in computational efficiency.⁠[1]

Why does that matter? A conventional network's ability to absorb information is bounded by its parameter count, and adding parameters the ordinary way adds computation in step, which makes further growth expensive. Routing offers a way around the trade: more parameters to store knowledge, without paying for all of them on every example. The gain is not merely hypothetical. In the Deep Mixture of Experts, stacking multiple sets of gating and experts exponentially increases the number of effective experts, because each input is associated with a combination of experts at each layer, while maintaining a modest model size.⁠[7]

Two cautions belong with the definition. First, the experts in a mixture are not usually assigned tidy topics by design; the gate decides, and what it decides is a matter of training, examined later. Second, a large total parameter count says little on its own about cost, since only the active parameters are used per input. The architecture is best understood as a bargain between storage and computation, and much of the work on it consists of managing the price of that bargain.

A mixture of experts trades memory for computation: many parameters stored, few used per input.

History

From hierarchical mixtures to sparse gating

The mixture of experts did not begin as a way to make language models huge. Its first well-known form was a tree. In a hierarchical mixture of experts, a top-level gate splits the input among a few branches, and each branch holds its own gate that splits the input again, down to the experts at the leaves. Both the gates and the experts are generalized linear models, a family of predictors that includes ordinary linear regression and logistic regression as special cases, and the whole tree is fitted by maximum likelihood, the principle of choosing parameters that make the observed data most probable.⁠[8] The fitting procedure was the EM algorithm (expectation-maximization), an iterative method that alternates between estimating which branch probably produced each data point and updating the parameters of the gates and experts to fit their assigned share. The same work also gave an on-line variant that updates parameters incrementally as data arrive, and tested the architecture on robot dynamics.⁠[8]

A two-level tree connects an input to four experts and a weighted prediction beside an E-step and M-step loop.
A probabilistic routing tree multiplies branch probabilities to obtain leaf mixture weights. An adjacent loop shows expectation-maximization fitting. View full-size image.Hierarchical Routing and EM Fitting by Atlas Nova. Illustration generated with AI for this article and checked against its text.

The tree shape matters because it makes the division of labour explicit. A single gate choosing among many experts must get the choice right in one step; a hierarchy lets the model make a coarse decision first and refine it afterward, so each expert only has to cover a smaller region of the input space. That structure also invited statistical treatment. A Bayesian treatment of mixtures-of-experts and hierarchical mixtures-of-experts models, applied to recognizing vowels spoken by multiple speakers, used Markov chain Monte Carlo to obtain samples from the posterior distribution of the parameters rather than a single point estimate, which provided the opportunity to assess the degree of certainty of the model in its classification predictions; on the vowel task it showed good classification performance. Speech was an early application, motivated by context dependencies in classifying acoustic waveforms as speech events.⁠[9]

The change came from combining the old idea with a new constraint: keep many experts, but run only a few per example. The 2017 sparsely-gated layer did this inside a language model, placing up to thousands of feed-forward sub-networks between stacked recurrent layers and letting a trainable gate pick a sparse combination of them for each example. The authors described the result as finally realizing the promise of conditional computation, reporting more than a thousandfold gain in model capacity with only minor losses in computational efficiency, and better results than the previous state of the art on language modeling and translation benchmarks at lower computational cost.⁠[1]

Scale brought its own friction. A gate that must choose among thousands of experts, and a training procedure that must keep the load spread across them, add complexity and communication overhead, and early sparse models were prone to training instability. The Switch Transformer addressed this by simplifying the MoE routing algorithm and adding training techniques to steady the process; models based off T5-Base and T5-Large obtained up to 7x increases in pre-training speed with the same computational resources, and the approach extended to pre-training up to trillion parameter models.⁠[2] Simplifying the choice, it turned out, made the whole arrangement easier to train and to run.

The arc from the 1994 tree to the 2017 layer and the 2021 simplification is therefore not a change of principle but a change of scale and of engineering priorities. The early work established that a gate plus a set of specialized sub-models can be trained jointly by likelihood; the later work asked what happens when the pool of experts is enormous and the gate must be cheap, stable, and fast. How the gate actually scores and selects experts is taken up in the next section.

How it works

The gating network and the experts

A mixture of experts has two parts, and the division of labour between them is the whole design. The experts are a pool of sub-networks, each with its own parameters, each capable of mapping an input to an output on its own. The gating network, sometimes called the router, is a small learned module that reads the input and decides which experts should handle it. Neither part is fixed in advance: the gate's preferences and the experts' behaviour are learned together, so that the pool gradually divides the work among itself.⁠[1]

The gate's job is to turn an input into a set of scores, one per expert, and then to keep only the best few. In the sparsely-gated layer that established the modern form, a trainable gating network determines a sparse combination of experts to use for each example, and the layer may hold up to thousands of feed-forward sub-networks.⁠[1] The word sparse is doing real work here. A sparse gate commits to a handful, so the arithmetic per example stays small no matter how large the pool grows.

Top-k selection is the usual way to make that commitment: the gate ranks the experts by score and passes the input to the k highest, where k is a small number chosen when the model is built. The selected experts each produce an output, and the gate's scores for those experts become weights that set how much each output contributes to the combined result. In one widely used arrangement, each layer holds eight experts and a router selects two of them for every token, combining their outputs; the selected experts can be different at each timestep.⁠[6]

A subtlety sits inside that combination step. The gate does not merely pick experts; it also decides how loudly each one speaks. If one expert's score dominates, its output largely determines the result and the others contribute little, which is why the shape of the gate's scoring function matters as much as the selection rule. In some mixture-of-experts models the gate network is based on softmax functions, which turn a list of numbers into positive weights summing to one.⁠[10] A gate whose scores collapse onto a single expert wastes the rest of the pool, and later sections take up the training difficulties that follow from that.

Selection rules are not all alike, and the differences are practical rather than cosmetic. The straightforward top-k gate has a sharp edge: a small change in an expert's score can flip it in or out of the chosen set, and that discontinuity complicates training by gradient methods, which assume the output shifts smoothly when the parameters shift. One response replaces the hard cutoff with a smoother gate. DSelect-k is a continuously differentiable and sparse gate built on a binary encoding formulation, trainable by first-order methods such as stochastic gradient descent and offering explicit control over how many experts are selected; on a large-scale real-world recommender system it improved predictive performance by over 22 percent compared with top-k.⁠[11] The lesson is that the gate is not a trivial switchboard. Its smoothness and its selection behaviour feed directly into whether the model trains well.

The experts themselves are deliberately ordinary. In the sparsely-gated layer they are feed-forward sub-networks, the same kind of block a dense network would contain, replicated many times over with separate parameters.⁠[1] The next question, taken up shortly, is what happens when such layers are stacked, so that each input passes through a fresh gate and a fresh set of experts at every level.

The gate decides who works; the experts do the work; the scores decide how much each contributes.

The gate chooses the experts and the experts do the work.

Stacking and combining experts

A single mixture-of-experts layer makes one choice per input. A deep network makes many, because the layer can be repeated: each block of the network gets its own gate and its own pool of experts, and an input passes through a fresh selection at every level. The deep mixture of experts does exactly this, stacking several sets of gating networks and experts so that each input is associated with a combination of experts at each layer rather than a single choice at one place.⁠[7]

The arithmetic of that arrangement is the point. If a model has two layers and each layer offers a handful of experts, the number of distinct paths an input can take is not the sum of the two pools but their product, since every choice at the first layer can be paired with every choice at the second. Stacking therefore multiplies the effective number of experts while the model itself stays modest in size, because the pools are not enlarged, only composed.⁠[7] A model with a few experts per layer can behave like one with a combinatorial variety of specialists, and the cost per input remains that of running a few experts per layer.

What the layers learn to do with that variety is not arbitrary. On a version of the MNIST digit dataset in which images were randomly translated, the deep mixture developed a division of labour on its own: the first layer's experts became location-dependent, responding to where in the image something appeared, while the second layer's experts became class-specific, responding to what the digit was. The same model, applied to a dataset of speech monophones, used a wide range of the available expert combinations rather than settling on a few.⁠[7] The finding is worth pausing on because it shows the composition doing real work: the lower layer handles a nuisance factor, position, and the upper layer handles the category, so neither pool has to solve the whole problem alone.

This is the flat, wide version of an older idea. The hierarchical mixture of experts arranged its gates as a tree, with a top-level gate splitting the input among branches and each branch splitting it again, so that a coarse decision was refined step by step down to the leaves.⁠[8] Stacking layers of gates and experts achieves something similar without an explicit tree: the sequence of selections through the network plays the role of the path from root to leaf, and the combination at each layer plays the role of the branch. The tree made the division of labour visible in its structure; the stacked model leaves it to training to decide which layer specializes in what.

Two consequences follow for how such models are built and judged. The first is that depth and width trade against each other: adding a layer of gates buys combinations more cheaply than enlarging a single pool, but it also adds another routing decision that can go wrong. The second is that a model's total parameter count says little about the variety it can express, since the combinations, not the raw count, are what the input actually draws on. How well those combinations are used in practice, and where routing goes astray, is taken up under routing behaviour and specialization.

Stacked gates turn a few experts per layer into a combinatorial range of specialists, at the cost of one more decision per layer.

Stacking composes pools instead of enlarging them.

Uses

Scaling language and vision models

The architecture's early promise was demonstrated on language. The sparsely-gated layer was applied to language modeling and machine translation, tasks where the capacity to absorb knowledge from large training corpora is critical, and the resulting models, with a mixture of experts holding up to 137 billion parameters placed between stacked recurrent layers, achieved significantly better results than the previous state of the art at lower computational cost.⁠[1] The choice of task was not incidental. Language is the setting where a model's appetite for stored knowledge is largest, and therefore where the separation between stored parameters and per-example computation pays the most.

Dense and sparse layer diagrams appear beside parameter bars and three numbered notes, with two of eight experts highlighted.
Dense and sparse layers separate the meaning of model size. The sparse example stores about 47 billion parameters while using about 13 billion per token, including shared weights. View full-size image.Stored Capacity and Active Computation by Atlas Nova. Illustration generated with AI for this article and checked against its text.

Scaling the idea further meant building models whose total parameter counts ran into the trillions. GLaM, a family of language models using a sparsely activated mixture-of-experts architecture, reached 1.2 trillion parameters in its largest version, roughly seven times the size of GPT-3, while consuming only a third of the energy used to train GPT-3 and requiring half the computation for inference.⁠[12] The Switch Transformer pursued the same goal by a different route, simplifying the MoE routing algorithm, and was used to pre-train models up to trillion parameters.⁠[2] Two designs, two routes to the same order of magnitude: the point both make is that a model can be made very large in storage while the work per token stays bounded.

Vision followed language. Almost all performant computer vision networks are dense, meaning every input is processed by every parameter, so the sparse bargain had not been tested there. The Vision MoE, a sparse version of the Vision Transformer, matched the performance of state-of-the-art networks while requiring as little as half the compute at inference time, and a 15 billion parameter version reached 90.35 percent on ImageNet.⁠[3] The result matters because it shows the architecture is not tied to text: the same gate-and-pool arrangement can be inserted into an image model and deliver the same kind of trade.

A later language model shows how compact the arrangement can be made. Mixtral 8x7B keeps the architecture of an ordinary 7B model but replaces each layer's feed-forward block with eight experts, and a router selects two of them for every token; because the selected pair can differ at each step, each token has access to 47 billion parameters while only 13 billion are active during inference.⁠[6] The gap between those two figures is the architecture's signature in miniature, and it is the number a reader should watch when comparing such models, since the total describes what is stored and the active count describes what is paid for.

What these models have in common is a change in what "size" means. A dense network's parameter count measures both its storage and its cost, because every parameter is used on every input. Once routing is in place, the two come apart: GLaM's trillion parameters and Mixtral's 47 billion describe capacity, while the energy, flops and active counts describe the bill.⁠[6] That separation is what made models at this scale practical to train and serve at all, and it is why the architecture moved from a statistical curiosity to the basis of several of the largest systems built.

The scaling story also has a shape worth noticing. Each step did not invent a new principle; it took the same gate-and-pool arrangement and pushed it into a new domain or a new size, adjusting the routing rule or the layer design to suit. Language came first because its hunger for capacity was greatest, vision followed once the sparse version proved competitive, and the models grew from billions to trillions of parameters along the way. Whether the larger models are actually better, and at what cost in energy and computation, is a separate question, taken up under efficiency and quality.

Total parameters measure what a sparse model stores; active parameters measure what it costs.

Research

Evidence on efficiency and quality

The case for sparse mixtures rests on a claim that can be measured: for the same amount of computation, a routed model should reach a given quality sooner, or reach a better quality at all. The evidence comes from several directions, and each piece of it compares a sparse model against a dense one of comparable cost rather than against a model of comparable size. That distinction is the one to hold onto, because a sparse model's total parameter count is not a fair yardstick for a dense model's cost.

Figure 1. DeepSeek-V2 savings over DeepSeek 67B. The chart shows the percentage saved in training costs and the percentage reduction in the key-value cache when DeepSeek-V2 is compared with DeepSeek 67B. The source states: “saves 42.5% of training costs, reduces the KV cache by 93.3%” (DeepSeek-AI et al. (2024)).⁠[4]

The clearest early measurement came from the Switch Transformer, which simplified the MoE routing algorithm and reduced communication and computational costs. Built on the T5-Base and T5-Large designs, the simplified models reached up to seven times the pre-training speed of their dense counterparts using the same computational resources, and the gain held across a multilingual setting, where the sparse versions measured improvements over the mT5-Base model across all 101 languages tested.⁠[2] A speedup of that size means the same quality is reached in a fraction of the training time, which translates directly into cost. The same work pre-trained models up to a trillion parameters and reported a fourfold speedup over the T5-XXL model.⁠[2] What makes these numbers meaningful is that the comparison is compute-for-compute: the sparse model is not simply bigger, it is more efficient per unit of work.

Energy tells a similar story at the largest scale. GLaM, whose largest version holds 1.2 trillion parameters, consumed only one third of the energy used to train GPT-3 and required half the computation for inference, while achieving better overall zero-shot and one-shot performance across 29 natural language tasks.⁠[12] The pairing of the two facts is what matters. A model roughly seven times larger in stored parameters than GPT-3, trained on a third of the energy, still came out ahead on a broad set of tasks. That combination is difficult to explain by size alone, since the active computation per token was smaller, not larger.

Quality at a fixed active budget is the other half of the case. Mixtral 8x7B gives each token access to 47 billion parameters while using only 13 billion during inference, and it outperformed or matched Llama 2 70B and GPT-3.5 across all evaluated benchmarks, with especially large margins over Llama 2 70B on mathematics, code generation, and multilingual tasks.⁠[6] A sparse model drawing on a small active slice of a larger pool can therefore compete with a dense model several times its active size, which is the practical form the efficiency claim takes for anyone choosing an architecture.

Training cost shows up again in DeepSeek-V2, a mixture-of-experts language model with 236 billion total parameters of which 21 billion are activated for each token. Compared with DeepSeek 67B, it achieved significantly stronger performance while saving 42.5 percent of training costs, reducing the key-value cache by 93.3 percent, and boosting maximum generation throughput to 5.76 times.⁠[4] The cache and throughput figures concern serving rather than training, and the memory and deployment side of that picture is covered later; what belongs here is the training saving, which shows the efficiency gain persisting in a model built and evaluated well after the first sparse designs.

Read together, these results support a modest and specific conclusion. Sparse routing lets a model hold far more parameters than it uses, and at matched computation the sparse versions have repeatedly reached equal or better quality sooner, whether measured as pre-training speed, as energy consumed, or as benchmark performance at a given active count. The gains are not uniform: they vary by task and by scale, and the comparisons are always against a particular dense baseline rather than against dense models in general. Nor does a large total parameter count by itself guarantee anything, since only the active parameters are paid for and only they do the work on any given input. The architecture is best read as a way of spending a fixed compute budget more effectively, and the evidence says that it often does, under the conditions the studies describe.

The efficiency claim is compute-for-compute: sparse models have reached equal or better quality at lower training cost and smaller active size than the dense baselines they were measured against.

Routing behavior and specialization

The gate is trained to send each input to the experts that suit it, and the natural expectation is that it learns to read the input's meaning. What the routing actually depends on turns out to be narrower. In a series of openly released language models ranging from 650 million to 34 billion parameters, trained on up to more than a trillion tokens, the routing decisions were found to be predominantly based on token IDs, with minimal relevance to the surrounding context.⁠[13] A token ID is simply the integer that identifies a word or word fragment in the model's fixed vocabulary. The practical consequence is that the same word tends to be sent to the same experts wherever it appears, largely regardless of the sentence around it.

River bank and bank loan examples converge on a token ID and two experts above an early-to-late training timeline.
A schematic shared token ID sends two contexts toward the same experts, illustrating a tendency observed in the examined models. The timeline shows assignments forming early and remaining largely stable. View full-size image.Token Identity and Expert Specialization by Atlas Nova. Illustration generated with AI for this article and checked against its text.

That finding comes with two companions from the same analysis. The token-to-expert assignments were determined early in pre-training and remained largely unchanged afterward, so the division of labour is settled quickly and then persists. And the imperfect routing showed up as a cost in sequential tasks: in multi-turn conversations, tokens appearing later in a sequence were more likely to be dropped.⁠[13] Dropping means an input is not routed to any expert, so it receives no expert processing; the mechanism behind dropping belongs to the discussion of load balancing covered later. For the present point, what matters is that routing learned from token identity alone can misjudge inputs whose meaning depends on position in a longer passage.

Specialization, where it appears, is real but uneven. Analysis of routing in the OLMoE models, which hold 7 billion parameters while using only 1 billion per input token, showed a high degree of specialization among experts.⁠[14] The word needs care: specialization here means that different experts come to handle different portions of the input distribution, not that each expert has been assigned a topic by a designer. The gate's preferences and the experts' behaviour are learned together, so the division of labour is an outcome of training rather than a plan.

Why routing can work at all

A theoretical account helps explain what the gate is doing when it succeeds. Consider a classification problem whose data fall into distinct clusters, each requiring a different decision boundary; a single network must learn all the boundaries at once, which is hard. With a mixture-of-experts layer in place, and experts chosen as two-layer nonlinear convolutional networks, such a problem can be learned successfully, and the analysis shows the router learning cluster-center features, which lets it divide the complex input problem into simpler linear sub-problems that individual experts can solve. The same work found empirically that the cluster structure of the underlying problem and the nonlinearity of the experts are pivotal to the architecture's success.⁠[15] Routing pays off when the data genuinely contain separable groups; a gate over inputs with no such structure has little to divide.

Put beside the token-ID finding, this gives a coherent picture with a tension in it. The theory says the gate can learn to recognize which region of the input space an example belongs to, and that this is what makes a pool of experts worth having. The empirical finding says that in practice, at least in the language models examined, the signal the gate relies on is mostly the identity of the token rather than its setting. Both can hold: token identity is itself a strong cue to which cluster a word belongs to, since a given word usually plays similar roles. The cost appears where that shortcut fails, as in the later turns of a conversation, where the same token may need different handling depending on what came before.

The practical lesson for anyone reading about a mixture-of-experts model is to ask what the routing was shown to depend on, not merely that routing exists. A high degree of specialization, as measured in the OLMoE models, describes how the pool divides its work; it does not by itself establish that the gate is reading context. Whether routing can be made more context-sensitive, and whether it needs to be, are questions the later discussion of open problems takes up.

Routing can specialize, but in the models examined it leaned on token identity more than on surrounding context.

Risks and limits

Training instability and load balancing

A sparse mixture of experts is harder to train than a dense network of the same active size, and the difficulty is structural rather than incidental. The gate makes a discrete choice for every input, and that choice feeds back into which experts receive gradient updates. If the gate's early preferences tilt toward a few experts, those experts train more, become better, and attract still more of the traffic, while the rest of the pool receives little signal and stays weak. The architecture that was supposed to divide labour can instead concentrate it. The Switch Transformer's authors named complexity, communication costs and training instability as the obstacles that had kept the design from wide adoption, and treated steadying the training process as a first-class engineering problem alongside simplifying the routing rule.⁠[2]

Load balancing is the general name for the countermeasures. The aim is to keep the tokens spread across the pool so that every expert sees enough examples to learn from, and the usual instrument is an auxiliary loss, an extra term added to the training objective that penalizes uneven assignment. The Switch Transformer paired its simplified routing rule with such techniques to keep the load spread and to settle the instabilities, and the authors show large sparse models may be trained, for the first time, with lower-precision (bfloat16) formats.⁠[2] The detail about precision is worth noticing: numerical instability and load imbalance are different problems, but both surface as a training run that will not settle, and both had to be handled before large sparse models were practical.

The problem has a second face, which shows up at the moment of routing rather than in the aggregate. When the gate keeps only the top few experts for a token, the experts below the cutoff receive nothing for that token, and if capacity limits are imposed on each expert, tokens that arrive at an already-full expert are dropped from the computation altogether. Token dropping is the loss of those inputs. It is related to the 'Drop-towards-the-End' behavior observed in the OpenMoE models, where routing decisions were found to be predominantly based on token IDs and tokens appearing later in a sequence were more likely to be dropped.⁠[13] Dropping is not a bug in any single component; it is what happens when a hard selection rule meets a finite budget per expert.

A different failure mode appears even when the load is spread. Training a gate encourages tokens to cluster around expert centroids, since the gate is rewarded for sending similar inputs to the same place, and that clustering carries a risk of representation collapse: the hidden representations of many different inputs drift toward a few common points, so the distinctions the rest of the network needs are flattened out. One response estimates the routing scores between tokens and experts on a low-dimensional hypersphere rather than in the full space, which the authors report alleviates the collapse and yields more consistent routing than baseline mixture-of-experts methods across seven multilingual benchmarks.⁠[16] The point for a reader new to the subject is that a gate can be perfectly balanced and still harmful, if the representations it induces lose information.

The selection rule itself contributes to the trouble. A hard top-k gate has a sharp edge, so a small change in an expert's score can flip it in or out of the chosen set, and that discontinuity complicates training by gradient methods. Balance, smoothness and stability are therefore three aspects of one problem: the gate must choose, the choice must be trainable, and the traffic must not pile onto a few experts.

A more recent line of work attacks the problem from the other direction, by removing the hard assignment altogether. Soft MoE passes different weighted combinations of all input tokens to each expert, an implicit soft assignment rather than a discrete pick, and its authors present it as addressing training instability, token dropping, the inability to scale the number of experts, and ineffective fine-tuning while keeping the benefit of larger capacity at lower inference cost.⁠[17] Whether soft assignment replaces hard routing in practice is a question for the discussion of current directions; what belongs here is that the difficulties are connected, and a design that removes the hard cutoff addresses several of them at once.

Load balancing also has a cost that is easy to overlook.

None of this makes sparse mixtures unworkable. The models described in the previous sections were trained, and trained at scales of billions and trillions of parameters. What the difficulties explain is why the architecture arrived later than its statistical foundations and why so much of the published work on it concerns training procedure rather than model structure. The memory and serving side of the same bargain, where bulky expert weights sit idle between uses, is covered later.

A sparse mixture must be kept balanced, smooth and stable at once; each fix for one of those pressures can cost some of the specialization the architecture was built to gain.

Inference costs and deployment

Training a sparse model is only half of the bargain. Once it is built, it has to answer requests, and the shape of the architecture creates a problem that dense networks do not have. A dense model's parameters are all used on every input, so they can be spread across whatever memory is available and read in a steady stream. A mixture of experts stores far more parameters than any single token will touch, and the experts that go unused for a given token are not merely idle, they are bulky weights occupying space that could hold something else. The pool is large precisely because most of it is not needed at any one moment.

That observation is the basis for a common deployment strategy: offloading, in which the parts of a model that are rarely used are kept in slower, cheaper storage and fetched into fast memory only when needed. The approach suits mixtures of experts because the pattern of use is so uneven. One on-device inference engine for sparse language models partitions the model along exactly this line, holding the non-expert weights in device memory while keeping expert weights on external storage and pulling them in only when the router activates them; the design rests on the observation that expert weights are bulky but infrequently used because activation is sparse. Two refinements reduce the cost of the fetching itself: expert-wise bitwidth adaptation, which shrinks expert weights with tolerable accuracy loss, and expert preloading, which predicts which experts will be needed and loads them ahead of time so that computation and input/output overlap.⁠[18]

Offloading makes large sparse models runnable on modest hardware, but it introduces a new dependency. If the experts must be read from storage, then the speed of that storage and the path to it become part of the model's latency, not incidental details. Work on running a large sparse model on consumer hardware and free cloud instances built on existing offloading algorithms and added a strategy that exploits the properties of mixture-of-experts models specifically to speed the process up.⁠[19] The practical upshot is that the same model can behave very differently depending on where its experts live, which is a consideration a dense model of comparable active size does not raise.

Serving many users at once

Single-device tricks address one user at a time. Serving a large sparse model to many users is a systems problem, and the published work on it treats training and inference as a single pipeline to be optimized together. DeepSpeed-MoE is an end-to-end training and inference solution that includes model compression techniques reducing MoE model size by up to 3.7 times, and an optimized inference system providing 7.3 times better latency and cost than existing MoE inference solutions; against quality-equivalent dense models it reports up to 4.5 times faster and 9 times cheaper inference.⁠[20] The comparison to hold onto is again the quality-equivalent dense model, since a sparse model's stored size is not the right yardstick for what serving it costs.

The broader picture is that inference optimization for these models spans several layers of the stack at once. A survey of the area organizes the techniques into model-level, system-level and hardware-level optimizations, covering architectural choices, compression by pruning, quantization and distillation, dynamic routing strategies, distributed computing and load balancing, and hardware-specific co-design aimed at throughput and energy efficiency.⁠[21] The breadth is the point: no single trick makes a trillion-parameter sparse model cheap to serve, and the gains come from stacking improvements at each level.

What ties these efforts together is the same separation that made the architecture attractive in the first place. The total parameter count describes what must be stored and, when offloading is used, what must be moved; the active count describes the arithmetic actually performed. Deployment engineering is largely the business of narrowing the gap between the two, so that a model's enormous stored capacity does not turn into an equally enormous bill each time it answers.

Serving a sparse model is a storage and movement problem as much as a computation problem: the experts that stay idle still have to be kept somewhere.

Offloading splits the model so rarely used expert weights sit in slower storage.

Later developments

Open problems and current directions

The difficulties described so far have pushed research in several directions at once, and the directions share a common aim: keep the sparse bargain while removing the parts of it that cause trouble. One line attacks the hard selection rule directly. A model built this way with 128 experts across 16 mixture-of-experts layers holds over 40 times more parameters than a comparable dense Vision Transformer with only 2 percent more inference time.⁠[17] The trade is characteristic of the field: the selection stops being a clean choice among experts and becomes a blending, which buys smoothness at the cost of the crisp specialization a hard gate provides.

A second line keeps hard routing but changes what the pool contains. Shared experts are a small set of experts that every token passes through, sitting alongside the routed ones. The DeepSeekMoE architecture combines two strategies: finely segmenting the experts into mN smaller ones and activating mK of them, which allows a more flexible combination of activated experts, and isolating K_s experts as shared ones to capture common knowledge and reduce redundancy among the routed experts.⁠[22] The reasoning behind the split is that not all knowledge is worth specializing. Shared experts aim to capture common knowledge and mitigate redundancy in the routed experts, leaving the routed experts free to cover what differs between inputs. At a modest scale of 2 billion parameters, DeepSeekMoE achieved comparable performance to a GShard model with 1.5 times the expert parameters and computation.⁠[22]

A third direction asks whether all those parameters need to be distinct at all. If experts must each hold a full separate copy of a weight matrix, the storage cost of a large pool grows quickly, which is the same bulk that makes deployment awkward. One parameter-efficient design borrows a technique from quantum many-body physics, the matrix product operator, to reconstruct the parameter matrix inside each expert, sharing a central tensor that carries core information across experts while letting auxiliary tensors give each expert its specificity. Experiments based on T5 and GPT-2 showed improved performance and efficiency, with the MPO-based MoE model achieving a 27.2 times reduction in total parameters for superior model performance compared with the Switch Transformers.⁠[23] The gain here is on the storage side of the bargain rather than the computation side, and it matters most where memory rather than arithmetic is the binding constraint.

The architecture has also begun to travel beyond the Transformer. State-space models, a family of sequence models that process a sequence in linear time and memory, had become serious contenders in the field of sequential modeling, and combining them with sparse experts was a natural next step. MoE-Mamba places mixture-of-experts layers inside Mamba, a state-space model, and outperforms both Mamba and a baseline Transformer-MoE, reaching the same performance as Mamba in 2.35 times fewer training steps while preserving Mamba's inference performance gains against the Transformer.⁠[24] The result suggests the gate-and-pool arrangement is not tied to any one backbone; wherever a network has repeated blocks whose parameters could be made conditional, the same bargain can be attempted.

What unites these directions is that each targets a different cost of the original design. Soft assignment targets the instability and dropping that come from a hard cutoff; shared experts target redundancy in what the routed pool must learn; parameter-efficient experts target the storage bulk; and combinations with new backbones test whether the idea generalizes past the architecture that made it famous. None of them abandons the core principle that different inputs are handled by different parameters. How far the evidence for the whole approach extends, and where it has been found to fall short, is taken up under limits and disputes.

Current work keeps the sparse bargain and attacks its costs one at a time: the hard choice, the redundant expert, the bulky weight, the Transformer-only assumption.

Each direction targets a different cost of the original sparse design.

Limits and disputes

The evidence for sparse mixtures is real, but it is narrower than the headline parameter counts suggest, and several findings cut against the simplest version of the case. The first concerns what the architecture buys when nothing else changes. In a set of comparisons across three training setups, mixture-of-experts models and dense models of identical computational capacity were tested on individual downstream tasks without instruction tuning, and the sparse models overall underperformed the dense ones. The picture reversed once instruction tuning entered, used on its own or alongside task-specific fine-tuning, and the most powerful model in that work, FLAN-MOE-32B, surpassed the larger dense FLAN-PALM-62B on four benchmark tasks while using only a third of the FLOPs.⁠[25] The lesson is that routing is not a free upgrade to any training recipe. Its advantage showed up in combination with a particular way of training, not in isolation, and a comparison that leaves that out can point the other way.

A sharper challenge comes from asking whether the gate earns its keep at all. That is a striking result for an architecture whose central component is a learned selector. The same work proposed a model in which experts are randomly activated for each input during training and inference, trained with a consistency loss so that experts learn from one another as teachers and make consistent predictions; on machine translation it outperformed the Switch Transformer by 2 BLEU scores and matched a state-of-the-art mixture-of-experts model 18 times larger.⁠[5] Random assignment still divides the work, and the consistency training does the rest. The finding does not show that gating is useless everywhere, but it does show that the benefit of a large pool of experts can survive without a clever gate, which weakens the claim that routing quality is what drives the gains.

The third dispute is about measurement itself. Because a sparse model stores far more parameters than it uses, comparing it to a dense model of similar total size flatters it, and comparing to one of similar active size may understate what it stores. A detailed study of how autoregressive mixture-of-experts language models scale against dense models, across in-domain and out-of-domain language modeling, zero- and few-shot priming, and full-shot fine-tuning, found the sparse models substantially more compute efficient in every setting except fine-tuning; at more modest training budgets they matched dense models using about four times less compute, and the gap narrowed at scale. The same study found the performance gap varied greatly across tasks and domains, suggesting the two kinds of model generalize differently.⁠[26] That variation is the honest limit: an efficiency claim holds for the tasks and budgets measured, and a single benchmark cannot settle it for a new domain.

Read together, these results mark out the boundaries of what the earlier sections established. Sparse routing can reach equal or better quality at lower cost, but the gain depends on how the model is trained, may not require a learned gate, and shifts with scale and task. The total parameter count remains a poor guide to either cost or quality, and the comparisons that matter are always against a particular dense baseline under a particular budget.

Key studies

YearStudySampleDesignFinding
2013Eigen et al.⁠[7]A Deep Mixture of Experts model trained on a randomly translated version of the MNIST dataset and a dataset of speech monophonesStudy design: a stacked Deep Mixture of Experts with several sets of gating networks and experts, tested on a randomly translated version of MNIST and on a dataset of speech monophones.The first layer learned location-dependent experts and the second layer learned class-specific experts, and all expert combinations were in use.
2021Zuo et al.⁠[5]THOR models tested on machine translation tasks, including multilingual translationStudy design: THOR models, whose experts are randomly activated for each input, trained with a consistency regularized loss and validated on machine translation tasks.THOR outperformed the Switch Transformer by 2 BLEU scores and matched a state-of-the-art MoE model 18 times larger.
2021Du et al.⁠[12]GLaM, the largest version with 1.2 trillion parametersStudy design: GLaM, a sparsely activated mixture-of-experts language model with up to 1.2 trillion parameters, evaluated on zero-shot and one-shot performance across 29 NLP tasks and compared with GPT-3 on energy and computation.GLaM spent one third of the energy that GPT-3 required for training and half the computation flops at inference, and its overall zero-shot and one-shot results were better across 29 NLP tasks.
2021Fedus et al.⁠[2]Switch Transformer models based on T5-Base and T5-Large, and trillion parameter modelsStudy design: Switch Transformer models were built from T5-Base and T5-Large, trained in bfloat16 precision with a simplified routing algorithm, and tested in multilingual settings across 101 languages. The largest runs pre-trained models of up to one trillion parameters on the Colossal Clean Crawled Corpus.With the same computational resources, the Switch Transformer models pre-trained up to 7 times faster, and the largest reached a 4 times speedup over T5-XXL.
2021Artetxe et al.⁠[26]Autoregressive MoE language models up to 1.1T parameters compared with dense modelsStudy design: autoregressive MoE language models were compared with dense models across in-domain and out-of-domain language modeling, zero-shot and few-shot priming, and full-shot fine-tuning. The largest MoE model had 1.1T parameters.At more modest training budgets, MoEs matched dense models using about 4 times less compute, and the largest MoE consistently outperformed a compute-equivalent dense model of 6.7B parameters.
2022Rajbhandari et al.⁠[20]DeepSpeed-MoE inference and training system evaluated on large MoE modelsStudy design: DeepSpeed-MoE, an end-to-end training and inference solution with new MoE architecture designs and model compression techniques, evaluated for inference latency and cost against existing MoE inference solutions and against quality-equivalent dense models.Model compression techniques reduced MoE model size by up to 3.7x, and the inference system provided 7.3x better latency and cost than existing MoE inference solutions.
2023Shen et al.⁠[25]FLAN-MOE-32B compared with FLAN-PALM-62B across three experimental setupsStudy design: three setups compared, namely direct fine-tuning on individual downstream tasks without instruction tuning, instruction tuning followed by zero-shot or few-shot generalization, and instruction tuning followed by further task-specific fine-tuning.Without instruction tuning the MoE model underperformed the dense model, but FLAN-MOE-32B surpassed FLAN-PALM-62B on four benchmark tasks using only a third of the FLOPs.
2023Puigcerver et al.⁠[17]Soft MoE Huge/14 with 128 experts in 16 MoE layers compared with ViT Huge/14Study design: Soft MoE compared with dense vision transformers and with the Tokens Choice and Experts Choice MoE models on visual recognition, including Soft MoE Huge/14 with 128 experts in 16 MoE layers.Soft MoE Huge/14, with 128 experts in 16 MoE layers, carried more than 40 times the parameters of ViT Huge/14, added 2% to inference time, and produced clearly better quality.
2024DeepSeek-AI et al.⁠[4]DeepSeek-V2, a Mixture of Experts language model with 236B total parameters and 21B activated per tokenStudy design: pretraining of DeepSeek-V2 on a corpus of 8.1T tokens, followed by supervised fine-tuning and reinforcement learning, then evaluation against open-source models.It saved 42.5% of training costs, reduced the key-value cache by 93.3%, and boosted maximum generation throughput to 5.76 times compared with DeepSeek 67B.
2024Muennighoff et al.⁠[14]OLMoE-1B-7B, a model with 7 billion parameters that uses 1B per input token, pretrained on 5 trillion tokensStudy design: pretraining of OLMoE-1B-7B on 5 trillion tokens, adaptation into OLMoE-1B-7B-Instruct, experiments on MoE training, and an analysis of routing.It outperformed all available models with similar active parameters and showed high specialization in routing.
2024Dai et al.⁠[22]DeepSeekMoE scaled from 2B to 16B and then to 145B parametersStudy design: DeepSeekMoE at 2B parameters compared with GShard 2.9B and with a dense model of the same total size, then scaled to 16B and 145B parameters and compared with LLaMA2 7B, GShard and DeepSeek 67B.DeepSeekMoE 16B matched LLaMA2 7B with only about 40% of computations, and the 145B version matched DeepSeek 67B using only 28.5% of computations.
2025Yi et al.⁠[18]EdgeMoE tested on 7 MoE-based language models and 2 embedded platforms, Raspberry Pi 4B and Jetson TX2Study design: EdgeMoE is an on-device inference engine for MoE language models. It holds non-expert weights in device memory and fetches expert weights from external storage only when they are activated. Evaluation covered 7 MoE-based models and 2 embedded platforms, a Raspberry Pi 4B (CPU) and a Jetson TX2 (GPU).EdgeMoE reduced memory footprint by 1.05x to 1.18x and achieved 1.19x to 2.77x inference speedup, enabling fast inference for models over 10B parameters with accuracy loss of at most 2%.

See also

References

  1. Shazeer, N., Mirhoseini, A., Maziarz, K., Davis, A., Le, Q. V., Hinton, G. E., & Dean, J. (2017). Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer. arXiv. doi:10.48550/arxiv.1701.06538 Free full text
  2. Fedus, W., Zoph, B., & Shazeer, N. (2021). Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity. arXiv. doi:10.48550/arxiv.2101.03961 Free full text
  3. Riquelme, C., Puigcerver, J., Mustafa, B., Neumann, M., Jenatton, R., Pinto, A. S., Keysers, D., & Houlsby, N. (2021). Scaling Vision with Sparse Mixture of Experts. arXiv. doi:10.48550/arxiv.2106.05974 Free full text
  4. DeepSeek-AI, Aixin, L., Bei, F., Bin, W., Bingxuan, W., Bo, L., Chenggang, Z., Chengqi, D., Chong, R., Damai, D., Daya, G., Dejian, Y., Deli, C., Dongjie, J., Erhang, L., Fangyun, L., Fuli, L., Guangbo, H., Guanting, C., & ... Xiaowen, S. (2024). DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model. arXiv. doi:10.48550/arxiv.2405.04434 Free full text
  5. Zuo, S., Liu, X., Jiao, J., Kim, Y. J., Hassan, H., Zhang, R., Zhao, T., & Gao, J. (2021). Taming Sparsely Activated Transformer with Stochastic Experts. arXiv. doi:10.48550/arxiv.2110.04260 Free full text
  6. Jiang, A. Q., Sablayrolles, A., Roux, A., Mensch, A., Savary, B., Bamford, C., Chaplot, D. S., Casas, D. d. L., Hanna, E. B., Bressand, F., Lengyel, G., Guillaume, B., Lample, G., Lavaud, L. R., Saulnier, L., Lachaux, M. A., Stock, P., Sandeep, S., Yang, S., & ... Sayed, W. E. (2024). Mixtral of Experts. arXiv. doi:10.48550/arxiv.2401.04088 Free full text
  7. Eigen, D., Ranzato, M., & Sutskever, I. (2013). Learning Factored Representations in a Deep Mixture of Experts. arXiv. doi:10.48550/arxiv.1312.4314 Free full text
  8. Jordan, M. I., & Jacobs, R. A. (1994). Hierarchical Mixtures of Experts and the EM Algorithm. Neural Computation, 6(2), 181-214. doi:10.1162/neco.1994.6.2.181
  9. Peng, F., Jacobs, R. A., & Tanner, M. A. (1996). Bayesian Inference in Mixtures-of-Experts and Hierarchical Mixtures-of-Experts Models with an Application to Speech Recognition. Journal of the American Statistical Association, 91(435), 953-960. doi:10.1080/01621459.1996.10476965
  10. Peralta, B., Saavedra, A., Caro, L., & Soto, A. (2019). Mixture of Experts with Entropic Regularization for Data Classification. Entropy, 21(2), 190. doi:10.3390/e21020190
  11. Hazimeh, H., Zhao, Z., Chowdhery, A., Sathiamoorthy, M., Chen, Y., Mazumder, R., Hong, L., & H., E. (2021). DSelect-k: Differentiable Selection in the Mixture of Experts with Applications to Multi-Task Learning. arXiv. doi:10.48550/arxiv.2106.03760 Free full text
  12. Du, N., Huang, Y., Dai, A. M., Tong, S., Lepikhin, D., Xu, Y., Krikun, M., Zhou, Y., Yu, A. W., Fırat, O., Zoph, B., Fedus, L., Bosma, M., Zhou, Z., Tao, W., Wang, Y. E., Webster, K., Pellat, M., Kevin, R., & ... Cui, C. M. (2021). GLaM: Efficient Scaling of Language Models with Mixture-of-Experts. arXiv. doi:10.48550/arxiv.2112.06905 Free full text
  13. Xue, F., Zheng, Z., Fu, Y., Ni, J., Zheng, Z., Zhou, W., & You, Y. (2024). OpenMoE: An Early Effort on Open Mixture-of-Experts Language Models. arXiv. doi:10.48550/arxiv.2402.01739 Free full text
  14. Muennighoff, N., Soldaini, L., Groeneveld, D., Lo, K., Morrison, J., Min, S., Shi, W., Pete, W., Tafjord, O., Lambert, N., Gu, Y., Arora, S., Bhagia, A., Schwenk, D., Wadden, D., Wettig, A., Hui, B., Dettmers, T., Kiela, D., & ... Hajishirzi, H. (2024). OLMoE: Open Mixture-of-Experts Language Models. arXiv. doi:10.48550/arxiv.2409.02060 Free full text
  15. Chen, Z., Deng, Y., Wu, Y., Gu, Q., & Li, Y. (2022). Towards Understanding Mixture of Experts in Deep Learning. arXiv. doi:10.48550/arxiv.2208.02813 Free full text
  16. Chi, Z., Li, D., Huang, S., Dai, D., Ma, S., Patra, B., Singhal, S., Bajaj, P., Xia, S., Xian-Ling, M., Heyan, H., & Furu, W. (2022). On the Representation Collapse of Sparse Mixture of Experts. arXiv. doi:10.48550/arxiv.2204.09179 Free full text
  17. Puigcerver, J., Riquelme, C., Mustafa, B., & Houlsby, N. (2023). From Sparse to Soft Mixtures of Experts. arXiv. doi:10.48550/arxiv.2308.00951 Free full text
  18. Yi, R., Guo, L., Wei, S., Zhou, A., Wang, S., & Xu, M. (2025). EdgeMoE: Empowering Sparse Large Language Models on Mobile Devices. IEEE Transactions on Mobile Computing, 24(8), 7059-7073. doi:10.1109/tmc.2025.3546466
  19. Eliseev, A., & Denis, M. (2023). Fast Inference of Mixture-of-Experts Language Models with Offloading. arXiv. doi:10.48550/arxiv.2312.17238 Free full text
  20. Rajbhandari, S., Li, C., Yao, Z., Zhang, M., Aminabadi, R. Y., Awan, A. A., Rasley, J., & He, Y. (2022). DeepSpeed-MoE: Advancing Mixture-of-Experts Inference and Training to Power Next-Generation AI Scale. arXiv. doi:10.48550/arxiv.2201.05596 Free full text
  21. Liu, J., Tang, P., Wang, W., Ren, Y., Hou, X., Heng, P. A., Guo, M., & Li, C. (2026). A Survey on Inference Optimization Techniques for Mixture of Experts Models. ACM Computing Surveys, 58(10), 1-37. doi:10.1145/3794845
  22. Dai, D., Deng, C., Zhao, C., X., X. R., Gao, H., Deli, C., Li, J., Zeng, W., Yu, X., Wu, Y., Zhenda, X., Li, Y. K., Huang, P., Luo, F., Ruan, C., Sui, Z., & Wenfeng, L. (2024). DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models. arXiv. doi:10.48550/arxiv.2401.06066 Free full text
  23. Gao, Z., Liu, P., Zhao, W. X., Lu, Z. Y., & Wen, J. R. (2022). Parameter-Efficient Mixture-of-Experts Architecture for Pre-trained Language Models. arXiv. doi:10.48550/arxiv.2203.01104 Free full text
  24. Pióro, M., Ciebiera, K., Król, K., Ludziejewski, J., Michał, K., Jakub, K., Szymon, A., Piotr, M., Marek, C., & Sebastian, J. (2024). MoE-Mamba: Efficient Selective State Space Models with Mixture of Experts. arXiv. doi:10.48550/arxiv.2401.04081 Free full text
  25. Shen, S., Hou, L., Zhou, Y., Du, N., Longpre, S., Jason, W., Chung, H. W., Zoph, B., Fedus, W., Chen, X., Vu, T., Wu, Y., Chen, W., Webson, A., Li, Y., Zhao, V., Yu, H., Keutzer, K., Darrell, T. J., & Zhou, D. (2023). Mixture-of-Experts Meets Instruction Tuning:A Winning Combination for Large Language Models. arXiv. doi:10.48550/arxiv.2305.14705 Free full text
  26. Artetxe, M., Bhosale, S., Goyal, N., Mihaylov, T., Ott, M., Shleifer, S., Lin, X. V., Du, J., Iyer, S. V., Pasunuru, R., Anantharaman, G., Li, X., Chen, S., Halil, A., Baines, M., Louis, M., Zhou, X., Koura, P. S., O’Horo, B., & ... Stoyanov, V. (2021). Efficient Large Scale Language Modeling with Mixtures of Experts. arXiv. doi:10.48550/arxiv.2112.10684 Free full text

Cite this page: Atlas Nova editors. (2026). Mixture of experts. Atlas Nova. https://velocer.io/atlas/mixture-of-experts/