Design the Loss for Multi-Task Engagement Prediction in Feed

Last updated: November 29, 2026

Quick Overview

Feed ranking predicts many actions at once, such as like, comment, share, hide, and dwell time. Explain how you would structure a multi-task model and its loss, and how the task predictions become one ranking score.

Meta
Machine Learning
Machine Learning Engineer
Meta
November 29, 2026
Machine Learning Engineer
Onsite
Machine Learning
Hard

0

0

0 solved


Feed ranking predicts many actions at once, such as like, comment, share, hide, and dwell time. Explain how you would structure a multi-task model and its loss, and how the task predictions become one ranking score.

Meta's Feed and Reels rankers predict dozens of events and combine them with value weights, so ML candidates are expected to reason about multi-task learning. The interviewer checks loss choices per task, handling imbalance and negative transfer, and the separation between prediction and value modeling.

What the Interviewer Expects
  • Choose per-task losses: binary cross-entropy for actions, appropriate loss for dwell
  • Discuss shared bottom versus mixture-of-experts architectures
  • Address imbalance across tasks (likes are common, shares rare)
  • Separate predictions from the value function that combines them
  • Explain negative signals like hide and report
Key Topics to Cover
Multi-task learning
MMoE
Loss weighting
Value model
Feed ranking
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • How would you detect negative transfer between tasks?
  • Who should set the value weights, and how would you tune them?
  • How do you handle tasks whose labels arrive with a delay?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

Clarify the actions (like, comment, share, click, hide, report, dwell time), label definitions and windows, and whether the ranking objective is a product-defined value combining them....

Approach

Train one model with a shared representation and task-specific heads, each producing a calibrated probability or expected value. Ranking then uses a separate value function: V=∑twty^tV = \sum_t w_t \hat y_t,...


Submit Your Answer
Markdown supported