← Latest papers
💬 NLP

LoSA: Locality Aware Sparse Attention for Block-Wise Diffusion Language Models

The paper proposes LoSA, a locality-aware sparse attention mechanism that accelerates block-wise diffusion language models by reusing cached attention results for stable tokens and applying sparse attention only to active tokens, thereby overcoming KV inflation to achieve significant speedups and improved accuracy in long-context scenarios.

Original authors: Haocheng Xi, Harman Singh, Yuezhou Hu, Coleman Hooper, Rishabh Tiwari, Aditya Tomar, Minjae Lee, Wonjun Kang, Michael Mahoney, Chenfeng Xu, Kurt Keutzer, Amir Gholami

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

Original authors: Haocheng Xi, Harman Singh, Yuezhou Hu, Coleman Hooper, Rishabh Tiwari, Aditya Tomar, Minjae Lee, Wonjun Kang, Michael Mahoney, Chenfeng Xu, Kurt Keutzer, Amir Gholami

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 write a long story, but instead of writing one word at a time (like a normal person), you are writing in blocks of 16 words at once. You can rearrange those 16 words in any order you want before finalizing them. This is how Block-wise Diffusion Language Models (DLMs) work. They are powerful because they can "think" about a whole chunk of text simultaneously, which is great for complex reasoning.

However, there's a big problem: Memory Traffic.

The Problem: The "Crowded Bus" Effect

To write these blocks, the model needs to remember everything it wrote previously (the "prefix"). In computer terms, this is called the KV Cache.

When the model tries to write a new block, it has to look back at all those previous words to decide what comes next.

  • The Naïve Approach: Imagine you have a bus with 16 passengers (the 16 words in your new block). Each passenger wants to look at a specific seat in the back of the bus (the previous text) to decide what to say.
  • The Inflation Problem: If Passenger 1 looks at Seat 5, Passenger 2 looks at Seat 100, and Passenger 3 looks at Seat 500, the bus driver has to stop and open the doors for all those different seats to let everyone check. Even though each person only looked at one seat, the bus had to load 16 different seats just to satisfy the group. This is called KV Inflation. It's slow and wastes a lot of energy.

The Insight: The "Quiet Classroom"

The researchers noticed something interesting about how these models work. When the model updates a block of words, most of the words don't actually change much.

Think of it like a classroom:

  • Active Tokens: A few students are raising their hands, shouting, and changing their answers. They are "active."
  • Stable Tokens: The other 14 students are sitting quietly. Their answers haven't changed since the last time you checked. They are "stable."

If you ask the quiet students, "What do you think about the story so far?" they will give you the exact same answer they gave you a second ago. There is no need to ask them again!

The Solution: LoSA (Locality-Aware Sparse Attention)

The paper introduces a method called LoSA (Locality-Aware Sparse Attention). It's like a smart teacher who manages the classroom efficiently.

Here is how LoSA works, step-by-step:

  1. Spot the Active Students: First, LoSA quickly checks which students (tokens) are actually changing their minds. It ignores the quiet ones.
  2. Reuse the Quiet Answers: For the "Stable Tokens" (the quiet students), LoSA doesn't ask them to look at the back of the bus again. It just reuses the answer they gave last time. It's like saying, "You didn't change your mind, so I'll just write down what you said before."
  3. Focus on the Active Ones: LoSA only sends the "Active Tokens" (the ones changing) to look at the back of the bus.
  4. The Result: Because only a few students are looking, the bus driver only has to open the doors for a small group of seats.

Why This is a Game Changer

  • Speed: By not loading the whole bus of seats for every single word, the model runs 4.14 times faster on standard graphics cards.
  • Smarter: Because the "quiet" students still get to use their full memory of the story (instead of being forced to guess based on a tiny slice of memory), the model actually writes better stories (higher accuracy) than other methods that try to be too sparse.
  • Efficiency: It uses 1.5 times less memory traffic, meaning the computer doesn't have to work as hard to move data around.

The Analogy Summary

  • Old Way (Naïve Sparse Attention): Asking 16 people to look at 16 different random spots in a library. The librarian has to run to 16 different shelves to get the books. It's chaotic and slow.
  • LoSA: Realizing that 14 of those people are just reading the same page they were reading a second ago. You tell them, "Keep reading what you have." You only send the 2 people who are turning pages to the librarian. The librarian only has to run to 2 shelves.

In short: LoSA makes AI models faster and smarter by realizing that most of the time, the AI is just repeating what it already knows, so it shouldn't waste energy checking the same things over and over again.

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 →