Week 9 — Nov 9: AI in Analytical Science & the Regulatory Landscape
(Lecture 8.) The instrument weeks are done. The course now turns to the data layer — three weeks in dependency order: the rules (this week), the method (machine learning & chemometrics), and the deployment (PAT). This week is the rules: what counts as a trustworthy computational result, and where an AI system is allowed to influence a regulated decision.
On teaching this honestly. Nobody in the department specialises in machine learning, and this week does not pretend otherwise. The goal is not to make you model builders; it is to make you competent clients and reviewers of these tools — able to say what a model must do, what data it needs, whether its output can be trusted, and where the regulations draw the line.
The one idea
A predictive model is a hypothesis about data in exactly the way a method is a hypothesis about a molecule — fit on the evidence you have, valid only within its range, tested by every new sample. A generative model is something else: a non-deterministic, non-traceable text engine that has entered the quality system as a new kind of actor. The first is governed like a method; the second forces the question of where an untraceable output may sit at all.
Three things called “AI”
| Kind | What it is | Where it shows up | How it’s governed |
|---|---|---|---|
| Predictive ML / chemometrics | A model mapping inputs to a number or class, fit on labelled data | NIR/Raman calibration, peak detection, predictive stability, (Q)SAR | Like an analytical method — Q2, Q14, lifecycle |
| Generative / LLMs | A model that produces fluent text (or code, images) from a prompt; non-deterministic | Drafting narratives, extracting data from legacy PDFs, literature triage, code assistance, “chat with your data” | Emerging AI guidance plus the existing data-integrity, Part 11, and CSV floor; a human verifies every factual output |
| Agentic systems | An LLM given tools and allowed to act in a loop | Early pilots — automated investigation triage, lab-system orchestration | Least mature; treated as a computerised system with a human decision-maker in the loop |
The regulatory landscape (early 2026)
There is not yet a binding, AI-specific regulation for pharmaceutical analysis. There is a fast-forming framework sitting on a floor that already applies:
| Layer | What it says |
|---|---|
| EU AI Act | Horizontal, risk-tiered; phasing in through 2026–2027. Most pharma-analytical uses are limited- or minimal-risk, but obligations around transparency, data governance, and human oversight apply |
| FDA draft guidance (2025) on AI to support regulatory decisions for drugs | A risk-based credibility framework: the evidence you need for a model scales with the risk of the decision it informs (model influence × decision consequence) |
| FDA discussion papers on AI in drug manufacturing | Lifecycle management, data quality, human oversight, change control for deployed models |
| ICH reflection paper on AI | Signals that AI will be addressed within the existing ICH quality framework, not a separate track |
| ISPE GAMP / PDA guidance | Practical AI/ML validation and lifecycle guidance for GxP systems |
| The floor — already binding | GMP data integrity (ALCOA+), 21 CFR Part 11 / Annex 11 (electronic records and signatures), computerised-system validation, Q9 quality risk management |
The through-line: credibility proportionate to consequence. A model that ranks literature for a scientist to read needs almost nothing; a model whose output releases a batch needs the full apparatus.
Where a language model can and cannot sit
| Can (with human verification) | Cannot |
|---|---|
| Draft an OOS-investigation narrative from analyst notes | Decide the OOS outcome, or state a root cause as fact |
| Extract structured data from legacy CoAs, reports, PDFs | Be the sole record of that data — the extraction is verified against the source |
| Triage literature; summarise a method-transfer report | Contribute an uncited claim to a regulatory document |
| Assist with chemometrics / analysis code | Run unreviewed code that produces a reportable result |
| Answer questions over a curated internal dataset | Be trusted on a number without the analyst checking the source |
The hard line is data integrity: an LLM output is not deterministic (same prompt, different answer), not inherently traceable to a source, and can be confidently wrong. Anything that becomes a GMP record or informs a GMP decision must be verified and attributable to a person.
Worked case — where a prediction already replaces an experiment
ICH M7 (assessment of DNA-reactive impurities) is the clearest example of a computational prediction being formally accepted in lieu of data. For a new impurity, M7 allows a mutagenicity conclusion drawn from two complementary (Q)SAR systems — one expert-rule-based, one statistical — to substitute for an Ames test. If both predict non-mutagenic and there is no conflicting knowledge, no bacterial assay is run.
Everything the data movement is about is visible in that one accepted use:
- Two orthogonal models, not one — the same instinct as orthogonal analytical methods.
- A defined scope — it applies to the impurity assessment; an alert or an out-of-domain structure sends you back to the experiment.
- Documented, versioned, reproducible — model versions and the call are recorded as data; ALCOA+ applies to a prediction.
- Expert review on top — a toxicologist can overrule the software in either direction, with a rationale.
Predictive stability (ASAP) is on the same trajectory — accepted case-by-case now, given a formal home in the modernized Q1 stability-modeling annex — as is the dissolution IVIVC biowaiver: an in-vitro model standing in for a clinical study.
Making an AI result trustworthy
The FDA credibility framework generalises method validation: state the question of interest and the context of use, assess the model’s risk, then gather credibility evidence proportionate to it. The mechanics of that evidence — training/test separation, applicability domain, drift monitoring, reproducibility — are Week 10’s subject, taught as the same discipline as Q2 method validation.
Where the analyst sits
For predictive models the analyst (1) states what the model must do in measurable terms, (2) owns the quality and representativeness of the training data — a model is only as trustworthy as the labels an analyst put on it — and (3) decides, per sample, whether it is in the applicability domain. For generative tools the analyst is the verifier — the person accountable for every fact the fluent output asserts. Neither is machine-learning expertise; both are analytical judgment, the STEAM “A” pointed at a model. The refrain: science → evidence → reduced uncertainty → control → regulatory confidence → patient trust.
For discussion
- M7 accepts two (Q)SAR predictions in place of an Ames test, but not one. Why two, and why does that mirror how you use analytical methods?
- Rank these by the credibility evidence they need: an LLM that summarises papers; an NIR model that releases tablets; a (Q)SAR call on an impurity; an LLM that drafts an OOS narrative. What drives the ranking?
- An LLM drafts an OOS investigation summary that is fluent and plausible. Which parts can it own, and which must a human write? Where exactly does data integrity draw the line?
- “Same prompt, different answer.” Why is non-determinism a data-integrity problem specifically, and how would you manage a tool that has it?
- Predictive stability could cut a filing timeline by months. What would you need before you would put a modeled shelf life on a label?
- The EU AI Act requires “human oversight” of AI systems. For an in-line NIR release model, what does meaningful human oversight actually look like?
Source note. Anchored in ICH M7(R2) (the two-(Q)SAR provision), the FDA draft guidance Considerations for the Use of Artificial Intelligence to Support Regulatory Decision-Making for Drug and Biological Products (2025) and its credibility-assessment framework, FDA discussion papers on AI in drug manufacturing, the ICH reflection paper on AI, the EU AI Act, and ISPE GAMP guidance on AI — all on the existing base of GMP data integrity (ALCOA+), 21 CFR Part 11 / EU Annex 11, and Q9. Predictive stability connects to the modernized Q1. (Instructor: this is a new lecture and the FDA/ICH/EU documents move fast — confirm the current versions the week before. Decide how much of the shared notebook thread starts here versus in Week 10.)