paper-with-me

Papers

Mixture of Sparse Attention: Content-Based Learnable Sparse Attention via Expert-Choice Routing

2025-05-01 · Piotr Piękos, Róbert Csordás, Jürgen Schmidhuber

Recent advances in large language models highlighted the excessive quadratic cost of self-attention. Despite the significant research efforts, subquadratic attention methods still suffer from inferior performance in practice. We hypothesize that dynamic, learned content-based sparsity can lead to more efficient attention mechanisms. We present Mixture of Sparse Attention (MoSA), a novel approach inspired by Mixture of Experts (MoE) with expert choice routing. MoSA dynamically selects tokens for each attention head, allowing arbitrary sparse attention patterns. By selecting $k$ tokens from a sequence of length $T$, MoSA reduces the computational complexity of each attention head from $O(T^2)$ to $O(k^2 + T)$. This enables using more heads within the same computational budget, allowing higher specialization. We show that among the tested sparse attention variants, MoSA is the only one that can outperform the dense baseline, sometimes with up to 27% better perplexity for an identical compute budget. MoSA can also reduce the resource usage compared to dense self-attention. Despite using torch implementation without an optimized kernel, perplexity-matched MoSA models are simultaneously faster in wall-clock time, require less memory for training, and drastically reduce the size of the KV-cache compared to the dense transformer baselines.

📄 PDF Abstract BibTeX arXiv:2505.00315

Code (1)

piotrpiekos/MoSA 공식 구현 pytorch

Tasks

Mixture-of-Experts

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$…
Attention 설명 없음

Similar Papers 제목 키워드 기반

SLA2: Sparse-Linear Attention with Learnable Routing and QAT

2026-02-13 · Jintao Zhang, Haoxu Wang, Kai Jiang, Kaiwen Zheng 외 arxiv

Sparse-Linear Attention (SLA) combines sparse and linear attention to accelerate diffusion models and has shown strong performance in video generation. However, (i) SLA relies on a heuristic split that assigns computatio…

Video Generation

MoGA: Mixture-of-Groups Attention for End-to-End Long Video Generation

2025-10-21 · Weinan Jia, Yuning Lu, Mengqi Huang, Hualiang Wang 외 arxiv

Long video generation with Diffusion Transformers (DiTs) is bottlenecked by the quadratic scaling of full attention with sequence length. Since attention is highly redundant, outputs are dominated by a small subset of qu…

Video Generation

Mixture of Contexts for Long Video Generation

2025-08-28 · Shengqu Cai, Ceyuan Yang, Lvmin Zhang, Yuwei Guo 외 arxiv

Long video generation is fundamentally a long context memory problem: models must retain and retrieve salient events across a long range without collapsing or drifting. However, scaling diffusion transformers to generate…

Information RetrievalVideo Generation

Efficient Learnable Collaborative Attention for Single Image Super-Resolution

2024-04-07 · Yigang Zhao Chaowei Zheng, Jiannan Su, GuangyongChen, MinGan

Non-Local Attention (NLA) is a powerful technique for capturing long-range feature correlations in deep single image super-resolution (SR). However, NLA suffers from high computational complexity and memory consumption, …

Image Super-ResolutionInductive BiasSuper-Resolution

Smart Bird: Learnable Sparse Attention for Efficient and Effective Transformer

2021-08-20 · Chuhan Wu, Fangzhao Wu, Tao Qi, Binxing Jiao 외

Transformer has achieved great success in NLP. However, the quadratic complexity of the self-attention mechanism in Transformer makes it inefficient in handling long sequences. Many existing works explore to accelerate T…