Computational Math with Neural Networks is Hard
Michael Feischl, Fabian Zehetgruber
TL;DR
This work establishes strong hardness results under $SETH$ for three core computational tasks involving neural-network inputs: quadrature of NN realizations, solving Poisson-type PDEs with NN sources, and NN-encoded matrix-vector multiplication. The authors construct a CNF-to-NN reduction to encode SAT into these tasks and show that any higher-order algorithm would imply a faster SAT solver, even for networks with modest depth (three hidden layers) and bounded weights. They extend the results to multiple domains and dimensions, and demonstrate sharpness by presenting fast quadrature for one-layer networks and numerical evidence that quasi-Monte Carlo methods reach near-optimal convergence. The findings reveal fundamental limits on leveraging neural-network surrogates for high-dimensional computation, while also clarifying the boundary where fast exact quadrature is possible (one-layer nets) and where standard Monte Carlo approaches remain the practical route.
Abstract
We show that under some widely believed assumptions, there are no higher-order algorithms for basic tasks in computational mathematics such as: Computing integrals with neural network integrands, computing solutions of a Poisson equation with neural network source term, and computing the matrix-vector product with a neural network encoded matrix. We show that this is already true for very simple feed-forward networks with at least three hidden layers, bounded weights, bounded realization, and sparse connectivity, even if the algorithms are allowed to access the weights of the network. The fundamental idea behind these results is that it is already very hard to check whether a given neural network represents the zero function. The non-locality of the problems above allow us to reduce the approximation setting to deciding whether the input is zero or not. We demonstrate sharpness of our results by providing fast quadrature algorithms for one-layer networks and giving numerical evidence that quasi-Monte Carlo methods achieve the best possible order of convergence for quadrature with neural networks.
