[论文解读] Privacy-Preserving Diffusion Model Using Homomorphic Encryption
该论文提出 HE-Diffusion,一种隐私保护的稳定扩散框架,利用同态加密(HE)对加密数据进行安全推理,重点聚焦于去噪阶段。通过结合部分加密与最小失真方法,以及稀疏张量表示,其在基线 HE 方法基础上实现了 500 倍的加速,将加密推理时间缩短至分钟级别,同时保持与明文模型相当的输出质量。
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.
研究动机与目标
- 解决稳定扩散模型推理中的隐私风险,即用户提示词和生成图像可能暴露给不可信服务器的问题。
- 在不损害模型准确率或性能的前提下,实现端到端加密推理,使用同态加密(HE)。
- 通过优化扩散模型中最计算密集的去噪阶段,克服深度学习中同态加密带来的高计算开销。
- 设计一种高效且实用的框架,使服务提供商能够在不访问敏感输入或输出的情况下对加密数据进行计算。
- 证明同态加密可有效集成到最先进生成模型中,适用于现实世界中对隐私敏感的应用场景。
提出的方法
- 提出 HE-Diffusion,一种专为稳定扩散架构量身定制的同态加密框架,重点聚焦于去噪阶段。
- 提出一种新颖的最小失真方法用于部分图像加密,以在保持模型输出质量的同时减少计算开销。
- 采用 COO 格式的稀疏张量表示,以加速同态计算并提升效率。
- 避免使用大多数非线性激活函数,以最小化近似误差,保持加密推理中的准确性。
- 采用基于代价函数的稀疏性策略(HILL)以提升效率,尽管未针对最大稀疏性进行优化。
- 使用 TenSeal 在 Python 中实现该框架,未来可通过 C++ 移植及进一步的稀疏计算优化实现性能提升。

实验结果
研究问题
- RQ1同态加密能否有效应用于稳定扩散模型的去噪阶段,以保护用户输入和输出的隐私?
- RQ2在复杂扩散模型中,如何在不牺牲输出质量的前提下缓解同态加密带来的高计算成本?
- RQ3部分加密与稀疏张量表示在多大程度上可降低基于 HE 的生成模型推理的性能开销?
- RQ4是否可能在确保端到端隐私的前提下,实现接近明文性能的加密稳定扩散推理?
- RQ5如何使先进密码学与最先进生成模型的集成在现实世界部署中变得切实可行?
主要发现
- HE-Diffusion 相较于基线同态加密方法实现了 500 倍加速,将加密推理时间缩短至分钟级别。
- 模型的输出质量与性能与明文稳定扩散模型相当,表明加密带来的性能退化可忽略不计。
- 基于最小失真的部分加密策略显著降低了计算开销,同时保持了图像保真度。
- 采用 COO 格式的稀疏张量表示加速了同态运算,显著提升了框架的整体效率。
- 该框架成功实现了安全推理,确保服务器始终无法访问未加密的提示词或生成图像。
- 该方法专门针对稳定扩散的去噪阶段进行优化,若不重新优化,难以直接迁移至其他模型架构。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。