Author: Max Heitzman
Semester: Fall 2025
Course: CS 4331/5331 - Generative AI
This repository contains all assignments and projects from the Generative AI course, covering fundamental and advanced generative modeling techniques. Each assignment builds upon previous concepts, progressing from basic architectures to state-of-the-art models.
- UNet Architectures - Encoder-decoder networks with skip connections
- Variational Autoencoders (VAE) - Probabilistic generative models with latent spaces
- Generative Adversarial Networks (GAN) - Adversarial training for generation
- Diffusion Models (DDPM) - Denoising diffusion probabilistic models
- DCGAN with Label Smoothing - Advanced GAN training techniques
Generative AI/
├── README.md # This file
├── A1/ # Assignment 1: UNet Implementation
│ ├── README.md
│ └── HW1_GenAI25 (2) 2/
│ ├── 1D_UNet.py
│ └── 2D_UNet.py
├── A2/ # Assignment 2: Variational Autoencoders
│ ├── README.md
│ └── Heitzman_HW2/
│ ├── VAE.py
│ ├── train.py
│ └── [experiments]
├── A3/ # Assignment 3: Generative Adversarial Networks
│ ├── README.md
│ └── HW3_GenAI25/
│ ├── GAN.py
│ ├── train.py
│ └── [experiments]
├── A4/ # Assignment 4: Diffusion Models
│ ├── README.md
│ └── diffusion_homework/
│ ├── UNet_time.py
│ ├── train_mnist.py
│ └── [models and results]
└── Project/ # Final Project: DCGAN with Label Smoothing
├── README.md
└── Presenation /
├── code/
│ ├── baseline_dcgan.py
│ ├── smoothed_dcgan.py
│ └── train.py
└── [experiments and results]
Topic: Implementing 1D and 2D UNet architectures from scratch
Key Concepts:
- Encoder-decoder architecture
- Skip connections
- Downsampling/upsampling with
einops - Time conditioning for diffusion models
See: A1/README.md
Topic: Building and training VAEs on MNIST
Key Concepts:
- Variational inference
- ELBO objective
- Reparameterization trick
- Latent space analysis (t-SNE, traversal)
See: A2/README.md
Topic: Implementing 2D GANs with different data distributions
Key Concepts:
- Adversarial training
- Minimax game formulation
- Training dynamics and stability
- Mode collapse
See: A3/README.md
Topic: Denoising Diffusion Probabilistic Models (DDPM) on MNIST
Key Concepts:
- Forward and reverse diffusion processes
- Noise schedules (linear, cosine)
- Time-conditional UNet
- Sampling from diffusion models
See: A4/README.md
Topic: Investigating how label smoothing affects DCGAN training on CIFAR-10
Research Question: Does label smoothing improve DCGAN training stability and image quality?
Methodology:
- Implement baseline DCGAN with hard labels (1.0/0.0)
- Implement smoothed DCGAN with soft labels (0.9/0.1)
- Compare training dynamics, loss curves, and generated images
- Analyze stability metrics
See: Project/README.md
- Python 3.8+
- PyTorch - Deep learning framework
- NumPy - Numerical computing
- Matplotlib - Visualization
- einops - Tensor manipulation
- t-SNE - Dimensionality reduction
- CUDA - GPU acceleration (when available)
- MNIST - Handwritten digits (28×28 grayscale)
- CIFAR-10 - Natural images (32×32 color, 10 classes)
- UNet → Understanding encoder-decoder architectures
- VAE → Probabilistic generative models, latent spaces
- GAN → Adversarial training, minimax optimization
- Diffusion → State-of-the-art generation, iterative denoising
- DCGAN Project → Advanced techniques, experimental methodology
- Mode Collapse (GANs): Generator only learns subset of data distribution
- Training Instability (GANs): Balancing generator and discriminator
- Blurry Images (VAEs): KL divergence regularization trade-off
- Slow Sampling (Diffusion): Requires many denoising steps
- Reparameterization Trick: Making sampling differentiable
- Label Smoothing: Improving GAN training stability
- Skip Connections: Preserving spatial information
- Time Conditioning: Incorporating temporal information
- UNet: Ronneberger et al. (2015) - "U-Net: Convolutional Networks for Biomedical Image Segmentation"
- VAE: Kingma & Welling (2014) - "Auto-Encoding Variational Bayes"
- GAN: Goodfellow et al. (2014) - "Generative Adversarial Networks"
- DCGAN: Radford et al. (2016) - "Unsupervised Representation Learning with Deep Convolutional GANs"
- DDPM: Ho et al. (2020) - "Denoising Diffusion Probabilistic Models"
- PyTorch Documentation: https://pytorch.org/docs/
- Hugging Face Diffusion Blog: https://huggingface.co/blog/annotated-diffusion
- einops Documentation: https://einops.rocks/
Each assignment has its own README with specific setup and usage instructions. Start with:
- A1/README.md - UNet implementation
- A2/README.md - VAE training
- A3/README.md - GAN experiments
- A4/README.md - Diffusion models
- Project/README.md - Final project
- All code is implemented from scratch (no pre-trained models)
- Experiments are reproducible with fixed random seeds
- Visualizations and results are included in each assignment folder
- Training times vary based on hardware (GPU recommended)
This repository demonstrates comprehensive understanding of modern generative modeling techniques, from foundational architectures to state-of-the-art methods.