Search

Search papers and lessons

Scientific ML Through Physics-Informed Neural Networks: Where We Are

Salvatore Cuomo, Vincenzo Schiano di Cola, Fabio Giampaolo et al. · 2022

A review of physics-informed neural networks, which train a network to fit data while pushing a differential equation's residual toward zero, covering their building blocks, theory, uses and open problems.

On this page

  • Colour = topic mix
  • Calculus
  • Discrete math
  • Linear algebra
  • Neural network basics
  • Programming languages
  • Probability
  • ReadReady to readNot yet

TL;DR

A physics-informed neural network (PINN) is a network trained to approximate the solution of a differential equation. Its loss adds three things: how badly the network breaks the equation at sample points, how badly it breaks the boundary or starting conditions, and how far it sits from any measured data. Cuomo and colleagues (2022) review the literature on these networks, covering their building blocks, the theory behind them, the problems they have been applied to, and the problems that remain open. Their main finding is that most of the work customizes the basic recipe, and that the theory and the question of when a PINN is more useful than a classical solver are still unsettled.

Builds on: Physics-Informed Neural Network, Gradient Descent · Leads to: no lesson in the graph builds on it yet

Why it mattered

Partial differential equations describe heat flow, fluid flow, elasticity and many other physical systems, and classical solvers such as the Finite Element Method handle them by cutting space into a mesh and solving a large system of equations. That works well but is costly when the geometry is complex, the problem is high dimensional, or the same model must be solved again and again. The review's premise is that a trained network can give a solution at any point on demand, and that the same code can solve the forward problem (find the solution) and the inverse problem (find the unknown parameters from data).

The field grew quickly. The review's Figure 1 counts PINN papers by year and reports that the number more than quintupled between 2019 and 2020, and that there were twice as many new papers in 2021 as in 2020. The problems solved include the Allen–Cahn, Korteweg–de Vries and nonlinear Schrödinger equations in the first PINN papers, the Euler equations for high-speed aerodynamic flows (Mao and colleagues, 2020), the incompressible Navier–Stokes equations (Jin and colleagues, 2021), and Navier–Stokes coupled with heat convection (Cai and colleagues, 2021). The review also mentions applications in industry, such as anticipating grease maintenance.

The problem

The review opens with why PDEs are hard. Some are notoriously difficult to solve with standard numerical methods because they have strong nonlinearities, convection that dominates diffusion, or shocks. Problems with many input dimensions also run into the Curse of Dimensionality, which Bellman first described for optimal control. Neural networks had been used for PDEs since the 1990s, but early methods were limited. Lagaris and colleagues (1998) expressed the solution as a fixed term plus an adjustable term, and their method worked only for regular boundaries; their 2000 extension handled irregular ones.

The key question the review raises is whether the learning view of PDEs is sound. A PINN replaces an exact solver with an optimiser, so the questions move from "is the scheme consistent and stable?" to "does training converge to the right answer, and how accurate is the result?". Those questions are much less settled than the classical ones.

How it works

The walkthrough below uses one of the simplest possible problems, so that every number can be checked by hand. The equation is u′(x)=1u'(x) = 1 on [0,1][0, 1] with u(0)=0u(0) = 0, whose exact solution is u(x)=xu(x) = x. The "network" is the straight line uθ(x)=wx+bu_\theta(x) = w x + b, with two parameters θ=(w,b)\theta = (w, b). A real PINN uses a deep network instead, and it gets its derivatives by automatic differentiation, but the loss has the same form.

  1. Choose sample points. Pick a collocation point x=0.5x = 0.5, where the equation will be enforced. Check: the equation is enforced at points inside the domain, not on a grid.
  2. Write the residual. The residual of the equation at that point is uθ′(0.5)−1=w−1u_\theta'(0.5) - 1 = w - 1. Check: if the residual is zero, the equation holds exactly there.
  3. Write the boundary term. The starting condition gives uθ(0)−0=bu_\theta(0) - 0 = b. Check: this is zero when the boundary condition holds.
  4. Add the terms into one loss. With equal weights, L=(w−1)2+b2L = (w - 1)^2 + b^2. Check: the loss is zero only when both the equation and the condition hold.
  5. Take a gradient step. Start at w=0w = 0, b=0.5b = 0.5, so L=1+0.25=1.25L = 1 + 0.25 = 1.25. The gradients are ∂L/∂w=2(w−1)=−2\partial L / \partial w = 2(w - 1) = -2 and ∂L/∂b=2b=1\partial L / \partial b = 2b = 1. With learning rate 0.1, the new point is w=0.2w = 0.2 and b=0.4b = 0.4, and the loss is 0.64+0.16=0.800.64 + 0.16 = 0.80. Check: the loss went down.
  6. Repeat. A second step gives w=0.36w = 0.36 and b=0.32b = 0.32, with L=0.512L = 0.512. Check: the loss keeps falling, and the parameters move toward w=1w = 1 and b=0b = 0, which is the exact solution u(x)=xu(x) = x.
