Mathematics in Deep Learning
Mathematics in Deep Learning
A textbook on the mathematical objects that shape modern deep learning, from tensors and optimization to attention, generative models, vision, audio, and reinforcement learning.
Public excerpts
Sample Chapters
Sample chapters are released under the CC BY-NC-ND 4.0 license.
Mathematical Language of Deep Learning
The book's opening vocabulary for inputs, labels, shapes,
parameterized functions, losses, gradients, and generalization.
Open PDF
Linear Operators, Images, and Convolution
A visual chapter on image tensors, local patches, kernels,
convolution, channels, pooling, and translation equivariance.
Open PDF
Attention, Self-Attention, and Transformer Algebra
Queries, keys, values, masks, positional information, multi-head
attention, cross-attention, and transformer blocks.
Open PDF
Autoregressive Modeling, Entropy, and Decoding
Next-token prediction, entropy, cross-entropy, KL divergence,
perplexity, and decoding rules for language models.
Open PDF
Generative Modeling: VAEs, GANs, Score Matching, and Diffusion
Distribution learning, latent-variable reconstruction,
adversarial objectives, score models, and diffusion denoising.
Open PDF
Book contents
Table of Contents
Free chapter overview slides are released under the CC BY-NC-ND 4.0 license.