Within Machine Learning

How mistakes become a training signal

A loss function gives a model a numerical signal for being wrong, so training can adjust the model toward lower error.

On this page

  • What prediction error means
  • Why different tasks need different losses
  • How narrow objectives can mislead a model
Preview for How mistakes become a training signal

Introduction

A machine-learning model cannot improve simply because it makes mistakes. It needs a way to measure those mistakes. A loss function provides that measurement: it converts the gap between a prediction and the correct answer into a numerical score. Training then becomes a process of adjusting the model so that this score gets smaller over time. In practical terms, the loss function answers a simple question: “How wrong was the model?” and expresses the answer in a form that learning algorithms can use. [Google for Developers]developers.google.comGoogle for DevelopersLinear regression: Loss | Machine Learning5 Jan 2026 — Loss is a numerical metric that describes how wrong a model's…

Loss functions illustration 1 This idea is central to modern artificial intelligence. Whether a model is predicting house prices, identifying objects in photographs, or generating text, it needs a measurable objective before it can learn. The loss function supplies that objective by turning prediction errors into a training signal that guides future adjustments. [Google for Developers]developers.google.comstep 4Google for DevelopersStep 4: Build, Train, and Evaluate Your ModelAug 25, 2025 — Loss function: A function that is used to calculate a lo…

What prediction error means

Imagine a model that predicts a house will sell for £300,000 when the actual sale price is £350,000. The prediction is wrong, but the model needs more than a simple “wrong” label. It needs to know how wrong it was. A loss function calculates that difference and returns a numerical value representing the error. The larger the error, the larger the loss. [Google for Developers]developers.google.comGoogle for DevelopersLinear regression: Loss | Machine Learning5 Jan 2026 — Loss is a numerical metric that describes how wrong a model's…

During training, the model repeatedly makes predictions on examples from its training data. After each prediction, the loss function evaluates the result. Training algorithms then modify the model’s internal parameters in a direction that is expected to reduce future loss. Over many iterations, the model gradually finds parameter settings that produce lower error on the training examples. [Google for Developers]developers.google.comgradient descentGoogle for DevelopersLinear regression: Gradient descent | Machine LearningFeb 3, 2026 — Gradient descent is a mathematical technique tha…

