Exact FOCE-I optimization on stiff manifolds via differentiable programming in JAX.
Kelley Joseph Brady
NiceODE LLC, Carlsbad, CA, USA. niceode@protonmail.com.
Key points
From the paper's conclusion- We demonstrate that this formulation eliminates FD noise and achieves predictive parity on well-conditioned data.
Abstract
First-Order Conditional Estimation with Interaction (FOCE-I) is a standard maximum likelihood algorithm for nonlinear mixed-effects (NLME) modeling. However, evaluating population gradients for objective functions constrained by stiff ordinary differential equations (ODEs) frequently forces production frameworks (e.g., nlmixr2) to rely on a hybrid architecture: utilizing symbolic continuous sensitivities for the inner optimization while reverting to finite-difference (FD) approximations for the outer gradients. This hybrid approach scales poorly and introduces numerical instability. While reverse-mode automatic differentiation (AD) offers exact, dimension-independent gradients, naively applying it to the bi-level FOCE-I objective encounters a fundamental barrier: evaluating higher-order cross-derivatives through adaptive ODE solvers corrupts the execution tape via discrete step-controller heuristics. To resolve this computational impasse, we introduce a novel FOCE-I formulation engineered specifically for reverse-mode AD. The method evaluates exact population gradients without numerical perturbation or unrolled higher-order graph backpropagation. It navigates the inner empirical Bayes optimization using exact first-order discrete adjoints to avoid continuous sensitivity stiffness, bridges the bi-level arg min boundary via a custom Gauss-Newton Implicit Function Theorem (IFT) vector-Jacobian product (VJP), and stabilizes the outer objective utilizing an explicit structural truncation operator. This operator yields a stabilized partial FOCE-I gradient that safely severs intractable structural cross-derivatives from the Laplace curvature penalty while fully preserving the statistical integrity of the variance remarginalization. Implemented via static Differentiable Programming (DP) in the open-source NiceODE package, the architecture is evaluated against standard FD pharmacometric frameworks. We demonstrate that this formulation eliminates FD noise and achieves predictive parity on well-conditioned data. On sparse, highly stiff clinical datasets (e.g., target-mediated drug disposition of Nimotuzumab), exact gradient precision prevents premature solver termination and exposes structurally unidentifiable manifolds as mathematically singular. By coupling this diagnostic precision with Bayesian physiological priors, the framework elevates structural unidentifiability from a computational failure to a rigorous tool for scientific falsification and establishes a scalable foundation for deploying exact NLME estimation onto massively parallel hardware accelerators.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Adjoint and Unrolled Automatic Differentiation for Laplace-Approximated Likelihoods in Population PK and PK/PD Models.CPT: pharmacometrics & systems pharmacology · 2026
- From the ELBO to Maximum Likelihood: Convergence of Variational Autoencoders for Nonlinear Mixed-Effects ModelingarXiv · 2026
- Differentiable Programming for Differential Equations: A ReviewSIAM Review · 2026
- Opening the Black Box: How Agentic AI-Assisted Modeling Lets Pharmacometricians See Inside NONMEM.Pharmaceutical research · 2026
- From exact gradients to exact standard errors: third- and fourth-order sensitivities for the Laplacian population likelihood familybioRxiv · 2026
- RapidDOC: Riccati-Preconditioned Implicit Differentiation for Differentiable Optimal Control under Operator MismatcharXiv · 2026