NonlinearSolve.jl: High-Performance and Robust Solvers for Systems of Nonlinear Equations in Julia (2403.16341v2)
Abstract: Efficiently solving nonlinear equations underpins numerous scientific and engineering disciplines, yet scaling these solutions for complex system models remains a challenge. This paper presents NonlinearSolve.jl - a suite of high-performance open-source nonlinear equation solvers implemented natively in the Julia programming language. NonlinearSolve.jl distinguishes itself by offering a unified API that accommodates a diverse range of solver specifications alongside features such as automatic algorithm selection based on runtime analysis, support for GPU-accelerated computation through static array kernels, and the utilization of sparse automatic differentiation and Jacobian-free Krylov methods for large-scale problem-solving. Through rigorous comparison with established tools such as Sundials and MINPACK, NonlinearSolve.jl demonstrates unparalleled robustness and efficiency, achieving significant advancements in solving benchmark problems and challenging real-world applications. The capabilities of NonlinearSolve.jl unlock new potentials in modeling and simulation across various domains, making it a valuable addition to the computational toolkit of researchers and practitioners alike.
- Solving ordinary differential equations II, volume 375. Springer Berlin Heidelberg New York, 1996.
- Runge-Kutta Software with Defect Control for Boundary Value ODEs. SIAM J. Sci. Comput., 17:479–497, 1996.
- Multiple shooting techniques revisited. In Numerical Treatment of Inverse Problems in Differential and Integral Equations: Proceedings of an International Workshop, Heidelberg, Fed. Rep. of Germany, August 30—September 3, 1982, pages 74–94. Springer, 1983.
- Numerical solution of boundary value problems for ordinary differential equations. SIAM, 1995.
- Weidong Zhang. Improved implementation of multiple shooting for BVPs. Computer Science Department, University of Toronto, 2012.
- Deep Equilibrium Models. arXiv:1909.01377 [cs, stat], October 2019. URL http://arxiv.org/abs/1909.01377. arXiv: 1909.01377.
- Multiscale Deep Equilibrium Models. arXiv:2006.08656 [cs, stat], November 2020. URL http://arxiv.org/abs/2006.08656. arXiv: 2006.08656.
- Continuous Deep Equilibrium Models: Training Neural ODEs Faster by Integrating Them to Infinity. In 2023 IEEE High Performance Extreme Computing Conference (HPEC), pages 1–9, 2023. 10.1109/HPEC58863.2023.10363574.
- Avik Pal. On Efficient Training & Inference of Neural Differential Equations. Master’s thesis, Massachusetts Institute of Technology, 2023.
- Julia: A fresh approach to numerical computing. SIAM review, 59(1):65–98, 2017. URL https://doi.org/10.1137/141000671.
- Modelingtoolkit: A composable graph transformation system for equation-based modeling, 2021.
- Enabling new flexibility in the SUNDIALS suite of nonlinear and differential/algebraic equation solvers. ACM Transactions on Mathematical Software (TOMS), 2022. 10.1145/3539801.
- SUNDIALS: Suite of nonlinear and differential/algebraic equation solvers. ACM Transactions on Mathematical Software (TOMS), 31(3):363–396, 2005. 10.1145/1089014.1089020.
- User guide for MINPACK-1. Technical report, CM-P00068642, 1980.
- Frédéric Devernay. C/C++ Minpack. http://devernay.free.fr/hacks/cminpack/, 2007.
- SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nature Methods, 17:261–272, 2020. 10.1038/s41592-019-0686-2.
- The MathWorks Inc. Optimization Toolbox version: 9.4 (R2022b), 2022. URL https://www.mathworks.com.
- PETSc users manual. 2019.
- Optimistix: modular optimisation in JAX and Equinox. arXiv preprint arXiv:2402.09983, 2024.
- Optim: A mathematical optimization package for Julia. Journal of Open Source Software, 3(24):615, 2018. 10.21105/joss.00615.
- Catalyst: Fast and flexible modeling of reaction networks. PLOS Computational Biology, 19(10):1–19, 10 2023. 10.1371/journal.pcbi.1011530. URL https://doi.org/10.1371/journal.pcbi.1011530.
- Bruno Cordani. The Kepler Problem: Group Theotretical Aspects, Regularization and Quantization, with Application to the Study of Perturbations, volume 29. Springer Science & Business Media, 2003.
- Numerical optimization. Springer, 1999.
- Nondiscrete induction and a double step secant method. Mathematica Scandinavica, 46(2):236–250, 1980.
- Simple yet highly efficient numerical techniques for systems of nonlinear equations. Computational and Applied Mathematics, 42(1):22, 2023.
- Philip Wolfe. Convergence conditions for ascent methods. SIAM review, 11(2):226–235, 1969.
- Philip Wolfe. Convergence conditions for ascent methods. II: Some corrections. SIAM review, 13(2):185–188, 1971.
- Algorithm 851: CG_DESCENT, a conjugate gradient method with guaranteed descent. ACM Transactions on Mathematical Software (TOMS), 32(1):113–137, 2006.
- Line search algorithms with guaranteed sufficient decrease. ACM Transactions on Mathematical Software (TOMS), 20(3):286–307, 1994.
- Long Hei. A self-adaptive trust region algorithm. Journal of Computational Mathematics, pages 229–236, 2003.
- Ya-xiang Yuan. Recent advances in trust region algorithms. Mathematical Programming, 151:249–281, 2015.
- Jinyan Fan. Convergence rate of the trust region method for nonlinear equations under local error bound condition. Computational Optimization and Applications, 34(2):215–227, 2006.
- A retrospective trust-region method for unconstrained optimization. Mathematical programming, 123:395–418, 2010.
- Michael JD Powell. A hybrid method for nonlinear equations. Numerical methods for nonlinear algebraic equations, pages 87–161, 1970.
- Avik Pal. Lux: Explicit parameterization of deep neural networks in julia. GitHub repository, 2022.
- Adjoint variable method for transient nonlinear electroquasistatic problems. Electrical Engineering, pages 1–7, 2023.
- opez, f. pedregosa, and j.-p. vert, efficient and modular implicit differentiation. arXiv preprint arXiv:2105.15183, 2021.
- Steven G Johnson. Notes on adjoint methods for 18.335. Introduction to Numerical Methods, 2006.
- Forward-Mode Automatic Differentiation in Julia. arXiv:1607.07892 [cs.MS], 2016. URL https://arxiv.org/abs/1607.07892.
- Michael Innes. Don’t Unroll Adjoint: Differentiating SSA-Form Programs. CoRR, abs/1810.07951, 2018. URL http://arxiv.org/abs/1810.07951.
- Fashionable modelling with flux. arXiv preprint arXiv:1811.01457, 2018.
- Computing large sparse Jacobian matrices using automatic differentiation. SIAM Journal on Scientific Computing, 15(2):285–294, 1994.
- Generating efficient derivative code with TAF: Adjoint and tangent linear Euler flow around an airfoil. Future generation computer systems, 21(8):1345–1355, 2005.
- Getting Started with ADOL-C. Combinatorial scientific computing, 181:202, 2009.
- Sparsity Programming: Automated Sparsity-Aware Optimizations in Differentiable Programming. In Program Transformations for ML Workshop at NeurIPS 2019, 2019.
- What color is your Jacobian? Graph coloring for computing derivatives. SIAM review, 47(4):629–705, 2005.
- SparseDiffTools.jl. JuliaDiff/SparseDiffTools.jl, 2020.
- An enhancement of the bisection method average performance preserving minmax optimality. ACM Transactions on Mathematical Software (TOMS), 47(1):1–24, 2020.
- Charles G Broyden. A class of methods for solving nonlinear simultaneous equations. Mathematics of computation, 19(92):577–593, 1965.
- Jan Klement. On using quasi-newton algorithms of the Broyden class for model-to-test correlation. Journal of Aerospace Technology and Management, 6:407–414, 2014.
- GMRES: A generalized minimal residual algorithm for solving nonsymmetric linear systems. SIAM Journal on scientific and statistical computing, 7(3):856–869, 1986.
- Krylov.jl: A Julia basket of hand-picked Krylov methods. Journal of Open Source Software, 8(89):5187, 2023. 10.21105/joss.05187.
- Sivan Toledo. Locality of reference in LU decomposition with partial pivoting. SIAM Journal on Matrix Analysis and Applications, 18(4):1065–1081, 1997.
- GitHub - JuliaLinearAlgebra/RecursiveFactorization.jl — github.com. https://github.com/JuliaLinearAlgebra/RecursiveFactorization.jl. [Accessed 16-02-2024].
- JuliaGPU/KernelAbstractions. jl: v0. 6.0, 2021.
- Efficient GPU-Accelerated Global Optimization for Inverse Problems. In ICLR 2024 Workshop on AI4DifferentialEquations In Science, 2024. URL https://openreview.net/forum?id=nD10o1ge97.
- Improvements to the Levenberg-Marquardt algorithm for nonlinear least-squares minimization. arXiv preprint arXiv:1201.5885, 2012.
- Modeling of galvanostatic charge and discharge of the lithium/polymer/insertion cell. Journal of the Electrochemical society, 140(6):1526, 1993.
- Composing modeling and simulation with machine learning in julia. In 2022 Annual Modeling and Simulation Conference (ANNSIM), pages 1–17. IEEE, 2022.
- Methods—PETLION: Open-source software for millisecond-scale porous electrode theory-based lithium-ion battery simulations. Journal of The Electrochemical Society, 168(9):090504, 2021.