Privacy-Preserving Diffusion Model Using Homomorphic Encryption

Yaojian Chen,Qiben Yan
2024-03-09
Abstract:In this paper, we introduce a privacy-preserving stable diffusion framework leveraging homomorphic encryption, called HE-Diffusion, which primarily focuses on protecting the denoising phase of the diffusion process. HE-Diffusion is a tailored encryption framework specifically designed to align with the unique architecture of stable diffusion, ensuring both privacy and functionality. To address the inherent computational challenges, we propose a novel min-distortion method that enables efficient partial image encryption, significantly reducing the overhead without compromising the model's output quality. Furthermore, we adopt a sparse tensor representation to expedite computational operations, enhancing the overall efficiency of the privacy-preserving diffusion process. We successfully implement HE-based privacy-preserving stable diffusion inference. The experimental results show that HE-Diffusion achieves 500 times speedup compared with the baseline method, and reduces time cost of the homomorphically encrypted inference to the minute level. Both the performance and accuracy of the HE-Diffusion are on par with the plaintext counterpart. Our approach marks a significant step towards integrating advanced cryptographic techniques with state-of-the-art generative models, paving the way for privacy-preserving and efficient image generation in critical applications.
Cryptography and Security,Artificial Intelligence
What problem does this paper attempt to address?
The problem addressed in this paper is how to achieve efficient inference in a stable diffusion model while protecting user privacy. The paper "Privacy-preserving Diffusion with Homomorphic Encryption" presents a privacy-preserving diffusion framework called HE-Diffusion, which utilizes homomorphic encryption technology. This framework focuses on the denoising phase of the diffusion process, ensuring partial encryption of images without sacrificing output quality and reducing computational overhead. To address the computational challenges of homomorphic encryption, a novel minimal distortion method is proposed in the paper to achieve efficient partial image encryption. Additionally, the use of sparse tensor representation accelerates computational operations and improves the overall efficiency of the privacy-preserving diffusion process. Experimental results show that HE-Diffusion is 500 times faster than baseline methods, reducing the time cost of homomorphic encryption inference to the level of minutes. HE-Diffusion performs comparably to the plaintext version in terms of performance and accuracy. This approach represents an important step in combining advanced cryptographic techniques with state-of-the-art generative models, paving the way for privacy-preserving and efficient image generation, especially in sensitive applications such as healthcare, personal security, and confidential design.