Skip to main content

From Data to Knowledge: SPC, Multivariate Analysis, and Continued Process Verification

📍 Where we are: Part V opens. We have spent the whole book making data trustworthy, connected, and meaningful; now we finally use it — turning streams of numbers into control, assurance, and early warning.

The previous chapter wove everything together into two grand constructs. The digital thread is one connected, traceable record that follows a product from its first design idea all the way to the patient — every measurement, decision, and deviation linked in a single chain. The digital twin is a living computational model of the process, continuously fed by that thread, mirroring the real plant as it runs. Both are spectacular achievements, and both are useless if no one reads them. A thread you never analyze is just an archive; a twin no one interrogates is just a dashboard no one watches.

This chapter is about reading the data — the classical analytics that convert governed, connected numbers into knowledge you can act on. These methods are decades old, peer-reviewed, and embedded in regulatory expectation — the foundation every newer technique in the next chapter builds on.

The simple version

Think of a car's dashboard. The speedometer needle wobbles a little even on cruise control — that gentle jitter is normal and tells you nothing is wrong. But if the temperature gauge climbs even a little above where it normally sits — still far from the red line — that is a signal: something specific changed, and a good driver acts then, not when the needle finally hits red. This chapter's core work is learning to tell the harmless wobble from the meaningful signal — and to catch the signal long before any hard limit is reached.

What this chapter covers

We start with Statistical Process Control (SPC) for a single measurement, then explain why bioprocesses, with hundreds of tangled variables, demand multivariate methods (PCA, PLS, and multivariate SPC). We then meet Continued Process Verification (CPV) — the regulatory rule that says you must watch every commercial batch forever — and see what data infrastructure that promise actually requires.

Telling wobble from signal: classical SPC

Why one measurement is not enough — and why too many is worse

Every process varies. Fill a hundred vials from the same tank and they will not weigh exactly the same. The central insight of statistical quality control, originating with Walter Shewhart's control-chart method (1920s-1930s) and later systematized by W. Edwards Deming, is that variation comes in two distinct kinds [7][8]. Common-cause variation is the background hum of the process — the sum of countless tiny, unavoidable influences. It is stable and predictable. Special-cause variation is something new and assignable — a clogged filter, a wrong raw-material lot, a miscalibrated probe. It is the temperature gauge climbing [7][8].

Each measurement these charts watch is the end of a long journey: a probe in a production bioreactor reads a value, that reading becomes a governed data point with its own quality and timestamp (the lifecycle of a data point), and only then does it land on a chart. SPC is what we do with the data point once it is born, trusted, and stored.

A control chart is the tool that separates the two. You plot a measurement over time and draw control limits, conventionally set at the historical mean ± 3σ (three standard deviations), which under common-cause variation alone captures about 99.7% of expected values — so a point outside is statistically rare enough to be worth investigating. Points dancing inside the limits are common-cause noise; a point outside, or a non-random pattern (a run, a trend), flags a special cause to investigate [7]. The simplest is the Shewhart chart, which reacts to each point on its own. Two cousins add memory: CUSUM (cumulative sum) and EWMA (exponentially weighted moving average) accumulate small deviations over time, so they catch slow drifts a Shewhart chart would shrug off [7][5].

"In spec" is not "in control"

"In spec" is not the same as "in control." A specification limit is a quality requirement — the value a product must meet to be acceptable. A control limit is a statistical description of how the process actually behaves. A batch can be inside spec yet wildly out of control (a special cause that simply has not breached the requirement yet), and a process can be in perfect control yet incapable of meeting spec. Confusing the two is one of the most common and costly errors in manufacturing [7].

Phase I model-building, Phase II monitoring

One subtlety the literature insists on: building a chart and using a chart are different jobs. Phase I is the retrospective study where you analyze past data to establish what "in control" even means and to set the limits. Phase II is live monitoring, where new points are checked against those established limits. Treating the two as one — setting limits from the same data you are judging — quietly corrupts the chart's statistics [8]. The same Phase-I-then-Phase-II discipline reappears in every model this chapter builds: you always fit on a trusted history and then judge new data against the fit — never both at once.

