[论文解读] CryptGPU: Fast Privacy-Preserving Machine Learning on the GPU
CryptGPU 是一种用于隐私保护机器学习的 GPU 加速框架,通过使用优化的、'GPU 友好'协议,在 GPU 上实现所有加密操作——包括线性和非线性操作。与先前基于 CPU 的方法相比,其在私有训练中实现最高达 36 倍的加速,在私有推理中实现 8 倍加速,从而支持在 ResNet-152 等大型模型和 ImageNet 规模数据集上进行安全推理与训练。
We introduce CryptGPU, a system for privacy-preserving machine learning that implements all operations on the GPU (graphics processing unit). Just as GPUs played a pivotal role in the success of modern deep learning, they are also essential for realizing scalable privacy-preserving deep learning. In this work, we start by introducing a new interface to losslessly embed cryptographic operations over secret-shared values (in a discrete domain) into floating-point operations that can be processed by highly-optimized CUDA kernels for linear algebra. We then identify a sequence of "GPU-friendly" cryptographic protocols to enable privacy-preserving evaluation of both linear and non-linear operations on the GPU. Our microbenchmarks indicate that our private GPU-based convolution protocol is over 150x faster than the analogous CPU-based protocol; for non-linear operations like the ReLU activation function, our GPU-based protocol is around 10x faster than its CPU analog. With CryptGPU, we support private inference and private training on convolutional neural networks with over 60 million parameters as well as handle large datasets like ImageNet. Compared to the previous state-of-the-art, when considering large models and datasets, our protocols achieve a 2x to 8x improvement in private inference and a 6x to 36x improvement for private training. Our work not only showcases the viability of performing secure multiparty computation (MPC) entirely on the GPU to enable fast privacy-preserving machine learning, but also highlights the importance of designing new MPC primitives that can take full advantage of the GPU's computing capabilities.
研究动机与目标
- 通过为安全多方计算(MPC)提供 GPU 加速,弥合隐私保护机器学习中的可扩展性差距。
- 克服基于 CPU 的 MPC 协议带来的性能瓶颈,这些瓶颈限制了私有训练和推理仅能用于小型模型和数据集。
- 设计原生兼容 GPU 执行的加密协议,以消除 CPU-GPU 数据传输和延迟。
- 实现在现代深度神经网络(如 ResNet-152)上进行实际的私有推理与训练,参数量超过六千万,并支持 ImageNet 规模数据集。
- 通过利用 GPU 原生加密操作,缩小明文与私有深度学习之间的性能差距。
提出的方法
- 引入一种新颖接口,将秘密共享的加密操作(在离散域中)嵌入到可通过优化 CUDA 内核执行的浮点运算中。
- 设计一整套适用于线性(如卷积)和非线性(如 ReLU)操作的 'GPU 友好' 加密协议,使用 GPU 优化原语。
- 在 GPU 上完全实现所有 MPC 操作——包括秘密共享、乘法和比较——以避免 CPU 性能瓶颈。
- 与 PyTorch 和 CrypTen 集成,为机器学习从业者提供无缝部署支持。
- 优化数据布局和内存访问模式,以在 MPC 计算期间最大化 GPU 占用率和吞吐量。
- 使用自定义 CUDA 内核加速秘密共享下的同态类似操作,最大限度减少计算和通信开销。
实验结果
研究问题
- RQ1是否能够将安全多方计算中的所有加密操作高效映射到 GPU 加速内核,而无需将计算卸载到 CPU?
- RQ2与基于 CPU 优化的协议相比,专门针对 GPU 架构设计的 MPC 协议能带来多大性能提升?
- RQ3GPU 加速在多大程度上能够支持在大规模深度学习模型(如 ResNet-152 和 ImageNet)上进行私有训练与推理?
- RQ4现有 MPC 框架中阻碍 GPU 利用的关键瓶颈是什么,以及如何消除这些瓶颈?
- RQ5GPU 原生加密协议是否能够实现足够的安全性和效率,以支持大规模现实世界隐私保护机器学习?
主要发现
- CryptGPU 的私有 GPU 卷积协议在大型模型上比其基于 CPU 的版本快超过 150 倍。
- 基于 GPU 的 ReLU 协议在非线性激活操作上比 CPU 版本快约 10 倍。
- 在私有推理方面,CryptGPU 相较于先前最先进方法(Falcon 和 CrypTFlow),在大型模型和数据集上实现了 2 倍至 8 倍的性能提升。
- 在私有训练方面,CryptGPU 相较于先前方法实现了 6 倍至 36 倍的性能提升,使在 Tiny ImageNet 上训练 AlexNet 的时间缩短至一年以内。
- CryptGPU 支持参数量超过六千万的模型以及 ImageNet 规模的数据集进行私有推理与训练,展示了实际可扩展性。
- 通过系统化设计 GPU 友好型 MPC 协议,实现了端到端 GPU 执行,消除了 CPU-GPU 数据传输,降低了延迟。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。