MullOverThing

Useful tips for everyday

# Why are non Zero centered activation functions a problem in backpropagation?

## Why are non Zero centered activation functions a problem in backpropagation?

Sigmoid outputs are not zero-centered. This is undesirable since neurons in later layers of processing in a Neural Network (more on this soon) would be receiving data that is not zero-centered.

## Which activation function has its center at Zero *?

tanh activation function
The output of the tanh activation function is Zero centered; hence we can easily map the output values as strongly negative, neutral, or strongly positive. Usually used in hidden layers of a neural network as its values lie between -1 to; therefore, the mean for the hidden layer comes out to be 0 or very close to it.

What is Zero centered output?

Zero centered functions The zero centered function would be a function where its output some times would be greater than 0 and less than 0.

### Why do we use zero centered activation function?

If the activation function of the network is not zero centered, y = f(x w) is always positive or always negative. Thus, the output of a layer is always being moved to either the positive values or the negative values. This is why the zero centered property is important, though it is not necessary.

### What does ReLU stand for?

rectified linear activation function
The rectified linear activation function or ReLU for short is a piecewise linear function that will output the input directly if it is positive, otherwise, it will output zero.

What is leaky ReLU activation and why is it used?

Leaky ReLU. Leaky ReLUs are one attempt to fix the “dying ReLU” problem. Instead of the function being zero when x < 0, a leaky ReLU will instead have a small positive slope (of 0.01, or so). That is, the function computes f(x)=1(x<0)(αx)+1(x>=0)(x) where α is a small constant.

## What are the problems with sigmoid?

The two major problems with sigmoid activation functions are: Sigmoid saturate and kill gradients: The output of sigmoid saturates (i.e. the curve becomes parallel to x-axis) for a large positive or large negative number. Thus, the gradient at these regions is almost zero.

## Why are non zero-centered activation functions a problem in?

This has implications on the dynamics during gradient descent, because if the data coming into a neuron is always positive (e.g. x > 0 elementwise in f = w T x + b )), then the gradient on the weights w will during backpropagation become either all be positive, or all negative (depending on the gradient of the whole expression f ).

What happens when activation functions are not used?

That is, if the units are not activated initially, then during backpropagation zero gradients flow through them. Hence, neurons that “die” will stop responding to the variations in the output error because of which the parameters will never be updated/updated during backpropagation.

### Why are activation functions preffered in hidden layers?

However, its output is always zero-centered which helps since the neurons in the later layers of the network would be receiving inputs that are zero-centered. Hence, in practice, tanh activation functions are preffered in hidden layers over sigmoid.

### Why do we need activation functions in gradient descent?

The output is always between 0 and 1, that means that the output after applying sigmoid is always positive hence, during gradient-descent, the gradient on the weights during backpropagation will always be either positive or negative depending on the output of the neuron.