TLDR: This research introduces a novel method for privacy-preserving recommendation systems by combining Fully Homomorphic Encryption (FHE) with Compressed Sparse Row (CSR) representation and optimized batching. The approach efficiently handles sparse user-item rating matrices by only processing non-zero elements in the encrypted domain, significantly reducing communication overhead and computational costs while maintaining high recommendation accuracy and end-to-end user privacy.
Recommendation systems are everywhere, from online shopping to streaming services, helping us discover new products and content. While incredibly useful, these systems often rely on our sensitive personal data, leading to significant privacy concerns. Imagine your movie ratings revealing your age or political views – this is a real risk. Traditional methods like anonymization or differential privacy have tried to address this, but often fall short, either by not fully protecting data or by sacrificing recommendation accuracy.
A promising solution for safeguarding user privacy is Fully Homomorphic Encryption (FHE). FHE is a powerful cryptographic tool that allows computations to be performed directly on encrypted data without ever needing to decrypt it. This means your data can remain private throughout the entire recommendation process. However, applying FHE to real-world recommendation systems comes with its own set of challenges, particularly when dealing with “sparse” data.
The Challenge of Sparse Data
In recommendation systems, user-item rating matrices are typically very sparse. This means users usually rate only a small fraction of the available items, leaving over 90% of the matrix entries empty. When using FHE, naively encrypting and processing all these empty (zero) values would be incredibly inefficient and computationally expensive. FHE operations are already intensive, and processing vast amounts of “nothing” would make the system impractical. This also leads to high communication costs, as even encrypted zeros take up space and bandwidth.
A Novel Solution: Compressed Sparse Row (CSR) with FHE
Researchers Moontaha Nishat Chowdhury, Andr´e Bauer, and Minxuan Zhou have proposed a groundbreaking approach to tackle this challenge. Their method combines the Compressed Sparse Row (CSR) representation with FHE-based matrix factorization. CSR is a clever way to store sparse matrices by only keeping track of the non-zero elements, drastically reducing storage and communication overhead. By integrating CSR with FHE, their system avoids encrypting and processing the numerous zero ratings, making the process much more efficient.
Furthermore, the team introduced an optimized batching strategy. Modern FHE schemes can pack multiple plaintext values into a single ciphertext, enabling “Single Instruction Multiple Data” (SIMD) operations. This means multiple calculations can happen in parallel. Their optimized batching technique groups ratings by user-item batch pairs and accumulates gradient updates, significantly reducing the number of expensive encryption operations and boosting computational efficiency.
How the System Works
The proposed system involves three main participants: users, a recommendation server (RS), and a trusted third-party crypto service provider (CSP). It operates in three phases:
- Initialization Phase: The CSP generates encryption keys. Users encrypt their ratings with a public key and send them to the RS. The RS adds a “mask” to these encrypted ratings and shares them with the CSP. The CSP then decrypts these masked encrypted ratings, converts them into a masked CSR matrix, re-encrypts the masked CSR matrix with the public key, and sends it back to the RS.
- Matrix Factorization Phase: This is where the magic happens, entirely on the RS. The RS initializes user and item profiles with random values and encrypts them. Using the encrypted CSR matrix, the RS performs matrix factorization (a core technique for recommendations) through gradient updates, all within the encrypted domain. Crucially, no data is ever decrypted during this phase. The RS then adds a mask to the predicted ratings matrix and sends it to the CSP.
- Recommendation Phase: The CSP decrypts the masked predicted rating matrix and sends the masked plaintext recommendations to the users. Because the mask values are known only to the RS and the users, neither the RS nor the CSP ever sees the actual plaintext ratings. This dual-layer protection—encryption combined with masking—ensures robust privacy.
Also Read:
- Making Differentially Private SGD Faster and More Accurate with Dynamic Quantization
- Securing AI on the Go: A Look at Privacy and Security in Mobile Large Language Models
Impressive Results and Benefits
The experimental results of this new approach are highly encouraging. Compared to previous privacy-preserving methods, this FHE-only system achieves significantly lower communication costs. Data is exchanged only once during initialization and recommendation, rather than repeatedly during every iteration of the matrix factorization process, which can involve dozens of iterations. This translates to a substantial reduction in bandwidth usage.
In terms of computational efficiency, the FHE-based methods are much faster than approaches relying on garbled circuits. While some prior methods achieved faster computation by operating on decrypted masked data, they compromised security and incurred high communication overhead. The optimized batching strategy further enhances computational speed, especially as the number of non-zero ratings increases.
Importantly, the system maintains high recommendation accuracy, demonstrating an approximately 87% reduction in Root Mean Squared Error (RMSE). This shows that privacy can be preserved without sacrificing the quality of recommendations. The system also offers enhanced security with 128-bit encryption.
This research represents a significant step forward in building truly private and efficient recommendation systems. By cleverly combining Compressed Sparse Row representation with Fully Homomorphic Encryption and optimized batching, the authors have paved the way for a future where personalized recommendations don’t come at the cost of user privacy. You can read more about this innovative work in their paper: Efficient Privacy-Preserving Recommendation on Sparse Data using Fully Homomorphic Encryption.


