arXiv:2610.06648cs.CLOct 2026

Manuscript Offprint

arXiv:2610.06648

Representation-Space MMD for Diffusion Language Models

Ilya Drobyshevskiy, Ilia Sudakov, Maksim Semenov, Denis Kuznedelev, Maksim Ignatov, Pavel Temirchev, Nikita Balagansky, Viacheslav Meshchaninov, Nikita Gushchin, Dmitry Baranchuk

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

We introduce a post-training method for diffusion language models (DLMs) that minimizes Maximum Mean Discrepancy (MMD) between generated and reference distributions in the feature space of a frozen pretrained DLM. To estimate MMD, we retain contextual features at individual token positions, obtaining multiple observations per sequence from a single extractor pass. We optimize this objective using policy gradients for discrete models and direct differentiation through generated latents for continuous models. In both cases, computing the loss directly from these features enables efficient post-training without full sampling trajectories or jointly trained auxiliary models. Experiments show lower generative perplexity at comparable entropy on OpenWebText and better accuracy–computation trade-offs on GSM8K. On 16B DMax-LLaDA2.0 models with hybrid masked–uniform diffusion, we increase decoding parallelism with similar or higher accuracy on math and code benchmarks. Code is available at yandex-research/dlm-mmd.

1 INTRODUCTION

Diffusion language models (DLMs) generate text by refining noisy inputs in a discrete token space or a continuous latent space. In discrete models, token-wise cross-entropy trains a factorized denoiser to fit conditional token marginals. In continuous models, squared-error prediction of clean latents estimates their conditional mean. These conditional estimates guide iterative sampling, but do not necessarily yield high-quality samples in a few steps.

Diffusion distillation addresses this challenge in several ways. Some methods train a student to reproduce several teacher denoising updates in fewer steps (Salimans & Ho, 2022; Luhman & Luhman, 2021; Deschenaux & Gulcehre, 2025; Kim et al., 2025b). Others obtain distribution-matching gradients using an auxiliary model trained on the generator's evolving outputs (Yin et al., 2024b; Hoogeboom et al., 2026; Zheng et al., 2026). These methods improve sampling efficiency but require teacher-derived targets or jointly trained auxiliary models. Therefore, we ask whether a useful distributional training signal can instead be computed directly from generated and reference samples.

Maximum Mean Discrepancy (MMD) offers this possibility through kernel similarities between samples (Gretton et al., 2012). However, its effectiveness depends on the comparison space, since simple distances in high-dimensional spaces need not capture meaningful differences between outputs (Li et al., 2017; 2015). In this context, learned representations offer a promising comparison space for both discrete sequences and continuous outputs. In visual generation, MMD and related objectives in pretrained feature spaces have enabled high-quality generation with one or a few steps (Yang et al., 2026; Starodubcev et al., 2026; Deng et al., 2026). More recently, feature matching has improved LLM fine-tuning by comparing statistics of generated and reference sequences (Jelassi et al., 2026). Together, these results suggest that a fixed pretrained feature space can provide an effective training signal for distribution matching.

Contributions. In this work, we explore MMD for post-training both discrete and continuous DLMs. We use a frozen pretrained DLM to extract contextual features at individual positions,

∗^{*}Equal contribution.

obtaining multiple observations from each generated or reference sequence in a single extractor pass. We then train the generator to match the distributions of these features.

For discrete models, we sample sequences from the token distributions produced by a single denoiser pass and optimize the resulting MMD reward using REINFORCE with a leave-one-out baseline. We instantiate it as MDLM-MMD for masked-token prediction (Sahoo et al., 2024) and as DMax-MMD for hybrid masked-uniform diffusion (Chen et al., 2026b), where MMD trains both masked prediction and refinement of the model's own token predictions.

For continuous DLMs (CDLMs), we initialize a generator from a pretrained Embedded Language Flows (ELF) model (Hu et al., 2026) and train it to map Gaussian noise to clean latent sequences in a single step. In this case, MMD gradients directly propagate through the frozen ELF feature extractor and the generated latents. At inference, we use self-conditioning to iteratively refine the single-step predictions, extending the generator to multi-step sampling.

We evaluate both realizations on OpenWebText and TinyGSM, where they outperform the evaluated distribution-matching and flow-map baselines in most setups. At the 16B scale, we show that DMax-MMD improves the accuracy-efficiency trade-off on established math and code benchmarks.

References (92)