一句话:提出 MPC-Pipe,用三种流水线方案重叠 MPC 在线阶段的计算与通信,提升机器学习训练/推理吞吐与延迟。
MPC 为机器学习提供安全计算,但额外计算与通信使其性能远低于明文。现有 MPC 协议串行执行通信与计算:先算份额,再通信分发新份额,再进入下一步。本文指出,在 CNN 与 Transformer 等 ML 计算中这种串行并非必要,可通过编排重叠计算与通信。作者提出 MPC-Pipe,面向半诚实多数敌手,支持 ML 训练与推理并在在线阶段流水线化。其三种方案分别针对线性层间、层内及跨批次流水线,优化计算/通信重叠。系统扩展 CrypTen 实现,用 VGG16、ResNet50 和 Transformer 评估,显示可提升吞吐与延迟。
Multi-party computing (MPC) has been gaining popularity as a secure computing model over the past few years. However, prior works have demonstrated that MPC protocols still pay substantial performance penalties compared to plaintext, particularly when applied to ML algorithms. The overhead is due to added computation and communication costs. Prior studies, as well as our own analysis, found that most MPC protocols today sequentially perform communication and computation. The participating parties must compute on their shares first and then perform data communication to allow the distribution of new secret shares before proceeding to the next computation step. In this work, we show that serialization is unnecessary, particularly in the context of ML computations (both in Convolutional neural networks and in Transformer-based models). We demonstrate that it is possible to carefully orchestrate the computation and communication steps to overlap. We propose MPC-Pipe, an efficient MPC system for both training and inference of ML workloads, which pipelines computations and communications in an MPC protocol during the online phase. MPC-Pipe proposes three pipeline schemes to optimize the online phase of ML in the semi-honest majority adversary setting. The three pipeline schemes are 1) inter-linear pipeline, 2) inner-layer pipeline, and 3) inter-batch pipeline. Inter-linear pipeline focuses on linear layers; inner-layer pipeline focuses on non-linear layers; inter-batch pipeline focuses on communication and computation overlaps in different input batches. We implement MPC-Pipe by augmenting a modified version of CrypTen, which separates online and offline phases. We evaluate the end-to-end system performance benefits of the online phase of MPC using deep neural networks (VGG16, ResNet50) and Transformers using different network settings. We show that MPC-Pipe can improve the throughput and latency of ML workloads.