Learning Paradigms

A learning paradigm describes what data a learner receives and what feedback tells it how well it is doing. Every paradigm fits a model with parameters by optimizing an objective computed from data. The paradigms differ in where the training signal comes from. Pick one from the data at hand:

  • Supervised learning: every input comes with a label . Fit by minimizing the empirical risk , where the loss scores one prediction.
  • Unsupervised learning: there are inputs and no labels. Find structure, such as clusters, low-dimensional coordinates or a density fit by maximizing .
  • Semi-supervised learning: a few inputs have labels and many do not. Train on the labeled loss plus a term that uses the unlabeled inputs.
  • Self-supervised learning: there are no human labels. Targets are taken from the input itself, such as the next word or a hidden image patch. Train on these targets with supervised losses and reuse the learned representation.
  • Reinforcement learning: an agent in state takes action and receives a scalar reward . Learn a policy that maximizes the expected discounted return , where is the discount factor.

Supervised learning is the default whenever labels exist for the actual task. When labels are scarce and unlabeled inputs are plentiful, pretrain with self-supervision and fine-tune on the labels. Use unsupervised methods when the goal is structure in the data and no target exists. Use reinforcement learning when the learner’s actions change the data it sees and feedback arrives as rewards.

Intuition

The names describe the feedback. In supervised learning the labels play the role of a supervisor. The supervisor gives the right answer for each example (Prince, Understanding Deep Learning, section 1.1.3). Unsupervised learning has no supervisor, so the method itself must define what a good result is. Semi-supervised learning has a supervisor for a small part of the data. In self-supervised learning each example supplies its own target. Reinforcement learning takes its name from behavioral psychology, where a reward strengthens, or reinforces, the action that earned it.

The paradigms differ in how much a unit of feedback tells the learner and in what it costs. A label states the correct output for one input. It is the most direct feedback and the most expensive, since a person or a measurement must produce it. A reward is a single number, often delayed, about a whole sequence of actions. Unlabeled data are cheap and plentiful, but they do not say what is correct. Self-supervised and semi-supervised methods extract a training signal from unlabeled data, so a model needs fewer expensive labels.

The animation shows one dataset of 40 points under three settings. The labels you have decide which method applies.

