TL;DR
Instead of fine-tuning pre-trained diffusion models to generate out-of-domain (OOD) images, this paper introduces a tuning-free, sampling-based alternative. By leveraging deterministic inversion, the authors discover that OOD images form distinct, geometrically separable Gaussian priors within the latent space of a frozen model. This allows for the synthesis of entirely new images from unseen domains—such as astrophysical data—without altering model parameters or degrading original performance.
What Problem Does This Paper Address?
State-of-the-art diffusion models (like Stable Diffusion or Imagen) generate stunning images because they are trained on massive datasets. However, adapting these models to novel, data-sparse domains (e.g., scientific imagery like astrophysics or medical scans) remains a major challenge.
The standard approach is fine-tuning, but it suffers from severe drawbacks:
- Catastrophic Degradation: Modifying model parameters often ruins the model's ability to generate high-quality images from its original training domain.
- Mode Interference: When the domain shift is large, the fine-tuned model's trajectories often collapse back into the original training distribution.
- Resource Intensity: Fine-tuning giant models requires massive computational resources, locking out many research groups.
The authors aim to solve this few-shot domain generalization problem by asking: Can we force a frozen diffusion model to generate images from a completely new domain simply by changing how we sample from its latent space?
Methods
The authors propose a latent sampling-centric approach that keeps the pre-trained diffusion model completely frozen. The pipeline consists of three main steps:
- Deterministic Inversion: Using Denoising Diffusion Implicit Models (DDIM) inversion, a small set of raw target OOD images ($N \approx 1000$) is mapped backward into the model's intermediate noisy latent spaces ($X_T$).
- Prior Discovery: The authors mathematically and empirically prove that these inverted OOD latents form approximate Gaussian distributions ($\mathcal{N}(\mu, \sigma^2)$) in the high-dimensional latent space. Crucially, due to the geometry of high-dimensional spaces, this OOD prior is separable from the standard Gaussian prior ($\mathcal{N}(0, I)$) of the original in-domain (ID) data.
- Latent Interpolation & Denoising: To generate new OOD samples, they perform latent interpolation between pairs of these inverted OOD encodings. These newly sampled latents are then fed through the standard DDIM deterministic denoising trajectory to produce novel images belonging to the target domain.
Datasets
The base diffusion models were trained on single-domain natural image datasets:
- AFHQ-Dog (Animal Faces High-Quality - Dogs)
- CelebA-HQ (Human Faces)
- LSUN-Church & LSUN-Bedroom
To test domain generalization, they evaluated performance on several OOD target domains, including natural images (e.g., transferring a dog model to generate cats or human faces) and two complex scientific datasets:
- GalaxyZoo: Real astronomical observations of galaxies categorized by morphology (elliptical, spiral, etc.).
- Radiation Simulation Data: Physical simulation data of dust emissions and radiation fields in molecular clouds.
Key Insights and Ideas
- Representation $\neq$ Generation: A surprising "aha moment" is that a diffusion model trained on a narrow domain (like dog faces) already possesses the inherent representation capacity to perfectly reconstruct completely unrelated images (like galaxies or churches) via deterministic inversion. The knowledge is already inside the model; the trick is accessing it.
- The Geometry of High Dimensions to the Rescue: In a high-dimensional space (e.g., $d \approx 196,608$ for a $256 \times 256 \times 3$ image), random vectors from an isotropic Gaussian almost always form an equilateral triangle and are nearly orthogonal. The authors exploit this property to show that OOD latents cluster into an annulus that is physically separated from the ID latent space, preventing "mode interference" during deterministic denoising.
- Counter-Intuitive Domain Gaps: Standard machine learning logic suggests that a smaller domain gap makes generalization easier. Here, the opposite is true: a larger domain gap makes the OOD prior easier to separate from the ID prior, reducing the risk that the model accidentally generates an in-domain image.
Key Results
The sampling-based method successfully generates high-quality OOD images across various domains without changing a single weight of the base model.
- Quantitative Performance (Natural Images): As shown in the evaluation table below, the proposed method significantly outperforms vanilla fine-tuning and achieves competitive FID scores against CLIP-guided tuning methods, all while being entirely tuning-free and taking negligible computational time once inverted.
- Scientific Application: For the highly complex astrophysical datasets (Galaxy and Radiation), vanilla and CLIP-guided tuning failed to generate scientifically meaningful structures. The proposed method achieved high Mean Opinion Scores (MOS) from professional astrophysicists (2.88 for Galaxy, 1.52 for Radiation), proving its utility in data-sparse scientific fields.
Limitations and Future Work
- Dependence on Reference Samples: The method requires a small set of raw target images ($N \approx 800-1000$) to perform the initial inversion and define the OOD latent space boundaries. It cannot generate OOD data completely from scratch or from text prompts alone.
- Diversity Bound by Interpolation: Because new samples are generated via interpolation between known OOD latents, the diversity of the generated images is fundamentally bounded by the convex hull of the provided reference dataset.
- Strict Determinism: The method relies heavily on deterministic trajectories ($\eta = 0$). Introducing stochasticity during the denoising process easily triggers mode interference, causing the generated images to collapse back into the original training domain. Future work will explore how to safely introduce stochastic variations to boost generation diversity.
Summary updated