Robustness federated learning method based on dynamic aggregation weight and prototype guidance
Through a robust federated learning method guided by dynamic aggregation weights and prototypes, drifting clients are detected and marked, and client complementarity and similarity are dynamically evaluated. Combined with dual-prototype guided distillation training, the problem of global model performance degradation caused by concept drift and malicious clients in federated learning is solved, and the robustness and adaptability of the model are improved.
Patent Information
- Application Number
- CN202510826650.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-10-10
AI Technical Summary
Existing federated learning methods are difficult to achieve satisfactory results in complex environments where concept drift and malicious clients coexist. Traditional robust aggregation methods often lack mechanisms to resist malicious attacks and have difficulty distinguishing update differences caused by real data drift, resulting in a decline in global model performance.
A robust federated learning method based on dynamic aggregation weights and prototype guidance is adopted. Through the organic combination of drift client detection, dynamic weight aggregation and knowledge distillation, drift clients are detected and marked, client complementarity and similarity are dynamically evaluated, different aggregation weights are assigned, and the robustness and adaptability of the model are improved through dual-prototype guided distillation training.
It improves the adaptability and generalization ability of the global model to heterogeneous data, significantly reduces communication and computing overhead, enhances the generalization performance of the model in concept shift scenarios, and reduces the impact of malicious updates.
Smart Images

