Chameleon: A Hybrid Secure Computation Framework for Machine Learning Applications

M. Sadegh Riazi, Christian Weinert, Oleksandr Tkachenko, Ebrahim M. Songhori, Thomas Schneider, Farinaz Koushanfar

Abstract

We present Chameleon, a novel hybrid (mixed-protocol) framework for secure function evaluation (SFE) which enables two parties to jointly compute a function without disclosing their private inputs. Chameleon combines the best aspects of generic SFE protocols with the ones that are based upon additive secret sharing. In particular, the framework performs linear operations in the ring $\mathbb{Z}_{2^l}$ using additively secret shared values and nonlinear operations using Yao's Garbled Circuits or the Goldreich-Micali-Wigderson protocol. Chameleon departs from the common assumption of additive or linear secret sharing models where three or more parties need to communicate in the online phase: the framework allows two parties with private inputs to communicate in the online phase under the assumption of a third node generating correlated randomness in an offline phase. Almost all of the heavy cryptographic operations are precomputed in an offline phase which substantially reduces the communication overhead. Chameleon is both scalable and significantly more efficient than the ABY framework (NDSS'15) it is based on. Our framework supports signed fixed-point numbers. In particular, Chameleon's vector dot product of signed fixed-point numbers improves the efficiency of mining and classification of encrypted data for algorithms based upon heavy matrix multiplications. Our evaluation of Chameleon on a 5 layer convolutional deep neural network shows 133x and 4.2x faster executions than Microsoft CryptoNets (ICML'16) and MiniONN (CCS'17), respectively.

Introduction

Privacy-preserving machine learning (PPML) is increasingly critical for scenarios where a server must run a model on a client's sensitive data without compromising the model weights or the input. Traditionally, Secure Function Evaluation (SFE) has been the primary tool for this task. However, existing SFE protocols often face a performance trade-off: linear operations like matrix multiplication are efficient in Additive Secret Sharing (A-SS) but slow in Boolean-circuit-based protocols like Yao’s Garbled Circuits (GC). Conversely, non-linear operations like ReLU or Max-Pooling are efficient in GC but complex in A-SS.

Chameleon addresses this "Goldilocks" problem by providing a hybrid framework that transitions between protocols based on the operation being performed. Unlike many secret-sharing frameworks that require three or more parties to be online simultaneously, Chameleon maintains a two-party online phase, making it more practical for standard client-server deployments.

System Architecture

The Hybrid Engine and Protocol Agility

Chameleon is built upon the ABY framework but introduces several architectural enhancements. It seamlessly transitions between three environments: A-SS for linear arithmetic, GMW for depth-optimized Boolean logic, and GC for constant-round Boolean logic. This protocol agility allows the framework to minimize the inherent weaknesses of any single protocol during complex computations like deep neural network inference.

Semi-honest Third Party (STP)

A core innovation in Chameleon is the utilization of a Semi-honest Third Party (STP). The STP is involved exclusively during an offline preprocessing phase to generate correlated randomness, such as Beaver triples and Oblivious Transfer (OT) masks.

The STP-aided offline phase generates correlated randomness via seed expansion.

As illustrated in Figure 1, the STP generates short cryptographic seeds and distributes them to the two main parties. These parties then expand the seeds locally using a Pseudo-Random Generator (PRG). This approach shifts the heavy cryptographic burden to the offline phase and reduces communication overhead by up to 321x compared to standard OT-based methods.

Optimized Vector Dot Products

For machine learning applications, matrix multiplications are the primary bottleneck. Chameleon optimizes these linear operations by modifying the Du-Atallah multiplication protocol.

Performance comparison between standard Multiplication Triples and the optimized Du-Atallah protocol.

As shown in Figure 3, the Du-Atallah protocol significantly reduces the number of multiplication operations, online/offline communication, and communication rounds compared to standard Multiplication Triples. This optimization is particularly effective for the heavy matrix multiplications found in convolutional layers.

Experimental Evaluation

Chameleon was evaluated on standard benchmarks including MNIST (handwritten digits), CIFAR-10 (color images), and the Credit Approval dataset (for SVMs).

  • Deep Learning (MNIST): Chameleon classified an image in 2.24 seconds, achieving a 133x speedup over Microsoft’s HE-based CryptoNets and a 4.2x speedup over MiniONN.
  • Deep Learning (CIFAR-10): For a 7-layer CNN, Chameleon was 10.3x faster than MiniONN and 5x faster than EzPC, while requiring significantly less communication.
  • SVM Classification: The framework classified queries with 1,000 features in just 11.42 milliseconds.

Conclusion and Future Work

Chameleon demonstrates that hybrid MPC frameworks can achieve massive performance gains in PPML by strategically shifting cryptographic costs to an offline phase and utilizing a semi-honest third party. While the current model introduces a collusion risk between the STP and one of the parties, this can be mitigated using Trusted Execution Environments like Intel SGX. Future work will focus on automating protocol selection via a cost-aware compiler and improving the efficiency of floating-point operations within the hybrid engine.

Summary updated

BibTeX
@inproceedings{riazi2018chameleon,
  author = {M. Sadegh Riazi and Christian Weinert and Oleksandr Tkachenko and Ebrahim M. Songhori and Thomas Schneider and Farinaz Koushanfar},
  title = {{Chameleon: A Hybrid Secure Computation Framework for Machine Learning Applications}},
  booktitle = {AsiaCCS},
  year = {2018},
  doi = {10.1145/3196494.3196522},
}
Figure