Learning by solving differential equations

Benoit DherinMichael MunnHanna MazzawiMichael WunderSourabh MedapatiXavi Gonzalvo

article2025arXiv1 citations

Demonstrates how to adapt higher-order Runge-Kutta differential equation solvers for deep neural network training by integrating momentum, adaptive learning rates, and preconditioning to improve optimization stability beyond standard gradient descent.

Listen

Training modern deep learning architectures is computationally intensive and often suffers from optimization instabilities due to extreme variations in gradient direction and magnitude across complex loss landscapes. Common optimizers, such as Adam and momentum-based methods, address these issues using techniques like historical gradient averaging and preconditioning. Fundamentally, gradient descent corresponds to the simplest first-order numerical differential equation solver, known as the Euler method, applied to continuous gradient flow. While higher-order differential equation solvers like Runge-Kutta methods offer theoretically superior trajectory tracking and stability, their practical application within deep learning has remained largely unexamined.

The article evaluates the performance and limitations of higher-order Runge-Kutta solvers in neural network optimization and demonstrates how adapting these solvers with key modern optimization techniques can significantly improve their effectiveness.

To evaluate these methods, the researchers conducted empirical benchmarks across several standard computer vision and classification tasks, including MNIST, Fashion-MNIST, CIFAR-10, CIFAR-100, and ImageNet, utilizing multilayer perceptrons, convolutional neural networks, Wide Residual Networks, and Vision Transformers. The study evaluated standard fourth-order Runge-Kutta updates against established optimizers such as Adam, stochastic gradient descent with momentum, and NAdamW under controlled experimental settings. The authors then developed and tested three specific adaptations: an AdaGrad-inspired preconditioning technique, a rescaled adaptive step size based on drift adjustment, and an exponential moving average momentum mechanism applied directly to multi-stage gradient updates.

The investigation produced four central findings. First, unaugmented fourth-order Runge-Kutta optimizers achieved competitive test accuracy on simpler image classification tasks while requiring only step size tuning without tracking historical state variables (for example, achieving 96.88% accuracy on MNIST compared to 96.64% for Adam). Second, standard Runge-Kutta methods lagged significantly on complex workloads (such as ImageNet with Vision Transformers, where accuracy fell to 61.2% versus 78.5% for the baseline) and exhibited a notable generalization gap when trained with large batch sizes. Third, higher-order solvers required additional gradient evaluations per step; while wall-clock time matched standard optimizers when batch data fit entirely in device memory, computational time doubled or increased substantially under memory-constrained, large-batch regimes. Fourth, integrating tailored adaptations—specifically preconditioning, adaptive step sizes, and momentum—successfully closed the large-batch generalization gap on tested benchmarks and enabled the solver to match or outperform tuned baselines.

These findings indicate that the direct, out-of-the-box deployment of higher-order numerical solvers is hindered by loss surface stiffness, the lack of implicit noise regularization in large batches, and increased computational overhead. However, the results demonstrate that bridging classical numerical differential equation theory with deep learning techniques provides a viable mathematical pathway to design robust, stable optimizers with minimal hyperparameter tuning overhead.

Organizations evaluating alternative optimization strategies should not deploy standard Runge-Kutta solvers directly into production models without modifications, particularly for large-scale training pipelines. Instead, engineering and research teams should focus on integrated variants that combine multi-stage solvers with momentum, adaptive learning rates, or preconditioning. Future work must investigate how to co-adapt these modified solvers alongside modern training heuristics such as cosine schedules, weight decay, and normalization techniques on complex large-scale architectures like transformers before deploying them widely.

The conclusions are subject to certain limitations. The primary modifications were primarily validated on multilayer perceptrons and standard benchmark datasets to isolate solver dynamics without the confounding effects of specialized regularization tricks. Readers should maintain cautious optimism regarding large-scale generalizability until extensive evaluations on modern large language models and enterprise-scale foundation models are conducted.

arXiv: 2505.13397

No sufficiently relevant recommendations were found.

Cover for Learning by solving differential equations

Abstract

Modern deep learning algorithms use variations of gradient descent as their main learning methods. Gradient descent can be understood as the simplest Ordinary Differential Equation (ODE) solver; namely, the Euler method applied to the gradient flow differential equation. Since Euler, many ODE solvers have been devised that follow the gradient flow equation more precisely and more stably. Runge-Kutta (RK) methods provide a family of very powerful explicit and implicit high-order ODE solvers. However, these higher-order solvers have not found wide application in deep learning so far. In this work, we evaluate the performance of higher-order RK solvers when applied in deep learning, study their limitations, and propose ways to overcome these drawbacks. In particular, we explore how to improve their performance by naturally incorporating key ingredients of modern neural network optimizers such as preconditioning, adaptive learning rates, and momentum.

Citation

MLA
Dherin, B., et al. “Learning by Solving Differential Equations”. arXiv, 2025, http://arxiv.org/abs/2505.13397v1.
APA
Dherin, B., Munn, M., Mazzawi, H., Wunder, M., Medapati, S., & Gonzalvo, J. (2025). Learning by solving differential equations. arXiv. http://arxiv.org/abs/2505.13397v1
Chicago
Dherin, B., M. Munn, H. Mazzawi, M. Wunder, S. Medapati, and J. Gonzalvo. 2025. “Learning by Solving Differential Equations”. arXiv. http://arxiv.org/abs/2505.13397v1.
Harvard
Dherin, B. et al. (2025) “Learning by solving differential equations”, arXiv [Preprint]. Available at: http://arxiv.org/abs/2505.13397v1.
Vancouver
1. Dherin B, Munn M, Mazzawi H, Wunder M, Medapati S, Gonzalvo J (2025) Learning by solving differential equations. arXiv

BibTeX

@article{dherin2025learning,
  title = {Learning by solving differential equations},
  author = {Dherin, Benoit and Munn, Michael and Mazzawi, Hanna and Wunder, Michael and Medapati, Sourabh and Gonzalvo, Javier},
  year = {2025},
  journal = {arXiv},
  url = {http://arxiv.org/abs/2505.13397v1},
  eprint = {2505.13397}
}
Metadata:arXiv

Access the Paper

This paper is available from its original source. Click below to access the PDF.

Open PDF
License: https://creativecommons.org/licenses/by/4.0/