TL;DR
Masked Diffusion LLMs can generate text much faster than standard auto-regressive models by unmasking multiple tokens in parallel—but if you unmask two interdependent tokens at the same time, the model can produce nonsense. This paper introduces GRID (Graph Resistance Independent Decoding), a training-free sampler that borrows the concept of effective resistance from electrical circuits to measure both direct and multi-hop dependencies in the model's attention graph. By avoiding hidden multi-hop conflicts, GRID achieves up to $\times 2$ faster decoding on ParallelBench and 7.6%–11.1% speedups over the fastest competing samplers across 16 standard LLM reasoning benchmarks, without sacrificing accuracy.
What Problem Does This Paper Address?
Standard auto-regressive LLMs generate text one token at a time, left to right. Masked Diffusion Models (MDMs)—such as LLaDA and Dream—offer a compelling alternative: they start with a sequence of [MASK] tokens and iteratively unmask multiple positions in parallel.
The catch is joint-marginal mismatch. When an MDM unmasks several tokens at once, it implicitly assumes those positions are independent given the current context. If they are actually coupled, each token might look plausible on its own, yet the combination is wrong. For example, given "[m1] is the capital of [m2]", predicting Rome for [m1] and France for [m2] is individually reasonable, but jointly incorrect.
To avoid this, recent "dependency-aware" samplers (like DAWN and DAPD) build a graph where masked tokens are nodes and edge weights come from the model's self-attention maps. Weak edges mean weak coupling, so those tokens are safe to unmask together. However, these methods only look at direct, single-hop edges. Two tokens might have a weak direct attention link, yet still be strongly coupled through a chain of intermediate tokens—just like baker and cake in "The [baker] [mixed] fresh [flour] and [eggs] to make a [choc.] [cake]".
Methods
The authors propose GRID, a training-free parallel sampler that replaces direct-edge attention scores with inverse effective resistance (ER)—a classic, parameter-free measure from graph theory.
Think of the attention graph as an electrical circuit: if two nodes are connected by many paths (both direct and multi-hop), electricity flows easily between them, giving them low effective resistance (and high inverse ER). Mathematically, inverse ER expands cleanly into a sum of 1-hop, 2-hop, 3-hop, and $N$-hop path contributions, capturing complex indirect dependencies out of the box without extra hyperparameters.
Building on DAWN's confidence-guided selection framework, GRID's denoising step works as follows:
- Graph construction: Average attention across heads of the final four layers, filter out attention sinks, symmetrize the matrix, and restrict it to currently masked positions.
- Modularity denoising: Subtract the degree-expected background weight (a modularity-based correction) so that broadly connected, high-degree nodes don't artificially inflate multi-hop scores.
- Effective resistance: Compute the graph Laplacian's Moore–Penrose pseudoinverse to get pairwise ER, then normalize inverse ER by the mean weighted degree to keep the score scale-invariant as the mask empties.
- Greedy selection: High-confidence tokens ($\ge \tau_{\text{high}}$) are committed immediately. Remaining candidates ($\ge \tau_{\text{low}}$) are greedily added in descending confidence order as long as their pairwise coupling doesn't exceed a step-dependent threshold $q_t^\star$.
Datasets
- Dep-Bench (Newly Introduced): Standard benchmarks don't expose ground-truth dependency structures. To isolate how samplers handle multi-hop dependencies, the authors created Dep-Bench: five controlled masked-infill datasets spanning four graph structures (banded chain, interleaved chain, converging pyramid, and 2D lattice). Each dataset has 1,500 examples, with 18 masked single-digit answers per example and known dependency depths.
- ParallelBench: A public benchmark of 17 tasks grouped into three categories (Waiting Line, Text Writing, and Puzzles) designed to measure speed–quality trade-offs in parallel decoding.
- Standard Code & Math Benchmarks: HumanEval, MBPP, GSM8K, and MATH, evaluated across four MDMs (LLaDA-8B-Instruct, LLaDA 1.5, LLaDA 2 Mini 16B, and Dream-v0-Instruct-7B).
Key Insights and Ideas
- Multi-hop paths matter more as dependencies deepen: On Dep-Bench, GRID and direct-attention (DAWN) perform similarly at dependency depth $d = 1$. As depth increases, DAWN's accuracy drops sharply while GRID holds up—for example, at $d = 6$ on Banded Chain (~9 steps), GRID achieves 0.85 slot accuracy versus 0.37 for DAWN.
- Better proxy for true counterfactual dependency: When compared against a "ground-truth" counterfactual dependency (measuring how much revealing token $j$ shifts the prediction at token $i$), inverse ER consistently achieves lower dependency regret than direct attention across all confidence thresholds.
- Parameter-free advantage: Other multi-hop graph measures like Katz similarity and Heat Kernel also beat direct attention, but require tuning extra decay or time-scale hyperparameters. Effective resistance works out of the box.
Key Results
- Dep-Bench: GRID Pareto-dominates DAWN across all five datasets, co-decoding fewer dependent pairs and requiring fewer excess decoding steps.
- ParallelBench: At a matched-quality threshold of 95% of the category-level top-1 score, GRID achieves decoding-step speedups of $\times 1.06$ (Waiting Line), $\times 2.02$ (Text Writing), and $\times 1.31$ (Puzzles) over the fastest competing sampler.
- 16 Model–Benchmark Settings: GRID achieves the highest speedup in all 16 combinations—$\times 3$–$10$ over top-1 decoding and 7.6%–11.1% faster on average than the fastest competing sampler—while maintaining comparable accuracy (mean accuracy changes of $+1.80$ on HumanEval, $+0.75$ on MBPP, $+0.25$ on GSM8K, and $-0.02$ on MATH).
Limitations and Future Work
- Attention as a proxy: Like other attention-based samplers, GRID relies on self-attention as a structural proxy for true probabilistic dependency, which may not generalize to every task.
- Loss of directionality: Inverse ER is symmetric, whereas true counterfactual dependency is directional. While symmetry suits co-decoding, directional signals could enable smarter scheduling rules in future work.
- Computational scaling: Computing the Laplacian pseudoinverse scales as $O(|M|^3)$ per decoding step. For the block size $B = 32$ used in the paper, this adds only 0.4% overhead, but it would become prohibitive for very large block sizes.
Summary updated