# What loss.backward() Actually Does: A Deep Dive into PyTorch Mechanics

> Hacker News story 48873239 · language: en · submitted 2026-07-11
> Web version: https://zeli.app/story/48873239
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 18 · by [oraziorillo](<https://news.ycombinator.com/user?id=oraziorillo>) · 💬 3
[original](<https://oraziorillo.com/blog/what-loss-backward-actually-does/>) · [HN discussion](<https://news.ycombinator.com/item?id=48873239>)

## Summary

I built microcrad, a simple automatic differentiation engine inspired by Andrej Karpathy's micrograd, to reveal exactly what happens when you call loss.backward(). By breaking down local derivatives and the chain rule, I show how reverse-mode automatic differentiation computes gradients for all parameters in a single sweep, making neural network training possible.

## Key quote

> This asymmetry is the entire reason neural networks are trainable at all.

---

## Cite

- Page: https://zeli.app/story/48873239
- Date: 2026-07-11
- Source: oraziorillo.com (https://oraziorillo.com/blog/what-loss-backward-actually-does/)
- Hacker News: https://news.ycombinator.com/item?id=48873239

## Other languages

- zh: https://zeli.app/zh/story/48873239 · markdown: https://zeli.app/zh/story/48873239.md
- ja: https://zeli.app/ja/story/48873239 · markdown: https://zeli.app/ja/story/48873239.md
- ko: https://zeli.app/ko/story/48873239 · markdown: https://zeli.app/ko/story/48873239.md
- de: https://zeli.app/de/story/48873239 · markdown: https://zeli.app/de/story/48873239.md
- es: https://zeli.app/es/story/48873239 · markdown: https://zeli.app/es/story/48873239.md
