利用非结构化稀疏性在全同态加密深度神经网络中的应用

Exploiting Unstructured Sparsity in Fully Homomorphic Encrypted DNNs

摘要 Abstract

在隐私敏感环境中部署深度神经网络(DNN)受到全同态加密(FHE)计算开销的限制。本文探索了FHE矩阵乘法方案中的非结构化稀疏性,作为一种在保持模型精度要求的同时减轻这一负担的方法。我们证明了稀疏性可以在任意矩阵乘法中被利用,在所有稀疏水平上相比基准的简单算法提供运行时优势。这与明文域的情况形成了显著对比,在明文域中稀疏性和稀疏乘法算法的开销之间存在权衡。此外,我们基于常见的明文稀疏编码提出了三种FHE中的稀疏乘法方案。我们证明了性能提升对方案不变;然而,在高稀疏值下,某些稀疏方案极大地减少了加密矩阵的内存存储需求。我们提出的稀疏方案在50%非结构化稀疏性下平均性能提升2.5倍,而我们的多线程方案在使用64个核心时比等效的单线程稀疏计算性能提升32.5倍。

The deployment of deep neural networks (DNNs) in privacy-sensitive environments is constrained by computational overheads in fully homomorphic encryption (FHE). This paper explores unstructured sparsity in FHE matrix multiplication schemes as a means of reducing this burden while maintaining model accuracy requirements. We demonstrate that sparsity can be exploited in arbitrary matrix multiplication, providing runtime benefits compared to a baseline naive algorithm at all sparsity levels. This is a notable departure from the plaintext domain, where there is a trade-off between sparsity and the overhead of the sparse multiplication algorithm. In addition, we propose three sparse multiplication schemes in FHE based on common plaintext sparse encodings. We demonstrate the performance gain is scheme-invariant; however, some sparse schemes vastly reduce the memory storage requirements of the encrypted matrix at high sparsity values. Our proposed sparse schemes yield an average performance gain of 2.5x at 50% unstructured sparsity, with our multi-threading scheme providing a 32.5x performance increase over the equivalent single-threaded sparse computation when utilizing 64 cores.

利用非结构化稀疏性在全同态加密深度神经网络中的应用 - arXiv