Fast and Scalable Analytical Diffusion

Xinyi Shang, Peng Sun, Jingyu Lin, Zhiqiang Shen

Introduction

Analytical diffusion models offer a mathematically transparent alternative to the "black-box" neural networks that power modern generative AI (like Stable Diffusion). By using the training data itself to calculate the denoising score through an empirical Bayes approach, these models provide clear insights into their decision-making processes.

However, this interpretability comes at a prohibitive computational cost. To calculate the score for a single pixel, the standard formulation requires scanning the entire training dataset at every denoising step—an $O(ND)$ complexity. For large-scale datasets like ImageNet, this is computationally intractable. Previous attempts to mitigate this bottleneck relied on biased weighting tricks that kept the math stable but resulted in blurry, over-smoothed images.

In this work, we introduce GoldDiff (Dynamic Time-Aware Golden Subset Diffusion), a training-free framework that decouples inference complexity from dataset size, achieving up to a 71× speedup and enabling the first successful scaling of analytical diffusion to ImageNet-1K.

The GoldDiff Framework

GoldDiff overcomes the scalability bottleneck through a dynamic, coarse-to-fine retrieval mechanism built on four core pillars:

  1. Posterior Progressive Concentration: We uncover that the effective support of the denoising score is not static. As an image becomes less noisy (higher signal-to-noise ratio), the number of training samples needed to guide it shrinks asymptotically. High-noise stages require a broad, global view of the data manifold, while low-noise stages only need a few highly similar "neighbors."
  2. Coarse-to-Fine Retrieval: Instead of scanning the full dataset at high resolution, GoldDiff employs a two-step process:
  3. Coarse Screening: Quickly identifies a candidate pool ($m_t$) using spatially downsampled images.
  4. Precision Selection: Pinpoints the "Golden Subset" ($k_t$) from that pool using full-resolution distances.
  5. Counter-Monotonic Scheduling: The sizes of these subsets adapt dynamically over time. As noise decreases, the candidate pool ($m_t$) expands to ensure precision, while the final aggregation budget ($k_t$) shrinks to exploit the concentration of the posterior.
  6. Unbiased Weighting: Because the Golden Subset effectively filters out irrelevant "noise" from the dataset, GoldDiff can utilize a simple, unbiased softmax for weighting. This preserves high-frequency details that previous biased methods lost to over-smoothing.

Key Insights

  • The "Integration-to-Selection" Shift: The denoising process transitions fundamentally over time. Early on, the model acts as an integrator, averaging many samples to locate the general data manifold. Later, it shifts to a selector, focusing on specific nearest neighbors to refine intricate details.
  • Biased Softmax is the Enemy of Detail: Previous state-of-the-art methods (such as PCA-based analytical diffusion) used batch-level averaging to flatten weights. We demonstrate that this creates a "smoothing bias" detrimental to image quality. By filtering the support set first, GoldDiff maintains unbiased math and sharp image generation.
  • Hierarchical Consistency: Natural images share structural similarity across scales. This property allows low-resolution proxies to be sufficient for initial filtering, yielding massive computational savings without losing the true nearest neighbors.

Experimental Results

GoldDiff was rigorously evaluated across a spectrum of complexities, from grayscale datasets (MNIST) to high-resolution structured domains (AFHQv2, CelebA-HQ) and large-scale benchmarks (ImageNet-1K).

  • Massive Speedups: GoldDiff achieves a 71× speedup on the AFHQ dataset and a 28× speedup on CIFAR-10 compared to previous analytical baselines, matching or exceeding full-scan baseline performance.
  • State-of-the-Art Accuracy: The framework consistently outperforms previous SOTA models in Mean Squared Error (MSE) and $r^2$ alignment with ground-truth neural oracles.
  • Scaling Milestone: GoldDiff marks the first successful execution of analytical diffusion on ImageNet-1K (64×64), a feat previously deemed too computationally expensive.
  • Visual Quality: Qualitatively, GoldDiff generates images with significantly sharper details and better semantic coherence, avoiding the blurry or "patch-collage" artifacts common in prior analytical methods.

Limitations and Future Directions

While scaling to ImageNet-1K is a significant milestone, current experiments are constrained to 64×64 resolutions. Scaling analytical diffusion to megapixel-scale images remains an open challenge. Additionally, the schedules for $m_t$ and $k_t$ are currently empirical; deriving automated or theoretical schedules could further optimize performance. Finally, analytical scores show promise as "low-variance" targets for training neural networks faster, suggesting that "analytical-to-neural" knowledge transfer is a highly promising avenue for efficient diffusion model training.

Summary updated

BibTeX
@inproceedings{shang2026fast,
  author = {Xinyi Shang and Peng Sun and Jingyu Lin and Zhiqiang Shen},
  title = {{Fast and Scalable Analytical Diffusion}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=QgoRoKIEEr},
}
Figure