\usepackage{tikz}
\usetikzlibrary{animations, arrows.meta}
\begin{document}
\definecolor{hot}{HTML}{D9483B}
\definecolor{cold}{HTML}{2F80ED}
\definecolor{mid}{HTML}{8A8A8A}
\newcommand{\pr}[1]{\filldraw[draw=black, fill=hot] (#1) circle (3pt);}\newcommand{\pb}[1]{\filldraw[draw=black, fill=cold] (#1) circle (3pt);}\newcommand{\pg}[1]{\filldraw[draw=black, fill=mid] (#1) circle (2.6pt);}\newcommand{\pR}[1]{\filldraw[draw=hot, line width=1.6pt, fill=white] (#1) circle (2.6pt);}\newcommand{\pB}[1]{\filldraw[draw=cold, line width=1.6pt, fill=white] (#1) circle (2.6pt);}
\newcommand{\qr}[1]{\filldraw[draw=black, fill=hot] (#1) circle (2pt);}\newcommand{\qb}[1]{\filldraw[draw=black, fill=cold] (#1) circle (2pt);}\newcommand{\qR}[1]{\filldraw[draw=hot, line width=1.2pt, fill=white] (#1) circle (1.8pt);}\newcommand{\qB}[1]{\filldraw[draw=cold, line width=1.2pt, fill=white] (#1) circle (1.8pt);}
\begin{tikzpicture}[font=\small, >={Stealth[length=2.2mm]}]
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 2.6s = "true", 6.7s = "false", 28.65s = "false", repeats}}}]
\draw[very thick] (7.43,5.27) -- (7.42,4.98) -- (7.42,4.66) -- (7.41,4.34) -- (7.39,4.05) -- (7.36,3.76) -- (7.31,3.47) -- (7.25,3.20);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 2.85s = "true", 6.7s = "false", 28.65s = "false", repeats}}}]
\draw[very thick] (7.25,3.20) -- (7.18,2.96) -- (7.08,2.73) -- (6.97,2.51) -- (6.85,2.30) -- (6.70,2.11) -- (6.53,1.93) -- (6.34,1.78) -- (6.12,1.66);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 3.1s = "true", 6.7s = "false", 28.65s = "false", repeats}}}]
\draw[very thick] (6.12,1.66) -- (5.84,1.56) -- (5.49,1.56) -- (5.24,1.64) -- (5.03,1.79) -- (4.88,1.96) -- (4.75,2.17) -- (4.64,2.39) -- (4.53,2.62);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 3.35s = "true", 6.7s = "false", 28.65s = "false", repeats}}}]
\draw[very thick] (4.53,2.62) -- (4.43,2.86) -- (4.33,3.07) -- (4.20,3.28) -- (4.05,3.47) -- (3.87,3.63) -- (3.64,3.75) -- (3.33,3.81) -- (3.00,3.78);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 3.6s = "true", 6.7s = "false", 28.65s = "false", repeats}}}]
\draw[very thick] (3.00,3.78) -- (2.70,3.69) -- (2.47,3.57) -- (2.27,3.43) -- (2.09,3.26) -- (1.94,3.07) -- (1.82,2.87) -- (1.72,2.65) -- (1.64,2.40);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 3.85s = "true", 6.7s = "false", 28.65s = "false", repeats}}}]
\draw[very thick] (1.64,2.40) -- (1.58,2.12) -- (1.55,1.83) -- (1.53,1.54) -- (1.53,1.22) -- (1.55,0.93) -- (1.57,0.61) -- (1.59,0.32) -- (1.61,0.00);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "true", 6.7s = "false", 28.65s = "false", repeats}}}]
\pr{5.80,2.34}\pr{5.60,2.26}\pr{5.51,3.10}\pr{5.46,3.40}\pr{4.91,3.80}\pr{5.11,3.67}\pr{4.72,4.31}\pr{4.39,4.46}\pr{4.36,4.49}\pr{3.43,4.39}\pr{3.20,4.49}\pr{2.74,4.46}\pr{2.45,4.15}\pr{1.68,3.70}\pr{1.86,3.91}\pr{1.62,3.57}\pr{0.98,3.25}\pr{0.97,2.63}\pr{0.74,2.81}\pr{0.92,2.22}\pb{3.26,3.22}\pb{3.49,2.88}\pb{3.34,2.42}\pb{3.47,2.13}\pb{4.00,1.69}\pb{4.41,1.34}\pb{4.44,1.12}\pb{4.77,1.06}\pb{5.01,0.83}\pb{5.36,0.73}\pb{5.63,0.82}\pb{6.50,1.11}\pb{6.88,1.50}\pb{7.21,1.22}\pb{7.76,1.34}\pb{7.85,1.62}\pb{7.97,1.81}\pb{8.23,2.50}\pb{8.02,3.26}\pb{8.34,3.30}
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "true", 6.7s = "false", 28.65s = "false", repeats}}}]
\draw[very thick] (10.15,3.95) rectangle (15.90,5.53);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 8.9s = "true", 16.1s = "false", 28.65s = "false", repeats}}}]
\draw[thick] (4.39,4.46) -- (4.36,4.49);\draw[thick] (1.68,3.70) -- (1.62,3.57);\draw[thick] (5.80,2.34) -- (5.60,2.26);\draw[thick] (4.41,1.34) -- (4.44,1.12);\draw[thick] (7.85,1.62) -- (7.97,1.81);\draw[thick] (4.91,3.80) -- (5.11,3.67);\draw[thick] (3.43,4.39) -- (3.20,4.49);\draw[thick] (1.68,3.70) -- (1.86,3.91);\draw[thick] (5.36,0.73) -- (5.63,0.82);\draw[thick] (0.97,2.63) -- (0.74,2.81);\draw[thick] (7.76,1.34) -- (7.85,1.62);\draw[thick] (5.51,3.10) -- (5.46,3.40);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 9.35s = "true", 16.1s = "false", 28.65s = "false", repeats}}}]
\draw[thick] (3.34,2.42) -- (3.47,2.13);\draw[thick] (8.02,3.26) -- (8.34,3.30);\draw[thick] (4.77,1.06) -- (5.01,0.83);\draw[thick] (4.44,1.12) -- (4.77,1.06);\draw[thick] (5.01,0.83) -- (5.36,0.73);\draw[thick] (4.72,4.31) -- (4.39,4.46);\draw[thick] (3.26,3.22) -- (3.49,2.88);\draw[thick] (0.97,2.63) -- (0.92,2.22);\draw[thick] (2.74,4.46) -- (2.45,4.15);\draw[thick] (6.88,1.50) -- (7.21,1.22);\draw[thick] (5.46,3.40) -- (5.11,3.67);\draw[thick] (3.20,4.49) -- (2.74,4.46);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 9.8s = "true", 16.1s = "false", 28.65s = "false", repeats}}}]
\draw[thick] (3.49,2.88) -- (3.34,2.42);\draw[thick] (0.98,3.25) -- (0.74,2.81);\draw[thick] (4.00,1.69) -- (4.41,1.34);\draw[thick] (4.91,3.80) -- (4.72,4.31);\draw[thick] (6.50,1.11) -- (6.88,1.50);\draw[thick] (7.21,1.22) -- (7.76,1.34);\draw[thick] (2.45,4.15) -- (1.86,3.91);\draw[thick] (3.47,2.13) -- (4.00,1.69);\draw[thick] (1.62,3.57) -- (0.98,3.25);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 10.25s = "true", 16.1s = "false", 28.65s = "false", repeats}}}]
\draw[thick] (7.97,1.81) -- (8.23,2.50);\draw[thick] (8.23,2.50) -- (8.02,3.26);\draw[thick] (5.80,2.34) -- (5.51,3.10);\draw[thick] (5.63,0.82) -- (6.50,1.11);\draw[thick] (4.36,4.49) -- (3.43,4.39);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 6.7s = "true", 13.1s = "false", 28.65s = "false", repeats}}}]
\pg{5.80,2.34}\pg{5.60,2.26}\pg{5.51,3.10}\pg{5.46,3.40}\pg{4.91,3.80}\pg{5.11,3.67}\pg{4.72,4.31}\pg{4.39,4.46}\pg{4.36,4.49}\pg{3.43,4.39}\pg{3.20,4.49}\pg{2.74,4.46}\pg{2.45,4.15}\pg{1.68,3.70}\pg{1.86,3.91}\pg{1.62,3.57}\pg{0.98,3.25}\pg{0.97,2.63}\pg{0.74,2.81}\pg{0.92,2.22}\pg{3.26,3.22}\pg{3.49,2.88}\pg{3.34,2.42}\pg{3.47,2.13}\pg{4.00,1.69}\pg{4.41,1.34}\pg{4.44,1.12}\pg{4.77,1.06}\pg{5.01,0.83}\pg{5.36,0.73}\pg{5.63,0.82}\pg{6.50,1.11}\pg{6.88,1.50}\pg{7.21,1.22}\pg{7.76,1.34}\pg{7.85,1.62}\pg{7.97,1.81}\pg{8.23,2.50}\pg{8.02,3.26}\pg{8.34,3.30}
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 13.1s = "true", 16.1s = "false", 28.65s = "false", repeats}}}]
\pR{5.80,2.34}\pR{5.60,2.26}\pR{5.51,3.10}\pR{5.46,3.40}\pR{4.91,3.80}\pR{5.11,3.67}\pR{4.72,4.31}\pR{4.39,4.46}\pR{4.36,4.49}\pR{3.43,4.39}\pR{3.20,4.49}\pR{2.74,4.46}\pR{2.45,4.15}\pR{1.68,3.70}\pR{1.86,3.91}\pR{1.62,3.57}\pR{0.98,3.25}\pR{0.97,2.63}\pR{0.74,2.81}\pR{0.92,2.22}\pB{3.26,3.22}\pB{3.49,2.88}\pB{3.34,2.42}\pB{3.47,2.13}\pB{4.00,1.69}\pB{4.41,1.34}\pB{4.44,1.12}\pB{4.77,1.06}\pB{5.01,0.83}\pB{5.36,0.73}\pB{5.63,0.82}\pB{6.50,1.11}\pB{6.88,1.50}\pB{7.21,1.22}\pB{7.76,1.34}\pB{7.85,1.62}\pB{7.97,1.81}\pB{8.23,2.50}\pB{8.02,3.26}\pB{8.34,3.30}
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 6.7s = "true", 16.1s = "false", 28.65s = "false", repeats}}}]
\draw[very thick] (10.15,2.25) rectangle (15.90,3.83);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 16.1s = "true", 24.65s = "false", 28.65s = "false", repeats}}}]
\draw[mid] (5.80,2.34) -- (5.60,2.26);\draw[mid] (5.80,2.34) -- (5.51,3.10);\draw[mid] (5.80,2.34) -- (5.46,3.40);\draw[mid] (5.60,2.26) -- (5.51,3.10);\draw[mid] (5.60,2.26) -- (5.46,3.40);\draw[mid] (5.51,3.10) -- (5.46,3.40);\draw[mid] (5.51,3.10) -- (5.11,3.67);\draw[mid] (5.46,3.40) -- (4.91,3.80);\draw[mid] (5.46,3.40) -- (5.11,3.67);\draw[mid] (4.91,3.80) -- (5.11,3.67);\draw[mid] (4.91,3.80) -- (4.72,4.31);\draw[mid] (4.91,3.80) -- (4.39,4.46);\draw[mid] (4.91,3.80) -- (4.36,4.49);\draw[mid] (4.72,4.31) -- (4.39,4.46);\draw[mid] (4.72,4.31) -- (4.36,4.49);\draw[mid] (4.39,4.46) -- (4.36,4.49);\draw[mid] (4.36,4.49) -- (3.43,4.39);\draw[mid] (3.43,4.39) -- (3.20,4.49);\draw[mid] (3.43,4.39) -- (2.74,4.46);\draw[mid] (3.20,4.49) -- (2.74,4.46);\draw[mid] (3.20,4.49) -- (2.45,4.15);\draw[mid] (2.74,4.46) -- (2.45,4.15);\draw[mid] (2.45,4.15) -- (1.86,3.91);\draw[mid] (1.68,3.70) -- (1.86,3.91);\draw[mid] (1.68,3.70) -- (1.62,3.57);\draw[mid] (1.68,3.70) -- (0.98,3.25);\draw[mid] (1.86,3.91) -- (1.62,3.57);\draw[mid] (1.62,3.57) -- (0.98,3.25);\draw[mid] (0.98,3.25) -- (0.97,2.63);\draw[mid] (0.98,3.25) -- (0.74,2.81);\draw[mid] (0.98,3.25) -- (0.92,2.22);\draw[mid] (0.97,2.63) -- (0.74,2.81);\draw[mid] (0.97,2.63) -- (0.92,2.22);\draw[mid] (0.74,2.81) -- (0.92,2.22);\draw[mid] (3.26,3.22) -- (3.49,2.88);\draw[mid] (3.26,3.22) -- (3.34,2.42);\draw[mid] (3.26,3.22) -- (3.47,2.13);\draw[mid] (3.49,2.88) -- (3.34,2.42);\draw[mid] (3.49,2.88) -- (3.47,2.13);\draw[mid] (3.34,2.42) -- (3.47,2.13);\draw[mid] (3.47,2.13) -- (4.00,1.69);\draw[mid] (4.00,1.69) -- (4.41,1.34);\draw[mid] (4.00,1.69) -- (4.44,1.12);\draw[mid] (4.41,1.34) -- (4.44,1.12);\draw[mid] (4.41,1.34) -- (4.77,1.06);\draw[mid] (4.44,1.12) -- (4.77,1.06);\draw[mid] (4.44,1.12) -- (5.01,0.83);\draw[mid] (4.77,1.06) -- (5.01,0.83);\draw[mid] (4.77,1.06) -- (5.36,0.73);\draw[mid] (4.77,1.06) -- (5.63,0.82);\draw[mid] (5.01,0.83) -- (5.36,0.73);\draw[mid] (5.01,0.83) -- (5.63,0.82);\draw[mid] (5.36,0.73) -- (5.63,0.82);\draw[mid] (5.63,0.82) -- (6.50,1.11);\draw[mid] (6.50,1.11) -- (6.88,1.50);\draw[mid] (6.50,1.11) -- (7.21,1.22);\draw[mid] (6.88,1.50) -- (7.21,1.22);\draw[mid] (6.88,1.50) -- (7.76,1.34);\draw[mid] (7.21,1.22) -- (7.76,1.34);\draw[mid] (7.21,1.22) -- (7.85,1.62);\draw[mid] (7.76,1.34) -- (7.85,1.62);\draw[mid] (7.76,1.34) -- (7.97,1.81);\draw[mid] (7.85,1.62) -- (7.97,1.81);\draw[mid] (7.97,1.81) -- (8.23,2.50);\draw[mid] (7.97,1.81) -- (8.02,3.26);\draw[mid] (7.97,1.81) -- (8.34,3.30);\draw[mid] (8.23,2.50) -- (8.02,3.26);\draw[mid] (8.23,2.50) -- (8.34,3.30);\draw[mid] (8.02,3.26) -- (8.34,3.30);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 18.9s = "true", 24.65s = "false", 28.65s = "false", repeats}}}]
\draw[hot, very thick] (4.36,4.49) -- (3.43,4.39);\draw[hot, very thick] (3.20,4.49) -- (3.43,4.39);\draw[hot, very thick] (2.74,4.46) -- (3.43,4.39);\draw[cold, very thick] (4.77,1.06) -- (5.63,0.82);\draw[cold, very thick] (5.01,0.83) -- (5.63,0.82);\draw[cold, very thick] (5.36,0.73) -- (5.63,0.82);\draw[cold, very thick] (6.50,1.11) -- (5.63,0.82);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 19.45s = "true", 24.65s = "false", 28.65s = "false", repeats}}}]
\draw[hot, very thick] (4.91,3.80) -- (4.36,4.49);\draw[hot, very thick] (4.72,4.31) -- (4.36,4.49);\draw[hot, very thick] (4.39,4.46) -- (4.36,4.49);\draw[hot, very thick] (2.45,4.15) -- (3.20,4.49);\draw[hot, very thick] (2.45,4.15) -- (2.74,4.46);\draw[cold, very thick] (4.41,1.34) -- (4.77,1.06);\draw[cold, very thick] (4.44,1.12) -- (4.77,1.06);\draw[cold, very thick] (4.44,1.12) -- (5.01,0.83);\draw[cold, very thick] (6.88,1.50) -- (6.50,1.11);\draw[cold, very thick] (7.21,1.22) -- (6.50,1.11);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 20s = "true", 24.65s = "false", 28.65s = "false", repeats}}}]
\draw[hot, very thick] (5.46,3.40) -- (4.91,3.80);\draw[hot, very thick] (5.11,3.67) -- (4.91,3.80);\draw[hot, very thick] (1.86,3.91) -- (2.45,4.15);\draw[cold, very thick] (4.00,1.69) -- (4.41,1.34);\draw[cold, very thick] (4.00,1.69) -- (4.44,1.12);\draw[cold, very thick] (7.76,1.34) -- (6.88,1.50);\draw[cold, very thick] (7.76,1.34) -- (7.21,1.22);\draw[cold, very thick] (7.85,1.62) -- (7.21,1.22);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 20.55s = "true", 24.65s = "false", 28.65s = "false", repeats}}}]
\draw[hot, very thick] (5.80,2.34) -- (5.46,3.40);\draw[hot, very thick] (5.60,2.26) -- (5.46,3.40);\draw[hot, very thick] (5.51,3.10) -- (5.46,3.40);\draw[hot, very thick] (5.51,3.10) -- (5.11,3.67);\draw[hot, very thick] (1.68,3.70) -- (1.86,3.91);\draw[hot, very thick] (1.62,3.57) -- (1.86,3.91);\draw[cold, very thick] (3.47,2.13) -- (4.00,1.69);\draw[cold, very thick] (7.97,1.81) -- (7.76,1.34);\draw[cold, very thick] (7.97,1.81) -- (7.85,1.62);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 21.1s = "true", 24.65s = "false", 28.65s = "false", repeats}}}]
\draw[hot, very thick] (0.98,3.25) -- (1.68,3.70);\draw[hot, very thick] (0.98,3.25) -- (1.62,3.57);\draw[cold, very thick] (3.26,3.22) -- (3.47,2.13);\draw[cold, very thick] (3.49,2.88) -- (3.47,2.13);\draw[cold, very thick] (3.34,2.42) -- (3.47,2.13);\draw[cold, very thick] (8.23,2.50) -- (7.97,1.81);\draw[cold, very thick] (8.02,3.26) -- (7.97,1.81);\draw[cold, very thick] (8.34,3.30) -- (7.97,1.81);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 21.65s = "true", 24.65s = "false", 28.65s = "false", repeats}}}]
\draw[hot, very thick] (0.97,2.63) -- (0.98,3.25);\draw[hot, very thick] (0.74,2.81) -- (0.98,3.25);\draw[hot, very thick] (0.92,2.22) -- (0.98,3.25);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 16.1s = "true", 24.65s = "false", 28.65s = "false", repeats}}}]
\draw[very thick] (10.15,0.55) rectangle (15.90,2.13);
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "true", 24.65s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (10.30,5.17) {\textbf{Supervised}};
\node[anchor=west] at (10.30,4.67) {\footnotesize have: a label for every point};
\node[anchor=west] at (10.30,4.25) {\footnotesize get: a boundary for new points};
\node[anchor=west] at (10.30,3.47) {\textbf{Unsupervised}};
\node[anchor=west] at (10.30,2.97) {\footnotesize have: no labels};
\node[anchor=west] at (10.30,2.55) {\footnotesize get: groups found from distances};
\node[anchor=west] at (10.30,1.77) {\textbf{Semi-supervised}};
\node[anchor=west] at (10.30,1.27) {\footnotesize have: 2 labels, 38 unlabeled points};
\node[anchor=west] at (10.30,0.85) {\footnotesize get: a label for every point};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "true", 2.6s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {Supervised: every point comes with its label, red or blue.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 2.6s = "true", 2.85s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {The model learns a boundary that separates the two labels.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 2.85s = "true", 3.1s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {The model learns a boundary that separates the two labels.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 3.1s = "true", 3.35s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {The model learns a boundary that separates the two labels.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 3.35s = "true", 3.6s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {The model learns a boundary that separates the two labels.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 3.6s = "true", 3.85s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {The model learns a boundary that separates the two labels.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 3.85s = "true", 4.1s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {The model learns a boundary that separates the two labels.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 4.1s = "true", 6.7s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {A new point gets the label of the side of the boundary it falls on.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 6.7s = "true", 8.9s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {Unsupervised: the same 40 points, with no labels.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 8.9s = "true", 9.35s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {Single linkage joins the closest pairs first. Each link merges two groups.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 9.35s = "true", 9.8s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {Single linkage joins the closest pairs first. Each link merges two groups.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 9.8s = "true", 10.25s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {Single linkage joins the closest pairs first. Each link merges two groups.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 10.25s = "true", 10.7s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {Single linkage joins the closest pairs first. Each link merges two groups.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 10.7s = "true", 13.1s = "false", 28.65s = "false", repeats}}}]
\draw[very thick, dashed] (3.43,4.39) -- (3.26,3.22);
\node[anchor=west] at (-0.2,-0.75) {The last link to be added is the longest one. It joins the two moons.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 13.1s = "true", 16.1s = "false", 28.65s = "false", repeats}}}]
\node[anchor=west] at (-0.2,-0.75) {Cutting the longest link leaves two groups. The method finds them but cannot name them.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 16.1s = "true", 18.9s = "false", 28.65s = "false", repeats}}}]
\pg{5.80,2.34}\pg{5.60,2.26}\pg{5.51,3.10}\pg{5.46,3.40}\pg{4.91,3.80}\pg{5.11,3.67}\pg{4.72,4.31}\pg{4.39,4.46}\pg{4.36,4.49}\pr{3.43,4.39}\pg{3.20,4.49}\pg{2.74,4.46}\pg{2.45,4.15}\pg{1.68,3.70}\pg{1.86,3.91}\pg{1.62,3.57}\pg{0.98,3.25}\pg{0.97,2.63}\pg{0.74,2.81}\pg{0.92,2.22}\pg{3.26,3.22}\pg{3.49,2.88}\pg{3.34,2.42}\pg{3.47,2.13}\pg{4.00,1.69}\pg{4.41,1.34}\pg{4.44,1.12}\pg{4.77,1.06}\pg{5.01,0.83}\pg{5.36,0.73}\pb{5.63,0.82}\pg{6.50,1.11}\pg{6.88,1.50}\pg{7.21,1.22}\pg{7.76,1.34}\pg{7.85,1.62}\pg{7.97,1.81}\pg{8.23,2.50}\pg{8.02,3.26}\pg{8.34,3.30}
\node[anchor=west] at (-0.2,-0.75) {Semi-supervised: only two points have labels. Gray lines join each point to its 3 nearest neighbors.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 18.9s = "true", 19.45s = "false", 28.65s = "false", repeats}}}]
\pg{5.80,2.34}\pg{5.60,2.26}\pg{5.51,3.10}\pg{5.46,3.40}\pg{4.91,3.80}\pg{5.11,3.67}\pg{4.72,4.31}\pg{4.39,4.46}\pR{4.36,4.49}\pr{3.43,4.39}\pR{3.20,4.49}\pR{2.74,4.46}\pg{2.45,4.15}\pg{1.68,3.70}\pg{1.86,3.91}\pg{1.62,3.57}\pg{0.98,3.25}\pg{0.97,2.63}\pg{0.74,2.81}\pg{0.92,2.22}\pg{3.26,3.22}\pg{3.49,2.88}\pg{3.34,2.42}\pg{3.47,2.13}\pg{4.00,1.69}\pg{4.41,1.34}\pg{4.44,1.12}\pB{4.77,1.06}\pB{5.01,0.83}\pB{5.36,0.73}\pb{5.63,0.82}\pB{6.50,1.11}\pg{6.88,1.50}\pg{7.21,1.22}\pg{7.76,1.34}\pg{7.85,1.62}\pg{7.97,1.81}\pg{8.23,2.50}\pg{8.02,3.26}\pg{8.34,3.30}
\node[anchor=west] at (-0.2,-0.75) {Round 1: an unlabeled point takes the label of its labeled neighbors.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 19.45s = "true", 20s = "false", 28.65s = "false", repeats}}}]
\pg{5.80,2.34}\pg{5.60,2.26}\pg{5.51,3.10}\pg{5.46,3.40}\pR{4.91,3.80}\pg{5.11,3.67}\pR{4.72,4.31}\pR{4.39,4.46}\pR{4.36,4.49}\pr{3.43,4.39}\pR{3.20,4.49}\pR{2.74,4.46}\pR{2.45,4.15}\pg{1.68,3.70}\pg{1.86,3.91}\pg{1.62,3.57}\pg{0.98,3.25}\pg{0.97,2.63}\pg{0.74,2.81}\pg{0.92,2.22}\pg{3.26,3.22}\pg{3.49,2.88}\pg{3.34,2.42}\pg{3.47,2.13}\pg{4.00,1.69}\pB{4.41,1.34}\pB{4.44,1.12}\pB{4.77,1.06}\pB{5.01,0.83}\pB{5.36,0.73}\pb{5.63,0.82}\pB{6.50,1.11}\pB{6.88,1.50}\pB{7.21,1.22}\pg{7.76,1.34}\pg{7.85,1.62}\pg{7.97,1.81}\pg{8.23,2.50}\pg{8.02,3.26}\pg{8.34,3.30}
\node[anchor=west] at (-0.2,-0.75) {Round 2: an unlabeled point takes the label of its labeled neighbors.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 20s = "true", 20.55s = "false", 28.65s = "false", repeats}}}]
\pg{5.80,2.34}\pg{5.60,2.26}\pg{5.51,3.10}\pR{5.46,3.40}\pR{4.91,3.80}\pR{5.11,3.67}\pR{4.72,4.31}\pR{4.39,4.46}\pR{4.36,4.49}\pr{3.43,4.39}\pR{3.20,4.49}\pR{2.74,4.46}\pR{2.45,4.15}\pg{1.68,3.70}\pR{1.86,3.91}\pg{1.62,3.57}\pg{0.98,3.25}\pg{0.97,2.63}\pg{0.74,2.81}\pg{0.92,2.22}\pg{3.26,3.22}\pg{3.49,2.88}\pg{3.34,2.42}\pg{3.47,2.13}\pB{4.00,1.69}\pB{4.41,1.34}\pB{4.44,1.12}\pB{4.77,1.06}\pB{5.01,0.83}\pB{5.36,0.73}\pb{5.63,0.82}\pB{6.50,1.11}\pB{6.88,1.50}\pB{7.21,1.22}\pB{7.76,1.34}\pB{7.85,1.62}\pg{7.97,1.81}\pg{8.23,2.50}\pg{8.02,3.26}\pg{8.34,3.30}
\node[anchor=west] at (-0.2,-0.75) {Round 3: an unlabeled point takes the label of its labeled neighbors.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 20.55s = "true", 21.1s = "false", 28.65s = "false", repeats}}}]
\pR{5.80,2.34}\pR{5.60,2.26}\pR{5.51,3.10}\pR{5.46,3.40}\pR{4.91,3.80}\pR{5.11,3.67}\pR{4.72,4.31}\pR{4.39,4.46}\pR{4.36,4.49}\pr{3.43,4.39}\pR{3.20,4.49}\pR{2.74,4.46}\pR{2.45,4.15}\pR{1.68,3.70}\pR{1.86,3.91}\pR{1.62,3.57}\pg{0.98,3.25}\pg{0.97,2.63}\pg{0.74,2.81}\pg{0.92,2.22}\pg{3.26,3.22}\pg{3.49,2.88}\pg{3.34,2.42}\pB{3.47,2.13}\pB{4.00,1.69}\pB{4.41,1.34}\pB{4.44,1.12}\pB{4.77,1.06}\pB{5.01,0.83}\pB{5.36,0.73}\pb{5.63,0.82}\pB{6.50,1.11}\pB{6.88,1.50}\pB{7.21,1.22}\pB{7.76,1.34}\pB{7.85,1.62}\pB{7.97,1.81}\pg{8.23,2.50}\pg{8.02,3.26}\pg{8.34,3.30}
\node[anchor=west] at (-0.2,-0.75) {Round 4: an unlabeled point takes the label of its labeled neighbors.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 21.1s = "true", 21.65s = "false", 28.65s = "false", repeats}}}]
\pR{5.80,2.34}\pR{5.60,2.26}\pR{5.51,3.10}\pR{5.46,3.40}\pR{4.91,3.80}\pR{5.11,3.67}\pR{4.72,4.31}\pR{4.39,4.46}\pR{4.36,4.49}\pr{3.43,4.39}\pR{3.20,4.49}\pR{2.74,4.46}\pR{2.45,4.15}\pR{1.68,3.70}\pR{1.86,3.91}\pR{1.62,3.57}\pR{0.98,3.25}\pg{0.97,2.63}\pg{0.74,2.81}\pg{0.92,2.22}\pB{3.26,3.22}\pB{3.49,2.88}\pB{3.34,2.42}\pB{3.47,2.13}\pB{4.00,1.69}\pB{4.41,1.34}\pB{4.44,1.12}\pB{4.77,1.06}\pB{5.01,0.83}\pB{5.36,0.73}\pb{5.63,0.82}\pB{6.50,1.11}\pB{6.88,1.50}\pB{7.21,1.22}\pB{7.76,1.34}\pB{7.85,1.62}\pB{7.97,1.81}\pB{8.23,2.50}\pB{8.02,3.26}\pB{8.34,3.30}
\node[anchor=west] at (-0.2,-0.75) {Round 5: an unlabeled point takes the label of its labeled neighbors.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 21.65s = "true", 24.65s = "false", 28.65s = "false", repeats}}}]
\pR{5.80,2.34}\pR{5.60,2.26}\pR{5.51,3.10}\pR{5.46,3.40}\pR{4.91,3.80}\pR{5.11,3.67}\pR{4.72,4.31}\pR{4.39,4.46}\pR{4.36,4.49}\pr{3.43,4.39}\pR{3.20,4.49}\pR{2.74,4.46}\pR{2.45,4.15}\pR{1.68,3.70}\pR{1.86,3.91}\pR{1.62,3.57}\pR{0.98,3.25}\pR{0.97,2.63}\pR{0.74,2.81}\pR{0.92,2.22}\pB{3.26,3.22}\pB{3.49,2.88}\pB{3.34,2.42}\pB{3.47,2.13}\pB{4.00,1.69}\pB{4.41,1.34}\pB{4.44,1.12}\pB{4.77,1.06}\pB{5.01,0.83}\pB{5.36,0.73}\pb{5.63,0.82}\pB{6.50,1.11}\pB{6.88,1.50}\pB{7.21,1.22}\pB{7.76,1.34}\pB{7.85,1.62}\pB{7.97,1.81}\pB{8.23,2.50}\pB{8.02,3.26}\pB{8.34,3.30}
\node[anchor=west] at (-0.2,-0.75) {After 6 rounds all 40 points have labels. Each moon took the label of its seed.};
\end{scope}
\begin{scope}[animate = {myself: = {:visible = {0s = "false", 24.65s = "true", 28.65s = "true", repeats}}}]
\draw[thick] (3.64,3.48) -- (3.64,3.34) -- (3.63,3.18) -- (3.63,3.03) -- (3.62,2.88) -- (3.60,2.74) -- (3.58,2.60) -- (3.55,2.47) -- (3.52,2.35) -- (3.47,2.24) -- (3.42,2.13) -- (3.35,2.03) -- (3.28,1.93) -- (3.20,1.85) -- (3.10,1.77) -- (3.00,1.71) -- (2.86,1.66) -- (2.69,1.66) -- (2.57,1.70) -- (2.47,1.78) -- (2.39,1.86) -- (2.33,1.96) -- (2.27,2.07) -- (2.22,2.18) -- (2.17,2.30) -- (2.12,2.40) -- (2.06,2.51) -- (1.99,2.60) -- (1.90,2.68) -- (1.78,2.73) -- (1.63,2.76) -- (1.47,2.75) -- (1.32,2.71) -- (1.21,2.65) -- (1.11,2.58) -- (1.02,2.50) -- (0.95,2.41) -- (0.89,2.31) -- (0.84,2.20) -- (0.80,2.07) -- (0.77,1.94) -- (0.76,1.80) -- (0.75,1.65) -- (0.75,1.50) -- (0.76,1.35) -- (0.77,1.20) -- (0.78,1.06) -- (0.79,0.90);
\qr{2.84,2.05}\qr{2.74,2.01}\qr{2.70,2.42}\qr{2.67,2.57}\qr{2.40,2.76}\qr{2.50,2.70}\qr{2.31,3.01}\qr{2.15,3.09}\qr{2.13,3.10}\qr{1.68,3.05}\qr{1.57,3.10}\qr{1.34,3.08}\qr{1.20,2.93}\qr{0.82,2.71}\qr{0.91,2.81}\qr{0.79,2.65}\qr{0.48,2.49}\qr{0.47,2.19}\qr{0.36,2.28}\qr{0.45,1.98}\qb{1.60,2.48}\qb{1.71,2.31}\qb{1.63,2.08}\qb{1.70,1.94}\qb{1.96,1.73}\qb{2.16,1.55}\qb{2.17,1.45}\qb{2.34,1.42}\qb{2.45,1.31}\qb{2.63,1.26}\qb{2.76,1.30}\qb{3.18,1.44}\qb{3.37,1.63}\qb{3.53,1.50}\qb{3.80,1.56}\qb{3.84,1.70}\qb{3.91,1.78}\qb{4.03,2.13}\qb{3.93,2.50}\qb{4.08,2.52}
\node at (2.22,3.83) {\textbf{Supervised}};
\node at (2.22,0.45) {\footnotesize labels for all: a boundary};
\qR{8.14,2.05}\qR{8.04,2.01}\qR{8.00,2.42}\qR{7.97,2.57}\qR{7.70,2.76}\qR{7.80,2.70}\qR{7.61,3.01}\qR{7.45,3.09}\qR{7.43,3.10}\qR{6.98,3.05}\qR{6.87,3.10}\qR{6.64,3.08}\qR{6.50,2.93}\qR{6.12,2.71}\qR{6.21,2.81}\qR{6.09,2.65}\qR{5.78,2.49}\qR{5.77,2.19}\qR{5.66,2.28}\qR{5.75,1.98}\qB{6.90,2.48}\qB{7.01,2.31}\qB{6.93,2.08}\qB{7.00,1.94}\qB{7.26,1.73}\qB{7.46,1.55}\qB{7.47,1.45}\qB{7.64,1.42}\qB{7.75,1.31}\qB{7.93,1.26}\qB{8.06,1.30}\qB{8.48,1.44}\qB{8.67,1.63}\qB{8.83,1.50}\qB{9.10,1.56}\qB{9.14,1.70}\qB{9.21,1.78}\qB{9.33,2.13}\qB{9.23,2.50}\qB{9.38,2.52}
\node at (7.52,3.83) {\textbf{Unsupervised}};
\node at (7.52,0.45) {\footnotesize no labels: two groups};
\qR{13.44,2.05}\qR{13.34,2.01}\qR{13.30,2.42}\qR{13.27,2.57}\qR{13.00,2.76}\qR{13.10,2.70}\qR{12.91,3.01}\qR{12.75,3.09}\qR{12.73,3.10}\qr{12.28,3.05}\qR{12.17,3.10}\qR{11.94,3.08}\qR{11.80,2.93}\qR{11.42,2.71}\qR{11.51,2.81}\qR{11.39,2.65}\qR{11.08,2.49}\qR{11.07,2.19}\qR{10.96,2.28}\qR{11.05,1.98}\qB{12.20,2.48}\qB{12.31,2.31}\qB{12.23,2.08}\qB{12.30,1.94}\qB{12.56,1.73}\qB{12.76,1.55}\qB{12.77,1.45}\qB{12.94,1.42}\qB{13.05,1.31}\qB{13.23,1.26}\qb{13.36,1.30}\qB{13.78,1.44}\qB{13.97,1.63}\qB{14.13,1.50}\qB{14.40,1.56}\qB{14.44,1.70}\qB{14.51,1.78}\qB{14.63,2.13}\qB{14.53,2.50}\qB{14.68,2.52}
\node at (12.82,3.83) {\textbf{Semi-supervised}};
\node at (12.82,0.45) {\footnotesize 2 labels: labels for all};
\node[anchor=west] at (-0.2,-0.75) {The same 40 points in all three panels. The labels you have decide the method.};
\end{scope}
\end{tikzpicture}
\end{document}

