Nonlocal kernel network (NKN): A stable and resolution-independent deep neural network

Tian Gao, Huaiqian You, Yue Yu, Marta D'Elia, Tian Gao 0007, Stewart Silling

TL;DR

This paper introduces the Nonlocal Kernel Network (NKN), a novel deep neural network architecture designed for learning complex mappings between function spaces. NKNs are shown to be stable, resolution-independent, and capable of handling tasks like learning governing equations and image classification, outperforming existing methods.

What Problem Does This Paper Address?

The paper addresses the challenge of creating neural network architectures that can effectively learn complex mappings between function spaces, particularly in scientific machine learning. Existing neural operators, while powerful, often suffer from limitations such as being restricted to shallow networks, lacking resolution independence (meaning their accuracy depends on the input grid resolution), and exhibiting instability in deep network configurations. This limits their applicability to problems requiring deep architectures or where input data can vary in resolution. The authors aim to develop a network that overcomes these limitations, offering stability, resolution independence, and the ability to learn complex, long-range dependencies.

Methods

The core innovation is the Nonlocal Kernel Network (NKN). NKNs are inspired by the interpretation of neural networks as discrete nonlocal diffusion-reaction equations. In the limit of infinite layers, NKNs are equivalent to a parabolic nonlocal equation, which allows for theoretical analysis of their stability.

Key methodological aspects include:

  • Continuous Treatment of Interactions: Unlike some previous methods that use discrete operators, NKNs employ continuous integral operators to model node-to-node interactions. This is crucial for achieving resolution independence.
  • Nonlocal Diffusion-Reaction Operator: The network update incorporates a nonlocal diffusion-reaction operator, which, when analyzed through nonlocal vector calculus, guarantees stability in the deep network limit.
  • Shallow-to-Deep Initialization: Leveraging the stability of NKNs, the authors employ a shallow-to-deep initialization technique. This involves training shallower networks first and using their learned parameters as initial guesses for deeper networks, accelerating training and improving performance.
  • Kernel and Reaction Terms: The NKN architecture includes a learnable kernel function (modeled by a shallow NN) and a learnable reaction term, enhancing its descriptive power.

Datasets

The paper evaluates NKNs on several benchmark datasets:

  • 1D Poisson's Equation: Used for learning governing laws.
  • 2D Darcy's Equation: Another benchmark for learning governing laws, with varying resolutions.
  • MNIST: A dataset of handwritten digits for image classification.
  • CIFAR-10: A dataset of images for image classification.

The authors also mention using publicly available datasets for Darcy's flow.

