2D smooth velocity: PINN vs FDTD

Part 5 — Forward modelling and where PINNs fall short

Learning objectives

  • Race a PINN against a same-problem FDTD reference and measure both
  • Quantify the wall-clock cost overhead of PINN vs FDTD for forward modelling
  • See that PINN takes 100–1000× longer AND produces less accurate output
  • Internalise the §5 verdict: forward PINN loses to FDTD on every metric

§5.1 verified the PINN against an analytic answer in 1D. Now we step to 2D and compare two solvers running the same forward problem: PINN (the §4.2 recipe) and FDTD (2nd-order central differences, the textbook classical approach).

The setup

Solve utt=c2(x,z)(uxx+uzz)u_{tt} = c^2(x, z) (u_{xx} + u_{zz}) on (x,z)[0,1]2, t[0,0.6](x, z) \in [0, 1]^2,\ t \in [0, 0.6]. Smooth velocity field c(x,z)=1+0.3tanh(5(z0.5))c(x, z) = 1 + 0.3 \tanh(5(z - 0.5)) — slow on top, fast on bottom, smoothly varying. Initial pulse u(x,z,0)=exp(100((x0.5)2+(z0.3)2))u(x, z, 0) = \exp(-100((x - 0.5)^2 + (z - 0.3)^2)), ut(x,z,0)=0u_t(x, z, 0) = 0. Closed-box BCs.

The two solvers

  • FDTD: 2nd-order central differences, 60×60 spatial × ~120 time steps (chosen by CFL stability). Implementation lives in fdtd-utils.js; the entire 2D solve is ~30 lines of JavaScript. Treated as ground truth at this resolution — Δx0.017\Delta x \approx 0.017, well below the dominant pulse wavelength 0.1\sim 0.1.
  • PINN: 3-48-48-1 Tanh, 384 PDE collocation points, 1500 epochs of NTK-balanced training. The §4.2 recipe.

Try it

Pinn Vs Fdtd 2dInteractive figure — enable JavaScript to interact.

What you should observe

  • FDTD finishes in 50\sim 50200200 ms.
  • PINN takes 3\sim 3 minutes — a wall-clock cost ratio of roughly 1000×1000\times.
  • The PINN's relative-L² against the FDTD ground truth is typically 101030%30%. So PINN is also less accurate.
  • Side-by-side wavefield snapshots at t=0.3t = 0.3 and t=0.5t = 0.5: FDTD shows a clean propagating pulse; PINN shows a smeared version with visible amplitude errors at the wavefront.

The unambiguous verdict

For a single 2D forward run on a fixed velocity, FDTD wins on cost (1000×) AND on accuracy. The same conclusion holds in 1D and 3D, on Marmousi and Sleipner velocity fields, and across the full range of seismic frequencies. There is no PINN tuning that closes this gap — at this problem class.

This is not a knock on PINN. It is a recognition that PINN is the wrong tool for forward modelling. The right tool is FDTD (or one of its modern relatives: pseudospectral, finite-volume, discontinuous-Galerkin). PINN's actual value lies elsewhere — the inverse setting, where the unknown is the velocity field itself and FDTD has nothing useful to say (Part 6).

References

  • Yee, K.S. (1966). Numerical solution of initial boundary value problems involving Maxwell's equations in isotropic media. IEEE Trans. Antennas. The original FDTD paper.
  • Virieux, J. (1986). P-SV wave propagation in heterogeneous media: Velocity-stress finite-difference method. Geophysics 51(4). Standard reference for elastic FDTD.
  • Devito (Louboutin et al. 2019). Devito: an embedded domain-specific language for finite differences and geophysical exploration. Modern open-source seismic FDTD framework.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.