Model Drift Lab
Watch a prediction model degrade in real time as customer data shifts beneath it. Diagnose which features drifted, retrain to recover, and learn when monitoring alerts should fire across the model lifecycle.
OVERVIEW & WHAT THIS TOOL SOLVES
Shipping an accurate churn or lead-scoring model is only half the job. In live marketing operations, customer behavior, ad channels, and economic conditions shift continuously, causing model accuracy to decay quietly. Model Drift Lab simulates the post-deployment lifecycle over 18–24 months: watch Covariate Drift (shifting customer inputs) erode model F1, diagnose which features shifted with Population Stability Index (PSI) and Kolmogorov–Smirnov (KS) statistics, and retrain to recover performance. (Concept Drift, where the behavioral rules themselves change, is explained below for contrast but not simulated.)
🎯 Questions It Answers
- Is our deployed prediction model degrading because incoming customer profiles shifted (covariate drift) or because customer behavior itself changed (concept drift)?
- Which specific input features have crossed the PSI ≥ 0.25 alert threshold, and which show the largest KS gap?
- How much F1-score, accuracy, and retained revenue do we recover by retraining the model on fresh post-drift data?
📂 What Data You Need
- 4 Built-In Lifecycle Scenarios: E-Commerce Churn, Programmatic Ad CTR, Subscription Retention, and B2B Lead Scoring
- Reference Window: The first three months after launch (Months 1–3), establishing expected feature distributions
- Monitoring Stream: Every later monthly cohort (Month 4 to the end of an 18- to 24-month timeline), compared against the reference window
💡 What You'll Discover
- Live Performance Timeline: Month-by-month F1 for your model against never-retrained and retrained-monthly references, with a drift onset marker
- Feature Drift Diagnostic Table: Per-feature PSI scores, KS statistics, and green/amber/red traffic-light alerts
- Retraining Recovery Comparison: A before vs. after accuracy table for every retrain, with the recovery visible on the F1 timeline
🔍 Key Nuances & Common Traps to Watch For
- Covariate Drift vs. Concept Drift: Covariate drift means P(X) changed (e.g., a new TikTok campaign brings in younger shoppers, shifting the age distribution) while P(Y|X) stayed the same. Concept drift means P(Y|X) changed (e.g., a competitor launches a cheaper plan, so the same usage level now churns at twice the old rate).
- Why PSI Can Stay Green During Pure Concept Drift: PSI and KS compare only input feature distributions between the training window and today. If customers look identical on paper while their buying rules have changed, PSI stays < 0.10 even as your F1-score crashes. Monitor both input drift (PSI/KS) and outcome performance (F1/AUC).
- Industry PSI Alert Thresholds: PSI < 0.10 indicates a stable distribution (green); 0.10 ≤ PSI < 0.25 signals moderate shift to investigate (amber); PSI ≥ 0.25 indicates major drift requiring model recalibration or retraining (red).
📐 Under the Hood: Model Equations & Variable Definitions
1. Population Stability Index (PSI) & Two-Sample Kolmogorov–Smirnov (KS) Statistic
💬 Read it in plain English: PSI bins a feature into deciles and sums the symmetric divergence between today's bin shares and the training baseline's bin shares. The KS statistic finds the single widest vertical gap between the training and monitoring cumulative distribution curves.
2. Classification Performance Metrics (Precision, Recall & F1-Score)
💬 Read it in plain English: Precision measures how many flagged customers actually churned (avoiding wasted retention offers), and Recall measures what share of actual churners the model caught. F1 is their harmonic mean, so it falls sharply whenever either Precision or Recall drops.
UNDERSTANDING DRIFT: WHY MODELS BREAK
Before loading a scenario, walk through what model drift is, why it happens, and how to spot it before accuracy drops.
Data Drift (Covariate Shift)
The input features change distribution: customer ages skew older, ad spend shifts, or seasonal patterns break. The model was trained on a population that no longer matches reality.
Concept Drift (Posterior Shift)
The relationship between inputs and outcomes changes: the same customer profile that used to churn now stays (or vice versa). Features look stable, while the mapping from features → target has broken.
📝 This lab simulates data drift (covariate shift). Concept drift is shown for contrast so you know what PSI can and cannot catch.
🔑 Leading vs. Lagging Indicators
Watch for this gap in the scenarios below. The feature drift chart (PSI bars) often lights up months before the F1 line starts falling, giving you time to act before performance erodes. Also compare accuracy against F1: sometimes accuracy stays flat while F1 craters, a pattern called the accuracy paradox.
MARKETING SCENARIOS
Select a scenario above to load a marketing case study and explore model drift interactively.
👆 Select a marketing scenario above to begin exploring model drift.
YOUR MODEL WAS GOOD ONCE
Meet your model in its prime. These are the performance metrics from the first few months after deployment, when training data and real-world data still matched. Take note of where you're starting. Everything that follows is downhill.
Model Health
Baseline Performance
✅ All systems go. The model was trained on data that accurately represents the current customer population. Feature distributions match training data. No drift detected.
WATCH IT DRIFT
Use the timeline scrubber to advance through time. Watch the model's health degrade as real-world data diverges from what the model was trained on. Hit Play for an animated view, or drag the slider manually.
👀 What to watch for: Start by dragging slowly. The amber F1 line reveals month by month so you cannot see the future, just like in production. The PSI bars (feature drift) often light up before the F1 line drops, showing the leading-versus-lagging gap. The Timeline Events log below narrates key moments, and the gauge and drift report track accuracy alongside F1.
- Events will appear here as you advance the timeline…
Performance Over Time ⏱ LAGGING INDICATOR
The bold amber line is your model's F1 Score, the metric that catches real degradation (read "Leading vs. Lagging Indicators" above). Reference lines: red dotted = never retrain, green dotted = retrain monthly. ⭐ stars mark your retrains. Check the gauge and drift report for accuracy comparison.
Model Health
Drift Report
Feature Drift (PSI by Feature) 🚨 LEADING INDICATOR
Each bar shows how much that feature's distribution has shifted from the reference period (first 3 months). Longer bars = more drift. This chart will show movement before accuracy drops. Healthy Warning Degraded
Distribution Shift: Top Feature 🚨 LEADING INDICATOR
Grey = reference distribution (training period). Blue = current month's distribution. Watch the two curves separate as drift progresses; this visual separation appears before accuracy drops. The PSI & KS values in the corner quantify the shift.
DIAGNOSE THE SHIFT
Pick a reference window and a monitoring window to see which features shifted and by how much. This comparison pinpoints why the model degraded.
💡 When to use this: Once you've seen the gauge turn yellow in Step 2, come here to investigate. Set the reference window to an early month (before drift) and the monitoring window to the month where things went wrong.
👆 Click Compare Windows above to see per-feature distribution overlays.
Drift Breakdown
| Feature | PSI | KS Stat | Status |
|---|---|---|---|
| Compare two windows above to see per-feature drift statistics. | |||
💡 How to Read This Comparison
- Overlapping histograms: Grey (reference) and blue (monitoring) should largely overlap if no drift occurred. Separation = drift.
- PSI interpretation: < 0.10 = stable, 0.10–0.25 = moderate shift (investigate), ≥ 0.25 = significant shift (retrain).
- KS statistic: Captures the maximum point of divergence. Useful for detecting shifts that PSI's bin-based approach might average out.
- Which features drift first? Often one feature drifts before performance drops visibly, giving you an early warning signal.
Feature Means Over Time 📈 COVARIATE SHIFT TIMELINE
Each line tracks one feature's monthly average as a % change from its training-period mean. The dashed line at 0% is where training data sat. As lines pull away from zero, the model is scoring inputs outside its training range: covariate shift in action.
💡 How to Read This Chart
- 0% line = training normal. Each feature's mean during months 1–3 is the baseline (0%). Positive means the feature is higher than training; negative means lower.
- Lines separating from 0% = covariate shift. The inputs are drifting away from the training range while the model's fitted parameters remain fixed.
- Different features drift at different rates. Look for which feature diverges first, as it often serves as the scenario's leading indicator.
- After retraining, a fresh model recalibrates to the current means, whereas these lines keep the original model's baseline at 0%.
RETRAIN AND RECOVER
Once you see drift and identify which features shifted, click Retrain Model (above in Step 2) to fit on current data. Performance recovers immediately, then drifts again as you scrub forward. Retrain a second time to see the sawtooth pattern emerge.
The Sawtooth Pattern
In production, every prediction model follows this lifecycle:
Deploy → Drift → Retrain → Deploy → Drift → Retrain … This is normal. The question isn't whether to retrain, but when the cost of drift exceeds the cost of retraining. That's what monitoring thresholds decide.
⚠️ Retrain ceiling: Because only the inputs drift in this lab, retraining returns performance to roughly its launch level. In real deployments, retraining can hit a lower ceiling if the underlying customer behavior changed (concept drift), signaling that you need new features alongside fresh training data.
🛑 Why Not Retrain Every Month?
The green "retrained monthly" line above always looks best, yet automating a retrain every cycle carries real operational costs:
- Direct cost: Compute, engineering hours, QA testing, model validation. For a large recommender system, a single retrain can cost $10,000–$50,000+ in cloud compute alone.
- Contamination risk: Retraining on corrupted data (a logging bug, bot traffic, or a biased sample) bakes that error into the model. Automated retraining is safe only when your data pipeline is verified clean.
- Regulatory and governance: In finance, healthcare, and credit scoring, every model change requires documentation, audit trails, bias testing, and sometimes committee approval. You can't just silently swap models.
- Stakeholder trust: Business teams need to explain model decisions. A model that changes monthly is harder to interpret and debug. "The model says differently now" erodes confidence.
- Diminishing returns: When drift is minor (PSI < 0.10), the gain from retraining can be negligible: spending $20K to recover 0.3% of F1 rarely pays off.
Use the leading indicators in Step 3 to decide when drift is large enough to justify the cost and risk of retraining, avoiding both premature churn and prolonged degradation.
📊 Retrain Results
Retrain the model (Step 2) to see before/after performance comparisons here.
SET YOUR ALERT THRESHOLD
How sensitive should your drift monitoring be? A low PSI threshold catches problems early but triggers frequent (potentially unnecessary) retrains. A high threshold saves resources but risks longer periods of degraded performance. Find the sweet spot.
Adjust the alert threshold above and scrub through the full timeline to compare sensitivity levels. The goal is to catch drift before it hurts business results without triggering constant false alarms.
💡 The Monitoring Tradeoff
- Too sensitive (PSI < 0.1): Alerts fire on normal variation. You waste time and compute resources retraining models that were still performing fine.
- Too lenient (PSI > 0.25): You miss gradual degradation until F1 is already in the red zone. Months of suboptimal predictions go undetected.
- The sweet spot: Most production teams start with PSI = 0.10 and adjust based on the cost of false alarms vs. missed degradation for their specific use case.
- Real-world practice: Production teams often pair PSI thresholds with outcome tracking, alerting on either high PSI or a direct drop in F1 or accuracy.
EXPLORE FURTHER
🤔 Work Through These
- Speed of Drift: Compare the BrightCart (gradual) and MediaMax (regime change) scenarios. How many months does it take each model to cross from green to red? What does the speed difference tell you about the type of drift?
- Leading Indicators: In the FreshBrew scenario, which feature shows PSI drift before accuracy visibly drops? Could monitoring that single feature give you earlier warning than tracking accuracy alone?
- Retrain Ceiling: In the AdVantage scenario, retrain the model at month 12. Does accuracy return to its Step 1 baseline? This lab drifts only the inputs; in a real post-privacy-change data environment, why might a retrained model settle at a lower ceiling?
- Alert Threshold Tuning: Set the alert to PSI = 0.25 (lenient) and run through the BrightCart timeline. How many months of degraded performance occur before the alert fires? Now try PSI = 0.08. How many false alarms do you get?
- Cost of Drift: If a 1% drop in accuracy costs your company $50K/month in misallocated marketing spend, estimate the cumulative cost of not retraining in the MediaMax scenario between months 4 and 12.
- Beyond Retraining: When retraining can't restore original accuracy, what other interventions might help? Think about new features, different model architectures, or changes to the business process itself.
📚 Connecting to Broader Concepts
📊 Data Drift vs. Concept Drift
Data drift = input features shift (what this lab primarily shows). Concept drift = the relationship between inputs and outcomes changes. Both can degrade models, but concept drift is harder to detect because features may look stable while the target relationship shifts.
🔄 MLOps & Model Monitoring
In production, drift monitoring sits inside MLOps: deploying, tracking, and maintaining ML models over time. Tools like Evidently AI, WhyLabs, and AWS SageMaker Model Monitor automate the checks you ran manually here.
🧪 A/B Testing Retrained Models
Never deploy a retrained model blindly. Use A/B testing to compare the old model vs. the retrained model on live traffic. If the retrained model doesn't improve key business metrics, the drift might need a different intervention.
🛡️ Feature Engineering for Stability
Some features are inherently more stable than others. Ratios, ranks, and normalised scores tend to drift less than raw values. Designing drift-resistant features upfront reduces future monitoring burden.