Module 4 — Prediction: learning patterns from the past
Lesson 7 of 16
Learning from examples
Machine learning is often described as teaching computers to learn.
But what does learning actually mean?
At its simplest:
A machine learns when examples cause its internal model to change in a way that improves its ability to make predictions.
The basic process is:
EXAMPLE
↓
MAKE PREDICTION
↓
COMPARE WITH WHAT ACTUALLY HAPPENED
↓
MEASURE ERROR
↓
ADJUST MODEL
↓
TRY AGAIN
Repeat this process across enough examples and the model can gradually learn patterns that generalise beyond the examples it has already seen.
An example contains information
Suppose we want to predict house prices.
One example might contain:
INPUTS
- floor area = 120 m²
- bedrooms = 3
- age = 20 years
- location = Dublin
and:
KNOWN OUTPUT
- sale price = €520,000
We can represent this conceptually as:
x → y
where:
x = inputs
and:
y = correct output.
The model's task is to learn a relationship between them.
One example is rarely enough
Suppose the only house we have ever observed is:
120 m² → €520,000.
What should a:
100 m²
house cost?
We do not have enough evidence.
Perhaps:
€430,000.
Perhaps:
€700,000.
Perhaps size has almost nothing to do with price.
One example tells us very little about the general relationship.
More examples reveal patterns
Now suppose we observe:
| Floor area | Sale price |
|---|---|
| 70 m² | €310,000 |
| 90 m² | €380,000 |
| 110 m² | €470,000 |
| 130 m² | €550,000 |
| 150 m² | €620,000 |
A pattern begins to emerge:
Larger houses tend to sell for more.
The model can use these examples to estimate that relationship.
Learning is not simply storing examples
Imagine a system that remembers:
70 m² → €310,000
90 m² → €380,000
110 m² → €470,000
and so on.
Now ask:
What should a 120 m² house cost?
There is no exact stored example.
A useful model must do more than remember.
It must generalise.
Generalisation is the point
The objective is:
SEEN EXAMPLES
↓
LEARN PATTERN
↓
UNSEEN EXAMPLE
↓
USEFUL PREDICTION
This is what distinguishes learning a relationship from simply memorising a dataset.
Learning means finding structure
Suppose we observe thousands of houses.
The model may discover relationships involving:
- floor area,
- location,
- age,
- transport access,
- number of bedrooms.
It is looking for structure that helps explain variation in:
sale price.
Machine learning is therefore partly about finding useful regularities in data.
But examples contain both signal and noise
Real observations are messy.
Suppose two nearly identical houses sell for:
€500,000
and:
€550,000.
Why?
Perhaps:
- one was recently renovated,
- one seller was in a hurry,
- one had a better garden,
- market conditions changed,
- some relevant information was not recorded.
The dataset contains both:
SIGNAL
and:
NOISE.
The model needs to learn the first without becoming overly sensitive to the second.
Learning from examples is an inference problem
Recall our earlier framework:
PAST
↓
OBSERVATIONS
↓
MODEL
↓
PREDICTION
The training examples are observations from the past.
From those observations, we infer a model that we hope captures something sufficiently persistent about the world.
That model is then used for new predictions.
Supervised learning
The examples we have used so far contain:
inputs
and:
known outputs.
This is called supervised learning.
Conceptually:
INPUT x
KNOWN ANSWER y
↓
LEARNING
↓
MODEL
The known answers provide the feedback needed to improve the model.
Why is it called supervised?
Imagine learning to identify animals.
You see an image.
Someone tells you:
Dog.
You see another.
Someone tells you:
Cat.
The labels provide supervision.
The machine-learning equivalent is:
IMAGE + LABEL
↓
LEARNING ALGORITHM.
Regression examples
For regression, the output is numerical.
For example:
temperature → electricity demand
house characteristics → sale price
machine sensors → remaining lifetime
Each example contains a numerical target.
Classification examples
For classification, the output is a category.
For example:
email → spam
transaction → fraud
image → cat
The model learns relationships between the inputs and these labels.
The learning loop
Suppose our model predicts electricity demand.
For one training example:
Temperature = 5°C
Actual demand = 42 GW
The model predicts:
38 GW.
So:
PREDICTION = 38 GW
ACTUAL = 42 GW
The model is wrong.
That error provides information.
Error drives learning
Conceptually:
INPUT
↓
MODEL
↓
PREDICTION
↓
COMPARE WITH TARGET
↓
ERROR
↓
UPDATE PARAMETERS
The model changes because the prediction did not match the observed outcome.
Without some notion of error, there is no direction for learning.
Try again
After updating its parameters, the model might now predict:
40 GW.
Still wrong.
But closer.
Another update might produce:
41.5 GW.
The model is gradually adjusting itself to reduce error.
Learning usually happens across many examples
A model should not adjust itself merely to perfectly fit one observation.
Suppose:
Example 1 says increase parameter
but:
Example 2 says decrease parameter.
The learning algorithm must find parameter values that work reasonably well across the training dataset.
So the real objective is something like:
Find parameters that minimise error across many examples.
The dataset defines the learning experience
Suppose we train a model to recognise dogs.
Its training data contains:
100,000 images of golden retrievers
and:
10 images of greyhounds.
The model's experience of the concept:
dog
is highly uneven.
It may become excellent at recognising golden retrievers and poor at recognising greyhounds.
Examples are not neutral
Recall Module 2.
A dataset reflects decisions about:
- what was measured,
- who was included,
- where data was collected,
- when it was collected,
- what labels were assigned.
The model learns from those choices.
So:
Learning from examples also means learning from the limitations of those examples.
The model cannot learn evidence it never receives
Suppose a disease behaves differently in:
children
and:
adults.
But the training dataset contains only adults.
The model has no direct evidence about children.
It may still produce a prediction for a child.
But that prediction involves extrapolation beyond its training experience.
Examples define the model's experience of reality
A useful analogy is:
Training data is the model's experience of the world.
Humans experience only a tiny fraction of reality.
Models do too.
The difference is that we can inspect and deliberately construct much of a model's experience.
Repetition matters
Suppose one type of example appears:
1,000,000 times.
Another appears:
100 times.
The first can have much greater influence on learning.
Frequency therefore matters.
A dataset is not merely a collection of possible examples.
It is also a distribution over examples.
Learning follows the distribution
Suppose:
99% of examples are ordinary conditions
and:
1% are extreme conditions.
A model optimising average performance may focus heavily on ordinary conditions.
But perhaps the extreme 1% is exactly where prediction matters most.
For example:
- grid emergencies,
- equipment failures,
- serious diseases.
The learning objective must reflect what we care about.
Not every example needs equal importance
We can assign different weights to examples.
Suppose:
ordinary observation → weight 1
critical failure → weight 10.
The critical example now contributes more strongly to the learning objective.
This is one way of telling the model:
Some mistakes matter more than others.
Learning requires an objective
The model cannot simply be told:
Learn.
We need to define what improvement means.
For example:
reduce prediction error
or:
increase classification accuracy.
This requires a mathematical objective.
Usually that involves a loss function.
The loss function defines what counts as wrong
Suppose a house-price model predicts:
€500,000
when the actual value is:
€520,000.
The prediction error is:
€20,000.
But how should that error affect learning?
We could use:
- absolute error,
- squared error,
- percentage error.
Each treats mistakes differently.
Learning therefore contains a design choice
Before the machine can learn, somebody must decide:
What counts as being wrong?
That decision influences:
which parameter values the model learns.
So machine learning is not simply:
DATA → TRUTH.
It is closer to:
DATA
MODEL
OBJECTIVE
↓
LEARNING
↓
PARAMETERS.
A different objective can produce a different model
Suppose two models use:
- identical training data,
- identical architecture.
Model A strongly penalises:
large errors.
Model B treats errors more evenly.
They may learn different parameter values.
Neither dataset changed.
The definition of success changed.
Learning can therefore encode priorities
Imagine an electricity forecasting model.
Suppose:
underprediction
is much more dangerous than:
overprediction.
A loss function can penalise underprediction more heavily.
Now the model learns according to the operational consequences of its mistakes.
This begins to connect prediction with decision-making.
Batch learning
One approach is to give the learning algorithm the entire training dataset when calculating an update.
This is sometimes called batch gradient descent.
Conceptually:
ALL TRAINING EXAMPLES
↓
CALCULATE OVERALL ERROR
↓
UPDATE PARAMETERS.
This can be computationally expensive for very large datasets.
Stochastic learning
At the opposite extreme, we could update the model after individual examples.
Conceptually:
EXAMPLE 1 → UPDATE
EXAMPLE 2 → UPDATE
EXAMPLE 3 → UPDATE
and so on.
This introduces randomness into the learning trajectory.
Mini-batches
Modern machine learning commonly uses mini-batches.
Instead of one example or the entire dataset, we use a small group.
For example:
256 EXAMPLES
↓
MAKE PREDICTIONS
↓
CALCULATE LOSS
↓
UPDATE PARAMETERS
↓
NEXT 256 EXAMPLES.
This is computationally efficient and works well with modern hardware.
An epoch
Suppose the training dataset contains:
1 million examples.
When the learning algorithm has processed all one million once, it has completed:
one epoch.
Training may involve many epochs.
So:
EPOCH 1
↓
EPOCH 2
↓
EPOCH 3
↓
...
The model sees the training data repeatedly while refining its parameters.
Why see the examples more than once?
One pass may not be enough to find useful parameter values.
The first epoch might produce large improvements.
Later epochs refine the model further.
But eventually repeated exposure can create a danger:
overfitting.
The model may become increasingly specialised to the training examples.
Learning curves
We can monitor performance as training progresses.
For example:
| Epoch | Training loss | Validation loss |
|---|---|---|
| 1 | 12.0 | 13.0 |
| 5 | 7.0 | 8.0 |
| 10 | 4.0 | 5.0 |
| 20 | 2.0 | 5.5 |
| 40 | 1.0 | 8.0 |
Initially:
training and validation improve.
Later:
training continues improving
but:
validation gets worse.
The model may be overfitting.
More learning is not always better
This is an important point.
If learning simply meant:
reduce training error as much as possible,
we could keep training indefinitely.
But our real objective is:
generalisation.
So sometimes the correct action is:
Stop training even though training performance could continue improving.
Early stopping
One technique is early stopping.
We monitor performance on validation data.
When validation performance stops improving, we stop training.
Conceptually:
TRAINING IMPROVES
↓
VALIDATION IMPROVES
↓
VALIDATION STOPS IMPROVING
↓
STOP.
This can reduce overfitting.
Learning from examples means finding regularities
Suppose a vision model sees thousands of cat images.
No programmer explicitly tells it:
- cats have particular ear shapes,
- certain facial structures,
- certain textures.
The model discovers statistical patterns that help predict:
cat.
This is one of the powerful features of machine learning.
Traditional programming and machine learning
Traditional programming often looks like:
RULES + DATA
↓
OUTPUT.
For example:
IF temperature < 0 THEN freezing = true.
A human writes the rule.
Machine learning reverses part of this process:
DATA + EXAMPLES OF OUTPUTS
↓
LEARNING
↓
RULE-LIKE MODEL.
The system infers a predictive function from examples.
The learned rule may be too complicated to write down
A linear regression might produce a simple equation.
A deep neural network may learn a function involving:
billions of interacting parameters.
The function can still be evaluated.
But it may be impossible to summarise as a short human-readable rule.
Learning representations
Modern machine learning often learns more than the final prediction.
It also learns useful internal representations.
Suppose a neural network receives images.
Early layers might respond to patterns resembling:
- edges,
- textures.
Later layers may combine these into richer structures.
The representation itself is learned from examples.
Feature engineering versus representation learning
Traditional machine learning often relied heavily on humans deciding useful features.
For example:
IMAGE
↓
human-designed:
- edges,
- shapes,
- textures
↓
CLASSIFIER.
Deep learning increasingly allows:
RAW IMAGE
↓
LEARN REPRESENTATION
↓
CLASSIFY.
The model learns both useful representations and the final prediction function.
Learning from examples can discover unexpected predictors
Suppose a model predicts equipment failure.
Humans expect:
temperature
to matter most.
But the model discovers that a subtle vibration pattern is highly predictive.
This can reveal relationships that humans had overlooked.
That is one reason machine learning can be valuable.
But useful prediction does not mean useful explanation
Suppose the vibration pattern predicts failure extremely well.
We still do not necessarily know:
why.
The model may have discovered a correlation without identifying the causal mechanism.
Again:
PREDICTION ≠ CAUSATION.
Shortcut learning
Sometimes the model discovers a predictive pattern we did not want.
Suppose we train a model to classify:
wolves
and:
dogs.
Most wolf images happen to contain:
snow.
The model may learn:
snow → wolf.
It performs well on the training examples.
But it has learned a shortcut.
Why shortcuts happen
The model is not automatically asking:
What is the concept humans really care about?
It is asking something closer to:
What patterns help reduce my loss?
If background snow reduces classification error, the learning algorithm may use it.
The model optimises what we measure
This gives us a fundamental principle:
The model does not know our intention. It knows the objective we give it and the evidence contained in the data.
If those do not accurately represent what we want, the model can learn the wrong thing extremely effectively.
More examples can expose shortcuts
Suppose we add:
- wolves without snow,
- dogs in snow.
Now:
snow
is no longer a reliable shortcut.
The model must find other predictive features.
Better examples can therefore change what the model learns.
Diversity matters
A useful training dataset should expose the model to relevant variation.
For a road-vision system, that might include:
- day,
- night,
- rain,
- snow,
- different road types,
- different vehicles,
- different pedestrians.
The model cannot learn robustly from conditions it never experiences.
Data augmentation
Sometimes we deliberately create variations of existing examples.
For images, we might:
- crop,
- rotate,
- change brightness.
These transformed examples teach the model that certain changes should not alter the label.
This is called data augmentation.
Data augmentation encodes assumptions
Suppose we rotate an image of a cat slightly.
It is still a cat.
So rotation is a sensible augmentation.
But not every transformation preserves meaning.
For some tasks:
orientation matters.
Data augmentation therefore contains assumptions about which changes should leave the prediction unchanged.
Synthetic examples
Examples do not always need to come directly from observations.
We can generate synthetic data using:
- simulations,
- physical models,
- generative models.
For example, autonomous-vehicle systems can train on simulated road scenes.
This can expose models to situations that are:
- rare,
- dangerous,
- expensive to collect.
Synthetic data inherits assumptions
A simulation is a model of reality.
If the simulation misses something important, the learner may inherit that limitation.
So:
SYNTHETIC DATA
is not:
PERFECT DATA.
It is evidence generated from another model.
Learning from human examples
Many AI systems learn from human-generated examples.
For instance, humans may provide:
- labels,
- demonstrations,
- rankings,
- preferred responses.
The AI then learns patterns from human judgement.
This means human preferences can become part of the training signal.
Human labels can disagree
Suppose people classify online comments as:
toxic
or:
not toxic.
Different annotators may disagree.
The disagreement may reflect:
- ambiguity,
- culture,
- context,
- personal judgement.
There may not always be one objectively correct label.
Disagreement contains information
Instead of forcing one label, we might record:
70% of annotators say toxic
30% say not toxic.
This preserves uncertainty.
Again, uncertainty does not necessarily mean the dataset is defective.
It may accurately represent disagreement in the world.
Learning from noisy examples
Training data often contains:
- measurement error,
- missing values,
- incorrect labels.
Machine-learning systems can still learn useful patterns.
Perfect data is rarely required.
The important question is:
How much uncertainty and error exists, and how should the model represent or tolerate it?
Repeated examples can create imbalance
Suppose a dataset contains the same common situation millions of times.
The model may become extremely good at that situation.
Rare cases may contribute little to the total loss.
We may need to:
- resample,
- reweight,
- collect more rare examples.
The composition of training data affects what gets learned.
Curriculum learning
Humans often learn:
easy concepts first
then:
harder concepts.
Some machine-learning systems use a similar idea.
Training examples can be presented in a deliberate progression.
This is called curriculum learning.
The order of learning can sometimes affect the final model.
Hard-example mining
We can also deliberately focus training on examples the model finds difficult.
Conceptually:
TRAIN MODEL
↓
FIND COMMON FAILURES
↓
COLLECT / EMPHASISE THOSE EXAMPLES
↓
TRAIN AGAIN.
This creates a feedback loop between evaluation and data collection.
Active learning
Suppose labels are expensive.
Instead of labelling random examples, the model can identify observations where it is especially uncertain.
Humans then label those cases.
This is active learning.
Conceptually:
UNLABELLED DATA
↓
MODEL IDENTIFIES MOST INFORMATIVE EXAMPLES
↓
HUMAN LABELS THEM
↓
MODEL LEARNS.
The system helps decide which evidence it should acquire next.
Not all examples are equally informative
Suppose a classifier already knows with near certainty that an image is a cat.
Another image lies exactly near the decision boundary:
cat = 51%
dog = 49%.
The second example may teach the model much more about where the boundary should lie.
So:
The informational value of an example depends on what the model already knows.
This connects to conditional information
Recall conditional probability.
The value of new evidence depends on:
our current information.
An observation that tells us something we already know adds little.
An observation that distinguishes between plausible alternatives can be extremely valuable.
Learning is therefore inherently stateful.
The same example can have different value at different times
Early in training, a basic example may be very informative.
Later, after the model has mastered that pattern, seeing the same example again may add little.
Meanwhile, unusual boundary cases may become increasingly valuable.
So the value of data is not necessarily fixed.
More data is not always equally valuable
Suppose we have:
1 million examples.
Adding another:
100,000 almost identical examples
may provide little improvement.
Adding:
1,000 carefully selected examples from previously unseen conditions
might improve the model substantially.
So:
DATA VOLUME ≠ INFORMATION VALUE.
Examples can interact
Suppose Feature A and Feature B each provide some information.
Their usefulness may depend on what else the model has already observed.
Similarly, one training example may become informative only in combination with others.
Learning emerges from the structure across the dataset.
Learning can be offline
Many models are trained using a fixed historical dataset.
Conceptually:
COLLECT DATA
↓
TRAIN MODEL
↓
FREEZE PARAMETERS
↓
DEPLOY.
This is offline learning.
The model does not continuously change during normal operation.
Learning can be online
Other systems update as new examples arrive.
Conceptually:
OBSERVE
↓
PREDICT
↓
OBSERVE OUTCOME
↓
LEARN
↓
UPDATE MODEL
↓
REPEAT.
This is online learning.
Online learning makes the model stateful
The prediction made tomorrow may depend not only on tomorrow's input but also on:
what the model learned today.
The learning process now evolves through time.
This connects directly to our earlier discussion of state.
The model can influence its own future examples
This becomes especially interesting when predictions cause actions.
Suppose a recommendation system predicts:
This user will like Video A.
It recommends Video A.
The user watches it.
That interaction becomes new training data.
Now:
PREDICTION
↓
ACTION
↓
CHANGES WHAT USER SEES
↓
NEW BEHAVIOUR
↓
NEW DATA
↓
NEW LEARNING.
The model helps create its own future examples.
Learning systems can become reflexive
This occurs in:
- recommendation systems,
- financial markets,
- traffic routing,
- electricity markets,
- social media.
The learner is no longer observing a passive world.
Its actions alter the environment generating the next dataset.
This complicates the idea of ground truth
Suppose a recommendation system does not show Video B.
The user never gets the opportunity to watch it.
We observe:
Video A → watched.
But we do not observe:
What would have happened if we had shown Video B?
This is a counterfactual.
Learning from decisions creates missing counterfactual information.
Learning from actions requires exploration
Suppose a system always chooses what it currently thinks is best.
It may never discover better alternatives.
Sometimes it must deliberately try uncertain options.
This creates the classic tension:
EXPLOIT
what currently seems best
versus:
EXPLORE
to learn more.
This becomes central to reinforcement learning.
Supervised learning assumes examples already exist
In supervised learning, we usually begin with:
input-output examples.
But in interactive systems, the agent may need to create useful examples through action.
That changes the problem fundamentally.
Learning becomes intertwined with decision-making.
Unsupervised learning
Not all learning requires labelled outputs.
Suppose we have millions of observations but no labels.
A model may still learn structure such as:
- clusters,
- similarities,
- representations.
This is broadly called unsupervised learning.
Conceptually:
INPUT DATA
↓
FIND STRUCTURE
without being given an explicit correct output for every example.
Clustering
Suppose customer behaviour naturally forms several groups.
A clustering algorithm might discover:
Group A
Group B
Group C.
Nobody supplied those group labels beforehand.
The algorithm identified structure in the data.
Representation learning
A model may learn to transform complex inputs into useful internal representations.
For example:
IMAGE
↓
VECTOR REPRESENTATION.
Images with similar content may end up close together in this representation space.
This becomes extremely important in modern AI.
Self-supervised learning
Modern AI often uses self-supervised learning.
Instead of humans providing every label, the data itself creates the prediction task.
For language:
previous words → predict next word.
The text provides both:
input
and:
target.
A simple language example
Suppose the training text contains:
The cat sat on the mat.
We might give the model:
The cat sat on the
and ask it to predict:
mat.
The correct next token already exists in the text.
No human needed to label:
The answer is "mat".
The data supervises itself.
Self-supervision changed AI
The internet contains enormous amounts of:
- text,
- images,
- video,
- audio.
Human labelling at that scale would be extraordinarily expensive.
Self-supervised learning allows models to learn from vast quantities of raw data.
This is one of the foundations of modern foundation models.
Learning by prediction
This creates an elegant connection to the course.
A model can learn representations of the world by repeatedly trying to predict missing or future information.
Conceptually:
OBSERVE PART OF DATA
↓
PREDICT ANOTHER PART
↓
COMPARE WITH WHAT ACTUALLY EXISTS
↓
UPDATE PARAMETERS.
Prediction itself becomes the learning mechanism.
Language models learn from examples at enormous scale
A language model sees vast numbers of sequences.
Repeatedly:
CONTEXT
↓
PREDICT NEXT TOKEN
↓
COMPARE WITH ACTUAL NEXT TOKEN
↓
UPDATE PARAMETERS.
Do this across enormous datasets and the model becomes increasingly good at modelling the statistical structure of language.
A modest objective can produce rich behaviour
The training objective may sound simple:
Predict the next token.
Yet doing that well can require learning patterns related to:
- syntax,
- semantics,
- facts,
- relationships,
- reasoning structures,
- human behaviour.
Complex capabilities can emerge from learning to solve a seemingly simple prediction task at enormous scale.
Learning from examples does not mean copying humans exactly
A model may combine patterns across huge numbers of examples.
It can sometimes produce outputs that did not appear exactly in its training data.
Generalisation allows:
new combinations
of learned structure.
This is why generative models can produce novel outputs.
But examples still constrain what can be learned
A model trained entirely on historical human-produced data inherits:
a historical evidence base.
That includes:
- knowledge,
- creativity,
- mistakes,
- biases,
- contradictions.
Training data shapes the space from which the model learns.
Human feedback adds another kind of example
Suppose a language model generates two answers.
A human says:
Answer A is better than Answer B.
That preference becomes a training example.
Now the system can learn not merely:
what text tends to come next
but:
what outputs humans tend to prefer.
Demonstrations
Humans can also provide examples of desired behaviour.
For example:
QUESTION
↓
IDEAL ANSWER.
A model can learn from many such demonstrations.
This is one way models can be fine-tuned for particular tasks.
Learning preferences is not the same as learning truth
Suppose humans prefer answers that are:
- confident,
- concise,
- persuasive.
A model trained purely on preference might learn those characteristics.
But:
preferred answer
is not necessarily:
true answer.
The learning objective matters.
Examples can encode values
Suppose humans rank:
Response A
above:
Response B.
That ranking reflects some judgement about:
- usefulness,
- politeness,
- safety,
- correctness.
So examples can carry not just information about the world but also:
human preferences and values.
Machine learning is therefore not value-free
Even before explicit questions of AI ethics arise, design choices already exist:
- Which examples?
- Which labels?
- Which errors matter?
- Which users matter?
- Which outcomes matter?
- Which examples receive greater weight?
Learning always occurs inside a designed system.
The learning algorithm does not know what we meant
Suppose we intend:
Build a fair hiring system.
But train the model to maximise:
agreement with historical hiring decisions.
The model learns:
Reproduce historical hiring decisions.
Those objectives are not necessarily the same.
The machine optimises the formal learning signal, not our unstated intention.
Specification matters
This is sometimes called a specification problem.
We have:
WHAT WE ACTUALLY WANT
and:
WHAT WE TOLD THE SYSTEM TO OPTIMISE.
If those differ, the system may perform extremely well according to the formal metric while producing undesirable outcomes.
Examples plus objectives define the learning problem
We can now expand our machine-learning framework.
It is not merely:
DATA → MODEL.
It is:
EXAMPLES
MODEL STRUCTURE
LOSS FUNCTION
OPTIMISATION
↓
LEARNED PARAMETERS.
Each component matters.
Learning is constrained by the model
Suppose the true relationship is nonlinear.
But our model can represent only straight lines.
No amount of training can make it learn the true nonlinear relationship.
The architecture defines what kinds of functions the learner can represent.
Learning is constrained by the data
Suppose the architecture is incredibly powerful.
But the dataset contains no examples of:
night-time driving.
The model still has limited evidence about night-time driving.
A powerful learner cannot manufacture missing evidence about the real world.
Learning is constrained by the objective
Suppose:
- architecture is excellent,
- dataset is excellent.
But the loss function rewards the wrong behaviour.
The model will learn according to that objective.
So good machine learning requires alignment between:
DATA
MODEL
OBJECTIVE
REAL-WORLD PURPOSE.
Learning is constrained by computation
Even if a perfect parameter configuration exists, finding it may require enormous computation.
Training therefore occurs under practical limits:
- time,
- memory,
- hardware,
- electricity.
Learning is a physical process running on physical machines.
Learning has a budget
Suppose more training would improve performance.
But each additional improvement requires:
- more compute,
- more energy,
- more money.
At some point we must decide:
Is the additional predictive improvement worth the resources required to obtain it?
This connects learning to economics and resource allocation.
Learning can have diminishing returns
Suppose:
1 hour of training → huge improvement
10 hours → substantial improvement
100 hours → small improvement
1,000 hours → tiny improvement.
The marginal value of additional training may decline.
The optimal stopping point depends on the application.
Learning is a process through time
Training itself has state.
At training step:
t
the model has parameters:
θ(t).
After seeing new examples and receiving an update:
θ(t+1).
So training can be viewed dynamically:
CURRENT PARAMETERS
NEW INFORMATION
↓
UPDATE RULE
↓
NEW PARAMETERS.
Learning as a state transition
This connects directly to state-space thinking.
We can think of the model parameters as part of a learning state:
θₜ
Then:
θₜ + training signal → θₜ₊₁.
The learner is itself a dynamical system.
The training trajectory matters
Two models can start from different parameter values.
They may follow different paths through parameter space.
Even if they achieve similar final performance, their internal representations may differ.
Learning is not only about the destination.
The path can matter too.
Learning from examples is an iterative feedback process
The full loop is:
CURRENT MODEL
↓
OBSERVE EXAMPLE
↓
MAKE PREDICTION
↓
MEASURE ERROR
↓
UPDATE PARAMETERS
↓
NEW MODEL
↓
NEXT EXAMPLE.
This is feedback.
The model's current state influences its prediction.
The error influences its next state.
This is why machine learning connects naturally to control
A feedback controller repeatedly:
observes
↓
compares
↓
adjusts.
A learning algorithm repeatedly:
predicts
↓
compares
↓
adjusts parameters.
They are not the same problem, but they share an important structural idea:
Use feedback to change future behaviour.
Learning can happen at several timescales
An intelligent system might contain:
Fast timescale
state updates
every millisecond.
Medium timescale
memory updates
during interaction.
Slow timescale
parameter learning
during training.
These processes all change the system, but at different speeds.
This distinction becomes important for AI agents
An agent may have:
PARAMETERS
what it learned during training
MEMORY
what it learned during previous interactions
STATE
what it currently believes about the environment
OBSERVATION
what it senses right now.
All four influence behaviour.
Modern intelligent systems increasingly combine them.
A useful learning checklist
When someone says:
The AI learned this,
ask:
- What were the examples?
- Where did they come from?
- What were the inputs?
- What were the targets?
- Who created the labels?
- Were examples representative?
- Which examples were rare?
- Which examples were repeated?
- Were examples weighted differently?
- What model structure was used?
- What loss function defined error?
- What parameters changed?
- How were they updated?
- How many times did the model see the data?
- Did training performance improve?
- Did validation performance improve?
- Did the model generalise?
- Could it have learned a shortcut?
- What evidence was absent?
- What happens when the world changes?
"Learning" is not magic.
It is a process that can be inspected.
The central idea
Learning from examples means turning:
EXPERIENCE
into:
CHANGES IN A MODEL.
The basic mechanism is:
EXAMPLE
↓
PREDICTION
↓
ERROR
↓
PARAMETER UPDATE
↓
IMPROVED MODEL.
Repeated across many examples:
DATA
↓
LEARNING
↓
PARAMETERS
↓
GENERALISABLE PATTERNS
↓
PREDICTIONS ON NEW DATA.
But the model does not simply absorb reality.
What it learns depends on:
what examples it sees
how those examples are represented
what model can represent
what counts as an error
how parameters are updated.
That gives us the next crucial question.
We have repeatedly said:
prediction → error → learning.
But how exactly should we measure that error?
Before a machine can optimise anything, we need to define:
What counts as being wrong, and how wrong is wrong?
That is the role of the loss function.