Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
194 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Structural Pruning for Diffusion Models (2305.10924v3)

Published 18 May 2023 in cs.LG, cs.AI, and cs.CV

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}.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (53)
  1. Segdiff: Image segmentation with diffusion probabilistic models. arXiv preprint arXiv:2112.00390, 2021.
  2. Diffusiondet: Diffusion model for object detection. arXiv preprint arXiv:2211.09788, 2022.
  3. Towards automatic neural architecture search within general super-networks. arXiv preprint arXiv:2305.18030, 2023.
  4. Otov2: Automatic, generic, user-friendly. arXiv preprint arXiv:2303.06862, 2023.
  5. Towards efficient model compression via learned global ranking. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 1518–1528, 2020.
  6. Centripetal sgd for pruning very deep convolutional networks with complicated structure. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 4943–4953, 2019.
  7. Learning to prune deep neural networks via layer-wise optimal brain surgeon. Advances in Neural Information Processing Systems, 30, 2017.
  8. Depgraph: Towards any structural pruning. The IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2023.
  9. Gerald B Folland. Higher-order derivatives and taylor’s formula in several variables. Preprint, pages 1–4, 2005.
  10. The lottery ticket hypothesis: Finding sparse, trainable neural networks. arXiv preprint arXiv:1803.03635, 2018.
  11. Efficient diffusion training via min-snr weighting strategy. arXiv preprint arXiv:2303.09556, 2023.
  12. Oms-dpm: Optimizing the model schedule for diffusion probabilistic models. International Conference on Machine Learning, 2023.
  13. Cap: Context-aware pruning for semantic segmentation. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pages 960–969, 2021.
  14. Filter pruning via geometric median for deep convolutional neural networks acceleration. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 4340–4349, 2019.
  15. Amc: Automl for model compression and acceleration on mobile devices. In Proceedings of the European conference on computer vision (ECCV), pages 784–800, 2018.
  16. Channel pruning for accelerating very deep neural networks. In Proceedings of the IEEE international conference on computer vision, pages 1389–1397, 2017.
  17. Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in neural information processing systems, 30, 2017.
  18. Denoising diffusion probabilistic models. Advances in Neural Information Processing Systems, 33:6840–6851, 2020.
  19. Subspace diffusion generative models. In Computer Vision–ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23–27, 2022, Proceedings, Part XXIII, pages 274–289. Springer, 2022.
  20. Yongcheng Jing. Efficient Representation Learning With Graph Neural Networks. PhD thesis, 2023.
  21. Learning multiple layers of features from tiny images. 2009.
  22. A signal propagation perspective for pruning neural networks at initialization. arXiv preprint arXiv:1906.06307, 2019.
  23. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016.
  24. Gan compression: Efficient architectures for interactive conditional gans. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 5284–5294, 2020.
  25. Group fisher pruning for practical network compression. In International Conference on Machine Learning, pages 7021–7032. PMLR, 2021.
  26. Pseudo numerical methods for diffusion models on manifolds. arXiv preprint arXiv:2202.09778, 2022.
  27. The unreasonable effectiveness of random pruning: Return of the most naive baseline for sparse training. In International Conference on Learning Representations, ICLR 2022, 2022.
  28. Learning efficient convolutional networks through network slimming. In Proceedings of the IEEE international conference on computer vision, pages 2736–2744, 2017.
  29. Large-scale celebfaces attributes (celeba) dataset. Retrieved August, 15(2018):11, 2018.
  30. Thinet: A filter level pruning method for deep neural network compression. In Proceedings of the IEEE international conference on computer vision, pages 5058–5066, 2017.
  31. Accelerating diffusion models via early stop of the diffusion process. arXiv preprint arXiv:2205.12524, 2022.
  32. Importance estimation for neural network pruning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 11264–11272, 2019.
  33. Improved denoising diffusion probabilistic models. In International Conference on Machine Learning, pages 8162–8171. PMLR, 2021.
  34. Lookahead: a far-sighted alternative of magnitude-based pruning. arXiv preprint arXiv:2002.04809, 2020.
  35. Wavelet diffusion models are fast and scalable image generators. arXiv preprint arXiv:2211.16152, 2022.
  36. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 2022.
  37. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10684–10695, 2022.
  38. U-net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention–MICCAI 2015: 18th International Conference, Munich, Germany, October 5-9, 2015, Proceedings, Part III 18, pages 234–241. Springer, 2015.
  39. Progressive distillation for fast sampling of diffusion models. arXiv preprint arXiv:2202.00512, 2022.
  40. Movement pruning: Adaptive sparsity by fine-tuning. Advances in Neural Information Processing Systems, 33:20378–20389, 2020.
  41. Unit-ddpm: Unpaired image translation with denoising diffusion probabilistic models. arXiv preprint arXiv:2104.05358, 2021.
  42. Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502, 2020.
  43. Ppcd-gan: Progressive pruning and class-aware distillation for large-scale conditional gans compression. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 2436–2444, 2022.
  44. Diffusers: State-of-the-art diffusion models. https://github.com/huggingface/diffusers, 2022.
  45. Patch diffusion: Faster and more data-efficient training of diffusion models. arXiv preprint arXiv:2304.12526, 2023.
  46. Image quality assessment: from error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4):600–612, 2004.
  47. Diffusion probabilistic model made slim. arXiv preprint arXiv:2211.17106, 2022.
  48. Joint-detnas: upgrade your detector with nas, pruning and dynamic distillation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10175–10184, 2021.
  49. Rethinking the smaller-norm-less-informative assumption in channel pruning of convolution layers. arXiv preprint arXiv:1802.00124, 2018.
  50. Gate decorator: Global filter pruning method for accelerating deep convolutional neural networks. Advances in neural information processing systems, 32, 2019.
  51. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365, 2015.
  52. Adding conditional control to text-to-image diffusion models. arXiv preprint arXiv:2302.05543, 2023.
  53. A survey on model compression for large language models. arXiv preprint arXiv:2308.07633, 2023.
