Secure Evaluation of Quantized Neural Networks

Anders P. K. Dalskov, Daniel Escudero, Marcel Keller

Introduction

The deployment of Machine Learning (ML) models often involves sensitive data and proprietary model parameters. Secure Multiparty Computation (MPC) offers a solution by allowing inference without revealing inputs or weights. However, a significant gap has existed between mainstream ML development (using frameworks like TensorFlow and PyTorch) and specialized MPC research. This paper bridges that gap by demonstrating that standard 8-bit quantization techniques are inherently "MPC-friendly," enabling secure evaluation of production-ready models like MobileNet without custom architectures.

Quantization Methodology

The authors adopt the quantization scheme used in TensorFlow Lite (TFLite). This approach maps floating-point values from the real domain ($\mathbb{R}$) to 8-bit integers ($\mathbb{Z}$) using a linear transformation defined by a "scale" and a "zero-point" ($z$).

Mapping of real-valued parameters to 8-bit integers for quantization.

By mapping values to the range $[0, 2^8 - 1]$, operations such as dot products, truncation, and clamping can be represented as arithmetic operations within an MPC framework. This compatibility allows engineers to train models using standard tools and evaluate them securely using general-purpose MPC frameworks like MP-SPDZ.

Secure Computation Protocols

The research evaluates eight different MPC protocols across various security settings. These settings differ based on the corruption threshold (honest vs. dishonest majority) and security levels (passive vs. active).

Secure multi-party computation setup involving model/data owners and computing parties.

In an honest-majority setting (e.g., 3 parties where at most 1 is corrupt, as shown above), the computation is significantly more efficient. The authors introduce an optimized probabilistic truncation protocol for rings ($\mathbb{Z}_{2^k}$), which reduces communication costs by allowing a negligible, biased error that neural networks are typically robust against.

Key Insights and Performance

The study reveals several critical findings regarding the feasibility of secure inference:

  • The Corruption Gap: The primary performance bottleneck is the corruption threshold. Moving from an honest majority (3 parties) to a dishonest majority (2 parties) can result in a 200x slowdown due to intensive pre-processing requirements.
  • Active Security Overhead: Transitioning from passive (semi-honest) to active (malicious) security is relatively efficient, typically increasing runtime by only 3x to 30x once the corruption threshold is established.
  • Scalability: The approach successfully scales to large models like DenseNet-121 on ImageNet. For smaller models, such as MobileNet V1 0.25_128, secure inference in an honest-majority passive setting takes as little as 0.2 seconds.

Conclusion

This work proves that the divide between practical ML and secure computation is narrower than previously assumed. By leveraging standard quantization and optimized truncation, large-scale secure inference becomes viable. While challenges remain—particularly the high communication overhead in dishonest-majority settings and the complexity of secure training—this research provides a robust foundation for deploying privacy-preserving ML in real-world scenarios.

Summary updated

BibTeX
@article{dalskov2019secure,
  author = {Anders P. K. Dalskov and Daniel Escudero and Marcel Keller},
  title = {{Secure Evaluation of Quantized Neural Networks}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2019},
  url = {https://openreview.net/forum?id=bE-yGP4BSNN},
}
Figure