arXiv(opens in a new tab)cs.LGOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.25447

Enhanced Masked Diffusion Unlearning

Tomer Garber, Tom Tirer

ABSTRACT

Masked diffusion language models (MDLMs) generate text by iteratively unmasking tokens with bidirectional context. As these models reach real-world deployment, machine unlearning becomes essential. This process aims to remove the influence of a designated ‘forget set’ without retraining from scratch, so that sensitive, copyrighted, or restricted content can no longer be elicited while preserving retained capabilities. Masked Diffusion Unlearning (MDU) is the first publicly available unlearning method customized for these models: it tunes the model pθp_{\theta} to match a frozen prompt-masked anchor panchorp_{\text{anchor}} on the forget set by minimizing the anchor-last divergence KL(pθ∥panchor)\text{KL}(p_{\theta} \parallel p_{\text{anchor}}). We identify two failure modes of MDU. First, random answer masking can leave key forget tokens visible to the anchor even when the question is fully masked. Second, at a memorized (near-one-hot) prediction, the anchor-last logit gradient vanishes while the anchor-first divergence KL(panchor∥pθ)\text{KL}(p_{\text{anchor}} \parallel p_{\theta}) logit gradient does not. As a result, MDU training stalls on the tokens we most need to forget. Backed by theoretical and empirical analyses, we propose Enhanced Masked Diffusion Unlearning (EMDU): anchor-first KL divergence toward a frozen anchor whose entire answer span is masked. On TOFU and RWKU benchmarks using LLaDA-8B and Dream-7B, our EMDU matches or exceeds the forgetting of MDU and adapted AR baselines, while better preserving retain utility.

1 INTRODUCTION

Large language models (LLMs) trained on web-scale corpora inevitably memorize sensitive personal information, copyrighted material, and private facts. Machine unlearning (Cao & Yang, 2015; Bourtoule et al., 2021) addresses the urgent need to remove designated training data from a deployed model so that forget-set information can no longer be elicited, while preserving performance on retain data. While unlearning in autoregressive (AR) models has matured via gradient ascent (Jang et al., 2023; Yao et al., 2024), preference optimization (Rafailov et al., 2023), and bounded and reweighted objectives (Zhang et al., 2024a; Fan et al., 2025; Wang et al., 2025), with dedicated benchmarks (Maini et al., 2024; Jin et al., 2024; Li et al., 2024; Shi et al., 2025) and unified evaluation suites (Dorna et al., 2025), extending these concepts to alternative generative paradigms presents distinct challenges. In particular, AR unlearning objectives operate on a single, well-defined next-token log-likelihood, whereas MDLMs train and generate over randomly masked positions and timesteps with no fixed unmasking order; porting such an objective therefore means choosing how to mask and sample for it, a choice that can leave forgotten content recoverable through masking patterns the objective was never defined over. While concept erasure in continuous image diffusion models (Gandikota et al., 2023; Zhang et al., 2024b) has demonstrated the feasibility of altering denoising trajectories, generative unlearning for discrete text diffusion remains under-explored.

The emergence of Masked Diffusion Language Models (MDLMs) (Austin et al., 2021; Lou et al., 2024; Sahoo et al., 2024)—such as LLaDA (Nie et al., 2025) and Dream (Ye et al., 2025)—presents a fundamental shift in text generation. By iteratively denoising sequences of masked tokens via bidirectional context rather than left-to-right prediction, MDLMs achieve strong generative performance and global sequence coherence. As these architectures scale to frontier capabilities (Bie et al., 2025; Inception Labs et al., 2025), ensuring safety and unlearning becomes critical.

Recently, Lee et al. (2026) introduced Masked Diffusion Unlearning (MDU), the first publicly available unlearning framework tailored for MDLMs. It aligns the model's output on a forget set,

LLaDA-8B-Instruct Q Can you specify the birthplace of author Ji-Yeon Park? GT Author Ji-Yeon Park was born in Seoul, South Korea. Pred Ji-Yeon, the of the000, was born.,190, in Seoul, South Korea. Dream-7B-Instruct Q Which universities did Hina Ameen attend to study geology? GT Hina Ameen completed her Bachelor's at the University of Karachi and proceeded to obtain her Master's and Ph.D. in Geology at the University of Cambridge. Pred Kapoorina Kapoor Kapoor ... University Kapoor Karachi ... University Kapoor Cambridge Kapoor ...

Figure 1: TOFU forget-set generations at τ=0\tau=0 with unlearning following the MDU recipe. Highlighted spans mark leaked facts in the prediction and the matching tokens in GT; the ellipsis (...) denotes elided repeated tokens in these incoherent generations.

Wrong Answer Q What is the full name of the fictitious author who was born in Seoul, South Korea on 03/19/1960? GT The author, who was born in Seoul, South Korea on 03/19/1960, is named Ji-Yeon Park. Pred The full name of the author is Ji-Ho Lee. Leaked Answer Q Can you specify the birthplace of author Ji-Yeon Park? GT Author Ji-Yeon Park was born in Seoul, South Korea. Pred The author Ji-Yeon Park, was born in the vibrant city of Seoul, South Korea.

