6
$\begingroup$

i read that sigmoid function will kill the gradient as a result the network will not learn

and i read that in ReLU function a large gradient flowing through a ReLU neuron could cause the weights to update in such a way that the neuron will never activate

and that may lead “dead” neurons.
so, are they the same?

$\endgroup$
2
  • 1
    $\begingroup$ Related, probably not a duplicate: stats.stackexchange.com/questions/224378/… $\endgroup$
    – Sycorax
    Commented Aug 18, 2016 at 0:26
  • $\begingroup$ where did you read this? Give the sources, it could help answer ur question. Usually a dead neuron is a neuron that has a very low activation and hence, doesn't do much in helping the network learn. Its known that sigmoids can get saturated easily and result in vanishing gradients, specially when the networks are deep. However, ReLu's as far as I know, don't have these problems and are preferred for deep networks. $\endgroup$ Commented Aug 18, 2016 at 0:27

2 Answers 2

1
$\begingroup$

They both get zero or very small gradients so they can barely get trained.

The difference is, the activation values of “dead” ReLU neurons are almost always zero, whereas the activation values of saturated sigmoid neurons are close to 0 or 1.

$\endgroup$
2
  • 1
    $\begingroup$ when the neuron is saturated it becomes a problem but why? i think that saturation means the output is near 1 or 0 , (high confidence)and that means the gradients are very low, and that means this neuron has a huge influence on the output so i think it's the right think to set it's gradient to zero, am i right? $\endgroup$
    – floyd
    Commented Aug 22, 2016 at 17:20
  • 1
    $\begingroup$ @floyd yes, if the neuron is saturated and its gradient is in the saturating direction it's fine, but it can barely get trained if the gradient is in the opposite direction. Because the sigmoid fucntion saturates on both sides, a common situation is that the sigmoid output is always close to 0 (or 1) just like dead ReLUs. $\endgroup$
    – dontloo
    Commented Aug 23, 2016 at 2:04
0
$\begingroup$

Both of them will have very small gradients, hence both act as a showstopper to learning.

Difference is that the likelihood of dead Relu neurons is much less as compared to saturated sigmoids

The gradient of a sigmoid is: S′(a)=S(a)(1−S(a)) When we start learning useful features in the later layers, the activations S(a) are high and thus the gradient or the learning of the previous layers starts reducing.

Not matter how careful you are with network parameters you will encounter saturated sigmoids and vanishing gradients in your network.

For RelU however the gradients are a constant no matter how good the activation/features are in your last layers, thus the previous layers continue to learn. Unless you really mess up the learning rate, or the weight decay terms, or your bias which forces the RelU's to operate in negative regime for all inputs, it is hard to get a lot of "dead" neurons as compared to saturated sigmoids.

$\endgroup$
1
  • $\begingroup$ when the neuron is saturated it becomes a problem but why? i think that saturation means the output is near 1 or 0 , (high confidence)and that means the gradients are very low, and that means this neuron has a huge influence on the output so i think it's the right think to set it's gradient to zero, am i right? $\endgroup$
    – floyd
    Commented Aug 22, 2016 at 17:20

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.