TL;DR
Diffusion models are powerful for generation but struggle with discrete text. This paper proposes DiHAL, a hybrid approach that integrates diffusion into the internal hidden states of a pretrained transformer, rather than directly at the token level. By using geometric properties of these hidden states to find the "sweet spot" for diffusion, DiHAL achieves better performance and avoids the pitfalls of direct continuous-to-discrete conversion.
What Problem Does This Paper Address?
Diffusion models have revolutionized image generation, but their application to language generation has lagged behind traditional autoregressive transformers. A key challenge is the inherent discreteness of text. While researchers have explored various ways to adapt diffusion to text, such as denoising token embeddings or learned latents, these methods still face difficulties in accurately converting continuous diffusion outputs back to discrete tokens. This "continuous-to-discrete recovery" step is prone to errors that can significantly impact the generated text. The authors hypothesize that the problem might not be diffusion itself, but where it's applied within the language model's architecture. They propose that the geometry of the internal continuous hidden states, rather than just the token embeddings, plays a crucial role in diffusion's success.
Methods
The core of the paper is the DiHAL (Diffusion-Transformer Hybrid Architecture for Language Generation) framework, which employs a "Locate-and-Replace" strategy.
- Locate: DiHAL first identifies "diffusion-friendly" layers within a pretrained transformer. This is done by analyzing the geometric properties of the hidden states at each layer. They propose three empirical proxies:
- Local Curvature (mcurv): Measures how compact local neighborhoods of hidden states are.
- Monotonicity (mmono): Captures global directional stiffness of the representation space.
-
Effective Rank (k): Estimates the intrinsic dimensionality of the representation space. These proxies are combined into a "selection score" that favors layers with high curvature and low effective rank.
-
Replace: Once the optimal insertion layer (l) is identified, DiHAL replaces the transformer layers below l with a conditional diffusion bridge. This bridge is trained to reconstruct the hidden state at layer l (he), conditioned on the input embedding. The crucial aspect is that the diffusion process operates entirely in the continuous hidden-state space. The retained upper transformer layers and the original language model head then process this reconstructed hidden state to produce token predictions. This avoids the problematic direct continuous-to-discrete token recovery.
Datasets
- Dolma v1.7: Used for extracting activation dumps from pretrained models.
- WikiText-103: Used for evaluating the final model quality (NLL and PPL).
- Held-out Dolma v1.7: Also used for final model quality evaluation.
The paper also mentions using a "local raw-text copy of Dolma v1.7" for data sampling and activation dumps.
Key Insights and Ideas
- Geometry Matters: The paper strongly suggests that the geometric properties of internal hidden states are critical for successful diffusion in language models, not just the discrete nature of tokens.
- Hidden-State Diffusion is Viable: By targeting internal hidden states, diffusion can be applied in a more "diffusion-friendly" space, avoiding the direct continuous-to-discrete conversion bottleneck.
- Early Layers are "Diffusion-Friendly": The geometric analysis consistently points to layers closer to the input embedding as being more suitable for diffusion replacement. This suggests that these layers retain more of the "embedding-like" geometric structure that diffusion models can handle well.
- Geometry as a Proxy for Bridgeability: The proposed geometric score effectively predicts how "bridgeable" a layer is (i.e., how well a diffusion bridge can reconstruct its hidden state) under a fixed training budget, without needing to train bridges for every layer.
Key Results
- Geometry Score Effectiveness: The geometric selection score correlates highly with validation bridge loss, indicating its ability to predict diffusion-friendly insertion points. For Llama-3.1-8B, the score achieved a Spearman correlation of 0.9143 ± 0.0069.
- DiHAL Performance: In diagnostic comparisons, DiHAL achieved the lowest Gen.PPL (136.02) and highest diversity (0.5913) compared to other continuous diffusion methods like Diffusion-LM, SED, LD4LG, and CoDAR, under the same budget.
- Competitive Performance: When fully trained, DiHAL with geometry-selected layers was competitive with, and sometimes outperformed, models using an oracle layer selection (based on lowest validation loss) and significantly outperformed a strong baseline (CoDAR). For example, on Llama-3.1-8B, DiHAL achieved better NLL and PPL than the validation-loss oracle.
- Inference Cost: While DiHAL introduces diffusion denoising overhead, replacing lower transformer layers can reduce overall latency, especially with fewer denoising steps. However, deeper replacement is limited by the geometry criterion and the difficulty of reconstructing more specialized hidden states.
Limitations and Future Work
- Not a Standalone Model: DiHAL is a hybrid model that relies on retained pretrained transformer layers and the LM head for token prediction. It is not a fully standalone diffusion language model.
- Compute Constraints: The authors did not fully explore larger diffusion bridges, longer training durations, or deeper replacement due to compute limitations.
- Future Work:
- Incorporating geometric proxies directly into bridge training.
- Potentially enabling replacement of larger transformer prefixes.
- Developing models that use geometry not only for locating but also for training more bridgeable representations.
- Investigating whether the diffusion-friendly geometry is inherent or can be learned.
Summary updated