Skip to main content

How AI Models Learn

Explore the fundamental ideas behind training, data, optimization, and model behavior.

By Hidden AI Concepts9 min read
Tags:TrainingDataOptimization

Deep Understanding Hub

Understand how AI models learn, from first principles to practice

A concept-first guide to data, objectives, optimization, neural networks and generalization — grounded in cited sources, with scope and limits kept visible.

What this covers

Learning signals, data and parameters, objectives, optimization, networks and evaluation.

How to use it

Read end-to-end, or jump to the section that matches your question.

Visual aids

Conceptual diagrams and an interactive learning map support the text.

Evidence posture

Claims are tied to cited sources and framed with scope and limitations.

01

Learning has a defined setup

Experience, a task and a measure frame a learning problem; this article uses one supervised workflow to keep the parts distinct.

02

Parameters are not records

Data supplies examples; weights are values a model uses to turn an input into a prediction, adjusted by a learning procedure.

03

Objective is not purpose

A cost scores candidates within a procedure; it is not automatically the broader human goal for a system.

04

Fit is not generalization

Low training error shows fit to the examples; it does not establish performance on previously unseen cases.

Learning architecture

How AI Models Learn: From Signals to Evidence

Explore the conceptual path from learning signals and data to objectives, optimization, networks and evaluation. The flows shown are teaching patterns, not mandatory architectures.

Map scale: 100%.

Select or focus a component or relationship to highlight its connections. Arrows show conceptual patterns, not required sequences.

Setup / dataObjective / optimizationModels / networksEvidence / scope
System context · How AI Models Learn

Relationships

  1. Experience & task → Learning signalsdifferent signalsA learning problem can involve different kinds of experience and tasks.
  2. Data & examples → Model & parametersfit examplesExamples supply information used to adjust the model's parameter values.
  3. Model & parameters → Cost / objectivescores predictionsA cost assigns a numerical penalty for differing from targets.
  4. Cost / objective → Optimizationguides stepsOptimization searches parameter settings that improve the chosen criterion.
  5. Optimization → Networks & backpropuses gradientsBackpropagation is one method for obtaining the gradients an optimizer can use.
  6. Learning signals → Masked tokenstext-derived targetBERT's masked objective illustrates a target derived from the text itself.
  7. Masked tokens → Networks & backpropone model familyThe masked-token example is one objective; networks are one model family.
  8. Data & examples → Validation & testheld-aside dataTest data is held apart from fitting so it can evaluate a selected model.
  9. Validation & test → Generalizationbuilds evidenceHeld-out results provide evidence, but a limited evaluation cannot prove universal reliability.
  10. Cost / objective → Generalizationnot a guaranteeImproving a training objective is not the same as demonstrating success on new examples.

Goodfellow, Bengio, and Courville frame learning in terms of experience, a task, and a measure of performance.[1] In the supervised-learning workflow shown in scikit-learn’s guide, examples have inputs and target labels: an estimator is fitted on training data and then used to predict outputs.[5] This is one documented workflow, not a universal description of every AI system or learning method.

To understand what training changes, distinguish the data, model, parameters, and adjustment procedure. Fitting examples does not by itself show how well a model will work on examples it has not seen.

Deep dive

What Does It Mean for a Model to Learn?

Goodfellow, Bengio, and Courville describe a learning problem through three elements: experience, a task, and a measure of performance. In everyday terms, experience is what the system learns from; the task is what we want it to do; and the measure is how we judge its results. Their framing is useful for organizing a supervised-learning example, while the authors note that learning problems can involve different kinds of experience, tasks, and measures.[1]

Consider a model asked to estimate the travel time for a journey. A training example might contain information about a route and a target travel time. The task is to predict a time from route information; a measure can compare the prediction with the target. This is an original teaching illustration, not a reported experiment. It leaves out important real-world choices, such as how routes are represented and where the target times come from.

This setup is deliberately narrower than “how all AI learns.” Some systems are trained with different kinds of signals or procedures, and some software systems do not learn from data at all. The following sections focus on a basic supervised-learning picture so that each part of the process can be distinguished clearly.

Deep dive

Learning Signals Beyond One Workflow

