Quality Control and Statistical Process Control

Chapter 14
AI-Enabled Quality Control, Ethics and Emerging Practice

Post Graduate Program in Total Quality Management
Quality Control and Statistical Process Control   •   Post Graduate

14. AI-Enabled Quality Control, Ethics and Emerging Practice

Introduction and Context

Quality control has traditionally relied on inspection, sampling, control charts, measurement-system analysis and the disciplined investigation of special causes. These methods remain essential because they make process behaviour visible and provide interpretable rules for action. However, contemporary production and service systems generate data at a scale and speed that exceed the practical capacity of manual analysis. Sensors, machine logs, images, laboratory results, maintenance records, customer feedback and supply-chain information can now be examined together. Artificial intelligence (AI) therefore extends quality control from periodic detection towards continuous prediction and, in some settings, adaptive intervention.

AI does not replace statistical process control (SPC). Rather, it introduces additional models for recognizing complex patterns, classifying defects, detecting anomalies and estimating future quality outcomes. The central managerial issue is not whether an algorithm is accurate in a narrow technical sense, but whether it improves quality decisions without weakening transparency, accountability, fairness, privacy or human judgement. An AI system that identifies defects accurately but cannot be audited, drifts unnoticed, or causes operators to ignore valid process signals may create greater quality risk than it removes.

This chapter examines machine learning, computer vision, anomaly detection and predictive quality in relation to established quality-control practice. It also considers model governance, ethics, human oversight, sustainability and the movement towards adaptive and semi-autonomous quality systems.

Learning Objectives

After studying this chapter, the learner should be able to:

1. Explain the role of AI in modern quality control and distinguish it from conventional SPC.

2. Select appropriate machine-learning, computer-vision and anomaly-detection approaches for quality problems.

3. Evaluate predictive-quality systems using technical, operational and business criteria.

4. Design controls for model drift, bias, privacy, cybersecurity and accountability.

5. Determine when an AI recommendation should be accepted, challenged or overridden by a human expert.

6. Assess emerging adaptive and autonomous quality systems through the lenses of reliability, ethics and sustainability.

From Statistical Control to Intelligent Quality Systems

SPC is principally concerned with distinguishing common-cause variation from special-cause variation. A control chart applies a statistical model to a measured characteristic and supports a decision about process stability. Its strength lies in its relative simplicity, interpretability and connection to process knowledge. A point beyond a control limit, a non-random run or a systematic trend provides a visible signal that can be investigated.

Many modern processes, however, have high dimensionality, nonlinear relationships and complicated interactions. Product quality may depend simultaneously on temperature, pressure, material lot, tool age, operator, speed, ambient humidity and software settings. A conventional chart for each variable may fail to reveal an interaction or may produce too many alarms. AI methods can identify relationships that are difficult to specify in advance, especially when large historical datasets are available.

The distinction between SPC and AI should not be expressed as a competition. SPC generally asks, “Is the process behaving unusually relative to its established statistical behaviour?” Predictive quality asks, “Given current and historical evidence, what quality outcome is likely to occur?” Computer vision asks, “Does this image contain a defect or conform to a learned appearance?” Anomaly detection asks, “How unusual is this observation compared with accepted operating patterns?” These questions overlap but are not identical.

A robust quality architecture often combines the approaches. Control charts monitor critical variables and provide interpretable escalation rules. Machine-learning models identify complex predictors of failure. Vision systems inspect every unit where manual inspection is slow or inconsistent. Human experts validate uncertain cases and investigate causes. The resulting system is stronger when each method is used for the question it can answer best.

Core Technologies and Their Quality Applications

Supervised machine learning

Supervised learning uses labelled examples in which the input variables are associated with a known outcome. The outcome may be conforming or nonconforming, a defect category, a measured dimension, warranty occurrence or time to failure. Classification models, such as logistic regression, decision trees, random forests, support-vector machines and neural networks, estimate categories or probabilities. Regression models estimate numerical outcomes such as strength, surface roughness or expected deviation from target.