flowchart LR
  X["Sample points x"] --> N["Network u_theta(x)"]
  N --> D["Automatic differentiation: derivatives in x"]
  D --> R["PDE residual"]
  N --> B["Boundary and initial terms"]
  N --> Y["Measured data, if any"]
  R --> L["Loss: weighted sum"]
  B --> L
  Y --> L
  L --> G["Gradient step on theta"]
  G --> N

The loop in the diagram is the whole method. The only physics enters through the residual term, so a different equation means a different residual but the same training loop. The review's point about structure is that the network does not need to know the solution in advance; it is pushed toward the solution by the equation at the sample points.

The math

Problem and residual

The review writes a general problem as F(u(z);γ)=f(z)\mathcal{F}(\mathbf{u}(\mathbf{z}); \gamma) = \mathbf{f}(\mathbf{z}) for z\mathbf{z} in a domain Ω\Omega, with a boundary condition B(u(z))=g(z)\mathcal{B}(\mathbf{u}(\mathbf{z})) = \mathbf{g}(\mathbf{z}) on its boundary. Here z\mathbf{z} holds the space and time coordinates, u\mathbf{u} is the unknown solution, γ\gamma holds the physical parameters, and F\mathcal{F} is a nonlinear differential operator. A forward problem asks for u\mathbf{u} when γ\gamma is known. An inverse problem also asks for γ\gamma from data.

The network u^θ\hat{\mathbf{u}}_\theta approximates u\mathbf{u}, and its residuals are

rF(z)=F(u^θ(z);γ)−f(z),rB(z)=B(u^θ(z))−g(z).r_{\mathcal{F}}(\mathbf{z}) = \mathcal{F}(\hat{\mathbf{u}}_\theta(\mathbf{z}); \gamma) - \mathbf{f}(\mathbf{z}), \qquad r_{\mathcal{B}}(\mathbf{z}) = \mathcal{B}(\hat{\mathbf{u}}_\theta(\mathbf{z})) - \mathbf{g}(\mathbf{z}).

For the exact solution both residuals are zero. This is the link between the residual and the solution: a network with small residuals is an approximate solution.

Step 2 in symbols: derivatives by automatic differentiation

The residual needs derivatives of the network with respect to its inputs. The review lists four ways to get them: by hand, symbolically, numerically (finite differences), and by automatic differentiation. Finite differences have an approximation error, and symbolic expressions can grow very large, so PINNs use automatic differentiation, which applies the Chain Rule to the computation graph and gives derivatives to floating-point accuracy. For the time-dependent case the review writes the residual as rθ(x,t)=∂tu^θ(x,t)+Fxu^θ(x,t)r_\theta(\mathbf{x}, t) = \partial_t \hat{u}_\theta(\mathbf{x}, t) + \mathcal{F}_\mathbf{x} \hat{u}_\theta(\mathbf{x}, t).

Step 4 in symbols: the combined loss

The network parameters are found by minimising

θ∗=arg⁡min⁡θ(ωFLF(θ)+ωBLB(θ)+ωdLdata(θ)),\theta^{*} = \arg\min_{\theta} \big( \omega_{\mathcal{F}} \mathcal{L}_{\mathcal{F}}(\theta) + \omega_{\mathcal{B}} \mathcal{L}_{\mathcal{B}}(\theta) + \omega_{d} \mathcal{L}_{\text{data}}(\theta) \big),

where each term is a mean squared error. The physics term is

LF(θ)=1Nc∑i=1Nc∥rθ(zi)∥2,\mathcal{L}_{\mathcal{F}}(\theta) = \frac{1}{N_c} \sum_{i=1}^{N_c} \big\| r_\theta(\mathbf{z}_i) \big\|^2,

over NcN_c collocation points. The walkthrough is the case with one collocation point, rθ=w−1r_\theta = w - 1, LF=(w−1)2\mathcal{L}_{\mathcal{F}} = (w - 1)^2, and LB=b2\mathcal{L}_{\mathcal{B}} = b^2, with all weights equal to 1. The data term Ldata\mathcal{L}_{\text{data}} is present only when measurements are given, which makes the problem supervised rather than unsupervised.

Step 5 in symbols: the gradient step

Each step moves the parameters against the gradient of the loss, θ←θ−η∇θL\theta \leftarrow \theta - \eta \nabla_\theta L, with learning rate η\eta. In the walkthrough η=0.1\eta = 0.1. The review notes that the loss has many local minima in general, and that a gradient method will usually end in one of them.

