How every chamber works
Machine learning is written in mathematics, and research papers are written in it densely. This course doesn't try to make you a mathematician. It teaches you to read: to look at a line of symbols and hear a sentence, the way you hear a sentence when you look at these words.
Every chamber runs the same loop. It's the loop researchers run whenever they meet a new idea:
Discover
Meet the idea in the wild, before it has a name.
Learn
Notation, definitions, derivations and proofs.
Read beyond
Go past the course: books, notes and articles.
Papers & lectures
Find it in real research, and watch the experts.
Your turn
Prove it, code it, test yourself. Then repeat.
Markers like the one below show where you are in the loop. When a chamber ends, the loop starts again in the next one, one layer deeper.
Along the way you'll find three kinds of optional challenge, each worth extra XP: proofs (put one in order, or write your own), coding problems in the style of Project Euler (work out a single number and submit it), and paper decoders (take an equation from a real paper apart, symbol by symbol). The checkpoint questions at the end are what clear the chamber.
Discover: a sentence you can't read yet
Here is one line from a 2017 research paper:
Spotted in the wild
That line is the attention mechanism, the engine inside every large language model. If it looks like hieroglyphs right now, good: that's the honest starting point. Look at how many small conventions it packs in. There are capital letters that stand for grids of numbers, a word set in upright type, a little that looks like a power but isn't one, and a subscript that labels which we mean. By Chamber 9 you'll read this line aloud like an ordinary sentence and turn it into working code.
The first skill is humbler than understanding. It's saying the symbols out loud. You can't think clearly about a symbol you can't name, and you can't ask a colleague about it either. Mathematicians read equations as sentences: is “y hat equals two x plus one”.
Take a guess before reading on. How is usually read aloud?
Learn: the Greek alphabet of machine learning
Why Greek? Partly history: modern mathematics grew up in Europe, where scholars read Greek. Mostly it's practical. A single paper can need forty different symbols, and the Latin alphabet runs out fast. Greek letters also come with habits. almost always means a model's parameters, and almost always means a learning rate. They're habits, not laws, but knowing them lets you guess a symbol's job before the paper tells you.
- “alpha”A step size or learning rate (Adam calls it ), or a coefficient in a weighted mix.
- “beta”Decay rates, like Adam's and ; also regression coefficients.
- “gamma”The discount factor in reinforcement learning; the learned scale in batch normalisation.
- “delta”A small change, or the error signal flowing backwards through a network.
- “capital delta”A difference or change: is “the change in ”.
- “epsilon”A tiny positive number, like , added to avoid dividing by zero. In proofs, an arbitrarily small tolerance.
- “curly epsilon”The same letter in another style, often used for random noise.
- “eta”The learning rate in gradient descent and its relatives.
- “theta”The parameters of a model: every weight and bias, bundled together.
- “lambda”The strength of a penalty (regularisation); later, an eigenvalue.
- “mu”A mean (average), especially of a distribution.
- “sigma”A standard deviation (how spread out values are), or the sigmoid function .
- “capital sigma”“Add them all up” (Chamber 5), or a covariance matrix.
- “pi”The constant ; in reinforcement learning, a policy.
- “capital pi”“Multiply them all together” (Chamber 5).
- “phi”A feature map , or the parameters of a second network.
- “omega”A weight or a frequency. Easy to mistake for .
- “tau”A temperature (how soft a softmax is) or a time constant.
- “rho”A correlation or a density. Easy to mistake for .
- “kappa”A condition number: how badly scaled an optimisation problem is.
- “nu”Degrees of freedom, or another rate. Looks almost exactly like .
- “xi”Often a random variable or noise. Said “ksee” or “zai”, and famously hard to handwrite.
- “chi”Said “kai”. Best known from the (chi-squared) test.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “alpha” | A step size or learning rate (Adam calls it ), or a coefficient in a weighted mix. | ||
| “beta” | Decay rates, like Adam's and ; also regression coefficients. | ||
| “gamma” | The discount factor in reinforcement learning; the learned scale in batch normalisation. | ||
| “delta” | A small change, or the error signal flowing backwards through a network. | ||
| “capital delta” | A difference or change: is “the change in ”. | ||
| “epsilon” | A tiny positive number, like , added to avoid dividing by zero. In proofs, an arbitrarily small tolerance. | ||
| “curly epsilon” | The same letter in another style, often used for random noise. | ||
| “eta” | The learning rate in gradient descent and its relatives. | ||
| “theta” | The parameters of a model: every weight and bias, bundled together. | ||
| “lambda” | The strength of a penalty (regularisation); later, an eigenvalue. | ||
| “mu” | A mean (average), especially of a distribution. | ||
| “sigma” | A standard deviation (how spread out values are), or the sigmoid function . | ||
| “capital sigma” | “Add them all up” (Chamber 5), or a covariance matrix. | ||
| “pi” | The constant ; in reinforcement learning, a policy. | ||
| “capital pi” | “Multiply them all together” (Chamber 5). | ||
| “phi” | A feature map , or the parameters of a second network. | ||
| “omega” | A weight or a frequency. Easy to mistake for . | ||
| “tau” | A temperature (how soft a softmax is) or a time constant. | ||
| “rho” | A correlation or a density. Easy to mistake for . | ||
| “kappa” | A condition number: how badly scaled an optimisation problem is. | ||
| “nu” | Degrees of freedom, or another rate. Looks almost exactly like . | ||
| “xi” | Often a random variable or noise. Said “ksee” or “zai”, and famously hard to handwrite. | ||
| “chi” | Said “kai”. Best known from the (chi-squared) test. |
Press the speaker icon to hear a reading. Pronunciations vary from place to place. British speakers tend to say “BEE-tuh” where Americans say “BAY-tuh”, and both are fine. What matters is that you can say it.
In the update , what job is doing?
Learn: typefaces carry meaning
In ordinary writing, bold and italics are for emphasis. In mathematics they change what a letter is. The same letter can be a single number, a list of numbers or a whole dataset, depending only on how it's printed.
- “x”Plain italic lower case: a scalar, one single number.
- “bold x”Bold lower case: a vector, an ordered list of numbers.
- “bold capital X”Bold (or plain) upper case: a matrix, a grid of numbers. Often a whole dataset, one example per row.
- “calligraphic L”Curly capitals name special objects: a loss, a dataset, the normal distribution.
- “blackboard bold R”Double-struck capitals name number systems. is the real numbers (Chamber 2).
- “upright softmax”Upright letters spell the names of functions (, , ), never a product of variables.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “x” | Plain italic lower case: a scalar, one single number. | ||
| “bold x” | Bold lower case: a vector, an ordered list of numbers. | ||
| “bold capital X” | Bold (or plain) upper case: a matrix, a grid of numbers. Often a whole dataset, one example per row. | ||
| “calligraphic L” | Curly capitals name special objects: a loss, a dataset, the normal distribution. | ||
| “blackboard bold R” | Double-struck capitals name number systems. is the real numbers (Chamber 2). | ||
| “upright softmax” | Upright letters spell the names of functions (, , ), never a product of variables. |
These conventions are common but not universal. The notation page of Goodfellow, Bengio and Courville's Deep Learning follows them closely, and many papers copy it. Plenty of others write vectors in plain italics and trust you to work it out from context. When in doubt, look for the paper's notation section. Chamber 9 shows you how to build your own notation table when a paper doesn't provide one.
A paper writes . Going by the typeface conventions, which symbols are vectors?
Learn: subscripts, superscripts and indices
Small symbols attached to a letter are its address. A subscript usually says which one: which entry of a list, which step of an algorithm, which layer of a network. A superscript usually says what power, unless it's wearing brackets.
- “x sub i”The -th entry of a list (or the -th example). A subscript is an index: a position.
- “A sub i j”The entry in row and column of a matrix. Two indices, two directions.
- “x squared”A superscript number is usually a power: .
- “x superscript i”A superscript in brackets is an index, not a power: the -th training example.
- “theta at step t”A subscript often means “at time step ”: the value after updates.
- “x prime”Another (a second point, a new value). On a function, means its derivative (Chamber 7).
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “x sub i” | The -th entry of a list (or the -th example). A subscript is an index: a position. | ||
| “A sub i j” | The entry in row and column of a matrix. Two indices, two directions. | ||
| “x squared” | A superscript number is usually a power: . | ||
| “x superscript i” | A superscript in brackets is an index, not a power: the -th training example. | ||
| “theta at step t” | A subscript often means “at time step ”: the value after updates. | ||
| “x prime” | Another (a second point, a new value). On a function, means its derivative (Chamber 7). |
Here is a whole equation read aloud. It's the core of gradient descent:
“Theta at step plus one equals theta at step , minus eta times g at step .” In plain words: the next parameters are the current parameters minus a small step, of size , in the direction . Notice that the equation describes every step at once. The subscript is a placeholder for “whichever step you're on”.
In , what does the mean?
Learn: hats, bars, tildes and stars
Decorations sit on top of a symbol and change its meaning without changing its name. They are the adjectives of mathematics.
- “y hat”A hat means estimated or predicted: is the model's guess at .
- “x bar”A bar means an average: is the mean of the values.
- “x tilde”A tilde means a modified version: noisy, approximate or transformed.
- “theta star”A star means optimal: the best possible value. Also written .
- “v arrow”An arrow marks a vector in school and physics. ML papers prefer bold, .
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “y hat” | A hat means estimated or predicted: is the model's guess at . | ||
| “x bar” | A bar means an average: is the mean of the values. | ||
| “x tilde” | A tilde means a modified version: noisy, approximate or transformed. | ||
| “theta star” | A star means optimal: the best possible value. Also written . | ||
| “v arrow” | An arrow marks a vector in school and physics. ML papers prefer bold, . |
A typical sentence from a statistics paper uses two of them at once: “our estimate converges to the true parameter as the dataset grows.” The hat is what we can compute. The star is what we wish we knew.
Learn: the verbs of mathematics
If symbols are nouns and decorations are adjectives, relations are the verbs. The equals sign is only one of them, and confusing it with its cousins is one of the most common reading mistakes.
- “equals”Both sides are the same value. A claim you could check.
- “is defined as”The left side is a new name for the right side. Not a claim to check: a definition.
- “is defined as (delta-equals)”Another way to write a definition, common in engineering papers.
- “is identical to”Equal for every value of the variables (an identity). Some authors also use it for definitions.
- “is approximately”Close, but not exactly equal.
- “is proportional to”Equal up to a constant factor: means for some fixed .
- “is much less than”Smaller by a large factor.
- “gets”Assignment in an algorithm: compute the right side, store it in the left. An update, not an equation.
- “end of proof”The “tombstone”: the proof is finished. Older texts write Q.E.D.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “equals” | Both sides are the same value. A claim you could check. | ||
| “is defined as” | The left side is a new name for the right side. Not a claim to check: a definition. | ||
| “is defined as (delta-equals)” | Another way to write a definition, common in engineering papers. | ||
| “is identical to” | Equal for every value of the variables (an identity). Some authors also use it for definitions. | ||
| “is approximately” | Close, but not exactly equal. | ||
| “is proportional to” | Equal up to a constant factor: means for some fixed . | ||
| “is much less than” | Smaller by a large factor. | ||
| “gets” | Assignment in an algorithm: compute the right side, store it in the left. An update, not an equation. | ||
| “end of proof” | The “tombstone”: the proof is finished. Older texts write Q.E.D. |
Compare four lines that look almost the same:
- defines . It's a naming, not a fact.
- claims a fact that you could check.
- claims it's close to 5.
- updates . As an equation, would be impossible. As an instruction, it just means “add one to ”.
Learn: your first proof
A proof is an argument that leaves no room for doubt. Every step follows from the ones before it, from definitions, or from facts already proved. Proofs are how mathematics, and the theory side of machine learning, earn the right to say “always”.
Here's a small one, with its anatomy labelled.
Claim. The sum of two even integers is even.
First, the definition we'll need. An integer is even if for some integer .
Proof. Let and be even integers. By the definition, there are integers and with and . (Two different letters! Writing and would secretly assume .) Then
Since is an integer, is two times an integer, so it's even.
Every proof you'll meet has the same bones. There's the claim to be shown. There's what we may assume. Definitions get unpacked into symbols, a chain of steps follows, each justified, and a conclusion matches the claim word for word. Then comes the little black square.
You'll put a proof together and write one of your own in the last part of this chamber.
Read beyond the course
No one learns a language from a single teacher. These are worth your time now, and they're all free. Mark each one as read when you're done, and your reading will start to count towards badges.
Book · free online · ~15 min
Deep Learning: NotationIan Goodfellow, Yoshua Bengio & Aaron Courville · Front matter
The standard reference for how deep-learning papers write things. Skim it now, then come back after each chamber of this course and notice how much more of it you can read.
Book · free online · ~25 min
Mathematics for Machine LearningMarc Peter Deisenroth, A. Aldo Faisal & Cheng Soon Ong · Chapter 1: Introduction and Motivation
A free, widely used textbook covering the mathematics behind machine learning in more depth than this course. Chapter 1 explains why the notation is worth learning, and the rest of the book will be your companion for the next course, Linear Algebra.
Article · free online · ~10 min
Greek letters used in mathematics, science, and engineeringWikipedia
Letter by letter, the jobs each Greek letter does across the sciences. Useful for seeing that ML's habits are only one dialect.
Article · free online · ~20 min
Reading mathematicsMAA Mathematical Communication
A curated set of short guides on reading mathematics actively: working your own examples as you go, and questioning every step. The habits in these guides are what the rest of this course trains.
Tool · free online · ~5 min
DetexifyDaniel Kirsch
Draw a symbol you don't recognise and Detexify finds its LaTeX command, and with it the symbol's name. The fastest way to look up something you can't even type.
Papers and lectures
Papers are where notation lives in the wild, and you don't need to understand a whole paper to learn from it. Here's a legitimate way for a beginner to read the Adam paper today. Open it and skip straight to Algorithm 1 near the top of page 2. It's about a dozen lines of pseudocode. Read each line aloud using this chamber's tables, then read the few sentences just below the box, which explain it in words. That's it. You'll come back for the rest when you've met more of the ideas.
Adam: A Method for Stochastic OptimizationDiederik P. Kingma, Jimmy Ba · ICLR, 2015One of the most cited papers in machine learning, and a feast of Greek letters, hats and subscripts. Its optimiser trains a large share of today's neural networks.
Decode the paper · Algorithm 1
Adam: A Method for Stochastic OptimizationDiederik P. Kingma, Jimmy Ba · ICLR, 2015
The last line of Adam's Algorithm 1: the update applied to every parameter at every step. Every piece of notation in it comes from this chamber. Match each symbol to its meaning.
Options
Watch
A tour of the Greek letters and the jobs they do across mathematics. Watch it with the table above open, and notice where machine learning's habits differ from physics' or statistics'.
Your turn
Time to make it stick. Start with a sprint through the alphabet. Then translate between symbols, words and code, assemble a proof and write one, and finally solve three problems in code.
Interactive lab
Greek alphabet sprint
Match · Symbols ↔ Read aloud as
Say it aloud
Match each expression to the way a researcher would read it aloud.
Options
Match · Maths ↔ Python
From symbols to Python
Code is notation too. Match each formula to the Python that computes it. One wrinkle to remember: Python counts from 0 while most papers count from 1, so a paper's usually becomes x[0].
Options
Proofs
The first proof comes in pieces: pick the lines in order, and leave out the ones that don't belong. The second you write yourself. You can use between dollar signs, and it's typeset as you type.
Proof puzzle
The average lies in between
Claim
For any real numbers , their average lies between them:
Tap lines in the order they should appear. Not every line belongs. Tap a line in your proof to send it back.
Your proof
- Pick the first line below.
Available lines
Prove it yourself
Odd times odd is odd
Claim
The product of two odd integers is odd. (An integer is odd if for some integer .)
Your typeset proof appears here.
Code it up
These problems work the way Project Euler's do. Since 2001, Project Euler has set mathematical puzzles that are meant to be solved by writing a short program. Each problem has exactly one answer. Read the notation carefully, write a few lines of code, and submit the number. You can use Python on your own machine, or open the runner under each problem to run Python right here in your browser.
Problem 1·Warm-up
One per cent of a learning rate
Many training runs shrink the learning rate as they go. A common schedule is exponential decay:
where is the initial learning rate, (gamma) is the decay factor and counts training steps. Read carefully: the in is a subscript (“at step ”), but the in is a power.
With and , what is the first step at which the learning rate drops below one per cent of where it started, that is, ?
Problem 2·Standard
Hats off to bias correction
Optimisers like Adam keep a running average of recent gradients, called an exponential moving average:
Because it starts at , the early averages are dragged towards zero. The fix wears a hat:
Two readings to get right: is “ at the previous step” (an index), while is “ to the power ”.
Let for (so , , , …) and . Compute , rounded to 4 decimal places.
Problem 3·Standard
Superscripts are not powers
A dataset has examples, . Each example has three features, written , and : the superscript says which example, the subscript says which feature. The features are
For how many examples is
This time the outer is a power: square the feature values.
Key takeaways
- Say it before you solve it. Every symbol has a name, and reading equations aloud is the first step to understanding them.
- Greek letters have habits: for parameters, or for learning rates, and for mean and spread, for penalties, for tiny numbers.
- Typefaces carry meaning: is a number, a vector, a matrix, a special object, a number system, and upright words are names.
- Subscripts are positions. Bracketed superscripts like are positions too, but a bare superscript like is a power.
- Decorations are adjectives: a hat is an estimate, a bar an average, a tilde a modified copy, a star the optimum. And defines, updates, approximates.
Checkpoint
Prove it to the labyrinth
Answer every question to clear this chamber. First-try answers earn the most XP.
Which Greek letter do ML papers most often use for all the parameters of a model?
How would you read aloud, and what does it usually mean?
Let be the mean of , and . What is ?
What does mean in ?
Which pair of symbols is notoriously easy to confuse?
Start from and apply with . What is ?
A statistics paper writes both and . What is the usual difference?
An algorithm box contains . How should you read the arrow?
End of the chamber
Clear this chamber
- Questions in this chamber (0/12 solved)Next unsolved
- Bonus: Alpha to Omega (+30 XP)
- Bonus: Problem 1: One per cent of a learning rate (+20 XP)
- Bonus: Problem 2: Hats off to bias correction (+35 XP)
- Bonus: Problem 3: Superscripts are not powers (+35 XP)
- Bonus: Proof: The average lies in between (+25 XP)
- Bonus: Proof: Odd times odd is odd (+40 XP)
- Bonus: Decode the paper (+30 XP)
- Bonus: Match: Say it aloud (+25 XP)
- Bonus: Match: From symbols to Python (+25 XP)