Multi-gate Mixture-of-Experts (MMoE) is a multi-task learning architecture in which several tasks share a pool of expert subnetworks, while each task has its own gating network that decides how strongly to use each expert. In recommender systems, MMoE is widely used to predict several user behaviors at once, such as clicks, watch time, likes and purchases, from a single shared model.
The architecture was introduced by researchers at Google in 2018 to address a known weakness of classic multi-task models: when tasks are weakly related or conflicting, forcing them to share one representation hurts accuracy. MMoE lets tasks share what helps and separate what conflicts, learning these relationships automatically from data.
How MMoE routes inputs through experts and gates
MMoE processes every input through all experts in parallel and then mixes their outputs differently for each task. An expert is typically a small feed-forward network that turns the shared input features, such as user and item embeddings, into a hidden representation of fixed size.
For each task, a gating network takes the same input and produces a softmax distribution over the experts. The weighted sum of expert outputs forms a task-specific representation, which is passed to a task tower, a small network ending in the prediction for that task. Formally, task k uses the mixture of experts weighted by its gate, then applies its own tower to that mixture.
The table below lists the building blocks and their typical configurations in production ranking models.
| Component | Role | Typical configuration |
|---|---|---|
| Shared input layer | Embeds user, item and context features | Hundreds to thousands of dimensions |
| Experts | Learn alternative hidden representations | 4 to 16 multilayer perceptrons |
| Gating networks | Weight experts separately for each task | One linear layer with softmax per task |
| Task towers | Turn mixed representations into predictions | Small multilayer perceptron per task |
| Task losses | Train all objectives jointly | Weighted sum of per-task losses |
Because gates are input-dependent, the same task can rely on different experts for different users or items. This conditional specialization is the main advantage over static sharing schemes, and its cost is modest: the gates add only a few parameters compared with the experts themselves.
MMoE compared with other multi-task architectures
MMoE sits between full sharing and full separation of task parameters. The classic shared-bottom model uses one common network beneath all task towers, which is efficient but suffers from negative transfer when tasks diverge. The One-gate Mixture-of-Experts variant uses experts but only one gate for all tasks, so tasks still receive the same mixture.
| Architecture | Sharing mechanism | Main limitation |
|---|---|---|
| Shared-bottom | One common hidden network | Negative transfer for conflicting tasks |
| One-gate MoE | Experts with one shared gate | No task-specific weighting |
| MMoE | Shared experts, one gate per task | Experts can still be entangled |
| Progressive Layered Extraction | Shared plus task-specific experts | More parameters and tuning |
| Separate models | No sharing at all | Higher cost, no transfer from data-rich tasks |
Progressive Layered Extraction (PLE), proposed later by Tencent researchers, extends MMoE by adding explicitly task-specific experts next to shared ones. It targets the seesaw phenomenon, in which improving one task degrades another. In practice, MMoE remains a strong and simpler baseline, and many teams start with it before moving to PLE.
Why MMoE matters in recommender systems
Modern recommendation is a multi-objective problem. A video platform may want users to click, watch to completion, like, share and not dismiss an item, and these signals differ in frequency and meaning. Engagement objectives such as clicks and satisfaction objectives such as ratings or survey responses often correlate only partly, which is exactly the setting where MMoE helps.
Multi-task learning also lets sparse objectives borrow strength from dense ones. Purchases or shares are rare compared with impressions, so a separate model for them would be data-starved. Within MMoE, the rare task can draw on experts trained mostly by abundant click data while keeping its own gate. MMoE has been reported in large-scale video ranking at YouTube, where it combined engagement and satisfaction predictions in the ranking stage.
The following decision table helps choose an architecture for a given situation.
| Situation | Recommended choice | Reason |
|---|---|---|
| Highly correlated tasks | Shared-bottom model | Simple and efficient sharing suffices |
| Partly correlated tasks | MMoE | Gates learn flexible task relationships |
| Strong seesaw between tasks | PLE or MMoE with task experts | Isolates conflicting knowledge |
| One rare and one dense task | MMoE with loss weighting | Rare task borrows dense signal |
| Strict latency budget | Few small experts | Every expert runs for every request |
Training practice and common pitfalls
Training MMoE requires attention to loss balancing. Task losses differ in scale, since a regression on watch time and a binary click loss produce very different magnitudes. Teams typically use manual loss weights, uncertainty-based weighting or gradient normalization methods to keep one task from dominating shared experts.
- Gate polarization: a gate assigns nearly all weight to one expert, turning MMoE into separate models. Dropout on gate outputs or temperature tuning reduces this.
- Expert collapse: several experts learn almost identical functions, wasting capacity. Diverse initialization and moderate expert counts help.
- Misleading offline gains: improved AUC for one task may hide losses on others, so each task needs its own offline and online metrics.
- Serving cost: all experts are evaluated for each candidate, so latency grows linearly with expert count in the ranking stage.
Unlike the sparse mixture-of-experts layers used in large language models, which activate only a few experts per token, standard MMoE is dense: every expert contributes to every prediction, only with different weights. This makes it stable to train but limits how far the number of experts can scale.
In plain words
MMoE is a team of specialists with several managers. Each specialist looks at the same information and gives an opinion. Each manager is responsible for one question, such as whether a user will click or whether the user will enjoy an item.
Every manager decides how much to trust each specialist. The click manager may listen mostly to one specialist. The enjoyment manager may prefer another. They share the team but weigh it differently, so one goal does not spoil the other.
A real-world example
An online fashion retailer ranks products on its home page using two signals: click-through rate and purchase conversion. A single shared-bottom model improved clicks but pushed eye-catching, low-converting items upward, while separate models doubled serving cost and starved the purchase model, because purchases occurred in under 2 percent of clicks.
The team replaced both with an MMoE model using eight experts, one gate per task and a loss weight that gave purchases more influence. In a two-week online test, click-through rate stayed roughly unchanged while conversions per session rose measurably. Gate inspection showed that the purchase task relied heavily on two experts that had learned price sensitivity and brand affinity, which gave the team an interpretable view of task differences.