A Federated Learning Client Selection Method and System for Long-Tail Data

By calculating client contribution scores and upload delay, high-quality clients are selected for long-tail data training, the model training problems under large model long-tail data and wireless fading channels are solved, and the universality and stability of the model are improved.

CN117350371BActive Publication Date: 2025-08-05GUANGDONG POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311335536.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2025-08-05
Estimated Expiration
2043-10-16

AI Technical Summary

Technical Problem

The prior art is difficult to effectively process the long-tail data distribution of large models, resulting in a decrease in model robustness and poor model training performance in wireless fading channel environments.

Method used

By calculating the contribution score of the client, select the top N clients with the highest contribution score for long-tail data training, and perform quadratic selection according to the upload delay requirements, and finally aggregate the local model to update the global model.

Benefits of technology

The model's processing capability and robustness of long-tail data is improved, and the transmission efficiency and quality in wireless fading environments are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117350371B_ABST
    Figure CN117350371B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for selecting federated learning clients for long-tail data, comprising: calculating the contribution score of each client and selecting the top N clients whose contribution scores are ranked from high to low; receiving local models uploaded by each of the top N clients, and selecting one or more clients that meet the upload delay requirement as selected clients, wherein the local models are obtained by the clients performing long-tail data training on a first global model sent by a server; aggregating the local models uploaded by all selected clients, and updating the first global model according to the aggregated model to obtain a second global model; the present invention can reduce the impact of long-tail data and wireless fading channels on the performance of the federated learning model, and improve the universality and robustness of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of federated learning technology, and in particular to a method and system for selecting a federated learning client for long-tail data. Background Art

[0002] Large models have a large amount of long-tail data, while individual data points are relatively low in frequency. This means that within the data distribution of large model training, a small number of popular data points account for the majority, while the majority of data points are distributed in the long-tail portion of the large model. Compared to the past, when there was an excessive focus on mainstream popular data or services, the study of long-tail data has made it easier to access and collect large amounts of niche data, thereby better exploring the potential information and opportunities contained in niche data. However, existing technical solutions have difficulty handling the long-tail data distribution of large models, which can easily reduce the robustness of the model.

[0003] Federated learning is a distributed machine learning method that trains models on local devices and transmits only updated model parameters to a central server, thus avoiding large-scale data transmission and data privacy leaks. While protecting data privacy, federated learning also fully utilizes data and computing resources on distributed devices to improve the effectiveness and performance of machine learning. During the federated learning process, existing technologies lack a precise selection mechanism for the server to select clients to participate in global model aggregation, which affects the assessment of the value of client contributions and thus the performance of federated learning.

[0004] In wireless communications, signals propagate through the air from the transmitter to the receiver. This propagation process is affected by various factors, which can gradually weaken the signal strength and affect communication quality. These factors include free-space path loss, multipath fading, damping loss, and obstacle attenuation. However, existing technical solutions rarely address model training in fading channels, particularly those using long-tail data. Therefore, achieving high-performance model training in fading channels is difficult using existing technologies alone. Summary of the Invention

[0005] The present invention provides a method and system for selecting federated learning clients for long-tail data, which solves the impact of long-tail data and wireless fading channels on federated learning performance and selects high-quality clients to participate in global model aggregation, thereby improving the efficiency and stability of model transmission and enhancing the performance of federated learning.

[0006] In order to solve the above technical problems, the present invention provides a method for selecting a federated learning client for long-tail data, comprising:

[0007] Calculate the contribution score of each client and select the top N clients ranked by contribution score from high to low; where N is a preset positive integer;

[0008] Receive the local models uploaded by the first N clients, and select one or more clients that meet the upload latency requirement as selected clients; wherein the local models are obtained by the clients training the first global model sent by the server on long-tail data;

[0009] Aggregate the local models uploaded by all selected clients, and update the first global model according to the aggregated models to obtain a second global model.