Why one chart is not enough: going multivariate

Now the bioprocess problem. The fix, in a phrase, is Multivariate Data Analysis (MVDA) — analyzing many correlated variables together rather than one at a time. A single run on a modern bioreactor — a Sartorius ambr 250 high-throughput vessel, a Cytiva Xcellerex XDR single-use stirred tank, or a Cytiva WAVE rocking bag (the named vessels of the production bioreactor) — is described not by one number but by hundreds: temperature, pH, dissolved oxygen, agitation, several gas flows, feed rates, off-gas readings, dozens of online and offline measurements, sampled every few seconds for days. Worse, these variables are deeply correlated — they move together. Raise agitation and dissolved oxygen rises; feed glucose and the pH shifts. They are not independent dials [4].

There is a second, subtler reason a raw fast-sampled tag cannot simply be dropped onto a Shewhart chart: those streams are heavily autocorrelated. A dissolved-oxygen reading sampled every five seconds is nearly identical to the one before it, which violates the independence assumption behind ±3σ control limits — so a naive Shewhart chart on raw fast tags trips almost continuously on what is really just the process's own inertia. This is why bioprocess SPC is applied to batch-summary features (one value per batch, as in the I-MR example later in this chapter) or to model residuals (the multiway-PCA T-squared and SPE scores defined a few sections below — for now just read them as one summarising number per moment), never to raw 5-second DO data — and why trajectory methods, not univariate Shewhart on raw tags, are the real workhorse on the plant floor.

You cannot solve this by drawing three hundred separate control charts. Each individual chart can look perfectly normal while the combination is bizarre — like a person whose height is normal and whose weight is normal, but whose height-for-that-weight is alarming. Univariate charts are blind to the correlations, and they also inflate false alarms: as you add charts, the chance that at least one trips by accident climbs quickly — with hundreds of charts, false alarms become routine [7][5].

Two sensor traces each staying within their individual control limits, while a combined multivariate chart flags the same moment as out of control. Each sensor in spec, yet the batch is abnormal — only the multivariate view sees it (after Nomikos & MacGregor). Original diagram by the authors, created with AI assistance.

The figure below makes the same point as a side-by-side: two univariate charts both read "in control," yet when the same two highlighted points are scored against a multivariate model, the batch lands well outside the normal cloud — and a contribution plot (a bar chart that names which variable broke the pattern) names the broken pH-to-glucose relationship as the culprit, not any single tag.

A two-panel comparison. The left indigo panel shows two univariate I-MR charts, one for pH and one for glucose, each with every point inside its own dashed control limits, and a verdict box reading both in control. The right violet panel shows the same two highlighted points scored against a multivariate model: a PCA score plot of PC1 versus PC2 with a green 95 percent confidence ellipse around a cloud of good batches, one rose point landing far outside the ellipse labelled this batch, and below it a contribution plot whose pH-over-glucose-ratio bar dwarfs the individual pH and glucose bars. The same moment, read two ways: every variable alone says fine; all variables at once say the correlation broke — and the contribution plot points at the pair. Original diagram by the authors, created with AI assistance.

PCA and PLS: compressing correlated variables

The escape is dimensionality reduction. Principal Component Analysis (PCA) is the foundational tool: it finds a handful of new combined variables — principal components — that capture most of the genuine variation in the data, exploiting the correlations to compress hundreds of measurements into two or three meaningful axes [4]. Its partner, Partial Least Squares (PLS), does the same compression but aims it at predicting an outcome — say, final product quality — from the process variables [4]. Both are latent-variable methods: they assume the many things you measure are driven by a few hidden things you cannot directly see (the true state of the cell culture), and they reconstruct those hidden drivers [4].

Hotelling's T-squared and SPE: two charts, two questions

