I-044

pmxNODE: A novel R-package to make low-dimensional NODEs available in Monolix, NONMEM, and nlmixr2

Dominic Bräm1, Britta Steffens1, Marc Pfister1, Gilbert Koch1

1Pediatric Pharmacology and Pharmacometrics, University Children's Hospital Basel

Objective: pmxNODE is a novel, freely available R-package [1] that facilitates the implementation of low-dimensional neural ordinary differential equations (NODEs) [2] in pharmacometric software such as Monolix, NONMEM, and nlmixr2 [3]. While the use of low-dimensional NODEs in pharmacometric software has been presented previously, their implementation required significant coding, proper initialization of multiple parameters, and adjustment of various software options. The pmxNODE package simplifies this process by enabling the use of straightforward neural network statements in common Monolix, NONMEM, and nlmixr2 models, which are automatically translated into required model code for NODEs. Additionally, the package automatically initializes all parameters and adjusts software options to ensure optimal model fitting. The application of neural network statements in pharmacometric models also supports scientific machine learning [4], i.e., the combination of neural networks with mechanism-based model components. Methods: The ease of use and flexibility offered by the pmxNODE package are demonstrated through the example of the well-known warfarin pharmacokinetic-pharmacodynamic (PKPD) dataset, which includes warfarin concentrations as PK data and prothrombin complex activity (PCA) as PD data. Conventional, mechanism-based modeling describes this data using a first-order absorption model with lag-time, first-order elimination, and an indirect response model with Emax inhibition on PCA. Several structural model variations, containing one or multiple neural networks with or without mechanism-based components, were tested: 1.Complete NODE model: The entire PKPD model was described using neural networks, including warfarin absorption and elimination, as well as response of PCA to warfarin. 2.NODE-PK with mechanism-based PD model: Warfarin absorption and elimination were described using neural networks, while PCA was described with an indirect response model. 3.Mechanism-based PK with NODE-PD model: Warfarin absorption and elimination were described using mechanism-based equations, while PCA dynamics were described with neural networks dependent on PCA and on warfarin concentration. 4.Mechanism-based PK with mechanism-based/NODE-PD model: The mechanism-based PKPD model was used, while only the Emax function was replaced with a neural network for the PD component. All neural networks consisted of 5 hidden neurons with ReLU activation function. Models were evaluated in terms of number of lines of code and parameters that the modeler needed to initialize, as well as the mean squared error (MSE) of model predictions. Results: The pmxNODE package substantially reduced number of lines to write and parameters to initialize by the modeler. The most notable example is the complete NODE model, which would require 47 lines of code and 95 parameters to initialize implementing it directly in Monolix. In contrast, with the pmxNODE package, only 11 lines of code and 1 parameter to initialize (initial estimate for PCA) were required. This difference becomes even more pronounced when using neural networks with more hidden neurons, as this is automatically handled with the pmxNODE package. Additionally, pmxNODE allows easily the use of different activation functions for hidden neurons, such as the Softplus activation function. The MSE of the complete NODE model is lower for both, PK and PD predictions, compared to the conventional, mechanism-based model. For the NODE-PK with mechanism-based PD model, the MSE for PK predictions was lower, while the MSE for PD predictions was higher. For the mechanism-based PK with NODE-PD model, the MSE for PK predictions was higher, while the MSE for PD predictions was lower compared to the conventional, mechanism-based model. Conclusion: The integration of neural network statements in conventional model code through the pmxNODE package facilitates the use of NODEs and makes scientific machine learning more accessible to a broader pharmacometric community.

 [1] Bräm D (2025), GitHub repository, https://github.com/braemd/pmxNODE [2] Bräm D, Nahum U, Schropp J et al. (2023) Low-dimensional neural ODEs and their application in pharmacokinetics. J Pharmacokinet Pharmacodyn: https://doi.org/10.1007/s10928-023-09886-4 [3] Bräm D, Steiert B, Pfister M, Steffens B, Koch G (2024) Low-dimensional neural ordinary differential equations accounting for inter-individual variability implemented in Monolix and NONMEM. CPT Pharmacometrics Syst Pharmacol. https://doi.org/10.1002/psp4.13265 [4] Rackauckas C, Ma Y, Martensen J et al. (2021) Universal Differential Equations for Scientific Machine Learning. arXiv: 2001.04385. https://doi.org/10.48550/arXiv.2001.04385  

Reference: PAGE 33 (2025) Abstr 11354 [www.page-meeting.org/?abstract=11354]

Poster: Methodology – AI/Machine Learning

PDF poster / presentation (click to open)