Proximal Implicit ODE Solvers for Accelerating Learning Neural ODEs

Justin M. Baker, Hedi Xia, Yiwei Wang, Elena Cherkaev, Akil Narayan, Long Chen, Jack Xin, Andrea L. Bertozzi, Stanley J. Osher, Bao WangarXiv 2022 · DOI

Abstract

Neural Ordinary Differential Equations (Neural ODEs) offer a continuous-depth paradigm for modeling complex data dynamics. However, their practical application is often hindered by "stiffness," where rapid changes in certain system components force standard explicit solvers to adopt infinitesimally small step sizes to maintain numerical stability. This leads to a prohibitive number of Network Function Evaluations (NFEs). This paper introduces Proximal Implicit ODE Solvers, which reformulate implicit integration steps as variational optimization problems. By utilizing fast, first-order optimization techniques like Fletcher-Reeves momentum, these solvers bypass the need for expensive Jacobian computations associated with traditional implicit methods. Our approach inherits the A-stability of implicit schemes, enabling significantly larger step sizes and faster training. Evaluations on Continuous Normalizing Flows and Graph Neural Diffusion tasks demonstrate that proximal solvers can reduce NFEs by up to 50% while maintaining high accuracy.

Introduction: The Challenge of Stiffness

Neural ODEs represent neural network layers as a continuous flow, where the state evolves according to an ordinary differential equation. While elegant, these models frequently encounter "stiff" dynamics. In numerical analysis, stiffness occurs when the required step size for stability is much smaller than the step size required for accuracy.

Standard explicit solvers, such as the Dormand-Prince (DOPRI5) method, are popular due to their simplicity but struggle with stiff systems. To prevent numerical "blow-up," these solvers must drastically reduce their step size, resulting in a massive increase in NFEs and training time. While implicit solvers are inherently more stable for stiff problems, they traditionally require solving complex nonlinear equations at each step—typically via Newton’s method—which involves computing high-dimensional Jacobians that are computationally infeasible for large-scale deep learning.

Methods: Proximal Reformulation

To address these limitations, we propose a proximal approach to implicit integration. Instead of directly solving the nonlinear root-finding problem $h_{k+1} = h_k + s f(h_{k+1})$, we reformulate the update as a variational optimization problem:

$$\text{arg min}_z \left\{ \frac{1}{2s} \|z - h_k\|^2 + F(z) \right\}$$

where $f(z) = -\nabla F(z)$. This formulation defines a proximal operator. By treating the implicit step as an optimization task, we can leverage efficient first-order methods. Our algorithm employs an inner-outer iteration structure: the outer iteration advances the ODE through time, while the inner iteration solves the optimization problem using Gradient Descent with Fletcher-Reeves (FR) momentum. This approach scales linearly with the number of function evaluations, making it suitable for high-dimensional neural networks.

Error accumulation over time for Proximal solvers compared to Backward and Forward Euler baselines.

Key Insights and Stability

A critical finding of this work is that stability, rather than accuracy, is often the primary bottleneck for Neural ODEs. In stiff systems like Graph Neural Diffusion (GRAND), higher-order explicit solvers (e.g., DOPRI8) can actually perform worse than lower-order ones because stability constraints force such small step sizes that any accuracy advantage is negated.

Comparison of Forward and Backward NFEs versus Error for various standard adaptive solvers.

Proximal solvers inherit "A-stability" from their implicit roots, meaning they are mathematically guaranteed to remain stable for stable linear systems regardless of step size. Furthermore, as shown in our benchmarks, proximal solvers accumulate error more slowly than explicit methods like Forward Euler, providing greater robustness for long-time integration.

Experimental Results

We evaluated the proximal solvers across several domains:

  • Continuous Normalizing Flows (CNF): On the MNIST dataset using the FFJORD architecture, proximal BDF solvers achieved the same training performance as DOPRI5 while requiring approximately half the NFEs.
  • Graph Neural Diffusion (GRAND): On the CoauthorCS graph dataset, proximal solvers significantly outperformed Adaptive Heun and DOPRI solvers in speed without sacrificing classification accuracy.
  • Numerical Benchmarks: Tests on 1D Diffusion equations confirmed the superior stability and accuracy of the proximal approach against analytical ground truths.

Conclusion

Proximal Implicit ODE Solvers provide a scalable and stable alternative to standard explicit solvers for training Neural ODEs. By reformulating implicit steps as optimization problems, we achieve the stability benefits of implicit methods without the prohibitive cost of Jacobian computations. Future work will explore Anderson acceleration to further optimize the inner loop and the development of adaptive step size mechanisms to automatically balance computational speed with numerical precision.

Summary updated

BibTeX
@misc{baker2022proximal,
  author = {Justin M. Baker and Hedi Xia and Yiwei Wang and Elena Cherkaev and Akil Narayan and Long Chen and Jack Xin and Andrea L. Bertozzi and Stanley J. Osher and Bao Wang},
  title = {{Proximal Implicit ODE Solvers for Accelerating Learning Neural ODEs}},
  year = {2022},
  eprint = {2204.08621},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.08621},
}
Figure