AMICI: High-Performance Sensitivity Analysis for Large Ordinary Differential Equation Models
Fabian Fröhlich, Daniel Weindl, Yannik Schälte, Dilan Pathirana, Łukasz Paszkowski, Glenn Terje Lines, Paul Stapor, Jan Hasenauer
AAMICI: High-Performance SensitivityAnalysis for Large Ordinary Differential
Equation Models
Fabian Fr¨ohlich , ∗ , Daniel Weindl , Yannik Sch¨alte , ,Dilan Pathirana , (cid:32)Lukasz Paszkowski , Glenn Terje Lines ,Paul Stapor , and Jan Hasenauer , , , ∗ December 2020 Department of Systems Biology, Harvard Medical School, Boston, MA 02115, USA, Institute of Computational Biology, Helmholtz Zentrum M¨unchen – German Research Center forEnvironmental Health, 85764 Neuherberg, Germany, Center for Mathematics, Technische Universit¨at M¨unchen, 85748 Garching, Germany, Faculty of Mathematics and Natural Sciences, University of Bonn, 53113 Bonn, Germany, and Simula Research, 1325 Lysaker, Norway. ∗ To whom correspondence should be addressed.
AbstractSummary:
Ordinary differential equation models facilitate the understanding of cel-lular signal transduction and other biological processes. However, for large and com-prehensive models, the computational cost of simulating or calibrating can be limiting.AMICI is a modular toolbox implemented in C++/Python/MATLAB that provides ef-ficient simulation and sensitivity analysis routines tailored for scalable, gradient-basedparameter estimation and uncertainty quantification.
Availability:
AMICI is published under the permissive BSD-3-Clause license withsource code publicly available on https://github.com/AMICI-dev/AMICI . Citeablereleases are archived on Zenodo.
Contact: [email protected], fabian [email protected]
Supplementary information:
Supplementary information is available at arXiv on-line.
Ordinary Differential Equation (ODE) models are widely used in systems biology, for ex-ample, to elucidate dynamic processes and to predict response to perturbations. Modelparameters have to be inferred from data, which can be computationally intensive as thou-sands of simulations may be required. This is challenging for large models, with many statevariables and parameters, where simulations take seconds to minutes (Fr¨ohlich et al., 2018).1 a r X i v : . [ q - b i o . Q M ] D ec nference can benefit from accurate sensitivities (Villaverde et al., 2018), i.e., derivatives ofmodel outputs with respect to model parameters. Accurate sensitivities can be computedusing forward, adjoint or steady-state approaches, but benefit from symbolic derivatives ofmodel equations, which are labor-intensive and error-prone to compute manually.The recent surge of genome-scale perturbation data as well as respective comprehensivemodels has increased the demand for methods for scalable sensitivity computation for ODEmodels. To address this demand, we introduce AMICI, a high-performance simulation andsensitivity analysis library. AMICI is implemented in C++ and Python, and provides modelimport from widely used formats such as the Systems Biology Markup Language (SBML)(Hucka et al., 2003), BioNetGen Language (BNGL) (Harris et al., 2016) and Kappa (Boutil-lier et al., 2018), and generates high-performance-computing (HPC) ready modules. Thesemodules provide model-specific simulation and sensitivity computation routines, which canbe accessed from Python, C++, and MATLAB. For parameter estimation problems speci-fied in PEtab (Schmiester et al., 2020), AMICI can evaluate the objective function and itsgradient. For high simulation performance, AMICI reads models from high-level formats, then trans-lates the model and symbolically derived expressions to C++ code. As symbolic processingcan be computationally intensive, AMICI symbolically only computes partial derivatives, to-tal derivatives are computed through (sparse) matrix multiplication and addition at runtime.This expedites model compilation and simulation.To simulate stiff, large models, efficient linear solvers are crucial. AMICI features severaldirect dense, direct sparse and implicit solvers. For sensitivity analysis, AMICI implementsforward, adjoint (Fr¨ohlich et al., 2017), and steady-state (Lines et al., 2019) methods andcombinations thereof (see Supplementary Information).
The AMICI library is implemented in C++14 and relies on SUNDIALS (Hindmarsh et al.,2005) and SuiteSparse (Davis and Palamadai Natarajan, 2010) for simulation and sensitivitycomputation. For matrix multiplication, a CBLAS-compatible library is used (e.g. ATLAS,OpenBLAS, Intel MKL).Model import is implemented in Python and supports several widely used formats (Fig-ure 1). SBML import is implemented using libSBML (Bornstein et al., 2008), Kappa andBNGL import is implemented via PySB (Lopez et al., 2013). Symbolic processing is per-formed using SymPy (Meurer et al., 2017). Compilation has been tested with GCC, Clang,Intel and MinGW on Linux, MacOS and Windows platforms. For interoperability, AMICIprovides CMake files and Dockerfiles.AMICI ships with a MATLAB interface and implements a Python interface using SWIG,which can be extended to other languages. Simulation and compilation are highly config-urable with the API documented on Read the Docs and in example notebooks. For HPC-readiness, AMICI implements OpenMP parallelization over experimental conditions and isthread-safe. 2 a / .so .mex compileMexFile.m
Python module / package
ModelModel import symbolic processing& C++ code generation
Wrapper generation / Model compilation Model simulationAMICI interfaces
Figure 1: Outline of model compilation in AMICI. Models, specified in SBML or PySB, areimported in Python. This generates efficient C++ code for model equations and simulationbindings for Python, C++ and MATLAB.Simulation and sensitivity analysis rely on intricate theory that is complex, error-prone toimplement. Accordingly, we implemented an extensive continuous integration test pipeline.Simulation results are verified for the SBML semantic test suite, where AMICI passes 862out of 1780 tests (appropriate error messages to indicate unsupported features for remainingtests). Simulation results are compared against PySB simulations for 17 BNGL validationmodels and examples, where AMICI passes all tests. Sensitivity results are checked byregression tests covering, e.g. forward, adjoint and steady-state sensitivities. Performancetests check computation time for model import, simulation and sensitivity analysis of a largemodel. Unit and documentation tests, static code analysis, and memory leak checks areincluded, and code review is enforced for all contributions.
There is a rich ecosystem of tools for model simulation. To avoid duplication, we ensuredgood interoperability with other tools: AMICI does not provide a model development envi-ronment, but permits model import from standard formats. Similarly, AMICI is not partof an integrated parameter estimation framework, but features a flexible, well-documentedAPI. Currently, several parameter estimation tools can interface AMICI, including pyPESTO(Sch¨alte et al., 2020) and parPE (Schmiester et al., 2019). This modular design aims at re-searchers developing new methods or tools for parameter estimation that would benefit from3tate-of-the-art simulation and sensitivity computation routines. Specifically, adjoint andsteady-state sensitivity analysis as well as sparse linear solvers are currently only supportedin a small, disparate set of tools, which highlights the unique capabilities of AMICI.AMICI has been in development since 2015 and has so far been used in at least 50 publi-cations, and is continuously being developed by 4 core contributors at 3 different institutions.In the future, we plan to improve SBML support and extend interoperability with other tools.
Funding
This work was supported by the European Union’s Horizon 2020 research and innova-tion program (CanPathPro; Grant no. 686282; J.H., D.W., P.S., (cid:32)L.P., G.T.L., F.F.), theFederal Ministry of Education and Research of Germany (Grant no. 01ZX1916A; D.W. &01ZX1705A; J.H., & Grant. no. 031L0159C; J.H.), the German Research Foundation (Grantno. HA7376/1-1; Y.S., Germany’s Excellence Strategy – EXC-2047/1 – 390685813; D.P.),the Human Frontier Science Program (Grant no. LT000259/2019-L1; F.F.), the NationalInstitute of Health (Grant no. U54-CA225088; F.F.), and the Federal Ministry of EconomicAffairs and Energy (Grant no. 16KN074236; D.P.).
References
Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka, M. (2008). LibSBML: An APIlibrary for SBML.
Bioinformatics , 24(6):880–881.Boutillier, P., Maasha, M., Li, X., Medina-Abarca, H. F., Krivine, J., Feret, J., Cristescu,I., Forbes, A. G., and Fontana, W. (2018). The Kappa platform for rule-based modeling.
Bioinformatics , 34(13):i583–i592.Davis, T. A. and Palamadai Natarajan, E. (2010). Algorithm 907: KLU, a direct sparsesolver for circuit simulation problems.
ACM T. Math. Software. , 37(3):36.Fr¨ohlich, F. et al. (2018). Efficient parameter estimation enables the prediction of drugresponse using a mechanistic pan-cancer pathway model.
Cell Syst. , 7(6):567–579.e6.Fr¨ohlich, F., Kaltenbacher, B., Theis, F. J., and Hasenauer, J. (2017). Scalable param-eter estimation for genome-scale biochemical reaction networks.
PLoS Comput Biol ,13(1):e1005331.Harris, L. A., Hogg, J. S., Tapia, J.-J., Sekar, J. A. P., Gupta, S., Korsunsky, I., Arora,A., Barua, D., Sheehan, R. P., and Faeder, J. R. (2016). BioNetGen 2.2: advances inrule-based modeling.
Bioinformatics , 32(21):3366–3368.Hindmarsh, A. C., Brown, P. N., Grant, K. E., Lee, S. L., Serban, R., Shumaker, D. E.,and Woodward, C. S. (2005). SUNDIALS: Suite of Nonlinear and Differential/AlgebraicEquation Solvers.
ACM T. Math. Software. , 31(3):363–396.Hucka, M. et al. (2003). The systems biology markup language (SBML): A medium forrepresentation and exchange of biochemical network models.
Bioinformatics , 19(4):524–531. 4ines, G. T., Paszkowski, (cid:32)L., Schmiester, L., Weindl, D., Stapor, P., and Hasenauer, J.(2019). Efficient computation of steady states in large-scale ode models of biochemicalreaction networks.
IFAC-PapersOnLine , 52(26):32 – 37. 8th Conference on Foundationsof Systems Biology in Engineering FOSBE 2019.Lopez, C. F., Muhlich, J. L., Bachman, J. A., and Sorger, P. K. (2013). Programmingbiological models in python using pysb.
Mol. Syst. Biol. , 9:646.Meurer, A. et al. (2017). Sympy: symbolic computing in python.
PeerJ Computer Science ,3:e103.Sch¨alte, Y., Fr¨ohlich, F., Stapor, P., Wang, D., Weindl, D., Schmiester, L., and Hasenauer, J.(2020). ICB-DCM/pyPESTO: pyPESTO 0.0.11. https://doi.org/10.5281/zenodo.3715448.Schmiester, L. et al. (2020). Petab – interoperable specification of parameter estimationproblems in systems biology. arXiv .Schmiester, L., Sch¨alte, Y., Fr¨ohlich, F., Hasenauer, J., and Weindl, D. (2019). Efficientparameterization of large-scale dynamic models based on relative measurements.
Bioin-formatics , 36(2):594–602.Villaverde, A. F., Froehlich, F., Weindl, D., Hasenauer, J., and Banga, J. R. (2018). Bench-marking optimization methods for parameter estimation in large kinetic models.