HackerPapers

arXiv:2404.17625cs.LG

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

Simone Scardapane

Abstract

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.

arXiv comments
Companion website for additional chapters: https://www.sscardapane.it/alice-book
Journal reference
DOI
Subjects
cs.LGMachine Learning cs.AIArtificial Intelligence

On Hacker News

Linked by 2 identifiable commenters in 4 comments across 4 threads, from Apr 2024 to Nov 2024. Found in 5 HN submissions from May 2024 to Jun 2025. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments4 threads

    • LLMs and neural nets from first principles: https://arxiv.org/pdf/2404.17625 (pdf) https://news.ycombinator.com/item?id=40408880 (llama3 implementation) https://news.ycombinator.com/item?id=40417568 (my comment on llama3 with breadcrumbs) Admittedly, I'm way behind on how this…

      zackmorrisView on HNParent context

  1. Conway's Gradient of Life 1 comment
    • Not exactly an answer to your question, but in the ballpark and hopefully you might find interesting https://arxiv.org/pdf/2404.17625 In the section on "Automatic differentiation" he considers the question of differentiable computation graphs.

      seanhunterView on HNParent context

    • Ya there are concepts in programming and math that are mostly self-teachable from first principles, but then there's what looks like gibberish because it's too new to have been distilled down into something tractable yet. I would say that arrays and matrices are straightforward…

      zackmorrisView on HNParent context

    • Ya so far this is the best introduction to neural networks from first principles that I've seen. Quickly skimming the draft pdf at https://arxiv.org/pdf/2404.17625 I can grok it instantly, because it's written in familiar academic language instead of gobbledygook. Anyone with an…

      zackmorrisView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.