Data drift คือมีบางช่วงของข้อมูลตอน train ที่ model พยากรณ์ไม่ค่อยแม่น และบังเอิญ test set ก็มีวิวัฒนาการไปในทางที่มีข้อมูลช่วงเหล่านั้นมากขึ้นๆ ทำให้ความแม่นในการพยากรณ์ลดลง It simply means any change in the distribution of input data P(X) over time.
Concept drift คือ target function หรือ relationship ระหว่าง input feature & output label ค่อยๆวิวัฒนาการเปลี่ยนไป The conditional probability P(Y|X) changes over time. This means the exact same input features (X) now mean something different in terms of the target label (Y).
Concept drift vs data drift: https://www.dataversity.net/data-drift-vs-concept-drift-what-is-the-difference/#:~:text=Data%20drift%20refers%20to%20the,of%20a%20machine%20learning%20model.
Label/Concept drift and feature drift: https://www.youtube.com/watch?v=uOG685WFO00
Label shift: The overall frequency of the target labels P(Y) changes, while the conditional probability of features given the label P(X|Y) remains constant.
Covariate shift: The distribution of the input features P(X) changes (i.e., the relative frequencies, proportions, or probability densities of the feature values look different in production compared to when the model was trained.), but the underlying relationship between the features and the target label P(Y|X) stays constant.
===
You do not need to prevent all of them—and in fact, you cannot prevent all of them, nor is it always desirable to try.
How you handle each type of shift depends on whether it affects your model's predictions and whether the underlying reality has actually changed.
1. Covariate Shift: Usually Monitor, Sometimes Fix
Do you need to prevent it? Not always.
Why? If your model learned a robust, generalizable relationship ($P(Y \mid X)$) and your feature values ($P(X)$) just shift into a region the model can reasonably handle, the model will still perform well.
When to act: If the shift forces the model to extrapolate heavily into unfamiliar feature spaces where it makes wild errors, you should retrain the model on updated data or use domain adaptation techniques.
2. Data Drift: The "False Alarm" Trap
Do you need to prevent it? No, because data drift is just an umbrella metric.
Why? Monitoring tools love to flag data drift because $P(X)$ changes constantly in the real world (e.g., seasonal shopping trends, user base growth). However, a change in $P(X)$ does not automatically mean your model is broken.
When to act: Only investigate data drift if it correlates with a drop in actual business metrics or model accuracy. If the accuracy is fine, let the drift happen.
3. Label Shift: Easy to Fix (If Detected)
Do you need to prevent it? You can't prevent it (external reality causes it), but you must account for it.
Why? If the proportion of your target classes changes drastically (e.g., a sudden surge in fraudulent transactions), your model's output probabilities might become miscalibrated because it expects the old base rates.
How to handle: You don't necessarily need to retrain the whole model from scratch. Often, you can fix label shift simply by recalibrating the classification thresholds or applying a prior probability adjustment to the model's outputs.
4. Label Drift (Concept Drift): The Dangerous One—Must Fix
Do you need to prevent/fix it? Yes, absolutely.
Why? This is the most critical shift. The rules of reality have literally changed ($P(Y \mid X)$ is different). What used to mean "fraud" or "good credit" no longer does. If you do nothing, your model will systematically fail.
How to handle: You must retrain the model on recent data, set up automated continuous learning pipelines, or build models that weight recent data more heavily than old data.
Summary Strategy for MLOps
Instead of trying to achieve an impossible zero-drift environment:
Accept that the world changes: $P(X)$ and $P(Y)$ will always drift.
Monitor performance, not just stats: Track downstream business metrics and model accuracy (when ground truth becomes available) rather than panicking over every statistical $P(X)$ alert.
Prioritize Label Drift: Invest your engineering effort into catching concept drift quickly, as that is what actually degrades model intelligence.