NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

The Gap between Theory and Practice in Function Approximation with Deep Neural Networks

Ben Adcock, Nick C. Dexter

TL;DR

Deep learning theory proves that neural networks can approximate almost any mathematical function, but this paper reveals a massive gap between what is theoretically possible and what we can actually achieve in practice. When applied to the high-precision demands of scientific computing, standard deep learning training methods fall far short of traditional numerical techniques on smooth functions, though they show unique promise and flexibility for complex, discontinuous problems.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are increasingly being used in scientific computing to solve complex partial differential equations (PDEs) and model physical systems. In the theoretical realm, there is a wealth of "expressivity" literature proving that DNNs can represent a vast array of complex functions.

However, scientific computing requires rigorous standards: algorithms must be stable, highly accurate, and sample-efficient. The authors tackle a critical question: Can we actually train DNNs to achieve the high accuracy required by numerical analysis? They investigate the gap between the theoretical existence of an optimal neural network and our practical ability to find it using standard modern training techniques (like gradient descent).

Methods

The authors built a comprehensive testing framework to evaluate DNNs through the lens of numerical analysis.

  • Deep Learning Setup: They trained fully-connected feedforward ReLU networks using standard techniques (the Adam optimizer, $L^2$ loss, and specific weight initializations). They tested various depths and widths.
  • The Baseline: They compared the DNNs against a best-in-class numerical method for function approximation: Compressed Sensing (CS) using Legendre polynomials and weighted $\ell_1$-minimization.
  • Theoretical Analysis: Alongside the empirical tests, the authors mathematically proved a "practical existence theorem." They showed that a specific DNN architecture and training procedure does exist that can match the exponential convergence rates of CS.

Datasets

The paper uses synthetic datasets generated via Monte Carlo sampling. The target functions were chosen to represent common challenges in scientific computing, evaluated over a uniform distribution on a multidimensional hypercube:

  • Smooth 1D functions with varying levels of oscillation.
  • Smooth high-dimensional functions (up to 8 dimensions) with isotropic and anisotropic dependencies.
  • Piecewise continuous functions, specifically a multidimensional Heaviside (half-space) step function, which features a sharp jump discontinuity.

Key Insights and Ideas

  • The Theory-Practice Gap is Real: Just because a network can represent a function perfectly doesn't mean gradient descent will find those weights. On highly smooth functions, standard DNN training hits a hard accuracy ceiling that theory says shouldn't be there.
  • The Precision Ceiling: Even when trained in double precision to microscopic loss tolerances, DNNs struggled to get past 3 to 4 digits of accuracy on smooth functions. Traditional CS methods easily hit 7 to 8 digits.
  • The Flexibility Advantage: Traditional polynomial methods like CS completely break down on discontinuous functions in higher dimensions. DNNs, however, still manage to learn them. This highlights DL's true superpower: it is a flexible "jack of all trades" that doesn't require the target function to be perfectly smooth.
  • Initialization is Make-or-Break: Training success for function approximation is hyper-sensitive to weight initialization. Starting with a very small variance (e.g., a normal distribution with 0.01 variance) was critical to prevent the networks from failing to train entirely.
  • The Bottleneck is the Optimizer: The authors' theoretical proof shows that DNNs could match CS if trained via a specific, theory-driven cost function. This proves the current limitation lies in our standard training algorithms (like Adam minimizing $L^2$ loss), not the capacity of the networks themselves.

Key Results

  • On smooth 8D functions: Compressed Sensing vastly outperformed DNNs. CS achieved a $10^{-8}$ relative $L^2$ error, while the best DNN architectures stagnated around $10^{-3}$.
  • On discontinuous functions: CS failed to converge entirely in dimensions greater than 1. DNNs successfully approximated the function, achieving about $10^{-2}$ error, proving their robustness on non-smooth data.
  • Architecture matters: Deeper networks with a smaller width-to-depth ratio generally trained faster and generalized better than shallow, wide networks. However, making networks too deep or wide sometimes caused them to overfit and develop severe numerical artifacts (spikes) in their outputs.

Limitations and Future Work

The authors acknowledge that their empirical study is limited to one specific (albeit standard) setup: fully-connected ReLU networks trained with $L^2$ loss. It is entirely possible that different architectures (like ResNets), different activation functions, or regularized loss functions could help close the performance gap.

Furthermore, while their theoretical proof shows a DNN can match CS, the specific training procedure required to do so is rigid and loses the "flexibility" that makes deep learning attractive in the first place. Future work must focus on designing theory-inspired architectures and training algorithms that can achieve high numerical accuracy without sacrificing the ability to learn diverse, messy function classes.

Summary updated

BibTeX
@article{adcock2021gap,
  author = {Ben Adcock and Nick C. Dexter},
  title = {{The Gap between Theory and Practice in Function Approximation with Deep Neural Networks}},
  journal = {SIAM J. Math. Data Sci.},
  year = {2021},
  url = {https://openreview.net/forum?id=_d-9t5y2d5V},
}

Loading related content...

Figure