Comparison Table

ParadigmData neededObjectiveOutputHow it is evaluatedTypical tasksIn the vault
Supervisedpairs minimize predictor of metric on a held-out labeled test setprice prediction, spam filtering, diagnosis3. Regression, 4. Classification, 5. Tree-Based Methods
Unsupervisedinputs onlywithin-cluster spread, reconstruction error or likelihoodclusters, coordinates, density or samplerheld-out likelihood or reconstruction error, cluster stability, downstream usecustomer segments, compression, anomaly detection6. Clustering, 7. Dimensionality Reduction, 10. Generative Networks
Semi-supervisedfew pairs, many inputslabeled loss plus unlabeled termpredictor of held-out labeled test set, against a labels-only baselinemedical images with few expert labels8.2. Transfer Learning
Self-supervisedinputs only, targets taken from thempredict the hidden part from the visible partrepresentation, sometimes a generatorpretext loss, then downstream accuracylanguage model pretraining, masked image modeling8.1. Self-Supervised Learning
Reinforcementstates, actions and rewards from interactionmaximize expected returnpolicy average return over fresh episodesgames, robot control5.1. Reinforcement Learning, 6.2. Markov Decision Processes

When to Use Which

Start from what the deployed model must do, then check which data exist. If labeled pairs exist for the exact task, train a supervised model and evaluate it on held-out labeled data. If labels exist only for a related task, fine-tune a model trained on that task, as in 8.2. Transfer Learning. Suppose only a few hundred labels exist beside many unlabeled inputs. Then pretrain on all inputs with a self-supervised task and fine-tune on the labels. Add pseudo-labeling or consistency regularization when the unlabeled inputs come from the deployment distribution. If no target exists and the question concerns the data themselves, use unsupervised methods. If the model’s outputs are actions whose results are scored only later, use reinforcement learning.

