[Paper Review] CryptoSPN: Privacy-preserving Sum-Product Network Inference
CryptoSPN is a framework that enables privacy-preserving inference of sum-product networks (SPNs) using secure multi-party computation (SMPC), ensuring provable security for client data, model structure, and predictions. It achieves efficient, accurate inference in seconds for medium-sized SPNs without accuracy degradation, supporting both standard and RAT-SPNs with minimal performance overhead.
AI algorithms, and machine learning (ML) techniques in particular, are increasingly important to individuals' lives, but have caused a range of privacy concerns addressed by, e.g., the European GDPR. Using cryptographic techniques, it is possible to perform inference tasks remotely on sensitive client data in a privacy-preserving way: the server learns nothing about the input data and the model predictions, while the client learns nothing about the ML model (which is often considered intellectual property and might contain traces of sensitive data). While such privacy-preserving solutions are relatively efficient, they are mostly targeted at neural networks, can degrade the predictive accuracy, and usually reveal the network's topology. Furthermore, existing solutions are not readily accessible to ML experts, as prototype implementations are not well-integrated into ML frameworks and require extensive cryptographic knowledge. In this paper, we present CryptoSPN, a framework for privacy-preserving inference of sum-product networks (SPNs). SPNs are a tractable probabilistic graphical model that allows a range of exact inference queries in linear time. Specifically, we show how to efficiently perform SPN inference via secure multi-party computation (SMPC) without accuracy degradation while hiding sensitive client and training information with provable security guarantees. Next to foundations, CryptoSPN encompasses tools to easily transform existing SPNs into privacy-preserving executables. Our empirical results demonstrate that CryptoSPN achieves highly efficient and accurate inference in the order of seconds for medium-sized SPNs.
Motivation & Objective
- Address privacy concerns in machine learning, particularly under GDPR, by enabling remote inference without exposing sensitive client data or model structure.
- Provide a secure, efficient, and accurate solution for SPN inference that protects both client inputs and model intellectual property.
- Enable ML practitioners to deploy privacy-preserving SPN inference without deep cryptographic expertise, by integrating with ML frameworks.
- Hide not only input data but also the SPN’s topology and scope, offering stronger privacy guarantees than existing solutions.
- Achieve tractable performance for medium-sized SPNs, balancing security, efficiency, and accuracy in real-world applications.
Proposed method
- Utilize secure multi-party computation (SMPC) with Yao’s garbled circuits to perform SPN inference without revealing inputs, outputs, or model structure.
- Transform SPNs into privacy-preserving circuits by compiling them into arithmetic circuits over the log2 domain, enabling efficient SMPC evaluation.
- Apply cryptographic techniques to hide the scope of random variables and the network’s topology, ensuring structural obfuscation.
- Implement a two-phase protocol: a setup phase requiring minutes and gigabytes, and an online phase with sub-second latency and megabyte-scale communication.
- Use 32-bit and 64-bit floating-point precision in SMPC, with minimal accuracy loss due to log2-domain computation.
- Integrate tools to convert existing SPNs (e.g., from SPFlow) into privacy-preserving executables with minimal user effort.
Experimental results
Research questions
- RQ1Can SPN inference be securely performed in a privacy-preserving manner using SMPC, without compromising accuracy or revealing model structure?
- RQ2How does the performance of privacy-preserving SPN inference scale with SPN size, depth, and density?
- RQ3To what extent do cryptographic techniques like garbled circuits and secret sharing affect inference efficiency and accuracy in SPNs?
- RQ4Can the framework support both standard SPNs and RAT-SPNs while maintaining strong privacy guarantees?
- RQ5How does hiding the scope and topology of SPNs impact runtime and communication overhead?
Key findings
- CryptoSPN achieves online inference in just a few seconds for medium-sized SPNs, with setup times in the order of minutes and gigabytes of communication.
- The framework maintains near-perfect accuracy, with an RMSE of 4.2×10⁻⁹ for 32-bit and 2.3×10⁻¹⁷ for 64-bit precision compared to plain SPN evaluation.
- The number of sum nodes has a significantly larger impact on runtime than products or leaves, due to expensive log2 and exp2 operations.
- Network density (especially number of edges) is a more critical performance factor than raw size, with denser SPNs showing much higher runtimes.
- Hiding the scope of random variables adds negligible overhead, with only a minor increase in runtime compared to plain inference.
- The framework successfully hides both the model structure and input data, providing provable security guarantees beyond what is offered by existing solutions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.