[0010] The present invention provides a method for selecting federated learning clients for long-tail data. By using a long-tail data training model, the federated learning model's ability to process long-tail data can be enhanced, thereby improving the model's universality and stability. A client selection mechanism is designed based on the client contribution score and upload delay, and clients are selected twice to ensure that high-quality clients participate in global model aggregation, thereby improving the transmission efficiency and quality of federated learning.

[0011] Furthermore, the contribution score of each client is calculated as follows:

[0012] The server calculates the client's transmission rate;

[0013] The server receives the local prediction logic vectors uploaded by all clients, and then calculates the global prediction logic vector based on the local prediction logic vectors; wherein the local prediction logic vectors are generated by each client by predicting the local test data set according to its own local model and uploaded to the server respectively;

[0014] The server calculates the contribution score of each client based on the local prediction logic vector, the client transmission rate and the global prediction logic vector.

[0015] The embodiment of the present invention designs a contribution score function for the client based on the local prediction logic vector, the global prediction logic vector and the client transmission rate, and comprehensively considers the impact of long-tail data and wireless fading channels on the performance of the federated learning model.

[0016] Furthermore, the server calculates the contribution score of each client based on the local prediction logic vector, the client transmission rate, and the global prediction logic vector, specifically:

[0017] The client's contribution score is calculated as follows:

[0018]

[0019] Where S mrepresents the contribution score of client m, c represents the data prediction category in the local test dataset, C represents the total number of categories predicted by the data in the local test dataset, and R m Represents the client transmission rate, Represents the local prediction logic vector, L c Represents the global prediction logical vector.

[0020] Furthermore, the client transmission rate is specifically:

[0021] The client transmission rate is calculated by the server based on the wireless bandwidth, transmission power, noise parameters and channel parameter information of each client;

[0022] The client transmission rate is calculated as follows:

[0023]

[0024] Where R m represents the transmission rate of client m, W represents the wireless bandwidth, P represents the transmission power, σ 2 represents Gaussian white noise, h m Represents channel parameter information.

[0025] Furthermore, the local prediction logic vector is specifically:

[0026] The local prediction logic vector is generated by each client by predicting the local test data set according to its own local model and uploaded to the server respectively;

[0027] The calculation formula of the local prediction logic vector is as follows:

[0028]

[0029] Where y m Represents the local prediction logic vector of client m, m represents the total number of data in the local test dataset, c represents the data prediction category in the local test dataset, and C represents the total number of categories of data prediction in the local test dataset. Indicates the number of data predicted to be category c in the local test dataset.

[0030] Furthermore, the global prediction logic vector is specifically:

[0031] The global prediction logic vector is calculated by the server based on the local prediction logic vector of each client;

[0032] Among them, the calculation formula of the global prediction logic vector is as follows:

[0033] L={L1,L2,L3,...,Lc ,...,L C}

[0034] Where L represents the global prediction logic vector, c represents the data prediction category in the local test dataset, and C represents the total number of data prediction categories in the local test dataset. Represents the global prediction value of the data predicted as category c in the local test dataset.

[0035] Furthermore, the local model is obtained by the client performing long-tail data training on the first global model sent by the server, specifically:

[0036] The client receives the first global model sent by the server;

[0037] The client obtains a local data set that satisfies a long-tail distribution as a local training data set, and uses the local training data set to train the first global model;

[0038] Among them, the local model obtained after training is specifically expressed as:

[0039]

[0040] Where, represents the local model trained by client m, represents the first global model sent by the server to the client m, F represents the loss function of model training, η represents the learning rate of model training, w represents the model parameters, m represents the total number of data in the local training dataset, D m Represents the local training dataset of client m.

[0041] The embodiment of the present invention selects a local data set that satisfies the long-tail distribution to train the client local model, so that the trained local model can effectively process large model long-tail data, thereby enhancing the processing performance and calculation accuracy of the model.

[0042] Furthermore, the local models uploaded by all selected clients are aggregated, and the first global model is updated according to the aggregated model to obtain the second global model, specifically:

