Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Updating the map
A city map is accurate the day it is printed and less so every month as streets change. Reprinting it every week is expensive; drawing it from every survey ever made would include streets that no longer exist; and reprinting it from a survey with a printing error spreads the error. Retraining a model has the same trade-offs: how often to refresh, how much past data to trust, and how to make sure the new version is actually better.
Weekly retraining on the last 30 labelled days reaches mean accuracy 0.7994 with labels 7 days late (best possible 0.8064).
N4-2, seed 0: two years of slow drift, a yearly season and a sudden change on day 400. Retrain often on recent data; all history anchors the model to a world that no longer exists.
In Exercise 2, a model never retrained fell to 0.55 accuracy over two years; retraining weekly on the last 30 days kept it at 0.80, within a point of the best possible, while monthly retraining on all history reached only 0.68.
- 1. A model that is never retrained in a changing world…
- 2. Training on all past data can hurt because…
- 3. Retraining can be triggered by…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Periodic retraining: on a fixed schedule (daily, weekly, monthly), regardless of measured change.
- Triggered retraining: when a monitor fires (topic N4-1): labelled accuracy drop, drift statistics, or new data volume.
- Training window: a sliding window of the last W days, all history, or exponentially decaying sample weights (half-life h).
- Label delay: the newest usable training data are as old as the label delay.
- Warm start and online learning: updating the current model with new data instead of training from scratch.
- Gating: a retrained candidate replaces the current model only if it passes checks (topic N3-4), ideally on trusted data.
- Continuous training (CT): an automated pipeline that retrains, evaluates, registers and deploys (topics N2-2, N2-3).
- 1. Exponential forgetting gives each example a weight that…
- 2. Label delay means the newest training data are…
- 3. A gate on retrained models…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.Two years of a changing world
Exercise 1.
- World: 6 features, logistic labels; the first two weights rotate 0.004 radians a day, the third swings with a yearly season, and on day 400 the fourth weight changes sign.
- 200 labelled examples a day, usable 7 days later; daily accuracy measured on 1,000 fresh examples.
- Logistic regression fitted by Newton’s method (iteratively reweighted least squares) with optional sample weights.
- Best possible accuracy: that of the true weights, about 0.81.
Practice.
- Retrain on a schedule that matches the drift, and add triggers for sudden changes.
- Use recent data, with a window or forgetting rate chosen on past data.
- Shorten label delay where possible; it limits every strategy.
- Gate every retrained model on trusted, independently labelled data before it replaces the current one.
- Weigh retraining cost against the value of accuracy.
for t in range(days):
if t - last_retrain >= period: # or: a monitor fired
days_used = range(t - delay - window, t - delay)
X, y = concat(data[d] for d in days_used)
candidate = fit(X, y)
if passes_gate(candidate, current, trusted_set):
current = candidate
last_retrain = t- 1. With fast drift, the best training window is…
- 2. Automatic retraining on buggy labels…
- 3. The best retraining period grows with…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Staleness. Under steady drift at rate ω, a model trained on days [t − δ − W, t − δ) describes the world on average δ + W/2 days ago; between retrains every T days it ages by up to T more. The average lag is δ + W/2 + T/2, so label delay, window length and retraining period add up. Accuracy loss grows faster than linearly with the angle, which is why short lags cost little and long ones cost a lot.
Variance. A short window has few examples and a noisy fit. The best window balances the two: long under slow drift, short under fast drift. Exponential weights with ratio r = 2^(−1/h) per day give an effective sample of (Σw)²/Σw² = (1 + r)/(1 − r) days of data, about 2.9h for large h, while favouring the newest days.
History. Training on all history fits the average world of the past. Under drift that average lags further behind every month, so more data makes the model worse, not better.
Economics. Retraining every T days costs C/T a day and loses V·L(T) a day, where L(T) is the accuracy lost relative to continuous retraining. The optimum satisfies C = V·T²·L’(T); if L(T) = kT^α, then T* = (C/(Vkα))^(1/(α + 1)), the square-root rule for α = 1.
- 1. The average lag of a retrained model is…
- 2. Exponential weights with half-life h use about how many days of data?
- 3. Under drift, training on all history…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.How often and on what data should a model be retrained when the world drifts slowly, follows seasons and sometimes changes suddenly?
History.
- G. Widmer and M. Kubat (1996) introduced windowing with adaptive size for concept drift; R. Klinkenberg and T. Joachims (2000) chose windows by estimated error; A. Bifet and R. Gavaldà (2007) proposed ADWIN, an adaptive window with guarantees.
- J. Gama and colleagues (2014) surveyed adaptation strategies (windows, forgetting, triggers, ensembles).
- Production practice was shaped by large platforms: Facebook reported in 2018 that some models are retrained hourly to daily, and Google’s TFX (2017) and “continuous training” pipelines (2020) automated retraining with validation gates.
Exercise 2.
- Two years, 200 labelled examples a day with labels 7 days late; first model on day 37.
- Strategies: never retrain; every 90 days on the last 90 days; every 30 days on the last 30 days; every 7 days on the last 30 days; every 30 days on all history (a uniform sample of 6,000); and when labelled accuracy over the last week falls 3 points below its value at the last retrain, on the last 30 days.
Seed 0 (best possible accuracy 0.8064):
| strategy | mean accuracy from day 100 | worst 30-day mean | days 400 to 459 | retrains |
|---|---|---|---|---|
| never retrain | 0.5526 | 0.3316 | 0.5445 | 0 |
| every 90 days, last 90 days | 0.7596 | 0.6683 | 0.6802 | 7 |
| every 30 days, last 30 days | 0.7962 | 0.7378 | 0.7776 | 23 |
| every 7 days, last 30 days | 0.8014 | 0.7633 | 0.7955 | 98 |
| every 30 days, all history | 0.6784 | 0.5570 | 0.6584 | 23 |
| when accuracy drops 3 points | 0.7846 | 0.7440 | 0.7786 | 11 |
Seeds 1 and 2 (best possible 0.8069 and 0.8063): never 0.5541 and 0.5558; every 90 days 0.7576 and 0.7592; every 30 days 0.7931 and 0.7948; every 7 days 0.7987 and 0.8000; all history 0.6784 and 0.6788; triggered 0.7787 and 0.7841 with 11 and 13 retrains.
Findings.
- Weekly retraining on the last 30 days stayed within 0.5 to 0.8 points of the best possible accuracy in every seed.
- Monthly retraining on all history was worse than retraining every 90 days on 90 days (0.68 against 0.76): under drift, old data mislead.
- Triggered retraining needed about half the retrains of the monthly schedule (11 to 13 against 23) for most of its gain (0.78 against 0.79 to 0.80), but reacted more slowly to gradual change, which never produces a sudden drop.
Retraining in practice
- Schedules range from hourly (ads, recommendations, with continuous data) to quarterly (credit scoring, with regulatory validation); many teams combine a schedule with drift or performance triggers.
- Continuous training pipelines (TFX, Kubeflow, SageMaker Pipelines, Vertex AI Pipelines) retrain, validate against the current model and trusted sets, register and deploy behind canaries.
- Online and incremental learning update models with every batch, useful for fast drift but harder to validate and roll back.
- Remote-sensing models are retrained when instruments are recalibrated or new sensors join a constellation; trusted ground-truth campaigns serve as the gate.
References
- G. Widmer and M. Kubat (1996). “Learning in the presence of concept drift and hidden contexts.” Machine Learning.
- R. Klinkenberg and T. Joachims (2000). “Detecting concept drift with support vector machines.” ICML.
- A. Bifet and R. Gavaldà (2007). “Learning from time-changing data with adaptive windowing.” SIAM International Conference on Data Mining.
- J. Gama, I. Žliobaitė, A. Bifet, M. Pechenizkiy and A. Bouchachia (2014). “A survey on concept drift adaptation.” ACM Computing Surveys.
- K. Hazelwood and colleagues (2018). “Applied machine learning at Facebook: a datacenter infrastructure perspective.” HPCA.
- D. Baylor and colleagues (2017). “TFX: a TensorFlow-based production-scale machine learning platform.” KDD.