# Attention-Based Sampler for Diffusion Language Models

*Yuyan Zhou, Kai Syun Hou, Weiyu Chen, James Kwok*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/149963) · [Open on the map](../papers.html#p149963)

Category: [LLM Reasoning, Memory & RAG](../pcat/19.md) › [Diffusion Language Model Decoding](../pgroup/271.md) · Type: new method · Keywords: diffusion language models, sampling order optimization, attention-based sampling, parallel generation, NP-hard optimization

Areas: [Model Architectures & Sequence Modeling](../areas/architectures.md) › Language Model Architectures › Diffusion Decoding

## Summary
Attn-Sampler is a training-free sampling algorithm that selects tokens by descending attention-matrix column sums, enabling parallel and higher-quality generation for diffusion language models.

## Explained to a 5-year-old
A computer program writes stories by guessing the next word. Usually it guesses one word at a time, which is slow. A new idea lets the program guess many words at once, but it needs to know which words fit best together. Scientists found a simple rule: pick the words that are most connected to others first. This helps the program make better stories faster.

## Explained to a 5-year-old, longer
Computers can help people write stories by predicting the next word. The usual way is to predict one word after another, which takes a lot of time. A newer type of computer model, called a diffusion language model, can predict many words at the same time, which is faster. However, picking the right order of words is tricky because each word influences the others. Researchers studied how to choose the best order of words to make the story as good as possible. They discovered that the problem of finding the perfect order is very hard, like a big puzzle. They created a simpler method that works well by looking at how connected each word is to the others. This method helps the computer pick words in a smart order, leading to better stories and faster writing. They also added a trick to speed things up even more, so the model can be used quickly in real situations.

## For a technical reader
The paper addresses the challenge of selecting token order in diffusion language models to improve both quality and speed. It shows that the optimal order problem is NP-hard and proposes a tractable approximation based on attention scores. By sampling tokens in descending order of attention-matrix column sums, the approach achieves better generation results while enabling parallel sampling. Dynamic attention thresholding further accelerates inference without requiring additional training.

## Problem
Finding an optimal token sampling order for diffusion language models that maximizes log-likelihood while allowing parallel generation is computationally hard.

## Method
The approach approximates the NP-hard sampling order problem with a tractable rank-based objective and shows that sampling tokens by descending attention-matrix column sums optimizes this objective, complemented by dynamic attention thresholding for acceleration.

## Results
The approach yields higher generation quality and improves sampling parallelism compared to existing diffusion language model samplers.

## Contributions
It provides a theoretical analysis proving the NP-hardness of optimal sampling order and a tractable approximation, along with a training-free sampling algorithm that leverages attention information for parallel generation.

## Practical relevance
Dynamic attention thresholding enables practical acceleration, making the approach suitable for faster, real-time generation.

## Research questions this paper is counted under

- [How can diffusion language models achieve fast parallel token generation while maintaining high sample quality and preserving token dependencies?](../q/7.md)

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](../feedback/?on=p/149963)