[0043] The second global model is specifically expressed as:

[0044]

[0045] Where, represents the second global model after aggregation, I represents the number of selected clients, Represents the local model uploaded by the selected client.

[0046] In an embodiment of the present invention, the server selects the client twice based on the contribution score and transmission delay, which can accurately evaluate the contribution score and transmission efficiency of each client, thereby ensuring that high-quality clients are selected to participate in the global model aggregation, thereby improving the computing performance of processing long-tail data through federated learning in a wireless fading environment.

[0047] Based on the above method embodiment, the present invention provides a corresponding system embodiment, which provides a federated learning client selection system for long-tail data, including: a primary selection module, a secondary selection module, and a global aggregation module;

[0048] The primary selection module is used to calculate the contribution score of each client and select the top N clients ranked from high to low in contribution score; wherein N is a preset positive integer;

[0049] The secondary selection module is configured to receive the local models uploaded by the first N clients and select one or more clients that meet the upload latency requirement as selected clients; wherein the local models are obtained by the clients performing long-tail data training on the first global model sent by the server;

[0050] The global aggregation module is used to aggregate the local models uploaded by all selected clients, and update the first global model according to the aggregated model to obtain a second global model.

[0051] The embodiments of the present invention have the following beneficial effects:

[0052] The present invention provides a method and system for selecting a federated learning client for long-tail data, which can reduce the impact of long-tail data and wireless fading channels on the performance of the federated learning model and improve the universality and robustness of the model.

[0053] Furthermore, the present invention trains a local model by using a local data set in the client that satisfies the long-tail distribution, thereby enhancing the ability of the local model to process large model long-tail data.

[0054] Furthermore, the present invention designs a contribution score function of the client based on the local prediction logic vector, the global prediction logic vector and the client transmission rate, which can accurately evaluate the contribution and performance of the client in a wireless fading environment.

[0055] Furthermore, the present invention designs a client selection mechanism to select clients based on their contribution scores and transmission delays to ensure that the clients with the best performance participate in global model aggregation, thereby improving the long-tail data processing capabilities of federated learning in wireless fading environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1: A flowchart of an embodiment of a method for selecting a federated learning client for long-tail data provided by the present invention;

[0057] Figure 2 : A system model diagram of an embodiment of the method for selecting a federated learning client for long-tail data provided by the present invention;

[0058] Figure 3 : A structural diagram of an embodiment of a federated learning client selection system for long-tail data provided by the present invention;

[0059] Figure 4 : A structural diagram of an embodiment of a one-time selection module in a federated learning client selection system for long-tail data provided by the present invention;

[0060] Figure 5 : A structural diagram of an embodiment of a long-tail data training module in a federated learning client selection system for long-tail data provided by the present invention. DETAILED DESCRIPTION

[0061] The following will clearly and completely describe the technical solutions of the present invention in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0062] The present invention provides a method and system for selecting a federated learning client for long-tail data, which can reduce the impact of long-tail data and wireless fading channels on the performance of the federated learning model and improve the universality and robustness of the federated learning model.

[0063] Example 1

[0064] Based on the above requirements, an embodiment of the present invention provides a method for selecting a federated learning client for long-tail data. The method flow is as follows: Figure 1 As shown, the method includes steps S1 to S3, and each step is specifically as follows:

[0065] S1. Calculate the contribution score of each client and select the top N clients ranked by contribution score from high to low; where N is a preset positive integer. This step includes steps S1.1 to S1.4, and each step is as follows:

[0066] S1.1. The server calculates the client transmission rate.

[0067] The embodiment of the present invention configures 1 server and M clients. There is a wireless channel between the server and each client for uploading local models and sending global models. The system model is shown in the figure Figure 2 As shown in the figure, all channels experience Rayleigh flat fading, the average channel gain of each client is set to 1, and the AWGN noise power is set to 0.01 W. Unless otherwise specified, the transmit power is 3 W, the wireless bandwidth is 5 MHz, and the delay threshold is 0.20 s.

