# Federated Learning: A Comparative Study of Defenses Against Poisoning Attacks
## 5 Defense Methods
### Krlu
The evaluation of these algorithms involves running experiments that vary three parameters, the percentage of IID data in the training data, the total number of clients, and the percentage of malicious clients, using four popular datasets existing in the literature. Overall, our results show that regardless of the dataset used, the percentage of IID training data, changes in the number of clients, or changes in the percentage of malicious clients, the three algorithms that use clustering, PCA + K-Means, KPCA + K-means, and RPCA + PCA + K-means, consistently performed better in detecting and mitigating attacks, but also consistently performed worse in execution time than the other algorithms that do not use clustering, CONTRA, KRUM, and COOMED. The difference between these two groups of algorithms suggests that the use of clustering provides additional benefits in improving the identification of groups of malicious clients, but incurs additional time overhead. Another conclusion to draw is that, across the variations in the three parameters (percentage of IID data, number of clients, and percentage of malicious clients), KPCA + K-means consistently yielded better prediction accuracy for the global model, and COOMED consistently outperformed others in terms of Precision, Recall, and F1-Score metrics in most cases. In general, RPCA + PCA + K-means was shown to be the most effective algorithm in defending federated learning systems when varying the percentage of IID data, the number of clients, and the percentage of malicious clients, considering the ASR and MC metrics. It was usually followed by KPCA + K-means and PCA + K-means. As future work, we intend to investigate the effectiveness of these algorithms against other types of attacks in federated learning systems, beyond the adversarial attacks considered \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Execution Time** & **PCA +** & **KPCA +** & **CONTRA** & **KRUM** & **COOMED** & **RPCA + PCA + K-Means** \\
**(in min)** & **K-Means** & **K-Means** & **CONTRA** & **KRUM** & **COOMED** & **RPCA + PCA + K-Means** \\ \hline Fashion-MNIST Dataset & 91 & 101 & 95 & 90 & **89** & 109 \\ \hline CIFAR-10 Dataset & 97 & 111 & 96 & **94** & 100 & 124 \\ \hline UCI Adult Census & 4 & 5 & 4 & 4 & 4 & 5 \\ Dataset & & & & & & \\ \hline Epileptic Seizure & & & & & & \\ Recognition Dataset & & & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 10: The execution time (in minutes) when varying the number of malicious clients parameter. so far. Extending this research to cover a wider range of threats would help develop more robust strategies to protect federated learning systems against different types of attacks. **Author Contributions:** Conceptualization, L.G. and J.B.; Methodology, L.G. and J.B.; Software, I.C. and K.H. ; Validation, I.C. ; Investigation, I.C. ; Resources, K.H. ; Writing--original draft, I.C. ; Writing--review & editing, L.G. and J.B.; Visualization, J.B.; Supervision, L.G. and J.B.; Project administration, L.G. and J.B.; Funding acquisition, J.B. All authors have read and agreed to the published version of the manuscript. **Funding:** This research received no external funding. **Institutional Review Board Statement:** Not applicable. **Informed Consent Statement:** Not applicable. **Data Availability Statement:** The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author. **Conflicts of Interest:** The authors declare no conflicts of interest. Figure 17: The impact of the percentage of IID data on recall on: (**a**) Fashion-MNIST dataset; (**b**) CIFAR-10 dataset; (**c**) UCI Adult Census dataset; (**d**) Epileptic Seizure Recognition dataset. Figure A3: The impact of the percentage of IID data on F1-Score in: (**a**) Fashion-MNIST dataset; (**b**) CIFAR-10 dataset; (**c**) UCI Adult Census dataset; (**d**) Epileptic Seizure Recognition dataset.