Skip to content
Deep learning Foundation 7 min read

Deep learning at 2,000 ft

Deep learning is one idea pursued relentlessly: build a function out of many simple differentiable layers, define a loss that says how wrong it is, and let gradient descent, driven by backpropagation, tune every parameter at once. This track builds that machine by hand, from a single neuron to a deep residual network, and then teaches you to train it properly.

10,000 ft

Every system behind the 2012–2026 AI boom is a deep network: the convolutional nets that won ImageNet in 2012, the transformers behind every large language model (transformers and LLMs), the diffusion models that generate images (generative models) and the policy and value networks of AlphaZero and RL-trained reasoning models (reinforcement learning). What they share is not an architecture but a method: representations are learned end to end from data, rather than designed by hand, by differentiating a loss through a deep composition of layers. Classical machine learning (the ML track) taught you to fit a model to features; deep learning learns the features too. Everything later on this site assumes the mechanics in this track: what a layer computes, how gradients flow, why depth needs care, and what to do when training goes wrong.

The whole of deep learning in one loop

Strip away the architectures and every deep learning system runs the same loop millions of times:

The training loop every deep network runs
The training loop every deep network runs. mini-batch (x, y), forward pass layers: affine + nonlinearity, loss how wrong?, backward pass autodiff: ∂loss/∂θ, optimiser step θ ← θ − η·update, next batchThe training loop every deep network runs. mini-batch (x, y), forward pass layers: affine + nonlinearity, loss how wrong?, backward pass autodiff: ∂loss/∂θ, optimiser step θ ← θ − η·update, next batch

Five ingredients decide whether that loop produces something useful, and each has its own part of this track:

Ingredient The question it answers Where
Architecture What family of functions can the network express, and what does it assume about the data? MLPs, CNNs, RNNs, residual networks, embeddings
Gradients How do we get \(\partial L/\partial\theta\) for a billion parameters cheaply? backpropagation, autodiff
Trainability Will signals and gradients survive 100 layers? activations, initialisation and normalisation, residuals
Optimisation How do we turn gradients into good steps? optimisers
Generalisation Why does a network with more parameters than data points work on new data? regularisation, the training recipe

The mental model to keep

A deep network is a stack of learned coordinate changes. Each layer re-describes its input in coordinates that make the next layer's job easier, until the last layer's job is a straight line. Training is gradient descent on all the coordinate changes at once. Most of the engineering in this track exists to keep that gradient descent well-behaved as the stack gets deep.

The map of the track

The pages build on each other. Arrows mean "you need this first"; the left half is the engine, the right half is what you build with it.

Deep learning: how the ideas connect
Deep learning: how the ideas connect. Neurons, perceptrons and MLPs, Backpropagation, Automatic differentiation, Activation functions, Initialisation and normalisation, Optimisers, Regularisation, Convolutional networks, RNNs and LSTMs, Embeddings, Residual networks, Training recipe (and debugging)Deep learning: how the ideas connect. Neurons, perceptrons and MLPs, Backpropagation, Automatic differentiation, Activation functions, Initialisation and normalisation, Optimisers, Regularisation, Convolutional networks, RNNs and LSTMs, Embeddings, Residual networks, Training recipe (and debugging)

How to work through this track

The track is two units. Unit 1 (this page and the next five) is the engine: a neuron, how gradients are computed, and how to make depth trainable. Unit 2 is the craft: optimisers, regularisation, the classic architectures and a practical training recipe.

  1. Neurons, perceptrons and MLPs (about 1 hour). The building block, XOR, universal approximation and why depth beats width.
  2. Backpropagation from scratch (about 75 minutes). Derive and implement it; the single most important page in the track. Do the Build it section by hand.
  3. Automatic differentiation (about 70 minutes). Generalise backprop to any program; forward versus reverse mode; how PyTorch and JAX work.
  4. Activation functions (about 50 minutes). Sigmoid to ReLU to GELU to SwiGLU, and the one number (\(\chi\)) that explains the history.
  5. Initialisation and normalisation (about 70 minutes). Xavier, He, BatchNorm, LayerNorm, RMSNorm and pre-norm.
  6. Optimisers, regularisation, CNNs, RNNs and LSTMs, embeddings, residual networks and the training recipe: roughly an hour each.

Budget 12–15 hours of real study for the whole track, plus the projects. Two fast paths:

The one exercise that teaches the most

Write backpropagation for a two-layer MLP in NumPy with no framework, gradient-check it, and train it on a toy dataset until it hits 100% training accuracy. Then add three layers and switch the activation to sigmoid, and watch it stop learning. The backpropagation page gives you the starting code; the rest of unit 1 explains everything that goes wrong.

Every page in the track

Deep learning in seven dates

Year Event Read
1958 Rosenblatt's perceptron learns a linear boundary MLPs
1986 Rumelhart, Hinton and Williams popularise backpropagation backprop
1989 LeCun's convolutional network reads handwritten zip codes CNNs
1997 Hochreiter and Schmidhuber's LSTM RNNs
2012 AlexNet wins ImageNet with ReLUs, dropout and GPUs activations
2015 Batch normalisation; ResNet trains 152 layers normalisation, residuals
2017 The transformer the transformer block

Bengio, Hinton and LeCun received the 2018 ACM Turing Award for this work, and Hinton shared the 2024 Nobel Prize in Physics with John Hopfield "for foundational discoveries and inventions that enable machine learning with artificial neural networks". The full story is in the deep learning reset.

Prerequisites from other tracks

You need these before or alongside unit 1:

Helpful but not required: optimisation, bias, variance and regularisation, floating point and log-sum-exp.

The five best resources for this track

  • Neural Networks: Zero to Hero — Andrej Karpathy. From micrograd to a GPT, in code, at the pace of a patient tutor. If you only do one thing alongside this track, do this.
  • Understanding Deep Learning — Simon J. D. Prince, MIT Press 2023, free PDF. The best modern textbook: precise, beautifully illustrated, with notebooks.
  • Neural networks — 3Blue1Brown. The visual intuition for layers, gradient descent and backpropagation, then transformers.
  • Deep Learning — Goodfellow, Bengio and Courville, 2016. Still the reference for the foundations (part II), free online.
  • Deep learning — LeCun, Bengio and Hinton, Nature 2015. Ten pages from the three Turing laureates on what deep learning is and why it works; the best single overview paper.

Where this leads