Demystifying the Slash Pattern in Attention: The Role of RoPE

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Cheng, Yuan, Zhang, Fengzhuo, Hou, Yunlong, Du, Cunxiao, Du, Chao, Pang, Tianyu, Sun, Aixin, Yang, Zhuoran
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910002902466560
author Cheng, Yuan
Zhang, Fengzhuo
Hou, Yunlong
Du, Cunxiao
Du, Chao
Pang, Tianyu
Sun, Aixin
Yang, Zhuoran
author_facet Cheng, Yuan
Zhang, Fengzhuo
Hou, Yunlong
Du, Cunxiao
Du, Chao
Pang, Tianyu
Sun, Aixin
Yang, Zhuoran
contents Large Language Models (LLMs) often exhibit slash attention patterns, where attention scores concentrate along the $Δ$-th sub-diagonal for some offset $Δ$. These patterns play a key role in passing information across tokens. But why do they emerge? In this paper, we demystify the emergence of these Slash-Dominant Heads (SDHs) from both empirical and theoretical perspectives. First, by analyzing open-source LLMs, we find that SDHs are intrinsic to models and generalize to out-of-distribution prompts. To explain the intrinsic emergence, we analyze the queries, keys, and Rotary Position Embedding (RoPE), which jointly determine attention scores. Our empirical analysis reveals two characteristic conditions of SDHs: (1) Queries and keys are almost rank-one, and (2) RoPE is dominated by medium- and high-frequency components. Under these conditions, queries and keys are nearly identical across tokens, and interactions between medium- and high-frequency components of RoPE give rise to SDHs. Beyond empirical evidence, we theoretically show that these conditions are sufficient to ensure the emergence of SDHs by formalizing them as our modeling assumptions. Particularly, we analyze the training dynamics of a shallow Transformer equipped with RoPE under these conditions, and prove that models trained via gradient descent exhibit SDHs. The SDHs generalize to out-of-distribution prompts.
format Preprint
id arxiv_https___arxiv_org_abs_2601_08297
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Demystifying the Slash Pattern in Attention: The Role of RoPE
Cheng, Yuan
Zhang, Fengzhuo
Hou, Yunlong
Du, Cunxiao
Du, Chao
Pang, Tianyu
Sun, Aixin
Yang, Zhuoran
Machine Learning
Artificial Intelligence
Computation and Language
Large Language Models (LLMs) often exhibit slash attention patterns, where attention scores concentrate along the $Δ$-th sub-diagonal for some offset $Δ$. These patterns play a key role in passing information across tokens. But why do they emerge? In this paper, we demystify the emergence of these Slash-Dominant Heads (SDHs) from both empirical and theoretical perspectives. First, by analyzing open-source LLMs, we find that SDHs are intrinsic to models and generalize to out-of-distribution prompts. To explain the intrinsic emergence, we analyze the queries, keys, and Rotary Position Embedding (RoPE), which jointly determine attention scores. Our empirical analysis reveals two characteristic conditions of SDHs: (1) Queries and keys are almost rank-one, and (2) RoPE is dominated by medium- and high-frequency components. Under these conditions, queries and keys are nearly identical across tokens, and interactions between medium- and high-frequency components of RoPE give rise to SDHs. Beyond empirical evidence, we theoretically show that these conditions are sufficient to ensure the emergence of SDHs by formalizing them as our modeling assumptions. Particularly, we analyze the training dynamics of a shallow Transformer equipped with RoPE under these conditions, and prove that models trained via gradient descent exhibit SDHs. The SDHs generalize to out-of-distribution prompts.
title Demystifying the Slash Pattern in Attention: The Role of RoPE
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2601.08297