The Paradigms

Supervised Learning

Supervised learning fits a map from inputs to labels using labeled pairs . The type of names the task. A real number, such as a price, makes it regression (3. Regression). One of classes, such as spam or not spam, makes it classification (4. Classification). Outputs can also be structured, such as one class per pixel in segmentation or a sentence in translation. Training minimizes the empirical risk, while the real target is the population risk on new data, as 2.3. Generalization explains. Four objects in a supervised project should be kept apart:

  • Intended outcome: what should happen in deployment, such as users seeing little spam and losing no real mail.
  • Evaluation metric: what will be measured, such as recall at a false-positive rate of .
  • Training surrogate: the loss that supplies a usable gradient, such as cross-entropy.
  • Update estimator: how each update is computed, such as a gradient on a random minibatch in SGD.

The metric is often not differentiable, so the surrogate replaces it during training. A model can improve on the surrogate and still fail the intended outcome.

A parametric model has a fixed number of parameters that does not grow with . Linear regression with coefficients and a neural network of fixed size are parametric. After training, the data can be discarded. A nonparametric model grows with the data. k-NN stores every training point, and a decision tree can add leaves as grows. The name is misleading, since these models do have parameters. Their number is set by the data instead of fixed in advance. Nonparametric models assume less about the shape of . They cost more memory and prediction time, and in high dimensions they need far more samples (7.2. Curse of Dimensionality).

