Federal learning client selection method and device based on adaptive genetic algorithm, and storage medium
By applying the client selection method of adaptive genetic algorithm in federated learning, the problem of model training efficiency and performance limitation caused by the heterogeneity of client data distribution is solved, and more efficient model training and better performance are achieved, while ensuring data privacy protection.
Patent Information
- Application Number
- CN202510159760.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-30
AI Technical Summary
In the existing federated learning technology, due to the strong heterogeneity of client data distribution, global model training efficiency and performance are limited.
The client selection method based on adaptive genetic algorithm is adopted to find the optimal combination among a large number of clients through natural selection and genetic mechanisms, optimize the client selection process, improve the generalization ability of the global model, and dynamically adjust the algorithm parameters to meet different needs.
Effectively balance communication costs, improve model performance, improve model accuracy and training efficiency, while maintaining data privacy protection.
Smart Images

Figure CN120069013A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of federated learning, and in particular, to a method, device, and storage medium for selecting federated learning clients based on an adaptive genetic algorithm. Background Art
[0002] Federated Learning (FL), as an innovative distributed machine learning method, is reshaping the mode of data processing and analysis. Federated learning allows clients to update the model using private data while aggregating the updates through a server to protect data privacy. It is particularly suitable for the medical field because medical data is highly sensitive and scattered across different medical institutions. Traditional centralized data processing methods may pose a risk of privacy leakage. Federated learning effectively protects patient privacy by performing data processing locally and sharing only model parameters instead of raw data. Secondly, it can effectively integrate multi-source data from different medical institutions. Through federated learning, medical institutions can cooperate and share knowledge, improving the diagnostic and treatment capabilities of the entire medical system and providing more accurate and personalized medical services for patients.
[0003] In federated learning, there are often significant differences in the data distribution and computing power of each client. This heterogeneity can lead to a slowdown in the convergence speed and a decline in the performance of the global model. Traditional FL algorithms usually assume that all clients are equal in terms of data quality and computing resources, which does not conform to the actual scenario. To solve these problems, client selection is necessary. An optimized client selection strategy is crucial for improving the convergence speed and accuracy of the federated learning model, especially in the face of client diversity and data heterogeneity.
[0004] Although existing research has proposed various client selection strategies, they still face challenges in terms of efficiency and communication cost when improving model performance and dealing with complex scenarios. These methods need to be further optimized in practical applications. For example, some algorithms optimize the selection process by evaluating the data distribution of clients, while other methods group clients based on the similarity between client optimization directions or improve the model accuracy by clustering clients. Although these strategies have their own advantages, there are still problems where the training efficiency and performance of the global model are limited due to the strong heterogeneity of client data distribution. Summary of the Invention
[0005] The object of the present invention is to overcome the defects of the existing technologies mentioned above, in which the training efficiency and performance of the global model are limited due to the strong heterogeneity of client data distribution, and to provide a method, device and storage medium for client selection in federated learning based on an adaptive genetic algorithm, so as to more effectively balance the communication cost and improve the model performance. This method aims to find the optimal combination among a large number of clients through the natural selection and genetic mechanism of the genetic algorithm, optimize the client selection process, improve the generalization ability of the global model, and dynamically adjust the algorithm parameters to enable it to flexibly adapt to different requirements of federated learning.
[0006] The object of the present invention can be achieved by the following technical solutions:
[0007] According to the first aspect of the present invention, a method for client selection in federated learning based on an adaptive genetic algorithm is provided, including the following steps: S1, obtaining multiple current chromosomes, each chromosome including multiple genes, and the gene value representing the client weight; S2, calculating the fitness value of each current chromosome according to a preset fitness function, and selecting the chromosome with the largest current fitness value; S3, performing crossover and mutation operations on the multiple chromosomes by using a preset adaptive genetic algorithm, and returning to S1; S4, based on the chromosome with the largest current fitness value, screening genes that meet the preset conditions to obtain the current optimal chromosome, and completing client selection.
[0008] As a preferred technical solution, the running process of the adaptive genetic algorithm specifically includes a step of adaptively adjusting the crossover probability and a step of updating the gene value of the offspring chromosome; the step of adaptively adjusting the crossover probability is used to obtain the adjusted crossover probability according to the comparison result between the average accuracy of the current local model and the target accuracy; the step of updating the gene value of the offspring chromosome is used to obtain the updated gene value of the offspring chromosome according to the comparison result between a random number and the adjusted crossover probability, and the random number is generated in real time.
[0009] As a preferred technical solution, the adjusted crossover probability is expressed as:
[0010] φ ′ = φ + Δφ
[0011] And
[0012]
[0013] In the formula, φ ′ represents the adjusted crossover probability, φ represents the current crossover probability, Δφ represents the real-time adjustment amount of the crossover probability, TargetAccuracy is the target accuracy, CurrentAccuacy is the average accuracy of the current local model, α is the coefficient for increasing the crossover probability, and β is the coefficient for decreasing the crossover probability.
[0014] As a preferred technical solution, the target accuracy is dynamically set and adjusted according to the results of each federated round, specifically including: in the initial stage, the initial target accuracy is set according to the performance of the client on the test set, and the test set is pre-obtained; during the iteration process, the target accuracy of the next federated round is obtained according to the best average accuracy and the corresponding increment of the current federated round.
[0015] As a preferred technical solution, the initial target accuracy is expressed as:
[0016] TargetAccuracy 0 =Avg(∑H i )+Δ 0
[0017] In the formula, TargetAccuracy 0 represents the initial target accuracy, H i represents the performance of the client on the test set, and Δ 0 represents the initial increment.
[0018] As a preferred technical solution, the change of the gene value of the offspring chromosome is expressed as:
[0019]
[0020] In the formula, ω i ′ represents the updated gene value of the offspring chromosome, that is, the updated client weight, and ω i represents the weight of the current client i; r = Random[0,1), which represents a random number in the interval [0,1); Simulated BinaryCrossover represents the simulated binary crossover operation.
[0021] As a preferred technical solution, the fitness function is expressed as:
[0022]
[0023] And
[0024]
[0025] In the formula, ω i is the weight of client i, θ i is the local model parameter of client i, θ g is the global model parameter, L(θ i ) is the loss function value of client i, and P iIt is the performance metric of client i, expressed as the reciprocal of the loss function. N represents the number of clients, and ||θ i -θ g || represents the norm of the difference between the local model and the global model parameters.
[0026] As a preferred technical solution, genes that meet preset conditions are screened. The specific process includes: determining whether the gene values of each gene in the current chromosome are greater than the preset threshold: if so, retain them; otherwise, discard them.
[0027] According to the second aspect of the present invention, a federated learning client selection device based on an adaptive genetic algorithm is provided, including a memory, a processor, and a program stored in the memory. When the processor executes the program, the method described above is implemented.
[0028] According to the third aspect of the present invention, a storage medium is provided, on which a program is stored, and when the program is executed, the method described above is implemented.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] 1. The present invention uses a preset adaptive genetic algorithm to perform crossover and mutation operations on multiple chromosomes. The gene value represents the client weight, and chromosome reproduction is carried out, that is, a large number of client weight combinations are obtained, and dynamic adjustment is continuously performed, which can realize the dynamic allocation of client weights, more accurately evaluate and select the client combination with the greatest contribution to the global model, that is, the combination with the greatest fitness, complete client selection, and enable the model to better adapt to the diversity of different clients, thereby effectively improving the accuracy, training efficiency, and performance of the model;
[0031] 2. The adaptive genetic algorithm proposed by the present invention flexibly and dynamically adjusts the crossover probability according to the actual situation, can better retain the characteristics of excellent genes of the parents, speed up the speed of finding the optimal client, and make it possible to find the optimal client combination. It can not only maintain the diversity of the population (i.e., the client weight combination), but also avoid the problem of premature convergence;
[0032] 3. The adaptive genetic algorithm proposed by the present invention updates the client weights in real time during the iteration process, making the model training more conform to the actual data distribution and enhancing the adaptability of the model;
[0033] 4. The adaptive genetic algorithm proposed by the present invention performs excellently in protecting data privacy because only the model parameters are transmitted between the server and the client, while the sensitive original data always remains local. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of the overall framework of the method provided by the present invention;
[0035] Figure 2 This is a schematic diagram of the overall process of the method provided by the present invention. Specific implementation manner
[0036] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented on the premise of the technical solution of the present invention, and gives detailed implementation manners and specific operation processes, but the protection scope of the present invention is not limited to the following embodiments.
[0037] Embodiment 1
[0038] As Figure 1 and Figure 2 shown, this embodiment provides a method for selecting federated learning clients based on an adaptive genetic algorithm (hereinafter referred to as the GAFL method). In the figure, GA is the genetic algorithm and AGA is the adaptive genetic algorithm. This method takes the genes on the chromosome as the aggregation weights, and under the evaluation of the fitness function and the reproduction of the adaptive genetics, dynamically finds the optimal weight permutation and combination to be used as the aggregation parameters of the selected clients, while ensuring the protection of the local data privacy of each client. The specific implementation details are as follows:
[0039] Step S1: Obtain multiple current chromosomes, each chromosome includes multiple genes, and the gene value represents the client weight.
[0040] In the initial stage, a group of randomly initialized chromosomes are generated. Each chromosome is composed of a group of genes representing client weights, and these weights determine the influence of each client in the global model training. Specifically, the chromosome consists of a sequence of length N, which represents all N clients. The gene value ω i at the i-th position represents the contribution weight of the i-th client participating in the training to the central server, satisfying ω i ∈(0, 1), and:
[0041]
[0042] Step S2: Calculate the fitness value of each current chromosome according to a preset fitness function, and select the chromosome with the largest current fitness value.
[0043] Evaluate the quality of the chromosomes according to the set fitness function. By calculating the fitness value, the algorithm can identify the client combination that contributes the most to the global model, providing a basis for the selection operation; then the selection operation is responsible for screening out the chromosome with the largest contribution degree from the current population.
[0044] Specifically, the role of the fitness function in the genetic algorithm is to serve as an evaluation criterion. Through iterative optimization, it gradually approaches the optimal client selection scheme, thereby significantly improving the overall performance and efficiency of federated learning. In this method, considering multiple factors, the fitness function is set as:
[0045]
[0046] In the formula, ω i is the weight of client i, θ i is the local model parameter of client i, θ g is the global model parameter, L(θ i ) is the loss function value of client i, P i is the performance metric of client i, expressed as the reciprocal of the loss function, and:
[0047]
[0048] In the formula, ||θ i -θ g || is the norm of the difference between the local model and the global model parameters.
[0049] Based on the value of the fitness function, the quality of the chromosome is judged, and then the quality of the client weight combination is judged, so as to perform client selection. Among them, the larger the fitness value, the better the corresponding client weight combination, that is, the greater the contribution made by the client weight combination.
[0050] As the genetic algorithm evolves continuously, the types of chromosomes obtained become more diverse, and more different weight combinations are obtained, making it easier to find the best client combination.
[0051] Step S3, use the preset adaptive genetic algorithm to perform crossover and mutation operations on multiple chromosomes, and return to step S1.
[0052] Furthermore, the running process of the adaptive genetic algorithm specifically includes a step of adaptively adjusting the crossover probability and a step of updating the gene values of the offspring chromosomes. The application of the adaptive genetic algorithm aims to help chromosomes reproduce. According to the quality of the chromosomes, the crossover probability is adjusted to retain excellent genes. To ensure the effectiveness of each chromosome, it is necessary to normalize the weights of the genes to ensure that the sum of all client weights is 1.
[0053] (1) The step of adaptively adjusting the crossover probability is used to obtain the adjusted crossover probability according to the comparison result between the average accuracy of the current local model and the target accuracy. Specifically:
[0054] Assume that the average accuracy of the current local model is CurrentAccuracy, and the target accuracy is TargetAccuracy. The crossover probability φ can be adaptively adjusted, and the new crossover probability is:
[0055] φ ′ 3φ + Δφ
[0056] In the formula, φ ′ is the adjusted crossover probability, φ is the current crossover probability, and Δφ is the increment adjusted according to the real-time performance, that is, the real-time adjustment amount of the crossover probability, which is calculated by the following formula:
[0057]
[0058] In the formula, α is the coefficient used to increase the crossover probability, indicating that more exploration is needed when the current performance of the client is lower than the target performance; β is the coefficient used to reduce the crossover probability, indicating that more exploitation is needed when the current performance of the client is higher than the target performance.
[0059] For the setting of the target accuracy TargetAccuracy, it depends on the specific application scenario and task requirements. In the GAFL method, the target accuracy is dynamically set and adjusted according to the results of each federated round to better guide the optimization process of the genetic algorithm. Specifically, in the initial stage, according to the performance of the client on the test set (denoted as H i ), the initial accuracy is set as:
[0060] TargetAccuracy 0 = Avg(∑H i ) + Δ 0
[0061] In the formula, Δ 0 represents the initial increment. This initialization setting can ensure that the contributions of each client are fairly considered. By using the average value, the overall performance level of all current clients can be reflected, so as to set a more reasonable initial target.
[0062] During the iteration process, according to the best average accuracy and the corresponding increment of the current federated round, the target accuracy of the next federated round is obtained. Specifically, in order to continuously improve the benchmark of the target accuracy each time, a progressive target based on the current accuracy is adopted later, that is:
[0063]
[0064] In the formula, TargetAccuracy t+1 represents the target accuracy of the next federated round, represents the best average accuracy of the current federated round, and Δt As the increment of each change, which varies with the number of rounds, is expressed as the following formula:
[0065]
[0066] In the formula, ρ is the inverse proportional parameter that determines the attenuation rate, and t is the current number of federated rounds.
[0067] By using the above formula, the gradual decrease of the Δ value can be achieved, making the improvement of the target accuracy gradually slow down, so as to better adapt to different stages of model training. A larger Δ value in the initial stage can promote exploration, while a smaller Δ value in the later stage can enhance development, smoothly guiding the model optimization process.
[0068] (2) The step of updating the gene value of the offspring chromosome is used to obtain the updated gene value of the offspring chromosome according to the comparison result between the random number and the adjusted crossover probability, and the random number is generated in real time. Specifically:
[0069] Combined with the adaptive genetic algorithm, the logic of chromosome crossover can be obtained, and thus the change of the gene value of the offspring chromosome is:
[0070]
[0071] In the formula, ω i ′ represents the updated gene value of the offspring chromosome, that is, the updated client weight, r = Random[0,1), representing a random number in the interval [0,1); Simulated Binary Crossover represents the simulated binary crossover operation.
[0072] After generating the random number r, compare this random number with the crossover probability φ ′ to determine whether to perform gene crossover. By using the comparison between the random number generation and the crossover probability, the frequency and range of gene crossover can be flexibly controlled. At the same time, on the basis of retaining excellent genes, appropriate exploration and optimization are carried out to avoid excessive crossover resulting in the loss of excellent genes. In other words, if a chromosome is not the best but also good, it is not desired to change the gene values too much through crossover mutation, etc., so that it deteriorates due to excessive changes from a good situation. Therefore, if the chromosome is relatively good, the adaptive genetic algorithm can be used to make it change slightly and gradually approach the optimum.
[0073] The Simulated Binary Crossover (SBX) method is widely used in genetic algorithms. It can generate new chromosomes while controlling the degree of variation of the offspring. It simulates the single-point crossover process in binary-coded genetic algorithms and is applied to real-coded chromosomes. Since the gene values, as the client aggregation weights, take values in the real number domain between 0 and 1, this method can effectively handle real-coded chromosomes. Specifically:
[0074] Suppose there are two parent chromosomes c 1 and c 2 , then the generation formulas for the offspring chromosomes c 1′ and c 2′ are as follows:
[0075]
[0076] where σ is determined by the following formula:
[0077]
[0078] In the formula, u is a uniformly distributed random number in the interval [0, 1), and η is a non-negative parameter called the distribution index, which controls the degree of crossover. The smaller the value of η, the wider the distribution of the offspring solutions.
[0079] In summary, the aforementioned adaptive genetic algorithm and SBX crossover method play an important role in chromosome reproduction. Their application can obtain the optimal chromosome, that is, the client aggregation weight, faster and better, so as to subsequently screen out bad clients through threshold judgment and complete the selection.
[0080] Step S4: Based on the chromosome with the largest current fitness value, screen the genes that meet the preset conditions to obtain the current optimal chromosome and complete the client selection.
[0081] Specifically, set a threshold ε, discard the values whose gene values are less than ε, complete the selection of clients, obtain the most excellent chromosome in this round, and then normalize this final chromosome as the weights of different clients to participate in the aggregation of the global model, thereby realizing the selection of clients.
[0082] Next, use the dataset to verify the effectiveness of the method proposed in this embodiment.
[0083] The model in this embodiment is implemented based on PyTorch, and the machine graphics card configuration is GTX3080.
[0084] In this embodiment, five medical datasets are selected for experiments, including: the MIMIC-III dataset, which contains the clinical data of 58,976 patients, such as 26 features including diagnoses, treatments, and laboratory test results; the Breast dataset, which contains 31 morphological and structural features of 569 breast cell biopsy images; the Diagnosis dataset, which covers 58,509 samples and has 40 features and 11 disease classification labels; the HAPT dataset is a multi-modal medical image collection containing 7,495 images and 12 classification labels, supporting complex diagnoses; the RNASeq dataset has 800 samples, and each sample contains 60,660 gene expression features. These datasets provide rich medical information for the model to perform disease classification and diagnostic prediction.
[0085] The GAFL method combines the advantages of genetic algorithms to dynamically optimize client selection and model parameter aggregation, effectively improving learning efficiency and performance. Its adaptive crossover probability adjustment and dynamic target accuracy setting promote the balance between model accuracy and convergence speed. As shown in Table 1, compared with FedAvg, GAFL optimizes the weights aggregated by different clients through genetic algorithms, and improves by 5.29%, 4.90%, 4.57%, 4.97%, and 3.23% on Breast, HAPT, MIMIC, RNASeq, and diagnosis respectively, as shown in Table 1. At the same time, GAFL solves the overfitting problem of FedProx, reduces the dependence on a single client, and also has improvements on multiple datasets. Compared with scaffold, FedCS, and CFL, GAFL shows better flexibility and adaptability when dealing with non-independent and identically distributed (non-IID) data, and can timely adjust the optimization target to cope with changes in data distribution, thus achieving more significant effects in practical applications.
[0086] Table 1 Comparison of experimental results of the GAFL method and other methods on different datasets
[0087]
[0088]
[0089] Example 2
[0090] This embodiment provides a federated learning client selection device based on an adaptive genetic algorithm, including a memory, a processor, and a program stored in the memory. When the processor executes the program, it implements the method in Embodiment 1. The device processor includes a central processing unit (CPU), which can execute various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or computer program instructions loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus. Multiple components in the device are connected to the I / O interface, including: an input unit, such as a keyboard, a mouse, etc.; an output unit, such as various types of displays, speakers, etc.; a storage unit, such as a disk, an optical disc, etc.; and a communication unit, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit allows the device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks. The processing unit executes the various methods and processes described above, such as one or more steps in Embodiment 1. For example, in some embodiments, one or more steps in Embodiment 1 can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device via the ROM and / or the communication unit. When the computer program is loaded into the RAM and executed by the CPU, one or more steps of Embodiment 1 described above can be executed. Alternatively, in other embodiments, the CPU can be configured to execute one or more steps in Embodiment 1 by any other appropriate means (e.g., by means of firmware). The functions described above can be at least partially executed by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip (SOC), complex programmable logic devices (CPLD), and so on.
[0091] Furthermore, this embodiment also provides a storage medium with a program stored thereon, and when the program is executed, it implements the aforementioned method. The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to the processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program codes can be executed entirely on the machine, partially on the machine, executed partially on the machine as an independent software package and partially on a remote machine, or executed entirely on a remote machine or server. In the context of the present invention, a computer-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0092] The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and variations based on the concept of the present invention without creative efforts. Therefore, all technical solutions that can be obtained by those skilled in the art in the technical field of the present invention through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should fall within the protection scope determined by the claims.
Claims
1. A method for selecting a federated learning client based on an adaptive genetic algorithm, characterized in that: The following steps are involved: S1, obtaining multiple current chromosomes, each of which includes multiple genes, and the gene value represents the client weight; S2, calculating the fitness value of each current chromosome according to a preset fitness function, and selecting the chromosome with the largest current fitness value; S3, performing crossover and mutation operations on the plurality of chromosomes using a preset adaptive genetic algorithm, and returning to S1; S4, based on the chromosome with the largest current fitness value, screen the genes that meet the preset conditions, obtain the current optimal chromosome, and complete the client selection.
2. The method for selecting a federated learning client based on an adaptive genetic algorithm according to claim 1, characterized in that: The operation process of the adaptive genetic algorithm specifically includes a crossover probability adaptive adjustment step and an offspring chromosome gene value update step; The crossover probability adaptive adjustment step is used to obtain the adjusted crossover probability according to the comparison result between the average accuracy of the current local model and the target accuracy; The offspring chromosome gene value updating step is used to obtain the updated offspring chromosome gene value according to the comparison result between the random number and the adjusted crossover probability, and the random number is generated in real time.
3. The method for selecting a federated learning client based on an adaptive genetic algorithm according to claim 2, characterized in that: The adjusted crossover probability is expressed as: φ′=φ+Δφ and Where φ′ represents the adjusted crossover probability, φ represents the current crossover probability, Δφ represents the real-time adjustment of the crossover probability, TargetAccuracy is the target accuracy, CurrentAccuacy is the average accuracy of the current local model, α is the coefficient used to increase the crossover probability, and β is the coefficient used to reduce the crossover probability.
4. The method for selecting a federated learning client based on an adaptive genetic algorithm according to claim 3, characterized in that: The target accuracy is dynamically set and adjusted based on the results of each federation round, including: In the initial stage, an initial target accuracy is set according to the client's performance on a test set, where the test set is obtained in advance; During the iteration process, the target accuracy of the next federation round is obtained based on the best average accuracy of the current federation round and the corresponding increment.
5. The method for selecting a federated learning client based on an adaptive genetic algorithm according to claim 4, characterized in that: The initial target accuracy is expressed as: TargetAccuracy0=Avg(∑H i )+Δ0 Where TargetAccuracy0 represents the initial target accuracy, H i represents the performance of the client on the test set, and Δ0 represents the initial increment.
6. The method for selecting a federated learning client based on an adaptive genetic algorithm according to claim 3, characterized in that: The change in the offspring chromosome gene value is expressed as: In the formula, ω′ i represents the updated offspring chromosome gene value, that is, the updated client weight, ω i represents the weight of the current client i; r = Random[0,1), represents a random number in the interval [0,1); Simulated BinaryCrossover represents simulated binary crossover operation.
7. The method for selecting a federated learning client based on an adaptive genetic algorithm according to claim 1, characterized in that: The fitness function is expressed as: and In the formula, ω i is the weight of client i, θ i are the local model parameters of client i, θ g is the global model parameter, L(θ i ) is the loss function value of client i, P i is the performance indicator of client i, expressed as the inverse of the loss function, N is the number of clients, ||θ i -θ g || represents the norm of the difference between the local model and the global model parameters.
8. The method for selecting a federated learning client based on an adaptive genetic algorithm according to claim 1, characterized in that: Screening genes that meet the preset conditions, the specific process includes: Determine whether the gene value of each gene in the current chromosome is greater than the preset threshold: if yes, keep it, otherwise discard it.
9. A federated learning client selection device based on an adaptive genetic algorithm, comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.
10. A storage medium having a program stored thereon, characterized in that: When the program is executed, the method according to any one of claims 1 to 8 is implemented.