arXiv:2611.01562cs.LGNov 2026

Manuscript Offprint

arXiv:2611.01562

Finite-Time Online Sample Complexity for Conditional Diffusion Models

Mudit Gaur, Prashant Trivedi, Sasidhar Kunapuli, Amrit Singh Bedi, Vaneet Aggarwal

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study the finite-time training and sampling error of conditional diffusion models trained by online stochastic-gradient denoising score matching. Rather than assuming access to an exact empirical or population risk minimizer, we analyze the score network produced after a finite number of stochastic-gradient updates under an explicit localized Polyak–Lojasiewicz (PL) condition, stochastic-gradient regularity, and a trajectory-containment assumption. Our analysis separates the network approximation complexity from the online training-sample budget and propagates both errors through the reverse diffusion process. Under anisotropic smoothness, a joint intrinsic-dimensional structure for the data and conditioning variables, sub-exponential tails, and explicit approximation-class compatibility, we obtain a conditional score approximation error of order

O~(M−ηapp),ηapp=2αx2αx+dx′+(αx/αy)dy′,\tilde{\mathcal{O}}(M^{-\eta_{\mathrm{app}}}),\qquad \eta_{\mathrm{app}}=\frac{2\alpha_x}{2\alpha_x+d'_x+(\alpha_x/\alpha_y)d'_y},

where MM denotes the approximation complexity, dx′d'_x and dy′d'_y are the intrinsic response and conditioning dimensions, and αx,αy\alpha_x, \alpha_y are their corresponding smoothness exponents. For N=RBN=RB online denoising samples used by SGD, the finite-time optimization error is controlled explicitly in terms of the PL, smoothness, gradient-noise, and initialization constants. Combining these ingredients with reverse-process stability yields a total-variation bound that decomposes into terminal-initialization, time-discretization, approximation/localization, and finite-time optimization errors.

The novelty is the conditional synthesis: relative to conditional statistical analyses based on exact risk minimizers, we retain the finite online optimization error; relative to existing unconditional gradient-training analyses, we couple optimization with joint response-conditioning intrinsic geometry and conditional reverse-process stability.

Our primary guarantee is for the forward-smoothed conditional law at a positive stopping time t0>0t_0 > 0. Under an additional full-dimensional integral density-regularity condition, we further control the smoothing bias and extend the guarantee to the original conditional data law. The resulting analysis provides a transparent training-to-sampling guarantee for conditional diffusion under finite-time online stochastic optimization, while making explicit the optimization and approximation assumptions required for the result.

1 Introduction

Diffusion and score-based generative models have become a central framework for high-dimensional generative modeling (Sohl-Dickstein et al., 2015; Ho et al., 2020; Song et al., 2021). Conditional diffusion models extend this framework by learning a family of generative distributions indexed by side information, enabling applications such as text-to-image generation (Dhariwal and Nichol, 2021; Rombach et al., 2022), conditional molecular design (Malusare and Aggarwal, 2024), and conditional time-series imputation (Tashiro et al., 2021). In score-based formulations, the learned object is a conditional score

s⋆(x,t,y)=∇xlog⁡pt(x∣y),s^{\star}(x,t,y)=\nabla_{x}\log p_{t}(x\mid y),

which depends jointly on the noised data variable x, the conditioning variable y, and diffusion time t, and is used to construct the reverse-time generative dynamics. Practical conditional diffusion systems employ a variety of conditioning mechanisms, including classifier guidance (Dhariwal and Nichol, 2021; Shenoy et al., 2024), classifier-free guidance (Ho and Salimans, 2022), and transformer-based score architectures (Peebles and Xie, 2023).

A complete theoretical analysis of conditional diffusion training must connect several distinct components. First, the conditional score must be approximated by the chosen function class. Second, the score-matching objective must be optimized using only a finite amount of computation and data. Third, the resulting score-estimation error must be propagated through a discretized reverse diffusion process. Finally, when the data or conditioning variables are unbounded, the approximation argument must control contributions from regions far from the bulk of the distribution. These issues are coupled in conditional models because approximation takes place jointly over the response, conditioning variable, and diffusion time.

In this work, we study this training-to-sampling problem for conditional diffusion models trained by online stochastic-gradient denoising score matching. Our objective is not to assume that the training procedure returns an exact optimizer and then analyze the resulting score estimator. Instead, we ask how the error of a score network obtained after finitely many stochastic gradient updates propagates to the distribution generated by the reverse process. More precisely, we seek a decomposition in which approximation error, finite-time optimization error, discretization error, and terminal initialization error remain separately visible.

This perspective differs from a common abstraction in statistical analyses of conditional diffusion, where the score estimator is defined through an exact empirical or population risk minimizer (Yuan et al., 2023; Fu et al., 2024; Tang et al., 2025; Hu et al., 2025). Such an abstraction is useful for isolating score-estimation error, but it does not directly describe the output of a finite stochastic-gradient training procedure. A fixed-dataset analysis may additionally require controlling the generalization gap between empirical and population objectives. Finite-time gradient training has already been analyzed in unconditional settings (Gaur et al., 2026; Han et al., 2024). Recent work has also analyzed SGD dynamics for unconditional score-based generative models (Strasman et al., 2026). Thus finite-time gradient training is not, by itself, the novelty claimed here. We instead consider an online sampling model in which each stochastic-gradient update uses fresh draws of the data pair, diffusion time, and Gaussian perturbation. This allows the optimization error to be analyzed directly at the level of the population randomized-time denoising objective.

