SSNet: A Lightweight Multi-Party Computation Scheme for Practical Privacy-Preserving Machine Learning Service in the Cloud

Shijin Duan, Chenghong Wang, Hongwu Peng, Yukui Luo, Wujie Wen, Caiwen Ding, Xiaolin XuarXiv 2024

Abstract

As privacy-preserving becomes a pivotal aspect of deep learning (DL) development, multi-party computation (MPC) has gained prominence for its efficiency and strong security. However, the practice of current MPC frameworks is limited, especially when dealing with large neural networks, exemplified by the prolonged execution time of 25.8 seconds for secure inference on ResNet-152. The primary challenge lies in the reliance of current MPC approaches on additive secret sharing, which incurs significant communication overhead with non-linear operations such as comparisons. Furthermore, additive sharing suffers from poor scalability on party size. In light of these challenges, we propose SSNet, which for the first time, employs Shamir's secret sharing (SSS) as the backbone of an MPC-based ML framework. SSNet demonstrates the ability to scale up party numbers straightforwardly and introduces masking strategies designed to reduce communication overhead associated with non-linear operations. Comprehensive evaluations show speed-ups ranging from 3x to 14x compared to state-of-the-art (SOTA) MPC frameworks.

Introduction

Privacy-preserving machine learning (PPML) allows cloud services to run models on user data without compromising the confidentiality of raw data or model weights. Multi-party computation (MPC) is a leading technique for this, where data is split into "shares" distributed across multiple servers. As long as the servers do not all collude, the data remains secret.

However, current MPC frameworks (like CryptGPU or CrypTFlow) rely on additive secret sharing. This approach faces significant bottlenecks when dealing with non-linear functions like ReLU or MaxPooling. These operations often require complex "bit-fiddling" protocols that involve many rounds of communication between servers, making large-scale inference painfully slow. Furthermore, additive sharing does not scale efficiently as more computing parties are added to increase security or fault tolerance.

Comparison of SSNet with state-of-the-art MPC frameworks across various operations and evaluation benchmarks.

Methodology: Shamir’s Secret Sharing for Deep Learning

SSNet swaps the foundation of MPC from additive sharing to Shamir’s Secret Sharing (SSS). While SSS is a classic cryptographic primitive, it has historically been avoided in deep learning because its polynomial-based math causes the "degree" of the polynomial to double with every multiplication, eventually making the secret unrecoverable. SSNet overcomes these hurdles through several key innovations:

1. Efficient Degree Reduction

SSNet introduces a "reshare" method that keeps the polynomial degree in check after convolutions without leaking information. This allows the framework to perform deep linear operations (convolutions and fully connected layers) while maintaining the threshold properties of SSS.

2. Masking for Non-Linearity

Instead of expensive bit-decomposition for ReLU and Pooling, SSNet uses a novel masking strategy. It applies a random positive mask to the data, allowing servers to reconstruct the masked value in plaintext to perform comparisons locally, and then "unmasks" it. This reduces communication to a single round, cutting communication volume by over 50% compared to additive-sharing-based SOTA.

3. GPU-Friendly Finite Fields

To leverage GPU acceleration, the authors developed a data decomposition strategy. Since GPUs are optimized for 64-bit floating-point math and SSS requires exact integer math in a finite field, SSNet splits 46-bit numbers into smaller 23-bit chunks. This prevents overflow on the GPU while maintaining high precision (16-bit fixed-point).

Detailed protocols for SSS-Linear, SSS-Truncation, and SSS-NonLinear operations in SSNet.

Experimental Evaluation

The framework was evaluated on standard computer vision benchmarks including MNIST, CIFAR-10, Tiny ImageNet, and the full ImageNet dataset.

Key Results:

  • Massive Speedups: On ResNet-152 (ImageNet), SSNet takes 4.5 seconds per image, compared to 25.8 seconds for CryptGPU—a nearly 6× improvement. On smaller models like LeNet, the speedup reaches 14×.
  • Communication Efficiency: For AlexNet on ImageNet, SSNet reduced total communication from 0.24 GB to 0.057 GB (a 76% reduction).
  • Accuracy Preservation: By using 16-bit quantization and a carefully chosen 45-bit prime field, SSNet maintains virtually the same accuracy as plaintext models (e.g., 79.2% on ResNet-101).
  • Scalability: SSNet is the first framework evaluated on a five-party computation (5PC) setup, showing that SSS can scale to more servers with only a linear increase in communication overhead.

Conclusion

SSNet represents a significant leap forward for practical PPML. By moving to a Shamir’s Secret Sharing backbone and optimizing for GPU execution with novel masking strategies, it addresses the primary communication and scalability bottlenecks of previous frameworks. While still slower than unprotected plaintext inference, the 3x to 14x speedup brings secure cloud-based deep learning much closer to real-world viability.

Summary updated

BibTeX
@misc{duan2024ssnet,
  author = {Shijin Duan and Chenghong Wang and Hongwu Peng and Yukui Luo and Wujie Wen and Caiwen Ding and Xiaolin Xu},
  title = {{SSNet: A Lightweight Multi-Party Computation Scheme for Practical Privacy-Preserving Machine Learning Service in the Cloud}},
  year = {2024},
  eprint = {2406.02629},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.02629},
}
Figure