The quality value of a supervised model depends heavily on the label. If inspection decisions are inconsistent, or if only severe defects are recorded, the model learns an incomplete representation of quality. The data must also reflect the conditions under which the model will operate. A model trained on one material supplier, product design or season may perform poorly after those conditions change.

Unsupervised learning and anomaly detection

Unsupervised methods work with data that lack reliable outcome labels. Clustering can reveal groups of operating conditions, while dimensionality-reduction methods can display complex process behaviour. Anomaly-detection methods establish a profile of normal or acceptable behaviour and flag observations that depart from it. Examples include statistical distance measures, isolation forests, one-class support-vector machines and autoencoders.

Anomaly detection is particularly useful when failures are rare or when new failure modes have not been labelled. Its output is not automatically proof of a defect. An unusual observation may reflect a sensor fault, a new but acceptable product variant, a maintenance activity or a genuine emerging problem. Consequently, anomaly scores should initiate investigation rather than substitute for diagnosis.

Computer vision

Computer vision uses cameras and image-processing or deep-learning methods to inspect appearance, geometry, assembly, labels, welds, surface finish and foreign material. A typical system includes controlled lighting, image acquisition, preprocessing, a trained model, decision thresholds and a disposition process for rejected or uncertain items.

Vision systems are highly sensitive to the measurement environment. Changes in illumination, camera position, focus, vibration, product orientation or background can alter model performance. Validation must therefore include representative variation, not merely a collection of ideal images. False negatives are often more serious than false positives when safety-critical defects are involved, but excessive false positives can overload inspectors and undermine confidence.

Predictive quality and prescriptive action

Predictive quality models estimate the probability or magnitude of a future quality event. For example, a model may estimate the probability that the next batch will exceed a defect threshold or that a tool will produce unacceptable dimensions within the next production interval. Predictive maintenance and predictive quality are related but distinct: maintenance concerns equipment condition, whereas predictive quality concerns the conformity of outputs, although equipment variables may be important predictors.

Prescriptive systems go further by recommending an action, such as adjusting a process setting, changing a tool, increasing inspection frequency or stopping production. The recommendation should be constrained by engineering limits, safety requirements and change-control procedures. An algorithm should not be permitted to optimize a quality metric by creating unacceptable safety, environmental or operational consequences.

A Framework for Combining AI with SPC

An effective implementation can be organized into six connected layers.

First, define the quality decision. The organization must specify whether the purpose is detection, diagnosis, prediction, prevention, prioritization or automatic control. A vague objective such as “use AI to improve quality” cannot guide data selection or validation.

Second, establish the measurement foundation. Sensors, inspection methods and labels must be shown to be adequate. Gauge repeatability and reproducibility, calibration, data completeness, timestamp consistency and traceability remain necessary. AI cannot correct a measurement system that is systematically incapable of distinguishing good from bad.

Third, construct a process and data model. Relevant variables, causal hypotheses, product genealogy and operating boundaries should be documented. Feature selection should be guided by process knowledge rather than by statistical association alone. A variable may predict defects because it is a proxy for a hidden factor, and changing the proxy may destroy the relationship.

Fourth, train and validate the model. Data should be divided into training, validation and test sets in a way that represents future use. Random splitting can be misleading when observations from the same batch, tool or customer appear in both training and test data. Time-based or group-based validation is often more realistic. Performance should be assessed using measures appropriate to the decision, including precision, recall, specificity, false-alarm rate, calibration, expected cost and detection delay.

Fifth, integrate the output into work. An alert requires an owner, a response time, an escalation route and a record of disposition. The interface should show the evidence supporting a recommendation, its confidence or uncertainty, and the applicable operating limits. Integration with SPC is important: an AI signal may be reviewed alongside control-chart signals rather than replacing them.

Sixth, monitor and improve the system. Performance monitoring must continue after deployment. Changes in input distributions, defect prevalence, product mix, sensor behaviour or decision thresholds may reduce validity. Retraining should be controlled and documented, not triggered solely by convenience.

