Score-Based Generative Models
1. Key Concepts and Definitions
1.1 Key Concepts and Definitions
Score Function and Its Role in Generative Modeling
The score function, denoted as s(x), is defined as the gradient of the log-probability density of the data distribution p(x):
This function points in the direction where the log-density increases most rapidly, effectively describing the local structure of the data manifold. Unlike likelihood-based models that directly estimate p(x), score-based models learn s(x), which avoids the need for explicit normalization constraints.
Diffusion Processes and Stochastic Differential Equations
Score-based models rely on a diffusion process that gradually perturbs data with Gaussian noise. This process is governed by a stochastic differential equation (SDE):
where f(x, t) is the drift coefficient, g(t) is the diffusion coefficient, and dw represents Wiener process increments. The forward process transforms complex data distributions into simple noise distributions (typically isotropic Gaussian), while the reverse process learns to denoise samples by estimating the score function.
Annealed Langevin Dynamics for Sampling
Sampling from score-based models employs Langevin dynamics, an MCMC method that uses the score function to guide samples toward high-density regions. The update rule for a step size α and noise scale σ is:
where z_t ~ N(0, I). In practice, annealed Langevin dynamics is used, where noise scales decrease progressively to refine samples while avoiding poor local optima.
Noise-Conditioned Score Networks (NCSNs)
To handle varying noise levels, NCSNs parameterize the score function as s_θ(x, σ), where σ represents the noise scale. The training objective minimizes a weighted sum of Fisher divergences across noise levels:
Here, p_σ(̃x|x) = N(x, σ²I) is the perturbation kernel. This multi-scale approach enables robust score estimation across the data manifold.
Connections to Other Generative Frameworks
Score-based models generalize several existing approaches:
- Denoising Diffusion Probabilistic Models (DDPMs): A discretized special case of score-based SDEs with fixed noise schedules.
- Energy-Based Models (EBMs): The score ∇_x log p(x) is equivalent to the negative gradient of an energy function.
- Normalizing Flows: Both learn gradients of log-densities, but flows require invertible architectures whereas score models use flexible neural networks.
The figure below illustrates the relationship between these frameworks in terms of their underlying mathematical formulations:

1.2 Relationship to Diffusion Models
Score-based generative models and diffusion models share a deep theoretical connection, both rooted in the idea of gradually transforming noise into data through a learned stochastic process. The key link arises from their treatment of the data distribution as a trajectory through noise scales, where the score function ∇x log pt(x) plays a central role in both frameworks.
Stochastic Differential Equations as a Unifying Framework
Both approaches can be formulated using stochastic differential equations (SDEs). Consider the forward process in a diffusion model, which gradually adds Gaussian noise to data according to:
where f(x,t) is the drift coefficient, g(t) the diffusion coefficient, and w a Wiener process. The corresponding reverse-time SDE for generation is given by:
This reveals that the score function directly determines the reverse process, identical to how score-based models use learned scores for sampling.
Discrete-Time vs Continuous-Time Perspectives
Diffusion models typically implement a discrete sequence of noise scales, with the forward process defined as:
Score-based models generalize this through continuous noise levels, with the noise scale σ(t) varying smoothly according to a predefined schedule. When the number of steps in a diffusion model approaches infinity, the discrete process converges to the continuous SDE formulation used in score-based modeling.
Training Objectives and Practical Equivalence
Both frameworks minimize variants of denoising score matching. For a diffusion model with T steps, the loss decomposes as:
where γt are weighting terms. This matches the weighted sum of score matching objectives used in noise-conditioned score networks. Modern implementations often use identical neural architectures for both approaches, differing only in the interpretation of the model outputs.
Sampling and Numerical Integration
The practical differences emerge in sampling techniques. Diffusion models traditionally use a fixed discrete reverse process, while score-based models employ more flexible SDE solvers like:
- Euler-Maruyama method for simple integration
- Predictor-corrector schemes combining score steps with Langevin dynamics
- Annealed Langevin sampling with decreasing step sizes
Recent work has shown these sampling approaches can be unified under the umbrella of discretized reverse-time SDEs, with diffusion models representing a special case of constant noise schedule and fixed step sizes.

1.3 Mathematical Formulation of Score Matching
The core objective of score matching is to learn the score function of a data distribution without explicitly estimating the probability density. Given a dataset sampled from an unknown distribution pdata(x), the score function is defined as the gradient of the log-density:
Score matching avoids the intractable partition function computation by directly optimizing a loss function that measures the discrepancy between the model's score and the true data score. The key insight is that the score can be learned by minimizing the expected squared difference between the model score sθ(x) and the data score:
Derivation of the Score Matching Objective
To make this tractable, Hyvärinen (2005) showed that the objective can be reformulated using integration by parts, eliminating the dependence on the unknown ∇x log pdata(x). The simplified form is:
Here, tr(∇x sθ(x)) is the trace of the Jacobian of the score function, which captures the local curvature of the log-density. For high-dimensional data, computing the full Jacobian is expensive, leading to further approximations like denoising score matching or sliced score matching.
Practical Considerations
In practice, the expectation is approximated using Monte Carlo sampling from the dataset. For a finite sample {x1, ..., xN}, the empirical loss becomes:
This formulation enables scalable training of deep generative models, such as diffusion models and energy-based models, where the score network is parameterized by a neural network. The gradient of the loss can be efficiently computed using automatic differentiation.
Connection to Stochastic Differential Equations
Score-based models are deeply linked to stochastic differential equations (SDEs). The score function drives the reverse-time SDE that transforms noise into data samples during generation. Specifically, the reverse-time diffusion process is governed by:
where f(x, t) and g(t) are drift and diffusion coefficients, and dẇ is reverse-time Brownian motion. This reveals how score estimation enables sampling through annealed Langevin dynamics or reverse-time SDE solvers.

