Practical MLOps · Monitoring and response layer

ML Model Monitoring: Drift Detection and Safe Retraining

ML model monitoring combines service health, data quality, distribution change, model behavior, and business outcomes. Drift is a diagnostic signal, not an automatic reason to retrain. A production loop needs baselines, thresholds, delayed-label handling, an owner, a response policy, and promotion gates.

Documented from official sources

Direct answer

ML model monitoring combines service health, data quality, distribution change, model behavior, and business outcomes. Drift is a diagnostic signal, not an automatic reason to retrain. A production loop needs baselines, thresholds, delayed-label handling, an owner, a response policy, and promotion gates before a new model replaces the current version.

Monitoring architecture and system ownership

  1. Request & FeaturesInput data + features logged
  2. PredictionModel output logged
  3. Operational MetricsLatency, error rate, throughput (Prometheus)
  4. Feature & Prediction StoreDurable log for drift analysis
  5. Delayed LabelsGround truth arrives later
  6. EvaluationCompare current vs baseline
  7. AlertRouted to owner with runbook
  8. InvestigationHuman or policy decides response
  9. Retraining CandidateNew model via CT loop

Monitoring is not one signal. It is five layers: infrastructure, data quality, distributions, model performance, and business outcomes — each with its own owner and response.

Monitoring layers and their owners

Each layer answers a different question. Conflating them leads to alert fatigue or missed degradation.
ProblemOwning systemSource of truthHandoffReason
Infrastructure and service healthPrometheus and GrafanaCPU, memory, GPU, latency, error rate, throughput time seriesAlerts to on-call SRE / platform teamInfrastructure monitoring tells you the system is up, not that the model is correct.
Data and schema qualityData quality checks (batch or streaming)Null rates, type errors, out-of-bounds values, schema conformanceAlerts to data engineering teamBad input data produces bad predictions regardless of model quality. This is a data problem, not a model problem.
Input and prediction distribution change (drift)Drift detection job (Evidently, custom, or managed)Statistical tests comparing current window to baselineAlerts to ML engineering team for investigationDrift means the world changed. It does not mean the model is bad — it means someone should investigate.
Model performance with labelsEvaluation job (requires delayed labels)Accuracy, precision, recall, F1, RMSE on real outcomesAlerts to ML engineering team; may trigger retrainingThis is the only layer that directly measures model quality. It requires ground truth, which often arrives late.
Business outcome and fairnessBusiness metrics and fairness monitoringConversion, revenue, cost per prediction, fairness metrics per segmentAlerts to product and ML teams; fairness alerts to complianceA model can be technically accurate but harm business outcomes or fairness. This layer catches what model metrics miss.

Baselines, monitoring windows and telemetry contracts

Inputs

  • Baseline distribution (training data or a reference window)
  • Current window of production data (inputs and predictions)
  • Delayed ground-truth labels (when available)
  • Monitoring configuration (metrics, thresholds, window size)

Outputs

  • Drift statistics per feature (PSI, KS, Wasserstein, Jensen-Shannon)
  • Data quality metrics (null rate, type error, out-of-bounds)
  • Model performance metrics (when labels available)
  • Alert decisions (fired, suppressed, cleared)

State owned

  • Baseline distribution snapshot
  • Current window snapshots over time
  • Alert history and suppression state

Failure boundary

Monitoring does not own the decision to retrain. It provides signals. The retraining decision is made by a human or an approved policy, not by the monitoring system itself.

Batch versus near-real-time monitoring

Batch monitoring (hourly or daily)

Choose when
Your traffic volume is moderate, labels arrive late, and you can tolerate hours of drift lag.
Avoid when
You need to detect drift within minutes, or a data-quality issue could cause significant harm in under an hour.
Operational tradeoff
Cheaper, simpler, and statistically more robust (larger sample sizes). Lag between issue and detection is hours, not minutes.

Near-real-time monitoring (minutes)