[0068] The server obtains the wireless bandwidth, transmission power, noise information and channel parameter information of each client and calculates the transmission rate of each client based on the Shannon formula.

[0069] The client transmission rate is calculated as follows:

[0070]

[0071] Where R m represents the transmission rate of client m; W represents wireless bandwidth, P represents transmission power; σ 2 represents Gaussian white noise; h m Represents channel parameter information.

[0072] S1.2. The server receives the local prediction logic vectors uploaded by all clients and then calculates a global prediction logic vector based on the local prediction logic vectors. The local prediction logic vectors are generated by each client using its own local model to predict the local test dataset and are uploaded to the server. This step includes S1.2.1 to S1.2.3, and the details of each step are as follows:

[0073] S1.2.1. Each client calculates its own local prediction logic vector.

[0074] First, the server initializes the deep learning model as the first global model w g , and the first global model w g Each client receives the first global model w sent by the server. g And use it as the initial model of the client, so that w m =w g , where w m represents the initial client model, and m represents the target client.

[0075] Secondly, the client obtains the long-tail dataset CIFAR-10-LT from the big data platform and uses the dataset CIFAR-10-LT as the client's local dataset D. It also selects the dataset that meets the long-tail distribution from the local dataset as the local training dataset D. m. Among them D m ∈D, represents the subset of the long-tail data of the global large model on client m, that is, the local data set of client m that satisfies the long-tail distribution.

[0076] Furthermore, the client uses the local training dataset D m Initial model w for the client m The training is performed and the model obtained after the training is used as the client local model. In this embodiment of the present invention, the number of times each client local model is trained is set to 10 times. The client local model obtained after the training is completed is specifically represented as follows:

[0077]

[0078] Where, represents the local model of client m obtained after training, represents the initial model of client m before training, F represents the loss function of model training, η represents the learning rate of model training, w represents the model parameters, m represents the total number of data in the local training dataset, D m Represents the local training dataset of client m.

[0079] Finally, the client uses the local model obtained after training For the local training dataset D m Make predictions and calculate the local prediction logic vector. The calculation formula of the local prediction logic vector is as follows:

[0080]

[0081] Where y m Represents the local prediction logic vector of client m, m represents the total number of data in the local test dataset, c represents the data prediction category in the local test dataset, and C represents the total number of categories of data prediction in the local test dataset. Indicates the number of data predicted to be category c in the local test dataset.

[0082] S1.2.2. Each client uploads its own local prediction logic vector to the server.

[0083] S1.2.3. The server receives the local prediction logic vectors uploaded by all clients, and then calculates the global prediction logic vector based on the local prediction logic vectors.

[0084] Among them, the calculation formula of the global prediction logic vector is as follows:

[0085] L={L1,L2,L3,...,L c ,...,L C}

[0086] Where L represents the global prediction logic vector, c represents the data prediction category in the local test dataset, and C represents the total number of data prediction categories in the local test dataset. Represents the global prediction value of the data predicted as category c in the local test dataset.

[0087] S1.3. The server calculates the contribution score of each client based on the local prediction logic vector, the client transmission rate and the global prediction logic vector.

[0088] The client's contribution score is calculated as follows:

[0089]

[0090] Where S m represents the contribution score of client m, c represents the data prediction category in the local test dataset, C represents the total number of categories predicted by the data in the local test dataset, and R m Represents the client transmission rate, Represents the local prediction logic vector, L c Represents the global prediction logical vector.

[0091] The local prediction logic vector and global prediction logic vector, obtained by training the client's local model with local long-tail data, reflect the federated learning model's ability to process large-model long-tail data; the client transmission rate reflects the federated learning model's data transmission capability in wireless fading channels. Through step S2, this embodiment of the present invention constructs a client contribution score function based on the local prediction logic vector, the client transmission rate, and the global prediction logic vector. This function comprehensively considers the impact of large-model long-tail data and the wireless fading environment on federated learning performance, achieving optimal selection of client data processing and transmission capabilities.