Interpretable SPC and Less Interpretable AI

Interpretability concerns the extent to which a user can understand why a model produced an output. A control chart is comparatively interpretable: the statistic, baseline, limits and rule violation can be displayed. A small decision tree may also be understandable. Complex ensembles and deep neural networks may provide excellent predictive performance while making causal reasoning difficult.

Interpretability has several dimensions. A model may be globally understandable, meaning its general logic is clear, or locally explainable, meaning a particular prediction can be accompanied by influential variables or image regions. Explanation tools are useful but should not be confused with proof of causation. A highlighted image region may indicate where the model focused, not the physical mechanism that created the defect.

The appropriate balance depends on risk. For low-risk prioritization, a complex model may be acceptable if its performance and monitoring are strong. For safety-critical release decisions, explainability, conservative thresholds, independent verification and human authority become more important. A highly interpretable model that is materially less accurate is not automatically preferable; the decision should consider the consequences of both false acceptance and false rejection.

Governance, Ethics and Human Accountability

AI-enabled quality control creates responsibilities that extend beyond the data-science team. Senior management remains accountable for product conformity and the safety of decisions delegated to automated systems. Process owners are responsible for defining acceptable operating regions. Quality professionals must challenge unsupported claims and ensure that validation reflects actual use. Operators need training in both the system and the conditions under which it may be wrong.

Bias and representativeness

Bias can arise from unbalanced samples, inconsistent human labels, missing operating conditions or historical decisions that reflect unequal treatment. In quality applications, bias may cause a model to reject products from a particular supplier or site because of confounding variables rather than genuine nonconformity. It may also under-detect defects in product variants that are underrepresented in training data. Stratified performance analysis should therefore examine products, shifts, sites, suppliers, lots and relevant environmental conditions.

Privacy and data minimization

Quality data may include operator identifiers, biometric information, customer details, proprietary designs or production recipes. Organizations should collect only data necessary for the stated purpose, restrict access, define retention periods and protect data in transit and at rest. Workforce monitoring requires particular care: a system designed to identify process conditions should not quietly become an instrument for individual surveillance.

Accountability and auditability

Every deployed model should have an owner, version record, approved purpose, training-data description, validation evidence, threshold rationale and change history. Decisions should be traceable to the model version and input data available at the time. When a model recommends rejection or process adjustment, the organization should be able to reconstruct what happened and who authorized the action.

Human oversight

Human oversight is meaningful only when the human has competence, time, authority and access to relevant evidence. If operators are formally responsible but cannot override an automated decision, oversight is symbolic. Conversely, unlimited overrides can turn the system into an unrecorded discretionary process. Overrides should be permitted under defined conditions, documented and reviewed for recurring patterns.

Risks, Failure Modes and Common Mistakes

A frequent mistake is to begin with a preferred technology rather than a quality problem. Another is to treat a high accuracy score as sufficient evidence. In an imbalanced process, a model that always predicts “conforming” may achieve high accuracy while missing nearly every defect. Confusion matrices, cost-weighted measures and subgroup analysis provide a more realistic assessment.

Data leakage is another serious failure. Leakage occurs when information unavailable at the time of prediction, such as a later inspection result or a post-failure maintenance code, enters the training data. The resulting model appears powerful but cannot operate prospectively.

Concept drift occurs when the relationship between inputs and outcomes changes. Data drift refers to changes in the distribution of inputs; concept drift refers to changes in what those inputs mean for the outcome. A new raw material, equipment upgrade, product design or inspection standard may require recalibration or retraining. Drift monitoring should be linked to action thresholds and not merely displayed on a dashboard.

Automation bias arises when users accept a machine recommendation without sufficient evaluation. Alert fatigue develops when the system generates too many low-value signals. Cybersecurity threats may manipulate sensor data, images, labels or model files. Finally, optimization may produce unintended consequences: reducing inspection rejects by relaxing a threshold may improve a reported yield while increasing customer risk.

