Learning pharmacokinetic dynamics with structured neural ODEs for precision dosing
Authors: Benjamin Maurel, Agathe Guilloux, Sarah Zohar, Moreno Ursino, Jean-Baptiste Woillard
Organizations: Université Paris Cité, Inria, Inserm, HeKA, F-75015 Paris, France · Université de Limoges, CHU Limoges, P&T, U1248, Limoges, France · Service de Pharmacologie, Toxicologie et Pharmacovigilance, CHU Limoges, France
Individualized dosing requires predicting how a patient's drug exposure would change under a different dose or schedule. However, a model that accurately predicts exposure at the current dose may not reliably predict what happens when treatment changes. We developed two neural models that learn pharmacokinetic dynamics from data without predefined pharmacokinetic equations. The first predicts exposure after a dose change, while the second also allows changes in dosing schedules. In simulations, the second model predicted exposure under new dosing schedules more accurately than competing neural models. On real data of kidney transplant recipients treated with tacrolimus, both models showed lower prediction errors than Bayesian estimation when predicting exposure at a later visit. These findings suggest that incorporating pharmacokinetic principles into neural models can improve predictions needed for individualized dosing.
Figures & tables
Figure 1: Study overview. a , Role of the models in model-informed precision dosing. From the samples collected under the current dose (orange), the models predict the exposure (AUC) under the observed regimen and under alternative doses or regimens. b , The five questions of the study, in the order of the Results.
Figure 2: Where the dose acts. Schematic latent dynamics (not model output) for two doses ( a – c ) or two regimens ( d ), in blue and red. a , Plain latent ODE. The dose enters only the encoder. b , Dose-in-the-dynamics model, z˙=f(z,t,d) , with one set of learned dynamics per dose. c , Dose-shift model. The dose moves the initial state, and one set of dynamics that does not depend on the dose governs the motion. d , Dose-event model. Each administration translates the drug coordinates u along b(p) , and the physiology p is unchanged.
Scenario
Metric
Latent ODE
MAP-BE
1: correctly specified model
MPE (%)
+1.23±2.10
+1.06±1.66
RMSPE (%)
16.72±1.14
16.63±1.23
2: omitted covariate effect
MPE (%)
+0.36±2.52
+2.35±1.47
RMSPE (%)
20.42±1.19
22.96±0.73
3: misspecified elimination model
MPE (%)
+0.39±2.46
+1.02±7.49
RMSPE (%)
15.04±2.71†
23.57±8.55
Table 1: Comparison of the latent ODE and Bayesian estimation for the prediction of the observed AUC under different model specifications. MAP-BE uses a population model with linear elimination and no haematocrit effect, correct in Scenario 1 and misspecified in Scenarios 2 and 3 (Methods). Mean ± s.d. over 100 simulated datasets. MPE, mean percentage error. RMSPE, root-mean-square percentage error. † From our rerun (Methods).
Visit 1
Visit 2
observed dose
alternative dose, 1–8 mg
Model
Med. ↓
± 20% ↑
Med. ↓
± 20% ↑
> 100% ↓
Latent neural ODEs, no pharmacokinetic equations
Dose-shift model a
10.0 (1.2)
80.4
13.2 (1.2)
67.5
5.6
Dose-in-the-dynamics model
11.1 (0.8)
75.5
13.9 (0.8)
66.3
8.5
Lu et al., original b
11.9 (0.6)
77.0
60.4 (3.7)
10.3
249.3
Table 2: Predictive performance of neural ODEs and of Bayesian estimation under observed and alternative doses. Simulated two-visit tacrolimus cohort, 100 training and 1100 test patients. Med., median absolute percentage error of the AUC, mean (s.d.) over 10 training runs (Lu et al., three). ± 20%, share of patients within ±20% of the true AUC. > 100%, number of patients with an error above 100%. Arrows show the better direction. a One run with a level bias (Supplementary Note 3). b Trained on single visits, as in ref. [ 14 ] . c With covariates and the cross-visit loss. d Two of three runs (Supplementary Note 3). MAP-BE, Bayesian estimation from the three visit-1 samples (one fit). e The simulator’s structure. f Visit-1 AUC of the first MAP-BE row multiplied by the dose ratio.
a Design of Baaz et al., one compartment, linear elimination
Sparse, randomised
Sparse, titrated
Dense, randomised
Model
Original
New
Original
New
Original
New
Dynamics learned from data
Empirical Bayes model
14.4±1.5
29.2±4.9
32.4±3.6
30.0±4.2
5.2±2.3
22.1±3.8
Dose-event model
10.9±1.8
8.2±1.5
12.3±2.9
12.2±4.5
2.6±0.3
2.2±0.4
Lu et al., regimen a
40.6±31.2
–
42.4±28.9
–
40.0
–
Table 3: Prediction under regimens never seen in training. Median absolute percentage error of the AUC, mean ± s.d. over training runs. a , AUC(0–30 h). Original, the five regimens of ref. [ 16 ] . New, five further regimens fixed before these runs. Titrated, the high dose given preferentially to fast eliminators. Training-regimen errors are in Supplementary Table 5. Bold, best learned model. a Regimen model [ 15 ] . b Two-port model [ 14 ] . c Regimens with the training schedule and equal doses (three original, two new). –, not run (Methods). b , AUC(0–45 h), randomised doses. Runs lower, training runs in which the dose-event model is more accurate than the empirical Bayes model. Bold, lower mean error. The models of Lu et al. are in Supplementary Table 4.
Figure 3: What the models predict for one patient. One illustrative test patient. Tacrolimus simulator, linear elimination, 12 samples. a , The training regimen, under which the samples given to every model were collected. b , c , Two regimens never seen in training, predicted from the same samples. Each row is one model, with the error of its predicted AUC over 0–45 h.
Figure 4: Effect of dose titration on learned dose–exposure relationships (design of Baaz et al., linear simulator, sparse sampling). a , Elimination rate of the patients of each training arm, with randomised and with titrated arms, one training set. Bars, medians. b , Learned dose response, the ratio of the AUCs predicted for the same patient at 850 and 350 mg, against the exposure ratio between the training arms (one point per training set). Dashed, the arm ratio attributed to the dose. Dotted, the true ratio. c , Median signed AUC error at 350 mg for patients observed on 800 mg (bars, means).
Approach
Visit k
Visit k+1
k+1 , dose change
MAP-BE, published model
5.2
24.5
25.5
Dose-proportional rule a
–
24.8
26.4
Unchanged AUC a
–
23.4
23.4
Dose-shift model, simulation only (10 runs)
13.6 (5.9)
32.6 (2.4)
38.1 (4.7)
Dose-event model, simulation only (3 runs)
18.4 (6.1)
32.0 (1.4)
35.4 (3.0)
Dose-shift model, fine-tuned (3 runs)
8.8 (1.0)
21.1 (0.4)
22.4 (1.0)
Table 4: Prediction of the next monitoring visit in kidney transplant recipients. 91 pairs of consecutive visits in 32 patients, 51 with a dose change of at least 20%. Every approach receives the samples at 0, 1 and 3 h of visit k and the dose of visit k+1 . Median absolute percentage error of the AUC(0–12 h), mean (s.d.) over training runs. k+1 , dose change, visit k+1 of these 51 pairs. Fine-tuned, on the pairs of the other patients, each patient held out in turn. a From the full profile of visit k . Details in Supplementary Table 6.
Section
Data
Training patients
Test patients
Samples
Observed dose
Scenarios 1–3, simulated
160
40, 100 datasets
3
Development cohort, real
137 profiles, 32 patients
46 CV splits
3
External cohort, real
development cohort
72
3
Alternative dose
Two-visit cohort a
100
1100
3
Two-visit cohort, variants
100
1000
3
Dose-switch cohort
100
1261
3
Table 5: Data used for each experiment. Section, of the Results. Samples, number of samples per visit given to the model. CV, cross-validation. Each training patient of the two-visit cohorts gives two training pairs (visit 1 to visit 2, visit 2 to visit 1). a Visit-1 average concentration restricted to 3–25 ng mL -1 .
Figure 5: Architecture of the dose-shift model. The encoder maps the samples of the observed visit, its dose and the covariates s to a Gaussian posterior over the latent state. For an alternative dose d′ , an affine map whose coefficients depend on the dose pair moves the encoded state. Dynamics that do not depend on the dose are integrated from the moved state, and a readout returns the concentration curve.
Figure 6: Architecture of the dose-event model. The encoder maps the observed samples and the covariates s to a Gaussian posterior over the latent state, which a learned orthonormal basis Q splits into drug coordinates u and physiology coordinates p . Each administration (tk,ak) translates u by akb(p) . Between administrations, a drug network moves only u , and the readout uses u and p .
Establishing ordinary differential equations (ODEs) describing population data is a fundamental part of mathematical modeling in pharmacology, crucial to developing digital twins. However, doing so from sparse, noisy data is a slow, expert-driven task. Existing automated methods either search a restricted model space or ignore population inter-individual variability. Here we introduce APOD (Agentic Population ODE Discovery), a language-model agent that iteratively reasons over biological knowledge and fit diagnostics in an open-ended search space to discover a population digital twin (PDT), i.e., a shared ODE system with between-subject variability. On synthetic pharmacokinetic and tumor-dynamics benchmarks, APOD recovered ground-truth structures in 94-100% of runs, 12-fold faster in median than an established library-based search. On real cohorts it converged to valid structures, and proposed a PDT of radioligand-therapy-induced platelet dynamics that predicts thrombocytopenia from first-cycle data and simulates alternative dosing schedules that lower the predicted risk of toxicity.
Romain Ferrara, Martin Soucail, Victor Gertner +7
COMPutational pharmacology and clinical Oncology (COMPO), Inria Center at University Côte d’Azur, Cancer Research Center of Marseille, Marseille, France · Department of Nuclear Medicine, Institut Paoli-Calmettes, ENETS Center of Excellence, IPC NET Center, Marseille, France · Centre for Computational Biology (CBIO), Mines Paris, PSL University, Paris, France +3
We introduce Prior-Fitted Functional Flows, a generative foundation model for pharmacokinetics that enables zero-shot population synthesis and individual forecasting without manual parameter tuning. We learn functional vector fields, explicitly conditioned on the sparse, irregular data of an entire study population. This enables the generation of coherent virtual cohorts as well as forecasting of partially observed patient trajectories with calibrated uncertainty. We construct a new open-access literature corpus to inform our priors, and demonstrate state-of-the-art predictive accuracy on extensive real-world datasets.
César Ojeda, Niklas Hartung, Wilhelm Huisinga +6
University of Potsdam, Germany · Technical University Berlin, Germany · Freie Universität Berlin, Germany +2
Ordinary differential equation models of biochemical reactions are often formulated as stoichiometric systems in which the dynamics arise from a collection of interacting processes. A central challenge is that the functional form of each process is rarely known a priori and may be difficult to infer from data. We propose biochemically informed neural ordinary differential equations (BINODEs), a neural-ODE framework that retains the stoichiometric structure of mechanistic models while representing individual processes by neural networks. In BINODEs, the outputs of neural network processes (NNPs) are mapped to state derivatives through a linear layer analogous to a stoichiometric matrix. This architecture allows biological side information, such as process-specific inputs, sign constraints, and monotonicity assumptions, to be built directly into the model. We characterize the approximation properties of NNPs for several standard biochemical rate laws and show that the proposed framework recovers both trajectories and process-level structure in Monod, Lotka--Volterra, pharmacokinetic, and ultradian endocrine models. These results suggest that BINODEs offer a useful compromise between mechanistic interpretability and data-driven flexibility for modeling partially known biochemical or biological dynamical systems.
Luis L. Fonseca, Reinhard C. Laubenbacher, Lucas Böttcher
Laboratory for Systems Medicine, Department of Medicine, University of Florida, Gainesville, FL, USA · Department of Computational Science and Philosophy, Frankfurt School of Finance and Management, Frankfurt am Main, 60322, Germany