ApX logoApX logo
ModelsCalculatorHardwareCoursesPricing
ApX logoApX logo
ModelsCalculatorHardwareCoursesPricing

All Courses

Advanced Synthetic Data Generation: GANs and Diffusion Models
Chapter 1: Foundations of Generative Modeling Revisited
Probabilistic Modeling for Generation
Taxonomy of Generative Models
Challenges in High-Dimensional Data Synthesis
GAN Fundamentals
Introduction to Diffusion Model Concepts
Chapter 2: Advanced GAN Architectures and Techniques
Progressive Growing of GANs (ProGAN)
Style-Based Generators (StyleGAN variants)
Unpaired Image-to-Image Translation (CycleGAN)
Conditional GANs: Architectures and Control
Attention Mechanisms in GANs
Analyzing and Manipulating GAN Latent Spaces
Hands-on Practical: Implementing StyleGAN Components
Chapter 3: GAN Training Stability and Optimization
Diagnosing Training Instability: Oscillations and Divergence
Mode Collapse: Causes and Mitigation Strategies
Alternative Loss Functions (WGAN, WGAN-GP, LSGAN)
Regularization Techniques for GANs
Two Time-Scale Update Rule (TTUR)
Hyperparameter Tuning Strategies for GANs
Hands-on Practical: Implementing WGAN-GP
Chapter 4: Diffusion Models: Theory and Advanced Implementation
Mathematical Foundations: Stochastic Differential Equations
Denoising Diffusion Probabilistic Models (DDPM)
Score-Based Generative Modeling
Improved Techniques: DDIM and Variance Schedules
Classifier Guidance and Classifier-Free Guidance
Architectural Considerations for Diffusion Models (U-Net)
Hands-on Practical: Implementing a Basic DDPM
Chapter 5: Evaluating Synthetic Data Quality
Challenges in Generative Model Evaluation
Quantitative Metrics: IS, FID, Precision, Recall
Distributional Metrics: Kernel Inception Distance (KID)
Perceptual Path Length (PPL) for GANs
Qualitative Evaluation Methods
Evaluating Conditional Generation Models
Hands-on Practical: Calculating FID Scores
Chapter 6: Advanced Applications and Integration
High-Resolution Synthesis Strategies
Text-to-Image Synthesis Architectures
Synthetic Data for Augmentation and Privacy
Video Generation with Generative Models
Combining GANs and Diffusion Models
Computational Considerations and Scaling
Hands-on Practical: Conditional Image Generation

Taxonomy of Generative Models

Generative models seek to learn the underlying probability distribution of a dataset, pdata(x)p_{data}(x)pdata​(x), enabling us to generate new samples that resemble the original data. However, models differ significantly in how they represent and learn this distribution, leading to different strengths, weaknesses, and application areas. Understanding this classification helps in selecting the right tool for a task and appreciating the design choices behind models like GANs and Diffusion Models.

We can broadly categorize generative models based on how they handle the probability density function pmodel(x)p_{model}(x)pmodel​(x) they are trying to learn.

Explicit Density Models

These models explicitly define and learn a probability density function pmodel(x;θ)p_{model}(x; \theta)pmodel​(x;θ) parameterized by θ\thetaθ. The goal during training is typically to maximize the likelihood of the training data under this model. Within this category, we find two main approaches:

  1. Tractable Explicit Density Models: These models define a density function pmodel(x;θ)p_{model}(x; \theta)pmodel​(x;θ) that is computationally tractable, meaning we can directly calculate the likelihood pmodel(x)p_{model}(x)pmodel​(x) for any given data point xxx.

    • Examples:
      • Autoregressive Models (e.g., PixelRNN, PixelCNN): These models decompose the joint probability distribution over dimensions (e.g., pixels in an image) into a product of conditional probabilities using the chain rule: p(x)=∏ip(xi∣x1,...,xi−1)p(x) = \prod_i p(x_i | x_1, ..., x_{i-1})p(x)=∏i​p(xi​∣x1​,...,xi−1​). Each conditional probability is modeled by a neural network. While they can achieve high likelihood scores, generation is sequential and often slow, as predicting xix_ixi​ requires all previous x1...i−1x_{1...i-1}x1...i−1​.
      • Normalizing Flows: These models transform a simple base distribution (like a Gaussian) pz(z)p_z(z)pz​(z) into a complex data distribution px(x)p_x(x)px​(x) using a series of invertible transformations fff with tractable Jacobians. The change of variables formula allows exact likelihood calculation: px(x)=pz(f−1(x))∣det⁡(∂f−1(x)∂x)∣p_x(x) = p_z(f^{-1}(x)) |\det(\frac{\partial f^{-1}(x)}{\partial x})|px​(x)=pz​(f−1(x))∣det(∂x∂f−1(x)​)∣. They offer exact likelihood evaluation and efficient sampling once trained, but designing expressive yet invertible transformations with tractable Jacobians can be challenging.
    • Characteristics: Can directly evaluate likelihoods; often achieve state-of-the-art log-likelihood scores; generation can be slow (autoregressive) or constrained by architecture (flows).
  2. Approximate Explicit Density Models: These models still define an explicit pmodel(x;θ)p_{model}(x; \theta)pmodel​(x;θ), but it involves latent variables zzz and is generally intractable to compute or optimize directly. Instead, they optimize a lower bound on the log-likelihood (the Evidence Lower Bound, or ELBO) or use other approximation techniques.

    • Example: Variational Autoencoders (VAEs): VAEs introduce latent variables zzz and assume data is generated via p(x∣z)p(x|z)p(x∣z). They use an encoder network q(z∣x)q(z|x)q(z∣x) to approximate the true posterior p(z∣x)p(z|x)p(z∣x) and a decoder network p(x∣z)p(x|z)p(x∣z). Training maximizes the ELBO: log⁡p(x)≥Ez∼q(z∣x)[log⁡p(x∣z)]−DKL(q(z∣x)∣∣p(z))\log p(x) \ge \mathbb{E}_{z \sim q(z|x)}[\log p(x|z)] - D_{KL}(q(z|x) || p(z))logp(x)≥Ez∼q(z∣x)​[logp(x∣z)]−DKL​(q(z∣x)∣∣p(z)) where p(z)p(z)p(z) is a prior distribution (e.g., standard Gaussian) and DKLD_{KL}DKL​ is the Kullback-Leibler divergence.
    • Characteristics: Provide a learned latent space; relatively stable training; fast generation/sampling; often produce somewhat blurrier samples compared to GANs; provide only a lower bound on the likelihood.

