← Latest papers
💬 NLP

Prefilling-dLLM: Predictive Prefilling for Long-Context Inference in Diffusion Language Models

The paper introduces Prefilling-dLLM, a training-free framework that accelerates long-context inference in diffusion language models by caching and sparsely selecting relevant prefix chunks to reduce computational complexity from quadratic in full sequence length to quadratic in decode length, thereby achieving state-of-the-art speedups and mitigating the lost-in-the-middle phenomenon.

Original authors: Jing Xiong, Qi Han, Shansan Gong, Yunta Hsieh, Chengyue Wu, Chaofan Tao, Chenyang Zhao, Ngai Wong

Published 2026-06-10
📖 5 min read🧠 Deep dive

Original authors: Jing Xiong, Qi Han, Shansan Gong, Yunta Hsieh, Chengyue Wu, Chaofan Tao, Chenyang Zhao, Ngai Wong

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 solve a massive jigsaw puzzle, but instead of looking at the whole picture at once, you have to re-examine the entire box of pieces every single time you place just one new piece on the table.

That is essentially how Diffusion Large Language Models (dLLMs) currently work when handling long stories or documents. Every time the model tries to generate a new word, it re-reads and re-processes the entire history of the conversation from the very beginning. As the story gets longer, this "re-reading" becomes so slow and expensive that it's like trying to run a marathon while carrying a heavy backpack that gets heavier with every step.

The paper introduces a new method called Prefilling-dLLM to fix this. Here is how it works, using some everyday analogies:

1. The Problem: The "Re-Reading" Trap

In traditional AI models, once you read a page of a book, you remember it and only focus on the new page you are reading. But in these Diffusion models, the computer forgets the book and re-reads the entire book from page 1 to page 1,000 every time it writes a single new word.

  • The Result: If the book is short, it's fine. If the book is 32,000 pages long, the computer spends 99% of its time just re-reading the old pages and only 1% actually writing new ones.

2. The Solution: The "Smart Librarian" System

The authors propose a system called Prefilling-dLLM that acts like a super-efficient librarian. Instead of re-reading the whole library every time, the librarian does two things:

Step A: The "Prefill" (Organizing the Library)

Before the writing starts, the librarian takes the massive input text (the "prefix") and chops it up into chunks (like chapters in a book).

  • The Trick: The librarian reads each chapter once, creates a "summary card" (called a KV cache) for it, and puts it on a shelf.
  • The Innovation: The librarian doesn't read every single word in every chapter. They use a special trick to only keep the most important sentences from each chapter, throwing away the fluff. This makes the summary cards much smaller and faster to handle.

Step B: The "Decode" (Writing the Story)

Now, when the model needs to write the next word, it doesn't re-read the whole library.

  • The Selection: The model asks, "Which chapters are actually relevant to what I'm writing right now?" It uses a smart scoring system to pick only the top few chapters (the most relevant chunks) from the shelf.
  • The Efficiency: It ignores the other 90% of the library that isn't needed for this specific sentence. It only looks at the relevant "summary cards" it made earlier.

3. Why This is a Game-Changer

The paper claims this approach is a massive speedup because:

  • No More Re-Reading: The heavy lifting of reading the long text happens once at the beginning.
  • Smart Skipping: During the actual writing phase, the model only looks at a tiny fraction of the text (the top relevant chunks), rather than the whole thing.
  • The Speed: On long contexts (8,000 to 32,000 words), this method is 9 to 28 times faster than previous methods, while still getting the answers right.

4. Solving the "Lost in the Middle" Mystery

There is a known problem with long AI models called "Lost in the Middle." Imagine a person reading a long list of facts; they remember the first few and the last few perfectly, but they completely forget the stuff in the middle.

  • The Paper's Fix: The authors found that by chopping the text into chunks and adding a special "anchor" token (like a chapter heading) to the start of each chunk, the model can find information anywhere in the text, even the middle. It's like having a table of contents that works perfectly, so the model never gets lost, no matter how long the story is.

5. The "Chunk Size" Balance

The paper also tested how big these "chapters" should be.

  • Too Big: If the chunks are huge, the model might miss important details in the middle of the text.
  • Too Small: If the chunks are tiny, the computer spends too much time managing the list of chunks.
  • The Sweet Spot: They found that for very long texts, using many smaller chunks works best to keep the accuracy high.

Summary

Prefilling-dLLM is like switching from a student who re-reads a 500-page textbook every time they answer a quiz question, to a student who creates a smart, condensed study guide once, and then only flips to the specific pages they need when answering.

The result? The AI can handle much longer conversations and documents without slowing down to a crawl, and it doesn't forget the important details hidden in the middle of the text.

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 →