NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Secure Federated Matrix Factorization

Di Chai, Leye Wang, Kai Chen, Qiang Yang · DOI

Introduction

Matrix Factorization (MF) is a cornerstone of modern recommendation systems, used by platforms like Netflix and Amazon to predict user preferences by learning latent features for both users and items. Traditionally, this process requires centralizing sensitive user data—such as movie ratings or purchase history—on a single server. This centralized approach poses significant privacy risks and increasingly conflicts with data protection regulations like GDPR.

Federated Learning (FL) emerged as a potential solution by allowing users to keep their data on local devices, sharing only model updates (gradients) with a central server. However, this paper demonstrates that gradient-sharing alone is insufficient for privacy, and proposes FedMF (Secure Federated Matrix Factorization) to bridge this critical security gap.

The Vulnerability of Gradients

A common misconception in early federated learning research was that sharing gradients is inherently private because raw data never leaves the device. The authors debunk this by mathematically proving that an "honest-but-curious" server can reverse-engineer a user's private ratings. By observing the gradients sent over two consecutive training steps ($t$ and $t+1$), the server can construct a system of equations to solve for the original latent user profiles and their corresponding ratings. This discovery necessitates a more robust cryptographic approach to federated recommendation.

The FedMF Framework

FedMF addresses the leakage problem by integrating Additively Homomorphic Encryption (HE) into the federated workflow. The framework consists of two primary components:

  1. User-level Distributed MF: The optimization process (Stochastic Gradient Descent) is decentralized. Users compute updates for their own "user profiles" locally and generate gradients for the "item profiles" managed by the server.
  2. Paillier Encryption: To prevent the server from seeing the gradients, FedMF employs the Paillier encryption scheme. This allows the server to perform mathematical additions directly on ciphertexts. Consequently, the server can update the global item profiles using encrypted gradients without ever decrypting or viewing the underlying values.
The FedMF system architecture illustrates the secure communication between the honest-but-curious server and multiple honest users via encrypted channels.

Notably, FedMF does not require a trusted third-party "crypto-provider." Users generate their own keys, ensuring that the server only ever handles encrypted data. The authors also extended the standard Paillier implementation to support floating-point and negative numbers, which are vital for machine learning gradients.

Experimental Evaluation

The researchers evaluated a prototype of FedMF using the MovieLens 100K dataset, a standard benchmark containing 100,000 ratings from 610 users across 9,724 movies. The evaluation focused on three key areas: security, accuracy, and efficiency.

Security and Accuracy

FedMF achieves "ciphertext indistinguishability," ensuring the server learns nothing about user profiles. Unlike Differential Privacy methods that introduce noise and degrade model performance, FedMF is accuracy-equivalent to standard MF. Because encryption is a lossless mathematical transformation, the resulting model's precision is identical to one trained on raw, centralized data.

Efficiency and Performance

The authors tested two operational modes to balance security and speed:

  • FullText: Users upload gradients for all items (including unrated items set to zero). This provides maximum security but is computationally intensive.
  • PartText: Users only upload gradients for items they have actually rated. This mode is significantly faster but leaks metadata regarding which items a user interacted with.
Performance data comparing PartText and FullText modes, showing the computational overhead as the number of items increases.

As shown in the performance analysis, the computational bottleneck lies with the server, which spends approximately 95% of each iteration performing operations on encrypted data. While the overhead is higher than plaintext processing, it remains feasible for real-world applications with moderate item counts.

Conclusion and Future Work

FedMF successfully demonstrates that secure, high-accuracy federated recommendation is possible without sacrificing privacy. While the current model is robust against honest-but-curious servers, future work will focus on scaling the system for millions of items using hardware acceleration and addressing potential metadata leakage in the high-speed PartText mode. Additionally, the researchers aim to harden the protocol against malicious participants who might attempt to poison the global model.

Summary updated

BibTeX
@inproceedings{chai2019secure,
  author = {Di Chai and Leye Wang and Kai Chen and Qiang Yang},
  title = {{Secure Federated Matrix Factorization}},
  booktitle = {IEEE Intell. Syst},
  year = {2019},
  doi = {10.1109/mis.2020.3014880},
}
Figure