Skip to main content
QUICK REVIEW

[论文解读] TAPAS: Tricks to Accelerate (encrypted) Prediction As a Service

Amartya Sanyal, Matt J. Kusner|arXiv (Cornell University)|Jun 9, 2018
Cryptography and Data Security参考文献 30被引用 40
一句话总结

本文提出 TAPAS,一组在全同态加密上运行二值神经网络的技术,以实现快速加密预测服务,并具备隐私保障和多种加速技巧。

ABSTRACT

Machine learning methods are widely used for a variety of prediction problems. \emph{Prediction as a service} is a paradigm in which service providers with technological expertise and computational resources may perform predictions for clients. However, data privacy severely restricts the applicability of such services, unless measures to keep client data private (even from the service provider) are designed. Equally important is to minimize the amount of computation and communication required between client and server. Fully homomorphic encryption offers a possible way out, whereby clients may encrypt their data, and on which the server may perform arithmetic computations. The main drawback of using fully homomorphic encryption is the amount of time required to evaluate large machine learning models on encrypted data. We combine ideas from the machine learning literature, particularly work on binarization and sparsification of neural networks, together with algorithmic tools to speed-up and parallelize computation using encrypted data.

研究动机与目标

  • 在严格的客户数据隐私和最小化的客户端/服务器交互下,推动“预测即服务”。
  • 提出一个在带有 FHE 的加密数据上执行 ML 推断的框架,使用二值神经网络(BNN)。
  • 开发布尔电路和结构化技巧,以加速加密内积、激活和分批计算等运算。
  • 提供可实践并行化的方法,在不重新加密客户端数据的情况下更新模型,以及对加密计算进行裁剪以提升效率。

提出的方法

  • 使用基于 TFHE 的 FHE,支持二进制操作,在加密数据上执行 BNN 层。
  • 设计两个内积电路:reduce-tree 和 sorting-network;比较运行时以选择更高效的选项。
  • 通过 XNOR 再求和(popcount)实现加密内积,使用较浅的电路(reduce-tree 或 sorting network)。
  • 开发比较器电路,以对具有批量归一化偏置的激活执行偏置条件 2S >= d - b 的约束。
  • 引入 +1 技巧,通过利用二进制权重结构来稀疏化加密计算,减少加密加法的次数。
  • 对权重进行三值化(−1,0,1),在有利时减少连接并进一步降低加密计算。
  • 演示跨输出和数据集的并行化评估,包括 Cancer、Diabetes、Faces 和 MNIST。

实验结果

研究问题

  • RQ1在保持高准确性的同时,二值神经网络能否在全同态加密数据上高效评估?
  • RQ2哪些电路设计和技巧(reduce tree vs sorting network、+1 技巧、稀疏化)能为加密预测带来实际的加速?
  • RQ3隐私保障如何转化为实用的 EPAAS(Encrypted Prediction as a Service)工作流,且实现最小的客户端交互与模型更新?
  • RQ4在 FHE 约束下,模型类型(binary/ternary)和网络深度对准确性和延迟有何影响?

主要发现

  • 基于 BNN 的加密预测在若干数据集(Cancer、Diabetes、Faces、MNIST)上取得了与浮点网络相当的准确性。
  • 在并行化设置下,reduce-tree 内积电路在加密计算方面的表现优于基于 sorting-network 的方法。
  • +1 技巧通过稀疏化加密求和,将每层的计算时间有效减半。
  • 权重三值化(−1,0,1)在某些数据集上可降低计算量,同时带来适度的精度损失。
  • 跨输出的全并行化可显著降低延迟,在各数据集上显示出显著的收益。
  • 在 MNIST 上,该方法达到与浮点网络相当的准确性,且实现了实际、隐私保护的预测。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。