Skip to content
Financial Machine Learning / Neural Networks and Deep Learning

Attention, Transformers, and Self-Supervised Foundation Models

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

  1. Learning objectives
  2. Attention as a shortcut through the sequence
  3. The Transformer: attention without recurrence
  4. Frontier pointers (survey level only)
  5. Worked example

Before you start

The full lesson, with worked examples and exercise solutions, is for members.

Read the full lesson

New to SelfMadeQuant.com? See membership options or browse the Financial Machine Learning syllabus.