Skip to main content
Back

A 1992 Fractal Algorithm Secretly Explains How Diffusion Models Work

A new theoretical framework recasts DDIM sampling as a fractal iteration system, deriving four popular design heuristics from three closed-form geometric quantities.

Pro

Paper, Full Access
  • The paper proves the deterministic DDIM reverse chain is a Partitioned Iterated Function System (PIFS).
  • Three closed-form quantities L*_t, f_t(λ), λ** fully characterize denoising dynamics without model evaluation.
  • The two-regime behavior of diffusion drops out geometrically: suppression release in strict patch-variance order.
  • Self-attention is shown to be the soft differentiable analogue of classical PIFS domain-range assignment.
  • Four heuristics (cosine offset, resolution shift, Min-SNR, Align Your Steps) derived as approximate solutions to three geometric criteria.
  • Empirical validation on google/ddpm-cifar10-32 and google/ddpm-celebahq-256; no code released.

A new theoretical paper argues that when a diffusion model turns pure noise into a photograph, it is doing something surprisingly close to what fractal image compression did in the early 1990s. The paper, titled Fractals made Practical, shows that the deterministic DDIM reverse chain is mathematically a Partitioned Iterated Function System (PIFS), and uses that identification to derive several empirical tricks (cosine schedule offsets, Min-SNR weighting, Align Your Steps) from first principles.

The black box nobody has cracked

Modern diffusion theory rests on continuous-time stochastic differential equations that give elegant convergence guarantees but treat the learned score network as a black box. This continuous perspective is elegant, but it treats the learned score network as a black-box, giving no real structural insight in how a discrete sampling chain assembles global spatial context at early steps and synthesises localised fine detail at later ones and why is self-attention so effective as a generative primitive.

Two questions have been left hanging: why do diffusion models split their work into a coarse-structure phase followed by a fine-detail phase, and why does self-attention happen to be the right architecture for that split? The paper answers both by identifying the exact geometric object the DDIM sampler is iterating.

Fractal compression, resurrected

A PIFS is a 1992 idea from Jacquin's fractal image compression work. Natural images do not exhibit global self-similarity as different regions of an image are typically unrelated, so a single IFS cannot represent them accurately. Jacquin showed that this limitation can be overcome by extending the Collage Theorem to a Partitioned IFS which works at patch level as natural images exhibit local self-similarity. Parts of an image look like shrunken, rotated versions of other parts, and a PIFS encodes each output patch as an affine map applied to some source patch elsewhere in the image.

The paper's core claim: each DDIM update step is exactly this kind of patch-level contraction, and the trained score network is implicitly learning the domain-to-range mapping that a fractal encoder would search for by hand.

Three numbers that describe everything

From the PIFS structure, the author extracts three quantities that fully characterize denoising dynamics without ever evaluating the model:

  • L*_t, the per-step contraction threshold. Depends only on the noise schedule.
  • f_t(λ), the diagonal expansion function. Tells you when a patch's own Jacobian block starts expanding rather than contracting.
  • λ**, the global expansion threshold, defined as the unique solution to a discrete Moran equation, borrowed from classical fractal geometry.

These quantities require no model evaluation and fully characterise the denoising dynamics. That is the practical hook: you can compute them from the schedule and the patch covariance spectrum of your dataset alone.

Why diffusion has two phases

The two-regime behavior of diffusion, observed empirically for years, drops out of the PIFS geometry. In the high-t regime, diffuse attention drives strong cross-patch coupling while a learned directional suppression field holds every diagonal block below an expansion threshold. In the low-t regime, attention localises and suppression is released patch by patch in strict variance order, giving each release a precise geometric signature.

Concretely: low-variance patches (smooth regions like sky) release first, high-variance patches (textured regions) release last. The empirical measurements bear this out. On CIFAR-10 with a pretrained DDPM checkpoint, the Spearman correlation between patch variance and the diagonal Rayleigh quotient reverses sign right in the crossover window, then flips back once every patch has released.

Self-attention as the natural primitive

