Critical attention scaling in long-context transformers
The DOI matches its DataCite record; 4 of the 4 references it cites were found in a registry or an index.
Abstract
As large language models scale to longer contexts, attention layers suffer from a fundamental pathology: attention scores collapse toward uniformity as context length $n$ increases, causing tokens to cluster excessively, a phenomenon known as rank-collapse. While $\textit{attention scaling}$ effectively addresses this deficiency by rescaling attention scores with a polylogarithmic factor $β_n$, theoretical justification for this approach remains lacking. We analyze a simplified yet tractable model that magnifies the effect of attention scaling. In this model, attention exhibits a phase transition governed by the scaling factor $β_n$: insufficient scaling collapses all tokens to a single direction, while excessive scaling reduces attention to identity, thereby eliminating meaningful interactions between tokens. Our main result identifies the critical scaling $β_n \asymp \log n$ and provides a rigorous justification for attention scaling in YaRN and Qwen, clarifying why logarithmic scaling maintains sparse, content-adaptive attention at large context lengths.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“The log n factor was proposed by Chiang & Cholak (2022) and Nakanishi (2025) and has been used in practice in Qwen (Bai et al., 2023).Chen et al. (2026) provide additional theoretical justification for this choice.”
From Exact-Solution Volume and Length Generalization in Transformers (2026) · cites this paper as Chen et al. (2026)
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Deep Residual Learning for Image Recognition
He, K., Zhang, X., Ren, S., & Sun, J. (2016) · 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr.2016.90 · Cited by 235,474
A Stochastic Estimator of the Trace of the Influence Matrix for Laplacian Smoothing Splines
Hutchinson, M. F. (1989) · Communications in Statistics - Simulation and Computation · doi:10.1080/03610918908812806 · Cited by 381
YaRN: Efficient Context Window Extension of Large Language Models
Peng, B., Quesnelle, J., Fan, H., & Shippole, E. (2023) · arXiv · doi:10.48550/arxiv.2309.00071 · Cited by 21 · cited 1×
“In this work, we focus on simple context-length-aware modifications of the attention mechanism following ideas practically implemented as YaRN [PQFS23], Qwen [BBC ` 23], SSMax [Nak25], and SWAN-GPT [PLS ` 25].”
InfluentialScalable-Softmax Is Superior for Attention
Nakanishi, K. M. (2025) · arXiv · doi:10.48550/arxiv.2501.19399 · cited 2×
“In this work, we focus on simple context-length-aware modifications of the attention mechanism following ideas practically implemented as YaRN [PQFS23], Qwen [BBC ` 23], SSMax [Nak25], and SWAN-GPT [PLS ` 25].”
Influential
Cited by
Exact-Solution Volume and Length Generalization in Transformers
Zhu, Y. J., & Chiang, D. (2026) · arXiv · doi:10.48550/arxiv.2610.07676 · Cited by 1
“Chen et al. (2026) provide additional theoretical justification for this choice.”
Metadata
- Authors
- Chen, S., Lin, Z., Polyanskiy, Y., & Rigollet, P.
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2025
- arXiv
- 2510.05554
- References
- 4
- Type
- Preprint
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.