[0092] S1.4. Sort the clients in descending order of contribution scores, and select the top N clients whose contribution scores are ranked from high to low; where N is a preset positive integer.

[0093] According to the contribution score of each client S m , sort the clients from high to low according to their contribution scores, set the number of clients to be selected N, and select the top N clients in the contribution score ranking.

[0094] S2. Receive the local models uploaded by the first N clients, and select one or more clients that meet the upload delay requirements as selected clients; wherein, the local model is obtained by the client performing long-tail data training on the first global model sent by the server.

[0095] First, the N clients selected in step S1 upload their respective local models to the server. The local models are the client local models obtained in step S1.2.1 after training with the local dataset that satisfies the long-tail distribution.

[0096] Then, the server sets an upload delay threshold T, and one or more clients that successfully upload the local model within the set upload delay threshold T are set as selected clients.

[0097] By setting the upload delay condition through step S2, the client is selected twice, which can filter out clients that have errors in uploading the local model or have poor transmission capabilities and slow transmission rates.

[0098] S3. Aggregate the local models uploaded by all selected clients, and update the first global model according to the aggregated models to obtain a second global model.

[0099] The server receives the local models uploaded by the selected client in step S2, aggregates the received local models, and compares the aggregated model with the global first model w in step S1.2.1. g Update and get the second global model

[0100] The second global model is specifically expressed as:

[0101]

[0102] Where I represents the number of selected clients, Represents the local model uploaded by the selected client.

[0103] An embodiment of the present invention provides a method for selecting federated learning clients for long-tail data. The server selects the client twice based on the contribution score and transmission delay, and can accurately evaluate the contribution score and transmission efficiency of each client, thereby ensuring that high-quality clients are selected to participate in the global model aggregation, thereby improving the computing performance of processing long-tail data through federated learning in a wireless fading environment.

[0104] In this embodiment of the present invention, a performance test was conducted on a proposed federated learning client selection method for long-tail data. Specifically, a large model test dataset was obtained and classification tests were performed on the large model test dataset using both traditional federated learning methods and the federated learning method studied in this invention. The traditional federated learning methods used included FedAvg and FedProx. The classification test results under different test variables are shown in Tables 1, 2, and 3.

[0105] Table 1 shows the model test accuracy of the federated learning method studied in this invention and traditional federated learning methods on large-model, long-tail data with varying degrees of balance, when the test variable is the delay threshold. As shown in Table 1, the test accuracy of the federated learning method studied in this invention is higher than that of the other two traditional federated learning methods, FedAvg and FedProx, when the delay threshold is changed. This is because the present invention comprehensively considers the impact of large-model, long-tail data and wireless fading environments, thereby improving the model test accuracy of federated learning.

[0106] Table 1 Test accuracy under different delay thresholds

[0107]

[0108]

[0109] Table 2 shows the model test accuracy of the federated learning method studied in this invention and traditional federated learning methods on large models with different degrees of balance, when the test variable is transmit power. As shown in Table 2, the test accuracy of the federated learning method studied in this invention is higher than that of the other two traditional federated learning methods, FedAvg and FedProx, when the transmit power is changed. This is because the client selection mechanism designed by this invention takes the client transmission rate and the local prediction logic vector into consideration.

[0110] Table 2 Test accuracy at different transmission powers

[0111]

[0112] Table 3 shows the model test accuracy of the federated learning method studied in this invention and traditional federated learning methods on large-scale long-tail data with varying degrees of balance, when the test variable is wireless bandwidth. As shown in Table 3, the test accuracy of the federated learning method studied in this invention is higher than that of the other two traditional federated learning methods, FedAvg and FedProx, when the wireless bandwidth changes. This is because the present invention designs the client contribution score based on the wireless channel transmission rate, the local prediction logic vector, and the global prediction logic vector, and sets the upload latency requirement to perform secondary client selection.

