Artificial intelligence is now part of almost every conversation about clinical trials: protocol drafting, site selection, patient pre-screening, image reading, data cleaning, medical coding, safety case processing and clinical study report writing. The regulations have not kept pace. At the end of 2026 there is still no binding, AI-specific rule for most of the ways AI is used inside a drug trial. What exists is a draft guidance, a set of shared principles, a reflection paper, a general Good Clinical Practice framework and a European AI law whose main obligations have been pushed back.
That does not mean sponsors can do as they like. Under Good Clinical Practice the sponsor remains responsible for the reliability of trial results and the protection of participants, whatever tool produced them. This article summarises where the rules stand, explains the risk-based approach regulators are converging on, and then works through a practical example: validating an AI tool against human readers in a dummy oncology dataset, with annotated SAS code, output and interpretation.
Where AI is used in trials today
| Area | Typical AI use | Can it affect trial results or patient safety? |
|---|---|---|
| Protocol and documents | Drafting protocol sections, informed consent forms, CSR narratives | Indirectly, through errors a reviewer misses |
| Feasibility and sites | Predicting enrolment, ranking sites | Rarely; mainly cost and timelines |
| Recruitment | Pre-screening health records against eligibility criteria | Yes: who is offered the trial, and possible selection bias |
| Endpoints | Reading images, scoring digital biomarkers, analysing wearable data | Yes: directly, if the output feeds an endpoint |
| Data management | Flagging discrepancies, suggesting queries, coding with MedDRA and WHODrug | Yes, if errors pass into the locked database |
| Safety | Case intake, duplicate detection, seriousness triage | Yes: late or missed expedited reports |
| Statistics | Covariate selection, prognostic scores, digital twins as controls | Yes: directly affects the treatment effect estimate |
What the rules say today
| Document | Status | What it does |
|---|---|---|
| FDA draft guidance: Considerations for the Use of Artificial Intelligence to Support Regulatory Decision-Making for Drug and Biological Products (January 2025) | Draft, not final | Sets out a seven-step, risk-based credibility assessment for AI models whose output supports a regulatory decision on safety, effectiveness or quality. AI used only for operational efficiency is outside its scope. |
| FDA and EMA: Guiding Principles of Good AI Practice in Drug Development (January 2026) | Non-binding principles | Ten shared principles: human-centric design, a risk-based approach, adherence to standards, a clear context of use, multidisciplinary expertise, data governance and documentation, model design and development practices, risk-based performance assessment, life-cycle management, and clear, essential information. |
| EMA reflection paper on the use of AI in the medicinal product lifecycle (2024) | Reflection paper | Describes EMA's expectations across the lifecycle, including AI in clinical trials. EMA says more detailed EU guidance is being developed. |
| ICH E6(R3) Good Clinical Practice | Final; being implemented by regulators from 2025 | No AI-specific section, but its requirements for computerised systems (fitness for purpose, validation proportionate to risk, audit trails, access control, data integrity) apply to AI tools used in a trial. |
| EU AI Act | In force; high-risk obligations delayed | Under a provisional 2026 agreement, obligations for stand-alone high-risk systems move to 2 December 2027 and for AI embedded in regulated products, such as medical devices, to 2 August 2028. |
| SPIRIT-AI and CONSORT-AI (2020); TRIPOD+AI (2024) | Reporting guidelines | What to report in protocols and publications for trials of AI interventions and for prediction models. |
AI that is itself a medical device, such as diagnostic software, is regulated as a device by FDA and under the EU Medical Device Regulation. That is a separate and more developed pathway. The gap is AI used to run a drug trial or to produce its data.
What "little regulated" means in practice
Three consequences follow from the current position.
- Accountability sits with the sponsor. A regulator will not accept "the algorithm did it" as an explanation for a wrong endpoint value or a missed safety report. GCP already requires the sponsor to show that systems used in the trial are fit for purpose.
- Expectations are converging even without rules. FDA's draft guidance, the FDA and EMA principles and the EMA reflection paper all ask the same questions: what exactly is the AI used for, how much does its output influence a decision, what happens if it is wrong, and what evidence shows it works for this use.
- Evidence of performance is statistical. "Credibility" in practice means a pre-specified validation plan, an appropriate reference standard, performance estimates with confidence intervals, checks in relevant subgroups and a locked model version. These are familiar tasks for a biostatistics team.
Statistical concepts behind AI validation
1. Context of use
The context of use states what question the AI answers, in which population, at which step, and what is done with its output. The same model can be low risk in one context (ranking scans for a human reader to look at first) and high risk in another (replacing the reader). Every later step depends on this statement.
2. Model risk
FDA's draft guidance assesses model risk from two factors: model influence, how much the AI output contributes to the decision compared with other evidence, and decision consequence, how serious an incorrect decision would be. High influence combined with high consequence calls for the most rigorous validation.
3. Reference standard
An AI tool is validated against the best available truth, for example adjudicated reads by blinded independent central reviewers. An imperfect reference standard biases the performance estimates, so it should be defined in advance and applied without knowledge of the AI result.
4. Sensitivity and specificity
Sensitivity is the proportion of true positives the AI detects; specificity is the proportion of true negatives it correctly leaves negative. For a triage tool, a missed positive (low sensitivity) is usually the more serious error.
5. Predictive values and prevalence
Positive and negative predictive values depend on how common the condition is. A tool validated where prevalence is 33% will have a different positive predictive value in a trial where it is 10%.
6. Exact confidence intervals
Validation sets are often small and proportions are close to 1, so exact (Clopper-Pearson) binomial intervals are preferred to normal approximations. Acceptance criteria are best written on the lower confidence limit, not the point estimate.
7. Agreement and Cohen's kappa
Observed agreement overstates performance because some agreement happens by chance. Cohen's kappa corrects for chance agreement; values above about 0.8 are usually described as almost perfect agreement.
8. McNemar's test
McNemar's test compares the two types of disagreement (AI positive and reader negative, against AI negative and reader positive). A significant result indicates that the AI systematically over-calls or under-calls compared with the reference.
9. Subgroup performance
Overall performance can hide poor performance in a subgroup: a scanner type, a region, a skin tone, an age group. Regulators expect performance to be shown in the subgroups that matter for the trial population. This is where bias usually appears.
10. Pre-specified acceptance criteria
Criteria such as "lower 95% confidence limit for sensitivity at least 0.80" must be fixed before the validation data are analysed, in the same way as a primary endpoint. Choosing thresholds after seeing the results invalidates the exercise.
11. Model lock and drift
The model version validated must be the version used in the trial. If the model is retrained or the data it sees changes over time (new sites, new scanners), performance must be monitored and, if needed, re-validated under change control.
Study design and dummy data
A sponsor running a Phase III oncology trial plans to use an AI tool that compares each follow-up CT scan with baseline and flags possible radiological progression. The planned context of use is triage: flagged scans are sent first to the blinded independent central review (BICR), so that suspected progression is confirmed faster. The AI does not determine the endpoint; the BICR does. Because a missed flag would delay confirmation of progression, the model risk is assessed as moderate.
Before using the tool, the sponsor validates it on 240 archived scan pairs from earlier studies that already have an adjudicated two-reader BICR assessment, which serves as the reference standard. Scans come from two scanner vendors: 150 from Vendor A and 90 from Vendor B. The pre-specified acceptance criteria, to be met overall and for each vendor, are:
- sensitivity: lower 95% exact confidence limit at least 0.80;
- specificity: lower 95% exact confidence limit at least 0.85;
- Cohen's kappa: lower 95% confidence limit at least 0.70.
| Vendor | AI result | BICR: progression | BICR: no progression | Total |
|---|---|---|---|---|
| A | Flagged | 48 | 6 | 54 |
| Not flagged | 2 | 94 | 96 | |
| B | Flagged | 24 | 6 | 30 |
| Not flagged | 6 | 54 | 60 | |
| Total | 80 | 160 | 240 | |
SAS code, step by step
Step 1: Build the validation dataset
Each row is one cell of the table with its count. In a real validation there would be one row per scan pair, with scan ID, site, vendor, AI score, AI flag and BICR result; the code below works the same way without the WEIGHT statement.
/* AI = 1 if the tool flags progression, REF = 1 if BICR confirms progression */
data scans;
input vendor $ ai ref count;
label ai = "AI flag (1 = progression)"
ref = "BICR reference (1 = progression)";
datalines;
A 1 1 48
A 1 0 6
A 0 1 2
A 0 0 94
B 1 1 24
B 1 0 6
B 0 1 6
B 0 0 54
;
run;
proc format;
value yn 1 = "Progression" 0 = "No progression";
run;
Step 2: Cross-tabulation of AI against the reference
proc freq data=scans order=formatted;
tables ai*ref / norow nocol nopercent;
weight count;
format ai ref yn.;
title "AI flag versus BICR reference, all scans";
run;
Step 3: Sensitivity, specificity and predictive values with exact intervals
Sensitivity is the proportion of AI = 1 among scans with REF = 1; specificity is the proportion of AI = 0 among scans with REF = 0. Predictive values swap the roles of the two variables. The BINOMIAL option with CL=EXACT gives Clopper-Pearson limits.
/* Overall and by vendor: create a stacked dataset with an "All" group */
data scans2;
set scans;
output;
vendor = "All";
output;
run;
proc sort data=scans2; by vendor; run;
/* Sensitivity */
proc freq data=scans2(where=(ref=1));
by vendor;
tables ai / binomial(level='1' cl=exact);
weight count;
title "Sensitivity: P(AI flag | BICR progression)";
run;
/* Specificity */
proc freq data=scans2(where=(ref=0));
by vendor;
tables ai / binomial(level='0' cl=exact);
weight count;
title "Specificity: P(no AI flag | no BICR progression)";
run;
/* Positive and negative predictive values */
proc freq data=scans2(where=(ai=1));
by vendor;
tables ref / binomial(level='1' cl=exact);
weight count;
title "PPV: P(BICR progression | AI flag)";
run;
proc freq data=scans2(where=(ai=0));
by vendor;
tables ref / binomial(level='0' cl=exact);
weight count;
title "NPV: P(no BICR progression | no AI flag)";
run;
Step 4: Agreement (kappa) and McNemar's test
The AGREE option gives McNemar's test, the simple kappa coefficient with its asymptotic standard error and 95% confidence limits.
proc freq data=scans2;
by vendor;
tables ai*ref / agree norow nocol nopercent;
weight count;
title "Agreement between AI and BICR";
run;
Step 5: Does sensitivity differ between vendors?
proc freq data=scans(where=(ref=1));
tables vendor*ai / fisher nopercent nocol;
weight count;
title "Sensitivity by scanner vendor: Fisher's exact test";
run;
Step 6: Check the pre-specified acceptance criteria
Save the confidence limits with the OUTPUT statement and compare them with the thresholds in a single table, so the decision is documented and reproducible. XL_BIN is the exact lower limit of the binomial proportion and L_KAPPA the lower limit of kappa.
proc freq data=scans2(where=(ref=1)) noprint;
by vendor;
tables ai / binomial(level='1');
weight count;
output out=sens_cl binomial;
run;
proc freq data=scans2(where=(ref=0)) noprint;
by vendor;
tables ai / binomial(level='0');
weight count;
output out=spec_cl binomial;
run;
proc freq data=scans2 noprint;
by vendor;
tables ai*ref / agree;
weight count;
output out=kap kappa;
run;
data criteria;
length measure $12 result $4;
set sens_cl(in=a) spec_cl(in=b) kap(in=c);
if a then do; measure="Sensitivity"; estimate=_bin_; lcl=xl_bin; threshold=0.80; end;
if b then do; measure="Specificity"; estimate=_bin_; lcl=xl_bin; threshold=0.85; end;
if c then do; measure="Kappa"; estimate=_kappa_; lcl=l_kappa; threshold=0.70; end;
result = ifc(lcl >= threshold, "Pass", "Fail");
keep vendor measure estimate lcl threshold result;
run;
proc sort data=criteria; by measure vendor; run;
proc print data=criteria noobs;
format estimate lcl 6.3;
title "Pre-specified acceptance criteria";
run;
Output
Performance estimates with 95% exact confidence intervals
| Measure | All scans (n = 240) | Vendor A (n = 150) | Vendor B (n = 90) |
|---|---|---|---|
| Sensitivity | 72/80 = 0.900 (0.812 to 0.956) | 48/50 = 0.960 (0.863 to 0.995) | 24/30 = 0.800 (0.614 to 0.923) |
| Specificity | 148/160 = 0.925 (0.873 to 0.961) | 94/100 = 0.940 (0.874 to 0.978) | 54/60 = 0.900 (0.795 to 0.962) |
| Positive predictive value | 72/84 = 0.857 (0.764 to 0.924) | 48/54 = 0.889 (0.774 to 0.958) | 24/30 = 0.800 (0.614 to 0.923) |
| Negative predictive value | 148/156 = 0.949 (0.901 to 0.978) | 94/96 = 0.979 (0.927 to 0.997) | 54/60 = 0.900 (0.795 to 0.962) |
Agreement and McNemar's test
| Statistic | All scans | Vendor A | Vendor B |
|---|---|---|---|
| Observed agreement | 0.917 | 0.947 | 0.867 |
| Expected (chance) agreement | 0.550 | 0.547 | 0.556 |
| Simple kappa (ASE) | 0.815 (0.040) | 0.882 (0.040) | 0.700 (0.080) |
| 95% confidence limits for kappa | 0.737 to 0.892 | 0.803 to 0.961 | 0.543 to 0.857 |
| Discordant pairs (AI+ BICR− / AI− BICR+) | 12 / 8 | 6 / 2 | 6 / 6 |
| McNemar statistic (DF = 1), p-value | 0.80, p = 0.3711 | 2.00, p = 0.1573 | 0.00, p = 1.0000 |
Sensitivity by vendor: Fisher's exact test
| Vendor | Progression flagged | Progression missed | Sensitivity |
|---|---|---|---|
| A | 48 | 2 | 0.960 |
| B | 24 | 6 | 0.800 |
| Fisher's exact test, two-sided p = 0.0473 | |||
Pre-specified acceptance criteria
| Criterion (lower 95% limit) | Threshold | All scans | Vendor A | Vendor B |
|---|---|---|---|---|
| Sensitivity | ≥ 0.80 | 0.812: Pass | 0.863: Pass | 0.614: Fail |
| Specificity | ≥ 0.85 | 0.873: Pass | 0.874: Pass | 0.795: Fail |
| Kappa | ≥ 0.70 | 0.737: Pass | 0.803: Pass | 0.543: Fail |
Interpretation
Overall, the tool looks good. Across all 240 scans it detected 90% of progressions (95% CI 81.2% to 95.6%) with 92.5% specificity, and agreement with BICR was almost perfect (kappa 0.815, 95% CI 0.737 to 0.892). McNemar's test (p = 0.37) gives no evidence that the AI systematically over-calls or under-calls compared with the readers. All three pre-specified criteria are met on the pooled data.
By vendor, the picture changes. On Vendor A scans the tool performs very well: it missed 2 of 50 progressions. On Vendor B scans it missed 6 of 30, a sensitivity of 80% with a lower confidence limit of 61.4%, and sensitivity is significantly lower than on Vendor A (Fisher's exact p = 0.047). Vendor B fails all three acceptance criteria. Part of the failure is the smaller sample size, which widens the intervals, but the point estimates are also lower.
The decision. Because the acceptance criteria were pre-specified for each vendor, the tool cannot be used as validated for Vendor B scans. Reasonable options are to restrict the context of use to Vendor A scans, to send all Vendor B scans to BICR without AI triage, or to retrain the model on more Vendor B images and re-validate the new, locked version on independent data. Whichever option is chosen should be documented with the validation report.
The lesson for any AI tool. Had the sponsor looked only at the pooled numbers, a weakness affecting more than a third of the scans would have gone unnoticed. In a real trial, sites using Vendor B would have had progression flagged later, which is exactly the kind of hidden, systematic problem regulators' subgroup and data-governance principles are designed to catch.
Practical points for sponsors
- Write the context of use first. One paragraph: what the AI does, for which data, at which step, and who acts on its output.
- Assess risk honestly. If the output feeds an endpoint, an eligibility decision or a safety report, treat the tool as high risk and validate accordingly.
- Pre-specify the validation like an analysis plan. Reference standard, sample size, metrics, subgroups and acceptance criteria, signed before the data are analysed.
- Size the validation set for the subgroups, not only the total. In the example, 30 Vendor B progressions were too few to show a lower limit above 0.80 even for a reasonably good tool.
- Use data the model has not seen. Training and validation data must be separate, and ideally from different studies or sites.
- Lock and version the model. Record the model version, configuration and the data it was trained on in the trial master file, with change control for any update.
- Keep a human in the loop where errors matter, and record in the audit trail what the AI proposed and what the human decided.
- Monitor during the trial. Re-check agreement on a sample of cases periodically, especially when new sites, scanners or data sources are added.
- Treat vendor claims as a starting point. Published performance comes from someone else's data. Under GCP the sponsor must show the tool is fit for purpose in its own trial.
References
- US FDA. Considerations for the Use of Artificial Intelligence to Support Regulatory Decision-Making for Drug and Biological Products. Draft Guidance for Industry. January 2025.
- US FDA and European Medicines Agency. Guiding Principles of Good AI Practice in Drug Development. January 2026.
- European Medicines Agency. Reflection paper on the use of Artificial Intelligence (AI) in the medicinal product lifecycle. 2024.
- ICH E6(R3). Guideline for Good Clinical Practice. 2025.
- Regulation (EU) 2024/1689 (Artificial Intelligence Act).
- Liu X, Cruz Rivera S, Moher D, Calvert MJ, Denniston AK; SPIRIT-AI and CONSORT-AI Working Group. Reporting guidelines for clinical trial reports for interventions involving artificial intelligence: the CONSORT-AI extension. Nature Medicine. 2020;26:1364-1374.
- Collins GS, Moons KGM, Dhiman P, et al. TRIPOD+AI statement: updated guidance for reporting clinical prediction models that use regression or machine learning methods. BMJ. 2024;385:e078378.
- Cohen J. A coefficient of agreement for nominal scales. Educational and Psychological Measurement. 1960;20(1):37-46.
- Clopper CJ, Pearson ES. The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika. 1934;26(4):404-413.
The dataset in this article is simulated and is provided for training purposes only. It does not describe any real product, AI tool or trial. The regulatory summary reflects publicly reported positions at the end of 2026; check the regulators' own websites for the current status of each document.