Illustrative Case: Vision-Based Inspection in a Medical-Device Assembly Line

Background

The following is an illustrative case. A manufacturer of disposable medical-device assemblies performs visual inspection for surface contamination, incomplete bonding and incorrect component placement. Manual inspection is slow and subject to fatigue, while production volume is increasing.

Situation and problem

The organization installs a camera system using a deep-learning classifier. Initial tests on archived images show high overall accuracy. After launch, however, the customer complaint rate does not decline as expected. Inspectors report that the system rejects many acceptable products from a newly introduced transparent material and occasionally accepts products with faint bonding defects.

Analysis

Investigation reveals three issues. First, the training set contains many images of the original material but few images of the new material. Second, archived images were randomly divided, so images of the same production lot appeared in both training and test data. This overstated generalization performance. Third, the lighting arrangement produces glare that hides faint defects at particular product orientations. The model is therefore responding partly to material and lighting patterns rather than reliably identifying the physical defect.

The quality team compares the model with manual inspection and SPC information. A control chart for bonding temperature shows a mild but persistent shift associated with the complaints. The vision model detects some consequences of the shift but does not explain its process cause.

Approach and solution

The organization pauses automatic release decisions and uses the system only to prioritize human review. It conducts a measurement-system study, standardizes lighting and product positioning, and creates a balanced image set covering material variants, shifts, lots, orientations and known defect severities. Validation is performed by production lot rather than by random image. Separate thresholds are evaluated for safety-related defects and cosmetic conditions.

The revised system displays the image region supporting a rejection, the confidence level and an uncertainty category. Images with low confidence are routed to trained inspectors. The bonding-temperature chart is incorporated into the response procedure so that a cluster of vision alerts triggers both product containment and process investigation. Model performance, false rejects, false accepts and override rates are reviewed weekly during the pilot and monthly thereafter.

Outcome

The organization does not treat the model as an autonomous inspector. Instead, it becomes one element in a layered control system: standardized measurement, SPC for critical process variables, computer vision for high-frequency screening and human review for ambiguous cases. The case demonstrates that technical model sophistication cannot compensate for weak measurement design, unrepresentative data or poorly defined decision rights.

Learning points

The principal lessons are that validation must mirror deployment, rare but consequential defects require cost-sensitive evaluation, process control and product inspection answer different questions, and human oversight must be designed into the workflow rather than added after failure.

Adaptive, Autonomous and Sustainable Quality Practice

Adaptive quality systems update their models or decision rules as process evidence changes. Adaptation can be useful in environments with product personalization, short life cycles or changing materials, but uncontrolled adaptation is dangerous. A model should not silently learn from unverified operator decisions or from data generated during an abnormal event. Approval gates, rollback capability, shadow testing and fixed reference datasets provide safeguards.

An autonomous quality system may detect a condition, diagnose a likely cause and adjust the process without direct human authorization. Such autonomy should be graduated. Low-risk actions, such as increasing a sampling frequency, may be automated. Actions affecting safety, regulatory conformity or irreversible product disposition should normally require explicit authorization or highly stringent independent controls. The principle of least autonomy is useful: automate only the degree of decision-making justified by evidence and risk.

Sustainability introduces a broader definition of quality. A product may conform technically while consuming excessive energy, generating avoidable scrap or relying on wasteful inspection practices. AI can support energy-aware process optimization, early scrap prevention, material-yield analysis, predictive maintenance and life-cycle monitoring. Yet computational infrastructure also consumes energy, and frequent retraining or unnecessary sensing may offset environmental gains. Sustainability claims should therefore be evaluated using system-level measures rather than assumed from automation alone.

Digital twins and edge analytics are emerging practices. A digital twin represents relevant features of a physical process and allows scenarios to be assessed before intervention. Edge analytics processes data close to the equipment, reducing latency and sometimes limiting transfer of sensitive data. Federated learning may allow multiple sites to improve a model without centralizing all raw data, although it does not eliminate security, governance or data-quality concerns.

Best-Practice Principles for Implementation

