AI Logic

Glossary

Learning Rate

Updated:

Three graphs side by side showing how gradient descent moves down the valley of the loss L(θ) when the learning rate is too small, just right, and too large. Too small, it advances only a little at a time and takes long to converge; just right, it nears the bottom of the valley in a few steps; too large, it jumps over the valley, the loss grows, and training diverges.

Explanation

The learning rate is a hyperparameter that sets the step size used when an optimization algorithm updates a model's weights. With a small learning rate, each step changes the weights only modestly, so the model can take a long time to converge. With a learning rate that is too large, the updates overshoot, and training may fail to converge and diverge instead. The learning rate is used mainly in gradient descent, which computes the gradient of the loss function and updates the weights along that direction to minimize the model's error. In theory, it is defined by "gradient × learning rate = weight update", and choosing an appropriate value strongly affects convergence speed and accuracy.

Where It Is Used

The learning rate plays an important role in many deep learning tasks. Typical uses include: 1. When training a neural network, the model's weights are updated every epoch based on the chosen learning rate. 2. Learning rate scheduling changes the learning rate dynamically as training progresses (e.g., step decay and cosine annealing). 3. Batch normalization can speed up training and allow larger learning rates, which helps improve stability. 4. Adaptive learning-rate optimizers (e.g., Adam and RMSprop) automatically adjust a separate learning rate for each parameter to train efficiently. 5. In hyperparameter search, tuning the learning rate to evaluate and compare the performance of different models is a common way to find the best model configuration.

FAQ

Q. Why is the learning rate important?
A.

The learning rate controls how much the weights are updated. If it is not set appropriately, training may fail to converge, or it can lead to overfitting or divergence.

Q. How can the learning rate be adjusted?
A.

There are methods that change it dynamically as training progresses, such as step decay, cosine annealing, warm-up, and ReduceLROnPlateau.

Q. Which algorithms is it related to?
A.

It is used in optimization algorithms such as gradient descent, Adam, RMSprop, and SGD, and is essential for updating parameters efficiently.