Inferensys

Glossary

Control Chart

A control chart is a graphical tool used in Statistical Process Control to plot a process metric over time against calculated control limits, used in drift detection to visually identify unusual variation or trends.
Developer demonstrating multi-agent tool use, agent tool selection interface on laptop, casual tech demo moment.
STATISTICAL PROCESS CONTROL

What is a Control Chart?

A control chart is a foundational tool in Statistical Process Control (SPC) adapted for machine learning monitoring.

A control chart is a graphical tool used in Statistical Process Control (SPC) to plot a process metric over time against calculated control limits, enabling the visual identification of unusual variation or trends. In machine learning monitoring, it is a core technique for online drift detection, where metrics like prediction error or data distribution statistics are plotted to detect non-stationarity and signal the need for model adaptation.

The chart's upper and lower control limits are typically set at three standard deviations from the process mean, defining the expected range of common-cause variation. Points outside these limits or forming specific patterns (like runs or trends) indicate special-cause variation, which in an ML context often corresponds to concept drift or data drift. Related techniques like CUSUM and the Page-Hinkley test are sequential variants built on similar statistical principles for detecting smaller, persistent shifts.

STATISTICAL PROCESS CONTROL

Key Components of a Control Chart

A control chart is a time-series plot of a process metric with calculated statistical limits, used to distinguish common cause variation from special cause variation. Its core components define its analytical power.

01

Central Line (CL)

The Central Line represents the process mean or median, calculated from historical data when the process is in a state of statistical control. It serves as the baseline for the expected performance of the metric being monitored.

  • Purpose: Establishes the process center or target value.
  • Calculation: Typically the mean (x̄) or median of the reference data.
  • Example: In monitoring daily model inference latency, the CL would be the average latency observed during a stable performance period.
02

Upper & Lower Control Limits (UCL/LCL)

Upper and Lower Control Limits are statistically derived boundaries, typically set at ±3 standard deviations from the central line. They define the expected range of common cause (inherent) variation in the process.

  • Purpose: Distinguish between common cause and special cause variation. Points outside these limits indicate an out-of-control process.
  • Calculation: UCL = CL + (3 * σ), LCL = CL - (3 * σ), where σ is the estimated process standard deviation.
  • Key Insight: These are not specification limits or business tolerances; they are purely statistical limits based on observed process behavior.
03

Upper & Lower Warning Limits (UWL/LWL)

Upper and Lower Warning Limits are inner boundaries, often set at ±2 standard deviations. They provide an early signal of potential process instability before a point breaches the control limits.

  • Purpose: Serve as a secondary, less severe alert zone. Multiple points near or beyond warning limits can signal developing drift.
  • Common Rule: Two out of three consecutive points between the warning and control limits suggest the process may be shifting.
  • Usage: While not always plotted, they enhance sensitivity for detecting small, persistent shifts in the process mean.
04

Data Points & Time Axis

The plotted Data Points are the sequential measurements of the monitored metric (e.g., prediction error, data feature mean), ordered on the Time Axis (e.g., batch number, timestamp). This creates the time-series view essential for trend analysis.

  • Purpose: Visualizes the process behavior over time.
  • Data Types: Can be individual measurements (I-chart) or subgroup statistics like means (x̄-chart) or ranges (R-chart).
  • Critical for Drift: The temporal ordering is what allows for the detection of trends, runs, or cycles that indicate non-random, special cause variation.
05

Zones (A, B, C)

The area between the center line and control limits is often divided into three Zones on each side. Zone C is closest to the center line, Zone B is the middle, and Zone A is between the warning and control limits. These zones enable the application of Western Electric Rules.

  • Purpose: Provides a structured framework for identifying non-random patterns.
  • Rule Example: A run of 8 consecutive points on one side of the center line (in any zone) signals a shift in the process mean.
  • Analytical Use: Pattern recognition using zones is more powerful than solely relying on points outside control limits, as it detects subtle, sustained drifts.
06

Western Electric / Nelson Rules

Western Electric Rules (or Nelson Rules) are a set of eight pattern-testing heuristics applied to a control chart to detect non-random, special cause variation. They formalize the interpretation of zones and sequences.

  • Core Rules: Include 1) Point outside 3σ limits, 2) 9 points in a row on same side of center, 3) 6 points in a row steadily increasing/decreasing (trend), 4) 14 points alternating up and down.
  • Purpose: Objectively identify when a process has statistically deviated from its stable, in-control state, triggering investigation.
  • Drift Detection: These rules are directly analogous to statistical tests for concept drift or data drift in ML monitoring.
STATISTICAL PROCESS CONTROL

How Control Charts Work for ML Drift Detection

A control chart is a statistical tool adapted from manufacturing quality control to monitor machine learning model performance and data streams for signs of drift.

A control chart is a time-series plot of a monitored metric, such as a model's prediction error rate or a feature's mean, bounded by calculated control limits. In Statistical Process Control (SPC), these limits—typically an upper control limit (UCL) and lower control limit (LCL)—define the expected range of natural, in-control variation. Points falling outside these limits signal an assignable cause or a potential drift event, prompting investigation. For ML, this provides a visual, rule-based framework for distinguishing normal performance fluctuation from significant degradation.

