A from-scratch implementation of diffusion models with the ArrowSpace spectral-geometric metric, extending the Euclidean-diffusion tutorial at chenyang.co/diffusion.html.
The theoretical background is in the blog post Diffusion as spectral-geometric projection.
Standard diffusion uses isotropic Gaussian corruption and Euclidean distance. ArrowSpace spectral diffusion replaces the metric with
where
| # | Notebook | Description |
|---|---|---|
| 01 | 01_spectral_diffusion_from_scratch.ipynb | Baseline Euclidean vs spectral-geometric diffusion on the 2-D Swiss roll. Includes metric-matched noise justification. |
| 02 | 02_spectral_diffusion_theory.ipynb | Smoothed distance contours, relative error model, and sampling trajectories with varying |
| 03 | 03_spiral_manifold.ipynb | Spiral (Swiss roll) manifold in |
uv venv .venv
source .venv/bin/activate
uv pip install -e ..venv/bin/jupyter labsrc/
spectral_diffusion.py # Core library: schedules, datasets, models, training loops, samplers
notebooks/
01_spectral_diffusion_from_scratch.ipynb
02_spectral_diffusion_theory.ipynb
03_spiral_manifold.ipynb