Papers
Topics
Authors
Recent
Search
2000 character limit reached

DINOISER Loss Function in Diffusion Modeling

Updated 6 July 2026
  • DINOISER loss function is a clipped denoising objective in embedding space that combines adaptive noise-scale clipping with a source-to-target likelihood term.
  • It excludes low-noise timesteps to prevent trivial recovery of discrete token clusters, ensuring the model learns from challenging corruption levels.
  • At inference, the CeDi mechanism manipulates timesteps to strengthen reliance on source conditions, leading to more robust conditional generation.

Searching arXiv for the DINOISER paper and closely related diffusion-based sequence modeling work to ground the article with citations. DINOISER is a denoised training protocol for diffusion-based conditional sequence generation in embedding space, introduced to address the mismatch between continuous diffusion dynamics and discrete token structure in natural language and related sequence data (Ye et al., 2023). Its loss function retains the standard denoising regression form used by prior sequence diffusion models, but changes the optimization fundamentally by excluding low-noise timesteps that remain “too discrete,” and by pairing the denoising term with an explicit source-to-target likelihood term. In the same framework, inference is further modified through timestep manipulation so that the denoiser relies more strongly on source conditions. The paper frames these changes as responses to three problems in prior denoised training protocols: failing to learn, lack of scalability, and neglecting source conditions (Ye et al., 2023).

1. Formal setting and baseline denoising objective

DINOISER begins from the standard diffusion regression objective in embedding space. With forward diffusion defined by

zt=α(t)z0+σ(t)ϵt,ϵtN(0,I),z_t = \alpha(t) z_0 + \sigma(t)\epsilon_t, \qquad \epsilon_t \sim \mathcal{N}(0,I),

the usual denoising loss is

Ldiffusion(z0)=EtU(0,1), ϵtN(0,I)[zθ(zt,t)z022].\mathcal{L}_{\text{diffusion}(z_0)}= \mathbb{E}_{t \sim \mathcal{U}(0,1),\ \epsilon_t \sim \mathcal{N}(0,I)} \Big[\|z_\theta(z_t,t)-z_0\|_2^2\Big].

For conditional generation, the denoiser is conditioned on the source as zθ(zt,x,t)z_\theta(z_t,x,t), while the diffusion process itself is kept unchanged in vanilla DiffusionLM-style models (Ye et al., 2023).

The appendix formulation generalizes the same objective to

Etr(t), ϵN(0,I)[w(t)zθ(1σ2(t)z0+σ(t)ϵ,t)z022],\mathbb{E}_{t\sim r(t),\ \epsilon\sim\mathcal{N}(0,I)} \big[w(t)\|z_\theta(\sqrt{1-\sigma^2(t)}\,z_0+\sigma(t)\epsilon,t)-z_0\|_2^2\big],

with the paper noting that different noise schedules and time samplers are equivalent up to a weighting function. This point is important because DINOISER does not replace the denoising norm itself; instead, it changes which timesteps enter optimization, thereby altering the effective weighting of training examples across corruption levels.

2. Counter-discreteness training and clipped noise scales

The central modification in DINOISER is noise scale clipping, described as “counter-discreteness training” (Ye et al., 2023). The paper rewrites the corrupted embedding, after dividing out α(t)\alpha(t), as

zt[i]α(t)N ⁣(Emb(yi),σ~2(t)I),σ~(t)=σ(t)1σ2(t).\frac{z_t[i]}{\alpha(t)} \sim \mathcal{N}\!\Big(Emb(y_i), \tilde{\sigma}^2(t) I\Big), \qquad \tilde{\sigma}(t)=\frac{\sigma(t)}{\sqrt{1-\sigma^2(t)}}.

This representation is used to quantify when the local geometry of token embeddings remains too close to discrete clusters.

A minimum required overlap threshold is defined from the average nearest-neighbor embedding distance: (δ)2=1Vi=1Vmin1jiV1DEmb(yi)Emb(yj)22.(\delta^*)^{2} = \frac{1}{|\mathcal{V}|} \sum_{i=1}^{|\mathcal{V}|} \min_{1\le j\neq i \le |\mathcal{V}|} \frac{1}{D}\|Emb(y_i)-Emb(y_j)\|_2^2. Noise scale clipping then requires

σ~2(t)=σ2(t)1σ2(t)(δ)2,\tilde{\sigma}^2(t)=\frac{\sigma^2(t)}{1-\sigma^2(t)} \ge (\delta^*)^2,

which yields

σmin=(VDi=1Vmin1jiVEmb(yi)Emb(yj)22+1)12.\sigma_{\min} = \Biggl( \frac{|\mathcal{V}| \cdot D} {\sum_{i=1}^{|\mathcal{V}|} \min_{1\le j\neq i\le |\mathcal{V}|}\|Emb(y_i)-Emb(y_j)\|_2^2} +1 \Biggr)^{-\frac12}.

Training is therefore restricted to timesteps satisfying

