r/MachineLearning • • Jun 21 '20

Discussion [D] Paper Explained - SIREN: Implicit Neural Representations with Periodic Activation Functions (Full Video Analysis)

https://youtu.be/Q5g3p9Zwjrk

Implicit neural representations are created when a neural network is used to represent a signal as a function. SIRENs are a particular type of INR that can be applied to a variety of signals, such as images, sound, or 3D shapes. This is an interesting departure from regular machine learning and required me to think differently.

OUTLINE:

0:00 - Intro & Overview

2:15 - Implicit Neural Representations

9:40 - Representing Images

14:30 - SIRENs

18:05 - Initialization

20:15 - Derivatives of SIRENs

23:05 - Poisson Image Reconstruction

28:20 - Poisson Image Editing

31:35 - Shapes with Signed Distance Functions

45:55 - Paper Website

48:55 - Other Applications

50:45 - Hypernetworks over SIRENs

54:30 - Broader Impact

Paper: https://arxiv.org/abs/2006.09661

Website: https://vsitzmann.github.io/siren/

230 Upvotes

29 comments sorted by

View all comments

Show parent comment

38

u/K0ruption Jun 21 '20

I’m not affiliated with the authors or anything, but here is my point-by-point response.

  1. Some image compression methods do in fact use Fourier basis to do compression. But using sine waves as basis vs. using them in a as neural net activations is widely different. So saying “this is not novel” because Fourier expansions have been used for compression is a bit misleading. More recent image compression methods don’t use Fourier basis but wavelets since they are more efficient. It would have been interesting for the authors to compare the number of parameters needed in their neural net vs. the number of wavelet coefficient needed to compress an image to a prescribed accuracy. This would shed light on how efficient this method is.
  2. Please give references for the “high expressiveness” of sine activations. If it’s well know that they are so expressive then why are they not nearly as common as ReLU? How in the world does one “normalize for expressiveness”? I feel that using networks with the same layer structure but just different activations is a perfectly reasonable thing to do. They have the same number of parameters and, in the end, that’s what matters.
  3. I think there’s an experiment in the appendix where they compare against elu?
  4. Overfitting here is in fact the name of the game. If you’re doing image compression, you want to overfit your image as much your number of parameters allow, that’s how you get the most efficient representation.
  5. The authors never claim the sin activations work well when the network input is high dimensional (e.i a bunch of pixels from an image). Their architecture is designed for low dimensions like 1,2,3 and they show that it works well in that setting.
  6. Don’t know enough to comment on this.

4

u/tpapp157 Jun 21 '20 edited Jun 21 '20

In response to point 2 regarding expressiveness. Expressiveness of an activation function relates to the degree of non-linearity that function can express. Sine waves can express far more complex non-linearities than Relus (or any of the other activations they compared against). In the case of this paper, where neuron outputs span multiple sine periods (due to their initialization) each neuron can model highly complex multimodal distributions which is way beyond what a single Relu neuron can achieve. This means a single Sine neuron can, in practice, do the equivalent modeling work of many Relu neurons.

The reason more expressive activation functions aren't used in practice is because they are much more expensive to compute leading to noticeably longer training times. They can also be trickier to train reliably. Relus are dirt cheap to compute, have enough non-linear expressiveness, and any expressiveness deficiency can be made up for with a slightly deeper/wider network while still being computationally cheaper overall.

As alluded, choice of activation function is a tradeoff between computation cost and performance for a given model. They should have normalized their networks according to one of those variables. Other papers which have explored new activation functions previously have done exactly this.

For example, a quick google search says that calculating a Sine function is on the order of 15x more computationally expensive than calculating a Relu. So just on a very simple level they should have compared their Sine network to a Relu network with 15x as many neurons.

11

u/RedditNamesAreShort Jun 22 '20

Hold up. relu on pascal GPUs is more expensive than sin in practice. Nvidia GPUs have special hardware for sin sitting in the SFU which can run at quarter rate but does not block the fpus. Which means in practice it just costs you one cycle. Meanwhile relu is implemented as max(0, x) which runs half rate on pascal GPUs. On turing max runs full rate tough but either way they are both as cheap as it can basically get. So if performance concerns are the major reason not to use sin as activation function that is completely unfounded.

instruction throughput table: https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#arithmetic-instructions