Mixing Times of Glauber Dynamics on Masked Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Sana, Suvadip, Wolf, Sami, Mehta, Neer, Shah, Alina, Shaikh, Aitzaz, Goodman, Janna, Levine, Lionel
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917502100963328
author Sana, Suvadip
Wolf, Sami
Mehta, Neer
Shah, Alina
Shaikh, Aitzaz
Goodman, Janna
Levine, Lionel
author_facet Sana, Suvadip
Wolf, Sami
Mehta, Neer
Shah, Alina
Shaikh, Aitzaz
Goodman, Janna
Levine, Lionel
contents Masked language models (MLMs) define local conditional distributions over tokens but do not, in general, correspond to any consistent joint distribution over sequences. This raises a fundamental question: what global distributional behavior is induced when such conditionals are used iteratively for generation? We address this question by modeling iterative masked-token resampling as a Glauber dynamics Markov chain on the discrete space of token sequences. We first show that MLM conditionals are intrinsically incompatible: we introduce a rectangle test that certifies this incompatibility and empirically verify its prevalence across modern MLMs. We then provide a theoretical analysis of the induced Markov chain. Under bounded cross-token influence, we establish a high-temperature contraction result implying $O(n\log n)$ mixing time where $n$ is the sequence length. In contrast, we prove that under a uniform local margin condition, the chain exhibits metastability, with exponentially slow escape from semantic basins at low temperatures. Empirically, we demonstrate a phase transition in mixing behavior as a function of temperature and sequence length, consistent with the theoretical predictions. We further characterize the induced stationary behavior through semantic trajectories, identifying persistent structures such as long-lived traps and recurrent semantic basins, with political content serving as a measurable case study.
format Preprint
id arxiv_https___arxiv_org_abs_2605_16378
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Mixing Times of Glauber Dynamics on Masked Language Models
Sana, Suvadip
Wolf, Sami
Mehta, Neer
Shah, Alina
Shaikh, Aitzaz
Goodman, Janna
Levine, Lionel
Machine Learning
Artificial Intelligence
68T50
I.2.7
Masked language models (MLMs) define local conditional distributions over tokens but do not, in general, correspond to any consistent joint distribution over sequences. This raises a fundamental question: what global distributional behavior is induced when such conditionals are used iteratively for generation? We address this question by modeling iterative masked-token resampling as a Glauber dynamics Markov chain on the discrete space of token sequences. We first show that MLM conditionals are intrinsically incompatible: we introduce a rectangle test that certifies this incompatibility and empirically verify its prevalence across modern MLMs. We then provide a theoretical analysis of the induced Markov chain. Under bounded cross-token influence, we establish a high-temperature contraction result implying $O(n\log n)$ mixing time where $n$ is the sequence length. In contrast, we prove that under a uniform local margin condition, the chain exhibits metastability, with exponentially slow escape from semantic basins at low temperatures. Empirically, we demonstrate a phase transition in mixing behavior as a function of temperature and sequence length, consistent with the theoretical predictions. We further characterize the induced stationary behavior through semantic trajectories, identifying persistent structures such as long-lived traps and recurrent semantic basins, with political content serving as a measurable case study.
title Mixing Times of Glauber Dynamics on Masked Language Models
topic Machine Learning
Artificial Intelligence
68T50
I.2.7
url https://arxiv.org/abs/2605.16378