PrivGNN: High-Performance Secure Inference for Cryptographic Graph Neural Networks

Fuyi Wang, Zekai Chen, Mingyuan Fan, Jianying Zhou, Lei Pan, Leo Yu Zhang

TL;DR

PrivGNN is a high-performance secure two-party computation (2PC) framework designed for Graph Neural Network (GNN) inference in privacy-critical cloud environments. By hybridizing additive and function secret sharing techniques within an offline-online paradigm, it fully protects both sensitive graph structures and node features. The framework achieves up to a $15\times$ speedup for non-linear layers over state-of-the-art solutions while maintaining accuracy comparable to plaintext models.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) are highly effective at analyzing graph-structured data, making them invaluable for applications like drug discovery and social network analysis. However, outsourcing GNN inference to the cloud introduces severe privacy risks, as both the client's graph data and the service provider's trained model weights are often proprietary or sensitive.

While secure inference (SI) protocols exist, they predominantly target convolutional neural networks (CNNs) handling unstructured data like images and text. The few solutions adapted for GNNs suffer from major drawbacks: they often leak critical structural properties of the graph (such as the maximum node degree), incur massive computational and communication overhead during non-linear operations (like ReLU or Sigmoid), or rely on risky multi-server non-collusion assumptions. PrivGNN addresses these gaps by providing a fast, secure client-server architecture that guarantees complete structural and feature privacy.

Fig. 1. A client-server secure inference scenario.

Methods

PrivGNN splits the secure inference workload between a client and a server using a secure two-party computation (2PC) framework divided into a data-independent offline phase and a lightweight online phase.

The framework relies on two primary cryptographic primitives:

  • Additive Secret Sharing (AddSS): The client splits the private graph data (adjacency matrix, edge attributes, and node features) into random mathematical shares. Neither share reveals anything about the underlying data on its own, completely hiding the graph's structure and features.
  • Function Secret Sharing (FuncSS): Used to efficiently evaluate non-linear functions on secret-shared values.

Using these primitives, the authors introduce several optimized protocols:

  • SMatMul (Secure Matrix Multiplication): Streamlines linear layers by eliminating redundant auxiliary randomness, reducing online communication.
  • SQuaPol & SPiePol (Secure Quadratic/Piecewise Polynomials): Approximates complex non-linear activations (like Sigmoid and Tanh) using piecewise continuous polynomials, shifting the most intensive computations to the offline phase.
  • SDReLU (Secure DReLU): A modified distributed comparison protocol designed specifically for greater-than comparisons on secret-shared inputs, optimizing the ReLU activation layer.

Datasets

The authors evaluated PrivGNN across four distinct datasets:

  • MNIST, CIFAR-10, and CIFAR-100: Standard image classification datasets used to benchmark PrivGNN against state-of-the-art CNN-focused secure inference frameworks.
  • QM9: A chemical property dataset containing 134,000 stable organic molecules. This was used to evaluate the framework's performance on actual graph-centric molecular property inference using a Message Passing Neural Network (MPNN).

Key Insights and Ideas

  • The Offline-Online Paradigm Shift: By pushing data-independent cryptographic operations (like generating Beaver multiplication triples and FuncSS keys) to an offline phase, the online phase is reduced to just a single round of interaction with highly lightweight local computation.
  • True Structural Privacy: Unlike previous works that compromise privacy by leaking node degrees to optimize matrix operations, PrivGNN completely masks the graph topology by secret-sharing the entire adjacency matrix.
  • Modulus Conversion Bypass: Converting Boolean shares to arithmetic shares typically requires multiple rounds of online communication. PrivGNN bypasses this bottleneck by leveraging the SBitXA protocol as a black box, achieving the conversion in a single online round.

Key Results

  • Layer-Level Speedups: Compared to state-of-the-art solutions, PrivGNN achieves $1.5\times \sim 1.7\times$ speedups for linear layers and a substantial $2\times \sim 15\times$ speedup for non-linear layers.
  • End-to-End Performance: Overall secure predictions are $1.3\times \sim 4.7\times$ faster across the evaluated models. On the QM9 dataset, PrivGNN achieves an order of magnitude improvement over competing frameworks like SecMPNN.
  • High Accuracy Preservation: The cryptographic optimizations introduce negligible accuracy drops due to fixed-point arithmetic and polynomial approximations (e.g., achieving 96.42% secure inference accuracy vs. 97.93% plaintext accuracy on the QM9 dataset).

Limitations and Future Work

  • Minor Accuracy Trade-offs: The use of fixed-point arithmetic and piecewise polynomial approximations introduces small truncation errors, leading to a minor accuracy drop (~0.1% to 1.5%) compared to plaintext baselines.
  • Offline Phase Setup: The generation of cryptographic primitives in the offline phase currently relies on a trusted third party for maximum efficiency. Developing a fully decentralized 2PC preprocessing phase that maintains high performance remains an open challenge.
  • Gating Function Bottleneck: The secure update function (PrivUF) still accounts for over 50% of the total online runtime due to the complexity of evaluating sigmoidal activations, marking it as a primary target for future optimization.

Summary updated

BibTeX
@inproceedings{wang2025privgnn,
  author = {Fuyi Wang and Zekai Chen and Mingyuan Fan and Jianying Zhou and Lei Pan and Leo Yu Zhang},
  title = {{PrivGNN: High-Performance Secure Inference for Cryptographic Graph Neural Networks}},
  booktitle = {FC},
  year = {2025},
  doi = {10.1007/978-3-032-07035-7\_21},
}
Figure