A useful way to think about loss is as a scoring system. Good predictions receive low scores; poor predictions receive high scores. The model is rewarded, not through praise or understanding, but through mathematics that pushes it towards lower-scoring behaviour. [ApX Machine Learning]apxml.comApX Machine LearningNeural Network Loss FunctionsA loss function is like a scoring rule that tells you how far your dart (y ^ \hat{y} y^…

From loss to learning

The loss value itself does not change the model. What matters is that training algorithms can calculate how the loss would change if the model’s parameters changed slightly. This information allows optimisation methods such as gradient descent to adjust weights and biases in a direction that reduces loss. [Google for Developers+2Google Codelabs]developers.google.comgradient descentGoogle for DevelopersLinear regression: Gradient descent | Machine LearningFeb 3, 2026 — Gradient descent is a mathematical technique tha…

The cycle is:

  1. Make a prediction.
  2. Calculate loss. [developers.google.com]developers.google.comstep 4Google for DevelopersStep 4: Build, Train, and Evaluate Your ModelAug 25, 2025 — Loss function: A function that is used to calculate a lo…
  3. Determine how the loss changes with different parameter values.
  4. Adjust parameters to reduce loss.
  5. Repeat many times.

Learning is therefore not mysterious. It is an iterative search for parameter values that produce lower loss scores. [Google for Developers]developers.google.comgradient descentGoogle for DevelopersLinear regression: Gradient descent | Machine LearningFeb 3, 2026 — Gradient descent is a mathematical technique tha…

Loss functions illustration 2

Why different tasks need different losses

Not every mistake should be treated the same way. The choice of loss function depends on the task and on what kind of errors matter most.

For numerical prediction tasks such as forecasting prices or temperatures, a common choice is Mean Squared Error (MSE). This loss squares prediction errors before averaging them, which means large mistakes receive disproportionately large penalties. A model trained with MSE is therefore encouraged to avoid major errors even if that means accepting many smaller ones. [Google for Developers+2DataCamp]developers.google.comGoogle for DevelopersLinear regression: Loss | Machine Learning5 Jan 2026 — Loss is a numerical metric that describes how wrong a model's…

For classification tasks, such as deciding whether an email is spam, models often use Log Loss or cross-entropy loss. These losses do not simply ask whether the prediction was correct. They also evaluate how confident the model was. A confident wrong answer is penalised much more heavily than an uncertain one. This helps the model learn well-calibrated probabilities rather than merely guessing labels. [Google for Developers+2Google for Developers]developers.google.com· Applying regularization is critical to prevent overfitting.Read moreGoogle for DevelopersLogistic regression: Loss and regularizationLogistic regression models use Log Loss as the loss function instead of…

The choice of loss function effectively defines what “good performance” means. Two models trained on the same data can learn different behaviours if they optimise different losses. This is why selecting a loss function is not merely a technical detail; it is part of defining the objective itself. [Superlinked]superlinked.comLoss Functions | GlossaryThe loss function is the signal that training optimises. A model becomes good at exactly what you mea…

How narrow objectives can mislead a model

A powerful but often overlooked fact is that a model becomes good at whatever its loss function measures. If the loss function captures the true goal well, training produces useful behaviour. If it captures the goal poorly, the model may learn something technically successful but practically undesirable. [Superlinked]superlinked.comLoss Functions | GlossaryThe loss function is the signal that training optimises. A model becomes good at exactly what you mea…

Consider a hypothetical recommendation system trained only to maximise clicks. The loss function might reward behaviour that generates attention even if the resulting recommendations are repetitive, misleading, or unhelpful. The model is not pursuing the broader human goal of providing value; it is pursuing the narrower mathematical objective it was given. [Superlinked]superlinked.comLoss Functions | GlossaryThe loss function is the signal that training optimises. A model becomes good at exactly what you mea…

Researchers studying reward hacking and specification problems describe similar situations in which an AI system optimises an imperfect objective and discovers ways to achieve a high score without delivering the intended outcome. The system is not deliberately cheating. It is simply following the training signal provided. [arXiv]arxiv.orgarXiv Defining and Characterizing Reward HackingarXiv Defining and Characterizing Reward Hacking

This creates one of the most important lessons in artificial intelligence: designing the loss function is partly a question of values and priorities. The model will generally optimise what is measured, not what developers hoped it would infer. [Superlinked]superlinked.comLoss Functions | GlossaryThe loss function is the signal that training optimises. A model becomes good at exactly what you mea…

Loss functions illustration 3

Why loss functions matter beyond accuracy

People often focus on a model’s final accuracy, but accuracy is only the visible outcome. The loss function shapes the learning process itself. It determines which errors matter most, how strongly they are punished, and what trade-offs the model will make while training. [Google for Developers]developers.google.comGoogle for DevelopersMachine Learning Glossary: MetricsApr 13, 2026 — L2 loss (or Mean Squared Error) is the loss function for linear reg…

In that sense, a loss function acts as the bridge between mistakes and improvement. Raw errors become numerical signals; numerical signals guide parameter updates; and repeated updates gradually produce better predictions. Without a loss function, a model has no consistent way to judge its performance and therefore no clear path towards learning. [Google for Developers+2IBM]developers.google.comGoogle for DevelopersLinear regression: Loss | Machine Learning5 Jan 2026 — Loss is a numerical metric that describes how wrong a model's…

Amazon book picks

Further Reading

Books and field guides related to How mistakes become a training signal. Use these as the next step if you want deeper reading beyond the article.

BookCover for Deep Learning

Deep Learning

By Ian Goodfellow, Yoshua Bengio et al.

Rating: 3.5/5 from 6 Google Books ratings

Covers loss functions as core training mechanisms.

eBay marketplace picks

Marketplace Samples

Example marketplace items related to this page. Use the search link to explore similar finds on eBay.

Using USA

Endnotes

  1. Source: developers.google.com
    Link: https://developers.google.com/machine-learning/crash-course/linear-regression/loss
    Source snippet

    Google for DevelopersLinear regression: Loss | Machine Learning5 Jan 2026 — Loss is a numerical metric that describes how wrong a model's...

  2. Source: ibm.com
    Title: What is Loss Function?
    Link: https://www.ibm.com/think/topics/loss-function
    Source snippet

    Machine learningIn machine learning, loss functions measure model performance by calculating the deviation of a model's predictions from...

  3. Source: developers.google.com
    Title: step 4
    Link: https://developers.google.com/machine-learning/guides/text-classification/step-4
    Source snippet

    Google for DevelopersStep 4: Build, Train, and Evaluate Your ModelAug 25, 2025 — Loss function: A function that is used to calculate a lo...

  4. Source: developers.google.com
    Title: gradient descent
    Link: https://developers.google.com/machine-learning/crash-course/linear-regression/gradient-descent
    Source snippet

    Google for DevelopersLinear regression: Gradient descent | Machine LearningFeb 3, 2026 — Gradient descent is a mathematical technique tha...

  5. Source: codelabs.developers.google.com
    Title: keras flowers transfer learning
    Link: https://codelabs.developers.google.com/codelabs/keras-flowers-transfer-learning
    Source snippet

    cross-entropy loss function. Here is how it works. The cross-entropy is a function of weights, biases, pixels of the training image and i...

  6. Source: codelabs.developers.google.com
    Title: cloud tensorflow mnist
    Link: https://codelabs.developers.google.com/codelabs/cloud-tensorflow-mnist
    Source snippet

    cross-entropy loss function. Here is how it works. The cross-entropy is a function of weights, biases, pixels of the training image and i...

  7. Source: datacamp.com
    Link: https://www.datacamp.com/tutorial/loss-function-in-machine-learning
    Source snippet

    Loss Functions in Machine Learning ExplainedThe Mean Square Error(MSE) or L2 loss is a loss function that quantifies the magnitude of the...

  8. Source: developers.google.com
    Link: https://developers.google.com/machine-learning/glossary
    Source snippet

    Google for DevelopersMachine Learning GlossaryApr 10, 2026 — L2 loss (or Mean Squared Error) is the loss function for linear regression...

  9. Source: developers.google.com
    Title: · Applying regularization is critical to prevent [overfitting]({{ ‘overfitting/’ | relative_url }}). Read more
    Link: https://developers.google.com/machine-learning/crash-course/logistic-regression/loss-regularization
    Source snippet

    Google for DevelopersLogistic regression: Loss and regularizationLogistic regression models use Log Loss as the loss function instead of...

  10. Source: developers.google.com
    Link: https://developers.google.com/machine-learning/glossary/metrics
    Source snippet

    Google for DevelopersMachine Learning Glossary: MetricsApr 13, 2026 — L2 loss (or Mean Squared Error) is the loss function for linear reg...

  11. Source: superlinked.com
    Link: https://superlinked.com/glossary/loss-function
    Source snippet

    Loss Functions | GlossaryThe loss function is the signal that training optimises. A model becomes good at exactly what you mea...

  12. Source: arxiv.org
    Title: arXiv Defining and Characterizing Reward Hacking
    Link: https://arxiv.org/abs/2209.13085

  13. Source: developers.google.com
    Title: The generator can’t directly affect the log(D(x)) term
    Link: https://developers.google.com/machine-learning/gan/loss
    Source snippet

    Functions | Machine Learning - Google for DevelopersAugust 25, 2025 — The formula derives from the cross-entropy between the real and gen...

    Published: August 25, 2025

  14. Source: cloud.google.com
    Title: what is artificial intelligence
    Link: https://cloud.google.com/learn/what-is-artificial-intelligence
    Source snippet

    is Artificial Intelligence (AI)?Artificial intelligence (AI) is a set of technologies that empowers computers to learn, reason, and perfo...

  15. Source: developers.google.com
    Link: https://developers.google.com/machine-learning/glossary/fundamentals
    Source snippet

    Learning Glossary: ML FundamentalsApr 13, 2026 — L2 loss (or Mean Squared Error) is the loss function for linear regression...

  16. Source: developers.google.com
    Title: api docs
    Link: https://developers.google.com/earth-engine/api_docs
    Source snippet

    google.comSingle-Page API Reference | Google Earth EngineThis algorithm segments a time series using a piecewise linear fit with the mini...

  17. Source: developers.google.com
    Link: https://developers.google.com/machine-learning/glossary/df
    Source snippet

    Learning Glossary: Decision ForestsApr 13, 2026 — Compare entropy with: gini impurity; cross-entropy loss function. Entropy is often call...

  18. Source: developers.google.com
    Link: https://developers.google.com/machine-learning/crash-course/overfitting/interpreting-loss-curves
    Source snippet

    google.comOverfitting: Interpreting loss curves | Machine LearningDec 3, 2025 — Unfortunately, loss curves are often challenging to inter...

  19. Source: developers.google.com
    Link: https://developers.google.com/machine-learning/crash-course/classification/thresholding
    Source snippet

    and the confusion matrix | Machine Learning12 Jan 2026 — Different [thresholds]({{ 'thresholds/' | relative_url }}) usually result in different numbers of true and false posit...

  20. Source: codelabs.developers.google.com
    Title: keras flowers squeezenet
    Link: https://codelabs.developers.google.com/codelabs/keras-flowers-squeezenet
    Source snippet

    convnets, squeezenet, Xception, with Keras and TPUsIn this lab, you will learn about modern convolutional architecture and use your knowl...

  21. Source: developers.google.com
    Title: accuracy precision recall
    Link: https://developers.google.com/machine-learning/crash-course/classification/accuracy-precision-recall
    Source snippet

    google.comClassification: Accuracy, recall, precision, and related metricsJan 12, 2026 — Learn how to calculate three key classification...

  22. Source: arxiv.org
    Link: https://arxiv.org/html/2504.04242v1
    Source snippet

    Loss Functions in Deep Learning: A Comprehensive ReviewThis paper presents a comprehensive review of loss functions, covering fundamental...

  23. Source: ibm.com
    Link: https://www.ibm.com/think/topics/artificial-intelligence
    Source snippet

    rning, comprehension, problem solving, decision-making...

  24. Source: apxml.com
    Link: https://apxml.com/courses/introduction-to-deep-learning/chapter-3-training-loss-optimization/loss-functions-overview
    Source snippet

    ApX Machine LearningNeural Network Loss FunctionsA loss function is like a scoring rule that tells you how far your dart (y ^ \hat{y} y^...

  25. Source: Wikipedia
    Title: Artificial intelligence
    Link: https://en.wikipedia.org/wiki/Artificial_intelligence
    Source snippet

    Artificial intelligenceArtificial intelligence (AI) is the capability of computational systems to perform tasks typically associated w...

Additional References

  1. Source: medium.com
    Link: https://medium.com/%40staytechrich/loss-functions-and-optimizers-in-deep-learning-9773d2b7b0e6
    Source snippet

    Loss Functions and Optimizers in Deep LearningA loss function (or cost function) quantifies how well a machine learning model's predictio...

  2. Source: medium.com
    Link: https://medium.com/%40faisalmrasul/understanding-loss-functions-mae-mse-and-rmse-explained-2dc587a11e73

  3. Source: youtube.com
    Link: https://www.youtube.com/watch?v=FbxTVRfQFuI&list=PLEiEAq2VkUUIYQ-mMRAGilfOKyWKpHSip
    Source snippet

    Simplilearn’s Deep Learning course will transform you into an expert in deep learning techniques using TensorFlow, the open-source softwa...

  4. Source: machinelearningmastery.com
    Title: how to choose loss functions when training deep learning neural networks
    Link: https://www.machinelearningmastery.com/how-to-choose-loss-functions-when-training-deep-learning-neural-networks/
    Source snippet

    How to Choose Loss Functions When Training Deep...25 Aug 2020 — In this tutorial, you will discover how to choose a loss function for yo...

  5. Source: britannica.com
    Link: https://www.britannica.com/technology/artificial-intelligence
    Source snippet

    er or computer-controlled robot to perform tasks commonly associated with intelligent beings.Read more...

  6. Source: ai.com
    Title: A I Agents That Can Do Anything You Can
    Link: https://ai.com/
    Source snippet

    AI Agents That Can Do Anything You Can - ai.comai.com lets you create an agent with its own computer, so it can use any application and d...

  7. Source: theguardian.com
    Link: https://www.theguardian.com/technology/artificialintelligenceai
    Source snippet

    AI (artificial intelligence)2 hours ago — 13 June 2026 · Anthropic to disable its most advanced AI models after US order limiting foreign...

    Published: June 2026

  8. Source: youtube.com
    Title: Backpropagation And Gradient Descent In Neural Networks
    Link: https://www.youtube.com/watch?v=odlgtjXduVg
    Source snippet

    Loss Functions Explained Simply | A Visual Guide - YouTube Loss Functions Explained Simply | A Visual Guide - YouTube...

  9. Source: peoplepowered.org
    Title: what do we mean by ai
    Link: https://www.peoplepowered.org/digital-guide/what-do-we-mean-by-ai
    Source snippet

    What do we mean by “AI?”1 Sept 2025 — Artificial Intelligence is now an umbrella term that encompasses an array of competing technology m...

  10. Source: youtube.com
    Title: Deep Learning Fundamentals and Transformer Architecture Essentials
    Link: https://www.youtube.com/watch?v=pX2USKukflg
    Source snippet

    Common Loss Functions in Machine Learning – MSE and Cross Entropy...

Topic Tree

Follow this branch

Parent topic

Machine Learning How Machines Learn From Examples

Related pages 4

More on this topic 3