Personalized Federated Learning with Optimized Contrastive Learning for Intrusion Detection System
Quan Hong Ngo, Van T.B Pham, Ly Vu · 2024
Machine learning (ML) and Deep Learning (DL) techniques have demonstrated their outstanding performance in Intrusion Detection Systems (IDSs). Neverthe-less, the traditional training of ML and DL based models requires centralized data leading to many privacy and security concerns. Federated Learning (FL) addresses these problems by allowing models to be trained in decentralized devices. Despite its benefits, FL has faced problems related to non-independent and identically distributed (non-IID) data. In this paper, we propose a novel FL system named Personalized Federated Learning with Optimized Contrastive Learning (pFLOCL) that incorporates a Con-trastive Loss and L2 Regularization to enhance the robust FL with non-IID data. The Contrastive Loss helps local models of the proposed system align better with the global model without loosing personalization, while the use of L2 Regularization prevents overfitting by penalizing large weights, therefore improving generalization. We evaluate the effectiveness of the proposed system on three public datasets in comparisons two three common FL systems. The experimental results suggest that our proposed system significantly improves the accuracy and robustness of FL systems for IDSs in non-IID environments.