Characterizing and Optimizing End-to-End Systems for Private Inference

Karthik Garimella, Zahra Ghodsi, Nandan Kumar Jha, Siddharth Garg, Brandon Reagen

In an era where AI models process trillions of data points daily, the tension between utility and privacy has never been higher. Private Inference (PI)—a cryptographic technique where a client can query a server’s model without the client revealing their data or the server revealing its model—is the "holy grail" of secure computation. However, it has long been dismissed as too slow for the real world.

A new paper from researchers at NYU and Purdue, presented at ASPLOS '23, takes a sledgehammer to these efficiency barriers. By moving beyond theoretical crypto-benchmarks and looking at PI as an end-to-end systems problem, they’ve unlocked significant performance gains.

TL;DR

The authors characterize the massive compute, communication, and storage bottlenecks of state-of-the-art Private Inference. By introducing three system-level optimizations—reversing cryptographic roles, parallelizing encryption, and tuning wireless bandwidth—they achieve a 1.8× speedup in mean latency and allow systems to handle requests at a 2.24× higher rate.

What Problem Does This Paper Address?

Most research in Private Inference focuses on optimizing individual cryptographic primitives (like Homomorphic Encryption) in isolation. This paper argues that this "micro-view" misses the forest for the trees.

In reality, PI protocols are "hybrid": they use Homomorphic Encryption (HE) for linear layers (convolutions) and Garbled Circuits (GC) for non-linear layers (ReLU). These protocols have an "offline" phase (pre-computing data) and an "online" phase (the actual inference).

The authors identify a critical "Storage Wall": a single ResNet-18 inference on TinyImageNet requires the client to store 41 GB of pre-computed data. On a smartphone with 128 GB of storage, you could only buffer three inferences before the "offline" phase is forced to run "online," tanking performance. Furthermore, prior work ignored the arrival rate of requests; if requests come in faster than the system can "refill" its pre-computations, the system bottlenecks.

Methods

The researchers characterized a baseline protocol (DELPHI) and proposed three novel optimizations:

  1. Client-Garbler Protocol: Traditionally, the server "garbles" (encrypts) the circuit and the client evaluates it. This forces the client to store the massive circuit files. The authors reversed these roles. By making the client the "Garbler," the massive storage burden shifts to the server (which has ample TBs of space), while the powerful server handles the evaluation.
  2. Layer-Parallel HE (LPHE): They observed that in the offline phase, the HE computations for every single layer are independent. While standard approaches process layers sequentially, LPHE runs them all in parallel, drastically reducing the time needed to "refill" the pre-computation buffer.
  3. Wireless Slot Allocation (WSA): PI is data-asymmetric. Depending on the protocol, you might be downloading gigabytes but uploading megabytes. The authors proposed using 5G’s Time Division Duplexing (TDD) to dynamically reallocate wireless slots, matching the bandwidth to the specific data-flow needs of the PI protocol.

Datasets

The study evaluated these techniques using standard deep learning benchmarks:

  • CIFAR-100: A dataset of small images across 100 classes.
  • TinyImageNet: A subset of ImageNet with 200 classes at 64x64 resolution.
  • ImageNet: Used specifically to characterize the extreme storage overheads of large-scale models.
  • Models: ResNet-32, ResNet-18, and VGG-16.

Key Insights and Ideas

  • The "Offline" Myth: The "offline" phase isn't truly offline if you have a stream of requests. If the arrival rate is high, the system can't pre-compute fast enough, and "offline" latency becomes "online" latency.
  • Storage is the Real Bottleneck: We often worry about CPU cycles, but in PI, the sheer size of Garbled Circuits (GBs per inference) is the primary dealbreaker for mobile devices.
  • Compute Asymmetry Matters: A server is orders of magnitude faster than a smartphone. Protocols that offload evaluation to the server (like Client-Garbler) provide a massive "net benefit" even if they add a small amount of extra communication.
  • Bandwidth Wasted: Standard 5G splits upload/download roughly 50/50. PI protocols often need an 80/20 or 20/80 split. Tuning this via WSA provides "free" performance.

Key Results

  • Storage Reduction: The Client-Garbler protocol reduced the client-side storage requirement by 5× (e.g., from 41 GB down to 8 GB for ResNet-18).
  • Compute Speedup: Layer-Parallel HE (LPHE) improved the performance of the slowest part of the offline phase by 9.7×.
  • Communication Efficiency: Wireless Slot Allocation (WSA) reduced communication latency by up to 35%.
  • End-to-End Impact: Combined, these optimizations provided a 1.8× total PI speedup and allowed the system to sustain a request rate 2.24× higher than the state-of-the-art.

Limitations and Future Work

While a 1.8× speedup is significant, Private Inference is still roughly 3 orders of magnitude slower than standard "plaintext" inference. The authors note that even with their optimizations, a single ResNet-18 inference on TinyImageNet takes nearly 2 minutes in a streaming scenario.

Future Directions: * Hardware Acceleration: The authors estimate that combining their system-level fixes with dedicated HE and GC accelerators could bring PI latency down to the 6-second range. * PI-Friendly Architectures: Designing neural networks with fewer ReLU layers (the main source of GC overhead) is essential. * 6G and Beyond: As wireless bandwidth increases by another 10×, the communication bottleneck may finally shift back to computation.

This paper serves as a vital bridge between the "math-heavy" world of cryptography and the "metal-heavy" world of systems engineering, proving that privacy doesn't just need better equations—it needs better architecture.

Summary updated

BibTeX
@inproceedings{garimella2023characterizing,
  author = {Karthik Garimella and Zahra Ghodsi and Nandan Kumar Jha and Siddharth Garg and Brandon Reagen},
  title = {{Characterizing and Optimizing End-to-End Systems for Private Inference}},
  booktitle = {ASPLOS},
  year = {2023},
  doi = {10.1145/3582016.3582065},
}

Loading related content...

Figure