2. Denoising Score Matching
Denoising Score Matching
Denoising Score Matching (DSM) provides an efficient alternative to traditional score matching by leveraging noise perturbation to estimate the score function. Given a data distribution pdata(x), the score function is defined as the gradient of the log-density:
DSM avoids the computationally expensive Hessian calculation in score matching by introducing a noise-perturbed distribution. Let qσ(x̃|x) be a Gaussian noise kernel with standard deviation σ, where:
The perturbed data distribution pσ(x̃) is obtained by marginalizing over the original data distribution:
The key insight of DSM is that minimizing the following objective recovers the score of pσ(x̃):
For Gaussian noise, the conditional score simplifies to:
This yields the practical DSM objective:
Connection to Score Matching
DSM is equivalent to explicit score matching when the noise is infinitesimal (σ → 0), but remains tractable for finite noise levels. The noise scale σ acts as a trade-off parameter:
- Large σ: Smoothens the data manifold, making score estimation easier but biased.
- Small σ: Preserves finer details but requires more precise score estimation.
Practical Implementation
In practice, DSM is implemented by:
- Sampling a batch of clean data points x ∼ pdata.
- Adding Gaussian noise: x̃ = x + σε, where ε ∼ 𝒩(0, I).
- Training a neural network sθ to predict the noise residual.
The training objective effectively becomes a denoising autoencoder task, where the network learns to estimate the noise component:
Multi-Scale Denoising
For high-dimensional data, a single noise scale is often insufficient. Annealed DSM uses a sequence of noise levels {σ1, ..., σL} where σ1 > σ2 > ... > σL. This hierarchical approach:
- First captures coarse structure at high noise levels.
- Progressively refines details as noise decreases.

2.2 Sliced Score Matching
Sliced score matching (SSM) is an efficient alternative to denoising score matching (DSM) that circumvents the computational bottleneck of high-dimensional score estimation. Instead of directly estimating the score function ∇x log p(x) in ℝD, SSM projects the score onto random directions and matches these one-dimensional projections.
Mathematical Formulation
Given a random projection vector v ∈ ℝD sampled from a distribution pv, the sliced score matching objective minimizes:
By leveraging the identity vT∇x log p(x) = ∇x log p(xTv), the objective reduces to matching the projected scores. The key advantage is that the projection avoids explicit computation of the full Jacobian ∇x s_ heta(x).
Practical Implementation
In practice, SSM uses Monte Carlo approximation with random projections. For each batch of data points {xi}i=1N and random directions {vj}j=1M, the loss becomes:
The trace term is efficiently computed using Hutchinson’s trick, which approximates tr(A) = 𝔼[vTAv] with a single random vector.
Advantages Over DSM
- Computational efficiency: Reduces the O(D2) Jacobian computation to O(D) per projection.
- Scalability: Effective for high-dimensional data like images (D > 106).
- Noise robustness: Projections act as implicit regularization by averaging over directions.
Limitations
SSM introduces variance due to random projections, requiring careful tuning of the projection distribution pv. Common choices include:
- Isotropic Gaussian: v ∼ 𝒩(0, I)
- Random Fourier features: v = cos(Gx + b), where G is a random Gaussian matrix
Empirically, SSM achieves comparable performance to DSM on benchmarks like CIFAR-10 while reducing wall-clock training time by 3-5×.
Connection to Other Methods
SSM generalizes to conditional score matching by projecting both x and conditioning variables y. It also relates to contrastive divergence, where projections approximate the gradient of the energy function.

2.3 Handling High-Dimensional Data
High-dimensional data presents unique challenges for score-based generative models due to the curse of dimensionality and computational complexity. The score function ∇x log p(x) must be estimated efficiently in spaces where traditional methods fail. Recent advances leverage the geometry of data manifolds and stochastic differential equations (SDEs) to make this tractable.
Manifold Hypothesis and Dimensionality Reduction
Most high-dimensional data lies near a lower-dimensional manifold embedded in the ambient space. Score-based models exploit this by learning the score function restricted to the data manifold. The key insight is that the score s(x) can be decomposed into:
where s∥(x) is the component tangent to the manifold and s⊥(x) is the normal component. For generation, only s∥(x) needs to be modeled accurately.
Denoising Score Matching at Scale
Direct score matching in high dimensions requires careful regularization. Denoising score matching (DSM) circumvents this by training on noise-perturbed data:
where q(̃x|x) is a noise distribution (typically Gaussian). This objective remains stable even when x ∈ ℝD with D in the thousands or millions.
Annealed Langevin Dynamics
Sampling employs annealed Langevin dynamics to traverse the high-dimensional space:
where ϵt follows a cooling schedule and zt ∼ 𝒩(0,I). The annealing schedule adapts to the local dimensionality, taking larger steps in low-density regions.
Architectural Innovations
Modern implementations use:
- U-Net architectures with attention mechanisms to capture long-range dependencies
- Multi-scale score estimation through pyramidal processing
- Orthogonal regularization to prevent degenerate solutions in high dimensions
These techniques enable stable training on complex datasets like ImageNet (256×256×3 dimensions) while maintaining sample quality.
Computational Considerations
Key optimizations include:
- Distributed score computation via model parallelism
- Low-precision training with mixed FP16/FP32
- Adaptive step sizes in Langevin dynamics based on local curvature estimates

