Machine Learning, FoundationsLesson 81 of 92

Module 8 · Neural networks, built from what you already know

Sequences: from recurrence to attention

In this lesson

  • 9 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 9 of 10 in this chapter

This chapter’s goalExplain why a multi-layer network with no non-linearity collapses to a single linear model, trace one backpropagation step through a two-layer network by hand, diagnose a training failure from the loss curve and the gradients, and fine-tune a pretrained model on a few hundred labelled examples using free compute.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmWatch1:55Not available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 9Free · no account needed
Lesson steps

The problem with a sequence

A sentence, a time series, a sequence of user actions. Two properties break the tools so far: the length varies, and order matters.

Recurrent networks, and their ceiling

Process one element at a time, carrying a hidden state forward:

Text
h_t = f(W_h * h_{t-1} + W_x * x_t)

The state is a running summary of everything seen so far. Elegant, handles any length, and it dominated sequence modelling for two decades.

It has two problems that turned out to be fatal.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the How a Language Model Actually Works exam.

Stuck on something?Ask Funke, your AI tutor

How to cite: Addaly (2026) ‘Sequences: from recurrence to attention’, in Machine Learning, Foundations. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/machine-learning-foundations/from-sequences-to-attention (Accessed: 29 November 2026).