Key Insights and Ideas

  • Stability in Depth: The theoretical framework based on nonlocal vector calculus provides a rigorous guarantee of NKN stability, even in the limit of very deep networks. This is a significant advantage over some existing methods that become unstable with depth.
  • Resolution Independence is Key: The continuous treatment of interactions is the cornerstone for achieving resolution independence, meaning NKNs can be trained on data of one resolution and perform well on data of different resolutions without retraining or significant accuracy loss.
  • Bridging GKNs and NNNs: NKNs can be seen as a combination of Graph Kernel Networks (GKNs) and Nonlocal Neural Networks (NNNs), inheriting the advantages of both (e.g., resolution independence from GKNs, stability from NNNs' theoretical underpinnings) while mitigating their limitations.
  • Shallow-to-Deep for Efficiency: The stability of NKNs makes them amenable to efficient training strategies like shallow-to-deep initialization, which significantly speeds up convergence and improves accuracy for deep networks.
  • Generalizability Beyond PDE Learning: The architecture's success in both PDE learning and image classification highlights its potential as a versatile "universal learning tool."

Key Results

  • Governing Laws: NKNs consistently outperform GKNs and FNOs in learning governing laws, especially as the network depth increases. For the 1D Poisson equation, NKNs show stable performance with increasing layers, while GKNs degrade significantly. For 2D Darcy's equation, NKNs achieve lower test errors across various resolutions and training strategies.
  • Image Classification: NKNs demonstrate superior performance in cross-resolution image classification tasks on MNIST and CIFAR-10 datasets. They show better generalization to different resolutions compared to baseline CNNs and NNNs. For CIFAR-10, NKNs are more accurate with larger interaction radii and deeper networks, suggesting their suitability for more complex data.
  • Stability: Numerical results (e.g., eigenvalues of amplification matrices) and theoretical analysis confirm the stability of NKNs, particularly in contrast to GKNs which exhibit instabilities.
  • Efficiency: The shallow-to-deep initialization technique leads to faster convergence and lower loss values for NKNs compared to random initialization.

Limitations and Future Work

  • Computational Cost: The paper notes that NKNs, due to their integral operators and potentially complex kernels, can have a higher computational cost during training compared to methods with convolutional structures like standard CNNs and FNOs. However, they argue that this is an "offline cost" and prediction is fast.
  • Interaction Radius: For simpler datasets like MNIST, a smaller interaction radius in NKNs leads to slightly less accuracy in cross-resolution tasks, though still outperforming baselines. The authors suggest that for more complex data, deeper architectures and larger radii are beneficial.
  • Future Work: The paper implicitly suggests that the NKN architecture's success in diverse tasks points towards its potential as a general-purpose learning tool. Further exploration of its application to other complex scientific and engineering problems would be a natural next step. The authors also highlight the potential for NKNs in online learning due to their insensitivity to normalization.

Summary updated

Abstract

Neural operators have recently become popular tools for designing solution maps between function spaces in the form of neural networks. Differently from classical scientific machine learning approaches that learn parameters of a known partial differential equation (PDE) for a single instance of the input parameters at a fixed resolution, neural operators approximate the solution map of a family of PDEs. Despite their success, the uses of neural operators are so far restricted to relatively shallow neural networks and confined to learning hidden governing laws. In this work, we propose a novel nonlocal neural operator, which we refer to as nonlocal kernel network (NKN), that is resolution independent, characterized by deep neural networks, and capable of handling a variety of tasks such as learning governing equations and classifying images. Our NKN stems from the interpretation of the neural network as a discrete nonlocal diffusion reaction equation that, in the limit of infinite layers, is equivalent to a parabolic nonlocal equation, whose stability is analyzed via nonlocal vector calculus. The resemblance with integral forms of neural operators allows NKNs to capture long-range dependencies in the feature space, while the continuous treatment of node-to-node interactions makes NKNs resolution independent. The resemblance with neural ODEs, reinterpreted in a nonlocal sense, and the stable network dynamics between layers allow for generalization of NKN's optimal parameters from shallow to deep networks. This fact enables the use of shallow-to-deep initialization techniques. Our tests show that NKNs outperform baseline methods in both learning governing equations and image classification tasks and generalize well to different resolutions and depths.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
MNIST · image classificationNKN (r=2, L=1)Validation classification error4.37%-6.29 vs baselinesplit: val · resolution=28x28 · downsampling=bilinear · eval-resolution=14x14 · train-resolution=28x28
Source quote
L419: NKN, r=2, L=1 │ 3.37% │ {\bf 4.37%} │ 4.55% │ 4.53%
Reported baseline / comparator measurements (1)
BenchmarkMethodMetricScoreProtocol / Evidence
MNIST · image classificationNNN (L=1) baselineValidation classification error10.66%split: val · resolution=28x28 · downsampling=bilinear · eval-resolution=14x14 · train-resolution=28x28
Source quote
L415: NNN, L=1 │ 4.31% │ 10.66% │ 9.51% │ 5.05%
BibTeX
@article{gao2022nonlocal,
  author = {Tian Gao and Huaiqian You and Yue Yu and Marta D'Elia and Tian Gao and Stewart Silling},
  title = {{Nonlocal kernel network (NKN): A stable and resolution-independent deep neural network}},
  journal = {Journal of Computational Physics},
  year = {2022},
  doi = {10.1016/j.jcp.2022.111536},
}
Figure