What is a vanishing gradient?

A vanishing gradient occurs when, during backpropagation, the error signal shrinks exponentially towards zero as it travels back through layers or time steps. Early layers barely learn and recurrent networks cannot link events far apart in time.

Unlike an exploding gradient, whose norm grows sharply during training, a vanishing gradient falls towards zero. Both stem from products of Jacobian matrices, which can shrink to zero or explode to infinity.

Topic
Machine learning, models and training
Also known as
Vanishing gradient problem
Origin
1994 IEEE Transactions on Neural Networks paper; long-term dependencies in recurrent networks

How a vanishing gradient works

  1. The chain rule multiplies layer derivatives; repeated factors below one shrink the signal exponentially.
  2. Saturating activations such as the sigmoid push derivatives towards zero, especially in the top hidden layer.
  3. Normalised initialisation and normalisation layers let networks with tens of layers start converging.
  4. ReLU activations, Long Short-Term Memory units and residual connections give gradients an uninterrupted path.

Commonly confused terms

TermHow it differs
Exploding gradientAn exploding gradient is a sharp rise in the norm of the backpropagated gradient during training that destabilises updates; it is usually tamed with gradient clipping. With a vanishing gradient the gradient approaches zero and early layers fail to learn.

Why a vanishing gradient matters for on-premises AI

A 1994 journal paper analysed the problem for recurrent networks; a 2010 study noted that deep multilayer networks had not been trained successfully before 2006. LSTM, ReLU, normalised initialisation and residual networks of up to 152 layers in 2015 largely eased it. Transformer language models also wrap each sub-layer in a residual connection followed by layer normalisation.

ON-PREMISES EXAMPLE

An energy company's recurrent fault prediction model reacts only to the last few hours of substation sensor data and misses a warming pattern from weeks earlier. The team tracks gradient norms, swaps simple units for LSTM units and revalidates the model on past faults with long-range patterns.

Common questions

How is a vanishing gradient noticed?

Gradient norms for early layers or the distant past stay near zero, the loss stalls for long periods and the model fails to learn long-range dependencies.

Does gradient clipping fix vanishing gradients?

No. Gradient clipping targets exploding gradients. Vanishing gradients are addressed with architectural changes, suitable initialisation, normalisation or regularisation terms that preserve gradient magnitude.

Sources

In the glossary: Glossary, R to Z

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.