Opening the Black Box: How Agentic AI-Assisted Modeling Lets Pharmacometricians See Inside NONMEM
Related Experiment Videos
1Clinical Pharmacology, Bristol Myers Squibb, 5 Giralda Farms, Madison, NJ, 07940, USA.
Abstract:
NONMEM is the gold-standard tool in pharmacometrics, yet much of its estimation engine operates out of sight. Routine outputs show what the engine reports, but not everything it computes along the way. The quantities needed to answer a specific question may exist transiently within the long-established Fortran-based engine, but for most modelers they remain hidden behind an implementation barrier. AI-assisted modeling changes that barrier. A user can pose a question in "vibe" language, work with an AI assistant to generate verbatim Fortran code that instruments the running engine and exposes otherwise unavailable quantities on demand for use as additional model diagnostics or in other ad hoc investigations. We illustrate this capability with two examples: capturing how subject-level samples evolve from one iteration to the next during NONMEM's expectation-maximization (EM) methods, including importance sampling (IMP) and stochastic approximation expectation maximization (SAEM), and tracking the BFGS Hessian approximation and objective-function gradients across snapshots of first-order conditional estimation (FOCE). The examples themselves are not the central contribution. Rather, they demonstrate how AI can turn NONMEM from a closed black box into an engine that motivated users can interrogate when new questions arise. When paired with scientific judgment and numerical verification, AI can make forms of engine-level inspection once largely limited to developers and specialized experts accessible to everyday modelers, substantially shortening the distance between a NONMEM user and a NONMEM expert.
Related Concept Videos
Mechanistic Models: Overview of Compartment Models
Pharmacokinetic Models: Overview
There are three primary types of models: empirical, compartment, and physiological. Empirical models, with minimal assumptions,...
Mechanistic Models: Compartment Models in Individual and Population Analysis
Impact of Pharmacokinetic–Pharmacodynamic Models: Regulatory Decisions
Model Approaches for Pharmacokinetic Data: Distributed Parameter Models
The distributed parameter models are specifically designed to account for variations and differences in some drug classes. This model is particularly useful for assessing regional concentrations of anticancer or...
Pharmacokinetic Models: Comparison and Selection Criterion
Physiological models take a detailed approach by considering specific molecular processes. They can predict drug distribution, metabolism, and elimination changes, providing a comprehensive understanding of how drugs interact with the body.