Figure 2: TOFU forget-set generations (LLaDA-8B-Instruct) at τ=1\tau=1 with unlearning following the MDU recipe: fluent and confident, yet either completely wrong (top) or a full leak of the correct answer (bottom), both indistinguishable from a real answer to a downstream user.

pθ(⋅∣x,yt)p_{\theta}(\cdot \mid x, y_t), with a prompt-masked unconditional anchor, panchor(⋅∣∅,yt)p_{\text{anchor}}(\cdot \mid \emptyset, y_t), scaled by a temperature hyperparameter τ∈[0,1]\tau \in [0, 1], via the anchor-last divergence KL(pθ∥panchor)\text{KL}(p_{\theta} \parallel p_{\text{anchor}}). This term is combined with a standard cross-entropy loss on a retain set when available. However, we identify two critical limitations of MDU, which we will elaborate on in this paper: (i) Knowledge leakage: Anchor-last KL pulls pθp_{\theta} toward the diffuse masked anchor by matching the model's aggregate output distribution rather than directly suppressing the probability of 'forget tokens', so sensitive tokens remain recoverable within the resulting noisy generation trajectories even at the anchor's most diffuse setting (Figure 1); moreover, under random partial masking, unmasked answer tokens can remain visible to the anchor's own null-context forward pass, so its "unconditional" prediction may still concentrate on the sensitive part of the answer; and (ii) Vanishing 'forget gradient': at a memorized (near-one-hot) masked-token prediction, the anchor-last KL's gradient vanishes while the anchor-first KL's gradient does not; as a result, under finite-step training (and due to practical nonconvexity, even non-finite), MDU learning stalls exactly on the tokens we most need to forget.

We ask whether the choice of divergence direction, not just the anchor (as suggested in Lee et al. (2026)), is the primary lever for forgetting quality in MDLMs. A second, orthogonal design choice is how the anchor is constructed: under random partial masking, unmasked answer tokens can remain visible to the null-context model, so the unconditional prediction may still concentrate on the forget answer; masking the entire answer span removes that cue. We propose Enhanced Masked Diffusion Unlearning (EMDU), which replaces the anchor-last objective with the anchor-first divergence KL(panchor∥pθ)\text{KL}(p_{\text{anchor}} \parallel p_{\theta}) and fully masks target answer spans when forming the anchor. Empirically, the unlearned model typically abstains on forget queries by emitting empty (EOS-only) completions rather than fluent paraphrases of the sensitive fact. An empty completion is a safer output mode for unlearning: emitting no tokens is auditable and cannot itself leak partial or hallucinated forget-set content, whereas a long incoherent answer can still include leaks (see MDU generations with τ=0\tau = 0 in Figure 1) and a fluent paraphrase risks either regurgitating the original fact or confidently asserting a plausible-sounding wrong one, which is harder to detect and arguably worse for a downstream user, especially in critical applications (see MDU generations with τ=1\tau = 1 in Figure 2).