Unsupervised Learning

Unsupervised learning receives inputs and no labels. It describes the structure of the data instead of predicting a target. Five tasks are common:

  • Clustering assigns each input to one of groups, as in 6.1. K-Means and 6.2. Gaussian Mixture Models.
  • Dimensionality reduction maps each input to coordinates that keep most of its information, as in 7.1. Principal Component Analysis and autoencoders.
  • Density estimation fits a probability model , usually by maximum likelihood.
  • Generation produces new samples that resemble the data, as in GANs and diffusion models. A density is one route to generation, and some generators define no density at all.
  • Anomaly detection flags inputs that have low density or a large reconstruction error.

Without labels, there is no correct answer to compare against, so other criteria must be used. A probabilistic model is scored by its log-likelihood on held-out data (Prince, section 14.3). The training likelihood is not used, since a model can raise it by memorizing the training points. A clustering is judged by internal criteria, such as the within-cluster sum of squares or the silhouette score. Its stability across resamples is a second check. Dimensionality reduction uses reconstruction error on held-out data. Image generators are scored with sample-quality measures such as the Fréchet inception distance. When a downstream task exists, its accuracy is often the most useful score.

Semi-Supervised Learning

Not Taught in Lecture

Pseudo-labeling and consistency regularization follow Lee (2013), Laine and Aila (2017) and Sohn et al. (2020). Lecture covered only pretraining followed by fine-tuning.

