A hidden layer takes as input the activations of the previous layer
PHYSICS · Multi-part · Fermi University Physics · Computational Physics · High-performance and data-driven computational physics · High-performance and data-driven computational physics
Scientific Computing for Physicists, Ch Neural networks on physical data: backpropagation, convolution and symmetry
Problem
A hidden layer takes as input the activations hi=ReLU(zi(l)) of the previous layer, where z(l) is symmetric about zero, and produces zj=i=1∑ninWijhi+bj, where the weights Wij are independent, identically distributed, symmetric about zero with variance Var(W), and independent of every hi; the biases bj are constants.
((a)) Show that Var(zj)=ninVar(W)E[hi2].
((b)) Using E[ReLU(z)2]=21Var(z) for z symmetric about zero, find the value of Var(W) that makes Var(zj)=Var(z(l)), i.e. that preserves the variance from one layer to the next.
((c)) The layer takes the 900 ReLU outputs of a previous hidden layer of width 900 (nin=900) and has nout=300 units. Give the standard deviation of the weights that (b) prescribes.
((d)) The backward pass sends hˉi=∑j=1noutWijzˉj to the layer below, with zˉj=hˉjoutReLU′(zj). Assume the incoming adjoints hˉjout have mean zero and are independent of the weights and of whether zj>0, and that each zj is positive with probability 21. Find the weight variance that keeps Var(hˉi)=Var(hˉjout), give the standard deviation it prescribes for the layer in (c), and say when the two prescriptions agree.