3. Langevin Dynamics for Sampling
3.1 Langevin Dynamics for Sampling
Stochastic Differential Equations and Langevin Dynamics
Langevin dynamics originates from statistical physics as a method to simulate the evolution of particles in a potential field under thermal fluctuations. Mathematically, it is described by a stochastic differential equation (SDE) of the form:
where U(x) is the potential energy function, ∇xU(x) is the force (negative gradient of the potential), and dWt represents a Wiener process (Brownian motion) that injects Gaussian noise into the system. The term √2 ensures the stationary distribution of the process aligns with the Boltzmann distribution p(x) ∝ exp(−U(x)).
Connection to Score-Based Generative Models
In score-based generative modeling, the score function ∇x log p(x) is analogous to the force term in Langevin dynamics. By learning the score function via a neural network sθ(x), we can replace the true score with its estimate, leading to the modified Langevin update rule:
where ε is the step size and zt ∼ N(0, I) is isotropic Gaussian noise. This discretization approximates the continuous-time SDE and enables iterative sampling from the data distribution.
Practical Implementation Considerations
The effectiveness of Langevin sampling depends on several factors:
- Step size (ε): Too large, and the process diverges; too small, and convergence is slow. Adaptive methods like RMSProp or Adam-based Langevin can help.
- Noise scheduling: Annealing the noise scale during sampling (e.g., from high to low) improves mixing and avoids local traps.
- Score estimation accuracy: Errors in the learned score sθ(x) can bias samples. Regularization techniques (e.g., denoising score matching) mitigate this.
Theoretical Guarantees and Convergence
Under mild conditions (smoothness of the score, proper step size decay), Langevin dynamics is guaranteed to converge to the target distribution. The convergence rate is governed by the log-Sobolev inequality of the target density. For strongly log-concave distributions, convergence is exponentially fast.
where qt is the distribution at time t, and c is a constant depending on the log-Sobolev constant of p.
Applications in Generative Modeling
Langevin dynamics is central to:
- Diffusion models: Reverse-time SDEs for generation rely on Langevin-like updates.
- Energy-based models (EBMs): Sampling from the EBM's unnormalized density via Langevin steps.
- Bayesian inference: Approximate sampling from posterior distributions in high dimensions.
A key advantage is its compatibility with learned score functions, enabling scalable sampling in complex, high-dimensional spaces like images or molecular structures.

Annealed Langevin Dynamics
Annealed Langevin Dynamics extends standard Langevin sampling by incorporating a temperature schedule, enabling efficient exploration of multimodal distributions. The method is particularly effective for sampling from complex, high-dimensional distributions encountered in score-based generative models.
Mathematical Foundation
The annealed Langevin dynamics update rule modifies the standard Langevin equation with a time-dependent noise scale σ(t) and step size α(t):
where zt ∼ N(0,I) is standard Gaussian noise. The key innovation lies in the annealing schedule, which gradually reduces σ(t) from a large initial value to near zero, allowing the sampler to first explore broadly before converging to high-probability regions.
Annealing Schedule Design
The choice of annealing schedule critically impacts sampling performance. Common approaches include:
- Geometric scheduling: σ(t) = σmax(σmin/σmax)t/T
- Linear scheduling: σ(t) = σmax - t(σmax - σmin)/T
- Cosine scheduling: σ(t) = σmin + ½(σmax - σmin)(1 + cos(πt/T))
The step size α(t) is typically set proportional to σ(t)2 to maintain stability, following the theory of stochastic differential equations.
Convergence Properties
Under mild regularity conditions, annealed Langevin dynamics converges to the target distribution p(x) when:
This ensures sufficient exploration while gradually reducing noise. The convergence rate depends on the spectral gap of the associated Fokker-Planck operator, which can be optimized through careful schedule design.
Practical Implementation
Effective implementation requires balancing several factors:
- Initial noise scale σmax should be large enough to bridge between modes
- Final noise scale σmin must be small enough for precise sampling
- Total steps T must be sufficient for the chain to mix between annealing stages
A common heuristic sets σmax to the median pairwise distance between training points and σmin to the smallest meaningful scale in the data.
Applications in Generative Modeling
In score-based generative models, annealed Langevin dynamics enables high-quality sample generation by:
- Overcoming poor initialization through the annealing process
- Navigating complex loss landscapes with multiple local optima
- Producing diverse samples from the learned data manifold
The method has proven particularly effective for high-resolution image generation, where it outperforms many alternative sampling approaches in both sample quality and diversity metrics.