Choose when
You have high traffic, latency-critical models, or regulatory requirements for fast detection.
Avoid when
Your traffic is low (small samples produce noisy drift statistics), or the cost of streaming infrastructure is not justified.
Operational tradeoff
Faster detection, but more expensive infrastructure and noisier statistics. Small windows produce false positives.

Drift methods, assumptions, and limitations

Population Stability Index (PSI) measures how much a distribution has shifted between a baseline and a current window. It works for both numerical and categorical features. A common threshold is PSI > 0.2 indicating significant drift, but thresholds should be calibrated for your data — not copied from a textbook.

The two-sample Kolmogorov-Smirnov (KS) test checks whether two samples come from the same distribution. It is non-parametric and works for numerical features. For categorical features, Pearson's chi-squared test or Jensen-Shannon distance is more appropriate.

Normalized Wasserstein distance measures the distance between distributions and is sensitive to shifts in the mean. Jensen-Shannon distance is a symmetric measure of similarity between distributions. Azure ML uses all four for data and prediction drift.

Multiple testing is a real problem. If you run drift tests on 50 features, some will show drift by chance. Apply a correction (Bonferroni, Benjamini-Hochberg) or focus on the most important features. Azure ML recommends monitoring top N features by importance rather than every feature.

Embedding and image drift is harder. For the CIFAR-10 reference, we plan to use controlled brightness, noise, and class-mix changes to demonstrate drift detection. This is planned validation, not a published result.

  • PSI: numerical and categorical; common threshold 0.2 (calibrate for your data)
  • KS test: numerical, non-parametric
  • Chi-squared / Jensen-Shannon: categorical
  • Wasserstein distance: sensitive to mean shift
  • Multiple testing correction needed for many features
  • Monitor top N important features rather than all features

Controlled CIFAR-10 drift experiment (planned validation)

To demonstrate drift detection on the reference implementation, we plan to apply controlled changes to the CIFAR-10 test set and measure whether drift statistics detect them. This is planned validation — results will be published only after the experiment is run.

Three planned perturbations: brightness shift (increase pixel intensity by a fixed offset to simulate lighting change), Gaussian noise (add noise to simulate sensor degradation), and class-mix change (alter the class distribution to simulate a shift in the population).

Each perturbation should be detectable by the appropriate method: brightness and noise by numerical drift tests on pixel statistics, class-mix by categorical distribution tests on the label distribution. The experiment will record which methods detect which perturbations and at what threshold.

Alerts, ownership and operational runbooks

Every alert needs a severity, a threshold, a minimum sample size, an owner, a runbook, and a suppression rule. Without these, alerts become noise that engineers ignore.

  • Severity: page (wake someone) vs ticket (handle in business hours)
  • Threshold: calibrated, not copied — test on your data
  • Minimum sample: require enough samples for statistical significance before firing
  • Owner: a named team or person, not a distribution list
  • Runbook: the first diagnostic step, containment step, and escalation path
  • Suppression: prevent re-firing for the same condition until acknowledged
  • Persistence: require the condition to persist across windows, not a single spike

Safe retraining, promotion and rollback

Drift alone is not a reason to retrain. Drift means the world changed; the model might still be fine, or it might be degrading. The decision to retrain should be based on one or more of the following:

  • Performance degradation: model metrics (accuracy, F1) on real labels have dropped below a threshold
  • New labels: enough new labeled data has arrived to improve the model
  • Scheduled refresh: a periodic retraining cadence (weekly, monthly) regardless of drift
  • Data-quality incident: a schema change or data pipeline fix requires retraining on corrected data
  • Concept change: the relationship between inputs and outputs has changed (confirmed by performance, not just drift)
  • Drift alone: investigate first; retrain only if investigation confirms impact on performance

Safe retraining, promotion and rollback

Continuous Training (CT) creates a retraining candidate when approved triggers fire. The candidate goes through the same pipeline as any other model: training, evaluation, registration, and deployment. The difference is the trigger — CT is triggered by a monitoring signal or schedule, not a code commit.