Implicit Density Models

These models learn to generate samples from pmodel(x)p_{model}(x)pmodel​(x) without explicitly defining the density function itself. Instead, they provide a mechanism to sample directly from the distribution.

  • Example: Generative Adversarial Networks (GANs): As revisited earlier, GANs use a generator network GGG that maps a random noise vector zzz (sampled from a simple prior pz(z)p_z(z)pz​(z)) to a data sample x=G(z)x = G(z)x=G(z). A discriminator network DDD tries to distinguish real data from generated samples. The generator learns implicitly to transform the prior distribution pz(z)p_z(z)pz​(z) into the target data distribution pdata(x)p_{data}(x)pdata​(x) by trying to fool the discriminator. We never explicitly write down or compute pmodel(x)p_{model}(x)pmodel​(x).
  • Characteristics: Can produce very sharp, high-fidelity samples; generation is typically fast (a single forward pass through the generator); training can be unstable (mode collapse, oscillations); evaluating the likelihood pmodel(x)p_{model}(x)pmodel​(x) is generally not possible.

Where Do Diffusion Models Fit?

Diffusion Models represent a more recent and highly successful family. Their classification can be detailed:

  • They are often trained by optimizing a variational lower bound on the likelihood (similar to VAEs), making them seem like Approximate Explicit Density Models. The objective function derived for Denoising Diffusion Probabilistic Models (DDPMs) is indeed a form of ELBO.
  • However, they can also be interpreted through the lens of score matching, where the model learns the gradient of the log-density, ∇xlog⁡p(x)\nabla_x \log p(x)∇x​logp(x), known as the score function. This connection links them closely to the underlying explicit density function, even if the density itself isn't computed directly during generation.
  • Generation involves an iterative denoising process, starting from noise and gradually refining it based on the learned score or conditional distribution p(xt−1∣xt)p(x_{t-1}|x_t)p(xt−1​∣xt​), which differs significantly from the single-pass generation of typical VAEs or GANs.

Diffusion models effectively combine aspects of different families. They achieve sample quality often rivaling or exceeding GANs while generally offering more stable training and an explicit (though complex) connection to likelihood-based objectives. Their main drawback historically has been slower sampling speed due to the iterative generation process, though techniques like DDIM (Denoising Diffusion Implicit Models) have significantly improved this.

A classification of major generative model families based on how they handle the probability density function. This course focuses primarily on advanced techniques within GANs (Implicit Density) and Diffusion Models (Hybrid Characteristics).

Understanding this taxonomy provides context for the models we will focus on. GANs and Diffusion Models have emerged as particularly powerful for generating complex, high-dimensional data like images, despite their different underlying principles and trade-offs, which we will explore in detail throughout this course.

  • Generative Adversarial Nets, Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, Yoshua Bengio, 2014 Advances in Neural Information Processing Systems (NeurIPS) 27 DOI: 10.48550/arXiv.1406.2661 - This foundational paper introduces Generative Adversarial Networks (GANs), defining the implicit density modeling paradigm and the adversarial training framework.
  • Variational Inference with Normalizing Flows, Danilo Jimenez Rezende and Shakir Mohamed, 2015 Proceedings of the 32nd International Conference on Machine Learning (ICML), Vol. 37 (PMLR) DOI: 10.48550/arXiv.1505.05770 - Introduces normalizing flows, a class of tractable explicit density models that transform simple distributions into complex ones via invertible transformations.
  • Denoising Diffusion Probabilistic Models, Jonathan Ho, Ajay Jain, Pieter Abbeel, 2020 Advances in Neural Information Processing Systems (NeurIPS) 33 DOI: 10.48550/arXiv.2006.11239 - This work revitalized and popularized diffusion models, introducing the Denoising Diffusion Probabilistic Models (DDPMs) framework for high-quality image generation.

© 2026 ApX Machine Learning