Hypersolvers: Toward Fast Continuous-Depth Models

Michael Poli, Stefano Massaroli, Atsushi Yamashita, Hajime Asama, Jinkyoo Park

Introduction

Neural Ordinary Differential Equations (Neural ODEs) represent a significant shift in deep learning, moving from discrete layers to continuous-depth models. By defining the derivative of a hidden state rather than a fixed sequence of transformations, Neural ODEs model a continuous flow of information. This approach is mathematically elegant and particularly suited for modeling physical systems and irregular time-series data.

However, Neural ODEs face a critical bottleneck: inference speed. To generate a prediction, these models must employ numerical solvers like the Runge-Kutta method. Achieving high accuracy often requires hundreds of Number of Function Evaluations (NFEs), making them significantly slower than traditional architectures like ResNets. This latency has historically limited their use in real-time applications such as robotics, computer vision, and fast generative modeling.

The Hypersolver Approach

To address this, the authors introduce Hypersolvers, a new class of auxiliary neural networks designed to "learn" how to solve ODEs more efficiently than classical numerical methods. Instead of relying solely on general-purpose mathematical formulas, a hypersolver ($g_\omega$) is trained to work in tandem with a base numerical solver (such as Euler or Heun).

Standard solvers approximate trajectories by taking small steps ($\epsilon$) based on local derivatives. However, low-order solvers ignore higher-order terms, leading to accumulation of error. Hypersolvers bridge this gap by predicting a correction term:

$$z_{k+1} = z_k + \epsilon \cdot \text{base\_solver} + \epsilon^{p+1} \cdot g_\omega(\dots)$$

A blueprint for hypersolver design, illustrating the two-stage training process for the Neural ODE and the auxiliary hypersolver network.

Training and Synergy

The hypersolver is trained to predict the "residual"—the difference between a cheap, inaccurate step and a ground-truth solution generated by an expensive, high-precision solver. This creates a unique model-solver synergy; unlike classical solvers that treat every ODE the same, a hypersolver learns the specific "shape" of the Neural ODE’s vector field, allowing it to take much larger, more confident steps without sacrificing accuracy.

Key Insights

  • Breaking the Pareto Front: In traditional numerical analysis, there is a strict trade-off between step size (speed) and accuracy. Hypersolvers effectively shift this curve, providing high-order accuracy at the computational cost of a low-order solver.
  • Generalization: Surprisingly, a hypersolver trained for one specific solver can often generalize to an entire family of related solvers without retraining.
  • Efficiency in Practice: Even when accounting for the extra computation required to run the hypersolver network itself, the system remains more efficient because it requires far fewer total steps to reach a solution.

Experimental Results

The authors evaluated Hypersolvers across several benchmarks, including image classification (MNIST/CIFAR-10) and system identification. One of the most striking results came from Continuous Normalizing Flows (CNFs) used in generative modeling.

Generative modeling results on 2D toy densities, where hypersolvers maintain high accuracy while significantly reducing computation time.

In these generative tasks, Hypersolvers achieved accuracy comparable to the standard dopri5 solver but with a 100x speedup. For MNIST classification, the models were 8x faster than dopri5 while maintaining identical test accuracy. Across the board, the "HyperEuler" method consistently outperformed classical Midpoint and RK4 solvers in accuracy-per-computation metrics.

Limitations and Future Directions

While powerful, Hypersolvers introduce a one-time training overhead, as they require ground-truth data from high-precision solvers. Additionally, if the underlying Neural ODE changes significantly during its own training, the hypersolver may require updates via continual learning techniques. Future research aims to integrate hypersolvers into adaptive-step methods to further optimize how solvers choose their step sizes dynamically.

Summary updated

BibTeX
@inproceedings{poli2020hypersolvers,
  author = {Michael Poli and Stefano Massaroli and Atsushi Yamashita and Hajime Asama and Jinkyoo Park},
  title = {{Hypersolvers: Toward Fast Continuous-Depth Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
}
Figure