Safety gates prevent an automatic CT loop from promoting a bad model. The candidate must pass evaluation thresholds, slice checks, and a canary observation period before it replaces the current production model. Without these gates, an automatic loop can degrade production faster than any human error.

Rollback is the safety net. If the canary regresses, the @champion alias is rolled back to the previous version. The CT loop does not override rollback — it produces candidates, and the promotion system decides whether they are safe.

Managed-cloud monitoring and failure modes

FailureObservable signalLikely causeFirst diagnosticContainmentDurable fixEvidence
Missing telemetryNo metrics for a model that should be monitoredExporter not deployed, scraping misconfigured, or network policy blockingCheck Prometheus targets and exporter healthUse access logs as temporary fallbackAlert on metric absence; test monitoring in staging before productionEngineering inference from Prometheus best practices
Low sample size produces noisy driftDrift alerts fire and clear repeatedly (flapping)Current window too small for statistical significanceCheck sample count in the current windowIncrease window size or suppress flapping alertsSet minimum sample size requirement before drift tests runDocumented from Azure ML monitoring best practices
Unstable baselineDrift statistics change even when production data is stableBaseline window is too small or was captured during an anomalous periodCompare baseline distribution to a known-good referenceRe-capture baseline from a stable periodUse a large, curated baseline; refresh it on a schedule, not ad hocEngineering inference from monitoring best practices
Alert stormDozens of alerts fire simultaneouslyShared root cause (infrastructure issue) triggering multiple monitorsCorrelate alert timestamps and check shared dependenciesSuppress duplicate alerts; page on the root cause, not each symptomGroup alerts by dependency; use alert correlation and deduplicationEngineering inference from monitoring best practices
Delayed labels never arriveModel performance monitoring never runsLabel pipeline broken or labels require manual annotationCheck label pipeline and annotation queueUse proxy metrics (prediction distribution, business outcome) until labels arriveFix label pipeline; set a maximum label delay alert; use proxy metrics as fallbackDocumented from Azure ML monitoring documentation
Silent schema changeModel produces predictions but accuracy degradesInput schema changed (feature added, removed, or renamed) without model retrainingCompare current request schema against model signaturePin the schema at the gateway; reject non-conforming requestsAdd schema validation at the gateway; alert on schema driftDocumented from Azure ML data quality monitoring
Biased slice undetectedOverall metrics fine but one segment degradesMonitoring only checks aggregate metrics, not per-sliceCompute metrics per segment (gender, region, age band)Investigate the affected segment and retrain with more data for itMonitor per-slice metrics, not just aggregates; set per-slice thresholdsDocumented from Azure ML and AWS SageMaker bias monitoring
Unsafe retraining triggerCT loop promotes a model that regresses in productionCT trigger fired on drift alone without performance confirmation or canaryCheck CT trigger condition and whether canary was observedRoll back @champion alias to previous versionRequire performance degradation confirmation, evaluation gates, and canary observation before promotionEngineering inference from CT best practices

Managed-cloud monitoring and failure modes

As of August 2026, the managed cloud monitoring landscape has shifted. These are dated facts verified against official documentation; verify current status before selecting a service.

Amazon SageMaker Model Monitor closed to new customers effective July 30, 2026. Existing customers can continue using the service, but AWS does not plan new features. AWS recommends open-source replacements built on Evidently AI, Amazon QuickSight, and Amazon CloudWatch. These replacements run in your AWS account and use DataDriftPreset and ClassificationPreset for drift and quality monitoring.

Azure Machine Learning model monitoring is generally available with SDK/CLI 2.0. It provides built-in monitoring signals for data drift, prediction drift, data quality, feature attribution drift, and model performance. Data drift metrics include Jensen-Shannon Distance, PSI, Normalized Wasserstein Distance, KS test, and Pearson Chi-Squared. It supports out-of-box monitoring for online endpoints and custom monitoring signals.

Google Cloud model monitoring is available on Vertex AI. Verify current service availability and feature set against official documentation before recommending.

Tested environment and limitations