A mature organization should:

  • begin with a defined quality risk and decision, not with a fashionable algorithm;
  • preserve validated SPC and measurement-system practices as foundational controls;
  • involve operators, engineers, quality specialists, data scientists, cybersecurity personnel and affected stakeholders;
  • validate models using future-like, stratified and independent data;
  • select thresholds according to the consequences of false acceptance, false rejection and delayed detection;
  • monitor drift, calibration, subgroup performance, overrides and alert burden;
  • document model ownership, versioning, data lineage, approvals and retirement criteria;
  • provide human reviewers with authority, training and usable explanations;
  • protect confidential and personal data through minimization and access control; and
  • reassess whether automation improves total quality, safety, sustainability and trust rather than only one local metric.

Chapter Summary

AI extends quality control through machine learning, computer vision, anomaly detection and predictive models. These methods can identify complex relationships and support earlier intervention, but they depend on valid measurements, representative data, appropriate labels and disciplined deployment. SPC remains valuable because it provides interpretable evidence about process stability; the strongest systems combine SPC with AI rather than treating one as a universal replacement for the other.

Model performance must be evaluated in relation to quality risk, including false acceptance, false rejection, calibration and detection delay. Governance must address drift, bias, privacy, cybersecurity, accountability and meaningful human oversight. Adaptive and autonomous systems require controlled learning, graduated authority and rollback capability. Sustainable quality practice evaluates environmental and social consequences as well as conformity. The central professional responsibility is to ensure that intelligent tools strengthen, rather than obscure, sound quality decision-making.

Key Terms

Artificial intelligence: Computational methods that perform tasks associated with reasoning, pattern recognition or decision support.

Machine learning: Algorithms that learn relationships from data for prediction, classification or other tasks.

Supervised learning: Learning from examples paired with known outcome labels.

Unsupervised learning: Learning patterns or structure from data without specified outcome labels.

Anomaly detection: Identification of observations that differ substantially from an established normal or acceptable pattern.

Computer vision: Automated interpretation of images or video for measurement, classification or inspection.

Predictive quality: Estimation of future quality outcomes using current and historical process evidence.

Concept drift: A change in the relationship between input variables and the outcome being predicted.

Data drift: A change in the statistical distribution of model inputs.

Model calibration: The agreement between predicted probabilities and observed frequencies.

False positive: An alert or rejection generated for an actually conforming condition.

False negative: Failure to alert or reject when a genuine defect or abnormality exists.

Data leakage: Use of information in model development that would not be available at the time of operational prediction.

Interpretability: The extent to which a model’s reasoning or output can be understood by users.

Human oversight: Competent human review and authority over automated recommendations or decisions.

Model governance: Policies and controls for developing, approving, monitoring, changing and retiring models.

Automation bias: The tendency to accept automated outputs uncritically.

Digital twin: A digital representation of a physical process or asset used for monitoring and analysis.

Edge analytics: Processing data near its source rather than transmitting all data to a central system.

Predictive maintenance: Forecasting equipment deterioration or failure to support timely intervention.

Review Questions

Short Answer Questions

1. How does predictive quality differ from conventional SPC?

2. Why can anomaly detection produce an alert without proving that a defect exists?

3. What is the difference between data drift and concept drift?

4. Why is measurement-system adequacy important before training an AI model?

5. What is meant by meaningful human oversight?

Long Answer Questions

1. Explain how SPC, computer vision and machine learning can be integrated into a layered quality-control system.

2. Discuss the principal sources of bias in AI-enabled quality control and methods for detecting them.

3. Compare interpretable SPC with less interpretable AI models, including the circumstances in which each may be preferred.

4. Describe a governance framework for deploying and monitoring a predictive-quality model.

5. Explain the opportunities and risks associated with adaptive and autonomous quality systems.

Analytical / Application Questions

1. A classifier reports 98% accuracy in a process where only 1% of units are defective. What additional measures and validation questions should a quality manager require before deployment?

