A New PPML Paradigm for Quantized Models

Tianpei Lu, Bingsheng Zhang, Xiaoyuan Zhang, Kui Ren

TL;DR

This paper introduces a new paradigm for Privacy-Preserving Machine Learning (PPML) that treats quantized model operators as private lookup tables rather than complex arithmetic circuits. By leveraging an efficient new protocol for private lookup table evaluation, the authors achieve massive performance gains—speeding up secure inference by up to 60x for CNNs and 25x for Large Language Models (LLMs) compared to current state-of-the-art solutions.

What Problem Does This Paper Address?

Privacy-Preserving Machine Learning (PPML) allows multiple parties to run model inference without revealing their private data or the model weights, typically using Secure Multi-Party Computation (MPC). However, MPC is notoriously slow because of the high communication overhead required for every mathematical operation.

In standard machine learning, quantization (reducing data from 32-bit floats to 8-bit or 4-bit integers) is a go-to technique for speed. You would think this would help PPML, too. Surprisingly, it often makes it slower. In traditional MPC frameworks, quantized data must be "recovered" to high precision to perform an operation (like a convolution) and then "re-quantized" back down. This precision recovery step involves expensive bit-extraction and scaling operations that often outweigh the benefits of the smaller data size.

Methods

The authors propose shifting from a "white-box" view (calculating the math of an operator) to a "black-box" view (using lookup tables).

  1. Quantized Operators as Lookup Tables: Instead of securely computing the complex scaling and offsets required by quantization, they bake these values directly into a lookup table. For an 8-bit quantized operator, there are only 256 possible input values. The model server pre-calculates the output for all 256 possibilities.
  2. Efficient Private Lookup: They developed a protocol for Private Lookup Table Evaluation. In this setup, the server has a private table $T$, and the client has a private index $x$. They use a technique called Vector Oblivious Shift Evaluation (VOSE). By extending previous work on binary vectors to work over large rings, they created a protocol where the online communication cost is only logarithmic relative to the table size ($O(\log n)$).
  3. Operator Fusion: Because they use lookup tables, they can "fuse" multiple layers. For example, a Convolution, a ReLU activation, and a MaxPool can be combined into a single lookup table. This allows the system to perform multiple layers of a neural network for the "price" of a single table query.
  4. SISO vs. MISO: The framework handles Single-Input Single-Output (SISO) operators (like ReLU) easily. For Multiple-Input (MISO) operators (like Matrix Multiplication), they convert them into SISO structures by hard-coding weights into the tables or using efficient 2PC multiplication for intermediate steps.

Datasets

The authors evaluated their framework across a variety of standard benchmarks:

  • CNNs: AlexNet, VGG16, and ResNet18/50, evaluated on CIFAR-10 and Tiny ImageNet.
  • LLMs: GPT-2, GPT-Neo, and Llama2, fine-tuned on the MRPC (Microsoft Research Paraphrase Corpus) dataset for text classification.
  • Models: They utilized 8-bit quantized versions of these models from the ONNX Model Zoo and Hugging Face.

Key Insights and Ideas

  • Ignoring Internal Complexity: The biggest "aha moment" is that lookup tables don't care how complex a function is. Whether it's a simple addition or a complex non-linear activation with messy quantization scaling factors, the cost to look it up in a table is exactly the same.
  • Communication is the Key: In MPC, the bottleneck is almost always the network, not the CPU. By reducing the online communication to just a few bits (the log of the table size), they bypass the primary hurdle of PPML.
  • Quantization as a Feature, Not a Bug: While previous researchers struggled to make quantization work in MPC, this paper treats quantization as the enabling technology that makes lookup tables small enough to be practical.

Key Results

The performance improvements are substantial across different network environments (LAN and WAN):

  • CNN Performance: Their 8-bit quantized framework is 40–60x faster than CryptoFlow2 (a leading 2PC framework) and 5–15x faster than 3-party frameworks like Falcon and Bicoptor, even when those competitors use GPU acceleration.
  • LLM Performance: For models like GPT-2 and Llama2, they achieved 10–25x speedups over CrypTen and Sigma.
  • Accuracy: The 8-bit quantization strategy resulted in negligible accuracy loss (typically around 0.2%) compared to full-precision models.
  • Efficiency: On a single CPU core, the protocol can evaluate over 67 million tables (with 8-bit I/O) per second.

Limitations and Future Work

  • Offline Overhead: The framework achieves its blazing online speed by moving work to an "offline phase" where tables are prepared. While the authors note their total time (offline + online) is still faster than competitors, the offline communication is still significant.
  • The MISO Bottleneck: Fusing two Multiple-Input operators (like two consecutive Convolutions) causes the lookup table size to grow exponentially. This limits how many layers can be fused before the memory requirements become impractical.
  • High Precision Limits: While 8-bit tables are small (256 entries), 16-bit tables (65,536 entries) are much larger. Moving to even higher precision would likely break the lookup table paradigm due to memory and pre-computation constraints.

Summary updated

BibTeX
@inproceedings{lu2025new,
  author = {Tianpei Lu and Bingsheng Zhang and Xiaoyuan Zhang and Kui Ren},
  title = {{A New PPML Paradigm for Quantized Models}},
  booktitle = {NDSS},
  year = {2025},
}
Figure