Soft and hard boundary conditions

The walkthrough enforces the boundary condition as a penalty, which is the soft form. The review contrasts it with a hard form, where the condition is encoded in the network design so that it holds by construction. Soft enforcement does not guarantee that the boundary condition is met accurately, and the review lists this as the first disadvantage of the soft approach. Hard enforcement avoids that problem, but it needs a construction for each kind of boundary.

Results

The review is a literature survey, not an experiment, so its "results" are its findings about the field. Each finding below is the review's own statement.

What people change. The abstract says most research has customised the PINN through activation functions, gradient optimisation, network structure, and loss structure. The review's network section finds that feed-forward networks are the usual choice, with a much smaller body of work on convolutional, recurrent and Bayesian variants.

Optimisers. Many papers train with Adam and then with L-BFGS, a quasi-Newton method. One study found that for noisy data, increasing the sample size and training with L-BFGS alone gave the best learning. Another used Adam first and then L-BFGS-B, and reported that L-BFGS-B converges faster with less data and fewer residual points.

Loss forms. Energy-based losses are reported to be simpler to minimise and cheaper to compute than residual-based losses, but they are more sensitive to the size and resolution of the training samples.

Theory. The review says the theory is at an early stage. One result shows that a predefined network with tanh activations converges to the solution as its width grows. A separate result shows that minimisers converge to the solution of a linear second-order elliptic or parabolic PDE. The review states that for a general PINN there is no guarantee that the minimiser matches the solution, even when the exact solution lies in the network class.

Failures. A study cited by the review analyses diffusion and convection problems and shows that a PINN can fail when the convection or viscosity coefficients are large. The loss landscape becomes harder as the coefficients grow, and posing the problem as a sequence-to-sequence learning task, instead of solving the whole space-time domain at once, gives lower errors. The review also says that PINNs struggle with multi-scale, chaotic and turbulent behaviour.

Cost against classical methods. The review lists the advantages of PINNs as mesh-free solving, on-demand evaluation after training, analytic derivatives, and a single code for forward and inverse problems. The main disadvantage is that training can take much longer than a classical solver.

Open problems. The review lists whether a PINN converges to the correct solution, how to set the loss weights (dynamic weighting is named as a promising direction), how the placement of training points affects accuracy, and what happens when boundary conditions change, since a new network must then be created.

Limits of the review. The literature was collected by a Scopus search for physics-informed and physics-constrained neural networks. The authors also drew on outputs from the CRUNCH group at Brown and the PhILMs center, and on broader physics-guided learning. The literature stops around 2021 to 2022, so later work is not fully covered.

Reading guide

The paper's sections in order, each with the lessons it needs.

Check yourself

QuestionRecall: what are the three terms in the PINN loss, and which one needs no measured data?Show answer
The loss has a physics term that penalises the equation's residual at collocation points, a boundary or initial condition term, and a data term that fits measurements. The first two need no data, so a forward problem can be trained without any measurements; the data term is needed only when observations are given.
QuestionComputation: in the walkthrough, the parameters after one step are w=0.2w = 0.2 and b=0.4b = 0.4. What is the loss, and what is the loss after a step that gives w=0.36w = 0.36 and b=0.32b = 0.32?Show answer
After one step, L=(0.2−1)2+0.42=0.64+0.16=0.80L = (0.2 - 1)^2 + 0.4^2 = 0.64 + 0.16 = 0.80. After the second step, L=(0.36−1)2+0.322=0.4096+0.1024=0.512L = (0.36 - 1)^2 + 0.32^2 = 0.4096 + 0.1024 = 0.512. The loss falls at each step.
QuestionWhy: why is it harder to guarantee that a PINN converges than to guarantee convergence for a classical numerical method?Show answer
Classical methods come with a theorem: consistency plus stability gives convergence. For a PINN, the loss is only a penalty at sample points, and the minimiser need not match the solution even when the exact solution lies in the network class. The review says the theory for PINNs is at an early stage, with results only for particular networks and PDEs.
QuestionApplied: a team wants to use a PINN for a convection-dominated transport problem with a large convection coefficient. Using the review's findings, what should they expect, and what would they try first?Show answer
The review cites a study showing that PINNs can fail when the convection coefficient is large, because the loss landscape becomes harder to optimise. They should expect poor accuracy from the plain PINN loss and should compare it against a classical solver. They could try posing the problem as a sequence-to-sequence learning task, which the cited study found gave lower errors than solving the whole space-time domain at once.

Sources

Read the full paper

Salvatore Cuomo, Vincenzo Schiano di Cola, Fabio Giampaolo et al., 2022. arXiv:2201.05624