Biostatistics & Trial Design guide
AI for biostatistics and clinical trial design: programming, simulation and eligibility criteria
How AI is used in biostatistics: statistical programming, trial design and simulation, eligibility criteria, digital twins, FDA expectations and a buyer checklist.
AI now helps biostatistics teams in four places: drafting SDTM, ADaM and TLF code; comparing and simulating trial designs; drafting eligibility criteria from registered trials; and prognostic digital twins that can reduce sample size. Tools include Saama, Narrativa, Clymb Clinical and GenInvo for programming, Cytel and Unlearn for design and digital twins, and Keiji AI's TrialMind across all four. Outputs still need statistical review, and FDA's 2025 draft guidance asks sponsors to show an AI model is credible for its context of use.
Where AI fits in biostatistics
Biostatistics work splits into design before the SAP is final and programming after it. AI is useful in both, but the risks differ.
| Task | What AI does | Who stays accountable |
|---|---|---|
| Statistical programming | Drafts SDTM, ADaM and TLF code from specs and the SAP | Programmers, through QC |
| Trial design and simulation | Compares designs, runs scenarios, gathers supporting evidence | The trial statistician |
| Eligibility criteria | Finds comparable trials and drafts criteria with citations | Medical directors |
| Digital twins | Builds prognostic models to reduce required sample size | Statisticians, with regulators |
Statistical programming: SDTM, ADaM and TLFs
The most mature use is drafting CDISC datasets and analysis code. Products include Saama BRAIN, Narrativa, Clymb Clinical, GenInvo CodeMagic and TrialMind. Pinnacle 21 remains the common conformance validator.
TrialMind builds SDTM domains from your specifications, derives ADaM datasets such as ADSL, applies Pinnacle 21 rules, and produces TLFs. It writes SAS and R using your own macros and templates. When the protocol changes, it lists the affected code, specs, datasets and tables.
Generated code still goes through your QC process. See AI for SDTM and ADaM generation for what "validated" means, and the tool comparison.
Trial design and simulation
Simulation is already standard for complex designs. FDA's final guidance Adaptive Designs for Clinical Trials of Drugs and Biologics (December 2019) says clinical trial simulations often play a critical role in planning, and are particularly important for adaptive trials. It describes estimating Type I error by simulating trials under null-hypothesis assumptions, often on a grid of plausible values.
FDA's guidance Interacting with the FDA on Complex Innovative Trial Designs (December 2020) covers how sponsors get feedback on modeling and simulation, and what information to submit.
AI adds speed and breadth to this work. TrialMind's design workflows:
- Evidence review: a framework listing the papers behind each design assumption.
- Estimands and power: estimand documents following ICH E9(R1), with power across five design scenarios.
- Design grid: feasible designs mapped across key assumptions, such as hazard ratio and control-arm median PFS.
- Combination simulation: published combination-therapy results included in the simulation, with type II error and enrollment rate varied.
Dedicated simulation software is the other route. Cytel describes East Horizon as offering trial design and simulation, with adaptive options such as sample size re-estimation and population enrichment.
Drafting eligibility criteria
Eligibility criteria drive enrollment speed. Registered trials give a large base of precedent to learn from.
At a global biopharmaceutical company, medical directors use TrialMind to find comparable trials from a reference study, compare their criteria, and draft criteria for a new protocol, cited by trial. Drafting went from months to days, with a first draft in hours.
The research behind this is public. TrialPanorama (npj Digital Medicine, 2025) is a database of 1,060K+ trials from 15 sources; eligibility criteria design is one of its benchmark tasks. AutoTrial (EMNLP 2023) studied prompting language models for trial design.
Criteria drafts are proposals. The clinical team decides, and the criteria are tested against patient data before the protocol is final.
Digital twins and smaller trials
A prognostic digital twin predicts each participant's likely outcome. Adjusting for it can give the same power with fewer patients.
TrialMind's digital twin workflow runs in five steps:
- Individual patient data reconstructed from published trials, with assumptions stated.
- Cohort assembly and validation, checking event rates first.
- Prognostic modeling and sample size, quantifying the reduction against a conventional design.
- Sensitivity across design assumptions, each estimate reported with its uncertainty.
- Applied back to the design: prospective, adaptive enrollment or exploratory.
In one example on the de-identified MIMIC hospital dataset, prognostic adjustment cut a sepsis mortality trial from 3,214 to 2,809 patients, 12.6% smaller. The underlying method is in TWIN: Personalized Clinical Trial Digital Twin Generation (KDD 2023).
Unlearn is a dedicated digital twin provider. It describes a digital twin as an AI-generated forecast of one participant's outcomes, used to test eligibility, endpoints and sample size before protocol lock.
What FDA expects when AI supports a decision
In January 2025 FDA issued the draft guidance Considerations for the Use of Artificial Intelligence To Support Regulatory Decision-Making for Drug and Biological Products. It is non-binding and not yet final.
It sets out a seven-step, risk-based credibility framework:
- Define the question of interest.
- Define the context of use for the AI model.
- Assess the AI model risk.
- Develop a plan to establish credibility within the context of use.
- Execute the plan.
- Document the results and discuss deviations.
- Determine the adequacy of the model for the context of use.
Model risk combines model influence, how much the AI evidence contributes to the decision, and decision consequence, how serious a wrong decision would be.
The scope matters. The draft does not address AI used for operational efficiencies, such as internal workflows or drafting a submission, that do not affect patient safety, drug quality or the reliability of study results. AI that drafts code reviewed by programmers sits closer to that end. A digital twin that reduces a control arm sits squarely inside it.
Separately, FDA's Statistical Software Clarifying Statement requires no specific software, but the software must be documented and reliable.
Buyer checklist
- Scope. Which tasks: SDTM, ADaM, TLFs, design, simulation, eligibility, digital twins? Most tools cover only programming.
- Code you own. Does it produce readable SAS or R you can export and rerun?
- Your standards. Does it use your macro library, templates and naming conventions? Test on a finished study.
- Conformance. Does it apply Pinnacle 21 or FDA validator rules while drafting?
- Traceability. Can it show which code, datasets and tables a protocol amendment affects?
- Qualification. What GxP qualification exists, for which version, and under which framework?
- Data location. Does patient data leave your environment? TrialMind deploys inside it.
- Published evidence. Are the methods peer reviewed, with benchmarks you can read?
- Credibility plan. If outputs inform a regulatory decision, can the vendor support FDA's credibility framework?
Related research from Keiji AI's team
Keiji AI's methods are peer reviewed. Relevant papers for biostatistics:
- DSWizard, Nature Biomedical Engineering (2026): a multi-step analysis workflow of roughly three months by hand completed in about a day, with a human setting the target and reviewing results.
- TrialPanorama, npj Digital Medicine (2025): trial records and benchmarks for design tasks including eligibility criteria and sample size.
- TWIN, KDD (2023): personalized clinical trial digital twin generation.
- AutoTrial, EMNLP (2023): prompting language models for clinical trial design.
All papers: publications.
Frequently asked questions
- What are the best AI tools for clinical trial statistical programming?
- Saama BRAIN, Narrativa BioStat Developer, Clymb Clinical's Clymbr Hub, GenInvo CodeMagic and Keiji AI's TrialMind all draft SDTM, ADaM or TLF code. Pinnacle 21 remains the conformance validator alongside them.
- What AI tools help design and simulate a clinical trial?
- TrialMind compares designs, computes power across scenarios and simulates combination-therapy evidence. Cytel's East Horizon is dedicated design and simulation software, and Unlearn offers digital twins for design.
- What AI tools help draft eligibility criteria?
- TrialMind finds comparable registered trials, compares their criteria and drafts criteria cited by trial. At a global biopharmaceutical company this took drafting from months to days.
- Does FDA accept AI in trial design?
- FDA's January 2025 draft guidance asks sponsors to establish an AI model's credibility for its context of use, using a seven-step risk-based framework. Simulation-based designs are already covered by FDA's adaptive and complex innovative design guidances.
- Will AI replace biostatisticians?
- No. AI drafts code, scenarios and criteria; statisticians set the question, choose the design and sign off results. DSWizard's results came with a human setting the target and reviewing.
Related
- Compare biostatistics and trial design tools
- AI for SDTM and ADaM generation: tools, validated code and Pinnacle 21
- TrialMind vs Saama BRAIN
- AI for clinical operations: patient matching, site selection and risk-based monitoring
- AI for real-world evidence: feasibility, cohorts and studies on claims and EHR data
See TrialMind on your own question
A 30-minute walkthrough on a study like yours, with sources and code you can check.
Sources · checked 2026-10-21
Product details come from each company’s public pages. Spotted something out of date? Tell us and we will correct it.
- Keiji AI: Biostatistics & Trial Design solution
- Keiji AI: TrialPanorama
- Keiji AI: Publications
- DSWizard (Nature Biomedical Engineering, 2026)
- TWIN: Personalized Clinical Trial Digital Twin Generation (KDD 2023)
- AutoTrial: Prompting Language Models for Clinical Trial Design (EMNLP 2023)
- FDA: Considerations for the Use of AI to Support Regulatory Decision-Making (draft, January 2025)
- FDA: Adaptive Designs for Clinical Trials of Drugs and Biologics (2019)
- FDA: Adaptive Designs guidance (PDF)
- FDA: Interacting with the FDA on Complex Innovative Trial Designs (2020)
- FDA: Statistical Software Clarifying Statement
- Saama: BRAIN
- Narrativa: AI agents for SDTM and ADaM generation
- Clymb Clinical
- GenInvo: CodeMagic
- Certara: Pinnacle 21
- Cytel: East Horizon
- Unlearn