NoLimits.jl: Flexible and Composable Nonlinear Mixed-Effects Modeling in Julia
Summary
NoLimits.jl is an open-source Julia package designed for flexible and composable nonlinear mixed-effects (NLME) modeling, addressing limitations in existing software regarding model structures and inference methods. It provides a macro-based language to build observation and latent-state models using diverse components like ordinary differential equations, Markov models, and neural networks. The package supports flexible, covariate-dependent observation and random-effects distributions, including normalizing flows, and offers a unified interface for frequentist inference (Laplace approximation, SAEM, MCEM, MLE) and Bayesian Markov chain Monte Carlo methods via Turing.jl. Demonstrated on warfarin pharmacokinetics, pharmacodynamics with learnable concentration-effect functions, and fish growth using normalizing flows, NoLimits.jl version 0.1.0 expands the scope of NLME models that can be specified, estimated, and compared within a single framework.
Key takeaway
For Research Scientists or Data Scientists analyzing complex longitudinal data, NoLimits.jl provides a powerful open-source Julia framework to overcome limitations of traditional NLME software. You should consider it when your projects require integrating mechanistic models with neural networks, using flexible random-effects distributions like normalizing flows, or switching seamlessly between frequentist and Bayesian inference. This framework allows you to uncover subtle data structures that rigid parametric assumptions might obscure, enhancing your model's descriptive power.
Key insights
NoLimits.jl unifies diverse nonlinear mixed-effects model components and inference methods within an open-source Julia framework.
Principles
- Flexible model specification integrates ODEs, Markov models, and neural networks.
- Decoupling inference from model specification allows seamless method switching.
- Tight integration with Julia's SciML ecosystem enhances modeling capabilities.
Method
Define a model with the @Model macro, bind it to data as a DataModel, fit using fit_model with an estimator, then compute uncertainty and diagnostics.
In practice
- Employ normalizing flows for random-effects distributions to model multimodal population structures.
- Embed neural networks or soft trees to learn complex, data-driven concentration-effect functions.
- Utilize cross-validation (e.g., 10-fold leave-subjects-out) to compare models and diagnose underlying data structure.
Topics
- Nonlinear Mixed-Effects Models
- Julia
- Scientific Machine Learning
- Normalizing Flows
- Pharmacometrics
- Ordinary Differential Equations
Code references
- manuhuth/NoLimits.jl
- emmekeaarts/mhmmbayes
- robertfeldt/BlackBoxOptim.jl
- stevengj/nlopt
- PumasAI/SimpleChains.jl
Best for: AI Scientist, Research Scientist, Data Scientist
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by stat.ML updates on arXiv.org.