Skip to main content
QUICK REVIEW

[论文解读] Circa: Stochastic ReLUs for Private Deep Learning

Zahra Ghodsi, Nandan Kumar Jha|arXiv (Cornell University)|Jun 15, 2021
Cryptography and Data Security参考文献 26被引用 11
一句话总结

Circa 提出了一种随机 ReLU 近似方法,通过将 ReLU 重写为符号测试并截断输入,利用神经网络对故障的鲁棒性,将私有推理(PI)的计算成本降低。与基线 PI 相比,该方法在存储方面最高减少 4.7 倍,在运行时间方面最高减少 3 倍;当与最先进的 ReLU 最小化技术(如 DeepReDuce)结合使用时,还能额外获得 1.8 倍的加速。

ABSTRACT

The simultaneous rise of machine learning as a service and concerns over user privacy have increasingly motivated the need for private inference (PI). While recent work demonstrates PI is possible using cryptographic primitives, the computational overheads render it impractical. The community is largely unprepared to address these overheads, as the source of slowdown in PI stems from the ReLU operator whereas optimizations for plaintext inference focus on optimizing FLOPs. In this paper we re-think the ReLU computation and propose optimizations for PI tailored to properties of neural networks. Specifically, we reformulate ReLU as an approximate sign test and introduce a novel truncation method for the sign test that significantly reduces the cost per ReLU. These optimizations result in a specific type of stochastic ReLU. The key observation is that the stochastic fault behavior is well suited for the fault-tolerant properties of neural network inference. Thus, we provide significant savings without impacting accuracy. We collectively call the optimizations Circa and demonstrate improvements of up to 4.7x storage and 3x runtime over baseline implementations; we further show that Circa can be used on top of recent PI optimizations to obtain 1.8x additional speedup.

研究动机与目标

  • 解决私有推理(PI)中 ReLU 操作带来的高计算开销问题,该问题在加密协议中主导了运行时间。
  • 克服现有 PI 框架仅优化 FLOPs 而未考虑非线性操作(如 ReLU)成本的局限性。
  • 利用深度神经网络固有的容错能力,在不损失准确率的前提下,引入 ReLU 计算中的随机近似。
  • 通过将计算转移到更高效的秘密共享(SS)并近似符号测试,减少对昂贵的混淆电路(GCs)在 ReLU 求值中的依赖。
  • 证明将 Circa 与现有 ReLU 减少技术(如 DeepReDuce)结合,可进一步提升性能,推动 PI 的实际部署。

提出的方法

  • 将 ReLU 重写为符号测试后接乘法运算,将乘法移至秘密共享(SS)中,仅在混淆电路(GC)中保留符号测试。
  • 引入一种随机符号评估方法,对符号测试进行近似,其故障概率与输入大小相对于域素数的比值成正比。
  • 对符号测试应用输入截断,将位宽从 31 位减少至 12 位,并为小的正负值引入额外故障。
  • 提供两种可配置的故障模式:NegPass(小的负值可能被错误通过)和 PosZero(小的正值被错误设为零),允许用户在准确率与性能之间进行权衡。
  • 利用深度网络可容忍高达 10% 的随机故障而不损失准确率的特性,实现激进的优化。
  • 将 Circa 实现为对现有 PI 框架(如 Delphi)的模块化扩展,支持与 ReLU 最小化架构的正交优化。

实验结果

研究问题

  • RQ1能否通过使用随机和截断逻辑近似符号测试组件,显著加速私有推理中的 ReLU 计算?
  • RQ2深度神经网络在 ReLU 操作中能容忍多大程度的随机故障而不降低推理准确率?
  • RQ3输入截断和随机符号评估如何影响私有推理中计算成本与准确率之间的权衡?
  • RQ4Circa 能否与现有 ReLU 减少技术结合,实现私有推理中性能的乘法级提升?
  • RQ5在将标准 ReLU GC 替换为 Circa 优化变体时,运行时间和存储的最大性能提升分别是多少?

主要发现

  • Circa 将混淆电路(GC)大小最多减少 4.7 倍,与基线 Delphi 相比,PI 运行时间最多提升 3 倍。
  • 随机符号近似引入的准确率损失可忽略不计,网络可容忍超过 10% 的故障率而不损失准确率。
  • 将符号测试的位宽从 31 位截断至 12 位,实现了 4.7 倍的 GC 大小减少和相较于基线 ReLU GC 的 3 倍运行时间加速。
  • 当与最先进的 ReLU 最小化框架 DeepReDuce 结合使用时,Circa 在基线基础上实现了额外 1.8 倍的运行时间加速。
  • Circa 实现了在 TinyImageNet 上推理时间低于 2 秒,证明了其实现实时私有推理的可行性。
  • 该方法与现有 ReLU 减少技术正交,可实现累积的性能提升,当两者结合使用时效果更佳。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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