PINNs (Physics-Informed Neural Networks) is a 2019 paper that represents physical phenomena with deep learning and allows solving inverse problems together. It became the basis for numerous follow-up studies. Approaches to handling physical phenomena with deep learning split broadly into two branches: learning entirely from data, and imposing physical laws as constraints. PINNs belongs to the latter, using PDEs as a regularization term in the loss. Physical systems often (still) lack enough data for training, and this approach fits that limitation well.

Background

Runge-Kutta Method

The nonlinear PDE in Eq.2 of the paper is

\[u_t+\mathcal{N}[u]=0\]

so isolating only the rate of change with respect to time, it can be viewed as \(u_t=-\mathcal{N}[u]\). Fixing the spatial variable \(x\), the time evolution of \(u(t,x)\) takes the same form as a general ODE \(y′(t)=f(y)\), and here corresponds to \(f(u)=-\mathcal{N}[u]\). The paper applies the q-stage Runge–Kutta method to this time-direction integration. Within a single time interval \(\Delta t=t^{n+1}-t^n\), it places q intermediate stages and defines each stage’s solution as \(u^{n+c_i}(x)=u(t^n+c_i\Delta t,x)\). Here \(c_i\) indicates where that stage is located within the time interval. \(a_{ij}\) are the Runge–Kutta coefficients, which determine how the time derivatives at the other stages are combined at each stage. Therefore, substituting \(U_i=u^{n+c_i}\) and \(f(U_j)=-\mathcal{N}[u^{n+c_j}]\) into the general RK stage equation

\[U_i = y^n + \Delta t\sum_{j=1}^{q} a_{ij}\, f(U_j),\qquad i=1,\ldots,q\]

gives

\[u^{n+c_i} = u^n-\Delta t\sum_{j=1}^q a_{ij}\mathcal{N}[u^{n+c_j}], \qquad i=1,\ldots,q\]

This is the first equation of Eq.7 in the paper.

In the same way, the solution at \(t^{n+1}=t^n+\Delta t\), when one time step ends, is computed by the Runge–Kutta final update equation

\[u^{n+1} = u^n + \Delta t\sum_{j=1}^{q} b_j\, f(U_j)\]

and substituting \(f=-\mathcal{N}\) again gives

\[u^{n+1} = u^n-\Delta t\sum_{j=1}^q b_j\mathcal{N}[u^{n+c_j}]\]

which yields the second equation of Eq.7. The key in going from Eq.2 to Eq.7 is to view the PDE as a time-evolution equation \(u_t=-\mathcal{N}[u]\), and then apply the q-stage Runge–Kutta method directly to its time integration. Here, the choice of \(\{a_{ij},b_j,c_j\}\) determines whether the method is explicit or implicit Runge–Kutta.

Motivation

First, the general form of Nonlinear PDEs is as follows.

\[u_t + \mathcal{N} [u; \lambda] = 0,\ x \in \Omega,\ t \in [0, T ]\]

Here \(u_t\) is the time derivative of the latent solution representing the state of the physical system of interest, and \(\mathcal{N}\) is an operator including spatial derivatives, nonlinear terms, and so on.

Prior work had the limitation that handling such nonlinear problems required linearization or caused the computation cost to spike.

PINNs takes noisy measurement data of the system and solves the following two problems.

  1. forward: when the model parameters \(\lambda\) are fixed, can the system’s unknown hidden state \(u(t,x)\) be inferred?
  2. inverse: what are the parameters \(\lambda\) that best explain the observed data?

Contribution

1. Use a neural network as the latent solution of the PDE itself + use physics as a soft constraint in the loss

2. Unify forward and inverse problems into a single framework

3. Present two algorithms, a continuous-time model and a discrete-time model

  • Continuous-time: places collocation points across the whole spatiotemporal domain to enforce the residual. The implementation is simple, but for high-dimensional / long-time problems the number of collocation points grows greatly.
  • Discrete-time: fixes the time direction with implicit Runge–Kutta, and the network takes only \(x\) as input and outputs \(q\) stages at once. The number of stages \(q\) can be increased (up to the 100–500 range) at low cost, so even a single very large time step \(\Delta t\) yields high accuracy (Allen–Cahn, \(q=100\)). In the inverse case, \(\lambda\) can be found from just two far-apart snapshots \(u^n, u^{n+1}\).

4. Validation on various nonlinear PDE benchmarks

5. A reference point for later research

Method

