M9-001M9: Senior ML & AI System DesignRecSys, Ads & Search ArchitectureHard
⚡Flashcard Drill➔Mastery:

Design a Billion-Scale Four-Stage Feed Recommendation Architecture

🎯 Active Recall Self-Check (Draft First, Verify After)
Login-free practice tracker: recall core answer, audit pitfalls, and log review status.
Step 1 · Draft your concise answer & assumptions
Step 2 · Check Pitfalls & Follow-up Inquiries
Next: M9-002 →
📐 Mathematical Definition
108→Recall 10ms103→Coarse 15ms300→Rank 35ms50→Re-Rank 15ms1010^8\xrightarrow{\text{Recall }10ms}10^3\xrightarrow{\text{Coarse }15ms}300\xrightarrow{\text{Rank }35ms}50\xrightarrow{\text{Re-Rank }15ms}10
⚡ One-Sentence Core Answer
Balance candidate scale and compute complexity across four stages: Dual-Tower ANN recall, distilled pre-ranker, MMoE fine ranker, and DPP diversity re-ranking within 100ms P99.

📌 Key Takeaways

  • •
    L1 SLA: 100M pool within 100ms P99 budget across feature hydration & 4 stages
  • •
    L2 Distillation: align coarse-ranker logits with fine-ranker Top-K via pairwise margin loss
  • •
    L2 Decoupled Scoring: encode User history once per request and broadcast across 300 Items
  • •
    L3 Ecological Health: DPP diversity scatter, exploration quota & server-side Bloom seen dedup

📐 Mathematical Derivations

Combine multi-task targets multiplicatively and distill fine-ranker rankings into coarse-ranker margin losses to preserve funnel consistency.

🏭 Production Trade-offs

1) Split User vs Item towers to avoid recomputing user sequence attention 300x; 2) Degrade cleanly to coarse-rank cache on P99 spike.
⚠️ Common Interview Pitfalls
  • ✕
    Omitting in-batch popularity debiasing collapses dual-tower recall
  • ✕
    Pointwise ranking ignores listwise diversity fatigue
  • ✕
    Client-only seen history breaks under retries
🎯 Interviewer Follow-up Inquiries
  • ?
    How do you shard ANN beyond single-node RAM limits at 10B scale?
  • ?
    How do you confirm short-term click weight bumps don't hurt 14-day retention?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
📚

Associated Knowledge Base Guides & Mindmaps

← PreviousM8-100: Explain the Principles and Protocols of Disagree and Commit in Cross-Functional Engineering Decision Making📋 Back to BankNext →M9-002: Design a Real-Time Ads Ranking, eCPM Calibration & Budget Pacing Architecture