Skip to content

Menu

WorksPubMed

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

A preview from PubMed. Valency holds this work's metadata and abstract, not its full text.

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.

Paper details

Source

Source
PubMed
First available
Nov 1, 2026 – Nov 2, 2026
Identifier
pubmed:42972177

Pick where to look, or just type