The methodology can be classified by two criteria. The first is the type of problem to be solved, split into the forward problem (called data-driven solution in the paper) and the inverse problem (data-driven discovery of PDEs).

The second is the algorithm’s implementation, in other words how time is handled, split into a continuous time model and a discrete time model.

This post, using the first classification (forward/inverse) as the basis, looks at the continuous/discrete methods in turn within each. This follows the paper’s structure exactly.

Forward: Data-driven solution

The data-driven solution approach aims, when the model parameters \(\lambda\) are fixed, to infer the system’s unknown hidden state \(u(t,x)\).

Continuous Time Model

First, the left-hand side of the general form of the nonlinear PDEs is defined as a function \(f\) of time \(t\) and position \(x\):

\[f := u_t + \mathcal{N}[u],\]

This \(f\) serves as the residual in the loss. It is a value that should be 0 if the physical laws are satisfied.

The loss is the sum of the MSE over \(u\) and the MSE over \(f\):

\[\begin{aligned} MSE &= MSE_u + MSE_f,\\ \text{where }\quad MSE_u &= \frac{1}{N_u}\sum_{i=1}^{N_u}\vert u(t_u^i, x_u^i) - u^i\vert ^2,\\ \text{and }\quad MSE_f &= \frac{1}{N_f}\sum_{i=1}^{N_f}\vert f(t_f^i, x_f^i)\vert ^2. \end{aligned}\]

Here \(\{t_u^i, x_u^i, u^i\}^{N_u}_{i=1}\) denotes the initial-condition and boundary-condition data at each point \(i\), and \(\{t_f^i, x_f^i\}^{N_f}_{i=1}\) denotes the collocation points at which \(f\) is evaluated. In the paper, collocation points are drawn by Latin Hypercube Sampling, and no ground-truth (GT) value is needed. This is because the only condition imposed is that \(f\) must be 0 at these points. If \(f\) produces a nonzero value, that value itself becomes the residual and is used in the parameter update.

Discrete Time Model

If the continuous-time PINN takes \((t,x)\) as input, produces \(u(t,x)\) over the whole spatiotemporal domain, and checks the PDE residual at many collocation points, the discrete-time PINN can be viewed as fixing the time integration itself with the Runge–Kutta formula. The continuous model needs many collocation points across the whole spatiotemporal domain, but the discrete model can avoid this burden.

First, rearranging the nonlinear PDE with respect to the time rate of change of \(u\),

\[u_t+\mathcal{N}[u]=0 ⇒ u_t = -\mathcal{N}[u]\]

applying q-stage RK to this, it places q hidden intermediate states between \(t^n\) and \(t^{n+1}\)

\[u^{n+c_1}(x), \ldots, u^{n+c_q}(x)\]

Eq.7 of the paper

\[\begin{aligned} u^{n+c_i} &= u^n - \Delta t \sum_{j=1}^{q} a_{ij} \mathcal{N}[u^{n+c_j}], \\ u^{n+1} &= u^n - \Delta t \sum_{j=1}^{q} b_j \mathcal{N}[u^{n+c_j}] \end{aligned}\]

means that with this RK approach, using the rate of change obtained through the PDE at the current \(u^n\), the intermediate stages and the final \(u^{n+1}\) are connected.

In the discrete model, the NN predicts these intermediate stages. Originally the hidden intermediate stages are values computed numerically by the RK method, but here the NN predicts them instead.

Since the RK formula handles the time direction, the \(t\) that was needed in the continuous model is dropped from the network input, and only \(x\) is taken as input.

Then how are the hidden intermediate states learned without GT?

First, for each intermediate stage, a reconstructed value of the starting point \(u^n\) back-computed from that stage is created.

\[\left[ u_1^n(x), \ldots, u_q^n(x), u_{q+1}^n(x) \right].\]

It can be made with a simple calculation trick:

\[\begin{aligned} u_i^n &:= u^{n+c_i} + \Delta t \sum_{j=1}^{q} a_{ij} \mathcal{N}[u^{n+c_j}], \quad i = 1, \ldots, q, \\ u_{q+1}^n &:= u^{n+1} + \Delta t \sum_{j=1}^{q} b_j \mathcal{N}[u^{n+c_j}]. \end{aligned}\]

In Eq.7, move the \(u^n\) on the right-hand side to the left-hand side to make it an equation for \(u^n\). If the stages are predicted correctly, the starting point \(u_i^n\) reconstructed from each intermediate stage \(n+c_i\) should all equal the actual \(u^n\). That is,

