Data drift is when the data flowing into a deployed model stops looking like the data it was trained on. No exception is thrown — the model keeps answering, just on a world that has quietly moved. Accuracy decays in the dark unless something is watching for the shift.
Where you meet it
- A fraud model trained pre-holiday-season — then spending patterns flip in December.
- A recommender that learned on last year's catalogue while tastes and inventory turn over.
- An upstream change — a new app version, a sensor swap, a logging bug — that rewrites the inputs.
- Any long-lived production model: the world is non-stationary, training data is a snapshot.
What it does
It breaks the one assumption every supervised model rests on: that production data is drawn from the same distribution as training data. Once that breaks, yesterday's learned mapping is being applied to inputs it never really saw — so the predictions get steadily, silently worse.
Drift throws no error — the model keeps answering confidently while the world quietly moves out from under it.
How it works
A model learns a joint distribution that factors as P(X, Y) = P(Y | X) · P(X) — P(X) is the inputs, P(Y | X) is the relationship from inputs to the target. Drift means one of these changes between training and production:
- Data / covariate drift —
P(X)shifts. The inputs move (new users, new price ranges) but the ruleX → Ystill holds. This is what the PSI tool above measures: one feature's live histogram pulling away from the baseline. - Concept drift —
P(Y | X)changes. The relationship itself moves: the same input now implies a different label. "Spam" evolves; "fraud" learns new tricks. The inputs can look identical and the model still goes wrong.
You detect drift two ways. Compare distributions — bin reference vs. live and score the gap with the Population Stability Index (PSI = Σ (live − ref)·ln(live / ref)) or a Kolmogorov–Smirnov test on the two samples; this needs no labels, so it fires early. Watch performance — track the live metric directly; this is the ground truth, but it needs labels you often only get later.
Watch out
- The performance signal arrives late. True labels (the actual fraud, the real conversion) often land days or weeks after the prediction — so a drop in live accuracy is the last thing you see, not the first. Distribution checks are your early warning.
- Drift ≠ always a problem. Inputs can shift without hurting accuracy (covariate drift in a region the model handles fine). Don't retrain on every alarm — confirm it actually moves the metric.
- Thresholds and seasonality. A fixed PSI cutoff flags every Monday and every December. Calibrate to your data's natural rhythm or you drown in false alarms.
- Detection is not the fix. The drift score is only a signal. The response is a loop: monitor → alert → retrain on fresh data, or roll back — before users feel it.
Go deeper
Data Drift heißt: Die Daten, die in ein deploytes Modell fließen, sehen nicht mehr aus wie die Trainingsdaten. Es fliegt keine Exception — das Modell antwortet weiter, nur auf einer Welt, die sich leise verschoben hat. Die Genauigkeit zerfällt im Dunkeln, solange niemand auf den Shift achtet.
Wo es vorkommt
- Ein Fraud-Modell, vor der Saison trainiert — dann kippen die Ausgabemuster im Dezember.
- Ein Recommender, der auf dem letztjährigen Katalog lernte, während Geschmack und Sortiment sich drehen.
- Eine Upstream-Änderung — neue App-Version, getauschter Sensor, Logging-Bug — die die Eingaben umschreibt.
- Jedes langlebige Produktionsmodell: Die Welt ist nicht-stationär, Trainingsdaten sind eine Momentaufnahme.
Was es tut
Es bricht die eine Annahme, auf der jedes überwachte Modell ruht: dass Produktionsdaten aus derselben Verteilung stammen wie die Trainingsdaten. Bricht das, wird das gelernte Mapping von gestern auf Eingaben angewandt, die es nie richtig gesehen hat — und die Vorhersagen werden stetig, still schlechter.
Drift wirft keinen Fehler — das Modell antwortet weiter selbstbewusst, während die Welt sich leise unter ihm wegbewegt.
Wie es funktioniert
Ein Modell lernt eine gemeinsame Verteilung, die sich faktorisiert als P(X, Y) = P(Y | X) · P(X) — P(X) sind die Eingaben, P(Y | X) ist die Beziehung von Eingabe zum Ziel. Drift heißt: Eines davon ändert sich zwischen Training und Produktion:
- Data Drift / Covariate Drift —
P(X)verschiebt sich. Die Eingaben wandern (neue Nutzer, neue Preisbereiche), aber die RegelX → Ygilt weiter. Genau das misst das PSI-Tool oben: das Live-Histogramm eines Features zieht von der Baseline weg. - Concept Drift —
P(Y | X)ändert sich. Die Beziehung selbst wandert: dieselbe Eingabe bedeutet jetzt ein anderes Label. "Spam" entwickelt sich, "Fraud" lernt neue Tricks. Die Eingaben können identisch aussehen — und das Modell liegt trotzdem falsch.
Erkannt wird Drift auf zwei Wegen. Verteilungen vergleichen — Referenz vs. Live binnen und die Lücke scoren, mit dem Population Stability Index (PSI = Σ (live − ref)·ln(live / ref)) oder einem Kolmogorow-Smirnow-Test auf beide Stichproben; das braucht keine Labels und schlägt darum früh an. Performance überwachen — die Live-Metrik direkt verfolgen; das ist die Wahrheit, braucht aber Labels, die oft erst verspätet kommen.
Worauf achten
- Das Performance-Signal kommt spät. Echte Labels (der tatsächliche Betrug, die reale Conversion) treffen oft erst Tage oder Wochen nach der Vorhersage ein — eine sinkende Live-Metrik siehst du also zuletzt, nicht zuerst. Verteilungs-Checks sind dein Frühwarnsystem.
- Drift ≠ immer schlecht. Eingaben können sich verschieben, ohne die Genauigkeit zu treffen (Covariate Drift in einem Bereich, den das Modell sicher abdeckt). Nicht bei jedem Alarm retrainieren — erst prüfen, ob die Metrik wirklich kippt.
- Schwellen und Saisonalität. Ein fester PSI-Cutoff feuert an jedem Montag und jedem Dezember. Auf den natürlichen Rhythmus der Daten kalibrieren, sonst ertrinkst du in Fehlalarmen.
- Erkennen ist nicht das Gegenmittel. Der Drift-Score ist nur ein Signal. Die Antwort ist ein Loop: Monitoring → Alerting → auf frischen Daten retrainieren oder zurückrollen — bevor Nutzer es merken.