Extracting Training Data from Diffusion Language Models via Infilling

Yihan Wang, N. Asokan · 2026

Read Extracting Training Data from Diffusion Language Models via Infilling by Yihan Wang, N. Asokan (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-24173.txt.

Introduction

Wang and Asokan study memorization in diffusion language models, which fill in masked tokens anywhere. Prefix-only probing thus shows one facet of memorization and understates risk. They define infilling extraction, a protocol keyed to any mask that covers prefix probing and captures two-way bias. Across five modes, three training setups, and three corpora, mask shape drives leakage: edge-conditioned masks pull up to three times more verbatim strings than prefix masks. Even redacted email addresses prove easier to recover here than from matched autoregressive models.

Catalog record

CREATORYihan Wang, N. Asokan
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE43290
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2605.24173

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Extracting Training Data from Diffusion Language Models via Infilling Yihan Wang, N. Asokan Abstract Memorization in large language models has been studied almost exclusively through prefix-conditioned extraction, a natural choice for autoregressive models. However, diffusion language models (DLMs) can denoise masked tokens at arbitrary positions. Thus, prefix-only probing reveals only one facet of memorization in DLMs and significantly underestimates the risk of training-data extraction. In order to realistically model extractability of training data in DLMs, we introduce infilling extraction , a data-extraction protocol parameterized by an arbitrary binary mask that subsumes prefix-only probing and accounts for the bidirectional inductive bias of DLMs. Instantiating it on LLaDA-8B and Dream-7B across five extraction modes, three training pipelines, and three corpora covering verbatim and partial leakage, we find that mask geometry governs extractability: edge-conditioned masks extract up to three times more verbatim sequences than prefix-conditioned ones, and bidirectional access opens channels inaccessible in autoregressive models. In particular, we show that a realistic adversary with access to training data where personally identifiable information has been redacted, can even achieve higher recall on extracting redacted email addresses from DLMs than from scale-matched autoregressive models. Tunable parameters for decoding measurably affect extraction performance, while a follow-up supervised finetuning stage does not eliminate the prior memorization. 1 Introduction By learning statistical patterns over vast and diverse text, large language models (LLMs) exhibit surprising generalization ability, successfully adapting to a wide variety of downstream tasks. However, this reliance on training data comes at a cost: models do not merely generalize, but also memorize portions of their training data, raising serious concerns about the leakage of personally identifiable information (PII), the reproduction of copyrighted material, and the disclosure of confidential content embedded in training corpora [ 5 , 23 , 19 , 28 ] . A prominent line of work demonstrating these risks is data extraction attacks [ 6 , 31 , 46 , 15 ] , in which an adversary crafts prompts that induce the model to regurgitate sequences from its training set. While memorization and data extraction attacks on autoregressive language models (ARMs) have been studied extensively [ 43 ] , a fundamentally different paradigm of text generation has recently emerged: diffusion language models (DLMs) [ 26 , 14 , 32 , 45 , 44 ] . Rather than predicting the next token strictly left-to-right, DLMs learn to iteratively denoise corrupted text and can generate multiple tokens at arbitrary positions per step [ 2 , 27 , 37 , 16 ] , offering a promising path toward faster and more flexible language models [ 36 , 13 , 21 , 4 , 3 ] . Despite their growing scale and deployment, memorization characteristics of DLMs and their vulnerability to data extraction remain largely unexplored. In this work, we close this gap by developing a comprehensive framework for evaluating data extractability in large DLMs. Our central observation is that estimating the risk of training data extraction in DLMs using only prefixes from training data records as prompts [ 29 ] (also known as the prefix-conditioned protocol ) can significantly underestimate the risk because this protocol, inherited from exploring data extraction in ARMs, captures only one facet of memorization: it asks what the model produces next , but not what it would fill in given arbitrary surrounding context . We therefore introduce infilling extraction , a strictly more general protocol parameterized by a binary mask \mathbf{m} . The unmasked positions of a training sequence constitute the context revealed to a DLM, which is asked to reconstruct the text corresponding to the masked positions. The training sequence is considered extracted if the reconstruction matches the masked text. Within this protocol, we instantiate five canonical access modes which we term prefix / suffix -conditioned, middle part-conditioned, edge -conditioned, and uniformly random geometries, plus a targeted variant in which only sensitive entities are masked. We investigate three training pipelines that cover how DLMs are realistically exposed to data, including full fine-tuning (FT), low-rank adaptation (LoRA), and supervised fine-tuning (SFT) under a chat template, and evaluate on three datasets that surface complementary risks: MIMIR Pile for verbatim extraction, the Enron email PII extraction, and Tulu3 for prompt/response leakage in instruction-tuned deployments. We additionally trace how the practitioner-tunable parameters of decoding (i.e., number of denoising steps, semi-autoregressive block size, sampling temperature, and remasking strategy) affect extractability. Our experiments on LLaDA-8B [ 32 ] and Dream-7B [ 45 ] uncover several patterns that prefix -conditioned evaluation alone would have missed. (i) Mask geometry governs extractability. At matched budget, edge -conditioned masks extract up to three times more verbatim sequences than prefix -conditioning, evidencing the bidirectional inductive bias of DLMs. (ii) Bidirectional access opens new leakage channels. Adversaries can recover user prompts from responses and perform targeted PII reconstruction, both invisible under prefix -conditioned probing. (iii) Focusing only on prefix -conditioned access [ 29 ] may underestimate the risk of training data extraction risks in DLMs. For example, if the adversary obtains a redacted version of the training data, through mandated disclosure (e.g., regulatory or court-ordered release with PII redaction) or via a partial data leak—both of which are realistic scenarios [ 33 , 11 , 39 , 35 ] — targeted infilling against a DLM can achieve higher PII recall than from a scale-matched ARM, whereas using only prefix -conditioned extraction on DLMs will not. (iv) Decoding hyperparameters serve as practical amplification or mitigation levers, and a follow-up SFT stage redistributes but does not close the channel that infilling exposes. We summarize our contributions as follows: • We formalize infilling extraction ( Section 3 ), a mask-parameterized data-extraction protocol, generalizing prefix -conditioned extraction and accounting for bidirectional bias of DLMs. • We instantiate the protocol with five access modes plus a targeted-PII variant, three training pipelines, and four decoding parameters, yielding the first systematic study of memorization and training-data extraction in large DLMs across access patterns, exposure regimes, and inference-time configurations, showing that DLMs pose a greater risk of training-data leakage than previously thought ( Section 4.1 – 4.4 ). • We empirically characterize how mask geometry, decoding parameters, and post-training stages shape extractability on LLaDA-8B and Dream-7B, identifying new leakage channels structurally inaccessible in ARMs and discuss inference-time mitigations ( Section 4.5 – 4.7 ). 2 Preliminaries 2.1 Diffusion Language Models Whereas ARMs predict the next token strictly from left to right, DLMs cast generation as iterative denoising: a forward process corrupts a sequence by replacing tokens with a special [MASK] symbol, and a learned reverse process recovers them from the partially masked context. Representative masked DLMs such as LLaDA [ 32 ] and Dream [ 45 ] are trained with a cross-entropy loss over the masked positions, \mathcal{L}(\theta)=-\mathbb{E}_{t,\mathbf{x}_{0},\mathbf{m}_{t}}\!\left[\frac{1}{t}\sum_{i=1}^{L}\mathbf{m}_{t}^{i}\cdot\log p_{\theta}(\mathbf{x}_{0}^{i}\mid\mathbf{x}_{0}\otimes\mathbf{m}_{t})\right], where \mathbf{x}_{0} is a length- L sequence, t\!\in\!(0,1] is a uniformly sampled corruption level, \mathbf{m}_{t} is a random binary mask with \|\mathbf{m}_{t}\|_{0}=\lfloor tL\rfloor , \otimes is mask operation and \mathbf{x}_{0}\otimes\mathbf{m}_{t} masks a fraction t of \mathbf{x}_{0} . At inference, a DLM unmasks multiple positions per step over T denoising steps [ 42 , 18 ] ; which positions to commit is governed by a remasking strategy (random, confidence-based, or uncertainty-based) [ 32 , 45 ] . Semi-autoregressive decoding further partitions the sequence into blocks

Read the complete text