Learning Unmasking Policies for Diffusion Language Models

· Source: Apple Machine Learning Research · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Natural Language Processing · Depth: Expert, quick

Summary

Diffusion Language Models (dLLMs) are gaining parity with autoregressive models in downstream tasks and promise greater inference efficiency. A critical aspect of dLLM inference is the unmasking policy, which dictates token selection at each diffusion step. While heuristic strategies like confidence thresholding improve sample quality and token throughput over random unmasking, they require manual tuning and degrade with larger block sizes. This work proposes training unmasking policies using reinforcement learning. The masked diffusion sampling is formalized as a Markov decision process, with a lightweight policy based on a single-layer transformer mapping dLLM token confidences to unmasking decisions. Experiments show these trained policies match the performance of leading heuristics when combined with semi-autoregressive (block) generation, while outperforming them in the full-diffusion setting.

Key takeaway

For NLP Engineers optimizing Diffusion Language Model inference, consider integrating reinforcement learning for unmasking policies. Your current heuristic strategies, while effective, may face performance degradation with larger block sizes and require manual tuning. By formalizing sampling as a Markov decision process and training a lightweight transformer policy, you can achieve superior performance, especially in full-diffusion settings, enhancing both sample quality and token throughput.

Key insights

Reinforcement learning can optimize dLLM unmasking policies, outperforming heuristics and improving inference efficiency.

Principles

Method

Formalize masked diffusion sampling as a Markov Decision Process. Train a single-layer transformer policy using reinforcement learning to map dLLM token confidences to unmasking decisions.

In practice

Topics

Best for: Research Scientist, AI Scientist, NLP Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Apple Machine Learning Research.