σ(t)σmin,tU(tmin,1),tmin=σ1(σmin).\sigma(t) \ge \sigma_{\min}, \qquad t \sim \mathcal{U}(t_{\min},1), \qquad t_{\min}=\sigma^{-1}(\sigma_{\min}).

The stated motivation is that weakly noised samples remain near original token clusters and are therefore “too easy” or uninformative. In that regime, denoising can collapse toward trivial nearest-neighbor recovery, with near-zero diffusion loss and limited pressure to learn meaningful continuous-space denoising. DINOISER’s clipping rule is designed to exclude precisely those cases.

3. Composite optimization objective

In algorithmic form, the DINOISER training step uses the gradient

Ldiffusion(z0)=EtU(0,1), ϵtN(0,I)[zθ(zt,t)z022].\mathcal{L}_{\text{diffusion}(z_0)}= \mathbb{E}_{t \sim \mathcal{U}(0,1),\ \epsilon_t \sim \mathcal{N}(0,I)} \Big[\|z_\theta(z_t,t)-z_0\|_2^2\Big].0

so the optimization consists of two coupled components: a conditional reconstruction or denoising MSE in embedding space, and a source-to-target likelihood or reconstruction term Ldiffusion(z0)=EtU(0,1), ϵtN(0,I)[zθ(zt,t)z022].\mathcal{L}_{\text{diffusion}(z_0)}= \mathbb{E}_{t \sim \mathcal{U}(0,1),\ \epsilon_t \sim \mathcal{N}(0,I)} \Big[\|z_\theta(z_t,t)-z_0\|_2^2\Big].1 (Ye et al., 2023).

The modified diffusion loss is summarized in the paper as

Ldiffusion(z0)=EtU(0,1), ϵtN(0,I)[zθ(zt,t)z022].\mathcal{L}_{\text{diffusion}(z_0)}= \mathbb{E}_{t \sim \mathcal{U}(0,1),\ \epsilon_t \sim \mathcal{N}(0,I)} \Big[\|z_\theta(z_t,t)-z_0\|_2^2\Big].2

Relative to prior diffusion-based sequence models, the formal change is therefore not a new pointwise discrepancy in the denoising term, but a truncation of the timestep distribution. Earlier methods sample

Ldiffusion(z0)=EtU(0,1), ϵtN(0,I)[zθ(zt,t)z022].\mathcal{L}_{\text{diffusion}(z_0)}= \mathbb{E}_{t \sim \mathcal{U}(0,1),\ \epsilon_t \sim \mathcal{N}(0,I)} \Big[\|z_\theta(z_t,t)-z_0\|_2^2\Big].3

including very small noise scales; DINOISER samples only from

Ldiffusion(z0)=EtU(0,1), ϵtN(0,I)[zθ(zt,t)z022].\mathcal{L}_{\text{diffusion}(z_0)}= \mathbb{E}_{t \sim \mathcal{U}(0,1),\ \epsilon_t \sim \mathcal{N}(0,I)} \Big[\|z_\theta(z_t,t)-z_0\|_2^2\Big].4

excluding low-noise levels (Ye et al., 2023).

This modification changes the optimization landscape in two explicit ways. First, the loss is no longer dominated by easy, low-noise examples. Second, the denoiser is forced to learn under more informative corruption levels, where the target embedding is not trivially recoverable from local token clusters. The paper interprets this as moving learning toward a more genuinely continuous regime in embedding space.

4. Diagnosed failure modes and the role of the loss

The paper attributes three severe problems in prior denoised sequence diffusion training to the pitfall of not completely eliminated discreteness in the embedding space, with the scale of noises being decisive (Ye et al., 2023).

Failing to learn is tied to small-noise samples that are too close to discrete token clusters. Because the model can reconstruct such samples almost trivially, the gradient signal is weak. By removing timesteps below Ldiffusion(z0)=EtU(0,1), ϵtN(0,I)[zθ(zt,t)z022].\mathcal{L}_{\text{diffusion}(z_0)}= \mathbb{E}_{t \sim \mathcal{U}(0,1),\ \epsilon_t \sim \mathcal{N}(0,I)} \Big[\|z_\theta(z_t,t)-z_0\|_2^2\Big].5, DINOISER computes the MSE only on informative noisy examples and thereby strengthens the learning signal.

Lack of scalability is linked to embedding geometry. As embedding dimension increases, clusters remain sparse and separated, so small noise fails to wash out discreteness. The threshold Ldiffusion(z0)=EtU(0,1), ϵtN(0,I)[zθ(zt,t)z022].\mathcal{L}_{\text{diffusion}(z_0)}= \mathbb{E}_{t \sim \mathcal{U}(0,1),\ \epsilon_t \sim \mathcal{N}(0,I)} \Big[\|z_\theta(z_t,t)-z_0\|_2^2\Big].6 is computed from pairwise embedding distances and therefore adapts to the embedding space itself. The paper states that larger dimensions or more separated embeddings imply a larger minimum useful noise.

