AI Logic

Glossary

Dying ReLU Problem

Updated๏ผš

On the left, the graph of ReLU: for z at or below 0, both the output and the slope are 0; for positive z, the output is z and the slope is 1. The z of a dead neuron is negative for every sample, so its output is always 0. On the right, what happens inside a single neuron. The left column is the forward pass (bottom to top: input x, weighted sum z = wยทx + b is negative, ReLU, output is always 0); the right column is backpropagation (top to bottom: gradient from the layer above, multiplied by ReLU's slope of 0 so the gradient becomes 0, gradients of w and b are also 0 so the weights are not updated). A box at the bottom lists when the problem tends to occur and the remedies: Leaky ReLU and PReLU.

Explanation

The dying ReLU problem is an issue specific to the ReLU function in the training of neural networks: when the linear combination of a neuron's inputs is negative, the neuron can only output 0 and stops contributing to learning.

The ReLU function outputs 0 whenever its input is 0 or less. Because this can make a neuron stop functioning as if it were dead, the phenomenon is called "dying ReLU".

When this happens, the gradient of the affected neuron becomes 0, and its weights are no longer updated by backpropagation. In other words, a neuron that has died once stays unresponsive for the rest of training, which significantly reduces the expressive power of the network. When the problem occurs frequently in deep networks, it can degrade the performance of the whole model or hinder convergence.

Dying ReLU is most often caused by the following factors: a learning rate that is too large, inappropriate weight initialization, or input data biased toward negative values. Under these conditions, inputs are more likely to fall into the negative region of the ReLU function, and more outputs become stuck at 0.

The most common countermeasure is to use an activation function that keeps a small gradient in the negative region as well, such as Leaky ReLU or PReLU.

FAQ

Q. What happens when the dying ReLU problem occurs?
A.

Some neurons always output 0, and learning stops progressing for them. This reduces the expressive power of the network and can hurt model performance.

Q. When is it likely to occur?
A.

It tends to occur when the initial weights are too large, when the learning rate is set too high, or when inputs to a network with ReLU functions are biased toward negative values.

Q. How can it be addressed?
A.

Countermeasures include using improved variants of ReLU such as Leaky ReLU or PReLU, choosing a better weight initialization method (such as He initialization), and setting the learning rate appropriately.