When operator learning beats per-instance training

Part 8, Operator learning for seismology

Learning objectives

  • Price an operator as its training once plus one forward pass a column, and a per-instance network as its training to a stated error for every column
  • Compute the crossover number of columns from measured costs, and say why the costs are measured at build time
  • Say why an operator never pays below its own error
  • Compare both with the exact solver and say where operators earn their place

Training Once Against Training Every Time

An operator pays when one training is shared by many inputs. To the operator's own held-out error of 4.5 ms RMS, a per-instance network, the 1D eikonal PINN of one column, reaches it in a median 275 Adam steps, 0.23 s a column on the build machine; the book's DeepONet costs 284 s of training once and 0.45 ms a column. The two totals meet after 1248 columns. Ask for less error than the operator has and it never pays; and the exact solver, a sum of logarithms at 0.003 ms a column, is cheaper than both: for this 1D problem neither network is the right tool, and the section measures by how much.

When The Operator PaysInteractive figure, enable JavaScript to interact.

The Two Methods

The per-instance network is the book's own 1D eikonal PINN: T(z)=z N(z)T(z) = z\,N(z), so the source's T(0)=0T(0) = 0 is exact, with NN a 1-16-16-1 tanh network of 321 parameters trained by Adam at 0.01 on the residual Tzβˆ’1/c(z)T_z - 1/c(z) at every 25 m; nothing but the column enters its loss. Its error against the exact curve was recorded every 25 steps over 3000 steps, for the Marmousi2 column and eight held-out columns of the family. The operator is Section 8.1's DeepONet, trained once by supervision on the exact curves of 400 columns; its RMS error over all 100 held-out columns, 4.5 ms, is the error both methods are held to.

The Costs Are Measurements

A cost is not computed; it is measured. The book's build measured, on the machine that trained the networks and in one block so their ratios are of one moment of the machine, the median of repeated runs of each: one Adam step of the operator on a batch of 100 columns, 35.6 ms; one per-instance step, 0.83 ms; one operator answer, 0.45 ms; one exact curve, 0.003 ms. The operator's training is its 8000 steps at the measured step, 284 s, plus the exact solves of its 400 training columns; the whole run took 131 s as the build timed it, on a machine shared with other jobs. The figure reads these from the table and times nothing on the page. On another machine every cost changes; the ratios less.

The Crossover

With Cinst(e)C_{\mathrm{inst}}(e) the median over the nine columns of a per-instance run's first recorded step with RMS error at most ee times one step's cost, CopC_{\mathrm{op}} the operator's one-off cost and cevc_{\mathrm{ev}} one answer, the totals for QQ columns, Q Cinst(e)Q\,C_{\mathrm{inst}}(e) and Cop+Q cevC_{\mathrm{op}} + Q\,c_{\mathrm{ev}}, meet at

Qβˆ—=CopCinst(e)βˆ’cev,Q^* = \frac{C_{\mathrm{op}}}{C_{\mathrm{inst}}(e) - c_{\mathrm{ev}}},

defined only when ee is at least the operator's error. At ee = 4.5 ms, Qβˆ—Q^* = 1248 columns. At 13.5 ms, three times looser, each per-instance run gets there sooner, in a median 100 steps, and the crossover moves out to 3443 columns. At 2.3 ms, half the operator's error, a per-instance network still gets there, in a median 775 steps, and the operator never does: an operator buys speed with error.

Where Operators Earn Their Place

Plate (c) draws the exact solver too, and it is the cheapest line: one curve is 35 logarithms, 180 times cheaper than one operator answer and exact. Here the solver costs microseconds, so neither network pays against it: Li et al. (2020) report their FNO up to three orders of magnitude faster than traditional PDE solvers on their problems, and on this one the order is reversed. The case for an operator is a solver that takes seconds or hours a run, a 2D or 3D wave or eikonal solve, asked many times over a family whose members are alike, with an error the user can accept; the case for a per-instance network is a problem without a cheap solver, asked a few times.

The Marmousi2 column is a 1D cut of a 2D acoustic, constant-density slice of a synthetic model, not field data; the family and every network are the book's own.

What Comes Next

Part 9 puts networks and classical solvers together, and asks how sure an answer is.

References

  • Li, Z., Kovachki, N., Azizzadenesheli, K., Liu, B., Bhattacharya, K., Stuart, A. and Anandkumar, A. (2020). Fourier neural operator for parametric partial differential equations. arXiv:2010.08895.

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