用混合加密实现私密高效推理,速度比现有方案快1.5到10.5倍。
Practical and Private Hybrid ML Inference with Fully Homomorphic Encryption
- 服务器加密计算线性层,客户端明文处理非线性层,避免复杂刷新
- 支持精确激活函数,推理延迟降低1.5至10.5倍,通信开销可控
- 适合对数据隐私和推理效率有要求的云服务场景
在当前基于云的服务中,保护用户敏感数据并确保服务器模型机密性至关重要。全同态加密(FHE)可直接对加密输入进行推理,但其实际应用受限于昂贵的刷新操作及非线性激活函数的低效近似。我们提出Safhire,一种混合推理框架:服务器在加密状态下执行线性层,客户端在明文下处理非线性层。该设计消除了刷新需求,支持精确激活函数,并显著降低计算开销。为防止客户端通过中间输出反推模型,Safhire引入随机打乱机制,有效混淆中间值,使模型重构在实践中几乎不可能。为进一步降低延迟,Safhire采用快速密文打包与部分提取等优化。在多个标准模型和数据集上的评估表明,Safhire相比Orion(最先进的基线)推理延迟降低1.5至10.5倍,通信开销合理,准确率相当,验证了混合FHE推理的实用性。
原文摘要 · Abstract (English)
In contemporary cloud-based services, protecting users' sensitive data and ensuring the confidentiality of the server's model are critical. Fully homomorphic encryption (FHE) enables inference directly on encrypted inputs, but its practicality is hindered by expensive bootstrapping and inefficient approximations of non-linear activations. We introduce Safhire, a hybrid inference framework that executes linear layers under encryption on the server while offloading non-linearities to the client in plaintext. This design eliminates bootstrapping, supports exact activations, and significantly reduces computation. To safeguard model confidentiality despite client access to intermediate outputs, Safhire applies randomized shuffling, which obfuscates intermediate values and makes it practically impossible to reconstruct the model. To further reduce latency, Safhire incorporates advanced optimizations such as fast ciphertext packing and partial extraction. Evaluations on multiple standard models and datasets show that Safhire achieves 1.5X - 10.5X lower inference latency than Orion, a state-of-the-art baseline, with manageable communication overhead and comparable accuracy, thereby establishing the practicality of hybrid FHE inference.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。