3
$\begingroup$

From this answer https://stats.stackexchange.com/a/437474/346940 seems that batch norm scales the standardized input by a factor $ \beta $... why don't we restrict this $\beta$ to be greater than zero?

if with one gradient update we pass from a $\beta > 0$ but very close to zero, to one small and negative, the input of the following layer will be flipped all of a sudden

$\endgroup$

1 Answer 1

2
$\begingroup$

The updates to $\beta$ are done to improve the loss. Assuming the gradient descent is working (no software bugs, the step size is small enough), then the result of $\beta$ becoming smaller and eventually negative is that the model's loss is decreasing and the model is improving.

Neural networks are compositions of many parameters, so considering a single parameter in isolation does not give the full picture of how changing it will change the network. At the same time that $\beta$ is being updated to minimize the loss, so too are all of the other parameters in the model. So it could be the case that $\beta$ is getting smaller, or even changing sign, because the weights before or after it are also changing sign or growing larger.

This observation, a weight getting larger and smaller, and possibly changing sign, is related to , because the signs and magnitudes of a single weight are not unique but instead operate in conjunction with the signs and magnitudes of the weights before and after it. See: Can we use MLE to estimate Neural Network weights? The phenomenon of is not unique to the weights and biases of the batch normalization layer. It could also happen in an ordinary neural network with several layers.

$\endgroup$
2
  • $\begingroup$ yes idk y but i thought that beta was special wrt all the other weights of the nets, because I was estimating the gradient, so I had to sample beta from a gaussian, so half the samples where positive and half negative, and that made everything working very bad $\endgroup$
    – Alberto
    Commented Jan 29, 2023 at 23:59
  • $\begingroup$ $\beta$ is usually initialized at 1, but otherwise it’s a normal weight updated with backprop. $\endgroup$
    – Sycorax
    Commented Jan 30, 2023 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.