SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.22300 · 2026

Scaling Attention via Feature Sparsity

Stefanie Jegelka, Yifei Wang, Chenyu You, Bo Chen, Yan Xie, Tiansheng Wen, Tangda Huang

arXiv · PDF · Open in the Atlas

Code that ran

We have not lifted any functions out of this paper's repositories yet, so there is nothing we have run. The repositories linked to it are listed below.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Scaling Transformers to ultra-long contexts is bottlenecked by the O(n 2 d) cost of self-attention. Existing methods reduce this cost along the sequence axis through local windows, kernel approximations, or token-level sparsity, but these approaches consistently degrade accuracy. In this paper, we instead explore an orthogonal axis: feature sparsity. We propose Sparse Feature Attention (SFA), where queries and keys are represented as k-sparse codes that preserve highdimensional expressivity while reducing the cost of attention from Θ(n 2 d) to Θ(n 2 k 2 /d). To make this efficient at scale, we introduce FlashSFA, an IOaware kernel that extends FlashAttention to operate directly on sparse overlaps without materializing dense score matrices. Across GPT-2 and Qwen3 pretraining, SFA matches dense baselines while improving speed by up to 2.5× and reducing FLOPs and KV-cache by nearly 50%. On synthetic and downstream benchmarks, SFA preserves retrieval accuracy and robustness at long contexts, outperforming short-embedding baselines that collapse feature diversity. These results establish feature-level sparsity as a complementary and underexplored axis for efficient attention, enabling Transformers to scale to ordersof-magnitude longer contexts with minimal quality loss. Code is available at https://github.com/YannX1e/Sparse-Feature-Attention. (a) Latency comparison (b) FLOPs & KV-cache comparison * Equal Contribution.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2603.22300")
get_code_for_paper("2603.22300")
have("2603.22300")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2603.22300.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2603.22300.svg)](https://syntology.ai/paper/2603.22300)

Connect an agent — have() is free.