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

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