Shift, drift, and noise
Three mechanisms
The Problem
Engineers and risk officers use one word—“drift”—for slow mix change, sudden regime breaks, and seasonal batch noise. Detectors and runbooks differ. Applying a gradual-drift playbook to an abrupt policy shock wastes days; treating holiday variance as concept drift burns credibility with the business.
LedgerRoute gives us three synthetic streams with the same feature schema: gradual online mix shift, abrupt label-rate change, and sinusoidal noise without structural change.
Where vocabulary fails
Alert fatigue and wrong runbooks
The Challenge
False alarms at scale
Monitoring dozens of features every hour multiplies false positives unless you control multiplicity. Seasonal class-balance fluctuation can look like drift until window length matches the business cycle (payroll weeks, quarter close, holiday spend).
In this seed a CUSUM on normalized daily channel mix fires mid-stream; the noise-only stream does not cross the same threshold. That separation is what you want from detector design—not identical alerts on every wiggle.
Operational mistakes
Our approach
Name the mechanism first
The Solution
Name the mechanism, then pick the response
Gradual covariate drift: scheduled evaluation, segment metrics, planned retrain windows. Abrupt concept or policy shift: rollback, feature flags, human gate. Noise: longer windows, stratified sampling, or seasonal baselines before paging.
Gradual
CUSUM / PSI + segment accuracy → scheduled retrain.
Abrupt
Changepoint on outcomes → policy rollback or threshold freeze.
Noise
Extend window; compare to same calendar week last year.
Replay
Re-score historical week offline before changing production.
What changes in operations
Code for CUSUM and overlays
Three-stream comparison
Implementation
def cusum(series, threshold=5.0, drift=0.0):
s_pos = s_neg = 0.0
alarms = []
for i, x in enumerate(series):
s_pos = max(0, s_pos + x - drift)
s_neg = max(0, s_neg - x - drift)
if s_pos > threshold or s_neg > threshold:
alarms.append(i)
s_pos = s_neg = 0.0
return alarms
Key points
- Overlay plot: Three normalized daily signals in one figure for teaching.
- Detector choice: Match test to suspected mechanism before automating response.
- Window length: Align to business cycle, not only to statistical convenience.
Summary
Runbooks that match physics
What this run shows
Side-by-side curves make the vocabulary concrete. Teams that separate runbooks respond faster than teams that retrain on noise.
CUSUM on mix
Fires on gradual stream in this seed.
Noise stream
Does not cross the same threshold without a real shift.
Runbook split
Retrain schedules ≠ rollback ≠ wait-and-measure.
Questions answered
Production insights
On-call card
Click to revealPrint three bullets: gradual → segment eval; abrupt → policy/rollback; noise → extend window.
Holiday baselines
Click to revealCompare to last year’s same ISO week before paging in Q4.
Alert budget
Click to revealCap pages per service per day; overflow goes to digest.
Post-incident
Click to revealTag alerts with mechanism after triage—train the team, not just the model.
Continue this saga
Next chapter: Modalities and governance.