arXiv:2610.12544cs.LGOct 2026

Manuscript Offprint

arXiv:2610.12544

Transformer-Based Masked Diffusion Models Provably Learn Distributions with Latent Structure

Jingda Wu, Changxiao Cai

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

Abstract

Masked diffusion models (MDMs) generate discrete data by iteratively unmasking multiple tokens in parallel using a learned mask predictor. Their output carries two errors: parallelization error due to parallel sampling, and estimation error from the mask predictor learned with finite samples. Existing theory treats these errors separately, and the available statistical bounds typically scale with the number VLV^L of length- LL sequences over a vocabulary of size VV, suffering from the curse of dimensionality. In this work, we establish end-to-end statistical guarantees showing that transformer-based MDMs learn structured distributions with a sample complexity governed by their latent structure. Specifically, we model this structure through mixtures of hidden Markov trees, which capture latent dependencies within components and heterogeneity across components. When the data distribution is well approximated by such a mixture, a transformer-based MDM with parallel unmasking schedules achieves ε\varepsilon-accurate sampling in KL divergence with O~(LKpar/ε)\tilde{O}(LK_{\text{par}}/\varepsilon) training samples, where KparK_{\text{par}} is polynomial in LL, VV, the number of hidden states, and the number of mixture components. The transformer network and sampling procedure require no knowledge of the tree topologies or component parameters, thereby adapting to the unknown latent structure automatically. Overall, our results provide theoretical justification for the empirical effectiveness of MDMs on real-world data.

Contents

1 Introduction 2
1.1 Main contributions 3
1.2 Related work 4
1.3 Notation 4

2 Preliminaries 5
2.1 Masked diffusion models 5
2.2 Transformer structure for estimation 6

3 Problem setup: mixtures of hidden Markov trees 7

4 Main results: statistical guarantees for MDMs 8
4.1 Learning the mask predictor 9
4.2 End-to-end sampling guarantees 9

5 Analysis 11
5.1 Proof of Theorem 1 12

6 Discussion 13

*Department of Industrial and Operations Engineering, University of Michigan, Ann Arbor, USA. Email: {wujingda, cxcai}@umich.edu.

A Examples of low-complexity latent structure 17
A.1 Continuous latent representation 17
A.2 Low Rényi entropy 18

B Proof of Theorem 2 19

C Generalization analysis 20
C.1 Proof of Proposition 3 21
C.2 Capacity of transformer logit class 23
C.3 Proof of Proposition 1 25
C.4 Localized empirical-process lemma 25
C.5 Conditional-KL identity for excess risk 26

D Transformer approximation of conditionals 26
D.1 Regularization 26
D.2 Decomposition of the approximation error 28
D.3 Single-tree predictor construction 29
D.4 Approximation bound for mixtures of trees 35
D.5 Proof of Proposition 2 36

E Shallow-tree result 37
E.1 Message identities 37
E.2 Height-dependent predictor construction for single-tree 38
E.3 Approximation bound for mixtures of trees 41
E.4 Estimation error analysis 42
E.5 End-to-end sampling guarantees 42

F Auxiliary neural-network approximation lemmas 43
F.1 Exact operations and residual implementation 43
F.2 Scalar arithmetic approximations 44
F.3 Softmax stability and LSE approximation 45

G Parallelization error 48

References (100)

Couldn't load all references. Reload the page to try again.