Abstract
Recommender systems are essential for modern digital services but pose significant privacy risks to both users and service providers. We present CryptoRec, a secure two-party computation protocol for Recommendation as a Service (RaaS). By co-designing a novel recommender model with homomorphic encryption (HE) primitives, CryptoRec achieves high accuracy while maintaining strict privacy. The model utilizes an item-only latent feature space and relies exclusively on linear operations, making it natively compatible with HE. Evaluations on real-world datasets show that CryptoRec can provide private recommendations in seconds with accuracy competitive with non-private state-of-the-art systems.
Introduction: The Privacy Paradox
Modern recommendation engines require massive datasets of user interactions (ratings, history, preferences) to function effectively. This creates a privacy paradox: users must surrender sensitive personal data for better service, while providers must protect their proprietary models and datasets.
Existing privacy-preserving solutions usually fall into two traps:
- Efficiency: Using general cryptographic tools like Secure Multi-Party Computation (SMC) often results in prohibitive latency.
- Accuracy: Standard machine learning models rely on non-linear functions (like Sigmoid or ReLU) that are extremely difficult to compute on encrypted data. Approximating these functions often leads to a significant drop in recommendation quality.
The CryptoRec Framework
CryptoRec addresses these challenges by constructing a "crypto-friendly" machine learning algorithm. Unlike traditional models that jointly learn user and item features, CryptoRec operates in an item-only latent feature space.
Personalized Representations and Linearity
In this framework, a user's representation is not a static vector but is dynamically captured by aggregating the features of items they have previously rated ($p_u = r_u A$). This approach ensures that the model only requires addition and multiplication operations, which are natively supported by Homomorphic Encryption.
Operational Modes
The protocol supports two primary modes of operation:
- Direct Mode: The server provides immediate recommendations using a pre-trained model. This mode uses the Paillier cryptosystem for additive HE, ensuring high efficiency.
- Re-training Mode: The server fine-tunes the model using the client’s encrypted data to improve accuracy, utilizing "Somewhat Homomorphic Encryption" (SWHE) to handle both additions and multiplications on ciphertexts.
To further optimize performance, CryptoRec employs pruning—removing near-zero parameters—and computation reuse, which identifies and recycles identical encrypted operations.
Experimental Evaluation
The authors evaluated CryptoRec using three industry-standard benchmarks: MovieLens-1M (ml1m), Netflix, and Yahoo-R4. These datasets vary in scale and density, providing a robust test for the system's performance.
Key Results
- Competitive Accuracy: In Direct Mode, CryptoRec’s Root Mean Square Error (RMSE) was within 0.1% to 4.9% of non-private models like I-AutoRec. Re-training further closed this gap to within 0.7% on the Netflix dataset.
- Practical Latency: On the MovieLens-1M dataset, a private recommendation query is processed in approximately 10.9 seconds on a standard PC.
- Low Communication Overhead: Queries are lightweight, typically requiring only 3-5 MB of data transfer, making the system practical for mobile or web applications.
Conclusion
CryptoRec demonstrates that privacy-preserving recommendations do not have to come at the cost of extreme latency or poor accuracy. By designing algorithms specifically for the constraints of cryptographic primitives, we can build secure systems that are practical for deployment. Future work will focus on scaling the system to handle millions of items and incorporating contextual metadata while maintaining the linear efficiency required for real-time performance.
Summary updated