paper-with-me

홈 › Papers

SEA: Sparse Linear Attention with Estimated Attention Mask

2023-10-03 · Heejun Lee, Jina Kim, Jeffrey Willette, Sung Ju Hwang

The transformer architecture has driven breakthroughs in recent years on tasks which require modeling pairwise relationships between sequential elements, as is the case in natural language understanding. However, long seqeuences pose a problem due to the quadratic complexity of the attention operation. Previous research has aimed to lower the complexity by sparsifying or linearly approximating the attention matrix. Yet, these approaches cannot straightforwardly distill knowledge from a teacher's attention matrix and often require complete retraining from scratch. Furthermore, previous sparse and linear approaches lose interpretability if they cannot produce full attention matrices. To address these challenges, we propose SEA: Sparse linear attention with an Estimated Attention mask. SEA estimates the attention matrix with linear complexity via kernel-based linear attention, then subsequently creates a sparse attention matrix with a top-k selection to perform a sparse attention operation. For language modeling tasks (Wikitext2), previous linear and sparse attention methods show roughly two-fold worse perplexity scores over the quadratic OPT-1.3B baseline, while SEA achieves better perplexity than OPT-1.3B, using roughly half the memory of OPT-1.3B, providing interpretable attention matrix. We believe that our work will have a large practical impact, as it opens the possibility of running large transformers on resource-limited devices with less memory.

📄 PDF Abstract BibTeX arXiv:2310.01777

Code (1)

gmlwns2000/sea-attention 공식 구현 jax

Tasks

Knowledge DistillationLanguage ModelingLanguage ModellingNatural Language Understanding

Methods 이 논문이 사용한 방법론

Knowledge Distillation A very simple way to improve the performance of almost any machine learning algorithm is to train many different models on the same data and then to average their predictions.…

Similar Papers 제목 키워드 기반

CoSA: Accelerating Long-Context Inference via Proxy-Kernel Co-Designed Sparse Attention

2026-07-28 · Yufei Xue, Lin Niu, Hong Liu, Siran Liu 외 arxiv

The quadratic cost of self-attention makes long-context inference prohibitively expensive, and proxy-based block-sparse attention has become a practical remedy. Existing methods typically rely on a proxy to predict a bin…

SpargeAttention2: Trainable Sparse Attention via Hybrid Top-k+Top-p Masking and Distillation Fine-Tuning

2026-02-13 · Jintao Zhang, Kai Jiang, Chendong Xiang, Weiqi Feng 외 arxiv

Many training-free sparse attention methods are effective for accelerating diffusion models. Recently, several works suggest that making sparse attention trainable can further increase sparsity while preserving generatio…

HopFormer: Sparse Graph Transformers with Explicit Receptive Field Control

2026-02-02 · Sanggeon Yun, Raheeb Hassan, Ryozo Masukawa, Sungheon Jeong 외 arxiv

Graph Transformers typically rely on explicit positional or structural encodings and dense global attention to incorporate graph topology. In this work, we show that neither is essential. We introduce HopFormer, a graph …

Grammatically-Guided Sparse Attention for Efficient and Interpretable Transformers

2026-05-23 · Spandan Pratyush arxiv

The quadratic complexity of self-attention in Transformer models remains a significant bottleneck for processing long sequences and deploying large language models efficiently. For this approach, there has been significa…

$π$-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