Learning Implicit PDE Integration with Linear Implicit Layers

Marcel Nonnenmacher, David S. GreenbergDLDE @ NeurIPS 2021

TL;DR

This paper introduces Linear Implicit Layers (LILs), a novel neural network component designed to efficiently learn and emulate the dynamics of physical systems governed by partial differential equations (PDEs), particularly those requiring implicit integration schemes. LILs enable accurate and stable long-term predictions by learning to solve linear systems with locally computed coefficients, overcoming a key limitation of traditional feedforward neural networks.

What Problem Does This Paper Address?

Simulating complex physical systems, like fluid dynamics or weather patterns, often involves solving partial differential equations (PDEs). While neural networks have shown promise in emulating these simulations, they struggle with "implicit integration schemes." These schemes are crucial for handling "stiff" PDEs (where different parts of the system evolve at vastly different rates), but they require solving systems of equations at each time step. The challenge is that the solution to these systems can depend on the entire state of the system, not just local interactions, making them difficult for standard feedforward neural networks to learn. This long-range dependency hinders the ability of purely feedforward models to scale to large, complex systems and maintain stability over extended simulation periods.

Methods

The core innovation is the Linear Implicit Layer (LIL). Unlike traditional layers that directly compute outputs, LILs define a linear system of equations, $A \mathbf{z} = \mathbf{b}$, where the coefficients $A$ and $\mathbf{b}$ are learned by the neural network based on the input state. The output $\mathbf{z}$ is then the solution to this linear system.

Key aspects of LILs include:

  • Local Coefficient Computation: The matrices $A$ and vectors $\mathbf{b}$ are constructed using convolutional layers, ensuring that coefficients depend only on local information within the input state. This maintains the translation equivariance property common in PDE discretizations.
  • Diagonal Dominance: To ensure that the linear system can be solved efficiently and stably, especially in parallel, the matrix $A$ is constrained to be diagonally dominant. This property is enforced by learning the diagonal and off-diagonal elements of $A$ and then normalizing rows.
  • Efficient Solvers: The paper utilizes a Red-Black Gauss-Seidel iterative solver, which is well-suited for parallel computation and requires sparse matrix-vector products.
  • Backward Mode Differentiation: LILs are designed to be differentiable, allowing for efficient training using backpropagation. The gradients are computed by solving another linear system, leveraging the implicit function theorem.
  • Handling Boundary Conditions: A mechanism is introduced to compose the system of equations for both interior and boundary points, allowing the network to learn or incorporate specific boundary conditions.

Datasets

The paper uses a dataset generated from numerical simulations of the 2D shallow-water equations (SWE) with bottom friction and variable depth. The simulations are run on an Arakawa C-grid with 100x100 grid points. The training data consists of 60,000 numerically integrated state pairs, with models trained on datasets using different integration step-sizes ($\Delta t \in \{300s, 900s, 1500s\}$). The evaluation uses novel initial conditions.

Key Insights and Ideas

  • Bridging Implicit Schemes and Neural Networks: The most significant insight is the development of LILs as a principled way to incorporate the mathematical structure of implicit integration schemes into neural network architectures. This allows neural networks to tackle problems previously out of reach due to the computational complexity of these schemes.
  • Scalability through Local Computations and Solvers: By learning local coefficients for the linear system and enforcing diagonal dominance, LILs enable efficient parallel solvers to scale to large systems (e.g., 30,000 degrees of freedom in the SWE example). This is a crucial step towards emulating real-world, high-resolution physical simulations.
  • Long-Range Dependencies are Key: The paper highlights that the failure of purely feedforward networks at larger time steps is directly attributable to their inability to capture the long-range spatial dependencies inherent in implicit integration. LILs explicitly address this by solving a global (though locally parameterized) linear system.
  • Compact and Efficient Representations: LIL networks learned compact representations of the complex local interactions, leading to accurate and stable emulation where feedforward networks failed.

Key Results

  • Accurate and Stable Emulation: LIL-based emulators demonstrated accurate and stable performance for the 2D shallow-water equations, even for larger integration time steps ($\Delta t = 1500s$) where pure CNNs failed.
  • Improved Performance at Larger Time Steps: For $\Delta t = 1500s$, LILs significantly outperformed pure CNNs in terms of Root Mean Squared Error (RMSE) over simulated time, maintaining accuracy for up to 25 hours of simulation.
  • Efficiency: LILs require relatively few parameters (e.g., six convolutional channels per output field for a 5-point stencil) and enable efficient backward-mode differentiation.

Limitations and Future Work

  • Diagonal Dominance Constraint: The requirement of diagonal dominance for the linear system, while enabling efficient solvers, limits the expressiveness of LILs. For larger systems and time steps, this constraint can become more restrictive.
  • Parametrization of $A$: The current parametrization of $A$ as a banded matrix is tied to specific computational stencils. Exploring other parametrizations, such as low-rank perturbations of diagonal matrices, could increase expressiveness.
  • Solver Choice: While Red-Black Gauss-Seidel is efficient, other iterative solvers like conjugate gradient methods could be explored.
  • Generalizability: The paper suggests that LILs could be useful as general building blocks for deep models requiring non-local computations, implying future work in applying them to a wider range of PDE systems and physical phenomena. The authors also mention that LILs could be stacked within a network for more complex dynamics.

Summary updated

BibTeX
@inproceedings{nonnenmacher2021learning,
  author = {Marcel Nonnenmacher and David S. Greenberg},
  title = {{Learning Implicit PDE Integration with Linear Implicit Layers}},
  booktitle = {DLDE @ NeurIPS},
  year = {2021},
  url = {https://openreview.net/forum?id=veNBQ15T6N0},
}

Loading related content...

Figure