★ FOUR BRAND-NEW COURSES ANNOUNCED! ★ Machine Learning End To End  •  Hands-On Deep Learning with Python  •  Generative AI & LLMs with Python  •  AI Agents and Agentic AI with Python  ★  Open the “Educational” menu above to explore them ★  ★  NEW! 5. JOB ASSISTANCE: JD Report • Resume customization • AI Mock Interviews — FREE with course bundles, or just ₹499 / US$5. Single Payment. No Subscription. ★★ FOUR BRAND-NEW COURSES ANNOUNCED! ★ Machine Learning End To End  •  Hands-On Deep Learning with Python  •  Generative AI & LLMs with Python  •  AI Agents and Agentic AI with Python  ★  Open the “Educational” menu above to explore them ★  ★  NEW! 5. JOB ASSISTANCE: JD Report • Resume customization • AI Mock Interviews — FREE with course bundles, or just ₹499 / US$5. Single Payment. No Subscription. ★★ FOUR BRAND-NEW COURSES ANNOUNCED! ★ Machine Learning End To End  •  Hands-On Deep Learning with Python  •  Generative AI & LLMs with Python  •  AI Agents and Agentic AI with Python  ★  Open the “Educational” menu above to explore them ★  ★  NEW! 5. JOB ASSISTANCE: JD Report • Resume customization • AI Mock Interviews — FREE with course bundles, or just ₹499 / US$5. Single Payment. No Subscription. ★★ FOUR BRAND-NEW COURSES ANNOUNCED! ★ Machine Learning End To End  •  Hands-On Deep Learning with Python  •  Generative AI & LLMs with Python  •  AI Agents and Agentic AI with Python  ★  Open the “Educational” menu above to explore them ★  ★  NEW! 5. JOB ASSISTANCE: JD Report • Resume customization • AI Mock Interviews — FREE with course bundles, or just ₹499 / US$5. Single Payment. No Subscription. ★

Why recurrence isn't enough: reading a sentence all at once

Why recurrence isn't enough: reading a sentence all at once
12-10-2026  |  By Tejas Desai, Ecube Analytics  |  Generative AI: Transformer on-ramp (Chapter 1)  |  3 min read
READ 3RD OF 8 IN THIS SERIES

Why recurrence isn't enough: reading a sentence all at once

Transformer on-ramp · Part 3 of 8

Before transformers, language models read like a person reading with a finger: one word after another. That works until the sentence gets long, or until you want to train on a mountain of text.

How a recurrent network reads

A recurrent network (RNN) reads a sentence one token at a time. After each token it updates a small memory, the hidden state, and hands it to the next step. Gated versions such as the LSTM are better at deciding what to keep, but the basic shape is the same: a chain.

Recurrence versus attentionTop: a recurrent network passes information token by token. Bottom: attention connects every token to every other token in one step.Recurrent network: one hand-off per tokenkeysthatIlefttherearethe subject (“keys”) must survive 5 hand-offs to reach “are”Attention: every token looks at every other token directlykeysthatIlefttherearePath between any two tokens: 1 hop with attention, up to n ? 1 hand-offs with recurrence.
Top: information about “keys” has to be passed along five times before it reaches “are”. Bottom: attention lets “are” look at “keys” directly.

Two problems with a chain

  1. It is slow to train. Step 5 needs the result of step 4, so you cannot process all positions at once. Modern GPUs are built to do many things in parallel, and a chain wastes that.
  2. Long-range links fade. Take “The keys that I left there are missing.” The verb has to agree with “keys”, which is far away. Everything in between has to carry that fact forward, and even with gating it tends to degrade over long distances.

The transformer’s answer

Throw out the chain. Let every token look at every other token directly, all at once. The path between any two words is one hop, however far apart they are, and the whole sentence can be processed in parallel. That mechanism is called attention, and it is the subject of the next three parts.

There is a price. If every token looks at every other token, the table of scores has length × length entries. Double the text and that table grows four times. Keep this in mind: it is why long documents are expensive for transformers.

Takeaways

  • A recurrent network is a chain: one hand-off per token.
  • Chains train slowly because steps cannot run in parallel.
  • Information from far back fades, even with gating.
  • Attention connects every token to every other token in one hop, at a cost that grows with the square of the length.

Next in the series (Part 4): Self-attention: every word looks at every other word

This blog is from chapter 1, course-2-generative-ai of 4 world-class courses on aibits.ecubeanalytics.com
← Previous Article 3 of 8 in this series Next →