The paper's second structural insight is that self-attention implements a soft, differentiable version of the classical PIFS domain-range search. Query tokens are range blocks; key and value tokens are domain blocks; the attention matrix is the soft domain-range assignment; and the value projection is the local map. In the hard-attention limit, the softmax collapses to a one-hot assignment and you recover the classical PIFS structure exactly.

Empirically, cross-patch coupling and attention entropy are perfectly inversely ranked (Spearman ρ = -1.000 across measured timesteps). As attention localizes going into the fine-detail regime, off-diagonal Jacobian mass drops accordingly.

Four heuristics explained from one framework

The most useful part of the paper is that four well-known empirical tricks now have a geometric derivation:

  1. The Nichol-Dhariwal cosine offset (s_off = 0.008). Increasing the offset raises L*_1 by a factor of roughly 4, fixing the weakest-link contraction step at the fine-detail end of the chain.
  2. The Hoogeboom resolution-dependent logSNR shift. Falls out of a Moran-equation symmetry: at higher resolution, patch variance scales as d^2, so the logSNR must shift by 2 log(d_base/d).
  3. Min-SNR loss weighting. The standard DSM loss over-weights high-noise steps where the KY dimension growth is near zero. Clamping SNR reweights toward fine-detail steps where the manifold assembly actually happens.
  4. Align Your Steps. The optimal step density is proportional to 1/L*(u), concentrating steps where contraction is hardest, which matches the low-noise concentration that AYS finds via KL minimization.

The empirical evidence

Validation is on pretrained DDPM checkpoints (google/ddpm-cifar10-32 and google/ddpm-celebahq-256). Some findings worth noting:

  • Every CIFAR-10 8x8 patch is Gaussian-expansion-forcing throughout the full T=1000-step chain, so the directional suppression field is what holds contraction together in Regime I.
  • The paired-difference proxy for score deviation from the Gaussian baseline scales as √α_t at high noise, with a fitted log-log slope of 0.95 (95% CI covers 1), matching the predicted O(√α_t).
  • On CelebA-HQ, the suppression-corrected Kaplan-Yorke prediction agrees with empirical Lyapunov exponents in sign across all 16 measured patches (16/16 agreement).

What is actually new here

The real contribution is not a new model or a new sampler. It is a design language: a set of closed-form geometric quantities you can plug into a spreadsheet to reason about schedules, loss weighting, and step allocation without training anything. The paper also proposes a PIFS collage regularizer that penalizes off-diagonal Jacobian blocks during training, computable in O(M²·n_k) JVP/VJP operations without materializing the full Jacobian, and provably widens the block-max contraction margin.

There is a Wasserstein-1 bridge showing that the score-matching objective controls the distance from the prior distribution to the PIFS fixed point at a rate proportional to the square root of the excess score risk. That gives training a fractal-geometric interpretation: score-matching is the diffusion analogue of Barnsley's collage minimization.

Limitations worth knowing

  • Results are stated exclusively for the deterministic DDIM sampler. Extension to stochastic DDPM sampling is left as future work.
  • Several sharp results (the Gaussian KY formula, the stratified release ordering) assume block-diagonal isotropic patch covariances. Non-Gaussian corrections come in through the suppression field but are approximated.
  • The paper does not release code. The empirical measurements use public HuggingFace DDPM checkpoints, but the JVP/VJP measurement protocol has to be reimplemented.
  • The attention Jacobian bound covers only the attention component of cross-patch coupling; UNet skip connections contribute a residual term that dominates at the finest resolution.

Who should care

If you train or design diffusion schedules and you have wondered why the community keeps rediscovering variants of the same handful of heuristics, this paper argues those heuristics are all approximate solutions to the same three geometric optimization problems. The framework gives you a principled way to compare schedules on a new dataset by computing L*_t, f_t, and λ** from patch statistics rather than by grid-searching FID on a 100-GPU cluster. Whether the PIFS regularizer actually improves sample quality in practice is the obvious next experiment, and the paper does not run it.