Types of Learning: Supervised, Unsupervised, Reinforcement

Imagine three learners in a room full of photographs of animals. One learner has every photo labeled "cat" or "dog." This learner must predict labels for new photos. A second learner receives the same photos with no labels at all. This learner must find structure — clusters, groupings, patterns — on their own. A third learner has no photos at all. It only has a joystick, a screen, and a score that increases when it does something good. These three situations are not variations on a theme. They are fundamentally different learning problems. They differ in data, in feedback, and in their notions of success. This taxonomy matters because it is the first decision every machine learning practitioner makes. Before choosing an algorithm, a loss function, or a neural architecture, one must ask a key question. What kind of feedback signal is available? Is there ground truth for every example? Is there some structural regularity to exploit with no labels? Or is there a reward that arrives late and depends on a sequence of decisions? Misidentifying the paradigm can cause serious problems. Trying to force a reinforcement learning problem into a supervised mold, for instance, leads to trouble. Such mistakes produce systems that are subtly or catastrophically wrong. The big picture is that "learning" is not one algorithm. It is a family of problem formulations, each with its own mathematical framework. Supervised learning is a function-approximation problem. Unsupervised learning is a density-estimation or structure-discovery problem. Reinforcement learning is a sequential decision problem under an unknown environment. Each has its own theory of what "success" means. Each also has its own family of algorithms built on top. This article delivers a precise definition of each paradigm. It covers the formal objects involved (inputs, outputs, feedback signals). It offers worked examples that make the distinctions concrete. It compares failure modes across paradigms. It also builds a bridge to the more formal treatment of learning as an optimization problem. It assumes familiarity with What Is Machine Learning. It sets up the language needed for The Formal Learning Problem and Maximum Likelihood Estimation.

Key takeaways
  • Supervised learning maps inputs to known outputs using labeled training pairs (x,y)(x, y); the goal is to generalize to unseen xx.
  • Unsupervised learning finds structure in unlabeled data — clusters, densities, low-dimensional representations — with no target output.
  • Reinforcement learning learns a policy through trial and error, guided by scalar rewards from an environment, across a sequence of decisions.
  • The key axis distinguishing the three is the feedback signal: full labels, no labels, or delayed evaluative reward.
  • Each paradigm has matching families of algorithms and loss functions: regression/classification losses, clustering/reconstruction objectives, and value/policy-gradient objectives.
  • Real systems often blend paradigms — self-supervised pretraining followed by supervised fine-tuning, or RL with a learned supervised reward model.
The core insight

The three paradigms are distinguished not by the algorithm but by what feedback the learner receives: complete labels, no labels, or delayed reward for actions taken.

The idea

A learning paradigm is defined by three things: what data the learner observes, what feedback (if any) it receives about correctness, and what object it is trying to produce at the end. These choices determine the entire mathematical formulation of the problem, independent of which specific algorithm is later used to solve it. In supervised learning, the learner is given a training set of input–output pairs

D={(x1,y1),(x2,y2),…,(xn,yn)},D = \{(x_1, y_1), (x_2, y_2), \dots, (x_n, y_n)\},

drawn from some unknown joint distribution P(X,Y)P(X, Y). The goal is to learn a function f:X→Yf: X \to Y that predicts yy from xx accurately on new, unseen inputs — this is the generalization requirement. If YY is a finite set of categories, the task is classification; if YY is continuous, it is regression. The feedback signal is direct and complete: for every training example, the correct answer is known, and a loss function L(f(xi),yi)L(f(x_i), y_i) measures how wrong the prediction was. In unsupervised learning, the learner observes only inputs {x1,…,xn}\{x_1, \dots, x_n\} drawn from P(X)P(X), with no accompanying yy. There is no "correct answer" to compare against. Instead, the learner seeks to uncover latent structure: groups of similar points (clustering), a compact representation that preserves information (dimensionality reduction), or an estimate of the probability density P(X)P(X) itself (density estimation). Because there is no ground truth, success must be defined intrinsically — by how well the model compresses, reconstructs, or explains the data — rather than by matching known labels. In reinforcement learning (RL), the learner (called an agent) interacts with an environment over a sequence of time steps. At each step tt, the agent observes a state sts_t, chooses an action ata_t according to a policy π(at∣st)\pi(a_t \mid s_t), and receives a scalar reward rtr_t along with a new state st+1s_{t+1}. Crucially, the reward is evaluative, not instructive: it tells the agent how good the outcome was, not what the correct action would have been. Rewards may also be delayed — a good move in chess may not pay off for dozens of moves — creating the credit assignment problem: figuring out which past actions deserve credit for a later reward. The goal is to learn a policy that maximizes expected cumulative reward,

