paper-with-me

Papers

Long-Context Generalization with Sparse Attention

2025-06-19 · Pavlo Vasylenko, Marcos Treviso, André F. T. Martins

Transformer-based architectures traditionally employ softmax to compute attention weights, which produces dense distributions over all tokens in a sequence. While effective in many settings, this density has been shown to be detrimental for tasks that demand precise focus on fixed-size patterns: as sequence length increases, non-informative tokens accumulate attention probability mass, leading to dispersion and representational collapse. We show in this paper that sparse attention mechanisms using $\alpha$-entmax can avoid these issues, due to their ability to assign exact zeros to irrelevant tokens. Furthermore, we introduce Adaptive-Scalable Entmax (ASEntmax), which endows $\alpha$-entmax with a learnable temperature parameter, allowing the attention distribution to interpolate between sparse (pattern-focused) and dense (softmax-like) regimes. Finally, we show that the ability to locate and generalize fixed-size patterns can be further improved through a careful design of position encodings, which impacts both dense and sparse attention methods. By integrating ASEntmax into standard transformer layers alongside proper positional encodings, we show that our models greatly outperform softmax, scalable softmax, and fixed-temperature $\alpha$-entmax baselines on long-context generalization.

📄 PDF Abstract BibTeX arXiv:2506.16640

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Focus 설명 없음

Similar Papers 제목 키워드 기반

ReSSFormer: A Recursive Sparse Structured Transformer for Scalable and Long-Context Reasoning

2025-10-02 · Haochen You, Baojing Liu arxiv

While Transformer architectures have demonstrated impressive scalability across domains, they continue to face challenges in long-context reasoning, computational efficiency, and structural generalization - largely due t…

Computational Efficiency

Every Token Counts: Generalizing 16M Ultra-Long Context in Large Language Models

2025-11-28 · Xiang Hu, Zhanchao Zhou, Ruiqi Liang, Zehuan Li 외 arxiv

This work explores the challenge of building ``Machines that Can Remember'', framing long-term memory as the problem of efficient ultra-long context modeling. We argue that this requires three key properties: \textbf{spa…

MTraining: Distributed Dynamic Sparse Attention for Efficient Ultra-Long Context Training

2025-10-21 · Wenxuan Li, Chengruidong Zhang, Huiqiang Jiang, Yucheng Li 외 arxiv

The adoption of long context windows has become a standard feature in Large Language Models (LLMs), as extended contexts significantly enhance their capacity for complex reasoning and broaden their applicability across d…

$π$-Attention: Online Efficient Sparse Transformers for Long-Context Modeling

2025-11-12 · Dong Liu, Yanxuan Yu arxiv

Sparse attention is crucial in long-context Transformers, which restricts each token to a limited neighborhood and thereby reduces the quadratic cost of full self-attention. Local windows capture nearby context effective…

Long-range modeling

Understanding and Improving Length Generalization in Hierarchical Sparse Attention Models

2025-10-20 · Jiaqi Leng, Xiang Hu, Junxiong Wang, Jianguo Li 외 arxiv

Effectively processing long contexts is a critical challenge for language models. While standard Transformers are limited by quadratic complexity and poor length extrapolation, alternative architectures like sliding wind…