Secure Federated Clustering

Songze Li, Sizai Hou, Baturalp Buyukates, Salman Avestimehr

Here is a blog-style summary of the paper "Secure Federated Clustering".

TL;DR

SecFC (Secure Federated Clustering) is a new algorithm that brings the exact performance of centralized $k$-means clustering to federated learning environments without sacrificing data privacy. By leveraging Lagrange polynomial encoding, it guarantees information-theoretic privacy against curious servers and colluding clients, all while remaining completely immune to the data heterogeneity issues that plague existing methods.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple decentralized clients to train machine learning models collectively without sharing their raw, private data with a central server. While heavily studied for supervised learning, applying FL to unsupervised tasks like $k$-means data clustering remains a challenge.

Existing federated clustering methods (such as $k$-FED) typically require clients to run local clustering algorithms and send their local cluster centers to a central server. This approach suffers from two major flaws:

  1. Performance Degradation: If the data is highly heterogeneous across clients (non-i.i.d.), the clustering accuracy drops drastically.
  2. Privacy Leaks: Exposing local cluster centers allows a curious server to infer sensitive information about the underlying private datasets via model inversion attacks.

The authors introduce SecFC to bridge this gap, ensuring both "universal performance" (matching centralized $k$-means exactly, regardless of data distribution) and robust data privacy.

Methods

SecFC achieves its goals using a two-phase protocol rooted in cryptography and coding theory:

  • Phase 1: Secure Data Sharing: Clients divide their private data points into segments, mix them with randomly generated noise vectors, and use Lagrange Coded Computing (LCC) to encode them into polynomials. Clients then share these coded data segments with each other. Because of the added noise, up to $t$ colluding clients cannot decode or learn anything about another client's raw data.
  • Phase 2: Coded Center Update: Instead of clustering locally, the clients and the server jointly execute Lloyd’s $k$-means algorithm directly on the coded data. Clients compute "secret shares" of the distances between data points and cluster centers and send them to the server. Leveraging the algebraic structure of the polynomials, the server aggregates these shares to decode the exact pairwise distances between points and centers—without ever learning the actual coordinates of the data points or the cluster centers themselves.

Membership Privacy Extension: The authors also propose an extension using a Private Set Union (PSU) protocol. This ensures that the server and clients can cluster the global dataset without even knowing which specific data point belongs to which client.

Datasets

The authors evaluated SecFC against centralized Lloyd's $k$-means and $k$-FED using both synthetic and real-world datasets:

  • Synthetic Mixture of Gaussians: Isotropic Gaussian clusters generated in a 100-dimensional space, tested under varying levels of standard deviation ($\sigma = 1$ and $\sigma = 20$) and cluster counts ($k = 4$ and $k = 16$).
  • Rotated MNIST: Images of handwritten digits (specifically digits 2 and 3) from the classic MNIST dataset, rotated at 0, 90, 180, and 270 degrees to simulate distinct clusters and highly heterogeneous client data distributions.

Key Insights and Ideas

  • The Distance-Only Privacy Trick: The core "aha moment" of SecFC is realizing that Lloyd's $k$-means algorithm only actually needs the distances between points and centers to update cluster assignments, not the actual positions. By structuring the polynomial encoding carefully, the server can decode the distances while the coordinates remain mathematically black-boxed.
  • Immunity to Data Heterogeneity: Because SecFC mathematically reconstructs the exact distance matrix of a centralized dataset, its performance is entirely invariant to how data is distributed across clients. Whether clients hold perfectly balanced data or highly skewed subsets, the clustering accuracy remains identical to a centralized model.

Key Results

  • Identical to Centralized Accuracy: In all experiments, SecFC achieved virtually identical accuracy to the centralized Lloyd’s algorithm. For example, on the synthetic dataset ($\sigma=1, k=4$), SecFC maintained 100% accuracy across all data distributions.
  • Outperforming the State-of-the-Art: When data was highly non-i.i.d. ($k'=1$, meaning each client only held data from a single cluster), $k$-FED’s accuracy plummeted to 75% (synthetic) and 50.5% (MNIST Digit 2). SecFC maintained 100% and 99.5% accuracy, respectively.
  • Computational Practicality: While SecFC is computationally heavier than one-shot methods like $k$-FED due to its iterative nature, parallelizing the distance computations kept the execution time per iteration under 16 seconds in the worst-case tested scenarios, proving its viability for practical deployment.

Limitations and Future Work

  • The Initialization Problem: Like standard Lloyd's $k$-means, SecFC's final performance depends heavily on how the initial cluster centers are chosen. While techniques like $k$-means++ exist to optimize initialization in centralized settings, adapting them to a privacy-preserving federated framework without leaking data remains an open research question.
  • Explicit Center Knowledge: SecFC keeps cluster centers hidden. However, certain applications (like mean estimation or outlier detection) require explicit knowledge of center coordinates or point ownership. SecFC cannot be directly applied to these scenarios without modifying the protocol to allow a threshold of clients to collectively reveal that data.

Summary updated

BibTeX
@article{li2022secure,
  author = {Songze Li and Sizai Hou and Baturalp Buyukates and Salman Avestimehr},
  title = {{Secure Federated Clustering}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2022},
  url = {https://openreview.net/forum?id=ixWlSq075QA},
}
Figure