Mean-Shift Distillation for Diffusion Mode Seeking

Vikas Thamizharasan, Nikitas Chatzis, Iliyan Georgiev, Matthew Fisher, Evangelos Kalogerakis, Difan Liu, Nanxuan Zhao, Michal Lukáč

TL;DR

This paper introduces "Mean-Shift Distillation" (MSD), a novel diffusion distillation technique that offers a more accurate and stable way to optimize image generation models. MSD directly targets the modes of the data distribution, overcoming the "phantom modes" and high variance issues plaguing existing methods like Score Distillation Sampling (SDS), leading to higher-fidelity results.

What Problem Does This Paper Address?

Diffusion models have become incredibly powerful for generating realistic images. However, a key challenge is optimizing parameters to produce images that are not just plausible but also faithful to a specific distribution, often guided by text prompts. Traditional methods like Score Distillation Sampling (SDS) attempt to achieve this by approximating the gradient of the data distribution. Unfortunately, SDS suffers from significant bias and variance, leading to blurry outputs and "phantom modes" – artifacts that appear to be modes but are actually outside the true data distribution. This makes it difficult to reliably generate high-quality, mode-aligned content, especially in complex, high-dimensional settings like image generation.

Methods

The core contribution is Mean-Shift Distillation (MSD). The authors reframe diffusion distillation as a mode-seeking problem. They leverage the mathematical connection between the mean-shift vector (a well-established technique for finding modes in a distribution) and the gradient of a smoothed data density.

Key aspects of their method include:

  • Mean-Shift Gradient Approximation: They derive a theoretical link between the mean-shift vector and the gradient of a smoothed data density. This vector is shown to be aligned with the true gradient and has zeros at the modes of the distribution, providing a natural convergence criterion.
  • Efficient Product Distribution Sampling: To estimate this mean-shift vector without direct access to the data distribution or its gradient, they propose a novel sampling procedure. This involves sampling from a "product density" formed by the diffusion model's density and a Gaussian kernel. This is achieved by modifying the diffusion model's score function.
  • Drop-in Replacement for SDS: MSD is designed to be a direct replacement for SDS. It requires minimal changes to the existing diffusion sampling pipeline and does not necessitate retraining the diffusion model.
  • Practical Heuristics: To address numerical instabilities that arise in high-dimensional settings (especially with high classifier-free guidance values), they introduce two practical heuristics: applying guidance within a limited interval and scaling the kernel term based on the time step.

Datasets

The paper evaluates MSD on several datasets:

  • Synthetic 2D Toy Datasets: Including a fractal-like dataset and other challenging 2D densities (Spiral, Pinwheel) to demonstrate theoretical properties in a controlled environment. These datasets are used to compare MSD against baselines like DDIM, SDS, VSD, and SDI.
  • Text-to-2D Generation: Using prompts from existing benchmarks to generate images with Stable Diffusion.
  • Text-to-3D Generation: Using prompts to generate 3D representations (NeRFs) with Stable Diffusion.

No new benchmarks were introduced; instead, existing datasets and prompts were used to showcase the method's effectiveness.

Key Insights and Ideas

  • Diffusion Distillation as Mode Seeking: The fundamental insight is reframing the problem of optimizing for data fidelity not just as gradient ascent, but as actively seeking the modes of the data distribution.
  • Mean-Shift as a Provably Better Proxy: The paper provides a theoretical justification for why mean-shift is a superior proxy for the data distribution gradient compared to SDS, particularly in its alignment with modes and reduced variance.
  • Product Density Sampling Trick: The clever use of a modified score function to sample from a product density is a key algorithmic innovation that makes the mean-shift estimation practical.
  • Heuristics for Stability: The practical heuristics for handling numerical instability in high-dimensional settings are crucial for making the method work with real-world diffusion models.

Key Results

  • Improved Mode Alignment: MSD consistently shows better alignment with the true data distribution modes compared to SDS and other baselines, as visualized in the loss landscapes and quantitative metrics.
  • Reduced Variance: The method exhibits significantly lower gradient variance than SDS, leading to more stable and faster convergence.
  • Higher Fidelity Results: In both synthetic and practical text-to-image/3D generation tasks, MSD produces more realistic and higher-fidelity outputs. For text-to-2D, it achieved better FID scores than SDS, VSD, and SDI.
  • Efficiency: While MSD might require more score function evaluations per step, its overall efficiency (measured by a normalized MSE and cost metric) is significantly higher than SDS and VSD, and comparable to SDI.

Limitations and Future Work

  • Numerical Instability: The paper acknowledges that while heuristics are introduced, numerical instability remains a challenge in high-dimensional settings, particularly with large score magnitudes.
  • Heuristic Dependence: The current implementation relies on ad-hoc heuristics (limited guidance interval, kernel scaling) to achieve stability.
  • Future Work: The authors suggest exploring adaptive bandwidth annealing strategies and improving the integration and/or sampling procedures to obviate the need for heuristics. They also hope for future work to further improve the integration and sampling process.

Summary updated

BibTeX
@inproceedings{thamizharasan2026mean,
  author = {Vikas Thamizharasan and Nikitas Chatzis and Iliyan Georgiev and Matthew Fisher and Evangelos Kalogerakis and Difan Liu and Nanxuan Zhao and Michal Lukáč},
  title = {{Mean-Shift Distillation for Diffusion Mode Seeking}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2026},
}
Figure