3.3 Practical Considerations and Trade-offs
Computational Complexity and Scalability
Score-based generative models rely on iterative denoising processes, which introduce significant computational overhead. The time complexity scales with the number of diffusion steps N, typically ranging from 100 to 1000 steps for high-quality generation. The forward process requires solving stochastic differential equations (SDEs) or discrete Markov chains, while the reverse process involves neural network evaluations at each step. For a model with D dimensions and N steps, the total computational cost is O(DN), making real-time applications challenging without optimization.
Trade-offs Between Sampling Quality and Speed
Reducing N via accelerated sampling techniques (e.g., DDIM, SDE solvers) introduces a quality-speed trade-off. The signal-to-noise ratio (SNR) at each step affects sample fidelity:
Early stopping or reduced steps may preserve low-frequency features but lose high-frequency details. Adaptive step-size methods partially mitigate this by dynamically adjusting Δt based on gradient norms.
Memory and Hardware Constraints
The score network sθ(x, t) must cache intermediate activations for backpropagation during training, leading to memory usage that scales with model depth and resolution. For example, a 256×256 image with a U-Net backbone may require >16GB GPU memory. Mixed-precision training and gradient checkpointing are often necessary but introduce numerical instability risks.
Hyperparameter Sensitivity
Key hyperparameters include:
- Noise schedule: Linear vs. cosine schedules impact how information is eroded during diffusion.
- Architecture depth: Deeper networks capture finer details but slow down inference.
- Loss weighting: Weighting terms in the ELBO affect which data modes are prioritized.
Robustness to Noisy or Incomplete Data
Score models excel at inpainting and conditional generation due to their iterative refinement nature. The score function ∇x log p(x) can be decomposed into:
This allows for partial updates when only subsets of x are observed. However, adversarial noise or distribution shifts may destabilize the Langevin dynamics.
Comparison to Alternatives
Relative to GANs and VAEs:
- Sample quality: Score models avoid mode collapse but require more compute.
- Training stability: No discriminator networks mean fewer convergence issues.
- Latent structure: Unlike VAEs, no explicit latent space limits interpretability.
Case Study: High-Resolution Image Synthesis
In class-conditional ImageNet generation, score models achieve FID scores of <3.0 with 256×256 resolution, but require ~5 days of training on 8 TPUv3 pods. Parallel sampling techniques (e.g., strided sampling) reduce wall-clock time by 4× at a 15% FID cost.
4. Image Generation and Inpainting
Image Generation and Inpainting
Score-based generative models learn to estimate the gradient of the log probability density (score function) of the data distribution, enabling both high-quality image synthesis and controlled image completion through inpainting. The key insight is that once a model learns the score function ∇x log p(x), sampling can be performed via Langevin dynamics, which iteratively refines noise into coherent images by following the score.
Stochastic Differential Equations for Image Generation
The continuous-time formulation of score-based models uses stochastic differential equations (SDEs) to describe the diffusion process. The forward SDE gradually perturbs data to noise:
where f(x,t) is the drift coefficient, g(t) the diffusion coefficient, and w a Wiener process. The corresponding reverse-time SDE for generation is:
Here, ∇x log pt(x) is precisely the score function learned by the neural network. For image generation, we typically use the variance-preserving SDE where f(x,t) = -½β(t)x and g(t) = √β(t), with β(t) being a noise schedule.
Conditional Generation via Inpainting
Inpainting leverages the same score function but constrains the generation process to match known pixel values in specified regions. Given a masked image y = M⊙x where M is a binary mask, the conditional score decomposes as:
The second term acts as a hard constraint for masked regions. During sampling, each Langevin step projects the current estimate onto the subspace satisfying the mask constraints before applying the score update:
where ProjM replaces known pixels with their ground truth values.
Practical Implementation Considerations
Effective inpainting requires careful handling of:
- Boundary artifacts: The model must smoothly blend generated content with existing pixels
- Mask shapes: Irregular masks often perform better than rectangular ones by providing more gradient diversity during training
- Noise schedules: Adaptive noise levels help maintain detail in preserved regions while allowing sufficient modification in masked areas
Modern implementations often use U-Net architectures with attention mechanisms to capture long-range dependencies crucial for coherent inpainting. The network is trained to minimize the weighted sum of score matching losses across noise levels:
where λ(t) is a time-dependent weighting factor typically chosen as 1/g(t)2.

