Fine-Tuning Discrete Diffusion Models with Policy Gradient Methods

Oussama Zekri, Nicolas Boulle

Introduction

Discrete diffusion models have emerged as highly promising architectures for generating complex categorical data, such as natural language and biological sequences. However, fine-tuning these models using standard reinforcement learning techniques—like Reinforcement Learning from Human Feedback (RLHF)—is notoriously difficult due to the non-differentiable nature of discrete sampling.

This paper introduces Score Entropy Policy Optimization (SEPO), a novel policy gradient algorithm that enables the efficient and stable fine-tuning of discrete diffusion models using non-differentiable (black-box) rewards. SEPO achieves state-of-the-art results in DNA sequence design and significantly improves language model alignment.

The Challenge of Discrete Diffusion Fine-Tuning

While diffusion models have dominated continuous domains like image generation, adapting them for discrete data presents a major mathematical hurdle. Standard diffusion fine-tuning relies on the sampling process being differentiable. Because sampling discrete tokens (like words or DNA bases) is inherently non-differentiable, researchers typically rely on memory-intensive workarounds, such as the Gumbel-Softmax trick.

Crucially, these workarounds strictly require a differentiable reward function. If the reward comes from a black-box system—such as a human evaluator, an LLM judge, or a biological oracle—these methods break down. The authors tackle this gap by adapting robust, standard policy gradient methods directly to discrete diffusion models.

Score Entropy Policy Optimization (SEPO)

The authors propose SEPO as a unified framework for policy gradient fine-tuning in discrete diffusion. The methodology relies on several key innovations:

  • Discrete REINFORCE via Concrete Scores: Instead of attempting to backpropagate through discrete sampling steps, SEPO uses the "concrete score" (a neural network approximation of transition probabilities between states) to derive a discrete version of the REINFORCE algorithm. This completely removes the need for the reward function to be differentiable, treating the reward $R(x)$ as a simple scalar multiplier in the loss function.
  • Self-Normalized Importance Sampling (SNIS): A naive implementation of the discrete REINFORCE trick suffers from massive variance. Because the vocabulary space is huge, the model rarely samples the exact same neighboring state twice, making gradient estimates wildly unstable.
Visualizing the variance trap in discrete sampling

To fix this "variance trap," the authors use SNIS to resample neighbors and compute a much lower-variance, harmonic-mean estimate of the marginal probabilities. This creates a localized proposal distribution, trading a small amount of compute for a massive gain in training stability.

  • Trust Region Clipping: Borrowing from state-of-the-art RL algorithms like PPO, SEPO clips the policy update ratio. This prevents the model from making destructively large updates to its weights based on a single batch of data.

Experimental Results

The authors evaluated SEPO across two distinct domains: DNA sequence modeling and natural language generation.

State-of-the-Art DNA Generation

Using the Gosai dataset—which contains 700,000 regulatory DNA sequences annotated with continuous enhancer activity scores—SEPO crushed existing baselines in generating highly active sequences. It achieved a median predicted enhancer activity of 7.64 (compared to the previous best, DRAKES, at 5.61) and a near-perfect chromatin accessibility score (ATAC-Acc) of 99.9% (vs. 92.5%). Furthermore, SEPO demonstrated significantly lower run-to-run variance, reliably outputting high-quality sequences without catastrophic failures.

Language Modeling Improvements

For language modeling, the model was fine-tuned using the HH-RLHF dataset and evaluated on the Awesome ChatGPT Prompts dataset. When fine-tuning the SEDD Medium model, SEPO variants consistently outperformed the base model.

Language modeling win rates

In head-to-head evaluations judged by GPT-3.5, the SEPO-1024 model was preferred over the pretrained vanilla model 75.8% of the time (at $T=512$ steps). Despite the extra math required for SNIS, SEPO achieves higher final performance in far fewer training epochs than prior methods, making its overall wall-clock time highly competitive.

Limitations and Future Work

The primary limitation of SEPO is its computational overhead. The inner importance sampling step (SNIS) requires additional forward passes to compute transition probabilities for each neighbor of the outer Monte Carlo samples. While this drastically reduces variance and the total epochs needed, it does increase the memory and compute cost per individual step.

Future work will likely focus on refining these gradient estimation techniques to make them computationally cheaper, as well as exploring SEPO's application in other structured generative modeling tasks beyond text and biology.

Summary updated

BibTeX
@inproceedings{zekri2025fine,
  author = {Oussama Zekri and Nicolas Boulle},
  title = {{Fine-Tuning Discrete Diffusion Models with Policy Gradient Methods}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=rXFzVRZsbt},
}
Figure