How does multi-task learning work for ranking — and what are the failure modes?
Written by the mlprep team · Updated
You're ranking content and need to optimize for both engagement (clicks) and satisfaction (survey scores). How does multi-task learning help, and what are the failure modes?
Why multi-task learning (MTL)#
Engagement (clicks, watch time) and satisfaction (survey scores, likes, explicit ratings) both reflect item quality but from different angles. They share underlying structure — a good video tends to score well on both. Training separate models means each model ignores relevant signal from the other task.
MTL trains a shared representation that benefits from both signals simultaneously:
- Satisfaction labels are sparse (few users fill surveys). Engagement labels are dense. Shared layers see more signal than any single-task model.
- The shared representation generalizes better — regularized by the need to explain multiple objectives.
Architecture: hard vs soft parameter sharing#
Hard parameter sharing: all tasks share hidden layers up to some depth, then branch into task-specific heads.
Input → Shared Layers → [Engagement Head] → click_prob
→ [Satisfaction Head] → survey_score
One forward pass, multiple losses. Task-specific heads diverge at the last few layers. Most common in production — computationally efficient, single inference pass.
Soft parameter sharing: each task has its own network, but parameters are regularized to stay close (L2 penalty between corresponding layers). Slower, more flexible, less used in production.
Combining losses#
Simple weighted sum of per-task losses:
L = w_engagement · L_engagement + w_satisfaction · L_satisfaction
Weights are hyperparameters. Setting them right requires understanding the relative scale and importance of each task. Dynamic weight adjustment (uncertainty weighting, gradient normalization) can help but adds complexity.
The seesaw problem#
When tasks conflict, improving one degrades the other. Clickbait content has high engagement (users click it) but low satisfaction (they feel deceived after watching). A model optimizing both learns this conflict and can oscillate — improvements on engagement hurt satisfaction and vice versa, producing a seesaw effect with no stable optimum.
Meta/YouTube specifically report this for engagement vs. satisfaction objectives in video recommendation. Their solution: MMOE (Multi-gate Mixture of Experts).
MMOE: Multi-gate Mixture of Experts#
Instead of one shared representation, learn multiple "expert" sub-networks. Each task has a gating network that selects a weighted combination of experts:
h_task_k = ∑_i gate_k(x)_i · expert_i(x)
Different tasks can weight different experts differently — engagement might rely on experts that capture click-bait patterns, satisfaction on experts that capture quality signals. The experts themselves specialize through learning. MMOE reduces seesaw by allowing tasks to use different parts of the shared capacity rather than fighting over the same weights.
Serving: combining task scores#
At serving, the model outputs one score per task. You need a final ranking score. Options:
- Weighted product:
score = click_prob^w1 · satisfaction^w2(common, easy to tune) - Linear blend:
score = w1·click_prob + w2·satisfaction - Constrained ranking: rank by engagement, post-filter by minimum satisfaction threshold
The weights are tuned by business policy (how much do we value engagement vs user wellbeing?) and A/B tested. This is often a non-ML product decision that sits on top of the ML model.
When MTL helps vs hurts#
MTL helps when tasks are related (share underlying factors). MTL hurts when tasks are too different — shared layers must serve conflicting objectives, and each task would be better served by its own representation. A common heuristic: if a feature useful for task A is actively misleading for task B, MTL may not help.
The key takeaway unlocks after you reveal an expert answer.
Key Takeaway
Multi-task learning: shared representation trained jointly on multiple objectives captures more signal than separate models, especially when one task has sparse labels. Hard parameter sharing: shared layers + task-specific heads, single forward pass. Seesaw problem: conflicting objectives cause training instability. MMOE (Multi-gate Mixture of Experts) mitigates seesaw by letting tasks weight different expert sub-networks. At serving: combine task scores via weighted product or linear blend tuned by business policy.
Follow-up Questions to Test Yourself
Interviewers often pivot here once you cover the core concept.
- How does MMOE differ from a standard mixture-of-experts model, and what does the per-task gating add?
- When two tasks conflict (clickbait is high-engagement but low-satisfaction), what should your model actually learn to do?
- How would you detect that multi-task learning is hurting one of your tasks compared to a single-task baseline?
How confident do you feel explaining this?
Track your understanding or flag it to revisit before your next loop.
Related Questions
Walk me through two-tower models for retrieval — architecture, tradeoffs, and limits
Compare pointwise, pairwise, and listwise ranking losses
When do you use a cross-encoder reranker instead of a bi-encoder?
How would you design a recommendation system for Reddit?