Optimizing Native Sparse Attention with Latent Attention and Local Global Alternating Strategies

Yuxuan Hu, Jianchao Tan, Jiaqi Zhang, Wen Zan, Pingwei Sun +5 more
11/2/2025
cs.CL

No confident code implementation found for this paper.

Abstract

In this work, we conduct a systematic analysis of Native Sparse Attention (NSA) and propose targeted improvements that enhance long-context modeling. A key insight is that alternating between local (sliding-window) and global (compression, selective) attention across layers, rather than using fixed patterns, enables more effective propagation of long-range dependencies and substantially boosts performance on long-sequence tasks. Meanwhile, we further refine NSA's branches with Latent Attention that the sliding-window branch is enhanced with Multi-head Latent Attention (MLA) while compression and selective branches adopt Group-head Latent Attention (GLA). These changes reduce KV-cache memory by 50\% versus NSA while improving the model's common-sense reasoning and long-text understanding capabilities. Experiments on models from 340M to 1.3B parameters (trained on 15B and 100B tokens) show our method matches or exceeds full attention and native sparse attention in both common-sense reasoning and long-context understanding tasks.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{hu2025optimizing,
  title  = {Optimizing Native Sparse Attention with Latent Attention and Local Global Alternating Strategies},
  author = {Yuxuan Hu and Jianchao Tan and Jiaqi Zhang and Wen Zan and Pingwei Sun and Yifan Lu and Yerui Sun and Yuchen Xie and Xunliang Cai and Jing Zhang},
  year   = {2025},
  eprint = {2511.00819},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.00819v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2511.00819.svg)](https://codeofpaper.com/paper/2511.00819)

Discussion