## 2 Materials and Methods
### Developing the Improved Federated RHLP Algorithm for Efficient Client Selection
In contrast, k\({}_{3}\) has structural layer parameters that are trained using d\({}_{\text{train}}\)\({}_{k3}\) = (2,2,2), while client k\({}_{\text{x}}\) has structural layer parameters trained with d\({}_{\text{train}}\)\({}_{\text{kx}}\) = (1,2,1). The revised local model for the chosen candidate clients is assessed utilizing their corresponding test datasets (d\({}_{\text{test}}\)). Subsequently, the accuracy of each local model is computed and transformed into a probability value (fitness) that falls within the interval of 0 to 1, employing the established method for determining the performance probability of the local model, as detailed below. Figure 4: New concept of client selection method in Improved RMLP algorithm. The predicted accuracies for the models are as follows: k\({}_{1}\) exhibits an accuracy of 88%, k\({}_{3}\) shows an accuracy of 83%, and k\({}_{\rm x}\) has an accuracy of 86.5%. The local model performance probabilities for each candidate client are computed as follows: P\({}_{\rm k1}\) = 88/257.5 = 0.34, P\({}_{\rm k3}\) = 83/257.5 = 0.32, and P\({}_{\rm kx}\) = 86.5/257.5 = 0.34. The cumulative probability for all candidate clients totals 1. These probabilities are subsequently allocated to a roulette wheel mechanism, where k\({}_{1}\) spans the interval 0.000-0.340, k\({}_{3}\) covers the interval 0.341-0.660 (noting that 0.341 = 0.340 + 0.001), and k\({}_{\rm x}\) ranges from 0.661 to 1.000. A random number is subsequently generated within the interval of 0 to 1, and the client is chosen in accordance with the designated probability ranges. This selection process occurs without replacement during each round of communication. By assigning biased values on the roulette wheel in accordance with the performance of local models, k\({}_{1}\) and k\({}_{\rm x}\) may be randomly selected. Upon selection, these models will transmit their parameters, specifically (w\({}_{\rm k1}\) = 1,1,1) and (w\({}_{\rm kx}\) = 1,2,1) for the purpose of averaging. The revised global model parameters will be determined by the calculation \(\frac{1.11+1.21}{2}=(W_{\rm t}=1,1.5,1)\) prior to their transmission for the forthcoming local model updates in the subsequent communication round. The details of the improved RHLP algorithm are presented in the pseudocode in Algorithm 1. The comprehensive examination presented in Figures 3 and 4 illustrates the advantages of the enhanced Fed-RHLP algorithm, particularly through an analysis of the selection of random biasing factors utilized in both client selection and model aggregation procedures. Additionally, the algorithm offers substantial security measures against potential network attacks, as detailed in the subsequent sections:  
1. Large Datasets: Selecting data repositories that contain extensive datasets has a beneficial impact on the performance of global models. The Law of Large Numbers (LLN) serves as a core tenet in probability theory, underpinning the consistent behavior of sample averages as the size of the sample grows [22]. By augmenting the number of samples, the model is better equipped to represent the actual data distribution, resulting in enhanced accuracy. 2. Label Diversity: The presence of diverse data types within each data repository is essential for the effective training of models, particularly in the context of Federated Learning, where data distribution may not be independent and identically distributed (Non-IID). A heterogeneous dataset enables the model to learn from various data types, thereby enhancing its adaptability and overall performance. From a statistical perspective, increased label diversity contributes positively to model efficacy by providing a more comprehensive understanding of the problem and facilitating a balance between bias and variance. This approach mitigates bias and helps to avoid overfitting, ultimately resulting in improved performance.