Trees and open fields in a painting by Louis Peyré
Painting detail by Louis Peyré (1923–2012)About the paintings

Companion resources

Mathematics of Machine Learning

A course in 10 lectures, from optimization to generative models and optimal transport. Follow the mathematical ideas, then explore them through notebooks and worked examples.

10 lectures · 2 hours each9 PDF transcriptsNotebooks · Slides · Further reading

Before you begin. Familiarity with linear algebra, multivariable calculus, and basic probability will help. The lectures emphasize the main concepts and methods; the linked books provide fuller proofs and background.

Each lecture gathers its topics, practical materials, and suggested reading. Transcripts are available for lectures 1–9. Lecture 10 is supported by the OT4ML book, slides, and notebooks.

Lecture 01

Smooth optimization

Read the transcript PDF

Topics

  • Introduction and motivation
  • Gradients, Jacobians, Hessians
  • Gradient descent and acceleration
  • Stochastic Gradient Descent (SGD)

Lecture 02

From smooth to nonsmooth optimization

Read the transcript PDF

Topics

  • Proofs of gradient descent and acceleration
  • Linear models and regularization
  • Ridge versus Lasso
  • ISTA Algorithm

Lecture 03

Lasso and compressed sensing

Read the transcript PDF

Topics

  • Examples of non-smooth functionals (Lasso, TV regularization, constraints)
  • Subgradient and proximal operators
  • Forward-backward splitting, connection with FISTA
  • ADMM, Douglas-Rachford (DR), Primal-Dual
  • Compressive sensing theory

Further reading

  • A Mathematical Introduction to Compressive Sensing by Simon Foucart and Holger Rauhut (advanced)
  • Convex Optimization, by Boyd and Vandenberghe
  • Proximal Algorithms, by N. Parikh and S. Boyd

Lecture 04

Kernels and neural-network architectures

Read the transcript PDF

Topics

  • Transition from ridge regression to kernels
  • Multilayer Perceptron (MLP)
  • Convolutional Neural Networks (CNN)
  • ResNet architecture
  • Transformer models

Further reading

Lecture 05

Deep learning: theory and computation

Read the transcript PDF

Topics

  • Review of MLP and its variants (CNN, ResNet)
  • Theoretical framework of two-layer MLPs
  • Gradient and Jacobians in neural networks
  • Introduction to backpropagation

Further reading

Lecture 06

Differentiable programming

Read the transcript PDF

Topics

  • Recap on Gradient and Jacobian
  • Forward and reverse mode automatic differentiation
  • Introduction to PyTorch
  • The adjoint method in computational mathematics

Lecture 07

Sampling and diffusion models

Read the transcript PDF

Topics

  • Refresher on Stochastic Gradient Descent (SGD)
  • Introduction to Langevin dynamics
  • Overview of diffusion models

Notebooks & materials

Lecture 08

Language models and generative AI

Read the transcript PDF

Topics

  • Overview of different generative model concepts
  • Introduction to generative models (VAE, GANs, U-Net, diffusion)
  • Self-supervised learning and next-token prediction
  • Tokenizers
  • Transformer architectures, FlashAttention
  • State space models

Lecture 09

Generative models

Read the transcript PDF

Topics

  • Understanding generative models as density fitting techniques.
  • Basics of Maximum Likelihood Estimation and f-divergences.
  • Gaussian mixtures and the Expectation-Maximization algorithm.
  • Variational Autoencoders (VAE).
  • Introduction to Normalizing Flows.
  • Generative Adversarial Networks (GANs), Wasserstein GANs (WGANs).
  • Diffusion Models.

Lecture 10

Optimal transport

Read OT4ML

Topics

  • Introduction to Monge and Kantorovich formulations.
  • The Sinkhorn algorithm.
  • Training of generative models.
  • Duality and Wasserstein GANs.

Further reading