Any-Order Flexible Length Masked Diffusion

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Kim, Jaeyeon, Cheuk-Kit, Lee, Domingo-Enrich, Carles, Du, Yilun, Kakade, Sham, Ngotiaoco, Timothy, Chen, Sitan, Albergo, Michael
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911142359597056
author Kim, Jaeyeon
Cheuk-Kit, Lee
Domingo-Enrich, Carles
Du, Yilun
Kakade, Sham
Ngotiaoco, Timothy
Chen, Sitan
Albergo, Michael
author_facet Kim, Jaeyeon
Cheuk-Kit, Lee
Domingo-Enrich, Carles
Du, Yilun
Kakade, Sham
Ngotiaoco, Timothy
Chen, Sitan
Albergo, Michael
contents Masked diffusion models (MDMs) have recently emerged as a promising alternative to autoregressive models over discrete domains. MDMs generate sequences in an any-order, parallel fashion, enabling fast inference and strong performance on non-causal tasks. However, a crucial limitation is that they do not support token insertions and are thus limited to fixed-length generations. To this end, we introduce Flexible Masked Diffusion Models (FlexMDMs), a discrete diffusion paradigm that simultaneously can model sequences of flexible length while provably retaining MDMs' flexibility of any-order inference. Grounded in an extension of the stochastic interpolant framework, FlexMDMs generate sequences by inserting mask tokens and unmasking them. Empirically, we show that FlexMDMs match MDMs in perplexity while modeling length statistics with much higher fidelity. On a synthetic maze planning task, they achieve $\approx 60 \%$ higher success rate than MDM baselines. Finally, we show pretrained MDMs can easily be retrofitted into FlexMDMs: on 16 H100s, it takes only three days to fine-tune LLaDA-8B into a FlexMDM, achieving superior performance on math (GSM8K, $58\% \to 67\%$) and code infilling performance ($52\% \to 65\%$).
format Preprint
id arxiv_https___arxiv_org_abs_2509_01025
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Any-Order Flexible Length Masked Diffusion
Kim, Jaeyeon
Cheuk-Kit, Lee
Domingo-Enrich, Carles
Du, Yilun
Kakade, Sham
Ngotiaoco, Timothy
Chen, Sitan
Albergo, Michael
Machine Learning
Masked diffusion models (MDMs) have recently emerged as a promising alternative to autoregressive models over discrete domains. MDMs generate sequences in an any-order, parallel fashion, enabling fast inference and strong performance on non-causal tasks. However, a crucial limitation is that they do not support token insertions and are thus limited to fixed-length generations. To this end, we introduce Flexible Masked Diffusion Models (FlexMDMs), a discrete diffusion paradigm that simultaneously can model sequences of flexible length while provably retaining MDMs' flexibility of any-order inference. Grounded in an extension of the stochastic interpolant framework, FlexMDMs generate sequences by inserting mask tokens and unmasking them. Empirically, we show that FlexMDMs match MDMs in perplexity while modeling length statistics with much higher fidelity. On a synthetic maze planning task, they achieve $\approx 60 \%$ higher success rate than MDM baselines. Finally, we show pretrained MDMs can easily be retrofitted into FlexMDMs: on 16 H100s, it takes only three days to fine-tune LLaDA-8B into a FlexMDM, achieving superior performance on math (GSM8K, $58\% \to 67\%$) and code infilling performance ($52\% \to 65\%$).
title Any-Order Flexible Length Masked Diffusion
topic Machine Learning
url https://arxiv.org/abs/2509.01025