Goodfellow and colleagues organize learning problems by the kind of experience, task, and performance measure involved; supervised learning is one case among different kinds of experience and tasks.[1] In the supervised picture used so far, examples pair inputs with target labels. Other settings use different signals: unsupervised methods work without supplied task labels, and reinforcement-learning agents select actions and learn from outcomes or reward signals.[1] Some language-model pre-training procedures derive a prediction target from the text itself, as in the BERT example below.[2]

These are descriptions of training signals, not a ranking of approaches or a menu that every system must follow. Each choice changes what the learning procedure can adjust toward, and none of them by itself answers whether the resulting behavior is useful for a particular task. HAC keeps the supervised workflow in view here so that data, objective, optimization, and evaluation remain distinguishable.

Conceptual diagram

Conceptual comparison of supervised, unsupervised, text-derived and reinforcement-learning signals framed as different training signals rather than a universal menu.
Conceptual view: different signals define different learning problems; none answers usefulness by itself.
Diagram: Hidden AI Concepts

Deep dive

Data, Models, and Parameters

Data provides the examples on which a learning procedure operates. In the supervised scikit-learn workflow cited above, the examples have input features and target labels.[5] The travel-time scenario in this article is an original illustration of that pattern, not a general definition of all supervised data. A model maps inputs to predictions, and a parameter is a value within that model that affects the prediction.

For a simple linear model, the prediction can be formed by multiplying input features by adjustable weights and combining the results. Goodfellow and colleagues use linear regression to illustrate that parameters control a system’s behavior: changing a weight changes how much its corresponding feature contributes to the output.[1] The example is intentionally simple. More complex models can have many parameters and more elaborate computations, but the linear example is not a template that every model follows.

In the journey illustration, inputs might include route length and a measure of traffic, while the target is a recorded travel time. A model with one weight for each input could combine them to estimate a time. The weights are not the records themselves: they are values used by the model when it turns an input into a prediction. The examples supply information used to adjust those values.

The distinction matters because “the model learned the data” can be misleading. The dataset supplies examples, parameters are values used by the model, and the learning procedure describes how those values are adjusted. Behavior on new inputs depends on the model, data, task, and evaluation—not simply the number of examples.

Conceptual diagram

Conceptual travel-time example showing input features and target labels, adjustable weights in a simple model, and a prediction compared with the target.
Conceptual view: the examples supply information; the weights are values the model uses to turn an input into a prediction.
Diagram: Hidden AI Concepts

Deep dive

Objectives and Optimization

A learning procedure needs a criterion for judging candidate predictions or parameter settings. In this article’s travel-time illustration, imagine a cost that assigns a numerical penalty to predictions that differ from their targets. This is a simplified teaching example, not a claim about particular formulas used across tasks.

An optimization procedure searches for parameter values that improve the chosen criterion. Goodfellow and colleagues describe learning algorithms using a model, cost function, optimization procedure, and data, while their examples show how these pieces work together.[1] Not every learning method uses the same objective or search procedure.

In this teaching example, an optimizer can adjust weights to reduce the chosen cost on training examples. This does not show that the model will predict real journeys accurately; that depends on the data, model, objective, and evaluation.

The objective is a formal criterion within a particular procedure. It is not automatically identical to every broader human purpose someone may have for a system. That distinction is an editorial caution from HAC, not a specific conclusion established by the cited passage. If the measured criterion is narrow, performance on it alone cannot answer every question about whether the system is appropriate for a wider use.

Optimization therefore answers a limited question: which parameter settings score better under this objective and data? It does not by itself establish how a model behaves on unseen cases. A concrete training method helps make that distinction visible.

Deep dive

How Optimization Moves Parameters

Optimization searches for parameter settings that score better under a chosen cost. Nielsen describes learning with gradient descent as repeated small adjustments guided by how the cost changes when parameters change.[6] The gradient describes how the cost changes for small changes in the parameters; taking steps against that direction can reduce the cost when each step is small enough. A learning rate controls how large each adjustment is.

The image of walking down a slope is useful, but it is still a simplification: practical objectives can involve many parameters and complicated landscapes. Nielsen notes that learning can be slow when the gradient is small, so the number of steps and the step size both matter.[6] Repeating the adjustment changes the parameters, not the training examples themselves. These practical choices do not tell us whether the resulting model will perform well on unseen examples, which matches the earlier caution that optimizing a measured criterion is not the same as demonstrating usefulness beyond it.

