Inferensys

Glossary

Statistical Process Control (SPC)

Statistical Process Control (SPC) is a method of quality control that uses statistical techniques, such as control charts, to monitor and control a process to ensure it operates at its full potential, adapted for model monitoring.
SRE continuously monitoring AI systems on multiple screens, real-time dashboards visible, dark mode NOC setup.
CONCEPT DRIFT DETECTION

What is Statistical Process Control (SPC)?

Statistical Process Control (SPC) is a method of quality control that uses statistical techniques, such as control charts, to monitor and control a process to ensure it operates at its full potential, adapted for model monitoring.

Statistical Process Control (SPC) is a method of quality control that uses statistical techniques to monitor and control a process. In machine learning, it is adapted for model monitoring by applying control charts to track key performance metrics over time. This allows engineers to distinguish between normal, random variation in model behavior and significant statistical shifts that signal concept drift or data drift, triggering investigation or drift adaptation.

The core mechanism involves establishing a baseline of stable performance from a reference window, calculating a central line (mean) and upper/lower control limits (typically ±3 standard deviations). Incoming metrics, like prediction error or feature distributions, are plotted sequentially. A point breaching a control limit or forming non-random patterns indicates an out-of-control process, prompting a drift detection alert. This provides a rigorous, visual framework for online drift detection with a quantifiable false positive rate.

CONCEPT DRIFT DETECTION

Key Components of SPC in ML

Statistical Process Control (SPC) adapts industrial quality control methods to machine learning monitoring. Its core components provide a statistical framework for detecting when a model's performance or its input data deviates from expected, stable behavior.

01

Control Charts

A control chart is the primary visualization tool in SPC, plotting a monitored metric (e.g., prediction error rate, feature mean) over time against calculated control limits. These limits, typically set at ±3 standard deviations from a central line (the process mean), define the expected range of common-cause variation. Points outside the limits or forming non-random patterns signal special-cause variation, indicating potential concept drift or data drift. In ML, control charts are applied to model outputs and key input features to separate natural fluctuation from significant degradation.

02

Central Line & Control Limits

The central line represents the expected value or mean of a process metric during a stable, in-control period, often established from a reference window of training or validation data. Control limits (Upper Control Limit - UCL, Lower Control Limit - LCL) are statistically derived boundaries, calculated as the central line ± (a multiplier * the process standard deviation). The standard multiplier of 3 creates a 99.7% confidence interval under a normal distribution. These limits are not specification limits but define the bounds of inherent process noise; violations suggest the process mean or variance has changed, triggering a drift investigation.

03

Common-Cause vs. Special-Cause Variation

SPC distinguishes between two types of process variation:

  • Common-cause variation is inherent, random noise within a stable system. It is always present and defines the baseline performance band within control limits.
  • Special-cause variation is assignable, non-random deviation caused by an external factor. In ML, this corresponds to concept drift, data drift, or pipeline failures. The goal of SPC-based monitoring is not to eliminate common-cause variation but to detect the emergence of special-cause variation, which signifies a fundamental change requiring intervention like triggered retraining.
04

Warning Zones & Rules (Western Electric Rules)

Beyond a single point outside control limits, SPC uses heuristic run rules to detect non-random patterns that indicate an unstable process. Common rules, formalized as the Western Electric rules, include:

  • A point outside the 3-sigma control limits.
  • 2 out of 3 consecutive points beyond the 2-sigma warning limits.
  • 4 out of 5 consecutive points beyond the 1-sigma limit.
  • 8 consecutive points on one side of the central line.
  • 6 consecutive points steadily increasing or decreasing (a trend). These rules increase sensitivity to small, persistent shifts (detected by CUSUM-like logic) and reduce the false positive rate from reacting to single anomalies.
05

Process Capability Analysis