4.2 Audio and Speech Synthesis
Score-based generative models have demonstrated remarkable success in audio and speech synthesis by leveraging stochastic differential equations (SDEs) to model the data distribution. Unlike traditional autoregressive or flow-based approaches, these models operate by gradually denoising a signal through an iterative reverse diffusion process, allowing for high-fidelity generation of complex waveforms.
Mathematical Framework for Audio Diffusion
The forward diffusion process for audio signals can be described by the following SDE:
where 𝐱 represents the audio waveform, 𝐟(·,t) is the drift coefficient, g(t) controls the diffusion rate, and d𝐰 is a Wiener process. For speech synthesis, the reverse-time SDE is learned by estimating the score function ∇ₓ log pₜ(𝐱):
This formulation enables the generation of high-quality audio by progressively refining noise into structured waveforms through Langevin dynamics.
Architectural Considerations
Effective audio synthesis with score-based models requires specialized neural network architectures:
- Time-frequency representations: Many approaches operate on spectrograms rather than raw waveforms, using inverse short-time Fourier transforms (iSTFT) for final reconstruction.
- U-Net variants: Modified U-Net architectures with dilated convolutions capture both local and global dependencies in audio signals.
- Multi-scale processing: Hierarchical score networks handle different frequency bands separately for improved fidelity.
Practical Implementation Challenges
Several key challenges emerge when applying score-based models to audio synthesis:
The signal-to-noise ratio (SNR) of the score estimates must be carefully balanced throughout the diffusion process. High-frequency audio components are particularly susceptible to noise accumulation, requiring:
- Adaptive noise schedules that account for perceptual frequency sensitivity
- Phase-aware loss functions that preserve temporal coherence
- Conditioning mechanisms for speaker identity or linguistic content
State-of-the-Art Applications
Recent advancements have demonstrated the capability of score-based models for:
- Text-to-speech synthesis: By conditioning on phoneme sequences and speaker embeddings, these models achieve human-like speech generation.
- Music generation: Hierarchical score models can generate coherent musical compositions with rich timbral qualities.
- Audio inpainting: The iterative denoising process excels at reconstructing missing or corrupted audio segments.
The following diagram illustrates the typical architecture for score-based audio synthesis:
Performance Metrics
Evaluation of audio synthesis quality employs both objective and subjective measures:
where starget is the projection of the estimated signal onto the target signal, and enoise represents the residual noise. Additional perceptual metrics include:
- Mel-cepstral distortion (MCD) for speech quality assessment
- Fréchet Audio Distance (FAD) for music generation
- Mean opinion scores (MOS) for human evaluation

4.3 Scientific Data Generation
Score-based generative models (SGMs) have emerged as a powerful tool for generating high-dimensional scientific data, particularly in domains where traditional methods struggle with complex distributions. By leveraging stochastic differential equations (SDEs) and learned score functions, these models can synthesize realistic data samples that preserve the underlying physics or biological constraints of the original dataset.
Mathematical Framework for Scientific Data Synthesis
The generation process in SGMs is governed by a forward SDE that diffuses data into noise and a reverse SDE that converts noise back into data. For scientific applications, we often use the Variance-Preserving (VP) SDE formulation:
where β(t) is a noise schedule and d𝐰 represents Wiener process increments. The critical innovation for scientific data is the incorporation of domain-specific constraints into the score function sθ(𝐱,t):
Here, C(𝐱) represents scientific constraints (e.g., conservation laws in physics or stoichiometric balances in chemistry), and λ controls their relative importance during generation.
Key Applications in Scientific Domains
Particle Physics Simulations
SGMs have demonstrated remarkable success in generating high-energy particle collision events. The model learns to produce physically plausible detector responses while maintaining:
- Energy-momentum conservation
- Proper particle multiplicity distributions
- Realistic jet substructure patterns
Recent work has shown these models can generate events 1000× faster than traditional Monte Carlo simulations while maintaining equivalent fidelity.
Molecular Conformation Generation
In computational chemistry, SGMs generate stable molecular conformations by:
- Encoding quantum mechanical constraints in the score function
- Preserving rotational and translational symmetries
- Maintaining proper bond lengths and angles
where Eij represents pairwise atomic interactions.
Implementation Considerations
When applying SGMs to scientific data, several architectural modifications prove essential:
- Equivariant networks: Use SE(3)-equivariant architectures for physical systems
- Multi-scale processing: Handle both global structures and local interactions
- Conditional generation: Incorporate experimental parameters as conditioning variables
The training objective for scientific SGMs typically combines the standard score matching loss with a physics-informed regularization term:

