· Masked / discrete diffusion, Controllability · Source · Code (Mention in inspected excerpt)

LangFlow: Continuous Diffusion Rivals Discrete in Language Modeling

SourceFull paper

Article overview

Verdict

LangFlow is a credible continuous-diffusion method for language: it connects Flow Matching to token prediction, achieves competitive perplexity, and outperforms listed baselines under several conditions. The advantage is not universal, however: sample entropy is lower and scaling effects remain unresolved.

Main idea

The core idea is to train token probabilities with cross-entropy as a principled Bregman formulation of Flow Matching, then convert them into a continuous denoiser through the expected token embedding. This avoids direct embedding regression and couples token-likelihood training to the ODE flow.

Mechanism

Representation and state: tokens are mapped to normalized embeddings scaled by √768; the noisy state is zγ=αγz+σγϵ, with γ=log(σ²/α²) and a variance-preserving schedule.

Architecture: a 130M DiT with 12 attention layers, 12 heads, hidden size 768, and 128-dimensional time/noise embeddings. It adds self-conditioning projections and a tokenwise log p(zγ|x) logit bias, ramped over the first 5,000 iterations; no material parameter increase is reported.

Training: γ is sampled with a low-discrepancy or learnable Gumbel scheduler; the model predicts token probabilities and minimizes cross-entropy, optionally using a previous prediction for self-conditioning. Noise density is intended to be proportional to posterior-entropy reduction with respect to γ; a scheduler loss is also optimized. Cross-entropy is interpreted as the negative conditional log-likelihood of a factorized approximation to the endpoint token posterior.

Denoising and likelihood: token probabilities are converted into an expected embedding. Euler ODE sampling starts from Gaussian noise and iteratively updates the latent embedding; the final token is selected by argmax. Deterministic ODE dynamics support a divergence-based NLL upper bound and leave room for few-step distillation.

Reproduction: (1) normalize and scale token embeddings; (2) sample γ and construct zγ; (3) train the DiT with token cross-entropy and optional self-conditioning; (4) train the entropy-based scheduler; (5) integrate the Euler ODE from Gaussian noise; (6) compare perplexity, entropy, and zero-shot results at fixed NFE.

What this is useful for

The method is most applicable to continuous text-diffusion research requiring token-level likelihood training, deterministic generation, and evaluation across sampling budgets. It is suitable for models near the reported scale and DiT configuration, and for comparisons with masked/discrete diffusion and autoregressive baselines. Its ODE structure also makes it promising for later few-step sampling distillation.

Risks / not proven

Generated samples have lower entropy, which the authors associate with global frequency bias: highly frequent content words may recur across separate sentences. Subtle effects at larger scales remain unresolved by the supplied evidence. MSE embedding regression collapses token representations, but this demonstrates a risk of that alternative objective rather than characterizing every possible design. The reported gains are limited to the stated datasets, 130M scale, and NFE settings; broad scalability and universality are not established.

Full abstract

Continuous diffusion has been the foundation of high-fidelity, controllable, and few-step generation of many data modalities such as images. However, in language modeling, prior continuous diffusion language models (DLMs) lag behind discrete counterparts due to the sparse data space and the underexplored design space. In this work, we close this gap with LangFlow, the first continuous DLM to rival discrete diffusion, by connecting embedding-space DLMs to Flow Matching via Bregman divergence, alongside three key innovations: (1) we derive a novel ODE-based NLL bound for principled evaluation of continuous flow-based language models; (2) we propose an information-uniform principle for setting the noise schedule, which motivates a learnable noise scheduler based on a Gumbel distribution; and (3) we revise prior training protocols by incorporating self-conditioning, as we find it improves both likelihood and sample quality of embedding-space DLMs with effects substantially different from discrete diffusion. Putting everything together, LangFlow rivals top discrete DLMs on both the perplexity (PPL) and the generative perplexity (Gen. PPL), reaching a PPL of 30.0 on LM1B and 24.6 on OpenWebText. It even exceeds autoregressive baselines in zero-shot transfer on 4 out of 7 benchmarks. LangFlow provides the first clear evidence that continuous diffusion is a promising paradigm for language modeling. Homepage: https://github.com/nealchen2003/LangFlow

Source

Paper resources

Code

BibTeX · RIS · Markdown · JSON