A Causal Mask Limits Which Positions Can Contribute

An autoregressive sequence position can use earlier positions under a causal visibility rule. A mask enforces that dependency before attention weights are chosen.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a three-position sequence
  2. Test a meaningful change

Trace a three-position sequence

At the second position, an ordinary causal pattern may admit positions one and two while blocking three. This is a model statement about which information is available under the chosen prediction shift. See feature timing.

Test a meaningful change

Changing a later token should not alter an earlier position's result when the model promises that dependency rule. Attention weights describe where the mask matters.[1]

References

  1. Ian Goodfellow, Yoshua Bengio and Aaron Courville, Deep Learning ↩