The previous lesson's Remark identified RNNs' core weakness: information from early time steps has to survive being carried, step by step, all the way to wherever it is needed, and the vanishing-gradient mechanism makes that carry unreliable over long sequences. Attention mechanisms solve this by letting a model look directly back at any earlier position, rather than relying on a compressed running state — and the Transformer architecture takes this to its logical extreme, discarding recurrence entirely and building a state-of-the-art sequence model out of attention alone. This closing note of the topic surveys both, then points, at survey level only, to the self-supervised pretraining paradigm and the deep generative models this foundational unit does not have room to cover in full.
In this lesson
- Learning objectives
- Attention as a shortcut through the sequence
- The Transformer: attention without recurrence
- Frontier pointers (survey level only)
- Worked example
Before you start
The full lesson, with worked examples and exercise solutions, is for members.
Read the full lessonNew to SelfMadeQuant.com? See membership options or explore the curriculum.