Course syllabus

AI and Deep Learning: the course outline

What the course covers, what you should be able to do at the end of it, how it is taught, and what to read. The decks are on the slides page and the notebooks on the practicals page.

InstructorDr Fatih Kansoy
LengthFour teaching days
TeachingMonday to Thursday
FormatLectures with worked examples
PrerequisitesNo programming assumed
MathsArithmetic and a little algebra

Course description

Deep learning covers the methods behind most current artificial intelligence: image recognition, speech, translation, and language models. The course builds them from the smallest piece upwards, and keeps the worked examples small enough to check by hand.

Day 1 constructs a neural network from a single unit and runs one forward pass, ending at the loss. Day 2 derives the result that turns that loss into a parameter update, trains the network, then asks what it should assume about an image. Day 3 turns to language, computes attention by hand, and separates a fluent answer from a supported one. Day 4 covers what changes when a system stops answering questions and starts taking actions that alter records.

Each method is presented with the failure it is known for, and each day states what its evidence does and does not establish.

Aims

  • to give a working, mechanical understanding of neural networks rather than a vocabulary for talking about them;
  • to show where the numbers come from, so that published claims about models can be read critically;
  • to distinguish what a model computes from what a system does, and to place the controls at that boundary;
  • to leave you able to ask of any reported AI result which population it describes, what it was compared against, and what it does not cover.

Learning outcomes

By the end of the course you can:

  • reconstruct a small feedforward network from the input tensor to a parameter update, naming every object, its shape, and the operation that produced it;
  • explain why nonlinear hidden layers are necessary, and why any stack of affine layers is never more than one affine layer;
  • read training and held-out curves, and separate a lower training loss from credible evidence of generalisation;
  • state which population a held-out number describes, and what would have to change for it to stop applying;
  • explain what convolution assumes about an image, count the parameters of a small convolutional network from its shapes, and audit which part of an image a model actually used;
  • describe what attention computes, what next-token training optimises, and why neither has any relation to truth;
  • explain what retrieval fixes, what it does not, and when a system should abstain instead of answering;
  • identify the point at which a system changes state rather than belief, and name the controls that belong there: tool contracts, least privilege, approval binding, and staged deployment.

Session overview

Session 1

Inputs, Units, Depth, and the Loss

A clothing catalogue needs seventy thousand photographs sorted, and no one can write the rule. The session builds the network that can. Inputs, targets and tensors; one artificial unit, then a dense layer, with the weighted sum, the bias and the activation each doing a separate job; why a stack of layers without a nonlinearity is never more than one layer, shown by collapsing it. ReLU bends are then added until the network can separate points no straight line can. A complete forward pass follows, from the input vector through the hidden representation to logits, softmax, and one scalar loss. The day ends there, on a single number that says how wrong the network is.

Session 2

Training, and Seeing with Convolution

Backpropagation opens the session: the chain rule applied backwards from the loss, one weight at a time, until every parameter has a derivative; then gradient descent, the learning rate, batches and epochs, and one update checked by recomputing the loss. Generalisation follows, with training and validation curves read together and the test set kept closed. The second half gives the same network an image. Why a dense layer is the wrong prior for one; filters, feature maps, channels and pooling, with the output-size formula applied rather than quoted; transfer learning when labels are scarce; and the audit, where a confusion matrix, a saliency map and a changed background test whether the model used the subject or the background.

Session 3

Transformers, Language Models, and Retrieval

Turning text into numbers: tokens, vocabulary, embeddings and position. Attention is worked by hand on a three-token example, then multi-head attention and the transformer block. We measure what next-token training actually optimises with cross-entropy and perplexity, and see what temperature does to the output. Retrieval-augmented generation closes the session: chunking, similarity ranking, the context budget, and the case where a stale passage outranks an irrelevant one, followed by citation, claim support and the decision to abstain.

Session 4

Agents, Authority, and Deployment

The move from changing beliefs to changing state. Tools as contracts, structured calls, and what makes a call well-formed but still wrong. State, memory and idempotency. A full agent trajectory is followed step by step, including the well-formed request that the gate refuses. Authority comes next: least privilege, approval bound to an exact prepared action, and human confirmation that means something. Then the failure modes, compounding error, stale state, and instructions hidden inside retrieved content, and finally evaluation of trajectories rather than answers, with staged deployment.

Teaching and assessment

Each day is a lecture built around one continuous worked example, with the arithmetic done in front of you. No programming is assumed to follow the lectures; every number on the slides can be checked with a calculator. Each day also has a laboratory notebook, which does require Python, and which runs offline on a CPU.

Reading

Nothing here is required. Everything listed is freely available.

  • Goodfellow, Bengio and Courville, Deep Learning (MIT Press, 2016), chapters 6 to 9 and 11. The standard reference; chapter 6 covers Day 1 and chapter 9 covers Day 2.
  • Nielsen, Neural Networks and Deep Learning, chapters 1 to 3. The gentlest correct introduction to the material of Day 1.
  • Rumelhart, Hinton and Williams (1986), ‘Learning representations by back-propagating errors’, Nature 323, 533–536. Four pages, and still the clearest statement of the idea.
  • LeCun, Bottou, Bengio and Haffner (1998), ‘Gradient-based learning applied to document recognition’. Where convolutional networks were first set out in full.
  • Vaswani et al. (2017), ‘Attention is all you need’. The transformer paper behind Day 3.
  • Lewis et al. (2020), ‘Retrieval-augmented generation for knowledge-intensive NLP tasks’. The architecture Day 3 spends its second half on.
  • Selvaraju et al. (2017), ‘Grad-CAM’, and Adebayo et al. (2018), ‘Sanity checks for saliency maps’. Read them in that order; the second is the reason Day 2 treats saliency as a diagnostic and not an explanation.
  • Geirhos et al. (2020), ‘Shortcut learning in deep neural networks’. The failure mode that a random split cannot catch.
  • Xiao, Rasul and Vollgraf (2017), Fashion-MNIST. The dataset used throughout Day 1.
  • Parkhi et al. (2012), the Oxford-IIIT Pet dataset. The running case for Day 2.
A companion course. The four-day AI and Machine Learning course covers the classical workflow: framing a decision, preparing data, fitting and evaluating models, and unsupervised methods. Either course can be taken on its own.
Oxford · United Kingdom
University of Oxford