LISA: Linear-Indexed Sparse Attention for Efficient Long-Context Reasoning

Yu Zhao, Zekun Zhang, Fan Jiang, Bo Zeng, Linlong Xu, Shimin Shan, Yu Liu, Longyue Wang, Weihua LuoarXiv 2026

TL;DR

LISA (Linear-Indexed Sparse Attention) is a plug-and-play attention module designed to accelerate long Chain-of-Thought (CoT) reasoning in Large Language Models without requiring pretraining from scratch. By running a global linear attention stream in parallel with a dynamically indexed sparse self-attention stream, LISA slashes inference complexity from quadratic $O(n^2)$ to linear $O(nM)$, achieving a 50% inference speedup while actually boosting accuracy on complex mathematical benchmarks.

What Problem Does This Paper Address?

Recent breakthroughs in reasoning models (like DeepSeek-R1 and OpenAI o1) rely heavily on "test-time scaling"—allowing the model to generate massive, step-by-step chains of thought to solve complex problems. However, this comes with a massive computational bottleneck. Standard Transformer models use self-attention, which scales quadratically ($O(n^2)$) with sequence length. As reasoning paths stretch into tens of thousands of tokens, the computational cost and memory footprint of the KV-cache skyrocket.

Prior attempts to fix this either try to force the model to write shorter summaries (which cripples reasoning ability) or aggressively compress the KV-cache (which often discards critical context). The authors of LISA set out to find a way to accelerate the internal inference process without compressing the output text or sacrificing the model's precise retrieval capabilities.

Methods

LISA replaces standard self-attention with a hybrid, parallel architecture that splits the workload into two specialized streams:

  1. Global Linear Attention: A lightweight module that maintains a running global context state matrix with $O(n)$ time complexity, acting as a long-range memory.
  2. Lightning Indexer + Sparse Self-Attention: A trained token selector (the Indexer) dynamically calculates which $M$ tokens from the full history are most important for the current step. Only these top-$M$ tokens are fed into a standard, fixed-size self-attention block.

A learnable gating mechanism fuses the outputs of these two streams. To preserve exact retrieval capabilities across deep networks, the authors retain the original standard attention layers every 6 layers.

Figure 1: Overview of the LISA architecture.

Two-Stage Training

To integrate this module into frozen, pre-trained models, LISA uses a two-stage training pipeline:

  • Stage 1 (Cold-Start): The full self-attention is replaced by a static sliding window alongside the linear attention module. It is trained via standard cross-entropy loss to avoid the overfitting that typically occurs with direct KL distillation on low-rank attention distributions.
  • Stage 2 (Indexer Guidance): The static sliding window is replaced by the dynamic Indexer. The Indexer is optimized using a novel per-head KL divergence loss that aligns its token selection behavior with the attention patterns of a frozen teacher model.

Datasets

The authors evaluated LISA using DeepSeek-distilled-Qwen models (1.5B and 7B parameters).

  • Training: 100K samples randomly selected from the OpenR1-Math-220K dataset.
  • Evaluation: Five rigorous mathematical reasoning benchmarks: GSM8K, MATH-500, AMC23, AIME24, and AIME25.

Key Insights and Ideas

  • The "Divide and Conquer" Synergy: By analyzing the hidden states, the authors discovered that the outputs of the linear attention and sparse self-attention streams are persistently anti-correlated (negative cosine similarity). This means they aren't redundant; instead, they specialize in distinct information subspaces. Sparse self-attention handles local, precise details, while linear attention provides a global, corrective background signal.
Figure 2: Cosine similarity between linear attention and sparse self-attention outputs across all layers.
  • Recovering Attention Sinks: Visualization of the Indexer shows that it naturally learns to combat recency bias. While it concentrates heavily on local context, it also dynamically reaches back into the full context to select global features like punctuation tokens, effectively recovering the "attention sink" phenomena observed in dense models.
Figure 3: Visualization of the top-256 tokens selected by the Indexer across layers.

Key Results

LISA consistently outperformed standard KV-cache reduction techniques (like H2O and SepLLM) and state-compression baselines in both speed and accuracy.

  • Speedup: LISA achieved up to a 50% reduction in relative latency under a 16K-token context window.
  • Accuracy Boost: On the Qwen2.5-7B backbone, LISA achieved an average accuracy of 70.6% across all benchmarks, outperforming the strongest baseline by 2.3% absolute.
  • Long-Horizon Excellence: The benefits became more pronounced as task complexity scaled. On the grueling AIME25 benchmark, LISA hit 40.0% accuracy with the 7B model, significantly outperforming alternative efficient reasoning frameworks.
Extracted table from page 7 of LISA: Linear-Indexed Sparse Attention for Efficient Long-Context Reasoning

Limitations and Future Work

While highly effective, the authors note several limitations:

  • Task Scope: Evaluation was strictly limited to mathematical reasoning. Its efficacy in other long-context domains like code generation or multi-turn agent tasks remains unproven.
  • Training Complexity: The two-stage pipeline requires careful hyperparameter tuning and substantial compute (approx. 480 GPU hours on NVIDIA H100s) due to calculating teacher attention distributions during Stage 2.
  • Residual Quadratic Layers: Because standard attention layers are still retained every 6 layers to maintain high fidelity, 70% of the total attention FLOPs remain. Completely replacing all layers with a fully linearized architecture is left for future work.

Summary updated

BibTeX
@misc{zhao2026lisa,
  author = {Yu Zhao and Zekun Zhang and Fan Jiang and Bo Zeng and Linlong Xu and Shimin Shan and Yu Liu and Longyue Wang and Weihua Luo},
  title = {{LISA: Linear-Indexed Sparse Attention for Efficient Long-Context Reasoning}},
  year = {2026},
  eprint = {2607.19358},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.19358},
}
Figure