SESK: Stuff Everyone Should Know · sesk.info/ai-decoder-causal-mask
Why does an autoregressive Transformer decoder mask later positions?
It prevents a token from seeing future outputs.
- To block future information ✔
- To remove all attention
- To increase vocabulary size
Why: During next-token prediction, position i should depend only on earlier known outputs. A causal mask blocks attention links to subsequent positions.
Huh, didn't know that: The paper implements illegal attention links by setting their pre-softmax values to negative infinity.
The decoder wore a mask to avoid spoilers.
Like this card?
References
Answer: To block future information. During next-token prediction, position i should depend only on earlier known outputs. A causal mask blocks attention links to subsequent positions.
- Attention Is All You Need arxiv.org/html/1706.03762
prevent positions from attending to subsequent positions
Checked 2026-10-10.
Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.
More stuff everyone should know
That's stuff everyone should know.