Replacing exact minimizer access by finite-time optimization requires additional optimization regularity. We make this tradeoff explicit. In particular, our analysis assumes local smoothness, stochastic-gradient regularity, and a localized Polyak–Łojasiewicz (PL) condition along the relevant training trajectory. The PL condition is not derived in this paper for the full neural score class; rather, it is an explicit optimization assumption under which the effect of a finite online SGD budget can be quantified. Thus, the finite-time result should be interpreted as a conditional training guarantee: given the stated localized optimization geometry, we characterize how the remaining optimization error enters the final sampling bound.

The approximation side of the analysis addresses a different difficulty. Conditional score estimation can depend strongly on the dimensions of both the response and the conditioning variable. Some existing guarantees exhibit ambient-dimensional dependence (Fu et al., 2024), while intrinsic-dimensional analyses exploit manifold or latent low-dimensional structure (Tang et al., 2025; Hu et al., 2025). We work with a joint intrinsic-dimensional structure for the clean pair (X0,Y)(X_{0}, Y), together with anisotropic regularity that permits different smoothness along response and conditioning coordinates. We also impose an explicit approximation-class compatibility condition linking our smooth-gated score class to the localized blockwise construction used in the cited conditional approximation theorem; the geometric assumptions alone do not imply the claimed network rate. We denote the corresponding intrinsic dimensions by dx′d'_x and dy′d'_y, and their smoothness exponents by αx\alpha_x and αy\alpha_y, respectively. The associated approximation exponent is

ηapp:=2αx2αx+dx′+(αx/αy)dy′.\eta_{\mathrm{a p p}}:=\frac{2\alpha_{x}}{2\alpha_{x}+d_{x}^{\prime}+(\alpha_{x}/\alpha_{y})d_{y}^{\prime}}.

We additionally allow the data and conditioning variables to have sub-exponential tails. The proof localizes the denoising problem to logarithmic-radius high-probability regions and controls the contribution of their complements through tail decay.

Main result and scope. A central feature of our formulation is that we distinguish the complexity of the score class from the amount of online training data. Let

M=score-network approximation complexity,N=RB=number of online denoising samples,M = \text{score-network approximation complexity}, \quad N = RB = \text{number of online denoising samples},

where R is the number of SGD iterations and B is the mini-batch size. For a discretization grid with K steps and total time weight HKH_{K}, our main theorem takes the schematic form

ESGDEY[TV(pt0(⋅∣Y),p^t0(⋅∣Y))]≲Cterme−T+Cdiscdx+m2K+CstabHK[AK(M)+Eopt(N,M)],\begin{aligned}&\mathbb{E}_{\mathrm{SGD}}\mathbb{E}_{Y}\left[\mathrm{TV}(p_{t_{0}}(\cdot\mid Y),\widehat{p}_{t_{0}}(\cdot\mid Y))\right]\\ &\quad\lesssim C_{\mathrm{term}}e^{-T}+C_{\mathrm{disc}}\sqrt{\frac{d_{x}+m_{2}}{K}}+C_{\mathrm{stab}}\sqrt{H_{K}\left[\mathcal{A}_{K}(M)+\mathcal{E}_{\mathrm{opt}}(N,M)\right]},\end{aligned}

under the stated localized PL and trajectory-containment assumptions. Here AK(M)\mathcal{A}_K(M) is the score-class approximation/localization error and Eopt(N,M)\mathcal{E}_{\mathrm{opt}}(N,M) is the excess population denoising risk remaining after finite-time online optimization. Under the anisotropic intrinsic-dimensional approximation assumptions developed in this paper,

AK(M)=O~(M−ηapp).\mathcal{A}_{K}(M)=\widetilde{\mathcal{O}}\big(M^{-\eta_{\mathrm{a p p}}}\big).

Under localized PL geometry and the decreasing step-size schedule analyzed below, the optimization component satisfies a bound of the form

Eopt(N,M)≲Δ0,Mr02(R+r0)2+LMσM2μM2B(R+r0),N=RB,\mathcal{E}_{\mathrm{o p t}}(N,M)\lesssim\frac{\Delta_{0,M}r_{0}^{2}}{(R+r_{0})^{2}}+\frac{L_{M}\sigma_{M}^{2}}{\mu_{M}^{2}B(R+r_{0})},\qquad N=R B,

where LM,μML_{M},\mu_{M}, and σM2\sigma_{M}^{2} denote the relevant smoothness, PL, and stochastic-gradient variance constants, and Δ0,M\Delta_{0,M} is the initial population excess risk. Keeping these quantities explicit separates the approximation and optimization requirements of the result. If these optimization constants remain uniformly controlled along the chosen sequence of score classes, the leading requirements reduce, up to logarithmic factors, to

