Towards demystifying the creativity of diffusion models
Diffusion models generalize beyond their training data because neural networks learn a smoothed version of the score function rather than the exact empirical one, which would only reproduce training samples. Regularization, whether explicit weight decay or the implicit bias of gradient training, softens the sharp transitions between training points, creating an interpolation zone where denoised samples settle between known data. A 1-D experiment with two-layer ReLU networks trained by AdamW shows this directly. In higher dimensions the smoothing acts mainly along directions tangential to the data manifold, so samples still converge onto the manifold while spreading between training points, which balances quality and novelty. The work is from an ICLR 2026 paper, and code is released.
Related posts
- How Diffusion Controller unifies and simplifies AI image generation
Google Research hardMasterDiffusion Controller reframes diffusion denoising as a continuous control problem, unifying inference-time guidance and fine-tuning methods such as LoRA, reward-weighted regression and policy gradients under one framework. A lightweight trainable side network attached to a frozen backbone adds small corrections to the base model's score using the intermediate reverse mean, so it also works with gray-box, access-restricted models. On a Stable Diffusion v1.4 backbone across SFT, reward-weighted loss and PPO regimes, the gray-box controller beat LoRA on HPS-v2 win rates while touching fewer layers. The white-box variants reached about a 90% win rate over the baseline, and a single inference-time guidance-strength parameter dials alignment up or down.
- The Annotated Diffusion Model
Hugging Face hardMasterDenoising Diffusion Probabilistic Models (Ho et al., 2020) work by pairing a fixed forward process that gradually adds Gaussian noise to an image under a variance schedule with a learned reverse process that denoises step by step from pure noise. A closed-form property lets x_t be sampled directly from x_0, and a reparametrization of the mean turns training into a simple MSE loss on predicting the added noise at a randomly sampled timestep. The walkthrough derives this objective and then implements the model step by step in PyTorch: a U-Net with residual connections, sinusoidal timestep embeddings and weight-standardized ResNet blocks with group normalization, following Phil Wang's implementation.
- DiScoFormer: One transformer for density and score, across distributions
Hugging Face hardMasterDiScoFormer is a transformer that takes a set of sample points and, in one forward pass, estimates both the density and the score (gradient of log-density) of the underlying distribution without per-distribution retraining. It uses cross-attention to query arbitrary points and a shared backbone with density and score heads, whose mismatch serves as a label-free consistency loss for test-time adaptation to out-of-distribution inputs. Attention provably generalizes kernel density estimation, since a single head approximates a Gaussian kernel, and the model is trained on freshly sampled Gaussian mixtures with closed-form targets. In 100 dimensions it cuts score error about 6.5x and density error over 37x versus the best tuned KDE and generalizes to Laplace and Student-t distributions, though KDE remains faster on small datasets.
- Open-sourcing Knowledge Distillation Code and Weights of SD-Small and SD-Tiny
Hugging Face mediumAdeptSegmind releases training code and weights for SD-Small and SD-Tiny, Stable Diffusion variants compressed by block-removal knowledge distillation that cut UNet parameters by 35% and 55% while keeping image fidelity close to the base model. The student is trained with three losses: the standard latent diffusion loss, an output-matching loss against the teacher (Realistic-Vision 4.0), and a per-block feature-level loss. Training used 1M LAION Art Aesthetic images scoring above 7.5. The distilled models run up to 2x faster at inference but are early-stage and weak at composition, so they work best fine-tuned or LoRA-trained on specific styles. A portrait fine-tune of SD-Tiny is included with its hyperparameters.
- Training Stable Diffusion with Dreambooth using Diffusers
Hugging Face mediumAdeptDreambooth fine-tuning of Stable Diffusion overfits quickly, so learning rate and step count must be tuned together. Experiments on 2x A100s found low learning rates (2e-6 for objects at ~400 steps, 1e-6 to 2e-6 with 800-1200 steps for faces) work best. Prior preservation matters mainly for faces, and the DDIM scheduler with ~100 inference steps cleans up noise from overfit models. Fine-tuning the text encoder alongside the UNet gave the biggest quality gain but needs ~24 GB of GPU memory; 8-bit Adam, fp16 or gradient accumulation bring training down to 16 GB.