M7-010Medium监控与治理 · Monitoring & governance
模型上线后如何监控?什么是数据漂移与概念漂移?
How do you monitor a model after launch? What is data drift versus concept drift?
💡 考场高分一句话答案:
监控输入分布(数据漂移)、输入-输出关系(概念漂移)、以及业务指标;用 PSI/KL 检测分布变化,用滚动评估检测性能衰减。
Monitor the input distribution (data drift), the input-output relationship (concept drift) and business metrics. Use PSI or KL divergence for distribution shift and rolling evaluation for performance decay.
📌 核心考察要点 (Key Points)
- 数据漂移:特征分布变化(PSI > 0.1 预警),但 $P(y\mid x)$ 不变
- 概念漂移:$P(y\mid x)$ 变化(如用户偏好变了),需要重新训练
- 监控三层:系统层(延迟/错误率)、数据层(分布/缺失)、业务层(CTR/转化)
- 告警设计:用相对变化 + 绝对阈值双条件,避免告警疲劳
- Data drift: feature distributions change while $P(y\mid x)$ is stable; PSI above 0.1 is an early warning
- Concept drift: $P(y\mid x)$ changes, for example because preferences shifted, so retraining is required
- Three monitoring layers: system (latency, errors), data (distribution, missingness), business (CTR, conversion)
- Alerting: require both a relative change and an absolute threshold to avoid alert fatigue
⚖️ 业务权衡与取舍 (Trade-offs & Calibration)
漂移监控最常见的失败是只监控特征不监控性能:特征分布变了但性能没变,说明模型鲁棒;性能掉了但特征没变,说明是概念漂移。两者要分开告警,否则无法定位。
⚠️ 常见高频面试陷阱与避坑指南
- 用固定阈值监控分布,忽略季节性
- 只监控离线指标,不做线上影子评估
🔍 大厂面试官连环追问 (Follow-ups)
- PSI 怎么算?
- 如何区分漂移与数据 bug?
嫌字多看太累?进入苏格拉底式对话推演实验室
零打字负担,以大厂考官真实困境切入,通过点选直觉选项暴露思维盲区,手把手推导 Why。
⚡
想检验本题的肌肉记忆?进入 3 阶闪卡主动回忆盲测
隐藏答案遮罩,自测:审题锚点 ➔ 数理公式机理 ➔ 工业标杆代码与连环追问。3 分钟攻破认知盲区!