Multi-gate Mixture-of-Experts

Also known as: MMoE

On this page 6

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.

ComponentRoleTypical configuration
Shared input layerEmbeds user, item and context featuresHundreds to thousands of dimensions
ExpertsLearn alternative hidden representations4 to 16 multilayer perceptrons
Gating networksWeight experts separately for each taskOne linear layer with softmax per task
Task towersTurn mixed representations into predictionsSmall multilayer perceptron per task
Task lossesTrain all objectives jointlyWeighted sum of per-task losses
Components of a Multi-gate Mixture-of-Experts model

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.

ArchitectureSharing mechanismMain limitation
Shared-bottomOne common hidden networkNegative transfer for conflicting tasks
One-gate MoEExperts with one shared gateNo task-specific weighting
MMoEShared experts, one gate per taskExperts can still be entangled
Progressive Layered ExtractionShared plus task-specific expertsMore parameters and tuning
Separate modelsNo sharing at allHigher cost, no transfer from data-rich tasks
Multi-task architectures used in ranking

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.

SituationRecommended choiceReason
Highly correlated tasksShared-bottom modelSimple and efficient sharing suffices
Partly correlated tasksMMoEGates learn flexible task relationships
Strong seesaw between tasksPLE or MMoE with task expertsIsolates conflicting knowledge
One rare and one dense taskMMoE with loss weightingRare task borrows dense signal
Strict latency budgetFew small expertsEvery expert runs for every request
Choosing a multi-task design

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.