Shipping a model is not the finish line. Ordinary software stays exactly as correct as it was on release day until someone changes the code. An AI system can get worse without anyone touching it, because the world feeding it keeps moving. That slow decay is called drift, and managing it is the heart of long-term AI maintenance.
In plain terms: A map is accurate the day it is printed. A year later new roads exist, and the map still looks confident while sending you down a closed street.
Diagram: Data drift happens when the distribution of production inputs moves away from the training data, for example when a firmware update changes the units a device reports. The model was never trained on the new range, so its accuracy degrades quietly. See the animated version.
Diagram: Data drift means the inputs change, such as new units or formats. Concept drift means the relationship between inputs and the correct answer changes, such as a fraud model facing a new procurement policy. Both cause silent decay without raising an error. See the animated version.
Diagram: Population Stability Index compares production data with the baseline, feature by feature. A common rule of thumb treats under 0.1 as stable, 0.1 to 0.25 as worth watching and above 0.25 as needing action. Kullback-Leibler divergence is another option, and the thresholds should be tuned to your data. See the animated version.
Diagram: Governance means keeping a central registry of every active model with its training data version, quantization, licence obligations and business owner, and defining a path from registration through monitoring and retraining to retirement. The example entry is illustrative. See the animated version.
Here is a PSI check in Python. It assumes baseline and current are NumPy arrays of one numeric feature. The 0.1 and 0.25 limits are common rules of thumb, not laws, so tune them to your data.
import numpy as np
def psi(baseline, current, bins: int = 10) -> float:
edges = np.quantile(baseline, np.linspace(0, 1, bins + 1)) # bins from the training data
edges[0], edges[-1] = -np.inf, np.inf
b = np.histogram(baseline, edges)[0] / len(baseline)
c = np.histogram(current, edges)[0] / len(current)
b, c = np.clip(b, 1e-6, None), np.clip(c, 1e-6, None) # avoid log(0)
return float(np.sum((c - b) * np.log(c / b)))
score = psi(train_latency_ms, last_week_latency_ms)
if score > 0.25:
print(f"PSI {score:.2f}: significant drift, investigate or retrain")
elif score > 0.10:
print(f"PSI {score:.2f}: moderate drift, watch closely")
else:
print(f"PSI {score:.2f}: stable")
Run a check like this per feature on a schedule, send the results to your monitoring system, and tie alerts to an owner listed in the inventory. Proactive governance catches silent failures before your users do.
Day 30: The 10-year horizon: architecting IT strategy for the AI-native enterprise.
Originally published at https://sureshpallapothu.in/blog/day-29-drift-and-governance, where this post includes animated diagrams.