Spectral bias and why physics needs it fixed

Part 0, Neural networks from absolute zero

Learning objectives

  • Measure a fit's error by wavelength: the DFT of the column and of the fit's error, and the share of each band the fit still misses
  • Watch a network learn the column's long wavelengths first and its short ones last, checkpoint by checkpoint
  • Show that widening the network from 4 to 64 units a layer does not change the order
  • Say why a wavefield PINN, whose short wavelengths are its signal, needs the remedies of Part 2

Long Wavelengths First

A network trained by gradient descent fits a profile's long wavelengths first and its short ones last: its spectral bias. Measured on the book's fit of the Marmousi column, after 300 Adam steps the 1-16-16-1 network misses 37 % of the column's wavelengths of 1000 m and longer and all of the shorter ones. After 3000 steps it misses 0.5 % of the longest, 10 % of those from 500 m to 1000 m, 77 % of those from 250 m to 500 m and 83 % of those from 125 m to 250 m. The column's sharp layers are its short wavelengths, and they are what reflect a seismic wave, so a network of a wavefield must be helped to learn them.

Spectral Bias Of The ColumnInteractive figure, enable JavaScript to interact.

Measuring It

The fit and the column are sampled every 5 m at 351 depths to 1750 m. Each profile is extended by its mirror image, so that it has no jump at its ends, and transformed by the DFT: the cosine transform, whose coefficient kk is a wavelength of 3500 m over kk. The column's coefficients, its mean removed, say how much of its variation each wavelength carries: 91 % at 1000 m and longer, the trend from water to deep rock, and only 1.7 % below 250 m, its sharp layers. In each of the book's five bands the fit's miss is the root of its error's energy there over the column's, rB=(βˆ‘k∈BEk2/βˆ‘k∈BVk2)1/2r_B = \big(\sum_{k \in B} E_k^2 / \sum_{k \in B} V_k^2\big)^{1/2}: 1 when the fit has none of the band, 0 when it has all of it.

In Order

Plate (c) follows the bands through training. The seed's network misses all of every band. After 300 steps the longest band is 37 % missed and the others untouched; after 1000 the longest is 3.9 % missed and the band from 500 m to 1000 m 90 %; after 3000 that band is 10 % missed and the shorter ones still 77 % to 91 %. Rahaman et al. (2019) showed by Fourier analysis that deep ReLU networks are biased towards low frequency functions, and Xu et al. (2019) that networks often fit target functions from low to high frequencies, which they trace to the regularity of the activation functions. The book's tanh networks on the column show the same order. Tancik et al. (2020), by neural tangent kernel theory, describe a standard network's struggle with high frequencies as this spectral bias, and show that a Fourier feature mapping lets it learn high frequency functions in low-dimensional domains.

Width Is Not the Cure

Four units a layer (33 parameters), 16 (321) and 64 (4353) learn in the same order. After 3000 steps the band from 125 m to 250 m is 87 %, 83 % and 61 % missed, and the fits are 108 m/s, 106 m/s and 90 m/s RMS from the column: more parameters buy a little, and the long wavelengths still come first. The wide network, trained at half the rate, hardly moved between 300 and 1000 steps (315 m/s and 312 m/s RMS).

Why Physics Needs It Fixed

A velocity profile is mostly trend, and a fit that misses its short wavelengths is still close in RMS. A wavefield is not: its wavelengths at a seismic frequency are hundreds of metres (Section 0.10), and its reflections come from the column's short-wavelength layers. A PINN learning a wave through this column with a plain tanh network would learn the smooth part of the field first and its reflections last, if at all. Part 2 tries the remedies, Fourier features and sine activations, on the same problem.

What Comes Next

Section 0.10 sets the column back in its window: the Marmousi2 model, a shot through it, and the wavelengths that decide what a survey sees.

References

  • Rahaman, N., Baratin, A., Arpit, D., Draxler, F., Lin, M., Hamprecht, F. A., Bengio, Y. and Courville, A. (2019). On the spectral bias of neural networks. arXiv:1806.08734.
  • Xu, Z.-Q. J., Zhang, Y., Luo, T., Xiao, Y. and Ma, Z. (2019). Frequency principle: Fourier analysis sheds light on deep neural networks. arXiv:1901.06523.
  • Tancik, M., Srinivasan, P. P., Mildenhall, B., Fridovich-Keil, S., Raghavan, N., Singhal, U., Ramamoorthi, R., Barron, J. T. and Ng, R. (2020). Fourier features let networks learn high frequency functions in low dimensional domains. arXiv:2006.10739.

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