⚡闪卡盲测➔
L2S1 · 商业 ROIS2 · 数据与检索S5 · 评测与观测S6 · 安全与成本Verified: 2026-11-30

L2 系统设计 · 百万 QPS 多阶段推荐系统(Two-Tower 召回 ➔ DLRM 精排 ➔ 重排)

对标 YouTube / Meta / TikTok Staff MLE 终面核心架构:在 <50ms 端到端延迟与千万级候选池约束下,设计多路召回(Two-Tower ANN + 实时序列特征)、亿维稀疏 Embedding 参数分片精排(DLRM/DCNv2)、多样性重排与 CUPED 在线实验评估闭环。

适用场景 (Best For)

冲刺 Meta / Google / TikTok / Pinterest / Netflix Senior–Staff MLE 推荐与广告排序系统设计终面。

人机边界 (Human-AI Boundary)

模型自动完成个性化召回排序;运营与安全团队控制硬性安全护栏(违法内容降权/品牌安全黑名单)以及实验流量灰度回滚阈值。

常见反模式与避坑 (Anti-Patterns)

  • Scoring all 10M candidates with heavy cross-feature DLRM/Transformer models directly instead of cascading funnel pruning
  • Using random negative sampling without correcting for popularity/selection bias (LogQ correction) in Two-Tower softmax training

延迟成本与评测门禁

Retrieval (500 cands) <= 12ms -> Feature Hydration <= 8ms -> DLRM Ranker (FP16/INT8) <= 18ms -> Re-rank <= 5ms (< 45ms P99) · GPU HBM capacity for sparse ID embedding tables + cross-rack All-to-All communication during batch scoring

  • Offline Recall@500 & Normalized Entropy (NE) vs Online North-Star Lift: Recall@500 >= 0.88; Calibration Bias (Predicted CTR / Empirical CTR) within [0.98, 1.02] (Guard against offline-online metric mismatch via IPS counterfactual replay and CUPED A/B guardrails)
  • Feature Skew & Tail Latency SLA: PSI < 0.05 between offline Iceberg logs and Redis online hydration; P99 E2E < 50ms (Log exact online feature snapshot at inference time for zero-skew training data join)

💰 商业 ROI 模型与证据等级

verified_benchmark

通过在线双塔序列更新与 LogQ 纠偏将冷启动新内容分发曝光率提升 22%;使用 CUPED 方差缩减把线上 A/B 实验所需流量周期缩短 35%–45%。

🏗️ 端到端系统架构流水线

Step 1: 多路并行召回(Two-Tower ANN + 实时序列 + 协同图)

用户塔实时消费最近 50 次点击推理向量,物品塔离线批量构建并经 CDC 增量刷新 HNSW/IVF-PQ 索引,12ms 内召回 1,000 候选。

Step 2: 特征水合 ➔ 多任务 DLRM/MMoE 精排 ➔ 业务多样性重排

批量拉取交叉特征,通过混合精度 DLRM/MMoE 联合预估 CTR/WatchTime/Hide 概率并校准,再经 DPP 去重与频控输出终榜。

⚖️ 工程选型与架构权衡矩阵

Decoupled Two-Tower (Recall) + Cross-Feature DLRM (Ranking)
适用条件:千万级物品库且要求 <50ms P99 的高并发信息流主链路。
核心权衡:支持内积 ANN 毫秒检索,但早期点积无法建模高阶交叉特征,必须由精排补齐。
Generative / Listwise Transformer Re-Ranker (Top-50)
适用条件:精排末尾小集合上下文感知重排(解决连续同类疲劳与位置偏差)。
核心权衡:显著提升整屏组合收益与多样性,需严格限制输入长度 <= 50 条以控延迟。

📊 同类技术选型与基准对比

  • LogQ-Corrected In-Batch Negatives vs Naive Uniform Negatives: improves cold-item Recall@100 by +11% while eliminating popularity over-suppression.

🚨 生产失效模式与可观测特征

  • Feedback loop echo chamber causing stale items to dominate when online exploration (epsilon-greedy/Thompson) is disabled
  • Online-offline feature skew when real-time click counters in Redis drift from offline batch backfills

🛡️ 合规边界与治理硬约束

  • GDPR/CCPA personalized-profiling opt-out fallback to non-personalized popularity/context towers
  • Hard trust-and-safety policy filtering prior to final feed rendering

🎤 面试高频追问与架构答辩题

  1. Why does increasing offline AUC by +0.5% in DLRM sometimes yield zero or negative online engagement lift, and how do you diagnose it?
⚡
想检验本题的肌肉记忆?进入 3 阶闪卡主动回忆盲测
隐藏答案遮罩,自测:审题锚点 ➔ 数理公式机理 ➔ 工业标杆代码与连环追问。3 分钟攻破认知盲区!
🎯 立即在闪卡中盲测此题➔

上下游关联知识链路

[HubB] 岗位能力透镜 · AI 推理优化工程师 (AI Inference Engineer)[HubB] 岗位能力透镜 · AI 研究科学家 (Research Scientist)[L0 Card] YouTube DNN 召回架构[L0 Card] Feature Store 一致性与穿越规避[L0 Card] 生产环境 PSI 特征漂移监控[L0 Card] 离线线上指标鸿沟与 A/B 验证[L0 Card] CUPED 方差缩减严格数学推导[L0 Card] 北极星指标设计与 Guardrail 护栏[L0] Qdrant Dense+SPLADE 混合检索与 RBAC 预过滤 HNSW 原语[L0] 大小模型置信度级联路由与成本-质量帕累托网关原语[L1] Stage 2 · 增量 CDC 文档同步、内容哈希幂等去重与向量墓碑清理模式[L1] Stage 5 · Prompt/模型双版本 Canary 影子灰度与指标统计门控模式[L1] Stage 1 · 影子模式对比验证(AI 建议 vs 人类专家)低风险启动模式

站内交互工具与信源依据