Short Definition
Sliding-window attention restricts each token to attend only to a nearby window of tokens.
Intuition
Most local language structure is nearby, so a model can save compute by not attending globally in every layer.
Technical Definition
Sliding-window attention masks attention to a fixed local neighborhood, reducing attention cost relative to full sequence attention.
Example
A long-context model may use local attention in most layers and global attention in selected layers.
Common Misunderstandings
Sliding-window attention can miss distant dependencies unless combined with other mechanisms.
It is an efficiency tradeoff, not a universal replacement for global attention.