Command Palette
Search for a command to run...
データ分布の比率推定による離散拡散モデルの構築
データ分布の比率推定による離散拡散モデルの構築
Aaron Lou Chenlin Meng Stefano Ermon
概要
多くの生成モデリングタスクにおいて画期的な性能を達成しているにもかかわらず、拡散モデルは自然言語などの離散データ領域では十分に機能していない。重要なのは、標準的な拡散モデルは確立されたスコアマッチング理論に依存しているが、離散構造への一般化を試みた研究では同様の実証的性能向上が得られていない点である。本研究では、このギャップを埋めるため、スコアエントロピーという新たな損失関数を提案する。スコアエントロピーはスコアマッチングを離散空間へ自然に拡張し、離散拡散モデルの構築にシームレスに統合でき、性能を大幅に向上させる。実験では、提案するスコアエントロピー離散拡散モデル(SEDD)を標準的な言語モデリングタスクで評価した。同等のモデルサイズにおいて、SEDDは既存の言語拡散モデルの枠組みを上回り(パープレキシティを25〜75%削減)、自己回帰モデルと互角の性能を示し、特にGPT-2を上回る結果となった。さらに、自己回帰モデルと比較して、SEDDは温度スケーリングなどの分布アニーリング技法を必要とせず忠実なテキストを生成でき(無アニーリングのGPT-2と比較して生成パープレキシティが約6〜8倍良好)、計算量と品質のトレードオフが可能であり(32分の1のネットワーク評価回数で同等の品質を達成)、制御可能な中間補完を可能にする(核サンプリングと同等の品質を実現しつつ、左から右へのプロンプティング以外の戦略も可能にする)。
One-sentence Summary
the paper propose score entropy, a loss that extends score matching to discrete spaces, and build Score Entropy Discrete Diffusion (SEDD), which reduces perplexity by 25-75% over prior diffusion methods, outperforms GPT-2 on language modeling, and generates faithful text without distribution annealing.
Key Contributions
- Score entropy discrete diffusion (SEDD) is introduced as a discrete diffusion model for language, parameterized by the concrete score and trained with a novel score entropy loss that extends score matching to discrete token spaces.
- The method replaces high-variance implicit score entropy and prior heuristic training objectives with a principled denoising score entropy objective, enabling more efficient and scalable training.
- On standard language modeling tasks, SEDD reduces perplexity by 25-75% relative to existing language diffusion models, outperforms GPT-2, achieves about 6-8x better un-annealed generative perplexity than GPT-2, and can match quality with 32x fewer network evaluations while supporting controllable infilling.
Introduction
Deep generative models now support powerful text generation and question answering, but autoregressive transformers remain the main competitive approach despite slow token-by-token sampling, limited controllability, and reliance on sampling tricks such as nucleus sampling. Earlier diffusion-based language models, especially discrete diffusion methods, have struggled because their training objectives are often unstable or poorly suited to discrete data, and they usually lag behind autoregressive models in likelihoods and sample quality without heavy empirical fixes. The authors introduce Score Entropy Discrete Diffusion models, which learn the reverse diffusion process through probability ratios using a new score entropy loss, yielding a principled and scalable method that improves language modeling, enables high-quality unannealed sampling, and supports flexible generation and infilling.
Method
The authors leverage a score entropy parameterization to train discrete diffusion models by learning positive, ratio-based scores rather than directly modeling normalized transition probabilities. The central object is a score network sθ(x,t) whose coordinate sθ(x,t)y is intended to approximate the concrete score ratio
sθ(x,t)y≈pt(x)pt(y),y=x.This means the model learns how much more likely, or less likely, an alternative state y is compared with the current state x under the noisy marginal pt. Because these ratios are strictly positive, the training objective is designed as a score entropy loss that naturally incorporates positivity and convexity. For a distribution p and nonnegative weights wxy, the score entropy takes the form
LSE=Ex∼py=x∑wxy(sθ(x)y−p(x)p(y)logsθ(x)y+K(p(x)p(y))),where
K(a)=a(loga−1)acts as a normalizing constant ensuring nonnegativity. The loss is built from a Bregman divergence with a negative logarithmic generator, which gives it desirable properties such as nonnegativity and convexity. Under full support and positive weights, the minimizer recovers the ground truth score ratios, meaning the learned scores satisfy
sθ∗(x)y=p(x)p(y).The method extends this objective to scalable discrete diffusion by using a denoising version of score entropy. When the intermediate distribution p is generated by perturbing a clean data distribution p0 through a transition kernel p(⋅∣x0), the score entropy can be equivalently trained through
LDSE=Ex0∼p0x∼p(⋅∣x0)y=x∑wxy(sθ(x)y−p(x∣x0)p(y∣x0)logsθ(x)y).This formulation is practical because a Monte Carlo step samples a clean point x0, perturbs it to obtain x, and then evaluates the score network once at x. The output sθ(x) contains the score estimates for many possible perturbations y, so the training step does not require repeated evaluations for each candidate state.
In diffusion modeling, the marginal pt is itself a perturbation of the base distribution p0 through a time-dependent forward transition. Therefore, the method uses the tractable conditional transition pt∣0 inside the loss, replacing p(x∣x0) and p(y∣x0) with pt∣0(xt∣x0) and pt∣0(y∣xt). This yields a diffusion-weighted training objective that directly optimizes the model along the forward diffusion trajectory.
The same score-based construction also supports likelihood-based training and evaluation. The learned score network defines a parameterized reverse transition matrix by replacing true score ratios with learned ones. For off-diagonal entries, the reverse rate is
Qtθ(y,x)=sθ(x,t)yQt(x,y),x=y,with diagonal entries chosen so that each row sums to zero. The induced reverse-time density satisfies a differential equation of the form
dtdpT−tθ=QT−tθpT−tθ,pTθ=pbase.This gives an upper bound on the negative log likelihood of a data point:
−logp0θ(x0)≤LDWDSE(x0)+DKL(pT∣0(⋅∣x0)∥pbase),where LDWDSE is a diffusion-weighted denoising score entropy. This is particularly useful for language modeling because likelihood and perplexity remain central evaluation metrics.
For sequence data, the state is factorized into d tokens, each taking one of n values. A full transition matrix would be exponentially large, so the method uses a sparse, structured transition kernel that perturbs tokens independently. Nonzero transitions only change one token at a time:
Qt(x1…xi…xd,x1…xi…xd)=Qttok(xi,xi).Because of this sparsity, only score ratios between sequences with Hamming distance one are needed. The score network is therefore implemented as a sequence-to-sequence map
sθ(x,t)∈Rd×n,where the entry
sθ(x,t)i,xi≈pt(x1…xi…xd)pt(x1…xi…xd)compares the current sequence with the sequence formed by replacing token i with xi.
The forward transition for a whole sequence factorizes because tokens are perturbed independently:
pt∣0seq(x∣x)=i=1∏dpt∣0tok(xi∣xi).For token transitions, the method sets
Qttok=σ(t)Qtok,where σ(t) is a noise schedule. Defining the cumulative noise
σ(t)=∫0tσ(s)ds,the token transition probabilities can be computed from matrix exponentials without numerical integration:
pt∣0tok(⋅∣x)=the x-th column of exp(σ(t)Qtok).For large vocabularies, explicitly storing and exponentiating a full token transition matrix is infeasible. The method therefore uses structured token transition kernels. A uniform transition kernel couples all token values symmetrically and has entries proportional to all-ones off-diagonal terms. An absorbing transition kernel introduces a mask token, allowing each non-mask token to transition into the mask state while the mask state remains absorbing. These structures make the transition probabilities and score-weighted losses cheap to compute, allowing training to proceed with speed and memory usage comparable to standard autoregressive sequence modeling.
Once trained, the learned scores are used to simulate the reverse diffusion process. A simple Euler-style reverse step would only update one token per step, which is inefficient for long sequences. The method instead uses a τ-leaping strategy that updates all token positions simultaneously. At each step, token i is updated according to a local probability influenced by the learned score:
δxti(xt−Δti)+ΔtQttok(xti,xt−Δti)sθ(xt,t)i,xt−Δti.This makes each position independently sampleable while the full sequence condition remains in the score estimate.
The method further improves this sampling scheme by using a discrete analogue of Tweedie’s theorem. Since the learned scores approximate ratios of the current marginal, they provide information about the optimal reverse-time denoising distribution. The resulting Tweedie τ-leaping update replaces the basic local transition probability with
(exp(−σtΔtQtok)sθ(xt,t)i)xt−Δtiexp(σtΔtQtok)(xti,xt−Δti),where
σtΔt=σ(t)−σ(t−Δt).This update retains the independent token-wise structure of τ-leaping while incorporating the optimal denoising interpretation provided by the score model. When the learned scores are perfect, this sampling rule is optimal among τ-leaping strategies in terms of minimizing divergence from the true reverse transition.
The same score formulation also enables arbitrary prompting and infilling without retraining a conditional model. For a set of filled indices Ω and unfilled indices Ω, the conditional distribution
pt(xΩ∣xΩ=y)can be handled through Bayes’ rule. Conditional score ratios reduce to unconditional score ratios evaluated on sequences completed with the fixed context:
pt(xΩ=z∣xΩ=y)pt(xΩ=z′∣xΩ=y)=pt(x=z⊕Ωy)pt(x=z′⊕Ωy).Here, ⊕Ω denotes concatenation of the unfilled pattern and the fixed context. During sampling, filled positions are frozen and only unfilled positions are updated, allowing the same learned unconditional score network to perform flexible conditional generation.
Experiment
The experiments evaluate SEDD on language modeling and generation using transformer-based diffusion variants trained with matched data, tokenizers, and model scales. Likelihood results on character-level and word-level corpora show strong competitiveness, with SEDD Absorb surpassing prior diffusion baselines and approaching or exceeding GPT-2 perplexity on several zero-shot tasks. Generation evaluations further validate high-quality unconditional sampling, fast step-budget tradeoffs, and strong infilling and conditional prompting without explicit autoregressive induction. Overall, the results indicate that SEDD improves both modeling quality and generation versatility over existing discrete diffusion methods.
For zero-shot unconditional language modeling, the SEDD model with absorbing transitions provides the strongest perplexity among the compared diffusion baselines. It matches or surpasses GPT-2 on most standard datasets, supporting the claim that a non-autoregressive diffusion model can reach perplexity quality comparable to a modern autoregressive model. The comparison also shows a clear advantage over prior language diffusion approaches. Absorbing SEDD gives better perplexity than uniform SEDD and earlier language diffusion baselines. Absorbing SEDD outperforms GPT-2 on a majority of zero-shot tasks while remaining competitive on the others.
On text8 bits-per-character language modeling, SEDD delivers the strongest non-autoregressive result while remaining close to leading autoregressive-based approaches. It improves substantially over prior discrete diffusion models such as D3PM and outperforms other non-autoregressive baselines. SEDD achieves the best non-autoregressive performance on text8. SEDD trails autoregressive and autoregressive-based flow methods only slightly. SEDD substantially improves over D3PM despite sharing discrete diffusion principles.
SEDD achieves the strongest diffusion model perplexity on the One Billion Words dataset and is close to the autoregressive transformer benchmark. Because the diffusion results are upper bounds, this suggests that SEDD can effectively match the likelihood quality of the autoregressive model while substantially outperforming prior diffusion baselines. SEDD produces lower perplexity than all compared diffusion baselines, with a large margin over methods such as D3PM. SEDD is within a very small perplexity gap of the autoregressive transformer, indicating competitive likelihood-based performance. This result is presented as evidence that a non-autoregressive language model can match a well-known autoregressive model on perplexity.
The comparison evaluates small-model unconditional text generation with perplexity, showing that SEDD samples outperform GPT-2 samples. SEDD reaches competitive quality with far fewer network evaluations, and longer sampling step budgets provide further improvements. The generated examples also show a trend from fragmented GPT-2 text to more coherent SEDD text. SEDD small and medium models outperform GPT-2 small and medium models on generated-text perplexity. Using more SEDD sampling steps follows a predictable quality versus step count tradeoff and improves results. Example outputs show SEDD producing more coherent text than the corresponding GPT-2 samples.
The qualitative samples show that conditional generation can use prompt text at the beginning, end, middle, or in separated fragments. The related experiments indicate that this flexible prompting is compatible with competitive language generation quality, including strong standard prompting results against compared baselines. This is notable because the approach does not use distribution annealing or an explicit left-to-right architectural bias. Prompt tokens can be placed at the front, end, middle, or in split positions Both standard generation and infilling with beginning and end context are supported Standard prompting is competitive with, and in one case better than, the compared baselines
The experiments evaluate SEDD through zero-shot unconditional language modeling on standard corpora and small-model text generation, comparing its perplexity and sampled outputs against GPT-2, autoregressive baselines, and prior discrete diffusion models. Across these settings, absorbing SEDD is shown to outperform earlier diffusion baselines and approach or match autoregressive performance on likelihood, while providing more coherent generated text than GPT-2 with fewer network evaluations. Conditional experiments further demonstrate that flexible prompt placement and infilling are supported without architectural left-to-right bias, yielding competitive generation quality.