ModelRefs / Causal Mask — AI Glossary
Causal Mask — AI Glossary
A triangular attention mask preventing decoder tokens from attending to future positions, enforcing left-to-right generation.
Overview
In decoder-only models, the attention mask is a lower-triangular matrix of 1s. At position i, the model attends to positions 0…i only. This enables teacher-forcing during training: all next-token predictions are computed in one forward pass. At inference, KV-cache stores past key-value pairs so only the new token needs attention.
Reference details
| Topic | architecture |
|---|---|
| Also known as | autoregressive mask, triangular mask |
| Last reviewed | 2026-06-24 |
Related terms
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Causal Mask — AI Glossary.
Frequently asked questions
What is Causal Mask?
A triangular attention mask preventing decoder tokens from attending to future positions, enforcing left-to-right generation.
Is Causal Mask the same as autoregressive mask?
Yes — autoregressive mask, triangular mask are common aliases for Causal Mask.
What concepts are related to Causal Mask?
Closely related concepts include decoder only, kv cache, attention.