Conceptual diagram

Conceptual optimization loop showing prediction, cost scoring, a gradient that describes how cost changes with parameters, and small learning-rate-scaled steps that repeat.
Conceptual view: optimization changes parameters under a cost; it does not prove unseen performance.
Diagram: Hidden AI Concepts

Deep dive

A Specific Example: BERT’s Masked Language Modelling

BERT provides one specific example of a training objective. In the 2018 version cited here, Devlin and colleagues describe masked language modelling as part of BERT’s pre-training. The method selects some tokens in a text and trains the model to predict the original token IDs using the surrounding context.[2]

The paper’s procedure selects 15% of the WordPiece tokens at random for prediction. Of those selected positions, 80% are replaced with [MASK], 10% with a random token, and 10% are left unchanged. The model is trained to predict the original token at each selected position. The random-replacement and unchanged cases are part of the authors’ described procedure; they do not change the prediction target.[2]

As a simplified illustration, imagine the sentence “A small bird crossed the garden,” with one selected word hidden. The training target would be the original word at that position, and the model would use the available context when making its prediction. This sentence is a didactic example, not a quotation or experiment from the paper.

The important boundary is that this is BERT’s particular pre-training method as described in the cited version. It shows one way to define a learning objective for a language model; it does not show that all AI models predict masked words, use the same token proportions, or learn with BERT’s procedure. For the rest of the article, the focus returns to a more general supervised evaluation workflow.

Conceptual diagram

Conceptual illustration of BERT masked-token training with 15 percent of tokens selected and 80, 10 and 10 percent treatments, with the original token as target.
Conceptual view: one particular objective from the cited paper, not a universal method.
Diagram: Hidden AI Concepts

Deep dive

Neural Networks and Backpropagation (Conceptual)

Neural networks provide one way to make the model more elaborate than the linear example above. Nielsen describes a network as layers of units with weights and biases: each layer transforms the previous layer’s activations, and the final layer produces the output used by the cost.[7] This is a conceptual description of a particular family of models, not a claim that every model has this structure.

Training such a network still needs the gradient of the cost with respect to its weights. Nielsen explains that backpropagation computes those gradients by applying the chain rule backward from the output through the layers, and then uses them in a gradient-descent update.[7] The name refers to the direction in which error information moves during the computation, not to a separate learning objective. This connects back to the earlier distinction: the objective scores predictions, optimization changes parameters, and backpropagation is one method for obtaining gradients that an optimization procedure can use. It does not add a guarantee about generalization.

Conceptual diagram

Conceptual neural network with input, hidden layers and output, showing activations moving forward and gradients moving backward through the layers.
Conceptual view: one family of models; backpropagation supplies gradients, not a generalization guarantee.
Diagram: Hidden AI Concepts

Deep dive

Training, Validation, Testing, and Inference

These terms refer to different roles in a common supervised-learning workflow:

  • Training is the process of fitting a model or estimator to training examples. In the scikit-learn example, fit is called on the training portion of a dataset.[5]
  • Validation supplies evidence used while choosing model settings, such as hyperparameters. Goodfellow and colleagues describe validation sets as a way to assess hyperparameter choices; the scikit-learn guide also explains model selection and cross-validation.[1] [3]
  • Testing evaluates a chosen model on data held apart from fitting. In the standard workflow described by scikit-learn, the test data should not be used as though it were another training set. Repeatedly making choices based on test results risks adapting decisions to that test set and weakening its value as an independent evaluation.[3]
  • Inference, in the practical example here, means using a fitted estimator to produce predictions for inputs. Scikit-learn’s Getting Started guide demonstrates fitting a pipeline on training data and then calling predict on test inputs.[5]

These stages differ in how the data is used: training examples fit the estimator, validation guides choices, and test examples evaluate the selected model. Procedures vary, but scores do not all provide equally independent evidence.

The fit/predict example illustrates a supervised-learning library, not a universal definition of inference. Here, inference means using a fitted estimator to make predictions, distinct from fitting it.

