[论文解读] nGraph-HE: A Graph Compiler for Deep Learning on Homomorphically Encrypted Data
nGraph-HE 是 Intel nGraph 的图编译器扩展,可使深度学习模型在同态加密数据上运行,且代码修改极少。通过将同态加密视为第一类硬件目标,它在编译时和运行时应用 HE 优化,通过减少乘法深度和 HE-SIMD 打包,实现端到端隐私保护推理,最高可提升 1.2 倍性能。
Homomorphic encryption (HE)---the ability to perform computation on encrypted data---is an attractive remedy to increasing concerns about data privacy in deep learning (DL). However, building DL models that operate on ciphertext is currently labor-intensive and requires simultaneous expertise in DL, cryptography, and software engineering. DL frameworks and recent advances in graph compilers have greatly accelerated the training and deployment of DL models to various computing platforms. We introduce nGraph-HE, an extension of nGraph, Intel's DL graph compiler, which enables deployment of trained models with popular frameworks such as TensorFlow while simply treating HE as another hardware target. Our graph-compiler approach enables HE-aware optimizations-- implemented at compile-time, such as constant folding and HE-SIMD packing, and at run-time, such as special value plaintext bypass. Furthermore, nGraph-HE integrates with DL frameworks such as TensorFlow, enabling data scientists to benchmark DL models with minimal overhead.
研究动机与目标
- 为应对 GDPR 等法规带来的对隐私保护机器学习日益增长的需求。
- 降低在同态加密数据上部署深度学习模型的复杂性,当前该过程需要深度学习、密码学和系统编程方面的深厚专业知识。
- 使数据科学家能够通过最小修改,使用 TensorFlow 等熟悉框架将训练好的模型部署在加密数据上。
- 在图编译器栈中将同态加密作为第一类硬件目标集成,抽象低层次密码学复杂性。
- 通过编译时和运行时的 HE 优化,加速隐私保护推理。
提出的方法
- nGraph-HE 扩展了 Intel 的 nGraph 图编译器,将同态加密(HE)视为第一类硬件目标,支持在加密数据上部署模型。
- 它使用中间表示(IR)表示深度学习计算,并在编译时应用 HE 优化,如批量归一化折叠和 HE-SIMD 打包。
- 通过与 SEAL 库集成,支持多种 HE 方案,包括 BFV 和 CKKS,实现灵活部署。
- 在运行时支持特殊明文值绕过,避免对已知值进行不必要的加密,从而提升性能。
- 系统支持与 TensorFlow 等框架的端到端集成,允许通过极少代码修改完成模型转换——例如,仅需一行代码即可启用 HE 推理。
- 基于计算深度分析,实现 HE 安全参数的自动选择,未来可进一步实现编译时自动化。
实验结果
研究问题
- RQ1图编译器能否被扩展以在深度学习中将同态加密作为第一类硬件目标?
- RQ2如何在编译时和运行时有效应用 HE 优化,以提升加密数据上的性能?
- RQ3现有深度学习框架(如 TensorFlow)在多大程度上可被扩展以实现隐私保护推理,且代码修改极少?
- RQ4应用 HE 优化(如批量归一化折叠和 HE-SIMD 打包)时,会产生哪些性能与精度权衡?
- RQ5能否自动分析模型的计算深度,并用于指导 HE 安全参数的选择?
主要发现
- nGraph-HE 可在同态加密数据上部署训练好的深度学习模型,且代码修改极少,例如仅需添加一行代码即可启用 HE 推理。
- 通过批量归一化折叠减少乘法深度,实现最高 1.2 倍性能提升,从而减少密文模数数量并改善性能。
- HE-SIMD 打包支持每批最多 8192 张图像的批量推理,显著提升吞吐量和槽位利用率。
- 启用 BN 折叠后,CIFAR-10 网络的乘法深度从 10 降低至 8,可在保持精度的同时使用更低的安全级别(128 < λ < 192)。
- 即使在使用多项式激活和梯度裁剪以防止溢出的情况下,框架在多种配置下仍保持高精度(CIFAR-10 上为 62.2%)。
- CIFAR-10 推理的运行时间在 10 次试验中为 1321 秒至 1651 秒,平均每次图像的运行时间为 0.161–0.202 秒,证明了实际可行性。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。