What is Gradient descent?
In Turkish: Gradyan inişi · Topic: Models and training
The basic optimization method that lowers a model's error by nudging its parameters in small steps opposite to the direction in which the error rises fastest. Most neural networks are trained with variants of it.
How does it work?
The model first makes predictions on training data, and a loss function turns its error into a single number. Backpropagation then works out how much each parameter contributed to that error, which is the gradient. Each parameter takes a step against the gradient, with the step size set by the learning rate. This loop repeats thousands of times. It resembles someone walking down a foggy valley who only feels the slope underfoot and always steps downhill; they cannot be sure they have reached the bottom, but they keep descending.
Why does it matter?
Nearly every neural network in the news, from large language models to image generators, is trained on this principle. How long training takes, how much computing power it needs and whether the model reaches a good result all depend heavily on how the method is applied. Behind the phrase 'the model was trained' there is usually this loop.
Example
A spam filter at first confuses junk mail with regular mail; after each mistake its weights are adjusted slightly, and after thousands of examples its error rate drops noticeably.
FAQ
Does gradient descent always find the best solution?
No. It can get stuck in local dips or flat regions. In large neural networks, though, it usually reaches solutions that are good enough in practice.
What is stochastic gradient descent?
It is the version that computes the gradient on a small random chunk of data instead of the whole dataset. Updates are faster and need less memory, at the cost of being somewhat noisier.