Sparse Attention as a Range Searching Problem: Towards an Inference-Efficient Index for KV Cache
Mohsen Dehghankar, Abolfazl Asudeh
NeurIPS page · Open on the map
Category: Efficient LLM Inference & Training › Sparse Long-Context Attention · Type: new method · Keywords: sparse attention, KV cache, range searching, zero false negatives, LLM inference efficiency
Areas: LLM Reasoning › Efficient Reasoning › Sparse Attention
Summary
Louver is an index structure that reformulates sparse attention as a halfspace range searching problem, guaranteeing zero false negatives while being lightweight and hardware-aware for efficient KV cache retrieval.
Explained to a 5-year-old
Large computer programs called language models need to remember things while they talk. They keep these memories in a special place called a cache. If they forget an important memory, the answer they give can be wrong. The researchers made a new way to organize the cache so it never forgets the important memories. This helps the programs be faster and more accurate when they answer questions.
Explained to a 5-year-old, longer
Big computer programs that write text, like chatbots, need to remember what they have seen before. They store these memories in a place called a cache, which is like a quick notebook. If they forget an important memory, the answer they give can be wrong or weird. The researchers noticed that missing even one key memory could cause big jumps in mistakes. They wanted a way to make sure no important memory is ever missed, no matter how long the conversation gets. They thought of a problem from math called range searching, which helps find items inside a region. They turned the problem of picking which memories to use into this math problem. Then they built a new data structure, called Louver, that works like a smart index for the cache. This index guarantees that if a memory is above a certain importance level, it will always be found. It is designed to be light and easy to add to existing computer programs. The index also has special tricks to run fast on both regular computers and gaming graphics cards. In tests, this new method kept the program more accurate and ran quicker than older ways of handling the cache.
For a technical reader
The paper addresses the reliability issue of sparse attention in large language model inference, where critical key-value entries can be omitted, causing accuracy drops. It reformulates the selection of KV entries as a halfspace range-searching problem and proposes Louver, an index that guarantees zero false negatives for entries above a relevance threshold. Louver is lightweight to integrate, includes hardware-aware optimizations for both CPU and GPU, and can be dropped into existing inference pipelines with minimal overhead. Empirical results show that Louver improves both accuracy and runtime compared to prior sparse attention methods and even outperforms dense implementations like FlashAttention. The work highlights recall guarantees as a crucial dimension for efficient and trustworthy LLM inference, opening a new direction for theoretically grounded cache indices.
Problem
Sparse attention methods for LLM inference often miss critical key-value entries, leading to accuracy degradation, and existing approaches cannot guarantee zero false negatives across decoding steps when the relevant token set varies dynamically.
Method
The approach reformulates sparse attention as a halfspace range searching problem and introduces a novel index structure that supports efficient query processing with hardware-aware optimizations for CPU and GPU, ensuring zero false negatives with respect to a relevance threshold.
Results
The approach achieves higher accuracy and faster runtime than prior sparse attention methods and even surpasses dense implementations like FlashAttention.
Contributions
It provides a theoretically grounded index for KV cache retrieval that guarantees zero false negatives, integrates lightweightly into existing pipelines, and includes hardware-aware optimizations for both CPU and GPU.
Practical relevance
Provides a path to more reliable and efficient LLM inference by ensuring critical KV entries are never missed, enabling safer deployment of sparse attention.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction