KatInterview

Design a Social Feed Negative Feedback Prediction Model

Machine LearningModel answer
MediumModel answerMachine Learningmachine-learningsystem-designrecommendation-systems

Last updated

Architect an ML prediction pipeline to capture explicit and implicit user dissatisfaction on a social feed, handling extreme label skew, multi-task ranking, and real-time inference.

Design an end-to-end machine learning system that predicts negative user feedback (e.g., clicking "Hide post", "Show less", or reporting content) on a high-throughput personalized social media feed. The system must down-rank or filter unsatisfactory content without compromising overall long-term platform engagement.

Key Aspects to Address

  1. Label Strategy & Data Pipeline: How do you distinguish explicit negative events from implicit signals? Explain how training datasets are constructed, sampled, and recalibrated under severe class imbalance.
  2. Feature Taxonomy: What features differentiate personal user preference ("not interested") from broad safety issues ("offensive/policy violation")?
  3. Model Architecture & Serving: How do you structure the model to score candidates within a tight latency budget (e.g., 100ms total feed generation)?
  4. Integration Strategy: How are these predicted probabilities combined with positive engagement targets (likes, shares, comments, watch time) in the final ranking policy?
  5. Cold Start & Evaluation: How do you handle brand-new posts with zero impression history, and how do you validate model quality offline and online?

Scale Assumptions

  • Scale: 500M Daily Active Users (DAU), 5B daily feed requests (~60k QPS average, 150k peak).
  • Impressions: 50B viewable impressions per day.
  • Base Rate: Negative interactions occur on < 0.1% of impressions.
  • Latency Target: Heavy ranking pipeline budget is capped at 30–40ms.

Hints

Hint 1

Consider multi-task learning architectures (e.g., MMoE or PLE) to predict engagement and dissatisfaction simultaneously within the same forward pass.

Hint 2

When downsampling negative class examples in training, remember to apply mathematical recalibration to ensure correct output probabilities for the downstream value formula.

Hint 3

Distinguish between preference features (e.g., user-topic affinity) and quality/safety features (e.g., toxicity scores, global report rates) to avoid wrongly penalizing niche content.