AI GLOSSARY · AI CONCEPTS

Vanishing gradient problem

Markdown version · Wikidata Q18358230

Definition

The vanishing gradient problem is a training difficulty in deep neural networks where the error signals used to update early layers shrink as they pass backwards, so those layers learn very slowly or not at all.

Also called: vanishing gradient, vanishing gradients, vanishing gradient problem in deep learning.

In plain language

A neural network learns by being told how wrong it was and passing that correction backwards, layer by layer, so each layer can adjust. In a very deep network the correction can get weaker at every step, like a message whispered down a long line of people until the first people hear almost nothing. The early layers then barely change, and training stalls. The opposite problem, exploding gradients, makes the correction grow out of control. They matter to people who train or fine-tune models, and they cost time and compute when a run goes nowhere.

Technical definition

Training by backpropagation multiplies local derivatives along the path from the loss to each layer. When many factors are smaller than one, as with a saturated sigmoid whose gradient is small for large positive or negative inputs, the product shrinks toward zero and early-layer weights barely update. When factors are large, the product grows, which is the exploding gradient problem. Pascanu, Mikolov and Bengio analyse both for recurrent networks and propose gradient norm clipping for exploding gradients and a soft constraint for vanishing ones. Google's Machine Learning Crash Course says the ReLU activation function can help prevent vanishing gradients.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Skill by Skill Almanac · Illustrative, not executed

    data-analysis-eda 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A fixed exploratory-analysis procedure and CSV profiler that keeps findings descriptive, evidenced and caveated.
    Why it exercises the concept
    Adjacent, not a gradient tool: the catalogue has no training skills. Checking your data first helps rule out data problems before you suspect the network, since a stalled run can have either cause.
  2. Skill by Skill Almanac · Illustrative, not executed

    llm-eval-test-sets 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    An eval dataset for an LLM feature, with a checker for duplicates, missing graders, imbalance and leakage.
    Why it exercises the concept
    Adjacent: a held-out eval set is how you notice that a model trained or fine-tuned elsewhere did not learn what you wanted. It does not diagnose gradients itself.
  3. Skill by Skill Almanac · Illustrative, not executed

    split-leakage-check 53/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    Checks of train, validation and test files for duplicates, shared groups, time and label leakage, printing JSON.
    Why it exercises the concept
    Adjacent: a clean split lets you read training and validation results honestly, which helps you notice a stalled network. It cannot tell you why the network stalled.

How it shows up when you use agents

Most people who run Claude Code, Codex or Cursor do not meet this problem directly. The large models behind them are trained by their publishers, and a coding agent calls a finished model. You meet the vanishing gradient problem when you train or fine-tune a network yourself, or when an agent helps you write training code for a deep learning model.

The symptom is a loss curve that stays flat while the code runs without errors. Early layers receive almost no update, so adding depth does not help. If you ask an agent why your model is not learning, a good answer starts by checking the activation functions, how weights were initialised, and whether gradients shrink toward zero in the first layers, not by changing the learning rate at random. Google's Crash Course says the ReLU activation function can help prevent vanishing gradients, and that batch normalization can help prevent exploding ones.

What breaks when this is misunderstood: people add layers or train for more epochs, spending compute on a network whose early layers are not learning. A next action is to print the gradient size per layer for one batch and compare early and late layers before changing anything else. The catalogue has no training skills, so the example cards are adjacent checks on data and evaluation, not gradient diagnostics. See also backpropagation, where the gradients come from.

Common confusions

  • Vanishing versus exploding gradients. Both come from multiplying many factors during backpropagation. Vanishing gradients shrink toward zero and stall learning. Exploding gradients grow large; Pascanu and colleagues propose gradient norm clipping for that case.
  • Vanishing gradient versus overfitting. A network with vanishing gradients has trouble learning even the training data. An overfit network learns the training data too closely and does badly on new data.
  • Myth. Only recurrent networks are affected. The sources describe the problem in deep networks generally; the d2l.ai page treats it as a numerical-stability issue of deep models.
  • Gradient versus gradient descent. The gradient says in which direction and how strongly to adjust. Gradient descent is the procedure that applies the adjustment.

Terms that mention Vanishing gradient problem

2 terms mention this one

More in AI concepts

Next steps

  1. data-analysis-eda A skill that exercises it.
  2. Recurrent neural network (RNN) Related term.
  3. Neural network Related term.
  4. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.

Review record

Last verified

Drafted by Claude (original draft) and OpenAI Codex (targeted revisions); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .

Change log (5)
  • : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
  • : Bounded batch-13 source and illustration repairs; independent affected recheck pending, publication disabled.
  • : First version.
  • : Verifier pass: myth line softened and rebuttal reworded; unsourced plain sentence dropped.
  • : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.