Intuition
Many language patterns depend more on how far two tokens are from each other than on their absolute position in a document.
Technical definition
Relative attention modifies attention scores or representations using learned or computed features of pairwise token positions.
Example
A model can treat nearby modifiers differently from distant context by using relative position signals.
Common misunderstandings
- Relative attention is not simply another name for RoPE.
- Relative position methods can be implemented in several different ways.