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 survey note of Topic 6 introduces both ideas at introductory depth, then points to self-supervised pretraining and generative models without developing them here. For QKV formalism, gated memory, seq2seq, and generative deep learning, continue in the Neural Networks and AI unit.
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 browse the Financial Machine Learning syllabus.