[0113] Table 3 Test accuracy under different wireless bandwidths

[0114]

[0115] The implementation of the above embodiments of the present invention has the following beneficial effects:

[0116] The present invention provides a method for selecting federated learning clients for long-tail data. By using a long-tail data training model, the method can enhance the federated learning model's ability to process long-tail data and improve the model's universality and stability. A client selection mechanism is designed based on the client contribution score and upload delay, and clients are selected twice to ensure that high-quality clients participate in global model aggregation, thereby improving the transmission efficiency and quality of federated learning.

[0117] Example 2

[0118] Based on the content of the above embodiment, an embodiment of the present invention provides a federated learning client selection system for long-tail data, including: a primary selection module 101, a secondary selection module 102 and a global aggregation module 103. The system structure is as follows Figure 3 shown.

[0119] The primary selection module 101 is used to calculate the contribution score of each client and select the top N clients ranked from high to low in contribution score; wherein N is a preset positive integer;

[0120] The secondary selection module 102 is configured to receive the local models uploaded by the first N clients and select one or more clients that meet the upload latency requirement as selected clients; wherein the local models are obtained by the clients training the first global model sent by the server on long-tail data;

[0121] The global aggregation module 103 is used to aggregate the local models uploaded by all selected clients, and update the first global model according to the aggregated model to obtain a second global model.

[0122] In a possible implementation, the primary selection module 101 has a structure as follows: Figure 4 As shown, it includes: a transmission rate unit 201, a logic vector unit 202, a contribution score unit 203 and a client priority unit 204;

[0123] The transmission rate unit 201 is used by the server to calculate the client transmission rate;

[0124] The logic vector unit 202 is used for the server to receive local prediction logic vectors sent by all clients, and then calculate the global prediction logic vector based on the local prediction logic vectors; wherein the local prediction logic vectors are generated by each client by predicting the local test data set according to its own local model, and uploaded to the server respectively;

[0125] The contribution score unit 203 is used by the server to calculate the contribution score of each client according to the local prediction logic vector, the client transmission rate and the global prediction logic vector.

[0126] The client selection unit 204 is configured to select the top N clients whose contribution scores are ranked from high to low, wherein N is a preset positive integer.

[0127] Furthermore, the contribution score unit 203 is used by the server to calculate the contribution score of each client according to the local prediction logic vector, the client transmission rate and the global prediction logic vector, specifically:

[0128] The client's contribution score is calculated as follows:

[0129]

[0130] Where S m represents the contribution score of client m, c represents the data prediction category in the local test dataset, C represents the total number of categories predicted by the data in the local test dataset, and R m Represents the client transmission rate, Represents the local prediction logic vector, L c Represents the global prediction logical vector.

[0131] Furthermore, the client transmission rate is specifically:

[0132] The client transmission rate is calculated by the server based on the wireless bandwidth, transmission power, noise parameters and channel parameter information of each client;

[0133] The client transmission rate is calculated as follows:

[0134]

[0135] Where R m represents the transmission rate of client m, W represents the wireless bandwidth, P represents the transmission power, σ 2 represents Gaussian white noise, h m Represents channel parameter information.

[0136] Furthermore, the local prediction logic vector is specifically:

[0137] The local prediction logic vector is generated by each client by predicting the local test data set according to its own local model and uploaded to the server respectively;

[0138] The calculation formula of the local prediction logic vector is as follows:

[0139]

[0140] Where y mRepresents the local prediction logic vector of client m, m represents the total number of data in the local test dataset, c represents the data prediction category in the local test dataset, and C represents the total number of categories of data prediction in the local test dataset. Indicates the number of data predicted to be category c in the local test dataset.

[0141] Furthermore, the global prediction logic vector is specifically:

[0142] The global prediction logic vector is calculated by the server based on the local prediction logic vector of each client;