E[∑t=0Tγtrt],\mathbb{E}\left[\sum_{t=0}^{T} \gamma^t r_t\right],

where γ∈[0,1]\gamma \in [0, 1] is a discount factor that weighs near-term reward more than distant reward. A fourth, hybrid category deserves mention because it appears throughout modern practice: self-supervised learning, in which labels are automatically manufactured from the unlabeled data itself (for example, predicting a masked word from surrounding context). It uses the mechanics of supervised learning — labeled pairs and a loss function — but the labels require no human annotation, blurring the line between the first two paradigms.

How it works

Rather than one algorithm, each paradigm defines a template that many specific algorithms instantiate. Below are the canonical templates, with pseudocode general enough to describe entire algorithm families (The Formal Learning Problem formalizes the supervised case with sample-complexity bounds).

Supervised learning template. Given labeled data, pick a hypothesis class H\mathcal{H} (e.g., linear functions, decision trees, neural networks), and search for the member of H\mathcal{H} that minimizes empirical loss, typically via gradient-based optimization. ``` function SUPERVISED_TRAIN(D = {(x_i, y_i)}, hypothesis_class H, loss L): initialize parameters θ for a model f_θ in H repeat until convergence or max_epochs: for each minibatch B ⊂ D: compute predictions: ŷ_i = f_θ(x_i) for (x_i, y_i) in B compute empirical loss: J(θ) = (1/|B|) Σ L(ŷ_i, y_i) compute gradient: g = ∇_θ J(θ) update: θ ← θ - η * g # η = learning rate return f_θ function SUPERVISED_PREDICT(f_θ, x_new): return f_θ(x_new) ```

Unsupervised learning template. Given unlabeled data, pick a structural objective (reconstruction error, cluster compactness, log-likelihood under a model), and optimize it without ever consulting a yy. ``` function UNSUPERVISED_TRAIN(D = {x_i}, model class M, objective J): initialize parameters θ for model m_θ in M # e.g. k cluster centers, or an autoencoder repeat until convergence or max_epochs:

# example: k-means style alternation assign each x_i to nearest current structure (e.g. nearest centroid) update structure parameters θ to better fit assigned points (e.g. recompute centroids as means) evaluate objective J(θ) on D # e.g. within-cluster sum of squares if improvement in J is below tolerance: break return m_θ ```

Reinforcement learning template. The agent repeatedly acts, observes reward, and updates its policy or value estimates from the experience of interacting with the environment. ``` function RL_TRAIN(environment, policy π_θ, num_episodes): for episode in 1..num_episodes: s ← environment.reset() trajectory ← [] done ← false while not done: a ← sample_action(π_θ, s) # explore vs exploit (s_next, r, done) ← environment.step(a) trajectory.append((s, a, r)) s ← s_next G ← 0 for (s, a, r) in reverse(trajectory): # compute returns G ← r + γ G update θ to increase probability of a in s in proportion to G # policy-gradient style update return π_θ ``` The three loops look superficially similar — initialize, iterate, update — but the source of the error signal* differs fundamentally. In supervised learning the error is L(y^,y)L(\hat y, y), computable instantly and exactly for every example. In unsupervised learning there is no yy; the "error" is an internally defined objective like reconstruction loss or cluster variance. In reinforcement learning the "error signal" is a reward that may arrive many steps after the responsible action, and the agent itself must decide which actions to try (exploration) versus which known-good actions to repeat (exploitation) — a tension absent from the other two paradigms entirely.

Figure
The three paradigms as data-flow diagrams: what the learner sees and what feedback returns
Supervised x (input) model f_θ predicts ŷ y (label) loss L(ŷ,y) exact, instant gradient updates θ Unsupervised x only model m_θ finds clusters / density internal objective (no external label) Reinforcement Agent π_θ chooses action a Environment state s, reward r s', r (delayed)

Complexity & correctness

Complexity in this context is not one number but a set of distinct resource questions, since each paradigm poses a different learning problem.

