The cost-vs-accuracy front

Part 5, Forward modelling and where PINNs fall short

Learning objectives

  • Price one forward problem two ways: finite differences on grids from 100 m to 10 m, and a network at every stage of its training
  • Read every cost from the book's table, a count times a time measured on the machine that built it, and say why a page never times it
  • Find the cheapest grid at least as close as the trained network, and read the factor between their costs
  • Say why more training does not walk a network down its front

One Problem, Two Fronts

On one forward problem, cost against accuracy is a front, and finite differences' front lies below and to the left of the network's at every point. On Section 4.5's image pulse through the Marmousi2 column the network trained for 3000 steps, 290 s on the build machine, is 0.15 from the 5 m finite-difference field; finite differences at 100 m are 0.037 from it in 0.1 ms, about 2.9 million times cheaper, and the front runs on down to 1.4×10−41.4 \times 10^{-4} at 10 m in 3.2 ms.

Cost Accuracy FrontInteractive figure, enable JavaScript to interact.

The Problem

The column is the book's 1D problem, the Marmousi2 window at x = 3600 m; the window is a 2D acoustic, constant-density slice of a synthetic model (Martin, Wiley and Marfurt), not field data. The experiment is Section 4.5's: the 200 m pulse at rest 300 m deep less its image above the surface, so that it is zero there, followed for 500 ms. The image makes the start agree with the free surface, so finite differences converge at their order; the reference, fourth order at 5 m and 0.4 ms, is 6.4×10−56.4 \times 10^{-5} from the same scheme at half its grid and step.

Finite Differences by Grid

The same scheme on grids of 100, 50, 25, 20 and 10 m, each at the largest step that divides 10 ms at a Courant number of 0.3, is scored at its own nodes that are the reference's: 0.037, 0.0045, 0.0010, 0.0013 and 1.4×10−41.4 \times 10^{-4}. Halving the grid from 20 m to 10 m divides the error by about 9; at the coarse end the time step's error shares the total, which is why 25 m is closer than 20 m. Every grid's run takes between 0.1 ms and 3.2 ms on the build machine.

The Network by Step

The network is Section 4.5's run trained again, the same specification to the bit, with its error taken at 24 steps as it trained. Its cost to a step is its loss-and-gradient evaluations to there, one an Adam step and L-BFGS's own with its line search, times one evaluation's measured time: 3075 evaluations to the end, 290 s, where the build timed the whole run at 306 s. It was closest, 0.13, after 1000 steps; 0.23 after 2500 Adam steps, and 0.15 after 500 L-BFGS steps more. More training does not walk a network down its front: its loss falls, and its distance from the wave goes where it goes.

Measured, Not Timed

Every cost here is the build machine's, an Intel Xeon processor at 2.10 GHz with 2 cores, node v22.23.4, at a load average of 1.0, measured once when the table was built, each the median of repeated runs, and read from the table; the page never times anything, so every reader sees the same numbers. Another machine takes other times, in about the same ratios. Grossmann et al. (2023) found the same on other equations: against the finite element method on Poisson problems in one to three dimensions, the Allen-Cahn equation and a semilinear Schrödinger equation, the networks won on neither solution time nor accuracy, though in some experiments a trained network was the faster to evaluate.

What Comes Next

Section 5.4 keeps the network and the grid and shortens the pulse, where the network fails first.

References

  • Grossmann, T. G., Komorowska, U. J., Latz, J. and Schönlieb, C.-B. (2023). Can physics-informed neural networks beat the finite element method? arXiv:2302.04107.
  • 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.

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