5. Conditional Score-Based Models
5.1 Conditional Score-Based Models
Conditional score-based models extend the framework of score-based generative models by incorporating auxiliary information y to guide the generation process. Instead of learning the unconditional score function $$\nabla_{\mathbf{x}} \log p(\mathbf{x})$$, these models learn the conditional score $$\nabla_{\mathbf{x}} \log p(\mathbf{x} \mid \mathbf{y})$$, enabling controlled synthesis based on labels, attributes, or other structured inputs.
Mathematical Formulation
The training objective for conditional score-based models modifies the denoising score matching loss to account for the conditioning variable:
where $$\mathbf{x}_t = \alpha_t \mathbf{x}_0 + \sigma_t \mathbf{z}$$ is the perturbed sample at time t, and $$\lambda(t)$$ is a weighting function. The key distinction lies in the score network $$\mathbf{s}_\theta$$ now taking y as an additional input.
Architectural Considerations
Effective conditioning requires careful design of the score network architecture:
- Concatenation-based conditioning: The conditioning vector y is concatenated with the input or intermediate features at specific network layers.
- Cross-attention mechanisms: For high-dimensional or structured conditioning (e.g., text, images), attention layers enable dynamic feature modulation.
- Embedding projections: Discrete labels are typically embedded into continuous space before integration.
Practical Applications
Conditional variants enable precise control over generation, with notable applications in:
- Class-conditional image synthesis: Generating samples from specific categories in datasets like ImageNet.
- Text-to-image generation: Using language embeddings as conditioning for photorealistic synthesis.
- Inverse problem solving: Conditioning on partial observations (e.g., masked images) for reconstruction tasks.
Stochastic Differential Equations Perspective
The conditional forward process can be described by the modified SDE:
with corresponding reverse-time SDE for sampling:
where the drift term $$\mathbf{f}$$ now depends on both x and y. This formulation maintains the theoretical guarantees of unconditional score-based models while enabling conditional generation.
Implementation Challenges
Key practical challenges in conditional score models include:
- Conditioning gap: Discrepancies between training and inference conditions can degrade performance.
- Mode collapse: Over-reliance on conditioning may reduce output diversity.
- High-dimensional conditioning: Efficient integration of complex auxiliary inputs requires careful architectural design.
5.2 Combining with Other Generative Approaches
Score-based generative models (SGMs) exhibit complementary strengths when integrated with other generative frameworks. The most promising hybridizations leverage the respective advantages of different approaches while mitigating their individual limitations.
Diffusion-Enhanced Variational Autoencoders
Combining VAEs with score-based diffusion improves both sample quality and latent space organization. The VAE encoder learns an initial compressed representation z = E(x), while the diffusion process refines samples through:
where sθ(z,t) is the learned score function in latent space. This hybrid model achieves higher likelihoods than pure VAEs while maintaining stable training compared to standalone diffusion models.
GANs with Score-Based Regularization
Integrating score matching into GAN frameworks addresses mode collapse through gradient-based regularization. The discriminator D is trained with an additional objective:
This approach preserves GANs' sharp sample quality while improving coverage of the data distribution. Practical implementations often use sliced score matching for computational efficiency in high dimensions.
Normalizing Flow Initialization
Flows provide exact likelihood computation but struggle with topological constraints. Using a flow model F to initialize the diffusion process yields:
where the subsequent diffusion process refines samples while preserving the flow's invertibility properties. This combination is particularly effective for density estimation tasks requiring both precise likelihoods and high sample quality.
Energy-Based Model Coupling
Joint training with energy-based models (EBMs) creates a bidirectional sampling framework. The EBM defines an energy function Eφ(x), while the score model approximates:
This decomposition allows separate optimization of data fidelity (score model) and constraint satisfaction (EBM). The hybrid system demonstrates improved sample diversity and constraint handling compared to either approach alone.
Architectural Integration Strategies
Effective combination requires careful architectural considerations:
- Sequential chaining: Output of one model serves as input to another
- Parallel ensembles: Weighted combination of samples from multiple models
- Embedded conditioning: One model's parameters depend on another's latent variables
- Alternating updates: Iterative optimization of different components
The choice depends on computational constraints and desired properties of generated samples. Recent work shows that embedded conditioning with cross-attention mechanisms yields particularly strong results in multimodal generation tasks.

5.3 Scalability and Efficiency Improvements
Score-based generative models, while powerful, face significant computational challenges when scaling to high-dimensional data spaces or large datasets. The primary bottlenecks arise from the iterative nature of sampling and the need to compute gradients of the log-density (scores) over multiple noise scales. Recent advances address these limitations through architectural innovations, numerical optimizations, and parallelization strategies.
Architectural Innovations
The choice of neural network architecture critically impacts both the quality of learned scores and computational efficiency. Residual networks (ResNets) and U-Nets dominate modern implementations due to their ability to propagate gradients effectively through deep architectures. For high-resolution image generation, multi-scale architectures with downsampling and upsampling pathways demonstrate superior performance by processing features at different resolutions. The score network \( s_\theta(x, \sigma) \) can be decomposed as:
where \( f_{\theta_i} \) operates at different spatial scales and \( w_i(\sigma) \) are learned weighting functions conditioned on noise level \( \sigma \). This decomposition reduces memory footprint by allowing intermediate feature maps to be computed at lower resolutions.
Numerical Optimizations for Sampling
Traditional Langevin dynamics sampling requires hundreds to thousands of steps, making it prohibitively expensive for high-dimensional data. Two key improvements accelerate convergence:
- Annealed Langevin Dynamics: By gradually reducing the noise scale \( \sigma \) during sampling, the process first explores coarse structures before refining details. The step size \( \epsilon_t \) adapts according to:
where \( \sigma_L \) is the smallest noise level. This maintains stable signal-to-noise ratios across scales.
- Predictor-Corrector Methods: Combining deterministic ODE solvers (predictors) with stochastic Langevin steps (correctors) achieves faster mixing. The probability flow ODE:
provides rapid traversal of the data manifold, while occasional corrector steps maintain diversity.
Parallelization Strategies
Distributed training techniques enable scaling to billion-parameter models and large datasets:
- Gradient Accumulation: Computes gradients over multiple micro-batches before updating parameters, effectively increasing batch sizes without memory overflow.
- Model Parallelism: Splits the score network across multiple GPUs, with careful placement of synchronization points to minimize communication overhead.
- Data Parallelism with EMA: Uses exponential moving averages (EMA) of model parameters across workers to stabilize training with asynchronous updates.
For inference, latent space partitioning allows parallel generation of different regions of the data manifold. The sampling process divides the latent space \( \mathcal{Z} \) into \( K \) subspaces \( \{ \mathcal{Z}_k \}_{k=1}^K \), with independent chains running on each subspace:
where \( z_t^{(k)} \sim \mathcal{N}(0,I) \) and \( k \) indexes the partition. The final samples are combined through a learned mixing network.
Memory-Efficient Training
Techniques like gradient checkpointing and mixed-precision training reduce memory consumption. Notably, reversible architectures allow recomputation of intermediate activations during backpropagation rather than storing them, trading computation for memory. The memory savings \( M \) scale as:
for a network of depth \( L \), compared to \( O(L) \) for standard implementations.

