NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Global Context Guidance for Diffusion Large Language Models

Jeimin Jeon, Bumsub Ham

TL;DR

Diffusion Large Language Models (LLMs) offer fast, parallel text generation but often suffer from a "local bias," failing to utilize distant contextual information effectively. This paper introduces Global Context Guidance (GCG), a training-free, feature-space guidance method that identifies and amplifies "global" attention heads in a single forward pass, significantly improving performance on reasoning and long-context tasks while incurring near-zero inference overhead.

What Problem Does This Paper Address?

While autoregressive LLMs (like GPT-4) generate text token-by-token, Diffusion LLMs generate entire sequences in parallel through iterative denoising. This makes them fast, but they have a significant weakness: they are biased toward local context. As the distance between a masked token and the information needed to predict it increases, the model's accuracy drops sharply.

Existing solutions use "guidance" techniques borrowed from image generation (like Classifier-Free Guidance), which require a "weak model" to provide a contrastive signal. However, this approach has two major flaws in the context of language:

  1. Efficiency: It requires two forward passes per denoising step, doubling the computational cost.
  2. Clarity: It is unclear how a "weak" discrete model should behave, sometimes leading to guidance that steers the model in the wrong direction.

Methods

The authors propose Global Context Guidance (GCG), which operates entirely within the feature space of the base model. The method follows three main steps:

  1. Head Analysis: The authors use a metric called the Center of Mass (COM) of attention weights to categorize attention heads. Heads with a high COM attend to distant tokens ("global heads"), while those with a low COM focus on nearby tokens ("local heads").
  2. Calibration: Using a small subset of data, they identify which blocks are most sensitive to global information through block-wise ablation.
  3. Feature-Space Guidance: During inference, for selected global heads, GCG projects their output onto the subspace spanned by local heads in the same block. It then calculates the residual—the part of the global signal that is distinct from the local context—and amplifies it.

Mathematically, this updates the head output as: $$\tilde{o} = o + s(o - \text{Proj}_{\text{Local}}(o))$$ where $s$ is a guidance scale. This process happens within a single forward pass, making it compatible with optimizations like FlashAttention.

Datasets

The researchers evaluated GCG across several categories:

  • Synthetic Infilling Benchmark: A custom dataset designed to control the distance between masked tokens and their supporting evidence (see Figure 1).
  • General Reasoning & Coding: ARC (science questions), PIQA (physical commonsense), GSM8K-CoT (math), HumanEval, and MBPP (code).
  • Long-Context Understanding: Ruler and MiniLongBench.
  • Calibration: A small 63-sample subset of LongBench was used to identify target heads and blocks.
Figure 1: Data generation process for a synthetic infilling benchmark. Entities are randomly sampled from predefined pools and used to construct a bidirectional document. In the resulting document, supporting evidence is placed on both sides of masked tokens, and separated from them by distractor tokens. The distances from the masked tokens to the supporting evidence are varied randomly for each sample.

Key Insights and Ideas

  • The Local Bias is Real: Diffusion LLMs show a consistent performance decay as the "evidence-mask distance" increases. As seen in Figure 2a (below), the baseline (gray) drops significantly at distances over 100 tokens.
  • Specialized Attention Heads: Attention heads are not created equal. Some are hard-wired for local syntax, while others are dedicated to long-range dependencies. This specialization is remarkably consistent across different inputs.
  • Guidance without a Second Model: The most "aha" moment is that the contrastive signal needed for guidance already exists inside the model. By contrasting global head outputs against local head outputs, GCG achieves the benefits of guidance without the "weak model" overhead.
Figure 2: (a) Accuracy as a function of the average evidence–mask distance. The baseline performance consistently degrades as the distance increases, indicating that diffusion LLMs rely more heavily on local context than on global context during denoising (gray). GCG mitigates this issue by enhancing global-context utilization, yielding larger gains at longer distances (blue). (b) COM heatmap across all blocks and heads. Heads with high COM values (red) attend more strongly to global context, whereas heads with low COM values (blue) mainly focus on local context.

Key Results

  • Superior Performance: GCG consistently outperformed existing methods like U-CFG and A-CFG. For LLaDA-8B, GCG improved GSM8K-CoT scores from 46.7 to 48.4 and Ruler scores from 26.2 to 29.5.
  • Extreme Efficiency: While standard guidance methods double the inference cost (FLOPs), GCG adds only about 0.003% additional FLOPs. For a context length of 1K tokens, GCG stayed at 15.9T FLOPs while competitors jumped to 31.8T.
  • Robustness: The method proved robust across different calibration datasets and guidance scales, suggesting it captures a fundamental property of how these models process context.
Figure 3: Pruning global heads (red) causes much steeper accuracy drops than pruning local heads (blue), especially at long distances.

Limitations and Future Work

  • Calibration Overhead: While inference is fast, identifying the global/local heads takes 2–3 hours per model on a multi-GPU setup. The authors suggest future work could use lightweight proxy metrics to speed this up.
  • Task Specificity: While GCG is broadly effective, the gains are most pronounced in tasks requiring complex reasoning or long-range context. For simple, short-range tasks, the benefits are more modest.
  • Extension to Autoregressive Models: The authors noted that while GCG works on models like Llama-3, the gains are smaller because autoregressive models don't suffer from the same "sparse local context" problem during their generation process as diffusion models do.

Summary updated

BibTeX
@inproceedings{jeon2026global,
  author = {Jeimin Jeon and Bumsub Ham},
  title = {{Global Context Guidance for Diffusion Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=LIdk3v52Wt},
}
Figure