\[\begin{aligned} u^n &= u_i^n, \quad i = 1, \ldots, q, \\ u^n &= u_{q+1}^n, \end{aligned}\]

must be satisfied. So that this condition can be reflected in training, the network outputs the following intermediate states all at once:

\[\left[u^{n+c_1}(x), \ldots, u^{n+c_q}(x), u^{n+1}(x)\right].\]

The subscripts are easy to confuse, so be careful.

Training proceeds by minimizing the following SSE loss. At each spatial point \(i\), the GT state \(u^{n, i}\) of \(t^n\) is compared against the \(u_j^{n,i}\) reconstructed from every intermediate stage:

\[SSE_n = \sum_{j=1}^{q+1} \sum_{i=1}^{N_n} \vert u_j^n(x^{n,i}) - u^{n,i}\vert ^2,\]

Adding the SSE term for the boundary condition of the corresponding PDE gives the total loss.

Inverse: Data-driven discovery of partial differential equations

The inverse problem is the task of estimating the parameters when only observed data is given and the parameters are unknown. This paper assumes a situation where the form of the PDE is known and only the parameters must be estimated.

Continuous Time Model

The continuous model is almost the same as the forward one in terms of equations and optimization form. But this time it is optimized to fit the latent solution \(u(t,x)\) and \(\lambda\) simultaneously. In training it is optimized so that

  1. the observed data and the \(u\) predicted by the NN must match, and
  2. the predicted \(u\) satisfies the PDE together with the \(\lambda\) being learned.

The loss uses MSE, same as the forward case.

So what exactly is the difference between the forward model and the inverse model? This is a point that is easy to get confused about from the paper alone.

Figure

Take the same Navier-Stokes fluid simulation as an example. The inverse model must estimate the parameters \(\lambda\), but in exchange it is given GT data points sampled across the entire time window \(t\). Some information about the velocity field \(\mathbf{u}\) is given.

In contrast, in the forward case there are no GT data points except the boundary and initial time \(t_0\). Instead, at the collocation points it checks whether the PDE is satisfied without GT, and updates the parameters with that residual.

Comparing the two:

Discrete Time Model

This part takes a different approach from the forward model. In the forward model, since the next step’s state \(u^{n+1}\) was also assumed unknown, it predicted a total of q+1 outputs, up to \(u^{n+1}\) along with the q hidden intermediate stages. In the inverse case, \(u^{n+1}\) is given together with \(u^n\). It uses two data snapshots separated in time.

The input is again \(x\), and when computing the loss, \(\{x^{n,i},u^{n,i}\}\) and \(\{x^{n+1,i},u^{n+1,i}\}\) are compared. The network output is \(q\) stages \([u^{n+c_1},\ldots,u^{n+c_q}]\). Next, Eq.7 from the discrete forward case is examined again:

\[\begin{aligned} u^{n+c_i} &= u^n - \Delta t \sum_{j=1}^{q} a_{ij} \mathcal{N}[u^{n+c_j}], \\ u^{n+1} &= u^n - \Delta t \sum_{j=1}^{q} b_j \mathcal{N}[u^{n+c_j}] \end{aligned}\]

The intermediate states are involved in both \(u^n\) and \(u^{n+1}\). Therefore, from the two equations of Eq.7, \(u^n\) is eliminated. Substituting the \(u^n = u^{n+c_i} + \Delta t\sum_j a_{ij}\mathcal{N}[u^{n+c_j}]\) obtained from the first equation into the second gives:

\[\begin{aligned} u_i^n &:= u^{n+c_i} + \Delta t \sum_{j=1}^{q} a_{ij}\mathcal{N}[u^{n+c_j};\lambda], \quad i=1,\ldots,q,\\ u_i^{n+1} &:= u^{n+c_i} + \Delta t \sum_{j=1}^{q} (a_{ij}-b_j)\mathcal{N}[u^{n+c_j};\lambda], \quad i=1,\ldots,q. \end{aligned}\]

\(u^{n+1}\), like \(u^n\), is also

\[\begin{aligned} u^n &= u_i^n, \ \ i = 1, \ldots, q,\\ u^{n+1} &= u_i^{n+1}, \ \ i = 1, \ldots, q, \end{aligned}\]

Since both relations hold, training can be done to predict the intermediate states using the observed \(u^n, u^{n+1}\).

Here \(u^n_i, u^{n+1}_i\) all depend on \(\lambda\). If \(\lambda\) is wrong, it is hard to fit \(u^n, u^{n+1}\) simultaneously with the same intermediate stages. Conversely, the parameters can be optimized jointly with just two snapshots.

