TL;DR
TextLDM successfully ports the "visual diffusion recipe"—a VAE, a Diffusion Transformer (DiT), and flow matching—to the domain of language modeling. By introducing Representation Alignment (REPA) to bridge the gap between discrete tokens and continuous diffusion, the authors achieve performance parity with GPT-2 while offering a constant-time inference profile that doesn't slow down as sequences get longer.
What Problem Does This Paper Address?
Currently, there is a methodological schism in generative AI: visual models (images and video) have converged on continuous diffusion using Diffusion Transformers (DiT), while language models remain firmly rooted in the discrete, autoregressive (AR) paradigm.
The authors argue that if we want a truly unified multimodal architecture, we need a way for diffusion models to handle text effectively. The challenge is that text is inherently discrete. Previous attempts at "text diffusion" often struggled with generation quality or required heavy architectural departures from the successful visual DiT pipeline. The central bottleneck identified here isn't the diffusion backbone itself, but the latent representation: a standard VAE might reconstruct text perfectly but produce a "latent geometry" that is jagged and difficult for a diffusion model to navigate.
Methods
TextLDM uses a two-stage framework that mirrors the pipeline used in models like Stable Diffusion 3 or Sora:
- TextVAE: A Transformer-based Variational Autoencoder maps discrete tokens to continuous latent vectors. Crucially, it maintains a one-to-one mapping (one latent per token). To make these latents "diffusion-friendly," the authors use Representation Alignment (REPA). During VAE training, the encoder's intermediate features are aligned with the hidden states of a frozen, pretrained LLM (Qwen3-1.7B) using a cosine similarity loss. This "injects" semantic structure into the latent space.
- TextDiT: A standard Diffusion Transformer performs Flow Matching in this learned latent space. It learns to predict the "velocity" required to transform Gaussian noise into valid text latents, conditioned on a prefix (context).
The model also adopts visual diffusion staples like Classifier-Free Guidance (CFG) to boost quality and a logit-normal timestep schedule, which prioritizes training on the mid-range denoising steps where the most critical structural decisions are made.
Datasets
- Training: All models were trained from scratch on OpenWebText2, a large-scale corpus of web text.
- Evaluation: The models were tested on a text continuation task across four benchmarks:
- One Billion Words: Short, in-domain sentences.
- TinyStories: Simple, synthetically generated children's stories.
- Wikipedia & WikiSource: Longer, diverse documents that test out-of-distribution generalization.
Key Insights and Ideas
- Reconstruction Fidelity $\neq$ Generation Quality: The authors discovered that a VAE can achieve near-perfect token reconstruction while still being useless for diffusion. REPA is the "secret sauce" that shapes the latent space geometry to be smooth and semantically rich enough for conditional denoising.
- The Visual Recipe Transfers: One of the most significant findings is that the exact hyperparameters and components optimized for images (DiT backbone, flow matching, logit-normal scheduling) work remarkably well for text with minimal modification.
- Inference Efficiency: Unlike AR models, where the cost grows linearly with every new token generated, TextLDM generates the entire sequence in parallel. This results in a "length-invariant" inference profile, meaning it takes roughly the same amount of time to generate 100 tokens as it does 1000.
Key Results
- State-of-the-Art Diffusion: TextLDM substantially outperforms previous continuous and discrete diffusion language models like SSD-LM and Block Diffusion across ROUGE, BERTScore, and MAUVE metrics.
- Matching GPT-2: Under identical training settings, TextLDM matches or exceeds the performance of GPT-2 baselines. For example, on the WikiSource benchmark, the 768M parameter TextLDM achieved a ROUGE-1 score of 37.5, surpassing GPT-2 Large (33.7).
- Scaling Laws: The model exhibits clear scaling behavior; as the DiT backbone grows from 114M to 768M parameters, generation quality improves consistently, suggesting that the paradigm benefits from increased capacity just like AR models.
Limitations and Future Work
- Pipeline Complexity: The two-stage training (VAE then DiT) is more complex to implement and tune than the end-to-end training of standard AR Transformers.
- Domain Sensitivity: The VAE showed slightly lower reconstruction accuracy on out-of-distribution data (Wikipedia/WikiSource), which can propagate errors into the final text. The authors suggest that a more diverse training corpus could mitigate this.
- Evaluation Gap: Current LLM benchmarks (like MMLU) rely on token-level log-probabilities, which inherently favor AR models. Developing "fair" evaluation protocols for diffusion LMs remains an open challenge.
- Ultimate Goal: The authors view this as a stepping stone toward a single, unified DiT that handles both vision and language in a shared continuous latent space.
Summary updated