Semi-supervised learning has labeled pairs and unlabeled inputs from the same distribution. A typical objective adds an unlabeled term to the supervised loss:

Here is a loss on one unlabeled input, and sets its weight. Unlabeled inputs help only if their distribution carries information about . The usual assumption is that the decision boundary passes through regions where inputs are rare. Two choices of are common:

  • Pseudo-labeling: train on the labeled data, predict the unlabeled inputs, and keep confident predictions as labels. Wrong pseudo-labels can reinforce themselves, so a high confidence threshold such as is used.
  • Consistency regularization: require the same prediction for two perturbed versions of one unlabeled input, such as two augmentations. The term is then a distance between the two outputs.

FixMatch combines the two. It takes a pseudo-label from a weakly augmented image and trains the prediction on a strongly augmented copy. In deep learning the most common route is pretraining followed by fine-tuning. A network first learns a representation from all inputs with a self-supervised task. It is then fine-tuned on the labels, as in 8.2. Transfer Learning.

Self-Supervised Learning

Self-supervised learning uses unlabeled data with the mechanics of supervised learning. It splits each example into an input and a target, both computed from the example. A language model predicts each next word from the words before it. A masked model hides image patches or words and predicts them from the rest. The prediction problem is called a pretext task. The representation the network builds to solve it usually matters more than the task itself. That representation then serves a downstream task that may have few labels. No person writes the targets, so the method scales to billions of examples. Large language models are trained this way. 8.1. Self-Supervised Learning covers the pretext tasks in detail.

