Short Definition
Relative attention adds information about the distance or relationship between tokens directly into attention.
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.