Design a newsfeed dislike model
MetaMachine Learning Engineer · OnsiteLast updated
This problem tests the ability to design an end-to-end ML system for predicting user dissatisfaction, focusing on label definition, feature engineering, and the integration of negative signals into a ranking pipeline.
Problem Statement
Design a production ML system that predicts the probability of a user clicking "Dislike" or "Hide" on a social media newsfeed post. The goal is to use these predictions to down-rank content that creates a poor user experience.
Requirements
- Label Definition: Define what constitutes a "dislike" and how to handle implicit negative signals (e.g., hiding a post, reporting, or quickly scrolling past).
- Feature Engineering: Propose features that help distinguish between "content I don't like" and "content I find offensive/inappropriate."
- Model Architecture: Select a model type and explain how to handle the high class imbalance (dislikes are rare compared to views).
- System Integration: Explain how this model score should be integrated into an existing ranking system that is currently optimizing for engagement (likes, comments, time spent).
- Evaluation: Define offline metrics (besides AUC/LogLoss) and online metrics to monitor the success of this model.
Scale Assumptions
- Daily Active Users (DAU): 500 million.
- Feed request latency budget: 100ms.
- Negative feedback events are sparse relative to total impressions.
Deliverables
- Describe the training data pipeline (data windowing and negative sampling).
- Explain the serving architecture: how do you score items without bloating the latency of the feed generation?
- How do you address the 'cold start' problem for new posts?
Hints
Hint 1
Consider the difference between a direct user action (like/dislike) and an inferred signal (scrolling speed), and how you might weight these labels differently.
Hint 2
Think about the ranking objective: should you subtract the dislike score from the engagement score, or treat it as a separate constraint/threshold?
Hint 3
Address the class imbalance by discussing techniques like oversampling the minority class or using cost-sensitive learning.
Follow-up questions
- How would you measure the trade-off between increasing user satisfaction (long-term retention) and potentially decreasing short-term engagement (e.g., click-through rates)?
- If a specific creator receives a high volume of dislikes, how should the system differentiate between 'bad content' and 'brigading' or malicious reporting?
- How would you handle model drift if users' content preferences change significantly during a holiday or major global event?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.