Skip to content

Repository files navigation

Linear_Diffusion_Models_for_Generative_Image_Synthesis

Description

This project implements and extends a Linear Diffusion Model (LDM) for generative image modeling, developed as part of a coursework assignment .

Unlike standard diffusion models that rely heavily on deep neural networks, this model leverages classical machine learning techniques:

  • One-hot encoded labels as prompts
  • Principal Component Analysis (PCA) as the image encoder
  • Multivariate Linear Regression as the denoiser

The purpose is to build a fully interpretable, lightweight diffusion model from linear components, capable of generating MNIST-like images from label prompts.


Features & Enhancements

  • Latent Diffusion in Linear Space
    Diffusion is applied in a compressed PCA space, reducing training and generation costs.

  • Nonlinear Encoders
    PCA is replaced with alternatives like Kernel PCA or Random Fourier Features to introduce mild nonlinearity while avoiding neural networks.

  • Cosine Variance Schedule
    A noise schedule based on Nichol & Dhariwal (2021) improves sample quality over standard linear schedules.

  • Accelerated Sampling
    A strided sampling schedule reduces generation time significantly by sampling fewer diffusion steps.

  • Empirical Evaluation
    Image quality is assessed using:

  • Pretrained MNIST classifiers

  • Conformal prediction techniques to evaluate confidence and coverage

  • Parameter Tuning
    The model's behavior is studied under varying:

  • Diffusion time T

  • Latent dimensionality


📁 Datasets

  • MNIST: Used for training and classification
  • Generated Dataset (Dn): Synthesized using the diffusion model, with balanced classes (e.g., 100 samples per digit)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages