TL;DR
During few-shot fine-tuning, Diffusion Models (DMs) pass through an unexpected "corruption stage" where image quality temporarily degrades into noisy patterns before ultimately overfitting. This paper identifies a narrowed learning distribution as the root cause and introduces a elegant fix: integrating Bayesian Neural Networks (BNNs) via variational inference to implicitly broaden this distribution, eliminating the corruption stage and boosting image diversity without adding any extra inference cost.
What Problem Does This Paper Address?
Few-shot fine-tuning techniques like DreamBooth and LoRA have made it incredibly easy to personalize text-to-image diffusion models using just a handful of images. However, transferring a model from a massive pre-trained data distribution to a tiny, localized one introduces strange training dynamics.
The authors are the first to document a non-monotonic performance curve during this process. Initially, image fidelity improves. But as training continues, the generated images unexpectedly deteriorate, developing bizarre, noisy artifacts—a phase the authors term the corruption stage. Eventually, the model emerges from this stage, but it plunges straight into severe overfitting, losing its ability to generate diverse images and simply memorizing the training data.
Methods
To understand and fix this phenomenon, the authors approach the problem in two steps:
- Heuristic Modeling: They model the few-shot fine-tuning process using a multivariate Gaussian distribution approximation. Their mathematical framework reveals that the corruption stage happens because the model's learned distribution narrows too quickly while its prediction error scale (or lack of "confidence" in regenerating the training sample) remains high.
- Bayesian Neural Networks (BNNs): To prevent the distribution from narrowing prematurely, the authors introduce weight uncertainty. Instead of learning fixed, deterministic weights, they apply mean-field variational inference (Bayes by Backprop), treating weights as random variables sampled from a Gaussian distribution: $\theta \sim \mathcal{N}(\mu_\theta, \sigma_\theta^2)$.
The training objective is optimized using a modified loss function that balances standard diffusion loss with a Kullback-Leibler (KL) divergence regularization term anchored to the pre-trained model weights. Crucially, at inference time, they sample only the mean weights ($\mu_\theta$), meaning the model behaves deterministically and incurs zero additional computational or memory overhead during deployment.
Datasets
The authors evaluated their approach across two primary tasks:
- Object-Driven Generation: Evaluated using the complete DreamBooth dataset (30 distinct object classes, each containing 4–6 images).
- Subject-Driven Generation: Evaluated using a subset of the CelebA-HQ dataset (30 randomly selected human subjects, each containing 5 images).
Key Insights and Ideas
- The Root of Corruption: The corruption stage isn't random noise; it's a structural failure. When a diffusion model is forced to fit a tiny dataset, its internal manifold collapses into a highly constrained space. Any slight deviation during the reverse denoising process gets amplified into severe noise patterns because the model hasn't learned how to handle "low-confidence" regions outside its tiny new distribution.
- Parameter-Space Augmentation: Traditional data augmentation (like flipping or cropping images) often degrades generative quality or causes "data leakage" in diffusion models. BNNs act as an implicit, elegant alternative by introducing perturbations directly into the parameter space (or encoding space), forcing the network to learn a broader, more robust manifold.
- Strategic BNN Placement: You don't need to make the entire network stochastic. The authors found that applying BNNs only to the U-Net's up-blocks, or even strictly to the normalization layers (LayerNorm and GroupNorm), yields strong performance while modifying as little as 0.02% of the parameters, significantly saving training memory.
Key Results
Integrating BNNs into popular fine-tuning frameworks (DreamBooth, LoRA, and OFT) yielded consistent improvements across multiple metrics:
- Higher Fidelity and Quality: Across both DreamBooth and CelebA-HQ datasets, the BNN-enhanced models achieved higher text prompt alignment (Clip-T) and image fidelity (Dino, Clip-I).
- Mitigating Artifacts: No-reference image quality scores (Clip-IQA) saw a major boost because the noisy corruption patterns were successfully suppressed.
- Enhanced Diversity: Generation diversity (measured via LPIPS) improved significantly, preventing the model from falling into the typical "memorization" trap of standard few-shot tuning.
- User Preference: A comprehensive user study involving 101 participants showed that users overwhelmingly preferred images generated by the BNN-integrated models in terms of subject fidelity, text alignment, and overall image quality.
Limitations and Future Work
While highly effective, the authors note a few trade-offs:
- Slower Convergence: Introducing weight randomness can slow down the initial phase of fine-tuning.
- Risk of Underfitting: If the number of training iterations is insufficient, the added distribution breadth from the BNN can prevent the model from capturing extremely fine, intricate details of the target subject. Future work will likely target adaptive variance scheduling to optimize the speed-detail trade-off.
Summary updated