Source-linked AI summary

Diff-Instruct: A Universal Approach for Transferring Knowledge From Pre-trained Diffusion Models

Weijian Luo, Tianyang Hu, Shifeng Zhang, Jiacheng Sun, Zhenguo Li, Zhihua Zhang

arXiv:2305.18455v2cs.LGcs.CV

TL;DR

The paper asks how knowledge from pre-trained diffusion models can be transferred to other generative models without original training data, despite supervision challenges for implicit generators. It proposes Diff-Instruct, which uses Integral Kullback-Leibler divergence to instruct differentiable generators, and reports state-of-the-art single-step diffusion models plus consistent GAN-generator improvements. These results position Diff-Instruct as a data-free paradigm for transferring diffusion knowledge across generative-model classes.

  • Problem

    Transferring knowledge from pre-trained diffusion models to implicit generators without original data is challenging because implicit models lack explicit diffusion score information.

    Source: §1 · p. 2
  • Method

    Diff-Instruct instructs differentiable generative models by minimizing Integral Kullback-Leibler divergence along a diffusion process.

    Source: §1 · p. 2, §3 · pp. 3–4
  • Results

    Diff-Instruct achieves state-of-the-art single-step diffusion-based models and consistently improves pre-trained GAN generators across various settings.

    Source: §1 · p. 2
  • Takeaways & Limitations

    Diff-Instruct enables data-free knowledge transfer from pre-trained diffusion models into generic generators.

    Source: §5 · p. 10

    The work does not investigate using multiple instructor models or combining Diff-Instruct with real training data.

    Source: §5 · p. 10

Abstract

from arXiv · show

Due to the ease of training, ability to scale, and high sample quality, diffusion models (DMs) have become the preferred option for generative modeling, with numerous pre-trained models available for a wide variety of datasets. Containing intricate information about data distributions, pre-trained DMs are valuable assets for downstream applications. In this work, we consider learning from pre-trained DMs and transferring their knowledge to other generative models in a data-free fashion. Specifically, we propose a general framework called Diff-Instruct to instruct the training of arbitrary generative models as long as the generated samples are differentiable with respect to the model parameters. Our proposed Diff-Instruct is built on a rigorous mathematical foundation where the instruction process directly corresponds to minimizing a novel divergence we call Integral Kullback-Leibler (IKL) divergence. IKL is tailored for DMs by calculating the integral of the KL divergence along a diffusion process, which we show to be more robust in comparing distributions with misaligned supports. We also reveal non-trivial connections of our method to existing works such as DreamFusion, and generative adversarial training. To demonstrate the effectiveness and universality of Diff-Instruct, we consider two scenarios: distilling pre-trained diffusion models and refining existing GAN models. The experiments on distilling pre-trained diffusion models show that Diff-Instruct results in state-of-the-art single-step diffusion-based models. The experiments on refining GAN models show that the Diff-Instruct can consistently improve the pre-trained generators of GAN models across various settings.

1 Introduction

Diff-Instruct addresses the challenge of transferring knowledge from pre-trained diffusion models to other generative models without original training data. It provides a universal, mathematically grounded framework and demonstrates strong results for diffusion distillation and GAN improvement.

Motivation

  • Pre-trained models can provide useful knowledge when large amounts of high-quality training data are difficult to access.The paper frames model-driven learning as an efficient way to support new tasks with a base model that can be further improved.Source: §1 · p. 2
  • Knowledge transfer from diffusion models to implicit generators is difficult because implicit models lack the explicit multi-level score information used by diffusion models.Implicit generators are valued for flexibility and efficient generation, but receiving supervision from diffusion score networks is technically challenging.Source: §1 · p. 2

Method

  • Diff-Instruct instructs arbitrary implicit generative models whose generated samples are differentiable with respect to their parameters.The framework can operate across model types, including GAN generators and fixed-time U-Nets for single-step diffusion generation.Source: §1 · p. 2
  • Diff-Instruct directly minimizes Integral Kullback-Leibler divergence and connects to DreamFusion and generative adversarial training.The paper also identifies the SDS objective as a special case when the generator outputs a Dirac’s Delta distribution.Source: §1 · p. 2

Results

  • Diff-Instruct achieves state-of-the-art single-step diffusion-based models on ImageNet 64×64 and consistently improves pre-trained GAN generators across settings.The diffusion results span diffusion distillation and direct training baselines.Source: §1 · p. 2

