Skip to main content
QUICK REVIEW

[Paper Review] Structural Pruning for Diffusion Models

Gongfan Fang, Xinyin Ma|arXiv (Cornell University)|May 18, 2023
Music and Audio ProcessingComputer Science17 citations
TL;DR

Diff-Pruning is a Taylor-expansion-based structural pruning method that compresses pre-trained diffusion models by pruning timesteps and weights, achieving about 50% FLOPs reduction with only 10–20% of original training cost while preserving generative behavior.

ABSTRACT

Generative modeling has recently undergone remarkable advancements, primarily propelled by the transformative implications of Diffusion Probabilistic Models (DPMs). The impressive capability of these models, however, often entails significant computational overhead during both training and inference. To tackle this challenge, we present Diff-Pruning, an efficient compression method tailored for learning lightweight diffusion models from pre-existing ones, without the need for extensive re-training. The essence of Diff-Pruning is encapsulated in a Taylor expansion over pruned timesteps, a process that disregards non-contributory diffusion steps and ensembles informative gradients to identify important weights. Our empirical assessment, undertaken across several datasets highlights two primary benefits of our proposed method: 1) Efficiency: it enables approximately a 50\% reduction in FLOPs at a mere 10\% to 20\% of the original training expenditure; 2) Consistency: the pruned diffusion models inherently preserve generative behavior congruent with their pre-trained models. Code is available at \url{https://github.com/VainF/Diff-Pruning}.

Motivation & Objective

  • Motivate the need for compressing diffusion probabilistic models (DPMs) to reduce training and inference overhead.
  • Propose a dedicated pruning method (Diff-Pruning) tailored to diffusion models.
  • Develop a Taylor-expansion based criterion to identify important weights and pruned timesteps.
  • Demonstrate that pruning can preserve or even improve generative quality and consistency across diverse datasets.

Proposed method

  • Model pruning as removing entire weight sub-structures to obtain a sparse parameter matrix.
  • Use Taylor expansion of per-timestep losses L_t to estimate the importance of parameters and aggregate influence across timesteps (Equation 7 variant).
  • Introduce a timestep-aware pruning by selecting pruned timesteps via a thresholding mechanism on the relative loss L_t/L_max (Equation 9/10).
  • Accumulate gradients over partial timesteps to compute a robust importance score for each parameter (Equation 10).
  • Apply one-shot pruning to a pre-trained diffusion model, followed by finetuning on the target dataset.
  • Evaluate efficiency (parameters, MACs), quality (FID), and consistency (SSIM) across multiple datasets (CIFAR-10, CelebA-HQ, LSUN, ImageNet-1K).
Figure 1 : Diff-Pruning leverages Taylor expansion at pruned timesteps to estimate the importance of weights, where early steps focus on local details like edges and color and later ones pay more attention to contents such as object and shape. We propose a simple thresholding method to trade off the
Figure 1 : Diff-Pruning leverages Taylor expansion at pruned timesteps to estimate the importance of weights, where early steps focus on local details like edges and color and later ones pay more attention to contents such as object and shape. We propose a simple thresholding method to trade off the

Experimental results

Research questions

  • RQ1Can structural pruning accurately identify and remove redundant components in diffusion models without extensive re-training?
  • RQ2How does pruning timesteps versus weights affect diffusion model content vs. detail generation?
  • RQ3What are the trade-offs between pruning ratio, recovery effort, and generated sample quality across datasets and model types (DDPMs, LDMs)?

Key findings

  • Diff-Pruning achieves substantial compression with about 50% FLOPs reduction while using only 10%–20% of the original training cost.
  • Pruned models preserve, and in some cases improve, generative behavior and sample consistency with the pre-trained models (e.g., 0.5M vs 4.4M training steps on LSUN Church).
  • Timesteps contributing to content are not exclusively at the end of diffusion; pruning requires weighting by timestep importance to balance contents and details.
  • Full Taylor expansion over all timesteps can accumulate noisy gradients; using a thresholded partial Taylor expansion improves pruning accuracy.
  • On LSUN Church/Bedroom and ImageNet-1K-LDMs, pruned models achieve competitive FID/SSIM with substantially fewer parameters and MACs compared to baselines.
  • Diff-Pruning consistently outperforms random, magnitude, and naïve Taylor pruning across CIFAR-10 and CelebA-HQ.
Figure 2 : Generated images of the pre-trained models [ 18 ] (left) and the pruned models (right) on LSUN Church and LSUN Bedroom. SSIM measures the similarity between generated images.
Figure 2 : Generated images of the pre-trained models [ 18 ] (left) and the pruned models (right) on LSUN Church and LSUN Bedroom. SSIM measures the similarity between generated images.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.