References (84)

  • Block diffusion: Interpolating between autoregressive and diffusion language models
  • Structured denoising diffusion models in discrete state-spaces
  • Tiwei Bie, Maosong Cao, Kun Chen, Lun Du, Mingliang Gong, Zhuochen Gong, Yanmei Gu, Jiaqi Hu, Zenan Huang, Zhenzhong Lan, et al. LLaDA2.0: Scaling up diffusion language models to 100B. arXiv preprint arXiv:2512.15745, 2025. (opens arXiv in a new tab)
  • Machine unlearning
  • Towards making systems forget with machine unlearning
  • Retaining by doing: The role of on-policy data in mitigating forgetting
  • Elements of Information Theory
  • Openunlearning: Accelerating LLM unlearning via unified benchmarking of methods and metrics
  • Simplicity prevails: Rethinking negative preference optimization for LLM unlearning
  • Erasing concepts from diffusion models
  • Image restoration by denoising diffusion models with iteratively preconditioned guidance
  • Zero-shot image restoration using few-step guidance of consistency models (and beyond)
  • Classifier-Free Diffusion Guidance
  • Denoising diffusion probabilistic models
  • Ultra-fast language models based on diffusion (opens arXiv in a new tab)
  • Knowledge unlearning for mitigating privacy risks in language models
  • RWKU: Benchmarking real-world knowledge unlearning for large language models
  • Neural architectures for named entity recognition
  • Machine unlearning for masked diffusion language models (opens arXiv in a new tab)
  • The WMDP benchmark: Measuring and reducing malicious use with unlearning
  • Discrete diffusion modeling by estimating the ratios of the data distribution
  • TOFU: A task of fictitious unlearning for LLMs
  • SDEdit: Guided image synthesis and editing with stochastic differential equations
  • Large language diffusion models
  • Direct preference optimization: Your language model is secretly a reward model
  • Simple and effective masked diffusion language models
  • RL's razor: Why online reinforcement learning forgets less
  • MUSE: Machine unlearning six-way evaluation for language models
  • Denoising diffusion implicit models
  • Score-based generative modeling through stochastic differential equations
  • Consistency models (opens arXiv in a new tab)
  • Rethinking LLM unlearning objectives: A gradient perspective and go beyond
  • Rethinking Kullback-Leibler divergence in knowledge distillation for large language models
  • Large language model unlearning
  • Dream 7B: Diffusion large language models (opens arXiv in a new tab)
  • Negative preference optimization: From catastrophic collapse to effective unlearning
  • Defensive unlearning with adversarial training for robust concept erasure in diffusion models
  • Adversarial reinforcement learning for robust diffusion large language model unlearning
  • dLLM: Simple diffusion language modeling
  • Differentiating $\log q_k$ through softmax gives $\partial \log q_k / \partial z_j = \delta_{kj} - q_j$, hence
  • The partial with respect to $q_k$ is $\partial \mathcal{L}_{\mathrm{AL}} / \partial q_k = \log(q_k / p_k) + 1$
  • Explicitly, set $r_i := q_i / \varepsilon$ for $i \neq j$, so $r$ is a probability vector on the $V-1$ indices $\mathcal{V} \setminus \{j\}$
  • $\nabla_z \mathcal{L}_{\mathrm{AL}} \to 0$ since as $\varepsilon \to 0$, the upper bound on its norm vanishes $\varepsilon \log(V/\varepsilon) \to 0$
  • For $k \neq j$, $\log q_k(s) = -s - \log\left(1 + (V - 1)e^{-s}\right) = -s + O(e^{-s})$
  • the anchor-last gradient at coordinate j vanishes along the same ray, at an explicit rate
  • Proposition 3 already applies to arbitrary $p$ with $p_y < 1$, including $\tau > 0$
  • On the slice above
  • $g_{\mathrm{AL}}(y): = (\nabla_z \mathcal{L}_{\mathrm{AL}})_y$ and likewise for AF
  • \tag {12} $$
  • The anchor-last $y$-coordinate is
  • Table 5 instantiates the slice at LLaDA's $V = 126,464$ with uniform $p_y = 1/V$
  • $t$ to get $y_t$ with masked set $\mathcal{M}_t$
  • Unlearning uses forget10 with retain90
  • We follow the Base SFT recipe suggested by MDU (Lee et al., 2026)
  • 4 (effective batch 16, i.e
  • 1 (effective batch 4, i.e
  • We use that code-base as a starting point and extend it with EMDU (anchor-first KL and full answer-span masking), complete TOFU / RWKU evaluation, and the checkpoints we will release
  • $^{3}$ We unlearn each of the first 10 celebrity subjects independently, matching MDU, on that subject's RWKU forget-pair file (582 prompt-response biographies), starting from the Instruct checkpoint with no extra SFT and no retain set
  • after the assistant header, so the model's reply begins directly with the choice. The placement matters little for Dream, which answers with a bare letter under either prompt (off-the-shelf Dream-7B-Instruct: 0.740 with their placement, 0.760 with RWKU's). LLaDA, however, often restates the cue (
  • Forget ↓; Retain, Real Authors (RA), and World Facts (WF) ↑
  • >Method</td><td colspan=
  • Forget vs. Retain, in ROUGE-L (left) and probability (right)
  • For each method, the config that is reported in Table 3 is marked with a star
  • Forget vs. Retain, ROUGE-L (left) and probability (right)
  • (13) answer probability)
  • >Method</td><td rowspan=
  • >Backbone</td><td colspan=
  • Figures 8–9 show this on RWKU and TOFU. Highlighted spans mark leaked content shared with the ground truth, as in Figure 1; long repetitive stretches in incoherent generations, and the tails of long answers, are elided with (...)
  • Figures 10–15 show retain-side queries (TOFU Retain, Real Authors, and World Facts, and RWKU neighbor queries, on both backbones) where EMDU answers correctly while several baselines give a fluent but wrong answer: fabricated book titles and authors, a wrong country, a wrong song
  • born Bangladesh Dhaka Bangladesh ...</td></tr><tr><td>GD</td><td>The author's full name is Rajeev Majum and he was born in Dhaka, Bangladesh.</td></tr><tr><td>NPO</td><td>The author's full name is Rajee works works works
  • The Battle of Unsaid Words
  • Unhealed Wounds
  • The Unseen Wounds
  • Wounds of War
  • The Unseen War
  • Echoes of the Battlefield
  • EMDU names the correct book; most baselines list fabricated titles
  • EMDU answers correctly; most baselines name a fabricated author
  • dilemmas intertwined intricately woven societal undertones dile aesthetics dile immortality ...</td></tr><tr><td>GD</td><td>‘The Picture of Dorian Gray’ is a novel written by the author
  • EMDU answers correctly; several baselines name the wrong author or degenerate
  • EMDU answers correctly; three baselines name the wrong country
  • EMDU answers correctly; all baselines fill the blank wrongly
  • ><tr><td colspan=
  • EMDU answers correctly; three baselines give a different Pitbull single