2 Preliminary

The preliminary section contrasts explicit diffusion models with efficient but harder-to-train implicit models. It introduces their operating principles and motivates transferring diffusion-model knowledge to generators and differentiable renderers.

Diffusion models

  • Diffusion models transform data distributions toward simple noise through a forward diffusion process and learn marginal score functions.Samples are generated by simulating a stochastic differential equation using the learned score network.Source: §2 · p. 3
  • SDE simulation makes diffusion-model sampling significantly slower than sampling from implicit models.This speed difference motivates interest in transferring diffusion knowledge to more efficient generators.Source: §2 · p. 3

Generative adversarial networks

  • GANs map easy-to-sample latent vectors to data-space samples, enabling efficient generation but making training challenging through adversarial optimization.A discriminator distinguishes real and generated samples, while generator and discriminator objectives are optimized alternately.Source: §2 · p. 3
  • Certain GAN objectives correspond to minimizing divergences between generated and data distributions, including KL divergence.The paper later establishes an equivalence between KL-minimizing adversarial training and Diff-Instruct.Source: §2 · p. 3

Neural radiance fields

  • Neural radiance fields map mesh coordinates to volume properties, and differentiable rendering permits parameter updates from rendered two-dimensional images.This illustrates how differentiable generated outputs can receive external instruction.Source: §2 · p. 3

3 Diff-Instruct

Diff-Instruct transfers knowledge from pre-trained diffusion models to differentiable implicit generators without training data. It minimizes an Integral KL divergence across diffusion time levels to update the generator, supporting distillation and GAN refinement.

Optimization

  • The Diff-Instruct gradient updates generator parameters by integrating score-based instructions over diffusion time levels.The pipeline applies the resulting gradient to the generator, while the diffusion model acts as the teacher.Source: Figure 1 · p. 4, §3.1 · p. 5, §3.2 · p. 5

Instruction criterion

  • IKL integrates KL divergence across diffusion time levels, combining multi-level knowledge from the pre-trained diffusion model.The divergence is defined using marginal densities from the same diffusion process and is nonnegative, with equality only when the distributions match almost everywhere.Source: §3.1 · p. 4
  • IKL remains finite for some distributions with disjoint supports where vanilla KL divergence is infinite.This robustness motivates using diffusion processes to compare distributions whose supports are misaligned.Source: §3.1 · p. 5

Framework

  • Diff-Instruct trains an implicit generator to match a pre-trained diffusion model’s distribution without using training data.The generator samples are differentiated with respect to model parameters, and the pre-trained model supplies distributional knowledge through marginal score functions.Source: §3.2 · p. 5, §3.4 · pp. 6–7

Connections

  • For a generator producing a Dirac distribution, Diff-Instruct reduces to the score distillation sampling gradient used in DreamFusion.Under this assumption, no separate diffusion model is needed to estimate the generator’s marginal scores.Source: §3.3.1 · p. 6
  • Unlike adversarial training, Diff-Instruct uses a pre-trained diffusion model instead of a discriminator and can distill knowledge without real or synthetic data.The paper also contrasts IKL with KL-based degeneration and discusses potential advantages regarding mode-drop issues.Source: §3.3.2 · p. 6, §3.4 · pp. 6–7

Universality

  • Diff-Instruct supports diverse generator architectures, including CNN-, Transformer-, and U-Net-based generators, as well as GAN generators.Its experiments apply knowledge transfer to both U-Net-based and GAN generators.Source: §3 · p. 3, §3.4 · p. 7

4 Experiments

Experiments evaluate Diff-Instruct for data-free diffusion distillation and GAN improvement. It achieves competitive or state-of-the-art generation quality, faster convergence, and consistently improves pre-trained StyleGAN-2 generators.

