← Latest papers
🤖 machine learning

LiteTopK: Exploiting the Curse of Dimensionality for a Fused Indexer-TopK Kernel in Long-Context Sparse Attention

The paper presents LiteTopK, a novel fused Indexer-TopK kernel that leverages the concentration of distances in high-dimensional spaces to dynamically partition candidates and minimize memory overhead, thereby accelerating sparse attention operations in large language models while maintaining exact Top-k correctness.

Original authors: Ziqi Yin, Jianyang Gao, Peiqi Yin, Jiangneng Li, Gao Cong

Published 2026-07-15
📖 4 min read☕ Coffee break read

Original authors: Ziqi Yin, Jianyang Gao, Peiqi Yin, Jiangneng Li, Gao Cong

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to find the 2,048 most interesting friends in a crowd of one million people. In the world of giant AI brains (Large Language Models), this is exactly what happens when the model tries to read a massive document all at once. It has to figure out which parts of the text are the most important to focus on.

The old way of doing this, used by systems like DeepSeek, is like asking every single person in the crowd to shout their "friendship score" out loud, writing every single number down on a giant whiteboard, and then running a race to find the top 2,048. The problem? That whiteboard gets so huge it breaks the memory of the computer, and the shouting takes forever. The paper calls this the "Indexer-TopK" problem, and it's a major bottleneck that slows down AI.

The Magic Trick: The "Curse of Dimensionality"
The authors of this paper, Ziqi Yin and their team, noticed something weird about high-dimensional math (which is just a fancy way of saying "complex data with lots of numbers"). They found that in these massive spaces, most scores tend to clump together in a very narrow range, like a crowd of people all standing in the same small circle, while only a few outliers are far away.

They call this the "curse of dimensionality," but they decided to turn it into a superpower. Instead of listening to everyone shout, they realized they could guess where the "good" scores would be before the shouting even started.

Enter LiteTopK: The Smart Filter
The team built a new tool called LiteTopK. Think of it like a bouncer at a club who doesn't check everyone's ID one by one. Instead, the bouncer:

  1. Samples: First, they peek at a tiny group of people from the previous crowd. Since people in a story usually talk about similar things, the "interesting" people from the last chunk are likely to be interesting again.
  2. Draws a Line: Based on that peek, they draw a line in the sand. They know the top scores will be above this line.
  3. Bins the Crowd: They divide the possible scores into little boxes (bins).
  4. Filters on the Fly: As the scores are calculated, the system checks which box they fall into. If a score lands in a box below the line, it's ignored immediately. It never gets written to the giant whiteboard.
  5. The Final Count: Only the people in the "good" boxes get to the final selection.

Why This Matters (The Numbers)
The paper measured this on real hardware: eight massive NVIDIA B200 GPUs running a model called GLM-5.2 with a context of 1 million tokens.

  • The Old Way: To process this, the old system (DSA) needed to write a massive amount of data to memory, taking up 32 GB of extra space just for the scores. Even with this, it took 146.6 milliseconds just to do the math.
  • The New Way: LiteTopK skipped writing most of that data. It only used 1.5 GB of extra memory (a huge savings!) and finished the job in just 43.4 milliseconds.

That's a 3.38 times speedup on the raw math. When they tested the whole system end-to-end, LiteTopK made the AI 1.2 times faster while using less memory.

What It's NOT
The paper is very clear about what this doesn't do. It doesn't change the math to make the AI "smarter" or more accurate; it just finds the same answers much faster. It also doesn't work well for tiny groups (like finding just the top 10 items), where other methods might be better. The authors specifically note that their method relies on the scores being "concentrated" (clumped together), which is true for this specific type of AI attention but might not apply everywhere.

The Bottom Line
The authors measured this on real GPUs and found that by exploiting the fact that most scores are boringly similar, they can throw away the boring ones before they even get written down. It's like realizing that in a room of a million people, you don't need to write down the names of the 999,000 people who are just standing there; you only need to write down the names of the 2,048 who are actually doing something interesting.

This isn't just a theory; the team has already built it, and it's ready to help AI models read longer books without running out of memory or taking forever.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →