TL;DR
On-device machine learning (ML) inference protects user privacy by keeping data local, but it fails when models rely on massive embedding tables that exceed mobile memory limits. This paper introduces a GPU-accelerated, ML-co-designed Private Information Retrieval (PIR) system that allows devices to privately fetch embeddings from remote servers. By optimizing cryptographic operations on GPUs and co-designing data access patterns, the system achieves a $>100\times$ throughput improvement over CPU baselines, serving up to 100,000 queries per second on a single GPU.
What Problem Does This Paper Address?
Modern recommendation systems and large language models rely heavily on embedding tables—large matrices that map categorical features (like user click history or words) into dense vectors. These tables are massive, often ranging from gigabytes to terabytes, making them impossible to store directly on edge devices like smartphones.
While keeping the core neural network on-device protects privacy, querying a cloud server for specific embedding rows leaks sensitive user behavior in the clear. To solve this, researchers turn to Private Information Retrieval (PIR), a cryptographic protocol that allows a client to fetch data from a server without the server learning which item was requested.
However, standard PIR protocols are notoriously slow and computationally intensive. For instance, expanding a query for a table with one million entries requires at least one million AES encryption operations, creating a massive bottleneck for real-time, latency-sensitive applications.
Methods
The authors focus on a two-server Distributed Point Function (DPF)-based PIR scheme. In this setup, two non-colluding servers hold copies of the database, and the client splits its query into two keys so that neither server individually learns the requested index.
The paper introduces two main categories of optimizations:
- GPU Acceleration of DPF: DPF evaluation is highly compute-bound due to its heavy cryptographic workload. The authors design a Memory-bounded Tree Traversal strategy. Naive parallelization either recomputes intermediate tree nodes redundantly (branch-parallel) or consumes massive memory by storing all intermediate states (level-by-level). The proposed method evaluates chunks of $K$ nodes in a depth-first manner, reducing memory overhead from linear $O(BL)$ to logarithmic $O(BK \log L)$. Furthermore, they fuse the DPF evaluation operator with the subsequent matrix multiplication to avoid storing large intermediate outputs in global memory.
- ML + PIR Co-Optimization:
- Frequency-Based Hot Table Split: The top-$K$ most frequently accessed embeddings are split into a smaller "hot table." To prevent side-channel information leakage, the client always issues a fixed budget of queries ($Q_{hot}$ and $Q_{full}$) using dummy queries if necessary.
- Access Pattern-Aware Embedding Co-location: Frequently co-occurring embeddings are packed into the same row, allowing a single PIR query to retrieve multiple relevant vectors simultaneously.
Datasets
The system was evaluated using several public datasets spanning recommendation and language modeling tasks:
- Criteo 1 TB & Criteo Rec.: Massive click-through rate prediction datasets.
- Taobao: An Alibaba user behavior dataset for recommendation.
- MovieLens-20M: A classic movie recommendation dataset.
- WikiText2: A language modeling corpus used to evaluate word embedding lookups.
Key Insights and Ideas
- Cryptographic protocols are ripe for GPU acceleration: While CPUs benefit from hardware-accelerated instructions like AES-NI, the massive parallelism of GPUs can easily outpace them if memory layouts are carefully managed.
- The Memory vs. Compute Tradeoff: Naive GPU implementations of tree-based cryptography fail because they hit memory capacity walls or cause severe thread divergence. Chunk-based, depth-first traversal balances this perfectly.
- Privacy-Preserving Caching Requires Padding: You cannot use a standard cache in a private system because cache hits/misses leak data. The "hot table split" elegantly bypasses this by enforcing strict query budgets and dummy queries, ensuring the server sees identical traffic patterns regardless of user state.
Key Results
- Massive Speedups: The GPU acceleration strategy alone yields a $>20\times$ throughput improvement over an optimized multi-core CPU baseline.
- End-to-End Performance: When combined with the ML co-design optimizations, the system achieves a $>100\times$ throughput improvement over the CPU baseline while maintaining model accuracy.
- High Throughput & Low Latency: On a single NVIDIA V100 GPU, the system serves up to 100,000 queries per second (QPS). End-to-end latency is kept well within acceptable service-level agreements (SLAs), remaining under 500 ms per inference.
Limitations and Future Work
- Static Embedding Tables: The current design assumes that embedding tables are mostly static or updated infrequently (e.g., during off-peak hours). Dynamic, real-time updates (insertions/deletions) require updating client-side hash functions and are left for future work.
- Trust Model: The system relies on a two-server non-colluding threat model. While common in secure multi-party computation, it requires deploying infrastructure across distinct cloud vendors or trusted consortia to guarantee true privacy.
Summary updated