GPU-based Private Information Retrieval for On-Device Machine Learning Inference

Maximilian Lam, Jeff Johnson, Wenjie Xiong, Kiwan Maeng, Udit Gupta, Yang Li, Liangzhen Lai, Ilias Leontiadis, Minsoo Rhu, Hsien-Hsin S. Lee, Vijay Janapa Reddi, Gu-Yeon Wei, David Brooks, G. Edward Suh

Introduction

Modern machine learning, particularly recommendation systems used by platforms like Netflix or Amazon, relies heavily on embedding tables. These tables map categorical data—such as a user's click history—into dense vectors. However, implementing these models on-device faces two primary challenges:

  1. Scale: Embedding tables are often gigabytes or terabytes in size, far exceeding the storage capacity of mobile devices.
  2. Privacy: Querying a cloud server for specific embeddings reveals sensitive user interests to the service provider.
Comparison between standard non-private ML inference and the proposed PIR-based on-device ML architecture.

To address these, researchers presented a system at ASPLOS '24 that offloads massive embedding tables to servers while using Private Information Retrieval (PIR) to protect user queries. While standard PIR is typically too slow for real-time inference, this work introduces GPU acceleration and algorithmic co-design to achieve a 100x throughput improvement over CPU-based baselines.

Methodology: GPU-Accelerated PIR

The system utilizes Distributed Point Function (DPF)-based PIR, a protocol involving two non-colluding servers. In this model, the client generates two keys ($k_a, k_b$) that represent the desired index $i$ in a way that neither server individually learns the specific item being requested.

The workflow of Distributed Point Function (DPF)-based PIR involving two non-colluding servers.

The researchers introduced several key optimizations to make this practical on GPUs:

  • Memory-bounded Tree Traversal (MemBoundTree): DPF evaluation requires expanding a binary tree. Standard GPU approaches either perform redundant work or consume excessive memory. MemBoundTree uses a hybrid depth-first approach to process node "chunks" in parallel, optimizing for GPU memory hierarchies.
  • Operator Fusion: By fusing DPF evaluation directly with embedding table lookups (matrix-vector multiplication), the system avoids storing massive intermediate vectors in global memory, significantly reducing bandwidth requirements.
  • PIR-ML Co-design: The authors leverage ML data characteristics, such as power-law access distributions. They implement a "Hot Table Split" to keep frequently accessed embeddings on the client and "Embedding Co-location" to retrieve multiple related vectors in a single PIR query.

Performance and Key Results

The system was evaluated using datasets like MovieLens-20M, Taobao Ads, and WikiText2. The results demonstrate that GPUs are the "missing link" for practical PIR:

  • Massive Speedups: GPU optimizations provided a 20x improvement over multi-core CPU baselines and a 1,000x improvement over single-threaded execution.
  • Scalability: A single NVIDIA V100 GPU can handle up to 100,000 queries per second.
  • Practical Latency: End-to-end latency was maintained between 300–500ms, falling within the standard Service Level Agreements (SLAs) for many web services.

Insights and Limitations

A major insight of this work is that PIR should not be treated as a black-box cryptographic primitive. By understanding the underlying data skew and the application's tolerance for minor noise, significant performance gains are possible. Furthermore, the use of Chacha20 as a pseudo-random function (PRF) instead of AES-128 proved highly effective on GPUs, which lack the specialized AES hardware found in modern CPUs.

Despite these successes, the system has limitations. It relies on a "two-server" non-collusion model, which requires a "privacy consortium" or two different cloud providers in practice. It also assumes embedding tables are relatively static; frequent real-time updates would require expensive client-side updates. Finally, the design is optimized for "honest-but-curious" servers; protecting against malicious actors would require additional verification overhead.

Conclusion

By combining hardware-aware algorithmic design with application-specific co-design, this research makes private recommendation systems practical at scale. It demonstrates that with the right optimizations, GPUs can overcome the traditional computational bottlenecks of private information retrieval, enabling privacy-preserving machine learning on resource-constrained devices.

Summary updated

BibTeX
@inproceedings{lam2023gpu,
  author = {Maximilian Lam and Jeff Johnson and Wenjie Xiong and Kiwan Maeng and Udit Gupta and Yang Li and Liangzhen Lai and Ilias Leontiadis and Minsoo Rhu and Hsien-Hsin S. Lee and Vijay Janapa Reddi and Gu-Yeon Wei and David Brooks and G. Edward Suh},
  title = {{GPU-based Private Information Retrieval for On-Device Machine Learning Inference}},
  booktitle = {ASPLOS},
  year = {2023},
}
Figure