The loss in this case is

\[\begin{aligned} SSE &= SSE_n + SSE_{n+1}, \\ SSE_n &:= \sum_{j=1}^{q} \sum_{i=1}^{N_n} \vert u_j^n(x^{n,i}) - u^{n,i}\vert ^2, \\ SSE_{n+1} &:= \sum_{j=1}^{q} \sum_{i=1}^{N_{n+1}} \vert u_j^{n+1}(x^{n+1,i}) - u^{n+1,i}\vert ^2. \end{aligned}\]

This can be organized as above.

Limitation & Discussion

Limitations the paper itself states

  • No theory on architecture / data requirements: it cannot explain how deep and wide the network should be, how much data is needed, or why it converges to the correct solution and \(\lambda\). The authors themselves leave these as open questions.
  • Non-convex optimization: there is no guarantee of convergence to the global minimum. “If it is expressive enough and there are enough collocation points, it works well” is only an empirical observation.
  • Not a replacement for classical solvers: the authors themselves see PINN not as a replacement for FEM/spectral methods, but as a complement that can use data and physics together.

Training pathology

  • Imbalance between loss terms: the gradient magnitudes of the data loss and the residual loss differ greatly, so one side drives the training (Wang, Teng & Perdikaris, Understanding and mitigating gradient flow pathologies in PINNs, SIAM J. Sci. Comput. 2021). Seen through the NTK, it is a problem arising because the convergence speed differs per term (Wang, Yu & Perdikaris, When and why PINNs fail to train: A neural tangent kernel perspective, JCP 2022).
  • Failure mode: when convection is strong or reaction is fast, it can get stuck in a trivial solution (Krishnapriyan et al., Characterizing possible failure modes in physics-informed neural networks, NeurIPS 2021).
  • Ill-conditioned loss landscape and L-BFGS dependence: the residual loss gets poorly conditioned as it passes through differential operators, so it does not converge well with Adam alone. The paper’s results are in fact thanks to L-BFGS (Rathore et al., Challenges in training PINNs: A loss landscape perspective, ICML 2024). But L-BFGS needs full-batch with high precision and is also sensitive to the initial value, so one usually warms up with Adam and then switches to L-BFGS.
  • Spectral bias: a neural network learns from low frequencies first and learns high frequencies later (Rahaman et al., On the spectral bias of neural networks, ICML 2019). Even if the global relative error is small, errors can remain in small-scale structures.

Asymmetry of Forward vs Inverse

Inverse has data all over the domain, so the network just needs to follow it. Forward only has the initial / boundary conditions, and the rest must propagate through the residual, so it is much harder, and errors accumulate over time. This temporal causality problem is addressed in follow-up work (Wang, Sankaran & Perdikaris, Respecting causality for training physics-informed neural networks, CMAME 2024).

Temporal extrapolation

The PINN follows physics only within the region where the residual is imposed. Extrapolating into a time interval without collocation points, it just behaves like a neural network and the error grows rapidly. Even though the name is physics-informed, what can be trusted is only up to the interval where the constraint was imposed.

Cost and scope of application

  • Per-problem training: it must be retrained from scratch every time the initial condition, geometry, or parameters change. This differs from neural operators (DeepONet, FNO, etc.) that are trained once and used for many inputs.
  • Speed vs classical methods: with dense grid data, classical methods like finite difference + least squares are orders of magnitude faster and more accurate. PINN shines when the data is sparse and scattered, or when there are physical quantities, like pressure, that are not observed at all (cf. Grossmann et al., Can physics-informed neural networks beat the finite element method?, IMA J. Appl. Math. 2024).
  • Sensitivity of higher-order derivatives: coefficients like viscosity hinge on higher-order derivatives of the network output (3rd order for the NS stream function), so even small approximation errors get greatly amplified. These coefficients are also the ones with the largest estimation error.

Discussion

  • Soft vs hard constraint: the PDE is handled as a soft constraint (loss), and incompressibility is handled as a hard constraint via the stream function. This is a good example that constraints that can be built into the architecture make training more stable, and later work went on to put even BC/IC in as hard constraints (Lu et al., Physics-informed neural networks with hard constraints for inverse design, SIAM J. Sci. Comput. 2021).
  • Neural field perspective: ultimately the PINN’s network is a continuous neural field that takes coordinates. Once training is done, it can be queried at any resolution, at any time point, so it also fits well with graphics applications like rendering.