Even a separated test set provides evidence only about the data and task represented by its evaluation. This makes it important to distinguish memorization, overfitting, and generalization.

Conceptual diagram

Conceptual supervised workflow showing training, validation, testing and inference as distinct roles for data, including fit and predict.
Conceptual view: the same examples do not play the same role in every stage.
Diagram: Hidden AI Concepts

Deep dive

Memorization, Overfitting, and Generalization

A low training error means that a model’s predictions fit the training examples according to the chosen measure. It does not, on its own, show that the model will perform well on new examples. Goodfellow and colleagues distinguish training error from generalization error: the latter concerns expected performance on previously unseen examples drawn from the relevant data distribution. They explain why performance must be considered beyond the training data.[1]

Overfitting describes a mismatch in which a model fits the training data well but performs less well on held-out or new data. The scikit-learn guide illustrates the risk directly: fitting and evaluating on the same data can reward a model that repeats what it has seen, without showing that it can predict useful results for unseen samples.[3] Its validation-curve discussion also gives a polynomial-regression example in which a model can fit training points very closely while doing worse at capturing the underlying function.[4]

These examples explain why train/test separation and validation matter. A gap between scores can have different causes, and one split is not a complete picture. As a methodological caution from HAC, a test set that poorly represents the intended task may provide limited evidence about performance on that task.

Here, “memorization” is used descriptively for retaining or reproducing training examples; the term alone does not diagnose how a model will perform. Overfitting refers to fitting training data well while performing less well on held-out or new data, whereas generalization concerns performance on previously unseen examples in the relevant setting.[1] [3] These concepts are related but not interchangeable. The sources cited here discuss overfitting and generalization; they do not establish whether, how much, or under what conditions every model memorizes.

Generalization is a property to evaluate, not a guarantee from optimization. A model may perform well on a particular held-out set yet have limitations beyond what it tested. The sources support a distinction between training and unseen examples in the described setting, not claims about every change in data or use.

The practical question is what evidence shows that a model performs beyond its training examples. Validation and testing help when their roles remain distinct, but a limited evaluation cannot prove universal reliability.

Conceptual diagram

Conceptual comparison of low training error, overfitting as a score gap, and generalization as performance on unseen examples.
Conceptual view: related but not interchangeable concepts — fit is not evidence of generalization.
Diagram: Hidden AI Concepts

Deep dive

Conclusion

In a common supervised-learning picture, examples inform a model; an objective scores predictions; and optimization adjusts parameters. Validation helps guide choices, testing evaluates a selected model on held-aside data, and inference applies the fitted estimator to inputs. BERT’s masked language modelling is one specific illustration of how an objective can be designed—not a universal account of AI learning.

Most importantly, improving a training objective is not the same as demonstrating success on new examples. Claims about learning, memorization, and generalization should remain tied to the model, task, data, and evaluation that support them.

Deep dive

References

  1. Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning. MIT Press, Chapter 5, “Machine Learning Basics.” Official chapter text.
  2. Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2018). “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding.” arXiv:1810.04805v1, §3.3.1. Version 1.
  3. scikit-learn developers. “Cross-validation: evaluating estimator performance.” scikit-learn 1.8.0 User Guide, §3.1. Documentation (accessed 2026-10-18).
  4. scikit-learn developers. “Validation curves: plotting scores to evaluate models.” scikit-learn 1.8.0 User Guide, §3.5. Documentation (accessed 2026-10-18).
  5. scikit-learn developers. “Getting Started.” scikit-learn 1.8.0 User Guide. Documentation (accessed 2026-10-18).
  6. Nielsen, M. (2019). “Using neural nets to recognize handwritten digits,” Chapter 1 of Neural Networks and Deep Learning. Chapter text (accessed 2026-11-24).
  7. Nielsen, M. (2019). “How the backpropagation algorithm works,” Chapter 2 of Neural Networks and Deep Learning. Chapter text (accessed 2026-11-24).

Continue exploring

Explore the broader topics connected to this article.

Continue with these related articles.

Continue exploring related ideas and concepts.

Continue reading

Continue exploring Hidden AI Concepts.

Recent editorial content

Discover more of the latest editorial content.