A federated learning approach for distributed data resources under privacy protection constraints
By calculating the similarity and confidence between clients in federated learning, performing weighted average and knowledge distillation, the impact of non-IID data on performance under model heterogeneity is solved, and the robustness and generalization of the model are improved. capabilities, promoting the sharing and collaboration of medical data.
Patent Information
- Application Number
- CN202410881457.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-03
AI Technical Summary
At this stage, in federated learning scenarios with heterogeneous models, non-independent and identically distributed data has a greater impact on model performance, resulting in inconsistent model performance on different clients, making it difficult to achieve ideal results.
Train a local model through each client, obtain local class prototypes and perform weighted aggregation on the server, calculate the similarity and confidence between clients, perform a weighted average of soft predictions based on weights, and learn between clients through knowledge distillation knowledge among each other to generate a global and consistent model.
It effectively reduces the impact of non-IID data on performance in heterogeneous scenarios of the model, improves the robustness and generalization capabilities of the model, and promotes mutual learning and data sharing between medical institutions.
Smart Images

Figure CN118428491B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of federated learning under heterogeneous data, and in particular to a method, apparatus, computer equipment and storage medium for federated learning of distributed data resources under privacy protection constraints. Background Art
[0002] Nowadays, artificial intelligence technology based on machine learning is becoming more and more popular, but it often relies heavily on a large amount of training data when used; however, in practical applications, such as in the field of medical health, data is often distributed across millions or even billions of personal or Internet devices, and it is expensive and time-consuming to collect distributed data into centralized storage devices; in addition, in the field of medical health, due to privacy issues or restrictions of laws and regulations, decentralized data is not allowed to be directly shared. For example, major hospitals and hospitals may have a large amount of valuable medical data, but due to privacy and security issues, they cannot directly exchange and centrally process data; this situation limits the development and application of artificial intelligence technology in the medical field, which urgently requires a solution that can make full use of distributed data resources while protecting data privacy.
[0003] Federated learning is a distributed machine learning paradigm that allows multiple clients (such as medical institutions) to collaborate on training under the premise of privacy protection, and only needs to share model weights or gradient information; Federated learning breaks the data barriers between different clients (such as regions and industries) under the constraints of privacy protection, effectively solves the "data island" problem, and has important research value and practical application significance; Even though federated learning is currently widely recognized, it still faces many challenges; for example, there may be differences in computing power, storage capacity, communication bandwidth, etc. between clients, such as differences in computing power, storage capacity, communication bandwidth, etc. between different hospitals and clinics; this will result in clients often not being able to use the same model architecture for training; however, when clients have different model structures, simple model averaging methods are no longer applicable; different model structures may result in different numbers of model parameters, hierarchical structures, and model types, making simple averaging operations no longer effective.
[0004] In addition to the differences in model structure, federated learning also faces the challenge of uneven data distribution. Since the training data of each client (such as a medical institution) is generated or collected by themselves, there may be significant differences in the data distribution between clients, namely statistical heterogeneity. This uneven data distribution may lead to the common problem of non-independent and identically distributed data. In the case of non-independent and identically distributed data, the performance of the model on different clients may be significantly affected, which is manifested as poor performance of the model on certain data, or even slow convergence. In this case, simply averaging the local models may not achieve the desired effect.
[0005] Therefore, at present, in the scenario of heterogeneous models, the non-independent and identically distributed data in the federated learning system has a greater impact on the model performance, and it is more difficult to apply it in practice. Summary of the invention
[0006] The embodiment of the present invention provides a method for federated learning of distributed data resources under privacy protection constraints, which can solve the problem in the prior art that, in the current federated learning scenario with heterogeneous models, non-independent and identically distributed data in the federated learning system has a significant impact on model performance.
[0007] The embodiment of the present invention provides a method for federated learning of distributed data resources under privacy protection constraints, comprising the following steps:
[0008] Each distributed client trains a local private data set containing multiple data types in its own client to obtain its own local model, obtains the class prototype of each data type in its own local model, and performs weighted aggregation on the class prototype of each data type on the server to obtain the global class prototype;
[0009] Obtain the Euclidean distance between the class prototype of each data type of each client local model and the global class prototype, and use the Euclidean distance between each client prototype to obtain the similarity between clients; use each client local model to obtain the soft prediction of each client on the pseudo data set, and obtain the confidence of each client local model based on the intra-vector variance of each client soft prediction; obtain the weights between clients based on the similarity between clients and the confidence of each client local model;
[0010] The soft predictions output by each client's local model on the public dataset are weighted averaged according to the weights between the clients to obtain the target soft prediction set of each client, and the knowledge within the target soft prediction set of each client is learned through knowledge distillation.
[0011] Preferably, obtaining the global class prototype includes:
[0012] The client uses private data to train the local model and updates the model parameters to obtain the class prototype of each category of the local model;
[0013] The client uploads the updated local model and class prototype to the central server. The server performs weighted aggregation on the class prototypes of each category to obtain the global class prototype. The acquisition formula is:
[0014]
[0015] in: N represents the prototype of class k from client i; k represents the set of clients with class k; represents the global prototype of class k; D i,k Represents the local dataset D i A subset of .
[0016] Preferably, the Euclidean distance between the client prototypes The way to obtain is:
[0017]
[0018] Where: d represents the local prototype of class k from client i and the global prototype of class k from client i The distance metric of .
[0019] Preferably, obtaining the similarity between the clients includes:
[0020] First determine whether the two clients have common classes;
[0021] If there is a common class, the similarity of the two clients is obtained; if there is no common class, the similarity of the two clients is judged to be 0; the acquisition method is:
[0022]
[0023] Where: i,j represents the similarity coefficient between client i and client j; σ represents the scaling hyperparameter; m represents the number of clients; d(C i , C j ) represents the distance between the prototype of client i and the prototype of client j.
[0024] Preferably, obtaining the confidence of the client local model includes:
[0025] Use the client local model to obtain the client soft prediction s(ω j , x), according to the client soft prediction s(ω j , the intra-vector variance of x) Get the confidence of the client model; the confidence is obtained as follows:
[0026]
[0027] in: Represents the normalized confidence weight; represents the intra-vector variance of the client soft prediction, which is m represents the number of clients; l represents a client.
[0028] Preferably, the weights between the clients are obtained in the following manner:
[0029]
[0030] Where: i,j represents the weight of client j to client i; ξ i,j represents the similarity coefficient between client i and client j; represents the normalized confidence weight; α and β are hyperparameters, and α+β=1.
[0031] Preferably, the knowledge distillation includes:
[0032] The global generator G t Generated pseudo data Input to each client model {ω1, ω2, …, ω m}, and obtain the classification soft prediction set {p1, p2, ..., p m};
[0033] The soft predictions are weighted averaged according to the weight parameters to obtain the target soft prediction set of each client.
[0034] The knowledge of other clients is obtained by minimizing the KL divergence between the soft predictions of each model classification and the corresponding target soft predictions; the KL divergence of the corresponding target soft predictions The method of obtaining is:
[0035]
[0036] Where: N represents the number of pseudo data samples;
[0037] The goal is to minimize the distribution p i and The distance between.
[0038] The embodiment of the present invention further provides a federated learning device for distributed data resources under privacy protection constraints, including:
[0039] Prototype module, each distributed client trains a local private data set containing multiple data types in its own client, obtains its own local model, and obtains the class prototype of each data type in its own local model, and performs weighted aggregation on the server for the class prototype of each data type to obtain the global class prototype.
[0040] The evaluation module is used to obtain the Euclidean distance between the class prototype of each data type of each client local model and the global class prototype, and use the Euclidean distance between each client prototype to obtain the similarity between clients; use each client local model to obtain the soft prediction of each client on a pseudo data set, and obtain the confidence of each client local model based on the intra-vector variance of each client soft prediction; obtain the weights between clients based on the similarity between clients and the confidence of each client local model.
[0041] The learning module is used to perform weighted averaging on the soft predictions output by each client's local model on a public dataset according to the weights between the clients, obtain the target soft prediction set of each client, and learn the knowledge within the target soft prediction set of each client through knowledge distillation.
[0042] An embodiment of the present invention further provides a computer device, comprising: a memory and a processor;
[0043] The memory is used to store computer programs;
[0044] The processor is used to implement the steps of a method for federated learning of distributed data resources under privacy protection constraints as described above when executing the computer program stored in the memory.
[0045] An embodiment of the present invention also provides a computer-readable storage medium, characterized in that it is used to store a computer program, which, when executed by a processor, implements the steps of a method for federated learning of distributed data resources under privacy protection constraints as described above.
[0046] The embodiment of the present invention provides a method for federated learning of distributed data resources under privacy protection constraints. Compared with the prior art, the method has the following beneficial effects:
[0047] The present invention quantifies the client local model into local prototype information and global prototype information, uses the local prototype information and the global prototype information to measure the similarity between the user local data distributions and the confidence of the user local model to the pseudo data sample, and obtains the weights between the clients according to the similarity and confidence between the user local data distributions, so as to use the weight parameters to promote efficient mutual learning between users with similar data distributions, reduce the impact of non-independent and identically distributed data of federated learning on model performance in the scenario of model heterogeneity, solve the problem of limited user resources in the cross-device scenario, improve the robustness and generalization ability of the local model, so that its application in the medical field can greatly promote mutual learning between medical institutions, thereby promoting the sharing and collaboration of medical data.
[0048] Moreover, the present invention measures similarity based on data distribution between clients, providing an excellent basis for mutual learning between clients.
[0049] In addition, the present invention uses the prototype information transmitted by the client as a standard to generate data and construct the auxiliary data set required for knowledge distillation, thereby ensuring the privacy and security of the auxiliary data set required for knowledge distillation in medical and health scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic diagram of the main flow of a method for federated learning of distributed data resources under privacy protection constraints provided by an embodiment of the present invention;
[0051] Figure 2 A schematic diagram of the principle framework of a method for federated learning of distributed data resources under privacy protection constraints provided in an embodiment of the present invention;
[0052] Figure 3 A schematic diagram of the principle of a method for federated learning of distributed data resources under privacy protection constraints provided by an embodiment of the present invention when the client is a medical institution;
[0053] Figure 4 A schematic diagram of a framework of a data generation scheme based on prototypes and federated generative adversarial networks for a federated learning method of distributed data resources under privacy protection constraints provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0055] See also Figure 1 to Figure 4 , an embodiment of the present invention provides a method for federated learning of distributed data resources under privacy protection constraints, comprising the following steps:
[0056] Step 1: The client first uses private data to train the local model and updates the model parameters; at the same time, the client calculates the class prototype of each category, that is, the average value of all sample feature vectors belonging to the class.
[0057] Step 2: The client uploads the updated local model and class prototype to the central server.
[0058] Step 3: After receiving the model parameters and class prototypes uploaded by the client, the server averages the prototypes of each class to obtain the global class prototype.
[0059] Step 4: The server measures the similarity between clients by calculating the Euclidean distance between the prototypes uploaded by the clients, thereby constructing a similarity matrix to subsequently promote pairwise collaboration between clients with similar data distributions.
[0060] Step 5: Use the local model to output soft predictions on the synthetic dataset, and calculate the confidence of the client model through the intra-vector variance of the soft predictions. The synthetic dataset is generated by the federated generative adversarial network.
[0061] Step 6: Define weights based on the similarity and confidence between clients, and take a weighted average of the soft predictions output by each model on the public dataset; clients with high similarity and high confidence are given higher weights, and the knowledge of these client models is learned through knowledge distillation.
[0062] Step 7: The client downloads its corresponding local model and global class prototype for the next round of training.
[0063] Starting from the similarity of local data distribution of clients (medical institutions), the present invention combines the idea of knowledge distillation and trains a generator on the server side to generate pseudo data to promote paired collaboration between clients (medical institutions) with similar data distribution. Before performing model optimization operations, the present invention first defines the optimization objectives and prototypes of the personalized federated learning system in the model heterogeneous scenario as follows:
[0064] (I) Assume that there are m clients (medical institutions), C represents the client (medical institution) set, and each client (medical institution) has a i The local private dataset D of (x, y) i , where x and y represent the input features and the corresponding class labels respectively; the global dataset is represented as: D = {D1, D2, ...Dm}, the amount of data for each bureau is: Among them, |D i | is the data volume of the i-th client (medical institution); therefore, the optimization goal of the personalized federated learning system is:
[0065]
[0066] in: Represents the local loss function of the i-th client (medical institution); ω i Represents the model parameters of the client (medical institution); Represents the prediction of client (medical institution) model i for sample x.
[0067] (II) Define a prototype C (k) To represent the prototype of the kth class; for the i-th client (medical institution), the prototype represents the average value of the embedding vector of the instances in category k:
[0068]
[0069] in: represents the embedding function of the client (medical institution), Indicates its parameters; D i,k Represents the local dataset D i A subset of , consisting of training samples belonging to the kth class.
[0070] like Figure 1 As shown, the personalized federated learning method based on prototype and knowledge distillation in the embodiment of the present invention is specifically the following steps:
[0071] S1: Initialize the global prototype and various hyperparameters, select the clients (medical institutions) participating in this round of training, and send the corresponding model parameters and global prototype to the clients (medical institutions) participating in the training.
[0072] S2: After receiving the model parameters, the client (medical institution) trains on the local dataset and updates the model parameters. At the same time, the client calculates the class prototype of each category, that is, the average value of all sample feature vectors belonging to the class.
[0073] On the basis of the above, step S2 specifically includes:
[0074] S21: The client (medical institution) obtains the local prototype by calculating the output of the local model representation layer.
[0075] S22: The client (medical institution) uses the cross entropy loss and the Euclidean distance between the local prototype and the global prototype to train the local model on the local dataset, that is:
[0076]
[0077] in: represents the cross entropy loss of the local model; ω i Represents the local model of client (medical institution) i; represents the prediction of sample x by client (medical institution) model i; y represents the label of sample x; λ is a hyperparameter used to adjust the weight ratio of the loss function; It represents the Euclidean distance between the global prototype and the local prototype, and its expression is:
[0078]
[0079] Where: d represents the local prototype and the global prototype The distance metric of .
[0080] The present invention uses Euclidean distance to measure the distance between the local prototype and the global prototype; in actual scenarios, different distance measurement methods can be adopted according to different situations to better meet the needs.
[0081] S3: The client (medical institution) uploads the calculated local prototype and local model to the server.
[0082] S4: The server aggregates local prototypes to obtain a global prototype, and uses the global prototype as a standard to train the generator, training a generator with stability and similarity to generate pseudo data similar to the local data distribution.
[0083] S5: The server measures the similarity between clients (medical institutions) by calculating the Euclidean distance between the client prototypes uploaded by the clients (medical institutions), and uses the local model to output a soft prediction s(ω j ,ξ r ), the confidence of the client model is calculated by the intra-vector variance of the soft prediction, and the weight is defined by similarity and confidence.
[0084] Based on the above, step S5 specifically includes:
[0085] S51: The server measures the similarity between the local data distributions of the clients (medical institutions) through the Euclidean distance of the prototypes between the clients (medical institutions), that is:
[0086]
[0087] Where: i,jrepresents the similarity coefficient between client (medical institution) i and client (medical institution) j; σ represents the scaling hyperparameter; m represents the number of clients (medical institutions); d(C i , C j ) represents the distance between the prototype of client (medical institution) i and the prototype of client (medical institution) j.
[0088] S52: soft prediction s(ω j ,x) to calculate the confidence, and express this variance as This is the variance of the N total probability values for the N-multi-class classification task; accordingly, the higher the confidence, the higher the client (medical institution) is in predicting the sample, and the higher its reference value; its confidence weight is expressed as:
[0089]
[0090] in: Represents the normalized confidence weight.
[0091] S53: weights are defined by the similarity and confidence between the clients (medical institutions). Clients (medical institutions) with higher similarity are given higher weights; similarly, clients with higher confidence are given higher weights. The specific implementation is as follows:
[0092]
[0093] Where: i,j represents the weight of client (medical institution) j to client (medical institution) i; ξ i,j represents the similarity coefficient between client (medical institution) i and client (medical institution) j; represents the normalized confidence weight; α and β are hyperparameters, and α+β=1, which are used to adjust the contribution ratio between the client (medical institution) similarity and confidence to ensure a good balance between the two, so as to improve the learning efficiency between clients (medical institutions).
[0094] S6: The server uses the generated pseudo data to perform knowledge distillation on the model and promote pairwise collaboration between similar clients (medical institutions).
[0095] In this embodiment, minimizing the KL divergence between model outputs is the goal of global knowledge distillation. By achieving this goal, mutual collaboration between clients (medical institutions) is achieved. Specifically, the global generator G t Generated pseudo data Input to each client (medical institution) model {ω1, ω2, …, ωm}, thus obtaining the classification soft prediction set {p1, p2, …, p m}; Further, the soft predictions are weighted averaged according to the weight parameters to obtain the target soft prediction set of each client (medical institution) Finally, the knowledge of other clients (medical institutions) is obtained by minimizing the KL divergence between the soft predictions of each model classification and the corresponding target soft predictions; then:
[0096]
[0097] Where: N represents the number of pseudo data samples; The goal is to minimize the distribution p i and The distance between.
[0098] S7: After updating each client (medical institution) model through the KL loss function, the client model {ω1,ω2,…,ω m} and the global prototype Sent to the corresponding client (medical institution) for the next round of training until convergence or the maximum number of training rounds is reached.
[0099] like Figure 3 As shown, the data generation method based on the prototype and federated generative adversarial network in the embodiment of the present invention is specifically the following steps:
[0100] The cross entropy loss function is used to enable the ensemble model to classify the synthetic sample into a specific category with high probability; specifically, by minimizing the average soft prediction of the ensemble model and the cross entropy loss between the random labels y, so that the generated pseudo data is more similar to the global data distribution, that is:
[0101]
[0102] in: represents the average soft prediction of the integrated model (i.e., the output of the last fully connected layer); θ G Represents the model parameters of the generator.
[0103] The contrast loss function shortens the distance between the sample and the prototype of the corresponding class through contrastive learning, and increases the distance between the sample and the prototype of the non-corresponding class, so as to make the generated sample more similar to the global data distribution.
[0104] The batch normalization loss module is used to improve the stability of the generator; specifically, the batch normalization (BN) loss is used to make the synthesized data conform to the batch normalization statistics; the BN loss minimizes the distance between the feature map statistics of the synthesized data and the training data of the client (medical institution); therefore, the synthesized data can have a similar distribution to the training data of the client (medical institution), regardless of whether it is non-independent and identically distributed; its specific implementation method is as follows:
[0105]
[0106] Where: θ G represents the model parameters of the generator; m represents the number of clients (medical institutions); C represents the set of clients (medical institutions); and Denotes the generator G t The batch mean and variance of the feature map corresponding to the lth BN layer; μ k,l and Represents the client (medical institution) model ω k Batch mean and variance of the feature map corresponding to the lth BN layer.
[0107] The method of the present invention is suitable for personalized federated learning in a cross-device application environment, and solves the problems of limited user resources, non-independent and identically distributed data, and model heterogeneity in cross-device scenarios; the prototype-based similarity evaluation method of the present invention can effectively measure similarity based on the data distribution between clients, and provides a basis for mutual learning between clients; the data production scheme based on prototypes and federated generative adversarial networks of the present invention uses the prototype information transmitted by the client as a standard to generate data and construct the auxiliary data set required for knowledge distillation, which further ensures the privacy and security of the auxiliary data set required for knowledge distillation in certain sensitive scenarios.
[0108] The present invention utilizes knowledge distillation to transfer knowledge between models, so that users can choose appropriate model architectures according to their device capabilities, while avoiding the risk of user model architecture information leakage; in addition, prototype information is used to measure the similarity between users' local data distributions, thereby promoting efficient mutual learning between users with similar data distributions; finally, a prototype-based generative adversarial network is used to generate auxiliary data sets, further ensuring the privacy and security of the auxiliary data sets required for knowledge distillation in certain sensitive scenarios; on the basis of protecting privacy security and handling model heterogeneity, the tolerance of the federated model to non-independent and identically distributed data is improved, thereby further improving the robustness and generalization ability of the model.
[0109] The embodiment of the present invention further provides a federated learning device for distributed data resources under privacy protection constraints, including:
[0110] Prototype module, each distributed client trains a local private data set containing multiple data types in its own client, obtains its own local model, and obtains the class prototype of each data type in its own local model, and performs weighted aggregation on the server for the class prototype of each data type to obtain the global class prototype.
[0111] The evaluation module is used to obtain the Euclidean distance between the class prototype of each data type of each client local model and the global class prototype, and use the Euclidean distance between each client prototype to obtain the similarity between clients; use each client local model to obtain the soft prediction of each client on a pseudo data set, and obtain the confidence of each client local model based on the intra-vector variance of each client soft prediction; obtain the weights between clients based on the similarity between clients and the confidence of each client local model.
[0112] The learning module is used to perform weighted averaging on the soft predictions output by each client's local model on a public dataset according to the weights between the clients, obtain the target soft prediction set of each client, and learn the knowledge within the target soft prediction set of each client through knowledge distillation.
[0113] An embodiment of the present invention further provides a computer device, including a memory and a processor.
[0114] The memory is used to store computer programs.
[0115] When the processor is used to execute the computer program stored in the memory, the steps of the above-mentioned method for federated learning of distributed data resources under privacy protection constraints are implemented.
[0116] An embodiment of the present invention also provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for federated learning of distributed data resources under privacy protection constraints.
[0117] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for federated learning of distributed data resources under privacy protection constraints, characterized in that: The following steps are involved: Each distributed client trains a local private data set containing multiple data types in its own client to obtain its own local model, obtains the class prototype of each data type in its own local model, and performs weighted aggregation on the class prototype of each data type on the server to obtain the global class prototype; Obtain the Euclidean distance between the class prototype of each data type in each client's local model and the global class prototype, and use the Euclidean distance between each client's prototype to obtain the similarity between clients; Use each client's local model to obtain each client's soft prediction on the pseudo data set, and obtain the confidence of each client's local model based on the variance in the vector of each client's soft prediction; Obtain weights between clients based on the similarity between clients and the confidence of each client’s local model; The soft predictions output by each client's local model on the public dataset are weighted averaged according to the weights between the clients to obtain the target soft prediction set of each client, and the knowledge within the target soft prediction set of each client is learned through knowledge distillation.
2. A method for federated learning of distributed data resources under privacy protection constraints according to claim 1, characterized in that: The obtaining of the global class prototype includes: The client uses private data to train the local model and updates the model parameters to obtain the class prototype of each category of the local model; The client uploads the updated local model and class prototype to the central server. The server performs weighted aggregation on the class prototypes of each category to obtain the global class prototype. The acquisition formula is: in: N represents the prototype of class k from client i; k represents the set of clients with class k; represents the global prototype of class k; D i,k Represents the local dataset D i A subset of .
3. The method for federated learning of distributed data resources under privacy protection constraints according to claim 1, characterized in that: The Euclidean distance between the client prototypes The way to obtain is: Where: d represents the local prototype of class k from client i and the global prototype of class k from client i The distance metric of .
4. A method for federated learning of distributed data resources under privacy protection constraints according to claim 1, characterized in that: The obtaining of similarities between clients includes: First determine whether the two clients have common classes; If there is a common class, the similarity of the two clients is obtained; if there is no common class, the similarity of the two clients is judged to be 0; the acquisition method is: Where: i,j represents the similarity coefficient between client i and client j; σ represents the scaling hyperparameter; m represents the number of clients; d(C i , C j ) represents the distance between the prototype of client i and the prototype of client j.
5. The method for federated learning of distributed data resources under privacy protection constraints according to claim 1, characterized in that: The obtaining of the confidence of the client local model includes: Use the client local model to obtain the client soft prediction s(ω j , x), according to the client soft prediction s(ω j , the intra-vector variance of x) Get the confidence of the client model; the confidence is obtained as follows: in: Represents the normalized confidence weight; represents the intra-vector variance of the client soft prediction, which is m represents the number of clients; 1 represents a client.
6. A method for federated learning of distributed data resources under privacy protection constraints according to claim 1, characterized in that: The weights between the clients are obtained as follows: Where: i,j represents the weight of client j to client i; ξ i,j represents the similarity coefficient between client i and client j; represents the normalized confidence weight; a and β are hyperparameters, and α+β=1.
7. A method for federated learning of distributed data resources under privacy protection constraints according to claim 1, characterized in that: The knowledge distillation includes: The pseudo data generated by the global generator Gt Input to each client model {ω1, ω2, …, ω m }, and obtain the classification soft prediction set {p1, p2, ..., p m }; The soft predictions are weighted averaged according to the weight parameters to obtain the target soft prediction set of each client. The knowledge of other clients is obtained by minimizing the KL divergence between the soft predictions of each model classification and the corresponding target soft predictions; the KL divergence of the corresponding target soft predictions The method of obtaining is: Where: N represents the number of pseudo data samples; The goal is to minimize the distribution p i and The distance between.
8. A federated learning device for distributed data resources under privacy protection constraints, characterized in that: include: Prototype module: each distributed client trains a local private data set containing multiple data types in its own client to obtain its own local model, obtain the class prototype of each data type in its own local model, and perform weighted aggregation on the server to obtain the global class prototype. An evaluation module is used to obtain the Euclidean distance between the class prototype of each data type in each client local model and the global class prototype, and obtain the similarity between clients using the Euclidean distance between each client prototype; Use each client's local model to obtain each client's soft prediction on the pseudo data set, and obtain the confidence of each client's local model based on the variance in the vector of each client's soft prediction; Obtain weights between clients based on the similarity between clients and the confidence of each client’s local model; The learning module is used to perform weighted averaging on the soft predictions output by each client's local model on a public dataset according to the weights between the clients, obtain the target soft prediction set of each client, and learn the knowledge within the target soft prediction set of each client through knowledge distillation.
9. A computer device, characterized in that: Including; memory and processor; The memory is used to store computer programs; The processor is used to implement the steps of a method for federated learning of distributed data resources under privacy protection constraints as described in any one of claims 1 to 7 when executing the computer program stored in the memory.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the steps of a method for federated learning of distributed data resources under privacy protection constraints as described in any one of claims 1 to 7.
Citation Information
Cited By
Federal learning-based edge end model updating method and device, equipment and medium
CN120124781A
Edge - side Model Update Method, Device, Equipment and Medium Based on Federated Learning
CN120124781B