Neglecting source conditions arises because low-noise corrupted targets retain enough target-side information that the model need not depend strongly on the source condition Ldiffusion(z0)=EtU(0,1), ϵtN(0,I)[zθ(zt,t)z022].\mathcal{L}_{\text{diffusion}(z_0)}= \mathbb{E}_{t \sim \mathcal{U}(0,1),\ \epsilon_t \sim \mathcal{N}(0,I)} \Big[\|z_\theta(z_t,t)-z_0\|_2^2\Big].7. DINOISER addresses this partly through training-time clipping and partly through inference-time manipulation. A plausible implication is that the method reallocates modeling capacity away from local token-cluster recovery and toward conditional denoising behavior, which is consistent with the paper’s claim that analyses verify better use of source conditions (Ye et al., 2023).

5. Inference-time conditioning through CeDi

DINOISER separates the training objective from the inference strategy. The training loss remains the clipped denoising MSE plus the explicit Ldiffusion(z0)=EtU(0,1), ϵtN(0,I)[zθ(zt,t)z022].\mathcal{L}_{\text{diffusion}(z_0)}= \mathbb{E}_{t \sim \mathcal{U}(0,1),\ \epsilon_t \sim \mathcal{N}(0,I)} \Big[\|z_\theta(z_t,t)-z_0\|_2^2\Big].8 term, whereas inference is modified by CeDi, short for “condition-enhanced denoiser” (Ye et al., 2023).

CeDi does not introduce a different training loss. Instead, it manipulates the timestep fed to the denoiser during sampling. Rather than using the same schedule as normal DDIM-style sampling, it uses larger timesteps so that the denoiser relies more on the source condition Ldiffusion(z0)=EtU(0,1), ϵtN(0,I)[zθ(zt,t)z022].\mathcal{L}_{\text{diffusion}(z_0)}= \mathbb{E}_{t \sim \mathcal{U}(0,1),\ \epsilon_t \sim \mathcal{N}(0,I)} \Big[\|z_\theta(z_t,t)-z_0\|_2^2\Big].9. The paper defines a second timestep set zθ(zt,x,t)z_\theta(z_t,x,t)0, decreasing from zθ(zt,x,t)z_\theta(z_t,x,t)1 to a large lower bound zθ(zt,x,t)z_\theta(z_t,x,t)2, and feeds zθ(zt,x,t)z_\theta(z_t,x,t)3 into the denoiser while sampling proceeds over the usual sequence of latent states.

Algorithmically, sampling begins from zθ(zt,x,t)z_\theta(z_t,x,t)4, then for each step uses zθ(zt,x,t)z_\theta(z_t,x,t)5 instead of the current “true” timestep, computes zθ(zt,x,t)z_\theta(z_t,x,t)6, computes zθ(zt,x,t)z_\theta(z_t,x,t)7, and updates zθ(zt,x,t)z_\theta(z_t,x,t)8. The paper’s interpretation is that larger effective noise scales suppress reliance on partially preserved target-side signal and shift the denoiser toward source-guided reconstruction. This distinction is central: CeDi is an inference-time manipulation of the denoiser input, not a replacement for the training loss (Ye et al., 2023).

6. Relation to prior sequence diffusion models, empirical role, and common misconceptions

Within diffusion-based sequence modeling, DINOISER preserves the standard embedding-space denoising formulation but changes the sampling distribution over corruption levels. The one-sentence characterization given in the paper is that it keeps the standard diffusion denoising loss in embedding space, truncates away low-noise training timesteps so the model learns from genuinely informative corruptions, and at inference forces larger effective noise scales so the denoiser relies more on the source condition (Ye et al., 2023). Experiments are reported to show consistent improvement over baselines of previous diffusion-based sequence generative models on several conditional sequence modeling benchmarks, and the analyses further verify that the method can make better use of source conditions.

A common misunderstanding is to treat DINOISER as though it were primarily a novel scalar loss expression analogous to reweighted MSE, focal loss, or relative-entropy regression objectives. The paper does not present it in that form. Its novelty lies in the denoised training protocol: clipped timestep sampling, adaptive noise-scale determination from embedding geometry, and a separate inference-time condition-enhancement mechanism. In other words, the decisive change is how the objective is sampled and deployed, not merely the algebraic form of the norm.

Another possible confusion concerns similarly named or conceptually adjacent work on loss reweighting for rare events. The term DINOISER does not appear in “Output-weighted and relative entropy loss functions for deep learning precursors of extreme events” (Rudy et al., 2021). That work concerns inverse-density weighting and KL-based losses for rare-output regression, not diffusion-based conditional sequence generation. The conceptual overlap is therefore only very broad: both modify optimization pressure away from standard averaging objectives, but they operate in different problem settings and with different mathematical constructions.

In summary, the DINOISER loss function is best understood as a clipped denoising objective in embedding space, augmented by an explicit source-to-target likelihood term and complemented by inference-time timestep amplification. Its purpose is not to denoise more accurately at arbitrarily small corruption levels, but to prevent training from being dominated by those low-noise cases where discreteness survives and meaningful conditional learning is weakest (Ye et al., 2023).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to DINOISER Loss Function.