Skip to content
All work

Research · Data and baseline detectors

DriftSentinel

Concept-drift detectors only react after a streaming model's error rate has already risen — DriftSentinel aims to warn before that happens.

  • Python
  • River
  • pandas
  • NumPy
  • Streaming ML
Mean PSI per batch: drift injected at batches 89–93, DDM alarm at 138, ADWIN alarm at 163

Problem

Classical drift detectors such as ADWIN and DDM watch a model’s error rate, so they only fire after accuracy has already dropped. For streaming ML systems, an earlier warning would give time to retrain or fall back before predictions go bad.

What I built

DriftSentinel is a team research project. My part was the first phase: the data pipeline and the classical baselines the model is measured against.

  • A pipeline that computes per-batch summary signals on a data stream: mean and variance shift, Population Stability Index (PSI) and a model-confidence trend.
  • Wrappers around the ADWIN, DDM and KSWIN baseline detectors that log when each one raises an alarm.
  • Labelled datasets from a synthetic SEA stream (exact, controlled drift) and two real benchmarks, Elec2 and Insects.

Architecture

  1. Stream → batches. Each batch is compared with a rolling reference window to produce the summary signals.
  2. Baselines. ADWIN, DDM and KSWIN run alongside and record when they would have alarmed.
  3. Labels. Each batch is marked 1 if a real drift event starts within the next few batches — the training target.
  4. Sequence model. Sliding windows of consecutive batches feed a model that predicts drift ahead of time, so its lead time can be compared with the baselines.

Results

On a synthetic SEA stream with drift injected at instance 5,000:

  • The ground-truth drift window was flagged at batch 89–93.
  • DDM’s alarm fired at batch 138, ADWIN’s at batch 163.

The summary-statistic signals were already moving dozens of batches before the classical detectors reacted — the gap DriftSentinel is designed to learn.

Tech stack

  • Streaming ML: River (ADWIN, DDM, KSWIN, SEA stream, Elec2, Insects)
  • Data: Python, pandas, NumPy
  • Signals: mean / variance shift, PSI, confidence trend

Next project

LeafGuard

Detects crop leaf diseases from a single photo, so plant health problems can be caught before they spread across a field.

Grid of leaf photos labelled by crop and disease