How Deep Before the Signal Dies

Calculus in Deep LearningMedium+20 XP+20

How Deep Before the Signal Dies

A deep network is built entirely from sigmoid layers. At the current parameters the stack happens to be perfectly uniform: every layer carries the same weight w=2.5w = 2.5w=2.5, and every layer's sigmoid output is

σ(z)=0.8\sigma(z) = 0.8σ(z)=0.8

Backpropagation multiplies in one factor per layer as it travels downward. For a sigmoid layer that factor is

d=w⋅σ′(z)d = w \cdot \sigma'(z)d=w⋅σ′(z)

and the sigmoid's derivative is given by

σ′(z)=σ(z)(1−σ(z))\sigma'(z) = \sigma(z)\bigl(1 - \sigma(z)\bigr)σ′(z)=σ(z)(1−σ(z))

The loss hands the top of the stack a gradient of magnitude G=5.0G = 5.0G=5.0. After that gradient has passed down through nnn of these layers, the magnitude reaching the weights below them is

G⋅d nG \cdot d^{\,n}G⋅dn

The team calls a layer dead once the gradient arriving at it has fallen strictly below 10−710^{-7}10−7 — at that size, multiplying by any sane learning rate moves the weights by nothing.

What is the smallest whole number nnn at which the gradient has gone dead?

Give your answer as a whole number of layers.

0.25
0.25
0.25
multiplied together
0.01563
3 layers

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

layers