Chapter 15

From Recurrence to Attention

Sequential bottlenecks, fixed hidden-state bottlenecks, direct access to earlier positions, alignment intuition, weighted reading, and long-context motivation.

What this chapter does

Attention becomes natural once the reader has seen the limits of fixed windows and recurrent hidden states.

Lessons

Read these in order.

Start with the chapter introduction, then move through the topic lessons. The order is chosen so each page can reuse ideas from the pages before it.

  1. 01
    Introduction

    Why attention follows naturally after recurrence and gated recurrence.

  2. 02
    Sequential Bottleneck

    Why recurrent order limits parallelism.

  3. 03
    Fixed Hidden-State Bottleneck

    Why one fixed state can compress too much history.

  4. 04
    Direct Access to Earlier Positions

    Attention as a more direct route to previous token representations.

  5. 05
    Alignment Intuition

    Attention weights as soft alignment over useful positions.

  6. 06
    Attention as Weighted Reading

    Combining representations with learned weights.

Before moving on

  • Explain attention as a response to earlier limitations.
  • Compute a tiny weighted average over previous token representations.
  • Understand why attention changes parallelism and long-context behavior.

Where this leads

  • Transformers
  • Language Modeling as a Foundation for LLMs

Chapter progress