Citations (83)

Summary

  • The paper introduces Diff-Pruning, a novel method that reduces FLOPs by up to 50% with minimal impact on diffusion model performance.
  • It employs Taylor expansion to selectively prune non-essential timesteps, avoiding the need for heavy retraining.
  • The approach preserves key generative features across datasets, enabling efficient deployment in resource-constrained environments.

Structural Pruning for Diffusion Models

The paper introduces a novel approach to optimizing diffusion probabilistic models (DPMs) called Diff-Pruning. As an expert in generative modeling and diffusion models, the paper's significance lies in its technical approach to both reducing the computational cost of DPMs and addressing the complexities involved in maintaining model performance post-compression.

Overview

Diff-Pruning is an efficient structural pruning strategy developed to compress diffusion models without heavy retraining. It aims to specifically target and remove non-essential components in DPMs which often demand high computational resources both during training and inference. Diffusion Probabilistic Models have established their utility across a range of applications including image generation, edification, and other generative tasks, yet their computationally expensive nature makes them less practical for wide adoption, especially in environments constrained by resources.

Technical Contributions

The core mechanism of Diff-Pruning is the Taylor expansion over pruned timesteps, which allows the method to identify which diffusion steps can be pruned with minimal impact on the model's performance. The pruning approach is not arbitrary; by focusing on the timesteps that contribute least to the diffusion process, the algorithm is able to maintain the integrity of the original model's generative capabilities. This methodological rigor brings twofold benefits:

  1. Efficiency: The proposed method achieves up to a 50% reduction in FLOPs, significantly decreasing the computational burden without requiring extensive retraining.
  2. Consistency: The pruned models retain a high degree of generative similarity to pre-trained models, ensuring that the higher-level content and nuanced details in the generated samples remain intact.

In addition to addressing efficiency concerns, the method preserves the large-scale pretraining benefits within diffusion models, thereby enabling more accessible application in varied domains without sacrificing performance.

Results and Implications

The empirical evaluation of Diff-Pruning is conducted across multiple datasets and showcases significant reductions in computational costs while maintaining generative quality. For instance, the approach compresses models with only a small fraction of the original training cost yet preserves the fidelity of the generated outputs. In specific experiments, models trained on LSUN Church datasets demonstrate robust results with reduced FLOPs and comparable or improved FID scores relative to models trained from scratch, underscoring the method's effectiveness.

From a theoretical and practical standpoint, the introduction of Diff-Pruning proposes new avenues for the efficient deployment of generative models across constrained environments. It suggests the possibility of further structural optimizations in generative models beyond traditional approaches. The utilization of Taylor expansions to guide pruning decisions makes Diff-Pruning a baseline for future techniques aiming at efficient compression.

Future Directions

The paper sets the foundation for further developments in the efficient compression of diffusion models. Future research could explore extending the pruning methodology to a broader range of generative models, investigating more dynamic pruning strategies that could adjust adaptively during the generative process. Moreover, enhancing the robustness of these approaches to ensure consistency in real-world scenarios will be integral to maximizing the practical applications of DPMs.

In conclusion, Diff-Pruning represents a significant step towards making powerful generative models more computationally accessible while preserving their functional strengths. It models a baseline pruning approach that can inspire further innovations in the field of efficient diffusion models, potentially widening the scope of applications in resource-limited settings.

Github Logo Streamline Icon: https://streamlinehq.com