Good videos, with context.
The spelled-out intro to neural networks and backpropagation: building micrograd

Micrograd tutorial: backpropagation from scratch

Andrej Karpathy
17 HN recommenders · discussed 2022–2025
Open YouTube ↗

HackerTube viewing guide · Source-checked November 2, 2026

Before you press Play

Choose micrograd when autograd feels like a black box. Scalar operations make it possible to inspect one derivative at a time before tensor broadcasting adds another source of mistakes.

Unlike the 3Blue1Brown introduction, this is a code-along. Unlike makemore, its main question is how gradients are computed, rather than how to evaluate a language model.

Work toward these outcomes

  • Trace a scalar computation graph and accumulate gradients with the chain rule.
  • Implement a Value object with per-operation backward rules and a reverse traversal.
  • Connect scalar autodiff to a small neural-network training loop.

Bring these foundations

  • Basic Python: functions, classes, arithmetic and reading a loop.
  • A recollection of derivatives and the chain rule; this is the author’s stated starting point.
  • A notebook environment for following along. NumPy, plotting and Graphviz appear in the course notebook.

A useful readiness check

Rebuild a tiny expression graph without copying the notebook. Reuse one Value in two branches and explain why contributions to its gradient must be added. This is our suggested readiness check, not a completion guarantee.

Micrograd tutorial chapters

Selected landmarks from the creator’s chapter list (2:25:52 total). Choose a timestamp to load the YouTube player at that point; without JavaScript, the link opens YouTube.

  1. 8:08derivative of a simple function with one input
  2. 19:09starting the core Value object of micrograd and its visualization
  3. 32:10manual backpropagation example #1: simple expression
  4. 1:09:02implementing the backward function for each operation
  5. 1:17:32implementing the backward function for a whole expression graph
  6. 1:22:28fixing a backprop bug when one node is used multiple times
  7. 1:43:55building out a neural net library (multi-layer perceptron) in micrograd
  8. 2:01:12doing gradient descent optimization manually, training the network

See every chapter in the creator’s description

Original course files and resources

Next in your learning path

Return to the machine learning guide

About this video

Andrej Karpathy's first Neural Networks: Zero to Hero lecture, which builds micrograd, a tiny autograd engine, from scratch in Python. It explains backpropagation and neural network training step by step, assuming only basic Python and some high-school calculus.

Why it appears in the archive

HN treats it as the best starting point for really understanding backprop and neural nets, because Karpathy explains the why with intuition and builds everything in code.

AI-generated summary and labels from the source dataset; verify important details against the video. Source & credits.

From the Hacker News discussion

Geee · 2022-11 · strong rec

I recommend watching Andrej Karpathy's recent videos on backprop and neural nets. Makes it really simple and intuitive. The spelled-out intro to neural networks and backpropagation: [VIDEO] Becoming a backprop ninja: [LINK]

Read original comment ↗
ian0 · 2023-02 · strong rec

For those who dont know, Andrej has a brilliant series of videos on youtube where he explores the basics of neural nets right up to transformer architecture through code. Starts here [0] and most recent is building GPT from scratch in code. [VIDEO]

Read original comment ↗
base698 · 2023-03 · strong rec

The ChatGPT video by Karpathy is the last in a 7 video series. The one that really hit it home for me was the first video on MicroGrad [1]. The second video builds on MicroGrad and is also great for understanding how a basic NN works. [1] [VIDEO]

Read original comment ↗
gavi · 2023-05 · strong rec

I highly recommend the video from karpathy [VIDEO] - This explains the same idea spelled out in code. It really helped me understand the mathematical expression graph of neural networks. He uses graphviz to show the expressions and initially calculate gradients manually and then implement back propagation.

Read original comment ↗
radq · 2023-06 · strong rec

Andrej Karpathy's "zero to hero" series [1] was how I learned the fundamentals of this stuff. It's especially useful because he explains the why and provides intuitive explanations instead of just talking about the what and how. Would recommend it if you haven't checked it out already. [1] [VIDEO]

Read original comment ↗
paulsmith · 2023-09 · strong rec

Watch Karpathy's recent lectures. They're gold. Start here[1] with micrograd[2]. It doesn't use linear algebra/matrices to start, but the principles are the same. The matrix multiplication is how the weights of the connections between neurons and the input values are combined (to form an activation value that then may lead to that neuron "firing" or not, depending on whether it passes some threshold function). We use matrices to model the connections between neurons - each row is a connection, and each column is a weight corresponding to an input. [1] [VIDEO] [2] [LINK]

Read original comment ↗
throwaway7783 · 2025-05 · strong rec

In the same vein, Karpathy's video series "Neural Networks from zero to hero"[0] touches upon a lot of this and intuitions as well. One of the best introductory series (even if you ignore the neural net part of it) and brushes on gradients, differentiation and what it means intuitively. [0] [VIDEO]

Read original comment ↗
jackdoe · 2025-06 · strong rec

For studying? Mainly watching and re-watching Karpathy's 'Zero To Hero'[1] and Stanford's 'Introduction to Convolutional Neural Networks for Visual Recognition'[2], also a lot of transformers from scratch videos like Umar Jamali's videos[3], and I also study backwards to McCulloch and Pitts. Reading the 30 papers [LINK] and so on. And of course Yannic Kilcher[4], and also listening in on the paper discussions they do on discord. Practicing a lot with just doing backpropagation by hand and making toy models by hand to get intuition for the signal flow, and building all kinds of smallish systems, e.g. how far can you push whisper, small qwen3, and kokoro to control your computer with voice? People think that deepseek/mistral/meta etc are democratizing AI, but its actually Karpathy who teaches us :) so we can understand them and make our own. [1] [VIDEO] [2] [LINK] [3] [LINK] [4] [LINK]

Read original comment ↗