Figure CN120764626A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a robust federated learning method based on dynamic aggregation weights and prototype guidance, and belongs to the technical field of federated learning. Background Art
[0002] Google first proposed federated learning, a new distributed machine learning framework, in 2016. Its goal is to address the data silo problem of traditional deep learning architectures while protecting data privacy. Federated learning enables multiple clients to collaboratively learn an adaptable global model without transmitting local private data to a server. This is a new learning framework that offers efficient communication and privacy protection. With the widespread application of federated learning in mobile devices, the Internet of Things, and edge computing, non-IID data distribution and concept drift are becoming increasingly common in real-world scenarios. Furthermore, malicious clients may exist in open federated learning environments, disrupting global model training by uploading anomalous model updates. These factors can lead to degraded global model performance, severely limiting the reliability and adaptability of federated learning systems in practice.
[0003] In the federated learning scenario, changes in the statistical distribution of local client data lead to concept drift. For example, different medical institutions may give different pathology grades to the same pathology image due to differences in annotation standards, or voice assistants in different regions may have ambiguity in instructions with the same accent. This kind of cross-client concept inconsistency will significantly reduce the generalization ability of the global model to unseen clients or public test sets. <Proceedings of the Twenty-fifthInternational Symposium on Theory, Algorithmic Foundations, and ProtocolDesign for Mobile Networks and Mobile Computing> , 2024, pp. 151-160) proposed introducing prototype representations in federated learning to capture changing concepts. For example, the historical federation (FedStream) method in stream federated learning leverages client prototype vectors to dynamically represent evolving concepts in the data stream, thereby improving the model's adaptability to concept drift in the data stream. However, these methods primarily focus on detecting and adapting to concept drift and lack countermeasures for potentially malicious clients. When concept drift and malicious attacks coexist, simply adjusting the clients participating in training or updating the model may not be sufficient to ensure the robustness of the global model.
[0004] Furthermore, in federated learning, malicious clients may intentionally exploit erroneous data to train or tamper with local model updates, injecting distortions, noise, or malicious gradients with triggering conditions into the global model, causing a sharp drop in model accuracy or generating erroneous outputs in critical scenarios. To combat such attacks, researchers have proposed a variety of robust aggregation strategies. For example, by measuring the similarity or Euclidean distance between client updates, only the closest updates are selected for aggregation. Other methods include removing extreme values on each axis to mitigate anomalous gradients. Others identify potentially malicious nodes based on constructing undirected graphs and then performing weighted averaging after excluding them. However, these methods often rely on static distances or statistical rules, making it difficult to distinguish update differences caused by real data drift. They can easily misjudge legitimate clients as attackers, thus compromising the model's adaptability to new distributions. Furthermore, using fixed aggregation weights after removing or weakening some updates fails to fully leverage the complementary advantages of heterogeneous data across clients. Overly aggressive filtering strategies can weaken the model's learning effectiveness for rare samples and minority categories. In addition, these algorithms are usually accompanied by challenges such as high computational overhead, increased system latency, and complex parameter adjustment in actual deployment. There is an urgent need to design a more flexible and dynamic aggregation mechanism that takes into account both robustness and learning performance.
[0005] In summary, existing federated learning methods struggle to achieve satisfactory results in complex environments where concept drift and malicious clients coexist. Methods addressing concept drift often lack mechanisms to defend against malicious attacks, while robust aggregation methods can overlook the useful knowledge inherent in semantic differences across clients and even misclassify clients whose distribution deviates due to concept drift as anomalous nodes, thereby weakening their legitimate contributions. Therefore, a new federated learning method is urgently needed that can simultaneously mitigate the model degradation caused by concept drift and the security risks posed by malicious clients while protecting data privacy, and achieve better global model performance in complex heterogeneous environments. Summary of the Invention
[0006] In response to the above-mentioned shortcomings of the existing technology, the present invention provides a robust federated learning method based on dynamic aggregation weights and prototype guidance, which aims to solve the problem of global model performance degradation in federated learning due to dynamic changes in client data distribution and interference from malicious clients.
[0007] The technical solution of the present invention is a robust federated learning method based on dynamic aggregate weights and prototype guidance. This method organically combines drift client detection, dynamic weight aggregation, and knowledge distillation to minimize the adverse effects of abnormal information on the model while retaining useful information, thereby improving the robustness and adaptability of federated learning. The method specifically includes the following steps:
[0008] Step 1: After each client undergoes local pre-training, a local model is obtained. The clients then evaluate the classification accuracy of the local model. Based on the evaluation results, the clients are classified into trusted clients and drifting clients using voting rules.
[0009] Step 2: Extracting trainable vectors from the trusted client and the drift client respectively, and constructing a positive prototype set and a negative prototype set based on the trainable vectors;
[0010] Step 3: Calculate the similarity and complementarity of each client, obtain the dynamic weight of each client in the global model aggregation based on preset rules, the similarity and the complementarity, and combine the dynamic weights of all clients to obtain a dynamic aggregation weight matrix;
[0011] Step 4: Merge the models in the trusted client based on a preset merging threshold;
[0012] wherein, based on the trusted client and the corresponding dynamic aggregation weight matrix, the model pairs whose similarity and complementarity meet the preset merging threshold are merged to generate a new model, and the corresponding dynamic aggregation weight matrix is updated, and the merging operation is repeated until the last model of the trusted client remains, and the last model is used as the trusted client aggregation model;
[0013] Wherein, when performing the merging operation, if there is no model pair that meets the preset merging threshold, the preset merging threshold is increased. If there is still no model pair that meets the preset merging threshold after increasing the preset number of times, the model pair with the highest similarity is forcibly aggregated;
[0014] Step 5: Perform distillation training based on the trusted client aggregation model, the positive prototype set, and the negative prototype set, and send the trained model to each client for the next round of iteration. Robust federated learning is achieved through multiple rounds of iteration.
[0015] Optionally, the classification accuracy is the accuracy of each client in its own validation set. The model being evaluated The accuracy of each category is calculated by the following formula:
[0016]
[0017] Where, For the client To the client No. Class accuracy, Acc is the function for calculating classification accuracy.
[0018] Optionally, after obtaining the mutual evaluation results of the classification accuracy of all clients, a voting rule is constructed to divide all clients, including:
[0019] Preset a threshold , using the client Self Class accuracy minus threshold , get a discriminant value;
[0020] When the client To the client No. Class Accuracy When it is less than the judgment value, the voting result is recorded as " right Cast a vote”;
[0021] The server aggregates all client voting results. If the client If the number of votes received in any category is greater than the preset threshold, the client The clients are divided into drift clients, and the rest are divided into trusted clients. Drift clients include concept drift clients and malicious clients.
[0022] Optionally, Step 2 includes:
[0023] Step 2.1: Extract a trainable vector representing the global normal data distribution from the trusted client , which is converted by the server into a global prototype with the same shape, and the positive prototype set is obtained ;
[0024] Step 2.2: Extract the trainable vector representing the concept skewed data distribution from the drift client , which is converted by the server into a global prototype with the same shape, and the negative prototype set is obtained ;
[0025] Step 2.3: Save the positive prototype set and the negative prototype set on the server as the data source for distillation training.
[0026] Optionally, Step 3 includes:
[0027] Step 3.1: Server Update the parameter vector set for each model uploaded by the client Perform principal component analysis to update the parameter vector set of the high-dimensional model Mapping to low-dimensional principal component space , extract one or more principal component vectors that characterize the client's change characteristics, where, is the parameter weight of the model;
[0028] Step 3.2: Calculate the similarity of any two client model parameter vectors to obtain the similarity that reflects the degree of similarity between the client models. ;
[0029] Step 3.3: Calculate the complementarity of any two clients based on the principal component vector , to quantify the degree of complementarity of the information provided by the two clients, where the complementarity is measured by the angle difference between the principal component vectors of the two clients;
[0030] Step 3.4: Comprehensive similarity and complementarity , assign the dynamic weight of each client in the global model aggregation according to the preset rules, and form the dynamic weights of all clients into a dynamic aggregation weight matrix ,in, Indicates the first Client relative to the The weight ratio of the client's contribution, and Normalize by row or column to satisfy the constraint that the weights sum to 1.
[0031] Optionally, the preset rules include:
[0032] When the similarity between trusted clients is higher than the preset threshold but the complementarity is lower than the preset threshold, the weights are evenly distributed, and the higher the complementarity, the higher the weight distribution;
[0033] The lower the similarity between the drift client and the trusted client, the lower the weight assigned.
[0034] Optionally, the updating of the corresponding dynamic aggregation weight matrix includes:
[0035] When the trusted client model set There is similarity and complementarity in the content that meets the preset merging threshold A pair of models When, right exist The weight in , Perform weighted average merging, the expression is:
[0036]
[0037] Use weighted average to combine the models replace , and update the corresponding rows and columns in the dynamic aggregation weight matrix.
[0038] Optionally, performing distillation training based on the trusted client aggregation model, the positive prototype set, and the negative prototype set includes:
[0039] The trusted client aggregation model As the teacher model and student model in distillation training, before training begins, It is both a teacher model and a student model. After starting training, Just a student model, a prototype set and negative prototype sets As unlabeled training samples;
[0040] The prototype set Input the student model to obtain the predicted probability distribution , and lock its gradient as the teacher model softmax probability, and convert the softmax probability data structure into a confidence label ;
[0041] The student model is trained on the positive prototype set to obtain the log probability of the student model , thus constructing the loss function :
[0042]
[0043] in, For the prototype set The total number of categories included in is the cross entropy loss function, is the log probability of the student model The log probability of the class, The confidence label The label of the class;
[0044] Train the student model on the negative prototype set and construct the loss function :
[0045]
[0046] in, Negative prototype set The total number of categories included in For the prototype set Middle the prototype vector of the class, Negative prototype set Middle the prototype vector of the class, To obtain the maximum value function, is the preset threshold;
[0047] Constructing the total loss function :
[0048]
[0049] in, For the preset ratio, when the total loss function converges, a robust global model that retains the trusted client knowledge and suppresses the influence of drifting clients is obtained for the next round of iteration.
[0050] Compared with the existing methods, the technical solution of the present invention has the following significant beneficial effects:
[0051] (1) Traditional robust aggregation often performs hard filtering on clients that are judged to be abnormal, resulting in a large loss of cross-client differential knowledge. The present invention does not simply eliminate clients that have drifted, but instead gives them a certain weight through complementarity evaluation and incorporates their useful knowledge into the global model in the subsequent distillation stage. This not only retains the new information contained in the cross-client differential data, but also avoids the information loss caused by excessive filtering in existing robust methods, and improves the adaptability and generalization ability of the global model to heterogeneous data.
[0052] (2) Traditional robust aggregation often relies solely on the similarity between clients, resulting in the loss of cross-client differential knowledge. Multi-model federated learning methods require the storage of multiple models, which consumes a large amount of communication and computing resources. The present invention uses a joint measure of similarity and complementarity to comprehensively consider the similarity and complementarity between client models during the aggregation process, so that the global model can explicitly learn different insights into differential knowledge while maintaining mainstream semantic consistency, making maximum use of limited data. At the same time, the present invention hierarchically aggregates multiple models into one model through hierarchical aggregation, significantly reducing communication and computing overhead.
[0053] (3) The dual-prototype guided distillation mechanism proposed in this paper enables the distillation target to cover both the normal mode prototype and the shifted mode prototype. Under the joint constraint of the total loss function, the student model not only inherits the discriminative ability of the trusted client, but also quickly corrects the response to normal and skewed concepts through contrast and negative distillation, thereby achieving higher generalization in data distributions with concept skew. Compared with traditional methods that rely solely on parameter averaging, this paper allows the global model to explicitly learn "what to learn" and "what to forget" in the concept shift scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a schematic flow diagram of the present invention;
[0055] Figure 2 It is a structural schematic diagram of the present invention. DETAILED DESCRIPTION
[0056] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0057] Example 1: Figure 1 As shown in FIG, a robust federated learning method based on dynamic aggregation weights and prototype guidance includes the following steps:
[0058] Step 1: After each client undergoes local pre-training, a local model is obtained. The clients then evaluate the classification accuracy of the local model. Based on the evaluation results, the clients are classified into trusted clients and drifting clients using voting rules.
[0059] Specifically, the classification accuracy is the accuracy of each client in its own verification set. The model being evaluated The accuracy of each category is calculated by the following formula:
[0060]
[0061] Where, For the client To the client No. Class accuracy, Acc is the function for calculating classification accuracy.
[0062] Furthermore, after obtaining the mutual evaluation results of the classification accuracy of all clients, a voting rule is constructed to divide all clients, including:
[0063] Preset a threshold , using the client Self Class accuracy minus threshold , get a discriminant value;
[0064] When the client To the client No. Class Accuracy When it is less than the judgment value, the voting result is recorded as " right Cast a vote”;
[0065] The server aggregates all client voting results. If the client If the number of votes received in any category is greater than the preset threshold, the client The clients are divided into drift clients, and the rest are divided into trusted clients. Drift clients include concept drift clients and malicious clients.
[0066] It should be understood that the client has independent local data and only communicates with the server. It does not directly exchange data with other clients. The client is responsible for receiving the model parameters sent by the server, performing a few rounds of warm-up training locally, and sending the trained model updates to the server.
[0067] Before training begins, the server randomly initializes global model parameters and distributes them to each client. After each round of training, the server collects client model updates and sequentially performs the following steps: drift client identification, dynamic weight calculation, hierarchical fusion, dual prototype extraction, and prototype-guided distillation update. Finally, the updated global model is sent to the client.
[0068] Further, combined with Figure 2 To further describe the present invention in detail, in this embodiment, there are 10 clients (numbered 0-9), and all 10 clients are selected to participate in each round of training. The drifting clients identified by the voting rule are 0, 2, 4, and 6, and the remaining clients are trusted clients (1, 3, 5, 7, 8, and 9). The specific steps are as follows:
[0069] Step 1.1: Each client Get a local model by short warm-up training locally , and the local model Send to server;
[0070] Step 1.2: The server sends each client model to the remaining 9 clients as the evaluated model , the clients conduct mutual evaluation of classification accuracy;
[0071] Step 1.3: When the client To the client No. Class Accuracy When it is lower than its own accuracy rate of 0.3 or more, ,Record" right Cast a vote”;
[0072] Step 1.4: The server aggregates the votes. If the number of votes received by client u in any category is ticket( = 10), it is marked as a drift client. According to this rule, in this embodiment, the clients identified as drift clients are numbered 0, 2, 4, and 6; the rest are trusted clients.
[0073] Step 2: Extracting trainable vectors from the trusted client and the drift client respectively, and constructing a positive prototype set and a negative prototype set based on the trainable vectors;
[0074] Step2.1: Extracting trainable vectors representing global normal data distribution from the trusted clients (1, 3, 5, 7, 8, 9) , which are converted by the server into global prototypes with the same shape, obtaining a positive prototype set ;
[0075] Step2.2: Extracting trainable vectors representing concept skewed data distribution from the drifting clients (0, 2, 4, 6) , which are converted by the server into global prototypes with the same shape, obtaining a negative prototype set ;
[0076] Step2.3: Saving the positive prototype set and the negative prototype set in the server as a data source for distillation training, which is used to guide global model learning.
[0077] Step3: Calculating the similarity and complementarity of each client, obtaining the dynamic weight of each client in global model aggregation based on the preset rule, the similarity and the complementarity, and combining the dynamic weights of all clients to obtain a dynamic aggregation weight matrix;
[0078] Step3.1: The server performs principal component analysis on the model update parameter vector set uploaded by each client , maps the high-dimensional model update parameter vector set to a low-dimensional principal component space , and extracts one or more principal component vectors representing the change characteristics of the client, wherein, is the parameter weight of the model;
[0079] Step3.2: Calculating the similarity of the model parameter vectors of any two clients, obtaining the similarity reflecting the closeness of the client models;
[0080] Specifically, the similarity can be represented by cosine similarity or the reciprocal of Euclidean distance. In this embodiment, cosine similarity is taken as an example, obtaining the similarity ;
[0081] Step3.3: Calculating the complementarity of any two clients based on the principal component vectors to quantify the complementarity of the information provided by the two clients, wherein the complementarity is measured by the difference in the angle between the principal component vectors of the two clients;
[0082] Step3.4: Integrating the similarity and the complementarity , the preset rule is used to allocate a dynamic weight of each client in the global model aggregation, and dynamic weights of all clients are combined into a dynamic aggregation weight matrix , wherein, represents a weight ratio of the i-th client in the global aggregation to the j-th client , and is normalized by row or by column to meet the constraint that the weight sum is 1, wherein the weight of the drift client is set to 0.
[0083] Specifically, the preset rule includes:
[0084] When the similarity between the trusted clients is higher than a preset threshold but the complementarity is lower than a preset threshold, the weight is evenly distributed, and the higher the complementarity, the higher the weight distribution;
[0085] The lower the similarity between the drift client and the trusted client, the lower the weight distribution.
[0086] Step 4: Perform a merging operation on the models in the trusted clients based on a preset merging threshold;
[0087] Wherein, based on the trusted clients and the corresponding dynamic aggregation weight matrix, the models with similar degrees and complementarity satisfying the preset merging threshold are merged to generate a new model, and the corresponding dynamic aggregation weight matrix is updated, and the merging operation is repeatedly performed until the last model of the trusted clients is left, and the last model is taken as a trusted client aggregation model;
[0088] Wherein, when performing the merging operation, if there is no model pair satisfying the preset merging threshold, the preset merging threshold is increased, and if the preset merging threshold is increased for a preset number of times and there is still no model pair satisfying the preset merging threshold, the model pair with the highest similarity is forced to be aggregated;
[0089] Specifically, in this embodiment, when the trusted client model set has a pair of models with similar degrees and complementarity satisfying the preset merging threshold , the weights in are weighted and averaged to merge, and the expression is:
[0090]
[0091] The model merged by weighted average is replaced with , and the corresponding row and column in the dynamic aggregation weight matrix are updated.
[0092] Step 5: Perform distillation training based on the trusted client aggregation model, the positive prototype set, and the negative prototype set, and send the trained model to each client for the next round of iteration. Robust federated learning is achieved through multiple rounds of iteration.
[0093] The trusted client aggregation model As the teacher model and student model in distillation training, before training begins, It is both a teacher model and a student model. After starting training, Just a student model, a prototype set and negative prototype sets As unlabeled training samples;
[0094] The prototype set Input the student model to obtain the predicted probability distribution , and lock its gradient as the teacher model softmax probability, and convert the softmax probability data structure into a confidence label ;
[0095] The student model is trained on the positive prototype set to obtain the log probability of the student model , thus constructing the loss function , to ensure that shared semantics are faithfully inherited:
[0096]
[0097] in, For the prototype set The total number of categories included in is the cross entropy loss function, is the log probability of the student model The log probability of the class, The confidence label The label of the class;
[0098] Train the student model on the negative prototype set and construct the loss function :
[0099]
[0100] in, Negative prototype set The total number of categories included in For the prototype set Middle the prototype vector of the class, Negative prototype set Middle the prototype vector of the class, To obtain the maximum value function, is the preset threshold;
[0101] Specifically, the negative prototype is used to increase the distribution distance between the student model and the teacher model, forcing the student model to maintain differences with the teacher model on conflicting concepts, thus achieving the purpose of suppression;
[0102] Constructing the total loss function :
[0103]
[0104] in, For the preset ratio, when the total loss function converges, a robust global model that retains the trusted client knowledge and suppresses the influence of drifting clients is obtained for the next round of iteration.
[0105] In summary, the present invention proposes a robust federated learning method based on dynamic aggregation weights and prototype guidance. First, it detects and marks drifting clients, dynamically evaluates client complementarity and similarity and assigns different aggregation weights, and then fuses model parameters to ensure that data from the main source dominates the global model update. Subsequently, by refining trusted client prototypes and drifting client prototypes, the global model is guided to perform distillation training, so that it takes into account both existing and newly emerging data patterns, improves the generalization performance of the model in heterogeneous and non-stationary environments, and reduces the impact of malicious updates. Each step of the present invention can be implemented under the existing federated learning framework, with controllable computing and communication overheads and significant overall benefits.
[0106] The above describes the specific embodiments of the present invention in detail with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Various changes can be made within the knowledge of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A robust federated learning method based on dynamic aggregation weights and prototype guidance, characterized by: The following steps are involved: Step 1: After each client undergoes local pre-training, a local model is obtained. The clients then evaluate the classification accuracy of the local model. Based on the evaluation results, the clients are classified into trusted clients and drifting clients using voting rules. Step 2: Extracting trainable vectors from the trusted client and the drift client respectively, and constructing a positive prototype set and a negative prototype set based on the trainable vectors; Step 3: Calculate the similarity and complementarity of each client, obtain the dynamic weight of each client in the global model aggregation based on preset rules, the similarity and the complementarity, and combine the dynamic weights of all clients to obtain a dynamic aggregation weight matrix; Step 4: Merge the models in the trusted client based on a preset merging threshold; wherein, based on the trusted client and the corresponding dynamic aggregation weight matrix, the model pairs whose similarity and complementarity meet the preset merging threshold are merged to generate a new model, and the corresponding dynamic aggregation weight matrix is updated, and the merging operation is repeated until the last model of the trusted client remains, and the last model is used as the trusted client aggregation model; Wherein, when performing the merging operation, if there is no model pair that meets the preset merging threshold, the preset merging threshold is increased. If there is still no model pair that meets the preset merging threshold after increasing the preset number of times, the model pair with the highest similarity is forcibly aggregated; Step 5: Perform distillation training based on the trusted client aggregation model, the positive prototype set, and the negative prototype set, and send the trained model to each client for the next round of iteration. Robust federated learning is achieved through multiple rounds of iteration.
2. The robust federated learning method based on dynamic aggregation weights and prototype guidance according to claim 1 is characterized in that: The classification accuracy is the same as that of each client in its own validation set. The model being evaluated The accuracy of each category is calculated by the following formula: ; Where, For the client To the client No. Class accuracy, Acc is the function for calculating classification accuracy.
3. The robust federated learning method based on dynamic aggregation weights and prototype guidance according to claim 2, characterized in that: After obtaining the mutual evaluation results of the classification accuracy of all clients, a voting rule is constructed to divide all clients, including: Preset a threshold , using the client Self Class accuracy minus threshold , get a discriminant value; When the client To the client No. Class Accuracy When it is less than the discrimination value, the voting result is recorded as " right Cast a vote”; The server aggregates all client voting results. If the client If the number of votes received in any category is greater than the preset threshold, the client The clients are divided into drift clients, and the rest are divided into trusted clients. Drift clients include concept drift clients and malicious clients.
4. The robust federated learning method based on dynamic aggregation weights and prototype guidance according to claim 1, characterized in that: Step 2 includes: Step 2.1: Extract a trainable vector representing the global normal data distribution from the trusted client , which is converted by the server into a global prototype with the same shape, and the positive prototype set is obtained ; Step 2.2: Extract the trainable vector representing the concept skewed data distribution from the drift client , which is converted by the server into a global prototype with the same shape, and the negative prototype set is obtained ; Step 2.3: Save the positive prototype set and the negative prototype set on the server as the data source for distillation training.
5. The robust federated learning method based on dynamic aggregation weights and prototype guidance according to claim 1, characterized in that: Step 3 includes: Step 3.1: Server Update the parameter vector set for each model uploaded by the client Perform principal component analysis to update the parameter vector set of the high-dimensional model Mapping to low-dimensional principal component space , extract one or more principal component vectors that characterize the client's change characteristics, where, is the parameter weight of the model; Step 3.2: Calculate the similarity of any two client model parameter vectors to obtain the similarity that reflects the degree of similarity between the client models. ; Step 3.3: Calculate the complementarity of any two clients based on the principal component vector , to quantify the degree of complementarity of the information provided by the two clients, where the complementarity is measured by the difference in the angle between the principal component vectors of the two clients; Step 3.4: Comprehensive similarity and complementarity , assign the dynamic weight of each client in the global model aggregation according to the preset rules, and form the dynamic weights of all clients into a dynamic aggregation weight matrix ,in, Indicates the first Client relative to the The weight ratio of the client's contribution, and Normalize by row or column to satisfy the constraint that the weights sum to 1.
6. The robust federated learning method based on dynamic aggregation weights and prototype guidance according to claim 5, characterized in that: The preset rules include: When the similarity between trusted clients is higher than the preset threshold but the complementarity is lower than the preset threshold, the weights are evenly distributed, and the higher the complementarity, the higher the weight distribution; The lower the similarity between the drift client and the trusted client, the lower the weight assigned.
7. The robust federated learning method based on dynamic aggregation weights and prototype guidance according to claim 1, characterized in that: The dynamic aggregation weight matrix corresponding to the update includes: When the trusted client model set There are similarities and complementarities that meet the preset merging threshold A pair of models When, right exist The weight in , Perform weighted average merging, the expression is: ; Use weighted average to combine the models replace , and update the corresponding rows and columns in the dynamic aggregation weight matrix.
8. The robust federated learning method based on dynamic aggregation weights and prototype guidance according to claim 1, characterized in that: The performing distillation training based on the trusted client aggregation model, the positive prototype set, and the negative prototype set includes: The trusted client aggregation model As the teacher model and student model in distillation training, before training begins, It is both a teacher model and a student model. After starting training, Just a student model, a prototype set and negative prototype sets As unlabeled training samples; The prototype set Input the student model to obtain the predicted probability distribution , and lock its gradient as the teacher model softmax probability, and convert the softmax probability data structure into a confidence label ; The student model is trained on the positive prototype set to obtain the log probability of the student model , thus constructing the loss function : ; in, For the prototype set The total number of categories included in is the cross entropy loss function, is the log probability of the student model The log probability of the class, The confidence label The label of the class; Train the student model on the negative prototype set and construct the loss function : ; in, Negative prototype set The total number of categories included in For the prototype set Middle the prototype vector of the class, Negative prototype set Middle the prototype vector of the class, To obtain the maximum value function, is the preset threshold; Constructing the total loss function : ; in, For the preset ratio, when the total loss function converges, a robust global model that retains the trusted client knowledge and suppresses the influence of drifting clients is obtained for the next round of iteration.
Citation Information
Cited By
Heterogeneous label noise robust federated learning method based on group dynamics
CN120996229A