[0143] Among them, the calculation formula of the global prediction logic vector is as follows:

[0144] L={L1,L2,L3,...,L c ,...,L C}

[0145] Where L represents the global prediction logic vector, c represents the data prediction category in the local test dataset, and C represents the total number of data prediction categories in the local test dataset. Represents the global prediction value of the data predicted as category c in the local test dataset.

[0146] In a possible implementation, the global aggregation module 103 is configured to aggregate the local models uploaded by all selected clients, and update the first global model according to the aggregated model to obtain the second global model, specifically:

[0147] The second global model is specifically expressed as:

[0148]

[0149] Where, represents the second global model after aggregation, I represents the number of selected clients, Represents the local model uploaded by the selected client.

[0150] In one possible implementation, the system further includes a long-tail data training module 104;

[0151] The long-tail data training module is used to perform long-tail data training on the first global model sent by the server through the client to obtain a client local model.

[0152] Furthermore, the long-tail data training module 104 has a structure as follows: Figure 5 As shown, it includes: a receiving model unit 301 and a local training unit 302;

[0153] The model receiving unit 301 is configured to receive, through the client, a first global model sent by the server;

[0154] The local training unit 302 is configured to obtain, through a client, a local data set that satisfies a long-tail distribution as a local training data set, and use the local training data set to train the first global model;

[0155] Among them, the local model obtained after training is specifically expressed as:

[0156]

[0157] Where, represents the local model trained by client m, represents the first global model sent by the server to the client m, F represents the loss function of model training, η represents the learning rate of model training, w represents the model parameters, m represents the total number of data in the local training dataset, D m Represents the local training dataset of client m.

[0158] The implementation of the above embodiments of the present invention has the following beneficial effects:

[0159] The present invention provides a federated learning client selection system for long-tail data, comprising: a primary selection module, a secondary selection module, and a global aggregation module. The primary selection module selects clients with strong long-tail data processing capabilities for large models and strong data transmission capabilities in wireless fading environments; the secondary selection module filters out clients that encounter errors during the upload of local models or have poor transmission capabilities or slow transmission rates; and the global aggregation module aggregates the client local models obtained through the two selections and updates the server global model. This system designs a client selection mechanism based on the client contribution score and upload delay, and selects the client twice to ensure that high-quality clients participate in global model aggregation, thereby improving the transmission efficiency and transmission quality of federated learning.

[0160] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for selecting a federated learning client for long-tail data, characterized in that: include: Calculate the contribution score of each client and select the top N clients ranked by contribution score from high to low; where N is a preset positive integer; Receive the local models uploaded by the first N clients, and select one or more clients that meet the upload latency requirement as selected clients; wherein the local models are obtained by the clients training the first global model sent by the server on long-tail data; Aggregating the local models uploaded by all selected clients, and updating the first global model according to the aggregated models to obtain a second global model; Calculating the contribution score of each client includes: the server calculating the contribution score of each client based on the local prediction logic vector, the client transmission rate, and the global prediction logic vector; wherein the client contribution score calculation formula is as follows: Where, Representing the client Contribution score, Represents the data prediction category in the local test dataset, Represents the total number of categories predicted by the data in the local test dataset, Represents the client transmission rate; The local prediction logic vector is generated by each client by predicting the local test data set according to its own local model and uploaded to the server respectively; The calculation formula of the local prediction logic vector is as follows: Where, Representing the client The local prediction logic vector, Represents the total number of data in the local test dataset, Represents the data prediction category in the local test dataset, Represents the total number of categories predicted by the data in the local test dataset, Indicates that the local test data set is predicted as a category The amount of data; The global prediction logic vector is specifically: The global prediction logic vector is calculated by the server based on the local prediction logic vector of each client; Among them, the calculation formula of the global prediction logic vector is as follows: Where, represents the global prediction logic vector, Represents the data prediction category in the local test dataset, Represents the total number of categories predicted by the data in the local test dataset, Represents the predicted category in the local test dataset The global prediction value of the data.

