Accelerating Legacy Numerical Solvers by Non-intrusive Gradient-based Meta-solving

Sohei Arisaka,Qianxiao Li
2024-05-05
Abstract:Scientific computing is an essential tool for scientific discovery and engineering design, and its computational cost is always a main concern in practice. To accelerate scientific computing, it is a promising approach to use machine learning (especially meta-learning) techniques for selecting hyperparameters of traditional numerical methods. There have been numerous proposals to this direction, but many of them require automatic-differentiable numerical methods. However, in reality, many practical applications still depend on well-established but non-automatic-differentiable legacy codes, which prevents practitioners from applying the state-of-the-art research to their own problems. To resolve this problem, we propose a non-intrusive methodology with a novel gradient estimation technique to combine machine learning and legacy numerical codes without any modification. We theoretically and numerically show the advantage of the proposed method over other baselines and present applications of accelerating established non-automatic-differentiable numerical solvers implemented in PETSc, a widely used open-source numerical software library.
Machine Learning,Numerical Analysis
What problem does this paper attempt to address?
This paper focuses on accelerating the execution of legacy numerical solvers, particularly those that do not support automatic differentiation. Currently, machine learning (especially meta-learning) techniques are used to optimize hyperparameters of numerical methods to improve the speed of scientific computing. However, many real-world applications rely on non-automatic differentiation legacy code, limiting the application of the latest research. The paper proposes a non-intrusive gradient-based meta-solving method (NI-GBMS) that uses an adaptive surrogate model to estimate gradients, allowing the integration of machine learning with legacy numerical solvers without modifying the original code. This method is theoretically and numerically superior to other baselines and demonstrates acceleration effects on non-automatic differentiation numerical solvers in widely used open-source numerical software libraries like PETSc. Specific contributions of the paper include: 1. Introducing a non-intrusive method to train neural networks (meta-solvers) that accelerate legacy numerical solvers running in conjunction with non-automatic differentiation black box programs. 2. Improving the convergence speed of training by reducing the variance of forward gradients through the use of adaptive surrogate models for controlling variations. 3. Successfully applying the proposed method to non-automatic differentiation numerical solvers in PETSc, achieving significant acceleration. This is the first successful attempt to train neural networks as meta-solvers in conjunction with legacy solvers. The paper points out that a major limitation of the current joint training methods is the requirement of gradients of numerical solver outputs with respect to their parameters, which is often impractical in many real-world applications. To address this issue, they use a novel gradient estimation technique that is compatible with existing code and does not require any modifications.