Stochastic Taylor Derivative Estimator: Efficient amortization for arbitrary differential operators

Zekun Shi, Zheyuan Hu, Min Lin, Kenji Kawaguchi

Introduction

The 2024 NeurIPS Best Paper Award was presented to researchers from the National University of Singapore and Sea AI Lab for their work on the Stochastic Taylor Derivative Estimator (STDE). This method represents a significant leap in scientific machine learning, enabling the solution of partial differential equations (PDEs) in up to one million dimensions—a scale previously considered computationally intractable. By rethinking how high-order derivatives are computed, STDE overcomes the "curse of dimensionality" that has long plagued physics-informed neural networks (PINNs).

The Challenge of High-Dimensional PDEs

In many scientific domains, physical laws are expressed as PDEs. Training neural networks to solve these equations requires computing high-order derivatives of the network's output with respect to its input coordinates. However, standard Automatic Differentiation (AD) techniques face two primary bottlenecks:

  1. The Curse of Dimensionality: As the input dimension ($d$) increases, the size of derivative tensors (like the Hessian) grows at $O(d^k)$ for a $k$-th order derivative.
  2. The High-Order Bottleneck: The computational graph for back-propagation grows exponentially with the derivative order, leading to massive memory consumption.

For a 100-dimensional second-order problem, standard methods are feasible. However, for a million-dimensional problem, even storing the derivative tensor is impossible on modern hardware. Previous attempts to fix this either addressed the dimensionality or the high-order bottleneck, but STDE is the first to efficiently tackle both simultaneously.

The STDE Framework: Amortizing Differential Operators

The core innovation of STDE is the realization that univariate high-order AD can be used to perform arbitrary contractions of multivariate derivative tensors. The method combines two powerful concepts:

1. Taylor Mode AD

Unlike standard back-propagation, Taylor mode AD is a forward-mode technique that computes the coefficients of a Taylor expansion. While typically restricted to univariate functions, the authors demonstrate that by carefully constructing "input tangents" (directional vectors), they can extract specific multivariate derivatives through a single high-order univariate pass. The researchers found that any derivative tensor contraction is contained within a high-order Fréchet derivative, allowing a single pass to replace thousands of first-order passes.

2. Stochastic Estimation through "Random Jets"

Rather than computing the full, dense derivative tensor, STDE samples "random jets"—sets of random tangents that provide an unbiased estimate of the differential operator. This approach "amortizes" the computational cost over the training process, analogous to how Stochastic Gradient Descent (SGD) uses minibatches to estimate the full gradient. The paper introduces:

  • Sparse Random Jets: Optimized for diagonal operators like the Laplacian.
  • Dense Jets: A generalization of the Hutchinson Trace Estimator for more complex operators.

3. Structural Efficiency

To manage the parameters of a million-dimensional input layer, the authors utilize a 1D convolutional weight-sharing scheme. This ensures that the model parameters themselves do not become a memory bottleneck, complementing the derivative estimation efficiency.

Performance and Scalability

The authors evaluated STDE on several high-dimensional PDE benchmarks, including the Poisson, Allen-Cahn, and Sine-Gordon equations, as well as high-order nonlinear PDEs like the Korteweg-de Vries (KdV) and Kadomtsev-Petviashvili (KP) equations.

The results were transformative:

  • The Million-Dimension Milestone: STDE successfully solved a 1,000,000-dimensional Allen-Cahn PDE in approximately 8 minutes on a single NVIDIA A100 GPU.
  • Efficiency Gains: Compared to previous state-of-the-art methods like Stochastic Dimension Gradient Descent (SDGD), STDE achieved over a 1000x speedup and a 30x reduction in memory usage.
  • Complexity Scaling: STDE shifts memory scaling from $O(d^k)$ to $O(kd)$ and computational complexity from exponential in $k$ to $O(k^2 d L)$, where $L$ is the number of layers.
  • Software Advantage: Leveraging JAX's XLA compilation provided an additional ~15x speedup over standard PyTorch implementations.

Discussion and Future Work

STDE is not merely a specialized trick but a generalized framework that encompasses existing methods like the Hutchinson Trace Estimator. While it introduces some variance due to its stochastic nature, the authors found that standard batch sizes are sufficient for stable training and that L2 error remains comparable to exact methods.

Currently, STDE is optimized for derivatives with respect to inputs rather than network parameters. However, its ability to handle high-order physics (such as 4th-order biharmonic operators) in high dimensions opens new doors. Future applications may include solving the many-body Schrödinger equation in quantum chemistry or complex financial models like the high-dimensional Black-Scholes equation, both of which have been historically limited by the dimensionality of the input space.

Conclusion

The Stochastic Taylor Derivative Estimator provides a robust solution to the computational explosion of high-order derivatives. By leveraging Taylor mode AD and stochastic sampling, it enables the application of deep learning to physics problems of unprecedented scale, marking a new era for high-dimensional scientific computing.

Summary updated

BibTeX
@inproceedings{shi2024stochastic,
  author = {Zekun Shi and Zheyuan Hu and Min Lin and Kenji Kawaguchi},
  title = {{Stochastic Taylor Derivative Estimator: Efficient amortization for arbitrary differential operators}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=J2wI2rCG2u},
}
Figure