With the data compressed, you monitor it with just two charts instead of hundreds. Hotelling's T-squared asks: is the process operating in a normal region of its multivariate space? It catches unusual combinations even when every single variable looks fine [4][5]. Its alarm threshold is not guessed — it is derived from a known statistical distribution (the F-distribution), so the cut-off line has a defendable, calculated basis rather than a hand-drawn one, usually placed at the 99% confidence level (a deliberate trade-off, typically tuning the per-batch false-alarm rate to roughly 1–2%). (For the statistically inclined, the exact limit scales that distribution by a factor of k(n−1)(n+1)/[n(n−k)], where k is the number of retained principal components and n the number of observations — not the raw distribution quantile itself.) The SPE chart (squared prediction error, also called Q) asks the complementary question: does the process still behave like the model expects, or has something genuinely new appeared that the model never saw? Together they give a near-complete health check from two lines on a screen [4][5].

When one of these charts trips, a contribution plot answers "which of the original variables is driving the alarm?" — pointing the investigator straight at the suspect measurement instead of leaving them to hunt through hundreds [4].

The golden batch: monitoring a process that evolves

A batch is not a steady state — it is a trajectory. The "normal" temperature on day one is not the normal temperature on day five; the culture grows, consumes, and changes throughout. So the reference for "in control" must itself be a moving target shaped like a healthy run.

The landmark solution is Multiway PCA (MPCA), introduced by Nomikos and MacGregor [3]. You take a historical library of past successful batches — the golden batches — each a full time-trajectory of every variable, and you unfold that three-dimensional block (batches × variables × time) into a form ordinary PCA can digest. The result is a multivariate fingerprint of what a good batch looks like at every moment of its life. A new batch is then monitored as it runs, point by point, against the time-varying control limits derived from that golden reference distribution [2][3].

The payoff is early fault detection. Because the model knows the expected trajectory, a developing problem typically nudges the T-squared or SPE chart off course before any single sensor breaches a limit, and long before the final quality test — leaving time to investigate and potentially intervene. How much early warning you actually get depends on the process: for a 14-day fed-batch it may be many hours, while for a fast continuous step it may be minutes, and whether the batch can be rescued depends on the root cause [2].

It is tempting to read all of this as an upstream story — a bioreactor fermentation watched over fourteen days — but the same trajectory thinking governs the downstream purification steps that turn that culture into drug substance, and the running campaign passes through several. A UF/DF (ultrafiltration/diafiltration — the final concentrate-and-buffer-exchange step described in Book 1's drug-substance chapter) cycle is itself a short trajectory: an inline conductivity probe (the live proxy for how far the buffer exchange has progressed) traces a clean exponential wash-out curve as the old process buffer is replaced over five to ten diavolumes (one diavolume being the volume of product in the system), while permeate flux (the volume crossing the membrane per area per hour, in L/m²/h) decays as the protein concentrates — and a flux that decays faster than the golden cycle is exactly the early signal of membrane fouling that a trajectory model catches before the endpoint assay does. Other downstream steps contribute single batch-summary features rather than trajectories: the virus-filtration integrity test (an air-based diffusion or pressure-hold test on the viral filter, whose post-use pass is a release gate) yields a pass/fail and a measured value an I-MR chart can trend lot to lot, and a low-pH viral-inactivation hold contributes its hold pH, temperature, and duration. The lesson is that CPV is not an upstream program with a downstream afterthought: every unit operation from capture through polishing to UF/DF emits trendable features, and the aggregate that finally trips the release gate (the HMW clump that fails an SEC limit) is a cumulative property no single downstream step owns — which is precisely why trending must span the whole chain, not just the fermenter.

Flow diagram of golden-batch multivariate monitoring. A top BUILD THE MODEL lane runs left to right: historical successful batches (the golden library), then a multiway PCA model and fingerprint, then time-varying control limits for T-squared and SPE. A LIVE BATCH lane below runs new batch streaming live, then project onto model each timepoint. Both lanes feed an Inside limits? decision diamond. Yes leads down to In control, keep running. No routes to an Alarm box where a contribution plot finds the variable, then to Investigate and intervene early. From a library of good batches to live, multivariate, trajectory-aware monitoring of a new one (after Nomikos and MacGregor). Original diagram by the authors, created with AI assistance.

Continued Process Verification: monitoring as a promise

So far these are statistical tools. Now comes the regulatory force that makes using them non-optional. The FDA's 2011 process-validation guidance reframed validation as a three-stage lifecycle: Stage 1, process design; Stage 2, process qualification (demonstrating, at commercial scale, that the manufacturing process itself reliably produces conforming product — a distinct discipline from the computerized-system validation taken apart in Part III's validation chapter, which validates the software, not the process); and — crucially — Stage 3, Continued Process Verification (CPV) [1].

