liveBook · Manning

Vanishing gradient problem

As explained in Evolutionary Deep Learning: Genetic algorithms and neural networks

A neural-network training failure in which backpropagated gradients become extremely small across successive layers, limiting effective parameter updates.

The vanishing gradient problem occurs when backpropagated loss components become extremely small across successive layers, limiting effective parameter updates in deep networks. The same failure appears in GANs when a strong discriminator sends too little useful loss back to the generator. section 1.3.1 section 9.2.1

Inspect the problem through these practical signals and responses:

  • Distinguish vanishing gradients from exploding gradients: successive layers can shrink gradient components toward zero or magnify them to exceptionally large values. section 1.3.1
  • Use normalization between layers to keep feature-map values centered around zero and reduce both vanishing and exploding gradients; account for added computation and possible feature smoothing. section 1.3.1 section 8.1.4
  • In GAN training, watch for discriminator fake loss staying within a small range while generator loss changes little and generated output fails to improve. section 9.2.2

Reproducing vanishing gradients in a GAN

In EDL_9_2_GAN_Optimization.ipynb, replace the discriminator optimizer with Adam(0.00000001, 0.5), run all cells, and inspect training output. A highly effective discriminator can leave generator loss with little useful improvement. Swapping generator ReLU activations for LeakyReLU(alpha=0.2) provides a further architecture experiment, although the observed results may remain limited. section 9.2.2

Listing 9.8 EDL_9_2_GAN_Optimization.ipynb: Setting the optimizer
gen_optimizer = Adam(0.0002, 0.5)
#disc_optimizer = RMSprop(.00001)      #1
 
# vanishing gradients
disc_optimizer = Adam(.00000001, .5)   #2

Inspect the optimizer setting that deliberately makes the discriminator extremely strong, then compare the resulting losses with the accompanying training-output figure. section 9.2.2

How Evolutionary Deep Learning: Genetic algorithms and neural networks covers it

How deep it goes
Explains gradient shrinkage across layers, mitigation trade-offs, and GAN diagnostics, then stops short of a formal derivation.
Examples
Uses BatchNormalization, a discriminator optimizer swap, GAN loss traces, and a ReLU-to-LeakyReLU architecture experiment.
What you can do after
Diagnose/debug with GAN loss behavior, optimizer changes, normalization, and activation-function experiments.
How it connects
Connects backpropagation, deep networks, exploding gradients, normalization, dropout, batch normalization, GANs, ReLU, and LeakyReLU.

Also explained in

Compare how 14 books explain vanishing gradient problem →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Evolutionary Deep Learning: Genetic algorithms and neural networks. The section links point to the parts of the book it draws on.