4.1 Single-step diffusion distillation

  • Diff-Instruct distills pre-trained EDM models into single-step generators on CIFAR10 and ImageNet 64×64, evaluating FID and IS.FID is lower-is-better, while IS is higher-is-better.Source: §4.1 · p. 7, §4 · p. 7
  • On ImageNet 64×64, Diff-Instruct outperforms diffusion-based single-step models in FID, including methods using real data, synthetic data, or training from scratch.The comparison includes both diffusion distillation and direct-training methods.Source: §4.1 · p. 8
  • Without synthetic or real datasets, Diff-Instruct achieves competitive distillation performance across FFHQ-64, ImageNet-64, and CIFAR10.Figure 2 presents non-cherry-picked samples from one-step generators on these datasets.Source: Figure 2 · p. 8, §4.1 · p. 9
  • 1 NFE yields FID 4.19 versus 15.56 for the teacher at 10 NFEs, corresponding to at least 10+ times acceleration.The student uses the same UNet architecture as the teacher, so NFE represents inference-time cost.Source: §4.1 · p. 9
  • Diff-Instruct FID converges within 7k iterations, whereas consistency distillation does not converge in fewer than 7k iterations.The authors suggest that the one-step student avoids learning across multiple time indexes.Source: §4.1 · p. 9, Figure 3 · p. 9

4.2 Improving generative adversarial networks

  • Diff-Instruct consistently improves pre-trained StyleGAN-2 generators, reducing conditional FID from 2.42 to 2.27 and unconditional FID from 2.92 to 2.71.The experiments use pre-trained EDM models as instructors and StyleGAN-2 models initialized after adversarial training.Source: §4.2 · pp. 9–10

5 Discussion

Diff-Instruct is presented as a data-free paradigm for transferring knowledge from pre-trained diffusion models into generic generators. The discussion identifies unexplored extensions involving multiple instructors, real data, and teacher training from data alone.

  • Diff-Instruct enables data-free knowledge transfer from pre-trained diffusion models into generic generators.Source: §5 · p. 10
  • Using multiple pre-trained diffusion models as instructors remains an uninvestigated direction.Source: §5 · p. 10
  • The benefits of combining Diff-Instruct with real training data have not yet been explored.Source: §5 · p. 10
  • With data but no pre-trained diffusion model, the framework could be adapted by training a teacher diffusion model from data while instructing the student.Source: §5 · p. 10

A.1 Robustness of Integral KL divergence

This section argues that Integral KL divergence is more suitable than traditional KL divergence for gradient-based learning when distributions have misaligned supports. With suitable weighting, IKL becomes finite, differentiable, and reliably minimized at the correct parameter.

  • IKL is more robust to misaligned density support than traditional KL divergence.Source: §A.1 · p. 16
  • IKL remains finite and reliable for gradient-based training where traditional KL divergence fails to guide the generator to θ = 0.Source: §A.1 · p. 16
  • For the example distributions Pθ and P0, a suitable weighting makes IKL a differentiable quadratic with its sole minimum at θ = 0.Source: §A.1 · p. 16
  • The appendix compares IKL with KL divergence and Wasserstein distance, concluding that IKL better supports gradient-based optimization of θ.Source: §A.1 · p. 16, Table 5 · p. 17
  • In practice, Diff-Instruct uses an inverted U-shaped weighting function also used for training the pre-trained diffusion models.Source: §A.1 · p. 16

A.2 Proof of Theorem 3.3

The proof constructs the generator-induced distribution through the forward diffusion process and defines the teacher distribution using pre-trained diffusion-model scores. Under stated regularity assumptions, differentiation can pass through the spatial integral.

  • The generator distribution q(t) is represented by sampling z and Wiener-process trajectories, then evolving x0 = gθ(z) through the forward SDE.Source: §A.2 · p. 17
  • The teacher distribution p(t) is defined through the pre-trained diffusion model’s score functions sp(t).Source: §A.2 · p. 17
  • The proof decomposes the IKL derivative into terms and shows that term B vanishes.Source: §A.2 · pp. 17–18
  • Differentiating under the integral requires existence of the parameter derivative and an integrable dominating function.Source: §A.2 · p. 18
  • Common forward diffusion processes instantiate the trajectory with Gaussian noise as xt = α(t)x0 + β(t)ϵ.Source: §A.2 · p. 18

A.3 Proof of Corollary 3.4

The proof connects Diff-Instruct’s gradient to score distillation sampling when a differentiable generator outputs a single datum. With Gaussian forward diffusion and an ϵ-network, the resulting expression recovers DreamFusion’s SDS gradient.

  • When the generator distribution is a Dirac delta, its conditional and marginal distributions coincide, simplifying the score calculation.Source: §A.3 · p. 18
  • The general Diff-Instruct gradient reduces to the SDS gradient when the generator outputs a single differentiable datum.Source: §A.3 · pp. 18–19
  • Using xt = α(t)x0 + σ(t)ϵ and ϵp(x,t) := −sp(t)(xt)/σ(t), the objective recovers DreamFusion’s SDS gradient estimation.Source: §A.3 · pp. 18–19
  • A fixed-view NeRF can be interpreted as a generator producing a Dirac delta distribution, linking DreamFusion to approximated Diff-Instruct distillation.Source: §A.3 · p. 19