2. The method for selecting a federated learning client for long-tail data according to claim 1, wherein: The contribution score of each client is calculated as follows: The server calculates the client's transmission rate; The server receives the local prediction logic vectors uploaded by all clients, and then calculates the global prediction logic vector based on the local prediction logic vectors; wherein the local prediction logic vectors are generated by each client by predicting the local test data set according to its own local model and uploaded to the server respectively; The server calculates the contribution score of each client based on the local prediction logic vector, the client transmission rate and the global prediction logic vector.

3. The method for selecting a federated learning client for long-tail data according to claim 1, wherein: The client transmission rate is specifically: The client transmission rate is calculated by the server based on the wireless bandwidth, transmission power, noise parameters and channel parameter information of each client; The client transmission rate is calculated as follows: Where, Representing the client The transmission rate, Represents wireless bandwidth, represents the transmit power, represents Gaussian white noise, Represents channel parameter information.

4. The method for selecting a federated learning client for long-tail data according to claim 1, wherein: The local model is obtained by the client performing long-tail data training on the first global model sent by the server, specifically: The client receives the first global model sent by the server; The client obtains a local data set that satisfies a long-tail distribution as a local training data set, and uses the local training data set to train the first global model; Among them, the local model obtained after training is specifically expressed as: Where, Representing the client The trained local model, Representing the client The first global model sent by the server is accepted. Represents the loss function of model training, Represents the learning rate of model training, represents the model parameters, Represents the total amount of data in the local training dataset, Representing the client Local training dataset.

5. The method for selecting a federated learning client for long-tail data according to claim 1, wherein: The aggregating the local models uploaded by all selected clients and updating the first global model according to the aggregated model to obtain the second global model is specifically as follows: The second global model is specifically expressed as: Where, represents the second global model after aggregation, Represents the number of selected clients, Represents the local model uploaded by the selected client.

6. A federated learning client selection system for long-tail data, characterized by: include: Primary selection module, secondary selection module and global aggregation module; The primary selection module is used to calculate the contribution score of each client and select the top N clients ranked from high to low in contribution score; wherein N is a preset positive integer; The secondary selection module is configured to receive the local models uploaded by the first N clients and select one or more clients that meet the upload latency requirement as selected clients; wherein the local models are obtained by the clients performing long-tail data training on the first global model sent by the server; The global aggregation module is used to aggregate the local models uploaded by all selected clients, and update the first global model according to the aggregated model to obtain a second global model; The primary selection module includes a contribution scoring unit; the contribution scoring unit is used by the server to calculate the contribution score of each client based on the local prediction logic vector, the client transmission rate and the global prediction logic vector; wherein the client contribution score calculation formula is as follows: Where, Representing the client Contribution score, Represents the data prediction category in the local test dataset, Represents the total number of categories predicted by the data in the local test dataset, Represents the client transmission rate; The local prediction logic vector is generated by each client by predicting the local test data set according to its own local model and uploaded to the server respectively; The calculation formula of the local prediction logic vector is as follows: Where, Representing the client The local prediction logic vector, Represents the total number of data in the local test dataset, Represents the data prediction category in the local test dataset, Represents the total number of categories predicted by the data in the local test dataset, Indicates that the local test data set is predicted as a category The amount of data; The global prediction logic vector is specifically: The global prediction logic vector is calculated by the server based on the local prediction logic vector of each client; Among them, the calculation formula of the global prediction logic vector is as follows: Where, represents the global prediction logic vector, Represents the data prediction category in the local test dataset, Represents the total number of categories predicted by the data in the local test dataset, Represents the predicted category in the local test dataset The global prediction value of the data.

Citation Information

Patent Citations

  • Image recognition method based on hierarchical federated learning

    CN116363449A

  • Federal learning client selection method and device, equipment and storage medium

    CN116614498A