For online drift detection, metrics are plotted sequentially as new data arrives. Common charts include Shewhart charts for detecting large shifts and CUSUM (Cumulative Sum) charts for identifying small, persistent mean drifts. The center line represents the expected value (e.g., baseline error rate). Control limits are usually set at ±3 standard deviations from this mean. This method directly connects to supervised drift detection algorithms like the Drift Detection Method (DDM), which formalizes these rules to trigger warnings and detections based on error rate monitoring.

DRIFT DETECTION TOOLS

Common Control Chart Types in ML Monitoring

A comparison of statistical process control charts used to monitor machine learning model performance and data distributions for signs of concept drift or data drift.

Chart TypePrimary Use CaseKey Statistic MonitoredSensitivityCommon ML Application

Shewhart (X-bar & R)

Detecting large, abrupt shifts in process mean or variability

Sample mean (X-bar) and range (R)

Low for small shifts, high for large shifts

Monitoring average prediction error or feature mean over time

CUSUM (Cumulative Sum)

Detecting small, persistent shifts in the process mean

Cumulative sum of deviations from target

High for small, sustained shifts

Identifying gradual concept drift in model accuracy

EWMA (Exponentially Weighted Moving Average)

Detecting smaller shifts than Shewhart, smoothing noise

Weighted average of all past observations

Moderate to High

Tracking smoothed model metrics like precision or recall

Moving Range (mR) Chart

Monitoring variability between consecutive individual observations

Absolute difference between successive points

N/A

Monitoring day-to-day volatility in a single metric (e.g., daily inference latency)

P-Chart (Proportion Chart)

Monitoring the proportion of nonconforming items in a sample

Sample proportion (p)

Varies with sample size

Tracking the rate of a binary event (e.g., % of predictions above a threshold)

U-Chart (Count per Unit)

Monitoring the count of defects per unit when sample size varies

Defects per unit (u)

Varies with unit count

Monitoring the average number of anomalies detected per inference batch

Multivariate T² (Hotelling's) Chart

Monitoring the stability of multiple correlated variables simultaneously

Hotelling's T² statistic

High for correlated shifts

Detecting drift in a vector of key model features or embeddings

CONCEPT DRIFT DETECTION

Control Chart Use Cases in Machine Learning

Control charts, a core tool from Statistical Process Control (SPC), are adapted in machine learning to monitor model performance and data quality over time, providing a visual and statistical method for detecting instability.

01

Monitoring Model Error Rate

A primary use case is plotting a model's error rate (e.g., classification error, RMSE) over time. Control limits (typically ±3 standard deviations) are calculated from a stable reference period. A point outside the limits or a non-random pattern (like 7 consecutive points on one side of the mean) signals concept drift or performance degradation, prompting investigation.

02

Detecting Data Drift in Feature Distributions

Control charts monitor summary statistics of individual input features in production data.

  • For continuous features: Plot the mean or standard deviation per batch.
  • For categorical features: Plot the frequency of a key category. A sustained shift in these statistics beyond control limits indicates covariate shift, where P(X) has changed, potentially degrading model reliability even if P(Y|X) is stable.
03

Supervising Model Prediction Distributions

Monitoring the distribution of the model's output scores or predicted probabilities is crucial. A control chart tracking the mean predicted probability for a class can detect label shift (change in P(Y)). For example, in a fraud detection model, a significant increase in the average fraud score might indicate a change in the prior probability of fraud, necessitating model recalibration.

04

Implementing CUSUM for Small, Persistent Shifts

The Cumulative Sum (CUSUM) control chart is specialized for detecting small, persistent mean shifts. It accumulates deviations of observations from a target value. In ML, it's highly effective for monitoring latency, throughput, or model confidence scores, where a gradual degradation might be missed by a Shewhart chart but is critical for system health.

05

Establishing Statistical Baselines for Automated Retraining

Control charts provide a statistically rigorous trigger for automated retraining systems. Instead of arbitrary schedule-based retraining, a drift alert from a control chart can initiate a triggered retraining pipeline. This optimizes compute resources and ensures models are updated precisely when needed, a key component of Continuous Model Learning Systems.

06

Integration with MLOps Observability Platforms

Control charts are a foundational visualization in MLOps observability dashboards. They integrate with metrics like:

  • Population Stability Index (PSI) for batch monitoring.
  • Inference latency and hardware utilization.
  • Business KPIs influenced by model performance. This provides engineers a single pane of glass for model health, linking statistical alerts to operational and business outcomes.
CONTROL CHART

Frequently Asked Questions

A control chart is a foundational tool in Statistical Process Control (SPC) adapted for machine learning monitoring. It provides a visual and statistical method for distinguishing between common-cause variation inherent in a stable process and special-cause variation that signals a significant change, such as concept or data drift.

A control chart is a time-series graph used in Statistical Process Control (SPC) to monitor the stability of a process metric—such as a model's prediction error rate or a feature's mean—by plotting it against calculated control limits. In machine learning, it is a core tool for drift detection, visually distinguishing between normal process variation and statistically significant shifts that may degrade model performance.

Key components include:

  • Central Line (CL): The process mean or median.
  • Upper Control Limit (UCL) & Lower Control Limit (LCL): Statistically derived boundaries (typically ±3 standard deviations) that define the expected range of common-cause variation.
  • Data Points: Sequential measurements of the monitored metric (e.g., daily model accuracy).

When points fall outside the control limits or form non-random patterns (e.g., runs, trends), it signals special-cause variation, prompting investigation for concept drift or data drift.

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.