Reinforcement Learning

Reinforcement learning trains an agent (Prince, section 1.3). At each step the agent observes a state , takes an action and receives a reward . It differs from supervised learning in three ways. The reward scores the chosen action without naming the best one. The reward may arrive many steps after the actions that earned it. The agent must then work out which actions deserve credit. This is the temporal credit assignment problem. The agent’s own actions also decide which states it sees. It must therefore balance exploitation of actions known to pay off against exploration of untried ones. Deep reinforcement learning uses a neural network as the policy, mapping a state such as a chessboard to an action. The framework and its algorithms are covered in 5.1. Reinforcement Learning and 6.2. Markov Decision Processes.

Examples

(Easy) Naming the Paradigm

Name the paradigm in each scenario. For supervised ones, also say whether the task is regression or classification.

  1. A landlord predicts monthly rent from size and location, using past listings with their rents.

  2. A retailer groups shoppers by purchase history. Nobody has defined the groups.

  3. A warehouse robot learns to stack boxes. It gets for each stack that stays up for ten seconds.

  4. A lab has lung scans labeled by radiologists and unlabeled scans from the same scanners.

  5. A company trains a network to predict the next word in two billion sentences from the web.

  6. An email provider trains a spam filter on messages that users marked as spam or moved back to the inbox.

(Medium) One Factory, Three Questions

A factory records vibration and temperature from 500 machines every minute. It also logs every failure and its repair cost. Management asks three questions. How many hours remain until a given machine fails? Which machines behave unlike the others right now? When should each machine be serviced, given that servicing costs downtime and failures cost repairs?

See Also