Supervised learning. For a single gradient step over a minibatch of size bb with a model of pp parameters, the cost is O(bp)O(bp) for a forward and backward pass (dominant cost typically from matrix multiplications, which for a layer of size pp can be larger depending on architecture — for a fully connected layer with pp weights this is tight; for convolutions it scales with kernel size and feature-map size, not raw parameter count). Over nn training examples and EE epochs, total training cost is O(E⋅n⋅p/b⋅b)=O(Enp)O(E \cdot n \cdot p / b \cdot b) = O(E n p) ignoring constant factors from the specific architecture. Correctness here means generalization: minimizing training loss is only useful insofar as it controls loss on the true distribution P(X,Y)P(X,Y). This is formalized later via The Formal Learning Problem and PAC-learning bounds relating training error, hypothesis-class complexity, and sample size nn; and via Maximum Likelihood Estimation for the probabilistic view of many loss functions (e.g., cross-entropy loss corresponds exactly to maximizing likelihood under a categorical model).

Unsupervised learning. Complexity depends heavily on the specific structural objective. kk-means clustering, for instance, costs O(nkd)O(n k d) per iteration for nn points in dd dimensions and kk clusters, and is only guaranteed to converge to a local optimum of the within-cluster sum of squares — a consequence of Lloyd's algorithm monotonically decreasing that objective at each reassignment-and-update step (each step is a coordinate descent on a non-convex objective, so global optimality is not guaranteed, only monotone improvement and eventual convergence to a fixed point). "Correctness" for unsupervised learning is inherently softer: there is no ground-truth label to check against, so success is judged by proxy criteria — reconstruction error, held-out log-likelihood, or downstream task performance after using the learned representation.

Reinforcement learning. Complexity is usually measured in sample complexity — how many environment interactions are needed before the policy is near-optimal — rather than pure compute. For tabular RL algorithms like QQ-learning over ∣S∣|S| states and ∣A∣|A| actions, convergence to the optimal action-value function Q∗Q^* is guaranteed under the Robbins–Monro step-size conditions (learning rate decaying appropriately, e.g. ∑αt=∞\sum \alpha_t = \infty, ∑αt2<∞\sum \alpha_t^2 < \infty) provided every state–action pair is visited infinitely often — this is a consequence of the Bellman optimality equation being a contraction mapping under the max-norm, so repeated application of the Bellman backup converges to its unique fixed point Q∗Q^*. In practice with function approximation (deep RL), no such convergence guarantee generally holds, and sample complexity can be enormous — millions to billions of environment steps for complex tasks — because the reward signal is sparse and delayed relative to supervised learning's dense, instantaneous per-example feedback. The honest tradeoff across all three: supervised learning has the strongest theoretical guarantees but requires the most expensive resource — human-labeled data. Unsupervised learning needs only raw data (cheap) but offers the weakest guarantee of "correctness," since there is no external check on whether the discovered structure is meaningful. Reinforcement learning needs no labels at all and can in principle discover novel strategies beyond what any labeler could specify, but pays for this with severe sample inefficiency and the hard credit-assignment problem across long action sequences.

Worked example

Consider a single dataset — customer purchase histories — analyzed under all three paradigms, to see how the same raw information yields three different problems. Raw data: 6 customers, each with `(age, monthly_spend, num_visits)` and, for four of them, a known label `churned` (yes/no) recorded from an actual cancellation event.

Customeragespendvisitschurned (label)
A254012No
B41152Yes
C52609No
D30101Yes
E455510? (unknown)
F28122? (unknown)

Supervised framing. Train on A–D (labeled), predict E and F. A logistic regression model learns weights on `(age, spend, visits)` to minimize cross-entropy against the four known labels. Because D and B (churned) both have low spend and low visits, while A and C (retained) have high spend and high visits, the model learns a decision boundary roughly along "low spend + low visits → churn." Applying fθf_\theta to E `(45, 55, 10)` yields predicted "No" (matches the retained pattern); applying it to F `(28, 12, 2)` yields predicted "Yes." This is classic classification: exact labels exist for training, and the goal is accurate prediction on new points.

Unsupervised framing. Now discard all labels entirely — pretend they were never recorded. Run kk-means with k=2k=2 over all six customers using only `(age, spend, visits)`. The algorithm groups {A, C, E} (high spend, high visits) into one cluster and {B, D, F} (low spend, low visits) into another, purely by geometric proximity in feature space — with no notion of "churn" ever entering the computation. Strikingly the clusters happen to align with the true churn behavior, but the algorithm had no access to and made no claim about labels; it only claims these six points naturally separate into two groups by spending pattern. This distinction matters: an unsupervised clustering could equally have discovered a grouping by age instead, if age had been the dominant source of variance, and there is no mechanism in kk-means to know which grouping is "right" — only which minimizes within-cluster distance.

