liveBook · Manning

Masked attention

As explained in Sutskever's List

A sequence-modeling mask that prevents a position from attending to later positions.

In autoregressive text generation, each token is predicted from what came before. A causal mask enforces this direction: a token can attend only to preceding tokens, preventing information from the future from leaking into its prediction. section 5.1

During training, the model predicts the next token at every position in a sequence simultaneously. The mask preserves that left-to-right prediction task while allowing the sequence to provide many training examples. section 5.1

How Sutskever's List covers it

How deep it goes
Defines the mask’s information constraint and training role, but does not detail its implementation.
Examples
Uses next-token prediction at every sequence position as its training illustration.
What you can do after
Understand how causal masking prevents future information from influencing next-token predictions.
How it connects
Connects causal masking to self-attention, autoregressive modeling, and self-supervised learning.

Also explained in

Compare how 6 books explain masked attention →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Sutskever's List. The section links point to the parts of the book it draws on.