What is Loss function?
In Turkish: Kayıp fonksiyonu · Topic: Models and training
A measure that turns the gap between a model's prediction and the correct answer into a single number. Training searches for the parameters that make this number as small as possible.
How does it work?
The model makes a prediction for an example; the loss function compares it with the true value and returns a higher number the bigger the mistake is. That number is averaged over all examples. Gradient descent then finds the parameter changes that reduce it. The function is chosen to fit the task: mean squared error is common for numeric predictions such as house prices, and cross-entropy is common for classification. In language models, assigning low probability to the actual next word is penalized.
Why does it matter?
The loss function tells the model what counts as 'good'; if it is chosen badly, the model perfects the wrong goal. The phrase 'training loss went down' in the news refers to this value. Questions about what is rewarded and what is penalized, which come up in reliability and fairness debates, often trace back to this design choice.
Example
If a house price model predicts 2 million for a 3 million lira home, the loss is high; if it predicts 2.9 million, the loss is very small.
FAQ
Are loss and accuracy the same thing?
No. Accuracy counts how many predictions are right, while loss also reflects how far off predictions are and how confidently the model is wrong. Because a gradient can be taken from the loss, it is what training uses.
Should the loss be zero?
Usually not. A training loss near zero can be a sign of memorization if performance on validation data is not improving.