Encrypted Embedding Rotation for Secure Similarity Search
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Storing machine learning embeddings in encrypted form is impractical due to high computing costs associated with frequent decryption, and caching them in unencrypted form undermines security.
Innovation Solution
Implement homomorphic encryption to rotate embeddings through a vector space using an encryption matrix, allowing operations to be performed on encrypted data without decryption, preserving relative positions and enabling secure similarity searches.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If embeddings are stored in encrypted form, then security is improved, but computing resources and processing time increase due to frequent decryption
Solution Approach 1:
The patent replaces the traditional decryption mechanism with a homomorphic encryption system that allows computational operations to be performed directly on encrypted data. Instead of decrypting embeddings to perform similarity searches, the system uses encrypted inner product operations that compute similarity metrics while data remains encrypted, thereby eliminating the computational overhead of repeated decryption while maintaining security.
2Productivity
If embeddings are decrypted for processing, then processing speed is improved, but security is compromised
Solution Approach 1:
The patent substitutes the decryption step with homomorphic encryption operations that enable direct computation on encrypted embeddings. The system performs similarity searches by computing encrypted inner products between query embeddings and stored embeddings, allowing fast processing without ever decrypting the data, thus maintaining both security and processing speed.
Solution Approach 2:
The patent introduces an intermediary homomorphic encryption scheme that acts as a mediator between the encrypted embeddings and the search operation. This intermediary system allows mathematical operations to be performed on encrypted data without exposing the plaintext, enabling secure yet efficient similarity searches through encrypted inner product computations.
3Speed
If embeddings are cached in unencrypted form, then access speed is improved, but security benefits are undermined
Solution Approach 1:
The patent replaces the need for unencrypted caching with a system that caches encrypted embeddings and performs computations directly on the encrypted data. The homomorphic encryption approach allows the system to store embeddings in encrypted form and still perform similarity searches by computing encrypted inner products, eliminating the need to cache unencrypted data while maintaining fast access speeds.
Data Source
AI summary
Disclosed are various embodiments for homomorphic encryption for embeddings. A prompt is tokenized to generate a plurality of prompt tokens. A respective prompt embedding is generated for each of the plurality of prompt tokens, the respective prompt embedding for each of the plurality of prompt tokens representing an encoding of each of the plurality of prompt tokens in a high-dimensional vector space. Then, the respective prompt embedding for each of the plurality of prompt tokens is encrypted by rotating the respective prompt embedding through the high-dimensional vector space to generate a respective encrypted prompt embedding for each of the plurality of prompt tokens.


