about
Alice's Adventures in a Differentiable Wonderland (arxiv.org)
1 point by Schiphol on May 2, 2024 | hide | past | pdf | 2 comments on HN

In plain words: A beginner's guide to building neural networks from simple math pieces that computers tune automatically by following the slope of their mistakes. It explains the core building blocks for sequences, images, text, and audio with working code, enough to read large language models.

Abstract · Alice's Adventures in a Differentiable Wonderland -- Volume I, A Tour of the Land

Neural networks surround us, in the form of large language models, speech transcription systems, molecular discovery algorithms, robotics, and much more. Stripped of anything else, neural networks are compositions of differentiable primitives, and studying them means learning how to program and how to interact with these models, a particular example of what is called differentiable programming. This primer is an introduction to this fascinating field imagined for someone, like Alice, who has just ventured into this strange differentiable wonderland. I overview the basics of optimizing a function via automatic differentiation, and a selection of the most common designs for handling sequences, graphs, texts, and audios. The focus is on a intuitive, self-contained introduction to the most important design techniques, including convolutional, attentional, and recurrent blocks, hoping to bridge the gap between theory and code (PyTorch and JAX) and leaving the reader capable of understanding some of the most advanced models out there, such as large language models (LLMs) and multimodal architectures.

Simone Scardapane
arXiv:2404.17625 · cs.LG, cs.AI · submitted Apr 26, 2024 · updated Aug 29, 2025
abstract · pdf · html · Companion website for additional chapters: https://www.sscardapane.it/alice-book

add comment on HN
Also discussed: Jun 2025 (157 points, 26 comments) · Nov 2024 (1 point, 0 comments) · Jul 2024 (3 points, 1 comment) · May 2024 (4 points, 0 comments)

HN discussion[0] (226 points, 2 days ago, 96 comments)

[0]: https://news.ycombinator.com/item?id=40213292

Hm, thanks. I count on HN recognizing when I'm reposting something recent, but apparently shouldn't.

Edit: yeah, cases such as this, with two unrelated urls, are hard