CPV is the commitment that validation never ends. For the entire commercial life of the product, the manufacturer must continually monitor and trend data from every batch to give ongoing assurance that the process stays in a state of control [1]. This is not a US-only idea: the European Union codifies the equivalent obligation as Ongoing Process Verification (OPV) under EU GMP Annex 15 and the EMA process-validation guideline, so the same standing duty meets you whether you talk to an FDA or an EU inspector. The guidance explicitly calls for statistical methods — exactly the SPC and trending tools above — to detect special-cause variation as it emerges and to drive reduction of common-cause variability over time [1]. This is not a one-time study filed and forgotten; it is a perpetual, data-fed obligation. The data that feeds it is not optional either: the in-process sampling and testing behind those trends sits within the same current Good Manufacturing Practice (cGMP) world of in-process controls — the kind addressed by 21 CFR 211.110 on sampling and testing of in-process materials and drug products — where manufacturers establish and follow control procedures that monitor output and the performance of the processes responsible for variability. And because much of CPV is built on analytical measurements, the methods that produce those numbers should stay fit for purpose in the lifecycle spirit of ICH Q2(R2) (analytical validation) [10] and ICH Q14 (analytical procedure development) [11] — a drifting assay can masquerade as a drifting process.

CPV does not float alone. It is the operational expression of ICH Q10, the pharmaceutical quality system framework, whose central goals are maintaining a state of control and pursuing continual improvement across the product lifecycle through process performance and product quality monitoring [6]. SPC charts are the eyes; CPV and ICH Q10 are the standing orders to keep them open.

Why it matters

