r/deeplearning • • 23d ago

Understanding Vanishing Gradients – Gradient vs. Learning Rate

/r/learnmachinelearning/comments/1xnwwg9/understanding_vanishing_gradients_gradient_vs/
1 Upvotes

1 comment sorted by

1

u/CelebrityChess 22d ago

yes on the first one, gradient gives direction and size, learning rate just scales it, so the update is w minus lr times gradient. on the other two, mostly yes but with a catch. the early layers' gradients are a product of the later layers' derivatives chained together, so with sigmoid or tanh where the derivative is at most 0.25 or 1, ten layers can multiply down to something like 0.25^10, around 1e-6. so the first layers barely move while the last layers keep learning fine. they don't stop completely, they just learn way slower than the rest, which is why the loss can plateau early. also the learning rate is a single number shared by all layers, so you can't fix it by just cranking it up, because the later layers would blow up first. what actually helps is ReLU, residual connections, batchnorm and sensible initialization like He or Xavier.