← Back to Classic ML Mind Map
中文·English
📊 Classic MLID: psi-data-drift

Data Drift & PSI

数据漂移与 PSI
🎯Core Definition
PSI (Population Stability Index) is the most common metric for monitoring input-distribution drift, quantifying the binned divergence between the baseline (e.g. training) distribution and the current one: PSI=∑i(Ai−Bi)ln⁡AiBiPSI = \sum_i (A_i - B_i)\ln\frac{A_i}{B_i}, where AiA_i is the share of actual samples falling in bin ii and BiB_i the expected share; bins are typically deciles of the baseline distribution, empty actual bins are merged with neighbors to avoid division by zero, and PSI is essentially a symmetrized KL divergence. Rule of thumb: PSI<0.1PSI < 0.1 stable; 0.1≤PSI<0.250.1 \le PSI < 0.25 needs investigation; PSI≥0.25PSI \ge 0.25 signals significant drift and triggers retraining. Two drift types: covariate drift (P(X)P(X) changed, e.g. a new customer mix) and concept drift (P(Y∣X)P(Y|X) changed, e.g. default rates rose during COVID).
💡Use Cases
a must-have on weekly/monthly monitoring dashboards for credit and anti-fraud models; interview questions like "how do you detect model degradation in production" or "what to do when PSI exceeds the threshold"; compute per-feature PSI to rank offending variables, or one overall PSI over the model score, then localize root causes by PSI ranking.
⚡Key Problems Solved
unlike watching only online metrics such as AUC (labels arrive late, and no localization of the offending feature), PSI detects input-distribution drift per feature ahead of labels; combined with tiered thresholds (<0.1<0.1 stable / 0.1-0.250.1\text{-}0.25 watch / >0.25>0.25 drift) and retraining triggers, it closes the monitor—diagnose—retrain loop.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Data Drift & PSI.
Use Cases
In production engineering, what are the primary use cases for Data Drift & PSI and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Write PSI=∑i(Ai−Bi)ln⁡AiBiPSI = \sum_i (A_i - B_i)\ln\frac{A_i}{B_i} and define AiA_i/BiB_i; why is PSI = 0 when Ai=BiA_i = B_i? How does it relate to KL divergence?
2
PSI thresholds <0.1 / 0.1–0.25 / >0.25 and the action for each; how to handle zero bins (Bi=0B_i = 0 or Ai=0A_i = 0)?
3
Covariate drift vs concept drift: definitions, one real example each, and how each affects the model differently?
4
Why monitor PSI instead of online AUC alone? What are PSI's limitations (e.g. sensitivity to binning)?
5
The action pipeline when PSI ≥ 0.25 (attribute → retrain → rollback); how to distinguish real drift from data leakage or definition changes (feature/口径 change)?
Updated 2026-08-12
🎯
Test Your Knowledge: Practice Questions for "Data Drift & PSI"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice ➔
← Previous CardSHAP & LIMENext Card →Learning to Rank

🔗 More Classic ML Knowledge Cards

AdaBoost DerivationBagging & Random ForestBaum-Welch (HMM EM)GBDT Negative Gradient