ncsn  by ermongroup

Research paper implementation for generative modeling via score estimation

created 6 years ago
733 stars

Top 48.2% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides the official implementation for "Generative Modeling by Estimating Gradients of the Data Distribution" (NeurIPS 2019, Oral). It enables generative modeling by estimating the score function (gradient of the log-density) of a data distribution using Noise Conditional Score Networks (NCSN) trained via score matching. The target audience includes researchers and practitioners in generative modeling and deep learning.

How It Works

The core approach involves perturbing training data with Gaussian noise at various variances and training a single neural network (NCSN) to estimate the score function for each noise level. This is achieved using score matching. Samples are then generated using annealed Langevin dynamics, progressively denoising from high-variance noise to produce realistic data. This method offers a stable and effective way to learn complex data distributions.

Quick Start & Requirements

  • Install: pip install -r requirements.txt (dependencies include PyTorch, PyYAML, tqdm, Pillow, tensorboardX, seaborn).
  • Run: python main.py --runner <RunnerClass> --config <config_file.yml> --doc <doc_name>
  • Pretrained Checkpoints: Available via run.zip.
  • Documentation: Usage details via python main.py --help.

Highlighted Details

  • Official implementation of the NeurIPS 2019 paper.
  • Utilizes Noise Conditional Score Networks (NCSN) and score matching.
  • Generates samples via annealed Langevin dynamics.
  • Supports multiple runner classes for different experimental setups (AnnealRunner, BaselineRunner, ScoreNetRunner, ToyRunner).

Maintenance & Community

The project is associated with the Stanford AI Lab. The README notes that subsequent work ("Improved Techniques for Training Score-Based Generative Models" and "Score-Based Generative Modeling through Stochastic Differential Equations") has significantly stabilized and extended the method, and this codebase is not recommended for new projects.

Licensing & Compatibility

The repository does not explicitly state a license. However, it is derived from code associated with the "sliced score matching" paper, which has a permissive license. Users should verify licensing for commercial or closed-source use.

Limitations & Caveats

The authors explicitly state that this codebase is not recommended for new projects due to subsequent, more stabilized, and extended research in the area. This suggests potential issues with stability, performance, or ease of use compared to newer implementations.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
17 stars in the last 90 days

Explore Similar Projects

Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers), and
3 more.

guided-diffusion by openai

0.2%
7k
Image synthesis codebase for diffusion models
created 4 years ago
updated 1 year ago
Feedback? Help us improve.