🤖 AI Summary
This work addresses the inefficiency of embedding lookup in privacy-preserving inference, where conventional approaches relying on one-hot encoding incur high computational overhead under fully homomorphic encryption (FHE). To overcome this limitation, the authors propose Independent Vector Evaluation (IVE), a novel method that dispenses with one-hot encoding by constructing linearly independent vectors from powers of a single encrypted index. By integrating precomputed basis transformation and the discrete cosine transform, IVE enables efficient recovery of the target embedding vector under FHE while significantly reducing homomorphic operation complexity and mitigating error amplification. Experimental results demonstrate that the proposed approach achieves up to a 78.4× speedup in amortized embedding lookup time. In encrypted FastText inference, the proportion of runtime attributed to vector generation drops dramatically from 99.6% to 66.3%.
📝 Abstract
Many NLP or recommendation models begin by mapping discrete client inputs to embedding vectors. Since inputs can reveal sensitive information, the embedding step must be protected in privacy-preserving inference. Fully Homomorphic Encryption (FHE) enables inference over encrypted client data, but turns embedding lookup from simple table access into homomorphic computation. To keep the embedding table server-side and avoid transmitting encrypted embedding vectors from the client, we focus on server-side lookup: the client sends only a small encrypted index.
Prior ICML 2024 work first builds a one-hot vector from the encrypted index before multiplying with the embedding table, and this one-hot generation is the dominant cost. One-hot-based methods are expensive in FHE: they construct a p-dimensional selection vector via an equality test for each coordinate, requiring $O(p \log p)$ total homomorphic operations.
Our key observation is that private embedding lookup only requires a linearly independent representation of the encrypted index, not the one-hot basis itself. Building on it, we propose Independent Vector Evaluation (IVE). Instead of constructing a one-hot vector, IVE evaluates a linearly independent vector built from successive powers of a single encrypted value, reducing vector-generation cost to $O(p)$. It then recovers the same embedding vector via a precomputed change of basis, instantiated with an orthogonal Discrete Cosine Transform to mitigate error amplification.
Our implementation shows IVE improves amortized lookup time by up to 78.4x over prior method. We further evaluate its impact on end-to-end encrypted FastText inference, where embedding lookup is a major cost in the shallow model. On Enron-Spam dataset, replacing one-hot generation with IVE reduces the share of vector generation in encrypted inference time from 99.6% to 66.3%.