SIREN, sinusoidal representation networks

Part 2, Architectures for PINNs

Learning objectives

  • Write a SIREN layer, sin⁑(Ο‰0(Wh+b))\sin(\omega_0 (W h + b)), and Sitzmann et al.'s initialisation of it
  • Turn the first layer's starting weights into starting wavelengths and see that none is shorter than 2Ο€L/Ο‰02\pi L/\omega_0
  • Show that at Ο‰0=30\omega_0 = 30 a SIREN of Section 0.9's size misses 1.0 % of the band from 125 m to 250 m in 3000 steps
  • Recognise an Ο‰0\omega_0 that starts too long and one that rings between the samples

The Scale in the Start

A SIREN makes every hidden layer a sine and puts the scale of its sines in its initialisation: each layer's input is multiplied by Ο‰0\omega_0, and the first layer's weights are drawn from U(βˆ’1,1)U(-1, 1) for its one input, so no first-layer unit starts with a wavelength shorter than 2Ο€L/Ο‰02\pi L/\omega_0. With Section 0.9's shape, 321 parameters, and 3000 steps, at Ο‰0=30\omega_0 = 30 (377 m) the SIREN misses 1.0 % of the column's band from 125 m to 250 m, where the tanh network missed 83 %. At Ο‰0=10\omega_0 = 10 its sines start too long, 1131 m and longer, and it misses 78 %; at Ο‰0=300\omega_0 = 300 they start as short as 38 m and the fit rings between the samples, 6.0 m/s RMS at them and 513 m/s between.

Siren First LayerInteractive figure, enable JavaScript to interact.

The Initialisation

Each hidden layer is h↦sin⁑(Ο‰0(Wh+b))h \mapsto \sin(\omega_0 (W h + b)) and the output is linear. Sitzmann et al. (2020) introduced these periodic activations for implicit neural representations that model fine detail and derivatives, and they draw the later layers' weights from U(βˆ’6/n/Ο‰0,6/n/Ο‰0)U(-\sqrt{6/n}/\omega_0, \sqrt{6/n}/\omega_0) for nn inputs, so that the later layers' Ο‰0\omega_0 cancels in the draw, and set the first layer so that its sines span several periods over the input's range. The book draws that first layer from U(βˆ’1/n,1/n)U(-1/n, 1/n), its own choice, so only the first layer carries Ο‰0\omega_0. The book's five SIRENs share one seed, so their first layers draw the same 16 weights and only Ο‰0\omega_0 differs; plate (c) shows them as starting wavelengths, 2Ο€L/(Ο‰0∣wk∣)2\pi L/(\omega_0 |w_k|). At Ο‰0=30\omega_0 = 30 the 16 units start between 449 m and 16268 m.

Too Long, Too Short

At Ο‰0=1\omega_0 = 1 the shortest start is 11310 m and the fit is 229 m/s RMS after 3000 steps, further from the column than Section 0.9's tanh network; at Ο‰0=10\omega_0 = 10 1131 m, 85 m/s and 78 % of the band from 125 m to 250 m missed; at Ο‰0=30\omega_0 = 30 377 m, 10 m/s and 1.0 %; at Ο‰0=100\omega_0 = 100 113 m, 24 m/s and 11 %. At Ο‰0=300\omega_0 = 300 the shortest start, 38 m, is near twice the samples' spacing, and the fit is 6.0 m/s RMS at the training depths and 513 m/s between them, as Fourier features ring at too large a scale in Section 2.2.

Against Fourier Features

The SIREN at Ο‰0=30\omega_0 = 30 has Section 0.9's 321 parameters; Section 2.2's best Fourier network has 817 and is 5.9 m/s RMS from the column to the SIREN's 10 m/s. The SIRENs are trained at Adam's rate of 0.001, a tenth of Section 0.9's, the book's own choice for them. A SIREN's scale is chosen through Ο‰0\omega_0, as a Fourier layer's is through Οƒ\sigma, and by the same test: the error between the samples.

What Comes Next

Section 2.4 builds what is known into the network's output instead: the water at the top of the column, exact by construction.

References

  • Sitzmann, V., Martel, J. N. P., Bergman, A. W., Lindell, D. B. and Wetzstein, G. (2020). Implicit neural representations with periodic activation functions. arXiv:2006.09661.

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