6. Key Research Papers
6.1 Key Research Papers
- Riemannian Score-Based Generative Modelling - arXiv.org — Generative Models (RSGMs), a class of generative models extending SGMs to Riemannian manifolds. We demonstrate our approach on a variety of manifolds, and in particular with earth and climate science spherical data. 1 Introduction Score-based Generative Models (SGMs) also called diffusion models (Song and Ermon,2019; Song
- Score-Based Generative Modeling through Stochastic ... - GitHub — Aside from the NCSN++ and DDPM++ models in our paper, this codebase also re-implements many previous score-based models in one place, including NCSN from Generative Modeling by Estimating Gradients of the Data Distribution, NCSNv2 from Improved Techniques for Training Score-Based Generative Models, and DDPM from Denoising Diffusion ...
- PDF Score-based generative models are provably robust: an uncertainty ... — Score-based generative models (SGMs) [1, 2] are highly effective [3], producing high quality samples, with more stable and less computationally intensive training methods than generative adversarial nets and normalizing flows [4]. The models are empirically robust to approximations and errors in learning the score function.
- [2209.00796] Diffusion Models: A Comprehensive Survey of ... - ar5iv — In this paper, we first explain the foundations of diffusion models (Section 2), providing a brief but self-contained introduction to three predominant formulations: denoising diffusion probabilistic models (DDPMs) (Sohl-Dickstein et al., 2015; Ho et al., 2020), score-based generative models (SGMs) (Song and Ermon, 2019, 2020), and stochastic differential equations (Score SDEs) (Song et al ...
- Anomaly Detection in Networks via Score-Based Generative Models - arXiv.org — Our key idea is to view a network as a collection of ego-graphs. This view allows us to learn the probability distribution induced by a network with score-based generative models. In the context of anomaly detection on networks, our contribution is twofold: • Learning the distribution of ego-graphs with score-based modeling;
- Preconditioned Score-Based Generative Models - Springer — Score-based generative models (SGMs) have recently emerged as a promising class of generative models. However, a fundamental limitation is that their sampling process is slow due to a need for many (e.g., 2000) iterations of sequential computations. An intuitive acceleration method is to reduce the sampling iterations which however causes severe performance degradation. We assault this problem ...
- (PDF) A summary of the major contributions in score-based generative ... — PDF | The craze for diffusion models started in 2019 and since then, the impressive results of such models drew the attention of the ML research... | Find, read and cite all the research you need ...
- PDF Score-Based Generative Models - GitHub Pages — A common class of such model is the energy-based model, where p(x) /e E(x): Here, E(x) is called the energy function, and the normalization constant Z= Z e E(x) dx is called the partition function. Energy-based models show up a lot in statistical physics. Another class of such models is the graphical model where p(x) / Y a2F p a(x): Here, we ...
- PDF Convergence of score-based generative modeling for general data ... — Score-based generative modeling (SGM) has grown to be a hugely successful method for learning to generate samples from complex data distributions such as that of images and audio. It is based on evolving an SDE that transforms white noise into a sample from the learned distribution, using estimates of the score function, or gradient log-pdf.
- PDF Structured Diffusion Processes in Deep Generative Models — the score model s θ(x,t). Once learned, the score model s θ(x,t) can be readily adjusted with fixed terms for controlled generation tasks in the same manner as energy-based models [Song et al., 2021]. In addition to the reverse SDE, the learned score can also be used to solve an ordinary
6.2 Books and Review Articles
- Riemannian Score-Based Generative Modelling - arXiv.org — Generative Models (RSGMs), a class of generative models extending SGMs to Riemannian manifolds. We demonstrate our approach on a variety of manifolds, and in particular with earth and climate science spherical data. 1 Introduction Score-based Generative Models (SGMs) also called diffusion models (Song and Ermon,2019; Song
- PDF SDE-based Generative Models - Yuanzhi Zhu — Score-based Generative Modeling in Latent Space* 47 †[2112.10752] High-Resolution Image Synthesis with Latent Diffusion Models (arxiv.org) *[2106.05931] Score-based Generative Modeling in Latent Space (arxiv.org) Faster diffusion in latent space * †
- PDF Lecture 15 - GitHub Pages — Score-based generative models. Noise-contrastive estimation Energy-based models. Plan for today: Evaluating generative models Stefano Ermon (AI Lab) Deep Generative Models Lecture 153/28. Evaluation In any research field, evaluation drives progress. How do we evaluate ... (6)-2.1 -1.3 -0.4 1.9 5.1 6.2
- Score-based generative models are provably robust: — Score-based generative models (SGMs) [1, 2] are highly effective [], producing high quality samples, with more stable and less computationally intensive training methods than generative adversarial nets and normalizing flows [].The models are empirically robust to approximations and errors in learning the score function. While SGM generalization properties have been studied for idealized ...
- Preconditioned Score-Based Generative Models - Springer — Score-based generative models (SGMs) have recently emerged as a promising class of generative models. However, a fundamental limitation is that their sampling process is slow due to a need for many (e.g., 2000) iterations of sequential computations. An intuitive acceleration method is to reduce the sampling iterations which however causes severe performance degradation. We assault this problem ...
- Generative AI Techniques and Models - SpringerLink — It then reviews some of the most influential generative models, such as GANs, VAEs, and transformer-based models like GPT, explaining their structure, how to train them, and finally, what problems could happen while training in practice. After the theoretical introduction, some techniques involved in generative AI are presented.
- PDF Score-Based Generative Models - GitHub Pages — A common class of such model is the energy-based model, where p(x) /e E(x): Here, E(x) is called the energy function, and the normalization constant Z= Z e E(x) dx is called the partition function. Energy-based models show up a lot in statistical physics. Another class of such models is the graphical model where p(x) / Y a2F p a(x): Here, we ...
- Evaluation Metrics for Generative Models: An Empirical Study - MDPI — Generative models such as generative adversarial networks, diffusion models, and variational auto-encoders have become prevalent in recent years. While it is true that these models have shown remarkable results, evaluating their performance is challenging. This issue is of vital importance to push research forward and identify meaningful gains from random noise. Currently, heuristic metrics ...
- (PDF) A summary of the major contributions in score-based generative ... — Finally, the work parametrizes the score model to predict noise rather than the score itself, as in DDPM for instance. Let's write u t = µ t ( x 0 )+ L t ϵ 2 d , with Σ t = L t L ⊤
- Propensity score synthetic augmentation matching using generative ... — In this work, we propose a novel deep learning approach -the Propensity Score Synthetic Augmentation Matching using Generative Adversarial Networks (PSSAM-GAN)- that aims at keeping the sample size, without IPW, by generating synthetic matches. PSSAM-GAN can be used in conjunction with any other prediction method to estimate treatment effects.
6.3 Online Resources and Tutorials
- Score-based generative models are provably robust: — Score-based generative models (SGMs) [1, 2] are highly effective [], producing high quality samples, with more stable and less computationally intensive training methods than generative adversarial nets and normalizing flows [].The models are empirically robust to approximations and errors in learning the score function. While SGM generalization properties have been studied for idealized ...
- PDF Score-Based Generative Models as Trajectory Priors for Motion Planning — Score-Based Generative Models as Trajectory Priors for Motion Planning Score-basierte generative Modelle als Vorwissen über Trajektorien in der Bewegungsplanung Master thesis by Mark Baierl Date of submission: January 23, 2023 1. Review: Prof. Dr. Jan Peters 2. Review: Joao Carvalho Darmstadt
- PDF Bridging Energy, Score, and Diffusion in Generative Modeling (a brief note) — %PDF-1.5 %¿÷¢þ 324 0 obj /Linearized 1 /L 7546386 /H [ 2855 658 ] /O 328 /E 96164 /N 25 /T 7544170 >> endobj 325 0 obj /Type /XRef /Length 104 /Filter ...
- Preconditioned Score-based Generative Models - arXiv.org — Abstract. Score-based generative models (SGMs) have recently emerged as a promising class of generative models. However, a fundamental limitation is that their sampling process is slow due to a need for many (e.g., 2000 2000 2000 2000) iterations of sequential computations.An intuitive acceleration method is to reduce the sampling iterations which however causes severe performance degradation.
- PDF Score-Based Generative Models - GitHub Pages — A common class of such model is the energy-based model, where p(x) /e E(x): Here, E(x) is called the energy function, and the normalization constant Z= Z e E(x) dx is called the partition function. Energy-based models show up a lot in statistical physics. Another class of such models is the graphical model where p(x) / Y a2F p a(x): Here, we ...
- PDF Score-based Diffusion Models Via Stochastic - a Technical Tutorial ... — %PDF-1.5 %¿÷¢þ 572 0 obj /Linearized 1 /L 1187233 /H [ 2980 791 ] /O 576 /E 247490 /N 29 /T 1183530 >> endobj 573 0 obj /Type /XRef /Length 157 /Filter ...
- Generative Adversarial Networks and Other Generative Models — Generative networks are fundamentally different in their aim and methods compared to CNNs for classification, segmentation, or object detection. They have initially been meant not to be an image analysis tool but to produce naturally looking images. The adversarial training paradigm has been proposed to stabilize generative methods and has proven to be highly successful—though by no means ...
- (PDF) Preconditioned Score-based Generative Models - ResearchGate — Compared with the latest generative models (\eg, CLD-SGM, DDIM, and Analytic-DDIM), PDS can achieve the best sampling quality on CIFAR-10 at a FID score of 1.99.
- PDF Efficient Learning of Generative Models via Finite-Difference Score Matchin — the unnormalized generative models such as the energy-based ones [34] model the distribution as p (x) = ep (x)=Z , where pe (x)is the unnormalized probability and Z = R pe (x)dxis the partition function. Computing the integral in Z is usually intractable especially for high-dimensional data, which makes it difficult to directly learn ...
- Score-based diffusion models for accelerated MRI — Score-based diffusion models provide a powerful way to model images using the gradient of the data distribution. Leveraging the learned score function as a prior, here we introduce a way to sample data from a conditional distribution given the measurements, such that the model can be readily used for solving inverse problems in imaging, especially for accelerated MRI.








