Secure Federated Clustering

Songze Li, Sizai Hou, Baturalp Buyukates, Salman Avestimehr

Introduction

Clustering is a cornerstone of unsupervised learning, used extensively for data exploration, pattern recognition, and preprocessing. However, as data increasingly resides on decentralized devices—such as mobile phones or private medical databases—performing clustering within a Federated Learning (FL) framework has become essential. In FL, the goal is to train models across multiple decentralized clients without ever exchanging their raw data.

While several federated clustering methods exist, they often force a trade-off between accuracy and privacy. This paper introduces SecFC (Secure Federated Clustering), a novel protocol that achieves "universal performance"—matching the accuracy of centralized $k$-means clustering exactly—while providing robust, information-theoretic privacy guarantees.

The Challenges of Federated Clustering

Existing federated clustering methods, such as the popular $k$-FED algorithm, suffer from two primary limitations:

  1. Performance Gaps in Non-IID Data: The accuracy of traditional federated clustering is highly sensitive to how data is distributed across clients. In heterogeneous (non-IID) settings—where one client might hold data from multiple clusters while another holds data from only one—these algorithms often fail to converge on the correct global cluster centers.
  2. Privacy Vulnerabilities: Many current methods require clients to share local cluster centers or gradients with a central server. A "curious" server can exploit this information through model inversion attacks to reconstruct the clients' private raw data points.

SecFC was designed to overcome these hurdles by ensuring the global clustering process is mathematically equivalent to centralized clustering while keeping the data hidden from both the server and potentially colluding clients.

The SecFC Framework

The core of SecFC is the adaptation of Lloyd’s algorithm—the standard heuristic for $k$-means—into a secure, distributed framework using Lagrange Coded Computing (LCC).

Lagrange Coded Computing (LCC)

LCC serves as the primary privacy mechanism. Instead of sharing raw data, clients embed their data points into high-degree polynomials mixed with random noise. They then distribute "shares" of these polynomials to other clients. This ensures that no single entity possesses enough information to reconstruct the original data.

Coded Distance Computation and Interpolation

During the clustering iterations, the algorithm must assign data points to the nearest cluster centers. SecFC performs these distance calculations in the "coded domain." The central server receives these coded distances and, through polynomial interpolation, reveals the actual Euclidean distance between a point and a center.

Crucially, the algebraic structure of LCC ensures the server learns only the distance values. It never gains access to the coordinates of the data points or the cluster centers themselves. To further enhance privacy, the authors incorporate Private Set Union (PSU), which prevents the server from identifying which specific client provided which data point, thereby ensuring membership privacy.

Experimental Results

The researchers evaluated SecFC using both synthetic Gaussian mixtures and the Rotated MNIST dataset. In the latter, images were rotated (0°, 90°, 180°, 270°) to simulate the heterogeneous data distributions common in real-world federated systems.

Key Findings

  • Universal Accuracy: In every experimental scenario, SecFC matched the accuracy of the centralized Lloyd algorithm exactly. On the Rotated MNIST dataset, SecFC maintained approximately 99.5% accuracy. In contrast, the $k$-FED baseline dropped to as low as 25.8% in highly heterogeneous settings.
  • Robustness to Heterogeneity: Unlike previous methods that degrade when data is unevenly distributed, SecFC’s performance remains stable regardless of how clusters are partitioned among clients.
  • Information-Theoretic Security: SecFC provides a stronger level of protection than methods relying on computational hardness. Even with infinite computing power, a group of colluding clients (up to a defined threshold $t$) cannot extract information about another client's private data.
  • Computational Efficiency: While more intensive than non-secure methods, SecFC is practically viable. Experiments involving 10,000 data points showed that a single iteration could be completed in less than 16 seconds.

Discussion and Future Work

While SecFC provides a powerful solution for secure clustering, certain challenges remain. Like the standard Lloyd’s algorithm, SecFC is sensitive to initial "seed" points. While the authors utilize a center separation technique for initialization, implementing more advanced secure initialization methods, such as $k$-means++, remains an area for future research.

Additionally, SecFC hides the final cluster centers by default. While this is a privacy feature, some applications require these centers for downstream tasks. The authors suggest that clients could collectively reveal these centers at the end of the protocol if necessary. Finally, because LCC operates on finite fields, real-valued data must be quantized, though the authors provide strategies to minimize the resulting precision loss.

In conclusion, SecFC demonstrates that it is possible to achieve the gold standard of centralized clustering performance within a federated environment without compromising on data privacy.

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