Reinforcement framing. Reframe the problem entirely: an agent (a marketing system) chooses, for each customer at each month, an action — send a discount offer, send nothing, or send a loyalty email — and only observes a reward months later (whether the customer stayed subscribed, worth +1+1, or churned, worth −1-1, and the cost of the discount, worth −0.1-0.1). There is no table of "correct actions" anywhere; the agent must try different offers across many customers and months, observe delayed subscription outcomes, and gradually learn a policy π(action∣customer state)\pi(\text{action} \mid \text{customer state}) that maximizes cumulative retained revenue. Notice the same underlying customers now sit inside a sequential decision problem with delayed, evaluative feedback — a completely different mathematical object from the labeled classification table above, even though the raw customer attributes are identical. The table below summarizes how the same six data points are used under each paradigm:

ParadigmWhat's observedFeedback usedOutput produced
Supervised(features, label) pairs for A–DExact correct label per examplePredicted label for E, F
Unsupervisedfeatures only, all six customersNone — internal clustering objectiveGroup assignment (cluster 1 / cluster 2)
Reinforcementsequential customer states + actions takenDelayed reward (retained / churned, months later)Policy mapping states to actions

Common pitfalls & traps

PitfallWhy it happensConsequence
Treating clustering output as "ground truth" labelsCluster IDs look like class labels but carry no external validationSilent propagation of spurious structure into downstream decisions
Using supervised metrics (accuracy, F1) to judge unsupervised modelsHabit from supervised workflowsMeaningless numbers since there's no true label to compare against
Ignoring the exploration–exploitation tradeoff in RLAssuming more data always helps, as in supervised learningAgent gets stuck exploiting a suboptimal policy, never discovers better ones
Conflating self-supervised with fully unsupervisedBoth lack human labelsSelf-supervised objectives use auto-generated labels and behave like supervised training, not open-ended structure discovery
Assuming reward shaping is harmlessSmall reward tweaks seem like implementation detailsPoorly designed rewards cause "reward hacking" — the agent maximizes reward while failing the intended task
Applying supervised generalization theory directly to RLBoth involve prediction and optimizationRL data is non-i.i.d. (collected by the agent's own evolving policy), violating assumptions behind standard generalization bounds

Pioneers & history

The taxonomy of learning paradigms crystallized gradually as statisticians, psychologists, and computer scientists converged from different directions on the same underlying question — how can a system improve its behavior from experience.

Origins · 1 minArthur Samuel and how this was discovered
AS
Arthur Samuel
1901–1990 · IBM, checkers-playing program, coined the term "machine learning"

Samuel built a checkers program in the 1950s that improved its play by competing against itself and adjusting its evaluation function based on outcomes — an early precursor to both supervised value-function fitting and reinforcement-style self-play, and the origin of the phrase "machine learning" itself.

RS
Richard S. Sutton
born 1957 · University of Alberta, co-developer of temporal-difference learning and modern reinforcement learning theory

Sutton, together with Andrew Barto, formalized reinforcement learning as a rigorous mathematical framework grounded in the Bellman equations and Markov decision processes, and developed temporal-difference learning — the algorithmic backbone of QQ-learning and much of modern deep RL.

RA
Ronald A. Fisher
1890–1962 · statistician, developed maximum likelihood estimation and the foundations of statistical inference underlying supervised learning

Fisher's early twentieth-century work on estimation theory and the likelihood principle gave supervised learning its statistical backbone, directly foreshadowing the treatment in Maximum Likelihood Estimation, where many supervised loss functions are shown to be maximum-likelihood estimators in disguise.

History
1950
Alan Turing proposes the "learning machine" idea in Computing Machinery and Intelligence, framing machines that improve via experience.
1959
Arthur Samuel's checkers program demonstrates self-improving play and coins "machine learning."
1957–1962
Frank Rosenblatt develops the perceptron, an early supervised learning algorithm with a provable convergence guarantee.
1967
Cover and Hart formalize the k-nearest-neighbor rule and its statistical consistency, cornerstones of supervised classification theory.
1998
Sutton and Barto publish Reinforcement Learning: An Introduction, unifying decades of scattered work into a single coherent mathematical framework.
2006
onward: Deep learning revives large-scale supervised learning; deep RL (e.g., DQN, 2013–2015) later merges neural function approximation with the classical RL framework.

Where this matters

Supervised learning underlies most deployed predictive systems: spam filters, credit-scoring models, medical image diagnosis, speech recognition, and machine translation all rely on labeled training data mapping inputs to known correct outputs. Every large-scale image classifier and most fraud-detection pipelines are supervised systems at their core.

Unsupervised learning powers recommendation-system user segmentation, anomaly detection in network security (flagging traffic that doesn't fit learned normal patterns), topic modeling of text corpora, and the dimensionality reduction used to visualize high-dimensional embeddings. It is also the backbone of modern representation learning: large language models are pretrained with self-supervised objectives (predicting masked or next tokens) before any human-labeled fine-tuning occurs.

Reinforcement learning drives game-playing systems (from Samuel's checkers program to AlphaGo and beyond), robotic control (learning locomotion or manipulation policies through trial and error), resource allocation in data centers, autonomous vehicle decision-making, and the reinforcement-learning-from-human-feedback (RLHF) pipeline used to align large language models with human preferences — a striking case where all three paradigms combine in a single production system: self-supervised pretraining, supervised fine-tuning, and reinforcement learning from a learned reward model. Understanding which paradigm a real-world problem belongs to — or which combination of paradigms it requires — is the first and most consequential design decision in any applied machine learning system, well before any specific algorithm or architecture is chosen.

Ask the tutor: How does the reinforcement learning objective connect mathematically to the Bellman equation, and why does that guarantee convergence for tabular Q-learning?

Is reinforcement learning "harder" than supervised learning?

In terms of sample efficiency, generally yes: RL agents often need vastly more interactions than a supervised model needs labeled examples, because reward is sparse, delayed, and the agent must also explore. In terms of applicability, RL solves a fundamentally different problem — sequential decision-making with unknown environment dynamics — that supervised learning cannot express at all, since supervised learning has no notion of an action changing future states. So "harder" is the wrong frame; they solve different problems, and RL's difficulty stems from weaker feedback and non-i.i.d. data collected by the agent's own evolving behavior.

Can supervised learning be used to solve a reinforcement learning problem?

Sometimes, via "imitation learning" or "behavior cloning": if expert action sequences are available, a supervised model can learn to mimic the expert's state-to-action mapping directly. But this only works as well as the expert data covers the situations the agent will actually encounter; it inherits no mechanism for exploring beyond the expert's demonstrated behavior, and compounding prediction errors can lead the agent into states the expert never visited, a phenomenon called distributional shift.

What's the difference between unsupervised learning and self-supervised learning?

Unsupervised learning optimizes an intrinsic structural objective (cluster compactness, density estimation) with no manufactured labels at all. Self-supervised learning creates pretext labels automatically from the raw unlabeled data — for example, hiding a word and asking a model to predict it — and then optimizes a standard supervised loss against those auto-generated labels. Mechanically, self-supervised training loops look identical to supervised ones; conceptually, it is often grouped as a subtype of unsupervised learning because no human ever supplies a label.

Why doesn't standard supervised generalization theory directly apply to reinforcement learning?

Standard supervised learning theory (as developed further in The Formal Learning Problem) typically assumes training examples are drawn independently and identically distributed (i.i.d.) from a fixed distribution. In RL, the data an agent collects depends on its own policy, which is itself changing during training — so the distribution of states visited shifts over time and is correlated across steps within an episode. This violates the i.i.d. assumption, requiring separate theoretical tools (Markov decision process theory, regret bounds) rather than direct application of PAC-learning results.

How do I decide which paradigm fits my problem?

Ask three questions. Do you have ground-truth outputs for training examples? If yes, it's supervised. If you have only raw data and want to discover structure with no target variable, it's unsupervised. If your system makes a sequence of decisions that affect future observations, and success is measured by delayed, evaluative reward rather than an instantly known correct answer, it's reinforcement learning. Many real systems combine paradigms — for instance, using unsupervised pretraining to build representations, then supervised fine-tuning, then RL-based refinement.

Are there problems that don't fit neatly into any of the three categories?

Yes — semi-supervised learning (a mix of labeled and unlabeled data), active learning (the model chooses which examples to request labels for), and multi-task or meta-learning setups blend elements across paradigms. Contrastive and self-supervised methods, common in modern representation learning, also sit at the boundary between unsupervised and supervised framings. The three-way taxonomy is a foundational scaffold, not an exhaustive partition of all possible learning setups.

Why does reward design matter so much in reinforcement learning but not in supervised learning?

In supervised learning the "objective" — matching the given labels — is essentially fixed by the dataset and rarely ambiguous. In RL, the reward function is a design choice made by engineers, and the agent will optimize it exactly as written, including any unintended loopholes ("reward hacking," discussed above). Because there is no external label to double-check against, a subtly miscalibrated reward can produce a policy that scores perfectly on the specified objective while completely failing the task the designer actually intended.

Before this

Where this leads