Machine Learning Before Transformers: A Working Foundation
Published:
One thread runs through all of it
It is tempting to read the history of machine learning as a list of unrelated tricks. It reads better as a single question asked repeatedly:
How much structure do we build into the model, and how much do we let the data decide?
Every method in this book is an answer to that. Linear regression builds in a great deal — it asserts the relationship is a straight line — and in exchange needs very little data and yields coefficients you can read. A Transformer builds in almost nothing about which positions should interact, and in exchange needs a great deal of data. Everything else sits between those poles.
What you need before the later books
Each book on this site leans on a specific part of this one:
- Transformers assumes softmax, cross-entropy, gradient descent, residual connections, and — most of all — that you know what a convolution’s fixed receptive field costs, because attention is the answer to that cost.
- Graph Neural Networks assume message passing is a generalisation of convolution, which only lands if convolution is solid first.
- Sheaf Neural Networks assume the graph Laplacian, eigen-decomposition, and the idea of a diffusion operator.
- Diffusion models assume maximum likelihood, the Gaussian, and the ELBO.
The chapters
Learning foundations — how a model is trained at all: the gradient descent update, why the learning rate can break everything, and backpropagation as reverse-mode differentiation.
Supervised learning — linear regression as a projection, logistic regression as linearity in the log-odds, and the classical non-linear workhorses.
Unsupervised learning — clustering, where the real lesson is that each algorithm encodes a different definition of what a cluster is, and dimensionality reduction.
Neural networks — the multilayer perceptron, then convolutions as a fully-connected layer with locality and weight sharing imposed, and recurrent models for sequences.
Activation functions — the three chapters already published, covering why non-linearity is required at all, the modern smooth-gating family, and output activations as a contract with your loss.
How to read it
If you are here to unblock a later book, read only what that book needs — the list above tells you which chapters those are. If you are building the foundation properly, read in order; each chapter assumes the ones before it and nothing else.
Every chapter follows the same shape: the intuition first, then the mathematics, then a worked example small enough to check by hand, then an honest section on what the method does not do. That last part is the one worth reading twice.
✅ Key Takeaways
- This book exists to make the other books readable, not to survey the field.
- The through-line is how much structure a model assumes versus how much it learns — that single axis orders everything from least squares to attention.
- Moving along that axis is a trade against data, compute, and interpretability. It is not a ranking, and the classical end is still the correct choice for a great many real problems.
- Chapters are ordered by dependency. Gradient descent first, because everything afterwards is trained with it.
