Alleviating Forgetfulness of Linear Attention by Hybrid Sparse Attention and Contextualized Learnable Token Eviction

Mutian He, Philip N. Garner
10/23/2025
cs.CLcs.LG

No official code found. Best implementation: idiap/hybrid-linear-sparse-attention (8 stars, last commit 2025-11-22).

Abstract

Linear-attention models that compress the entire input sequence into a fixed-size recurrent state offer an efficient alternative to Transformers, but their finite memory induces forgetfulness that harms retrieval-intensive tasks. To mitigate the issue, we explore a series of hybrid models that restore direct access to past tokens. We interleave token mixers with intermediate time and space complexity between linear and full attention, including sparse attention with token eviction, and the query-aware native sparse attention. Particularly, we propose a novel learnable token eviction approach. Combined with sliding-window attention, an end-to-end trainable lightweight CNN aggregates information from both past and future adjacent tokens to adaptively retain a limited set of critical KV-pairs per head, maintaining linear attention's constant time and space complexity. Efficient Triton kernels for the sparse attention mechanisms are provided. Empirical evaluations on retrieval-intensive benchmarks support the effectiveness of our approaches.

View on arXivView PDF

Code Implementations(1)

Alleviating Forgetfulness of Linear Attention by Hybrid Sparse Attention and Contextualized Learnable Token Eviction.

80Shell, PythonNov 5, 202511 months ago

Similar Papers

Cite this paper

@article{he2025alleviating,
  title  = {Alleviating Forgetfulness of Linear Attention by Hybrid Sparse Attention and Contextualized Learnable Token Eviction},
  author = {Mutian He and Philip N. Garner},
  year   = {2025},
  eprint = {2510.20787},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.20787v2}
}

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/2510.20787.svg)](https://codeofpaper.com/paper/2510.20787)

Discussion