# On a Framework for Federated Cluster Analysis
## 2 Materials and Methods
### The Federated Fuzzy Clustering Framework
#### 2.2.3 The Complete Framework  
Our proposed framework for federated clustering addresses three core challenges: Estimate the number of clusters in the federated dataset, obtain a cluster result (i.e., centers and a data partitioning) that is similar (or not worse) to the one on the same but centralized dataset, and assess the federated cluster result via a federated validation metric. Note that the challenges are closely related. In order to compare two clustering results (for example, with different numbers of clusters), there must be an evaluation metric. This evaluation metric is the FedFuzzDB index. To obtain the federated clustering result, a federated clustering method must be applied. In our case, this is FedFCM (and for comparison federated fuzzy \(c\)-means with federated averaging). The overall framework applies the following steps:  
1. Decide on a range for number of clusters \(K\) to test: \([K_{min},K_{max}]\). 2. For each \(K\in[K_{min},K_{max}]\): 1. 1. The initial guess for \([K_{min},K_{max}]\) is not subject to a more principled study in this work, but we acknowledge that choosing a good range is crucial. It is known that the Davies-Bouldin index sometimes favors higher number of clusters [40]. Therefore, introducing a tight upper bound can be important. In a federated setting, this is even harder, as some clusters might not even be present in any client's data, but only form when the data are combined (Sections 1.1 and 3.2.1). As a rule of thumb, we note that the minimum number of global clusters is given by the minimum number any client could identify on its own (note that two local clusters might turn out to belong to the same cluster in the global dataset). The maximum is (roughly) given by \(\sum_{l=1}^{P}K_{l}+forming-overlapping\). \(K_{l}\) is the number of clusters locally in client \(l\), \(forming\) is the number of clusters that only form when the data are combined, and \(overlapping\) is the number of clusters that overlap. \(forming\) and \(overlapping\) are the hardest to estimate, even with knowledge from an initial local-only clustering. As a very rough rule of thumb, we apply \(K_{max}\approx\min_{l}K^{(l)}+\max_{l}K^{(l)}\) in our real-world experiment. Before continuing with experiments, we note that there is a potential privacy risk and suggest a simple prevention mechanism. Let us summarize the local information that is required to be shared with the central server for the overall framework. For the execution of federated fuzzy \(c\)-means with \(k\)-means averaging, only the local cluster centers need to be shared, which is already a privacy improvement over some of the existing methods. For the calculation of the FedFuzzDB index, however, each client \(l\) needs to share more information: its number of total data points \(N_{l}\), the total spread \(\sum_{j=1}^{N_{l}}||x_{j}^{(l)}-c_{i}||^{q}\), and the local average assignment vectors \(\sum_{j=1}^{N_{l}}u_{ij}^{(l)}\) for all clusters \(i=1,\ldots,K\). As noted in [21], this information can be used to formulate a system of nonlinear equations where data \(x_{i}^{(l)}\) are the only unknowns (\(i=1,\ldots,N_{l},l=1,\ldots,P\)). While not necessarily easy to solve, this imposes a privacy risk. In [21], the server does not know \(N_{l}\), which is an effective prevention, as they explain. Hence, if we hide \(N_{l}\) from the central server, we prevent the privacy risk. Luckily, the calculation of the FedFuzzDB index only requires \(\sum_{l=1}^{P}N_{l}\). If we outsource the calculation of \(\sum_{l=1}^{P}N_{l}\) to an intermediate server, we can circumvent the risk. Another option is to perform the clustering and the validation on different servers that cannot communicate with each other, as the system cannot be solved for \(X\) without the cluster center information, either. However, that would require that the distances between clusters \(i\) and \(j\) (\(M_{ij}\)) need to submitted to the cluster validation server, e.g., by one of the clients.