While control charts monitor stability, process capability analysis quantifies how well a stable process meets specification requirements. In ML, this translates to assessing whether a model's performance metrics (e.g., accuracy, F1-score) during a stable period consistently meet business-defined specification limits (e.g., accuracy > 95%). Indices like Cp and Cpk measure the potential and actual capability of the process relative to these specs. A stable process (in control) with poor capability indicates the model is consistently underperforming by design, necessitating architectural change, not just drift detection.

06

Adaptation to ML Monitoring

SPC is adapted for ML by applying its principles to model-specific signals:

  • Supervised SPC: Monitoring the model's error rate or loss over time, as in the Drift Detection Method (DDM).
  • Unsupervised SPC: Monitoring the distribution of input features or model confidence scores using statistics like the mean or variance, plotted on control charts.
  • Multivariate SPC: Using techniques like Hotelling's T² statistic to monitor correlations between multiple features simultaneously. The reference window establishes the initial central line and control limits. The test window (recent data) is continuously compared against this baseline. A key challenge is balancing detection delay with false alarms.
METHODOLOGY COMPARISON

SPC vs. Other Drift Detection Methods

A comparison of Statistical Process Control (SPC) with other primary categories of drift detection techniques, highlighting their core mechanisms, data requirements, and typical use cases in machine learning monitoring.

Feature / MetricStatistical Process Control (SPC)Online Sequential MethodsBatch Statistical TestsModel-Based Methods

Core Mechanism

Monitors a process metric (e.g., error rate) over time using control charts with statistical limits.

Applies sequential analysis or adaptive windowing to a live data stream to detect change points.

Performs two-sample hypothesis tests comparing a recent batch to a reference dataset.

Uses the model's internal signals (e.g., confidence, embeddings) to detect out-of-distribution inputs.

Primary Data Input

Model performance metrics (supervised) or feature statistics (unsupervised).

Raw data points or model predictions from a sequential stream.

Two static datasets: a reference set and a current/test batch.

Model logits, embeddings, or confidence scores on new inputs.

Detection Mode

Online & Real-time

Online & Real-time

Batch & Periodic

Online or Batch

Supervision Required

Can be supervised (error rate) or unsupervised (feature mean).

Can be supervised (e.g., DDM) or unsupervised (e.g., ADWIN).

Typically unsupervised for feature/data drift.

Primarily unsupervised.

Handles Gradual Drift

Handles Abrupt Drift

Detection Delay

Low to Moderate

Low (adaptive methods)

Defined by batch interval

Varies by method

Interpretability

High (visual control charts, clear thresholds)

Moderate (change point identified)

High (p-values, test statistics)

Low (often based on latent representations)

Key Algorithms / Tests

Shewhart charts, CUSUM, EWMA

DDM, ADWIN, Page-Hinkley Test

PSI, KS Test, MMD, Wasserstein Distance

OOD detectors, confidence score monitoring

Typical MLOps Use Case

Monitoring model error rate or prediction latency for operational SLOs.

Real-time alerting on live API traffic for immediate incident response.

Scheduled daily/weekly reports on feature distribution stability.

Flagging anomalous inputs that the model is not equipped to handle.

STATISTICAL PROCESS CONTROL (SPC)

Frequently Asked Questions

Statistical Process Control (SPC) is a method of quality control that uses statistical techniques, such as control charts, to monitor and control a process to ensure it operates at its full potential. In machine learning, it is adapted to monitor model performance and data distributions for signs of concept drift.

Statistical Process Control (SPC) in machine learning is the adaptation of industrial quality control methods to monitor the stability and performance of a deployed model by tracking key metrics over time using control charts. The core principle is to distinguish between common-cause variation (inherent, random noise) and special-cause variation (indicative of a fundamental change like concept drift or data drift). By plotting metrics like prediction error, data distribution statistics, or model scores against calculated control limits, SPC provides a statistical framework for determining when a process—such as a model making predictions—has deviated from its expected, in-control state, triggering alerts for investigation or drift adaptation.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.