## 3 Methodology
### Proposed Framework
#### 3.3.1 FedXAIIDS
Preventing this loss can help tune the model so that it is more left-leaning or right-leaning, which improves its accuracy, resulting in predicted probability aligning better with actual labels. 6. Optimizer: This model employs [PERSON] optimizing techniques with a primary learning ratio of 0.001 to take advantage of momentum and adaptation rates for improved training. [PERSON] adapts the learning rates for each individual parameter, which leads to quicker convergence and resilient performance across different types of issues, making it frequently employed in deep learning models. 3. Global aggregator: The centralized computer consolidates modifications to the model from each client to formulate a unified framework utilizing federated averaging (FedAvg) (4). This method involves the server systematically calculating a weighted average of the parameters (weights) that are achieved from client models according to the magnitude of their local data. The method has shown its efficacy in several fields, for example, a mobile healthcare application [40], IoT-based intrusion detection [41], and picture categorization employing non-IID data [42]. FedAvg enhances the global model by integrating varied local insights while maintaining data privacy, establishing it as a fundamental technique in FL [43]. The calculation is as follows [43], \[\theta^{(t+1)}=\sum_{k=1}^{K}\frac{n_{k}}{N}\theta_{k}^{(t)}\] (4) where * \(\theta^{(t+1)}\) represents the new global model parameters; * \(K\) denotes the number of participating clients; * \(n_{k}\) is the number of local training samples for client \(k\); * \(N=\sum_{k=1}^{K}n_{k}\) is the total number of training samples across all selected clients; * \(\theta_{k}^{(t)}\) represents the locally updated model parameters from client \(k\) at round \(t\). 4. Explainable AI (XAI) integration: Explainability is a crucial characteristic for analyzing different machine learning and deep learning models. In this experiment, the explainable AI technique SHAP was deployed on the global end of the framework, after combining all results from local frameworks. SHAP is a model-agnostic technique that leverages the interpretability of the implemented model in the experiment. SHAP incorporates the Shapely values, which are inspired by game theory, to calculate the contribution of each feature to the projected result [9]. In this study, each characteristic of the data set is represented as a player of a collaborative game, and the result of the proposed framework is considered as the outcome of that game. After that, the SHAP evaluated the Shapely value for all the features separately by calculating the average marginal significance among all possible combinations of features. Therefore, the library for SHAP was implemented to assess the SHAP values for the testing subset of the experimental data set, CICIoT2023. In this proposed framework, Kernel SHAP, an approach that was introduced in the article [9], was deployed to interpret predictions and represent the interpretability of CICIoT2023. This method enables us to achieve insights about the features that are prominently influencing the outcome of the proposed framework. Figure 4: Visual representation of local architecture from [8].