r/MachineLearning • u/konasj Researcher • Jun 18 '20
Research [R] SIREN - Implicit Neural Representations with Periodic Activation Functions
Sharing it here, as it is a pretty awesome and potentially far-reaching result: by substituting common nonlinearities with periodic functions and providing right initialization regimes it is possible to yield a huge gain in representational power of NNs, not only for a signal itself, but also for its (higher order) derivatives. The authors provide an impressive variety of examples showing superiority of this approach (images, videos, audio, PDE solving, ...).
I could imagine that to be very impactful when applying ML in the physical / engineering sciences.
Project page: https://vsitzmann.github.io/siren/
Arxiv: https://arxiv.org/abs/2006.09661
PDF: https://arxiv.org/pdf/2006.09661.pdf
EDIT: Disclaimer as I got a couple of private messages - I am not the author - I just saw the work on Twitter and shared it here because I thought it could be interesting to a broader audience.
9
u/WiggleBooks Jun 19 '20 edited Jun 19 '20
So could someone use the weights of a SIREN network as a representation of an image?
Since the weights of a SIREN network somehow encode the actual signal itself?
32
u/StellaAthena Researcher Jun 19 '20
They have a video on the paper that explains things pretty well. See here.
29
u/patrickkidger Jun 18 '20
The paper is well written; I enjoyed reading it.
If I'm understanding correctly, the paper is essentially saying that sine activations give a good parameterisation of the space of natural images (+other similar problems); contrast the more common scenario of parameterising functions-of-images.
Whilst that is pretty cool, I'm not sure I completely grasp the benefits of representing an image as a SIREN, instead of just representing the image as a collection of pixels. Data compression and image inpainting (or inverse problems in general) are both touched on briefly in the paper.
12
u/cpbotha Jun 19 '20
titu1994 has made a TensorFlow implementation which is available on github: https://github.com/titu1994/tf_SIREN -- readme page shows image reconstruction.
... and here's a fastai-based one with which the image and audio demonstrations have been reproduced: https://github.com/scart97/Siren-fastai2
10
u/WiggleBooks Jun 19 '20
I want to make sure I understand and I'm sorry that I'll be oversimplifying this work.
But in essence, what I understand they did:
They created several Neural Networks (simple multilayer perceptrons) that simply had the task of "copying the signal". For example, if one wanted to copy an image, you would feed in the 2D location, and the Neural network would spit out the color of the image (RGB) at that location.
The innovation and work they did was to replace the non-linearity inside the neurons (e.g. ReLU, tanh, etc.) with a simple sine function (y = sin(ax +b), where a and b are the weights of the neuron?). And this simple change enabled the neural networks to copy the signal much much much better. In fact they demonstrated that they can copy the original signal, they can also copy the first derviative, and even the second derivative and the signal reconstruction would still look great.
They also mention innovation regarding how to initialize the weights of the SIREN networks. Which is actually extremely important because they mention that poor initialization resulting in poor performance of the SIREN network. But I don't understand how they initialized the weights of the network.
So somehow, the signal is encoded in the weights of SIREN network where the weights somehow encode the frequencies and phases of that specific neuron. As specific weights produce a specific signal and different weights produce different signals.
4
u/synonymous1964 Jun 19 '20
This seems somewhat related (but much more developed than) the approach taken by NeRF for novel view synthesis of high frequency image regions, where they conduct experiments using sinusoidal functions of pixel coordinates as inputs instead of just the raw pixel coordinates. They found that this greatly helps when trying to render novel views of things like hair and small leaves (high frequency). Seems like multiple groups are starting to mess around with this idea of using sinusoidal kernels/basis functions/activations/etc.
1
u/miseeeks Jun 19 '20
Can anyone explain some use cases where continuous implicit neural representations might be useful?
2
u/danFromTelAviv Jun 19 '20
in many speech scenarios the signal is transformed using fft first (and a few more steps) and then processed. I wonder if there's a significant advantage of using sin as an activation after an fft ( which maps from signal to frequency domain ). Is one layer of sin the same as an entire dnn of sin activations?
There's also swish - which is sigmoid*linear - if you think about it it has some similar flactuation kind of a thing going on as well. I would also expand to using sinc since it has been found to be effective in many signal processing scenarios - it also have flactuations but the amplitude degrades the farther it gets from zero.
2
u/Maplernothaxor Jun 19 '20
Any interesting applications (outside of compression) of having differentiable representations of these traditionally discrete structures?
2
u/flippflopp Jun 19 '20
I'm confused, is the only difference that they used sin() instead of relu() for activation functions?
2
u/physixer Jun 19 '20
I hate to break it to the authors of this paper but meshes and discrete grids are not the only way continuous data is represented on the computer.
The core concept of basis sets, trial functions, etc and the sub-field of spectral methods, and what not, is dedicated to the idea that there are multiple representations of a continuous function, some of which are discrete, other continuous.
The authors could use a little more literature review of the massive field of computational science.
1
u/anomhali Jun 19 '20
Can we say that SIREN network and sine activation function have better representation capabilities than ReLU based networks and discrete input format such as pixel based? Can we train network based on continous representation and sine wave activation function with higher order derivatives?
1
u/sifnt Jun 19 '20
This looks really interesting!
As one application, I wonder if something inspired by this would enable training on the 8x8 DCT blocks from compressed images (or audio; jpeg / mp3 are similar in a way) rather than wasting processing power decoding to the full pixel grid; feels a lot more natural to work with the available information and could be much more efficient.
1
u/JustMeander Jun 21 '20
In-depth review of the paper is given here: Link
1
u/el-rokobazilik Jun 22 '20
something i don't quite get, how to match gradient with autodiff? do they compute it with sobel filtering over pixels? or do they actually go to use dphi/dx dphi/dy , if so does it mean we need to compute a gradient over a gradient?
-6
u/[deleted] Jun 19 '20
Using sine/cosine functions as basis functions has been done for decades in engineering. It is called Fourier analysis, and is a basic technique in signal processing.
-4
u/[deleted] Jun 19 '20
Geoff Hinton just shared this paper explanation video on Twitter. This is big !!