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.
Glossary
Statistical Process Control (SPC)

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.
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.
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.
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.
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.
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.
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.
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.
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.
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 / Metric | Statistical Process Control (SPC) | Online Sequential Methods | Batch Statistical Tests | Model-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. |
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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Statistical Process Control (SPC) is a foundational methodology for monitoring process stability. In machine learning, its principles are directly applied and extended by a suite of specialized techniques for detecting when a model's performance or its data environment changes.
Control Chart
A control chart is the primary graphical tool of SPC, used to monitor a process metric over time against statistically derived control limits. In ML monitoring, key metrics like prediction error, data distribution statistics, or model confidence scores are plotted. The chart visually signals special-cause variation (drift) when points fall outside the control limits or exhibit non-random patterns.
- Upper/Lower Control Limits (UCL/LCL): Calculated from historical data, typically at ±3 standard deviations from the process mean.
- Central Line: Represents the historical average or expected value of the monitored metric.
- Application: Used to track model accuracy, prediction latency, or feature means for unsupervised drift detection.
CUSUM (Cumulative Sum)
CUSUM is a sequential analysis technique used in SPC for detecting small, persistent shifts in the mean of a process. It works by accumulating the sum of deviations between observed values and a target value. A significant cumulative sum signals a change point.
- Mechanism: Calculates S_t = max(0, S_{t-1} + x_t - μ - k), where μ is the target mean and k is a sensitivity parameter. A drift is flagged when S_t exceeds a threshold h.
- Advantage: More sensitive to small, sustained drifts than Shewhart control charts.
- ML Use Case: Ideal for online drift detection of metrics like classification error rate or the mean of a critical feature in a data stream.
Page-Hinkley Test
The Page-Hinkley test is an online change detection algorithm based on sequential analysis, closely related to CUSUM. It monitors the cumulative difference between observed values and their running average, flagging a change when this difference exceeds a dynamic threshold.
- Calculation: Maintains a cumulative variable m_t and the minimum value M_t seen so far. A drift is detected when (m_t - M_t) > λ.
- Characteristic: Designed to detect abrupt changes in the mean of a Gaussian signal.
- Application: A core algorithm in streaming ML libraries for real-time concept drift detection, often applied to model loss or error sequences.
Stationarity Test
A stationarity test is a statistical hypothesis test used to determine if the properties of a time series (mean, variance, autocorrelation) are constant over time. Non-stationarity is a primary indicator of underlying drift in the data-generating process.
- Common Tests: Augmented Dickey-Fuller (ADF) test (for unit roots), Kwiatkowski–Phillips–Schmidt–Shin (KPSS) test.
- Null Hypothesis: The time series is stationary.
- ML Relevance: Applied to model inputs or error sequences. Rejecting stationarity suggests the model is operating in a non-stable environment, necessitating drift adaptation or investigation.
Two-Sample Hypothesis Testing
Two-sample hypothesis testing is the statistical foundation for batch drift detection. It tests the null hypothesis that two samples (e.g., a reference training window and a recent production batch) are drawn from the same distribution.
- Core Question: "Has the data distribution changed?"
- Common Tests: Kolmogorov-Smirnov (KS) test for any distributional difference, Student's t-test for differences in means, Chi-squared test for categorical data.
- Process: 1. Define reference and test datasets. 2. Choose a test statistic. 3. Calculate p-value. 4. Reject the null hypothesis (signal drift) if p-value < significance level α (e.g., 0.05).
Process Capability Analysis
Process capability analysis in SPC uses indices like Cp and Cpk to quantify how well a stable process performs relative to its specification limits. In ML, this translates to measuring a model's operational envelope and its robustness to inherent data variation.
- Capability Indices: Cp = (USL - LSL) / (6σ) measures potential capability. Cpk accounts for process centering.
- ML Analogy: Specification limits can be defined as acceptable ranges for model metrics (e.g., accuracy > 90%, latency < 100ms).
- Use Case: Establishing a baseline for normal model operation. A significant drop in Cpk indicates the process (model performance) is drifting out of its capable range, even if it remains statistically "in control."

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us