M=Θ~(ϵ−2/ηapp),N=Θ~(ϵ−2),M=\widetilde{\Theta}\Big(\epsilon^{-2/\eta_{\mathrm{a p p}}}\Big),\qquad N=\widetilde{\Theta}\big(\epsilon^{-2}\big),

together with a sufficiently fine reverse-time discretization, for O~(ϵ)\widetilde{\mathcal{O}}(\epsilon) expected total-variation error relative to the positive-time target pt0(⋅∣Y)p_{t_0}(\cdot \mid Y).

The positive stopping time t0>0t_0 > 0 is important for interpreting this statement. Our primary result concerns the forward-smoothed conditional law pt0(⋅∣y)p_{t_0}(\cdot \mid y). This permits intrinsic low-dimensional clean-data structure while the reverse-process analysis operates away from the singular endpoint t=0t = 0. A total-variation guarantee for the original law p0(⋅∣y)p_0(\cdot \mid y) requires an additional smoothing-bias argument. We provide such an extension

Table 1: Structural comparison with representative adjacent theory. “Gradient training” records whether a concrete finite-run gradient method is analyzed. The rows are not rate comparisons.

ReferenceConditionalIntrinsic dimensionGradient trainingSampling bound
Fu et al. (2024)YesNoNoYes
Tang et al. (2025)YesYesNoYes
Hu et al. (2025)YesYesNoYes
Li (2025)YesNoNoYes
Gaur et al. (2026)NoNoFinite-time SGDYes
Han et al. (2024)NoNoGD with early stoppingNo (training only)
Strasman et al. (2026)NoNoFinite-time SGDNo (training only)
This workYesYesOnline SGD under local PLYes

under stronger full-dimensional integral density regularity. The stopped-law theorem and the original-law extension therefore have different assumptions and should be viewed as separate results.

Table 1 separates two adjacent lines of work: conditional distribution-estimation theory and algorithm-dependent score-training theory. The assumptions, estimator definitions, and target laws differ, so their rates are not directly comparable. The table locates our contribution at their intersection; it does not assert priority for finite-time diffusion optimization in general.

Contributions. The main contributions of the paper are as follows:

  • Finite-time training-to-sampling decomposition. We give an end-to-end error decomposition for conditional diffusion trained by online stochastic-gradient denoising score matching. The bound keeps terminal initialization, reverse-time discretization, score-class approximation/localization, and finite-time optimization as separate components. In particular, the score network need not be an exact population or empirical minimizer; the remaining optimization error is quantified explicitly under localized PL geometry.

  • Explicit separation of approximation and optimization complexity. We distinguish the score-class complexity MM from the online denoising sample budget NN. Under anisotropic intrinsic-dimensional regularity and the stated approximation-class compatibility condition, the approximation contribution scales as

O~(M−ηapp),ηapp=2αx2αx+dx′+(αx/αy)dy′,\widetilde{\mathcal{O}}(M^{-\eta_{\mathrm{app}}}),\qquad \eta_{\mathrm{app}}=\frac{2\alpha_x}{2\alpha_x+d'_x+(\alpha_x/\alpha_y)d'_y},

while the finite-time optimization term is controlled separately through the smoothness, PL, gradient-noise, initialization, and online-sample parameters. This separation avoids conflating network approximation scale with the number of samples consumed by SGD.

  • Conditional approximation with intrinsic structure and sub-exponential tails. We combine a joint response-conditioning intrinsic geometry with anisotropic smoothness and a sub-exponential tail-localization argument. The resulting construction controls the randomized-time conditional score approximation on logarithmic-radius high-probability regions and then bounds the contribution of the tail complement.

  • Stopped-law guarantee and original-law extension. Our primary theorem controls the learned discretized sampler relative to the forward-smoothed conditional law at a positive stopping time t0t_0. Under additional full-dimensional integral density regularity, we prove a smoothing-bias bound and extend the analysis to total-variation convergence to the original conditional law. This makes explicit where stronger regularity is required and avoids conflating the two guarantees.

At a technical level, the analysis makes compatible three ingredients that are usually treated separately: conditional score approximation, finite-time stochastic optimization, and reverse-diffusion stability. We use existing reverse-process stability and conditional approximation results as inputs where appropriate, while proving the localization, randomized-time approximation transfer, finite-time online-SGD excess-risk control, and their combination into the final training-to-sampling guarantee. Our emphasis is therefore on a transparent and auditable finite-time analysis, including the assumptions under which each component is valid, rather than on claiming a uniformly improved statistical exponent over existing conditional diffusion theory. Relative to unconditional optimization analyses (Gaur et al., 2026; Han et al., 2024; Strasman et al., 2026), the additional contribution is the conditional coupling: one time-conditioned score must approximate a family indexed by YY, the approximation rate depends on joint fibered geometry, and the resulting randomized-time population error must match the forward-marginal quantity in the conditional reverse-process stability bound. We do not claim a new proof of PL geometry for neural networks or a new reverse-SDE discretization theorem.