Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Working backwards from measurements
Usually we know the rule and compute what happens. In an inverse problem we see what happens and want the rule’s missing number, such as how fast heat spreads through a material. A physics-informed network can learn the solution and the missing number together: it must pass close to the measurements and obey the equation everywhere, and only the right value of the number lets it do both. Because the equation fills in the gaps, a handful of noisy measurements can be enough. The demo estimates a coefficient from ten noisy points; raise the noise and watch the estimate wander.
Engineers estimate the thermal conductivity of new heat-shield materials from a few thermocouple readings in arc-jet tests, by fitting a heat-conduction model to the data.
- 1. An inverse problem asks for…
- 2. In an inverse PINN, the unknown parameter is…
- 3. Why can a few measurements be enough?
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Forward vs inverse: the forward problem maps parameters to the solution; the inverse problem maps observations of the solution back to parameters. Inverse problems are often ill-posed: small data errors can cause large parameter errors, or several parameters can explain the same data.
- PINN formulation (Raissi et al., 2019): unknowns θ (network) and λ (physical parameters); loss L = (1/n_d) Σ (u_θ(x_i) − y_i)² + w (1/n_c) Σ 𝒩_λu_θ². Positive parameters are trained as log λ.
- The residual as a regulariser: among all functions close to the data, the residual term prefers those that obey the equation, much as a prior does in MAP estimation (A5-2-2). The weight w plays the role of the prior’s strength.
- Classical alternatives: adjoint-based PDE-constrained optimisation (A3-5-6) solves the forward problem exactly and computes gradients with one extra solve; Bayesian calibration adds uncertainty (Kennedy and O’Hagan, 2001).
- Two-stage (smooth-then-differentiate) methods fit the data first and plug derivatives into the equation; they amplify noise, since a second difference turns noise σ into √6σ/h².
- Beyond constants: unknown fields κ(x) can be represented by a second network; equation discovery (J6) learns the form of the equation itself.
- 1. Ill-posed means…
- 2. A positive parameter is best trained as…
- 3. The residual term in an inverse PINN acts like…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.Building an inverse PINN
Exercise 1.
- A tanh network with hard zero boundary values, u = x(1 − x)N(x).
- The stacked residual vector of data misfit and weighted equation residual, with κ = exp(v_last), and its Jacobian including the log-κ column, checked by finite differences.
- The least-squares κ from known u″ and f, and the noise amplification of second differences.
Practice.
- Scale the terms: non-dimensionalise, and weight the data misfit by the measurement noise (1/σ²) so the loss is a log-likelihood.
- Train parameters in log space and start them at a plausible value; check that the result does not depend on the start.
- Check identifiability: can different parameter values explain the data equally well? Try several starts and noise draws; a flat loss means the data cannot decide.
- Report uncertainty: repeat with resampled noise (bootstrap), use an ensemble, or a Bayesian PINN; one number without an error bar is not a measurement.
- Validate the physics: a wrong equation gives a confident wrong parameter; look at the residual and the data misfit separately.
- Tools: DeepXDE (dde.Variable for unknown parameters), PhysicsNeMo, hIPPYlib and dolfin-adjoint for classical PDE-constrained inversion.
import deepxde as dde, numpy as np
kappa = dde.Variable(1.0) # trainable parameter
geom = dde.geometry.Interval(0, 1)
def pde(x, u):
return kappa * dde.grad.hessian(u, x) - f(x) # κ u'' − f
bc = dde.icbc.DirichletBC(geom, lambda x: 0, lambda x, on: on)
obs = dde.icbc.PointSetBC(x_obs, y_obs) # noisy measurements
data = dde.data.PDE(geom, pde, [bc, obs], num_domain=64, anchors=x_obs)
model = dde.Model(data, dde.nn.FNN([1, 20, 20, 1], "tanh", "Glorot normal"))
model.compile("adam", lr=1e-3, external_trainable_variables=[kappa])
model.train(iterations=20000, callbacks=[dde.callbacks.VariableValue(kappa, period=1000)])- 1. In DeepXDE, an unknown parameter is declared with…
- 2. Weighting the data misfit by 1/σ² makes the loss…
- 3. A flat loss in the parameter means…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Where the information comes from. Here f is known, so the equation fixes u up to its scale: u = (1/κ) U with U″ = f and U(0) = U(1) = 0. The data only have to determine one number, 1/κ, and a handful of noisy points does that well; each measurement gives an estimate of κ with error about σ/|U(x)|, and averaging over n points reduces it roughly by √n. In Exercise 2 the PINN’s error grew with σ (0.003 → 0.02 → 0.03 for 10 points) but hardly depended on n, because the network’s fitting error, not the averaging, set the floor.
Why differentiating data fails. The two-stage method fits a curve p to the data and solves κ p″ = f. If the data carry noise σ at spacing h, a second difference carries noise √6σ/h²: with σ = 0.01 and h = 0.05 that is 9.8, comparable to u″ itself. Smooth fits reduce the noise but add bias, because a low-degree polynomial cannot follow the sin 4πx part’s curvature. The PINN never differentiates the data; it differentiates its own smooth function, constrained by the equation.
Identifiability. If f were also unknown, κ and f could trade off: (κ, f) and (2κ, 2f) give the same u. A PINN would still return a number, chosen by its initialisation and regularisation. Inverse problems need a check that the parameters are determined by the data and the model, for example by examining the curvature of the loss in the parameter (the Fisher information) or the spread of estimates over restarts.
- 1. A second difference with spacing h turns noise σ into…
- 2. If both κ and f are unknown in κu″ = f…
- 3. In Exercise 2 the PINN's error in κ grew mainly with…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.How accurately can a PINN recover a physical coefficient from a few noisy measurements, compared with differentiating the data?
History.
- J. Hadamard (1902) defined well-posed problems; A. Tikhonov (1963) introduced regularisation for ill-posed inverse problems.
- Adjoint methods for PDE-constrained optimisation (J.-L. Lions, 1971) became the standard for large inverse problems in geophysics and weather data assimilation (4D-Var).
- M. Raissi, P. Perdikaris and G. Karniadakis (2019) estimated Navier–Stokes and Korteweg–de Vries coefficients with PINNs; M. Raissi, A. Yazdani and G. Karniadakis (2020) inferred velocity and pressure fields from flow visualisation.
- L. Yang, X. Meng and G. Karniadakis (2021) introduced Bayesian PINNs for uncertainty in inverse problems.
Exercise 2. κu″ = f on [0, 1], u(0) = u(1) = 0, true κ = 0.5 and u = sin πx + 0.3 sin 4πx. Measurements at n random points with Gaussian noise σ. PINN: width-20 tanh network with hard boundary values, log κ starting at κ = 1, data misfit plus 0.01 × the mean squared residual at 64 points, 150 Levenberg–Marquardt steps. Two-stage: polynomial of degree up to 8 vanishing at the ends (fewer terms than points), differentiated twice, then κ by least squares. Median relative error of κ over 5 noise draws.
| measurements | σ = 0.01 | σ = 0.05 | σ = 0.1 |
|---|---|---|---|
| 5, PINN | 0.002 | 0.01 | 0.02 |
| 5, two-stage | 0.8 | 0.8 | 0.8 |
| 10, PINN | 0.003 | 0.02 | 0.03 |
| 10, two-stage | 0.9 | 1.0 | 1.0 |
| 20, PINN | 0.003 | 0.02 | 0.03 |
| 20, two-stage | 0.5 | 0.6 | 0.8 |
The PINN’s solution error with 10 points and σ = 0.05 was 0.02.
- The equation did most of the work. Five noisy points were enough for 0.2–2% accuracy because only the scale of u was unknown.
- Differentiating the data failed at every setting. Even with 20 points and σ = 0.01 the two-stage error was 50%: the polynomial could not follow the solution’s curvature, and noise is amplified by differentiation.
- Noise set the PINN’s accuracy; more points helped little here.
- Seeds 1 and 2: PINN errors with 10 points were 0.009, 0.04, 0.09 and 0.003, 0.01, 0.03 for σ = 0.01, 0.05, 0.1; the two-stage errors were 0.3–1.0 throughout.
Inverse problems in science and engineering
- Materials testing: thermal conductivity and diffusivity of heat-shield and battery materials from thermocouple data.
- Biomedicine: arterial stiffness and blood viscosity from MRI velocity data; drug diffusion coefficients in tissue.
- Geophysics: subsurface permeability from well pressures, seismic velocity from travel times (full-waveform inversion).
- Weather and climate: data assimilation (4D-Var) is a huge inverse problem for the initial state; learned and hybrid methods are covered in J8.
- Spacecraft: estimating drag coefficients and atmospheric density from tracking data for orbit prediction.
References
- M. Raissi, P. Perdikaris and G. E. Karniadakis (2019). “Physics-informed neural networks: a deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations.” Journal of Computational Physics.
- M. Raissi, A. Yazdani and G. E. Karniadakis (2020). “Hidden fluid mechanics.” Science.
- L. Yang, X. Meng and G. E. Karniadakis (2021). “B-PINNs: Bayesian physics-informed neural networks for forward and inverse PDE problems with noisy data.” Journal of Computational Physics.
- A. N. Tikhonov and V. Y. Arsenin (1977). Solutions of Ill-Posed Problems. Winston.
- M. C. Kennedy and A. O’Hagan (2001). “Bayesian calibration of computer models.” JRSS B.