Backpropagation and autograd
He teaches backprop as recursive local applications of the chain rule over a computation graph. He calls it a leaky abstraction that practitioners must understand by hand.
Based on Andrej Karpathy's public content. Not affiliated with or endorsed by Andrej Karpathy.
Rules
Covered in
The spelled-out intro to neural networks and backpropagation: building micrograd
Karpathy teaches neural-network training from first principles by building micrograd, a scalar-valued automatic-gradient engine, and then using it to construct and train a multilayer perceptron. He explains derivatives as local sensitivities, backpropagation as recursive application of the chain rule through a computation graph, and training as repeated forward, backward, gradient-reset, and parameter-update steps.
GitHub · micrograd: A tiny scalar-valued autograd engine and a neural net library on top of it with PyTorch-like API
This README presents micrograd, a tiny scalar-valued autograd engine (about 100 lines) implementing backpropagation over a dynamically built DAG, plus a ~50-line neural net library with a PyTorch-like API. Karpathy shows that operating on individual scalars is enough to build and train deep neural nets, and he points to microgpt as a single-file complete GPT algorithm where everything else is just efficiency. He frames it as potentially useful for education.
Building makemore Part 4: Becoming a Backprop Ninja
This source describes a lesson in which Karpathy takes a 2-layer MLP with BatchNorm from a previous video and backpropagates through it manually, without using PyTorch autograd's loss.backward(). He walks through each component in turn, from the cross entropy loss back to the embedding table, so that learners build intuition for how gradients flow. The provided text is a short, truncated description, so only its outline can be noted.
Neural Networks: Zero To Hero
This is the course page for Karpathy's 'Neural Networks: Zero To Hero', which teaches neural networks by building them from scratch in code. It starts with backpropagation and works up to GPT and tokenizers. He argues that language models are an excellent vehicle for learning deep learning in general.
Yes you should understand backprop | by Andrej Karpathy | Medium
Karpathy teaches that backpropagation is a leaky abstraction whose mechanics must be understood to build and debug neural networks effectively. He demonstrates how backward-pass behavior causes saturated sigmoids, dead ReLUs, unstable RNN gradients, and a subtle DQN clipping bug, then recommends intuition-focused study and manual implementation.
microgpt
Karpathy teaches the complete algorithmic essence of training and running a GPT by reducing it to a dependency-free, 200-line Python program. He explains how data, tokenization, autograd, Transformer architecture, optimization, training, and inference fit together, while distinguishing the core algorithm from the engineering required to operate production-scale LLMs.
Building makemore Part 3: Activations & Gradients, BatchNorm
This source, a short video description, says Karpathy examines the internals of multi-layer MLPs. He looks at the statistics of forward-pass activations and backward-pass gradients, the pitfalls of scaling them improperly, and the typical diagnostic tools and visualizations used to understand them. The text is cut off, so these notes cover only the description.
GitHub · nn-zero-to-hero: Neural Networks: Zero to Hero
This README outlines Karpathy's course that teaches neural networks from the basics by coding and training them together, progressing from a scalar autograd engine (micrograd) through character-level language models (makemore) to building GPT and its tokenizer from scratch. He emphasizes hands-on implementation, understanding internals like gradients and activations, and building intuition that enables debugging and innovation.