2. A vision system’s false rejects increase after a new supplier’s material is introduced. Design an investigation that distinguishes model drift, measurement variation and a genuine material-related defect.

3. A proposed autonomous controller can adjust a process parameter whenever predicted defect risk exceeds a threshold. Determine which safeguards, authority limits and rollback arrangements should be established before approval.

22. Multiple Choice Questions with Answers

Question 1

Which statement best describes the complementary relationship between SPC and AI-based predictive quality?

A. SPC is obsolete whenever machine learning is available.

B. SPC detects statistical process instability, while predictive quality estimates likely future outcomes.

C. AI can replace measurement-system analysis because it learns from data.

D. Predictive quality is limited to financial and customer-service data.

Correct Answer: B. SPC detects statistical process instability, while predictive quality estimates likely future outcomes.

Question 2

A model achieves high accuracy because 99% of observations are conforming. Which evaluation issue is most important?

A. The model has necessarily achieved excellent defect detection.

B. Accuracy alone may conceal poor recall for the rare defect class.

C. The model should be assessed only by training accuracy.

D. Class imbalance is irrelevant in quality applications.

Correct Answer: B. Accuracy alone may conceal poor recall for the rare defect class.

Question 3

Which situation is an example of data leakage?

A. Using production temperature available at prediction time.

B. Splitting data by production lot for validation.

C. Using a later inspection result as an input to an earlier prediction.

D. Comparing model performance across shifts.

Correct Answer: C. Using a later inspection result as an input to an earlier prediction.

Question 4

What is the most appropriate initial interpretation of an anomaly-detection alert?

A. It proves that the product is defective.

B. It requires investigation because unusual behaviour may have several causes.

C. It should always trigger automatic product destruction.

D. It can be ignored if no control-chart point is outside the limits.

Correct Answer: B. It requires investigation because unusual behaviour may have several causes.

Question 5

Why might random image-level splitting overestimate the performance of a vision model?

A. It prevents the model from learning any image features.

B. Images from the same lot may appear in both training and test sets.

C. It always increases the number of false negatives.

D. It removes the need for independent validation.

Correct Answer: B. Images from the same lot may appear in both training and test sets.

Question 6

Which control most directly addresses model drift after a new product design is introduced?

A. Disabling all SPC charts.

B. Monitoring input and outcome performance and reviewing the need for recalibration.

C. Increasing the model’s complexity without new data.

D. Deleting historical data immediately.

Correct Answer: B. Monitoring input and outcome performance and reviewing the need for recalibration.

Question 7

Meaningful human oversight requires that reviewers have:

A. Responsibility but no authority to challenge the model.

B. Authority, competence, time and access to relevant evidence.

C. A requirement to accept every high-confidence prediction.

D. No obligation to document overrides.

Correct Answer: B. Authority, competence, time and access to relevant evidence.

Question 8

Which is the strongest reason to use time-based or group-based validation in some quality applications?

A. It guarantees that the model will never drift.

B. It better represents future deployment when observations are related by time, lot or equipment.

C. It eliminates the need for labelled data.

D. It always produces a higher performance score.

Correct Answer: B. It better represents future deployment when observations are related by time, lot or equipment.

Question 9

What is a suitable example of graduated autonomy?

A. Allowing an algorithm to change safety-critical settings without limits.

B. Permitting automatic increases in sampling while requiring authorization for irreversible disposition.

C. Preventing humans from reviewing automated decisions.

D. Allowing silent retraining from unverified operator decisions.

Correct Answer: B. Permitting automatic increases in sampling while requiring authorization for irreversible disposition.

Question 10

Which statement reflects a sustainability-aware approach to AI-enabled quality?

A. Any automation is automatically environmentally beneficial.

B. Only product conformity matters when evaluating quality technology.

C. Energy use, scrap prevention, computational cost and broader system effects should be assessed.

D. Sustainability requires abandoning digital inspection.

Correct Answer: C. Energy use, scrap prevention, computational cost and broader system effects should be assessed.

Quality Control and Statistical Process Control
Chapter 14 of 14