Tool versions

  • Prometheus: documented (operational telemetry)
  • Grafana: documented (dashboards)
  • Evidently AI: documented (drift detection, AWS replacement)
  • Azure ML: SDK/CLI 2.0 (monitoring signals documented)
Date verified:

Known limitations

  • The CIFAR-10 drift experiment is planned validation. No results are published until the experiment is run in a documented environment.
  • SageMaker Model Monitor availability change was verified on 2026-08-18. Verify current status before making deployment decisions.
  • Azure ML monitoring documentation was last reviewed by Microsoft on 2026-01-27. Check for newer documentation before deployment.
  • Google Cloud model monitoring overview was verified on 2026-08-18. Verify current feature availability before recommending.

Sources

The SourceLedger makes technical claims auditable and gives search and retrieval systems explicit source context. It does not guarantee citation, ranking or inclusion.

  1. 01Tier 1AWS

    Amazon SageMaker Model Monitor

    See availability change source for current status.

    Supports claims:

    • SageMaker Model Monitor for data and model quality monitoring

    Last verified:

    https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor.html
  2. 02Tier 1AWS

    Amazon SageMaker Model Monitor Availability Change

    Dated fact: Amazon SageMaker Model Monitor closed to new customers effective July 30, 2026. Existing customers can continue using the service. Verified 2026-08-18 against official AWS documentation.

    Supports claims:

    • SageMaker Model Monitor closed to new customers effective July 30, 2026
    • existing customers can continue using the service
    • AWS continues security and availability improvements but no new features planned
    • open-source replacements: Evidently AI + Amazon QuickSight + CloudWatch
    • replacement solutions use DataDriftPreset, ClassificationPreset
    • PSI and KS statistics for drift detection

    Last verified:

    https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-availability-change.html
  3. 03Tier 1Microsoft

    Azure Machine Learning — Model Monitoring in Production

    Version: Azure ML SDK/CLI 2.0

    Paraphrased. Azure ML doc last reviewed 2026-01-27.

    Supports claims:

    • monitoring signals: data drift, prediction drift, data quality, feature attribution drift, model performance
    • data drift metrics: Jensen-Shannon Distance, PSI, Normalized Wasserstein Distance, KS test, Pearson Chi-Squared
    • data quality metrics: null value rate, data type error rate, out-of-bounds rate
    • lookback window size and offset configuration
    • Azure Event Grid integration for alert-driven retraining
    • out-of-box monitoring for online endpoints
    • custom monitoring signals supported

    Last verified:

    https://learn.microsoft.com/en-us/azure/machine-learning/concept-model-monitoring?view=azureml-api-2
  4. 04Tier 1Google Cloud

    Google Cloud Model Monitoring Overview

    Paraphrased. Verify current service availability before recommending.

    Supports claims:

    • Google Cloud model monitoring overview

    Last verified:

    https://docs.cloud.google.com/gemini-enterprise-agent-platform/machine-learning/model-monitoring/overview
  5. 05Tier 1Ray

    Ray Serve — Fault Tolerance

    Paraphrased from official documentation.

    Supports claims:

    • Serve deployment fault tolerance and recovery
    • replica failure handling

    Last verified:

    https://docs.ray.io/en/latest/serve/production-guide/fault-tolerance.html
  6. 06Tier 1MLflow

    MLflow Model Registry

    Version: MLflow 3.x

    Aliases are mutable named references to model versions, useful for deployment promotion. OSS registry provides UI + API; Databricks extends with Unity Catalog.

    Supports claims:

    • model registration and versioning
    • model aliases (e.g. @champion)
    • model lifecycle: staging, production
    • tags for governance
    • lineage to MLflow runs
    • Databricks Unity Catalog integration for governance

    Last verified:

    https://mlflow.org/docs/latest/ml/model-registry/

Build the monitoring-to-response loop

Implement telemetry, drift analysis, alert ownership, guarded retraining and rollback instead of stopping at a dashboard.

  • Create measurable data changes.
  • Configure alert and investigation rules.
  • Add evaluation and promotion safeguards.
Explore the monitoring modules