The classical FWI loss vs the PINN-FWI loss
Learning objectives
- Write the L2 waveform misfit and say why its gradient with respect to every cell costs two wave solves a shot, not two for each cell
- Follow the adjoint-state gradient on the Marmousi2 window: the forward field, the residual run backwards from the receivers, and their zero-lag product at every cell
- Check an adjoint gradient against a central difference of the misfit, and say why the check needs double precision
- Write the PINN-FWI loss beside it, and say what a network gives up when it replaces the two solves
Two Solves a Shot
Full-waveform inversion moves a velocity model until the waves it predicts match the waves recorded, and it moves it along the gradient of the waveform misfit with respect to every cell's velocity. The adjoint-state method gets that gradient from two wave solves a shot, whatever the number of cells: one forward solve through the current model, one adjoint solve that runs the data residual backwards in time from the receivers, and at every cell the zero-lag product of the two, the imaging condition. On the Marmousi2 window, from FWI2D's smoothed starting model, the gradient of the three shots' misfit has the sign the truth asks for on 83 % of the window's free cells, and a central difference of the misfit agrees with it at three cells to 0.0011 %. A PINN would replace the two solves by one network's PDE residual and backpropagation; this section writes that loss out beside the classical one and says what it costs.
The Window, the Survey and the Start
The model is the window of the Marmousi2 model (Martin, Wiley and Marfurt) that the FWI Lab holds: 7200 m across and 1800 m deep at 50 m, 144 by 36 cells, padded by 20 cells to the left, the right and below for an absorbing sponge. It is a 2D acoustic, constant-density slice of a synthetic model, not field data; its attribution is in the figure's model line. The survey is FWI2D's scenario: three shots 100 m deep at 1200 m, 3600 m and 6000 m, the middle one above the book's column, each recorded by 70 receivers every 100 m for 3.8 s, with a Ricker wavelet of 1.0 Hz peak, the lowest of its three bands. FWI2D steps the wave equation at 2.44 ms, 1558 steps a shot.
The inversion starts from FWI2D's starting model, never from the truth: the truth smoothed and made 13 % slower, the water held at its known velocity. It is 322 m/s RMS from the truth and slower than it on 98 % of the window's 3888 free cells (the cells outside the water and away from the sources). Started there, an inversion has to find the update in plate (a)'s third view, the truth less the start, from the data alone.
The Misfit and Its Gradient
Write the data the model predicts at receiver and time step of shot as and the recorded data as . The L2 misfit is
Its derivative with respect to one cell's velocity could be taken by moving that cell up and down and solving the wave equation twice: a central difference. For the window that is two forward solves a shot for each of 5184 cells. The adjoint-state method gets every cell at once. Tarantola (1984) built seismic inversion on it: each iteration propagates the actual sources through the current model, and propagates the data residuals backward in time, and the correlation of the two fields at each point gives the model's correction. Plessix (2006) reviews the method: only one extra linear system is solved beside the forward problem, so the gradient costs about one or two forward modellings, largely whatever the number of model parameters.
Forward, Adjoint and the Imaging Condition
FWI2D steps by leapfrog, fourth order in space, with the source folded into the Laplacian. Its adjoint is the exact transpose of that scheme, run from the last step to the first with the residual injected at the receivers; the library's gate holds it by the dot-product test. With the adjoint field, the gradient at every cell is
the zero-lag correlation of the adjoint with the forward field's second time derivative divided by , times from the chain rule for . The figure shows the middle shot: its residual in (b), the forward field in (c), the adjoint in (d), and in (e) the product summed from the end of the record down to the time the slider sets. At 2.0 s the image holds 31 % of the shot's gradient; by 1.0 s, 98 %. The adjoint has to run backwards because the correlation pairs the two fields at the same time: the residual of the last arrivals meets the forward field when it made them.
Checking the Gradient
A gradient code that is wrong can still descend, slowly, to the wrong place, so it is checked. At three cells, at (3000 m, 750 m), (3600 m, 1250 m) and (5000 m, 1500 m), the book's build moved the velocity 1 m/s up and down and took the central difference of the misfit. For the three shots at the first cell the adjoint gives β5.4597 and the difference β5.4598, in the misfit's units per m/s; the worst of the three cells differs by 0.0011 %. The difference is run in double precision, FWI2D's own code with double buffers as its gate runs it: the misfit changes in its sixth digit when one cell moves 1 m/s, and single precision rounds there. The adjoint itself is computed as the page ships it, in single precision.
Does It Point the Right Way?
Minus the gradient is the direction of steepest descent. From the middle shot alone it has the sign the truth asks for on 68 % of the free cells (correlation 0.34 with the truth less the start); from the three shots, on 83 % (0.43): each shot sees the window from its own place, and the gradient of the sum of their misfits is the sum of their gradients. The raw gradient is loudest near the sources, where the waves are strongest. FWI2D divides it by the illumination, the forward field's energy at each cell, smooths it and holds the water before it steps; that search direction has the right sign on 88 % (0.60). It is a better direction and no longer the gradient. None of them is the update itself: the misfit is not quadratic in the velocity, and one step along the first gradient is only the start of an inversion (Section 6.2).
The PINN-FWI Loss
PINN-FWI trades both solves for networks: for the wavefield and , or a grid, for the velocity, trained together on one loss,
whose gradient in and is backpropagation through the network's second derivatives at the collocation points . No adjoint solve is written, and the velocity can be any function a network represents. The price is that the wave equation is no longer solved, only penalised: it holds as well as its residual is driven down, the network has to learn the whole wavefield over the window and the record, and how its loss terms are weighted decides whether it learns at all (Part 3). The book's own 2D PINN learns FWI2D's field on a 1200 m by 600 m sub-window for 0.4 s, one shot, the velocity known: a network of 2273 parameters, 1000 collocation points and 2500 optimiser steps reach a relative L2 error of 0.12. The adjoint here is exact for FWI2D's scheme, for three shots over the whole window and 3.8 s. Rasht-Behesht et al. (2021) found PINNs good for the forward model of the 2D acoustic wave equation, but spectral element and finite difference methods more efficient and accurate, and report excellent PINN results on the inversions they considered.
What Comes Next
Section 6.2 takes this gradient step after step on the column, every iteration a forward and an adjoint solve.
References
- Martin, G. S., Wiley, R. and Marfurt, K. J. (2006). Marmousi2: An elastic upgrade for Marmousi. The Leading Edge, 25(2), 156-166. doi:10.1190/1.2172306.
- Plessix, R.-E. (2006). A review of the adjoint-state method for computing the gradient of a functional with geophysical applications. Geophysical Journal International, 167(2), 495-503. doi:10.1111/j.1365-246X.2006.02978.x.
- Rasht-Behesht, M., Huber, C., Shukla, K. and Karniadakis, G. E. (2021). Physics-informed neural networks (PINNs) for wave propagation and full waveform inversions. arXiv:2108.12035.
- Tarantola, A. (1984). Inversion of seismic reflection data in the acoustic approximation. Geophysics, 49(8), 1259-1266. doi:10.1190/1.1441754.