A.4 Proof of Corollary 3.5

The proof shows that, under an optimal discriminator, KL-minimizing adversarial training has the same gradient form as Diff-Instruct with a specific weight function.

  • With an optimal discriminator, adversarial training minimizes the KL divergence between the generator and data distributions.Source: §A.4 · p. 19
  • The resulting gradient uses the difference between data and generator score functions.The score functions are defined as sd(x)=∇xlogpd(x) and sg(x)=∇xlogpg(x).Source: §A.4 · p. 19
  • This gradient is equivalent to Diff-Instruct with w(0)=1 and w(t)>0 for all t>0.The equivalence depends on the discriminator being trained to optimality.Source: §A.4 · p. 19

A.4.1 Comparison of Distillation Methods

Table 6 compares diffusion distillation methods by training efficiency and flexibility, including whether the student must match the teacher's input-output dimensions.

  • Table 6 compares diffusion distillation methods using efficiency and flexibility as evaluation dimensions.Source: Table 6 · p. 19
  • Efficiency denotes the training efficiency of diffusion models.Source: Table 6 · p. 19
  • Flexibility denotes whether the student model must have the same input-output dimensions.Source: Table 6 · p. 19

B More on experiments

The experiments use pre-trained EDMs as instructors for transferring knowledge to implicit generators, including UNet and StyleGAN models, with evaluation procedures aligned to established codebases.

Experimental setup

  • EDMs are selected as instructors because they achieve state-of-the-art generative performance on benchmarks including CIFAR10 and ImageNet 64×64.Source: B More on experiments · pp. 19–20

Hyperparameters

  • Table 7 lists the hyperparameters used for Diff-Instruct diffusion distillation.Source: Table 7 · p. 20

Visualization

  • Figure 4 illustrates training with fixed latent vectors across changing generator weights and shows one-step samples distilled from a class-conditional CIFAR10 EDM.Source: Figure 4 · p. 20

Diffusion process

  • Forward-process samples are generated by adding Gaussian noise to generator outputs as xt=x0+σ(t)ϵ.Here ϵ∼N(0,I).Source: B More on experiments · p. 20

Experimental setup

  • The experiments transfer EDM knowledge to implicit generative models, specifically UNet and StyleGAN generators.Source: B More on experiments · p. 20

Evaluation

B.1 Detailed experimental settings of diffusion distillation

The detailed settings cover diffusion distillation and GAN improvement, including initialization, alternating optimization, computational costs, and representative generated-sample results.

Diffusion distillation

  • For UNet students, Diff-Instruct provides an alternative diffusion-distillation method competing with progressive and consistency distillation.Source: §B.1 · p. 20

Initialization

  • The generator can be initialized from a pre-trained diffusion model's score network through a Tweedie-based data-prediction transform at fixed time t∗.Source: §B.1 · p. 21
  • The initialized generator takes a zero-mean Gaussian latent vector with variance σ^2(t∗).Source: §B.1 · p. 21

Optimization

  • Diff-Instruct alternates updates to an auxiliary diffusion model and the generator, keeping the other model fixed during each update.This makes the backpropagation graph memory cost nearly that of one model.Source: §B.1 · p. 21

Computational costs

  • 10.40 over 9.55 peak GPU memory is reported for Diff-Instruct versus CD, while the method incurs only minor additional memory cost.Source: §B.1 · p. 21
  • 0.0728 seconds versus 0.0489 seconds per 1K iterations is reported for Diff-Instruct versus CD, corresponding to about 1.5 times CD's wall-clock time per iteration.Source: §B.1 · p. 21

Results

  • Figure 5 reports FIDs of 2.27, 2.71, 6.62, and 7.56 for the generated samples from left to right.Source: Figure 5 · p. 22

GAN improvement

  • GAN-improvement experiments use StyleGAN-2 generators and pre-trained VP-architecture EDMs on CIFAR10 under conditional and unconditional settings.Source: §B.2 · p. 22
Loading 2305.18455v2…