CPV turns analytics into a data-management problem of the first order, and it cashes in every chapter that came before. To trend every batch forever, you need historical data that is available and enduring for the product's whole life (Part III's ALCOA+ and retention principles). To compare batch 4 with batch 4,000, every number must mean the same thing across years of instrument and software changes (Part IV's semantic interoperability and the digital thread) — which is exactly why standards like ANSI/ISA-95 (IEC 62264, current edition 2025) for equipment and tag nomenclature and ISA-88 (IEC 61512) for batch recipe structure matter so much: they keep a tag like BR101.Temp.PV (bioreactor 101, temperature, present value) meaning the same physical thing across every system and every year. A model never sees "the bioreactor"; it sees aligned rows like this — here, one bioreactor run (BR101-2241) within our running mAb campaign:

Timestamp,BatchID,BR101.Temp.PV,BR101.DO.PV,BR101.pH.PV
2024-06-14T08:00:00Z,BR101-2241,37.0,52.3,7.02
2024-06-14T08:00:05Z,BR101-2241,37.0,51.8,7.02
2024-06-14T08:00:10Z,BR101-2241,37.1,51.1,7.01

To build a golden-batch model, you must pull thousands of such aligned trajectories from many systems at once — historians, the MES, the LIMS — which only works if Part II's architecture and connectivity standards actually connected them. And the CPV system itself runs under GxP (the family of Good-Practice regulations governing regulated data), so it must be validated, audit-trailed, and integrity-controlled like any other regulated record. A CPV program is, in the end, the moment the bill comes due for all the data governance the rest of the book argued for. Skip that groundwork and CPV degrades into manually copying numbers into spreadsheets — slow, error-prone, and blind to the multivariate signals that matter most.

From aligned tag to a fact a machine can reason on

A tag name that means the same physical thing across years is the naming half of consistency; the meaning half is making that consistency machine-checkable, which is where a formal ontology (a shared, computable vocabulary of the kinds of things in a domain and how they relate — the subject of the companion book) earns its place. The same CEX_main_pct value the I-MR card dissects below can be written as an RDF triple (a subject-predicate-object fact, the atomic statement of a knowledge graph) — bp:DS-001 bp:cexMainPct 68.99 — where the predicate bp:cexMainPct is a typed property whose meaning is pinned once, not re-guessed per system. That single typed edge is what lets a query reach the same number whether it came from the LIMS or the historian. The book's relations-and-genealogy chapter wires the batch this trend describes to the bp:derivedFrom lineage spine, so a CPV alarm on one lot becomes a traversal to every sibling lot that shares its cell bank — the trend and the recall scope are the same graph.

Three formal-semantics tools map cleanly onto CPV work. First, PROV-O (the W3C provenance vocabulary — who or what produced a fact, by which activity, from which inputs) records that an SPC limit was generated by a particular Phase-I baseline run, so a reviewer can see whether a control limit was computed from the right history rather than fitted on the data it is now judging — the lineage that distinguishes an honest limit from a circular one, the same prov:wasGeneratedBy discipline the publication-and-FAIR chapter uses to reconcile disagreeing source systems. Second, a SHACL shape (the Shapes Constraint Language — a closed-world gate that validates graph data has the required structure) can enforce the "in spec" half mechanically: a constraint such as sh:maxInclusive 80.0 on bp:cexMainPct fails any released lot whose value leaves the certificate window, and crucially a sh:minCount 1 fails a lot whose result is simply missing — the closed-world failure no SPC chart can express, because a chart can only plot a number that exists. That release gate is built in full in the SHACL release-gate chapter. The division of labour is exactly the "in spec versus in control" split this chapter opened with: SHACL gates the fixed specification (a closed-world rule the lot must satisfy), while SPC describes the live control state (a statistical limit the process sets for itself). Third, a CPV trend question can be posed as a SPARQL competency question (a plain-English question the graph must answer, run as the query language of RDF) — "return every released DrugProduct lot whose cexMainPct falls outside its control limits, ordered by date" — which over a governed graph is a single traversal rather than a manual spreadsheet pull:

# every released lot off its CEX control limits -- a CPV trend as a graph query
PREFIX bp: <https://example.org/bioproc#>
SELECT ?lot ?value WHERE {
?lot a bp:DrugProduct ;
bp:cexMainPct ?value ;
bp:cexLcl ?lcl ; bp:cexUcl ?ucl .
FILTER(?value < ?lcl || ?value > ?ucl)
} ORDER BY ?lot

The deeper grounding is that the continuant/occurrent split of BFO (Basic Formal Ontology, the upper ontology the companion book builds on) maps a CPV program's two halves directly: the lot whose CEX value is trended is a continuant (a thing that persists and bears qualities through time), while the batch run that produced it is an occurrent (a process that happens and is over) — keeping them distinct is what lets a fault on a run be traced to the lots it tainted without conflating the vessel, the process, and the material. The naming standards above (ISA-95, ISA-88) make a tag stable; this formal layer makes its meaning something a machine can validate, trace, and query — which is what turns a wall of trended numbers into knowledge a recall can act on.

From SPC record to decision: reading a release attribute's chart

A control chart looks like a picture, but the thing a quality engineer actually signs off on is a small record — a handful of named fields computed from the batch history. Take one release attribute, a cation-exchange (CEX) main-peak charge-variant percent measured once per batch (the kind of number born at QC and release — it reports the dominant charge variant, not the purity panel), and run a univariate I-MR (individuals / moving-range) chart over the campaign. With only one value per batch there is no within-group spread to use, so the chart estimates sigma from the moving range — the absolute difference between consecutive batches — and the control-chart constant d2 = 1.128 — a fixed value from a standard statistics table for moving ranges of pairs — converts the average moving range of pairs into a sigma. Capability comes from a second statistic, Cpk — the distance from the process mean to the nearer specification limit, divided by three sigma (so Cpk = 1 means the spread only just fits, and Cpk ≥ 1.33 is comfortably capable). One honesty note before we read the number: with only six batches this Cpk is a rough early estimate carrying a wide confidence interval, and it is meaningful only when the data are approximately normal and the process is already in control — never read a single tidy Cpk from six points as a settled fact. The record below is exactly what an open-source implementation returns, field by field.

A labelled identity card titled Anatomy of one I-MR over Cpk SPC record, dissecting what release_spc returns for the attribute CEX_main_pct across six campaign batches. Rows list center 68.9873 percent, mr_bar 1.8194, the d2 constant 1.128, sigma 1.61294 computed as mr_bar over d2, Cpk 1.984, and a verdict of in a state of control and capable. Below, a crux pair contrasts an indigo specification band 60.0 to 80.0 percent fixed by the certificate of analysis against a cyan data-derived control-limit band 64.1485 to 73.8262 percent computed as center plus or minus 3 sigma. A violet panel lists where the record chains: measured at the CEX polishing and QC sampling point, trended forever by a Stage 3 CPV program, and implemented as the release_spc output struct in open-source analytics. An SPC record as an identity card: the spread chain mr_bar then d2 then sigma builds the limits, Cpk reports capability, and the field pair that matters most — the data-derived control limits set against the fixed product specification. Original diagram by the authors, created with AI assistance.

Read the card the way a reviewer does. The center is the mean every other field is measured from. The spread chain — mr_bard2sigma — is what makes the limits data-derived rather than guessed: sigma = mr_bar / d2, and the control limits are simply center ± 3·sigma. Crucially, sigma here is the moving-range estimate, not the ordinary standard deviation of the six values; an I-MR chart uses it deliberately. Cpk, by contrast, is computed from the ordinary sample standard deviation against the specification — so the two halves of the record answer two different questions and are allowed to use different spread estimates. The single most misread field pair in all of SPC sits at the bottom of the card, drawn as two stacked bands: the specification [60.0, 80.0] is what the product must do (fixed by the Certificate of Analysis, unchanged even if every batch came out at 61%), while the control limits [64.1485, 73.8262] are what the process actually does (recomputed from batch-to-batch variation, indifferent to the spec). A batch can be inside one band and leaving the other, which is exactly why "in spec" is not "in control."

This record is the concrete handoff between the books. The physical artifact — the purified pool whose CEX main-peak charge-variant percent is being measured — is made in downstream chromatography; the data point it produces is governed and stored as described throughout this book; and the SPC record dissected here is implemented as the literal release_spc() return value in the open-source process-analytics chapter — which nests the I-MR fields (center, ucl, lcl — the upper and lower control limits — sigma, mr_bar) under a limits object, carries the certificate spec as the two-element list spec: [spec_low, spec_high] (its spec_low/spec_high are columns of hplc_results.csv), and reports capability as a lowercase cpk — same fields, same arithmetic, runnable code, so a reader who opens the code meets exactly this record and no contradiction. The anatomy here is the data-record view; that chapter is the SQL-and-Python view of the same thing.

What stays hard: keeping golden-batch models valid as the process moves

Everything above assumes the model still describes the process. The genuinely unsolved problem in this data flow is model drift — and specifically, how to detect and re-validate a multiway-PCA golden-batch fingerprint when the process itself shifts underneath it, without retraining the whole model from scratch every time.

The trap is built into the method. A multiway-PCA model is a fingerprint of "a normal batch" learned from a fixed library of historical good runs [3]. But that library was collected at one scale, with one set of raw-material lots, on one generation of equipment. Scale up from a 200 L development reactor to a 2,000 L manufacturing tank, switch to a new lot of a key media component, or replace a probe, and the true normal trajectory moves — while the model's idea of normal does not. The model then does one of two harmful things: it raises false alarms on perfectly good batches (every new batch looks "abnormal" because the baseline moved), or, after someone widens the limits to silence the noise, it goes quietly blind to real faults. The probe case is not hypothetical: in a controlled study, two probes of the same Raman analyzer placed in the same culture at the same time disagreed on a predicted variable by roughly 20% from instrument-to-instrument differences alone, and a calibration-transfer step was needed to halve that gap [9] — the spectroscopy-level version of exactly the drift that destabilizes a whole-trajectory fingerprint.

Two methodological points from the machine-learning side sharpen what "valid" even means for a golden-batch model, and both are easy to get wrong. The first is how you validate the fingerprint in the first place. The MPCA model's limits must hold up on batches it has never seen, which means the held-out set has to be whole batches, never a random scatter of timepoints. Splitting timepoints randomly is a textbook data-leakage trap: because a batch's points are heavily autocorrelated, a randomly held-out point sits a few seconds from one the model trained on, so the model "passes" by near-memorization and the limits look far tighter than they will be in production. The honest test is grouped (leave-one-batch-out) cross-validation — hold out every point of one batch at a time, fit on the rest, and judge the model on the batch it truly never saw — the same discipline the companion book's models-and-validation chapter builds for soft sensors. The second is the applicability domain (AD) — the region of process space the model is entitled to speak about. Hotelling's T-squared and SPE are an AD gate read the right way: a new batch with a large SPE is not merely "out of control," it is out of the model's competence — outside the cloud the fingerprint was fit on — and its T-squared score should be treated as untrustworthy rather than alarming, because the model is now extrapolating. Confusing "outside the AD" with "out of spec" is the multivariate cousin of the in-spec-versus-in-control error.

A two-panel comparison of cross-validation splits over rows colored by batch. The left rose panel, labelled naive random split and data leakage, scatters rows of BATCH-2026-001, BATCH-2026-002, and BATCH-2026-003 so that the same batch lands in both the train and test columns, with a verdict that limits look far tighter than in production. The right green panel, labelled grouped leave-one-batch-out, holds out every row of BATCH-2026-003 as the test batch while the other two batches are all train, so no batch spans the split and the model is judged on a batch it truly never saw. A random split puts the same autocorrelated batch on both sides and flatters the limits; leave-one-batch-out holds out whole batches, so the test batch is genuinely unseen. Original diagram by the authors, created with AI assistance.

The same lens names the central tension precisely. Process drift (the living system genuinely moving — a real special cause the model should flag) and model staleness (the baseline shifting under a still-valid process — covariate shift the model should adapt to) produce the same SPE excursion, and telling them apart is the unsolved part. In ML terms the two need different detectors: a leading, label-free input-distribution monitor (a Population Stability Index on the incoming tags) sees the baseline move before any quality result returns, while a lagging monitor on the prediction residual needs the slow offline assay to confirm the relationship itself has changed — the two-detector split the companion book's MLOps chapter works through in full, where a governed retrain feeds straight back into the CPV record as a change-control event.

What makes this hard rather than merely tedious is that the naive fix — retrain the model on the new conditions — collides head-on with the regulatory frame of this very chapter. Under CPV and ICH Q10, a monitoring model that touches GxP decisions is a controlled artifact; you cannot silently re-fit it whenever the numbers drift, because then the "control" the model claims to provide is unfalsifiable. So the open problem is genuinely two-sided: statistically, how to tell process drift the model should flag apart from model staleness the model should adapt to (the same signal can be either), ideally updating only the affected part of the fingerprint rather than discarding a validated model; and procedurally, how to bound that adaptation inside change control, drift-detection thresholds, and re-validation triggers so the update is itself auditable. There is no settled, validated answer — partial-model updating, calibration transfer, and formal drift monitors are all active practice, none of them a turnkey solution. This is the same drift-and-revalidation wall that the next chapter's machine-learning soft sensors hit even harder, and the same data-integrity demands (ALCOA+) apply to a model update as to any other regulated record: who changed it, when, why, and from what.

In the real world

Multivariate SPC is mainstream, not theoretical. Commercial process-analytics platforms make this routine: Sartorius SIMCA and SIMCA-online (the former Umetrics tools) and AspenTech's aspenProMV ship MPCA and PLS batch-monitoring out of the box, while general-purpose tools like SAS JMP add PCA/PLS multivariate control charts — all are in routine use, and golden-batch fingerprinting is a standard way large biomanufacturers watch live fermentations and detect faults early [2][3]. Dedicated CPV and trending suites such as MasterControl and Sartorius SIMCA are now part of an ordinary quality stack. CPV programs are an expected part of any commercial biologics license, and inspectors look for evidence that trending is real and acted upon, not cosmetic [1].

The hard part of CPV is rarely the statistics — those are textbook [7]. The hard part is getting clean, aligned, semantically consistent batch data flowing in real time from many instruments and partners so a model can run on it at all. Solve the data plumbing and the analytics in this chapter come almost for free; ignore it and the most advanced model in the world has nothing trustworthy to read.

Key terms

  • Statistical Process Control (SPC) — using statistics to distinguish normal process variation from meaningful change.
  • Common-cause vs special-cause variation — the stable background noise of a process versus a new, assignable disturbance.
  • Control chart — a time plot with statistical limits that separates noise from signal.
  • Control limit vs specification limit — how the process actually behaves versus the quality requirement it must meet; not the same thing.
  • Shewhart / CUSUM / EWMA — control charts reacting to single points, to cumulative deviation, and to weighted recent history.
  • Phase I vs Phase II — establishing chart limits from history versus monitoring live data against them.
  • Multivariate Data Analysis (MVDA) — analyzing many correlated variables together rather than one at a time.
  • PCA / PLS — latent-variable methods that compress many correlated variables into a few; PLS aims the compression at predicting an outcome.
  • Hotelling's T-squared / SPE (Q) — the two multivariate charts: am I in a normal region, and do I still behave as the model expects.
  • Contribution plot — a diagnostic that names which original variable caused a multivariate alarm.
  • Multiway PCA (MPCA) / golden batch / fingerprint — modeling whole batch trajectories from past successful runs to monitor a new one in real time.
  • I-MR chart / Cpk — the individuals / moving-range control chart for one value per batch (spread from consecutive-pair differences via d2 = 1.128), and the process-capability index — the distance from the mean to the nearer spec limit divided by three sigma — measuring how comfortably the spread fits inside the spec (Cpk ≥ 1.33 is comfortably capable; small samples give wide, provisional estimates).
  • State of control — a process whose variation stays predictable and within its established statistical limits over time; maintaining it is the explicit goal of CPV and ICH Q10.
  • Continued Process Verification (CPV) — FDA Stage 3: perpetual data-driven monitoring of every commercial batch.
  • ICH Q10 — the pharmaceutical quality system framework mandating a state of control and continual improvement.
  • Model drift / re-validation — the slow invalidation of a fitted monitoring model when scale, materials, or equipment shift the true process; under GxP, fixing it is controlled, auditable re-validation, not a silent re-fit.
  • Downstream trending — that CPV spans the whole purification chain: UF/DF conductivity and permeate-flux trajectories, the virus-filtration integrity-test result, and the viral-inactivation hold conditions all emit trendable features, not just the upstream fermenter.
  • RDF triple / typed property — a subject-predicate-object fact (e.g. a lot's cexMainPct value) whose predicate meaning is pinned once in an ontology, so a query reaches the same number across every system.
  • PROV-O provenance — the W3C vocabulary recording what activity generated a fact; applied to SPC, it captures that a control limit was generated by a named Phase-I baseline, distinguishing an honest limit from a circular one.
  • SHACL shape — a closed-world constraint that gates the fixed specification (range and presence) on a lot's record; it catches a missing required result, which an SPC chart, plotting only values that exist, cannot.
  • SPARQL competency question — a CPV trend posed as a graph query ("every lot off its control limits"), answered by traversal rather than a manual spreadsheet pull.
  • Continuant vs occurrent (BFO) — the upper-ontology split between the lot (a thing that persists and is trended) and the batch run (a process that happens and is over); keeping them distinct lets a run fault trace to the lots it tainted.
  • Grouped / leave-one-batch-out cross-validation — validating a golden-batch model by holding out whole batches, never random timepoints; random splits leak across an autocorrelated batch and flatter the limits.
  • Applicability domain (AD) — the region of process space a model may speak about; a large SPE means a batch is outside the model's competence (extrapolation), not merely out of control.

Where this leads

These classical methods describe and detect — they tell you when the present moment is unusual. The frontier is to predict: to estimate a quantity you cannot measure in real time, or to forecast where a batch is heading before it gets there. The next chapter, Machine Learning, Soft Sensors, and Hybrid Models, builds directly on the data-driven, multivariate thinking introduced here — soft sensors that infer hard-to-measure values from easy ones, hybrid models that fuse mechanistic biology with data-driven learning, and the distinctive challenge of validating artificial intelligence inside a GxP environment.