Pharmaceutical research

Opening the Black Box: How Agentic AI-Assisted Modeling Lets Pharmacometricians See Inside NONMEM.

Yiming Cheng, Yan Li

Clinical Pharmacology, Bristol Myers Squibb, 5 Giralda Farms, Madison, NJ, 07940, USA. · Clinical Pharmacology, Bristol Myers Squibb, 5 Giralda Farms, Madison, NJ, 07940, USA. Yan.Li@bms.com.

Key points

From the paper's conclusion
  • 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 est

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.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers