Three kinds of feedback, and three quite different problems.
π Where this lives: the three paradigms differ in what the world tells you, and that single difference determines everything else. A spam filter is told the right answer for every example; a customer-segmentation system is told nothing and must find structure; a game-playing agent is told only whether it eventually won. Recognising which situation you are actually in is the first design decision, and getting it wrong means choosing a method that cannot work. Search "supervised unsupervised reinforcement learning differences".
UNSUPERVISED LEARNING: the training data has NO LABELS. The
learner must find STRUCTURE in the data itself.
training data: {xβ, xβ, β¦, xβ}
goal: a useful description of the structure
THE DIFFICULTY IS THAT THERE IS NO DEFINITION OF CORRECT. With
supervised learning you can measure error against the true
label; here there is nothing to compare against, so evaluation
is intrinsically harder and often requires a human to judge
whether the discovered structure is meaningful.
THE TASKS:
CLUSTERING β group similar instances
k-MEANS: choose k, assign each point to the nearest of k
centroids, recompute the centroids, repeat until stable.
β simple and fast
β you must CHOOSE k in advance, it assumes roughly
spherical clusters of similar size, and it is sensitive
to the initial centroids
HIERARCHICAL CLUSTERING: build a tree by repeatedly merging
the closest pair (agglomerative) or splitting
(divisive). No k required β you cut the tree where you
like.
DBSCAN: density-based, finds clusters of arbitrary shape and
labels sparse points as noise. No k required.
WORKED k-MEANS ON ONE DIMENSION, to show the mechanism:
data: 2, 3, 4, 10, 11, 12, k = 2
initial centroids: 2 and 3 (a bad choice, deliberately)
assign: {2} to cβ=2; {3,4,10,11,12} to cβ=3
recompute: cβ = 2, cβ = (3+4+10+11+12)/5 = 8
assign: {2,3,4} to cβ=2; {10,11,12} to cβ=8
recompute: cβ = 3, cβ = 11
assign: unchanged β CONVERGED
FINAL CLUSTERS {2,3,4} and {10,11,12}, centroids 3 and 11.
It recovered the obvious structure despite a poor start β
but a different initialisation can converge to a worse
answer, which is why k-means is normally run several times.
DIMENSIONALITY REDUCTION β find a lower-dimensional
representation preserving what matters
PRINCIPAL COMPONENT ANALYSIS (PCA) finds the directions of
greatest variance and projects onto them.
WHY IT MATTERS: the CURSE OF DIMENSIONALITY. As dimensions
increase, data becomes sparse and distances become
uninformative β every point is roughly equidistant from
every other, which destroys any method relying on
similarity.
ASSOCIATION RULE MINING β find co-occurrence patterns
"customers who buy bread and butter also buy milk"
Measured by SUPPORT (how often the combination occurs) and
CONFIDENCE (how often the consequent follows the
antecedent). The Apriori algorithm is the classic method.
ANOMALY DETECTION β identify instances unlike the rest
Useful precisely where labels are unavailable because the
anomalies are rare and varied β fraud, intrusion, equipment
failure.
DENSITY ESTIMATION β model the distribution the data came from,
which then supports generation of new samples.
Reinforcement learning, and choosing between the three
REINFORCEMENT LEARNING (RL): the learner is an AGENT taking
ACTIONS in an ENVIRONMENT and receiving a REWARD. No correct
action is ever given β only a signal about how well things went.
the agent observes a STATE s
takes an ACTION a
receives a REWARD r and a new state sβ²
goal: learn a POLICY Ο mapping states to actions that
maximises CUMULATIVE reward
THIS IS EXACTLY THE AGENT OF ACtE0901 WITH LEARNING ADDED, and
the components map directly: the reward is the performance
measure, the policy is the agent function, and the critic of the
learning-agent architecture is what supplies the reward.
THE THREE DIFFICULTIES THAT MAKE RL DISTINCT:
1. DELAYED REWARD (the CREDIT ASSIGNMENT problem)
The reward may arrive long after the action that caused it.
A chess game is won or lost at move 60; which of the
earlier moves deserves the credit?
THE STANDARD SOLUTION: learn a VALUE FUNCTION V(s)
estimating the expected future reward from state s, so
intermediate states acquire values and the learner gets a
signal at every step rather than only at the end.
2. THE EXPLORATIONβEXPLOITATION TRADE-OFF
EXPLOIT the best-known action to earn reward now, or EXPLORE
an untried action that might be better?
Pure exploitation locks in the first adequate strategy
found; pure exploration never earns anything.
THE STANDARD APPROACH: Ξ΅-GREEDY β take the best known
action with probability 1βΞ΅, and a random action with
probability Ξ΅, often decaying Ξ΅ over time so the agent
explores early and exploits later.
THIS IS THE PROBLEM GENERATOR of the learning-agent
architecture from ACtE0901, given a mechanism.
3. THE ENVIRONMENT MAY BE UNKNOWN
MODEL-FREE methods learn the policy or value function
directly from experience without ever modelling the
environment β Q-learning is the standard example.
MODEL-BASED methods learn the transition model and then
plan with it. More sample-efficient, and dependent on the
model being right.
Q-LEARNING, the canonical algorithm, and the update rule is
worth knowing:
Q(s, a) β Q(s, a) + Ξ± [ r + Ξ³ Β· max_{aβ²} Q(sβ², aβ²)
β Q(s, a) ]
where Ξ± is the LEARNING RATE and Ξ³ the DISCOUNT FACTOR
(0 β€ Ξ³ < 1) expressing how much future reward is worth
relative to immediate reward.
THE TERM IN BRACKETS IS THE TEMPORAL-DIFFERENCE ERROR: the gap
between what was predicted and what was observed plus the best
future estimate. Learning is driven by surprise.
RL'S CHARACTERISTIC WEAKNESS: SAMPLE INEFFICIENCY. It may need
millions of trials, which is acceptable in a simulator and
prohibitive on physical hardware β the sim-to-real problem from
the robotics topic.
CHOOSING BETWEEN THE THREE β the decision, and it is determined by
the feedback available rather than by preference:
WHAT THE DATA GIVES YOU USE
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
the correct answer per example SUPERVISED
no answers, and you want structure UNSUPERVISED
a reward after a sequence of REINFORCEMENT
actions
a few answers and much unlabelled SEMI-SUPERVISED
data
answers derivable from the data SELF-SUPERVISED
itself
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
THE COMPARISON TABLE:
SUPERVISED UNSUPERVISED REINFORCEMENT
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
feedback the correct none a scalar reward
label
when it immediate n/a often DELAYED
arrives
data labelled unlabelled generated by
pairs instances interaction
goal predict y find structure maximise
cumulative
reward
evaluation error against no ground total reward
the label truth
typical use classify, cluster, control, games,
predict compress sequential
decisions
main difficulty labelling no definition credit
cost of correct assignment,
sample cost
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
A WORKED SELECTION on one problem β recommending revision
topics:
SUPERVISED framing: predict, for each topic, whether the
student will answer it correctly in the exam. NEEDS exam
outcomes per topic per student, which are not collected.
UNSUPERVISED framing: cluster students by study pattern to
find types. Useful for insight, does not recommend
anything.
REINFORCEMENT framing: the recommendation is an action, the
exam mark is the delayed reward. THE CORRECT FRAMING
CONCEPTUALLY β and impractical, because one episode takes
a whole semester and you cannot run millions of them.
THE PRACTICAL ANSWER: a supervised proxy β predict retention
from tick history using data you actually have β plus
hand-written rules. THE HONEST CONCLUSION IS OFTEN A
SIMPLER PARADIGM THAN THE PROBLEM DESERVES, because the
data available decides, not the elegance of the framing.
The paradigm is chosen by the feedback available, not by preference β and the worked selection shows why that matters. Reinforcement learning is the conceptually correct framing for revision recommendation, and it is impractical because one episode takes a semester. The honest answer is often a simpler paradigm than the problem deserves.
π Go further:self-supervised learning deserves the most attention of anything in this topic, because it dissolved the constraint the rest of it is organised around. By generating labels from the data itself β masking a word and predicting it, or predicting the next frame of video β it turns unlabelled data into supervised training data at no annotation cost. That is the mechanism behind every large language model, and it explains why the field's bottleneck shifted from labels to compute almost overnight. Search "self-supervised learning masked prediction pretraining".
π‘ Exam angle: define all three paradigms by what feedback the learner receives, and compare them in a table across data, goal, evaluation and main difficulty β this comparison is the standard question. For supervised learning distinguish classification from regression and name algorithms. For unsupervised learning name the tasks β clustering, dimensionality reduction, association rules, anomaly detection β and be ready to trace k-means on a small dataset, noting that k must be chosen and initialisation matters. For reinforcement learning give the state-action-reward loop, the three difficulties (delayed reward/credit assignment, explorationβexploitation, unknown environment), and the Q-learning update rule. Mention semi-supervised and self-supervised learning as responses to labelling cost.
Syllabus points
Three learning paradigms with examples
Create a free account to tick topics off, take notes as you read, watch the video lessons and get a day-by-day study plan built around your exam date.