Robust federated learning method for processing heterogeneous noise and non-independent identically distributed data

By employing a two-stage client-quality-aware robust federated learning approach, utilizing class loss modeling and differential training, combined with Gaussian mixture models and distance-aware aggregation, the problem of heterogeneous noise and non-independent identically distributed data in federated learning is solved, thereby improving the robustness and generalization performance of the model.

CN121859991APending Publication Date: 2026-04-14YUXI NORMAL UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing federated learning methods cannot effectively address label noise issues when dealing with heterogeneous noise and non-independent identically distributed data, resulting in poor model training performance and high communication costs.

Method used

A robust federated learning approach with client quality awareness is adopted. By modeling with class loss and differential training, combined with Gaussian mixture model and distance-aware aggregation, clean and noisy clients are identified and distinguished for differential training and aggregation.

Benefits of technology

It improves the robustness and generalization performance of the model under label noise interference, effectively utilizes clean client data, suppresses the impact of noise, maintains the diversity of data distribution, and enhances the model's generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121859991A_ABST
    Figure CN121859991A_ABST
Patent Text Reader

Abstract

The invention discloses a robust federated learning method for processing heterogeneous noise and non-independent identically distributed data, and belongs to the technical field of federated learning. The method provides a robust learning framework of two-stage client quality perception. The method comprises the following steps of: 1, constructing a category-level loss vector and clustering by using a Gaussian mixture model, and accurately dividing a clean and noise client set; stage 2, performing differential training: performing standard training on the clean client; dual-network cooperative training, dynamic sample screening and exchange, and a self-distillation and entropy regularization mechanism are introduced to a noise client, so that robust learning is realized; in the global aggregation stage, a distance sensing weighting strategy is further adopted to dynamically suppress the influence of a noise client; according to the method, original data does not need to be shared, the robustness and generalization performance of the federated learning model in the coexistence environment of heterogeneous noise and non-independent identically distributed data can be effectively improved, and the method has wide application value in the fields of medical images, financial risk control and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of federated learning technology, and in particular to a robust federated learning method for handling heterogeneous noise and non-independent identically distributed data. Background Technology

[0002] Federated learning is an innovative large-scale distributed machine learning paradigm whose core design philosophy aims to achieve data privacy protection and model performance optimization. Within this framework, participating clients (including edge devices, medical institutions, and financial institutions) store their private data locally. Model training can be completed without directly sharing raw data among participating clients; multiple participants collaborate on training and sharing a global model through parameter aggregation and updates. This technological paradigm is significant in fields highly sensitive to privacy data, such as healthcare and finance. However, federated learning still faces several technical challenges in practical deployment and application, such as expensive communication. Frequent exchange of model parameters significantly increases communication costs when the number of participants is large. Secondly, there is the challenge of data heterogeneity. In real-world scenarios, the data distribution of each client often exhibits non-independent and identically distributed (Non-IID) characteristics, which is fundamentally different from the data distribution assumptions of traditional centralized machine learning. Furthermore, the label noise problem is particularly prominent. Past federated learning research has mainly focused on the fact that each client's data is independent and identically distributed and that the data labels are of high quality. However, in real-world scenarios, the data of each client is not independent and identically distributed and is prone to label noise. Building a large-scale dataset with accurate annotations is costly and difficult to achieve completely, especially in professional fields such as medical image analysis. In such scenarios, not only do annotators need to have professional medical knowledge, but they also need to invest a lot of time in meticulous annotation. On the other hand, annotation by non-professionals may lead to subjective judgment differences, resulting in annotation errors or inconsistencies and noisy labels.

[0003] Current methods for addressing noise issues primarily employ dynamic aggregation strategies, loss function adjustments, and local noise filtering. However, these methods largely rely on the ideal assumption of uniform noise distribution, failing to adequately consider the heterogeneity of noise in real-world scenarios and its coupling effect with non-independent and identically distributed data. Furthermore, simply suppressing suspected noise may result in clients losing crucial data information, and existing signal-level noise modeling methods cannot effectively address client-level label noise issues. Therefore, resolving the challenge of coexisting heterogeneous noise and non-independent and identically distributed data while protecting privacy has become a pressing technical challenge that needs to be overcome. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention provides a robust federated learning method for handling heterogeneous noise and non-independent, identically distributed data. It proposes a two-stage client-quality-aware robust federated learning method: the first stage is client partitioning based on category loss modeling, and the second stage is differentiated robust training and distance-aware aggregation. This invention introduces category-level loss modeling, client-cooperative regularized training, and distance-aware aggregation mechanisms into the traditional federated learning parameter exchange mechanism to improve the model's robustness and generalization performance under label noise interference.

[0005] To achieve the above technology, the specific steps are as follows: Phase 1: Client segmentation phase based on category loss modeling; specifically including the following steps: S1. Initialize global model parameters based on the server. K client and category prior distributions are generated, and after preheating training for a preset number of rounds, the FedAvg algorithm is used to aggregate them. A logarithmic adjustment term (LA) is added to the logits output of the model to output the preheated global model. This invention uses ResNet18 for model initialization: the server initializes the global model. and the Weights of the local model for each client The model underwent 20 initial training rounds, and parameter synchronization was achieved using the classic Federated Parameter Averaging (FedAvg) algorithm, as shown in the following formula: In the formula, To preset the total number of clients, for index, For the first Number of local dataset samples per client For the first Number of local dataset samples per client For weights.

[0006] During training, a logarithmic adjustment term (LA) is added to the logits output of the model. ,in This represents the prior distribution of categories in the local data ( ), The temperature parameter (the hyperparameter controlling the adjustment intensity is set to 1) is used to make the local model more effective in resisting the effects of class imbalance in the local data. The specific expression for superimposing the local class prior logarithm term on the model's logits output is as follows: in, It is the model's response to the samples. The original logits output, This is the logits output after LA adjustment. It is the prior distribution of categories in the local data. This is the preset temperature parameter.

[0007] In the loss calculation process, temperature parameter The role is clearly defined: first, calculate the prior distribution of categories based on local data. ,pass right Scaling yields adjustment items Then in the model output Before calculating the cross-entropy loss, the original logits are summed with this adjustment term to obtain the result. ; final use Calculate the cross-entropy loss.

[0008] This invention superimposes a local class prior logarithm term onto the model's logits output. Implicitly balance the learning difficulty of different categories to initially stabilize the model and mitigate the initial bias of class imbalance.

[0009] S2. Based on the preheated global model and the client's local dataset, calculate the average loss value through category aggregation loss and output the category-level loss vector; After the preheating phase is completed, each client in this invention... In its local dataset Above, for each category C, calculate the average loss value for each category C. This forms a C-dimensional category-level loss vector. ,in This is the transpose of the expression, where C is the total number of categories, and the average loss value is calculated as follows: in, For the first The average loss value of class C among clients, For the first Local datasets for each client The number of samples belonging to class C. For the first The sample set of class C in the local dataset of each client. , for The first in One sample, For set The sample index in For the first The first client of type C One sample, For the sample The true label, This represents the cross-entropy loss function.

[0010] S3. Based on the category-level loss vector, perform missing data completion and normalization operations, and output the normalized category loss vector; The missing completion method involves filling the category loss vector with the minimum loss value corresponding to the category in the client. The normalization operation is min-max normalization; In this invention, loss compensation and normalization are performed if the client... If samples of class C are missing, they are filled with the minimum loss value of class C across all clients. This operation is based on the low loss of clean samples; each client generates a loss vector for all classes. The loss vectors from all K clients are then uploaded to the server. After receiving the loss vectors from all K clients, the server performs min-max normalization on each class C, scaling it to the [0,1] interval. The calculation expression is as follows: In the formula, C represents the number of categories. This is an index representing the total number of clients.

[0011] S4. Based on the normalized class loss vector, clustering is performed using a Gaussian mixture model and the expectation-maximization algorithm to output a clean client set. and noise client set The client segmentation phase based on category loss modeling, which is the first phase, has been completed. In this invention, the server inputs the normalized vectors uploaded by all clients into a Gaussian mixture prior model. This model uses the expectation-maximization algorithm to divide the K clients into two distinct subsets; one subset is... One subset is the clean client set, whose loss vectors have low values ​​across all dimensions, and whose cluster centers (mean vectors) are Gaussian distributions with small L1 norms (the sum of average normalized losses across all dimensions); the other subset is... The set of noisy clients contains noise labels and has a high loss value in some or all dimensions, corresponding to a Gaussian distribution with a large L1 norm of the mean vector.

[0012] To clarify the classification rules, the specific process is as follows: First, calculate the average loss of each client across all data categories, construct a "client-category" loss matrix, and normalize it; then, use a Gaussian mixture model to cluster this matrix into two classes, and repeat this process 9 times to reduce randomness; after each clustering, compare the sum of the elements of the mean vectors of the two cluster centers, and determine the client corresponding to the one with the larger sum as a noisy client; finally, through a voting mechanism, select the set of noisy clients that appears most frequently in the 9 iterations as the final set of noisy clients. The remaining clients are grouped into the clean client set. .

[0013] This division does not depend on specific signal and noise modeling, but is based on client data quality characteristics; the Gaussian mixture modeling of this invention is not aimed at the original sensor signal or noise distribution, but is used for client-level data quality identification.

[0014] The mean vector is the center obtained by GMM clustering the client's "class-loss" features, and each dimension corresponds to the average normalized loss on the class. The norm is the sum of the dimensions of the mean vector; the normalized "category-level loss vector" (the loss value itself is non-negative) is therefore the L1 norm.

[0015] Phase Two: Differentiated Robust Training and Perceptual Aggregation; specifically including the following steps: S5. Based on the global model of the current round, the server distributes the global model of the current round to all clients, and outputs the model copy obtained by each client for local training in this round. Global model distribution: The server distributes the global model for the current round to all clients. Each client receives the model and performs local training. During local training, all clients use logarithmic adjustment techniques to continuously combat the negative impact of data heterogeneity and class imbalance. The first round of Phase 2 distributes the warm-up model from Phase 1, and each subsequent round distributes the model updated by distance-aware aggregation from the previous round. The LA technique is introduced during training to implicitly balance the class prior distribution by adjusting the logit (i.e., the raw score output by the model) during the local training phase.

[0016] S6. Based on the clean client set, calculate and output the updated clean client model using the cross-entropy loss function; This invention targets clean client sets. and noise client set A differentiated training approach is adopted, continuing to use the LA adjustment term in training for both types of clients: for the clean client set The client in the process uses the cross-entropy loss function, calculated as follows: In the formula, The preset number of samples (batch size) in the current training batch. Index for sample size The total number of categories in the dataset. For the th sample in the th ... Real labels on the class, For the model to sample in the th The original output of the class, For the first Logarithmic adjustment term for the class; perform local model updates, these client labels are of high quality and their data features should be fully trusted and utilized, and the model should learn the most accurate patterns through standard training.

[0017] S7. Based on the set of noisy clients, the updated noisy client model is output through the collaborative training and regularization mechanism of the noisy clients. The collaborative training and regularization mechanism of the noisy client includes: a dual-network collaborative architecture, dynamically decaying sample selection, sample exchange, and total loss function calculation; The total loss function includes self-distillation consistency regularization and entropy regularization.

[0018] Specifically, the following steps are included: S7.1, Dual-Network Collaborative Architecture: Based on a global model, two neural network models with identical structures and independent parameters are initialized, outputting two initialized local network models, denoted as follows: and ; This invention achieves mutual correction by constructing two identical neural network models with independent parameters locally on each noisy client and using the interaction and training of the two networks.

[0019] S7.2 Dynamically Decaying Sample Selection and Exchange: Based on Local Network Model and With preset hyperparameters, the network calculates sample loss and performs forward propagation on the training batch data. Then, it calculates the dynamic decay forgetting rate for dynamic filtering, performs sample swapping, and outputs the samples with the lowest loss values ​​within a preset range, sorting the samples within each batch. The network output is then selected from these samples. Actual training batches and The actual training batch.

[0020] In each training batch, the local network model and The loss is calculated for all samples in the forward pass, and the expression is as follows: In the formula, For the model to the first The logits vector of each sample output (without softmax activation). No. 'The true label of each sample,' For logits vector Corresponding real tags The element where C is the total number of categories. An index for the total number of categories. Set the temperature parameter in LA to 1, and base it on a dynamically decaying forgetting rate. Select the batch with the lowest loss value. The training set is dynamically optimized by selecting a larger number of candidate samples in the early stages of training to avoid discarding useful information, and gradually tightening the selection criteria in the later stages of training to focus on clean samples with high confidence.

[0021] For noisy clients, a collaborative training strategy is adopted, inspired by noise-robust learning methods; two neural networks are initialized locally on each client, and a dynamically decaying forgetting rate is introduced. To control the sample selection process for each network, the formula for the dynamically decaying forgetting rate is as follows: in, It refers to training rounds. The preset total number of rounds, and The initial forgetting rate was 0.3% and the minimum forgetting rate was 0.05%, respectively. In each training batch of each network, only the top performers with the lowest loss are retained. *100% of the samples are used for gradient calculation; in each training batch, the model and model First, forward propagation is performed independently on all samples, and the sample loss vector is calculated separately for each. Then, based on the dynamically decaying forgetting rate, each of the two networks selects the samples with the lowest loss values. Proportional samples are used to form clean sample candidate sets for each model. Using the model The selected low-loss (clean) sample set is used for parameter updates, while the model... Then use the model The selected clean sample set is used for training. Each network then returns its own selected low-loss sample set to the other as part of the training data for the next batch.

[0022] S7.3 Based on the original data and the enhanced data that have not been filtered and exchanged, the consistency regularization loss function is calculated through self-distillation and the consistency regularization loss function value is output. This invention calculates the soft probability distribution of the model output based on the original input data and the augmented data, and calculates the KL divergence between the two as a consistency regularization loss; this constraint forces the model to learn a smoother and more robust decision boundary, avoiding sharp overfitting to noisy labels.

[0023] For the same batch of data, an enhanced version is generated (in this invention, a 50% probability of horizontal flipping, an 80% probability of color dithering, and a 20% probability of grayscale conversion are used), and the original data is calculated separately. and augmented data Calculate the original data using the soft probability distribution after temperature scaling and Softmax. The expression is: Computational augmentation data The expression is: Among them, temperature parameter In this invention, a value of 3.0 is used to control the smoothness of the probability distribution. Based on this, the consistency regularization loss function for KL divergence with batch size N and number of classes C is calculated as follows: In the formula, Index for total number of categories, C represents the preset number of samples in the current training batch, where C is the total number of classes. 'For sample index,' For the first The predicted probability distribution of a sample after data augmentation. For the first 'Predicted probability distribution of 'original samples' The first in the predicted distribution of the data-augmented sample 'Samples belong to category The probability, The predicted distribution of the original sample is the th 'Samples belong to category The probability of.

[0024] S7.4 Based on the original data, calculate and output the entropy regularization loss value using the entropy regularization loss function; The expression for the entropy-regularized loss function, which calculates the soft probability distribution of the original input, is as follows: In the formula, C represents the preset number of samples in the current training batch, where C is the total number of classes. 'For sample index,' For category indexing, The predicted distribution of the original sample is the th 'Samples belong to category The probability of.

[0025] S7.5. Based on the cross-entropy loss function, consistency regularization loss function, and entropy regularization loss function, calculate the total loss function and update the network model parameters in reverse. This invention calculates the entropy of the predicted distribution of the original data as the entropy regularization loss. The basic cross-entropy loss, consistency loss, and entropy loss are weighted and summed to form the total loss for local training on the noisy client, thus providing comprehensive constraints and guidance for the training. The expression for the total loss function is: In the formula, The first preset weight value, The second preset weight value, and Both are set to 0.3, which are used to control the weights of KL divergence loss and entropy loss, respectively.

[0026] S8. Based on the updated model of all clients and the clean client set, after calculating the distance metric and weights, the global model parameters are jointly updated by the distance-weighted multi-client models through weighted aggregation, and the updated global model is output, thus completing the differentiated robust training phase and the robust federated learning method for handling heterogeneous noise and non-independent identically distributed data. In the global update phase of this invention, the server calculates the model for each client. Minimum distance between the model and all clean client models (the latest model parameters obtained by locally training the clients marked as clean in this round before uploading). This generates distance weight coefficients. During aggregation, client contributions are adaptively adjusted based on the distance weights, using normalized distance... Its range is explicitly defined as [0, 1]. The closer to 1, the greater the deviation; clients with larger deviations receive lower weights in the global update, thereby suppressing the negative impact of noisy clients. Ultimately, the global model parameters are jointly updated by the distance-weighted multi-client model.

[0027] The server calculates the minimum Euclidean distance between each client model and the clean client model as an indicator of client deviation. The expression for the distance metric and weight calculation is as follows: In the formula, For the first The minimum distance between clients, where t is the number of training rounds. For clean client indexing, For a clean client set, Let t be the weight value of client i at time step t. For the client The weight value of time step t; The present invention provides for the first The minimum distance between clients is Through normalization Obtain distance weight coefficients .

[0028] The final update of the server's global model, obtained through weighted aggregation, is expressed as follows: In the formula, To preset the number of clients, This is the distance weighting coefficient. As weight, The amount of local data for client i ensures that the impact of clients with high deviation (potentially containing noise) is dynamically mitigated during the aggregation process.

[0029] The beneficial effects of this invention are: (1) This invention overcomes the limitations of existing technologies in homogenizing noise by using a two-stage framework of client segmentation stage based on class loss modeling and differential robust training stage; by clustering clients in fine-grained loss space using Gaussian mixture model, heterogeneous noisy clients can be accurately identified; and by using collaborative training, regularization and distance-aware aggregation, the data value of clean clients can be fully learned, and useful information in noisy clients can be mined to a limited extent, so as to suppress noise while preserving the diversity of data distribution to the greatest extent and ensuring the generalization performance of the model.

[0030] (2) By introducing a client quality assessment mechanism based on category-level loss vector, this invention can accurately identify and distinguish clean clients from noisy clients, effectively overcoming the limitations of traditional overall loss assessment methods in discriminative situations under heterogeneous data distribution. Attached Figure Description

[0031] Figure 1 This is a flowchart of the federated learning training method of the present invention; Figure 2 This is a diagram illustrating the overall architecture of the method of the present invention. Detailed Implementation

[0032] The present invention will be further described in detail below with reference to specific embodiments.

[0033] like Figures 1-2 As shown, a robust federated learning method for handling heterogeneous noise and non-independent identically distributed data comprises the following steps: This invention adopts a two-stage framework: the first stage is the client segmentation stage based on category loss modeling, and the second stage is differentiated robust training and perceptual aggregation; Phase 1: Client segmentation phase based on category loss modeling; specifically including the following steps: S1. Initialize global model parameters based on the server. K client and category prior distributions are generated, and after preheating training for a preset number of rounds, the FedAvg algorithm is used to aggregate them. A logarithmic adjustment term (LA) is added to the logits output of the model to output the preheated global model. This invention uses ResNet18 for model initialization: the server initializes the global model. and the Weights of the local model for each client The model underwent 20 initial training rounds, and parameter synchronization was achieved using the classic Federated Parameter Averaging (FedAvg) algorithm, as shown in the following formula: In the formula, The preset number of clients is 10 in this embodiment. for index, For the first Number of local dataset samples per client For the first Number of local dataset samples per client As weight; During training, a logarithmic adjustment term (LA) is added to the logits output of the model. ,in This represents the prior distribution of categories in the local data ( ), The temperature parameter (the hyperparameter controlling the adjustment intensity is set to 1) is used to make the local model more effective in resisting the effects of class imbalance in the local data. The specific expression for superimposing the local class prior logarithm term on the model's logits output is as follows: in, It is the model's response to the samples. The original logits output, This is the logits output after LA adjustment. It is the prior distribution of categories in the local data. For temperature parameters; In the loss calculation process, temperature parameter The role is clearly defined: first, calculate the prior distribution of categories based on local data. ,pass right Scaling yields adjustment items Then in the model output Before calculating the cross-entropy loss, the original logits are summed with this adjustment term to obtain the result. ; final use Calculate the cross-entropy loss; This invention superimposes a local class prior logarithm term onto the model's logits output. Implicitly balance the learning difficulty of different categories to initially stabilize the model and mitigate the initial bias of class imbalance.

[0034] S2. Based on the preheated global model and the client's local dataset, output a category-level loss vector through category aggregation loss; After the preheating phase is completed, each client in this invention... In its local dataset For each category C (there are C categories in this embodiment, CIFAR-10 corresponds to 10 categories, and CIFAR-100 corresponds to 100 categories), the average loss value for each category C is calculated. This forms a C-dimensional category-level loss vector. ,in This is the transpose of the expression, where C is the total number of categories, and the average loss value is calculated as follows: in, For the first The average loss value of class C among clients, For the first Local datasets for each client The number of samples belonging to class C. For the first The sample set of class C in the local dataset of each client. , for The first in One sample, For set The sample index in For the first The first client of type C One sample, For the sample The true label, This represents the cross-entropy loss function.

[0035] S3. Based on the category-level loss vector, perform missing data completion and normalization operations, and output the normalized category loss vector; The missing completion method involves filling the category loss vector with the minimum loss value corresponding to the category in the client. The normalization operation is min-max normalization; In this invention, loss compensation and normalization are performed if the client... If samples of class C are missing, they are filled with the minimum loss value of class C across all clients. This operation is based on the low loss of clean samples; each client generates a loss vector for all classes. The loss vectors from all K clients are then uploaded to the server. After receiving the loss vectors from all K clients, the server performs min-max normalization on each class C, scaling it to the [0,1] interval. The calculation expression is as follows: In the formula, C represents the number of categories. This is an index representing the total number of clients.

[0036] S4. Based on the normalized class loss vector, clustering is performed using a Gaussian mixture model and the expectation-maximization algorithm to output a clean client set. and noise client set The client segmentation phase based on category loss modeling, which is the first phase, has been completed. In this invention, the server inputs the normalized vectors uploaded by all clients into a Gaussian mixture prior model. This model uses the expectation-maximization algorithm to divide the K clients into two distinct subsets; one subset is... One subset is the clean client set, whose loss vectors have low values ​​across all dimensions, and whose cluster centers (mean vectors) are Gaussian distributions with small L1 norms (the sum of average normalized losses across all dimensions); the other subset is... The set of noisy clients contains noise labels and has a high loss value in some or all dimensions, corresponding to a Gaussian distribution with a large L1 norm of the mean vector.

[0037] To clarify the classification rules, the specific process is as follows: First, calculate the average loss of each client across all data categories, construct a "client-category" loss matrix, and normalize it; then, use a Gaussian mixture model to cluster this matrix into two classes, and repeat this process 9 times to reduce randomness; after each clustering, compare the sum of the elements of the mean vectors of the two cluster centers, and determine the client corresponding to the one with the larger sum as a noisy client; finally, through a voting mechanism, select the set of noisy clients that appears most frequently in the 9 iterations as the final set of noisy clients. The remaining clients are grouped into the clean client set. .

[0038] This division does not depend on specific signal and noise modeling, but is based on client data quality characteristics; the Gaussian mixture modeling of this invention is not targeted at the original sensor signal or noise distribution, but is used for client-level data quality identification. The mean vector is the center obtained by GMM clustering the client's "class-loss" features, and each dimension corresponds to the average normalized loss on the class. The norm is the sum of the dimensions of the mean vector; the normalized "category-level loss vector" (the loss value itself is non-negative) is therefore the L1 norm.

[0039] Phase Two: Differentiated Robust Training and Perceptual Aggregation; specifically including the following steps: S5. Based on the global model of the current round, the server distributes the global model of the current round to all clients, and outputs the model copy obtained by each client for local training in this round. Global model distribution: The server distributes the global model for the current round to all clients. Each client receives the model and performs local training. During local training, all clients use logarithmic adjustment techniques to continuously combat the negative impact of data heterogeneity and class imbalance. The first round of Phase 2 distributes the warm-up model from Phase 1, and each subsequent round distributes the model updated by distance-aware aggregation from the previous round. The LA technique is introduced during training to implicitly balance the class prior distribution by adjusting the logit (i.e., the raw score output by the model) during the local training phase.

[0040] S6. Based on the clean client set, calculate and output the updated clean client model using the cross-entropy loss function; This invention targets clean client sets. and noise client set A differentiated training approach is adopted, continuing to use the LA adjustment term in training for both types of clients: for the clean client set The client in the process uses the cross-entropy loss function, calculated as follows: In the formula, The preset number of samples (batch size) in the current training batch. This is the sample size index, which is 64 in this example. The total number of categories in the dataset. For the th sample in the th ... Real labels on the class, For the model to sample in the th The original output of the class, For the first Logarithmic adjustment term for the class; perform local model updates, these client labels are of high quality and their data features should be fully trusted and utilized, and the model should learn the most accurate patterns through standard training.

[0041] S7. Based on the set of noisy clients, the updated noisy client model is output through the collaborative training and regularization mechanism of the noisy clients. The collaborative training and regularization mechanism of the noisy client includes: a dual-network collaborative architecture, dynamically decaying sample selection, sample exchange, and total loss function calculation; The total loss function includes self-distillation consistency regularization and entropy regularization; Specifically, the following steps are included: S7.1, Dual-Network Collaborative Architecture: Based on a global model, two neural network models with identical structures and independent parameters are initialized, outputting two initialized local network models, denoted as follows: and ; This invention achieves mutual correction by constructing two identical neural network models with independent parameters locally on each noisy client and using the interaction and training of the two networks.

[0042] S7.2 Dynamically Decaying Sample Selection and Exchange: Based on Local Network Model and With preset hyperparameters, the network calculates sample loss and performs forward propagation on the training batch data. Then, it calculates the dynamic decay forgetting rate for dynamic filtering, performs sample swapping, and outputs the samples with the lowest loss values ​​within a preset range, sorting the samples within each batch. The network output is then selected from these samples. Actual training batches and The actual training batch.

[0043] In this embodiment and The network architecture used was ResNet18, with SGD as the optimizer, a learning rate of 0.001, a momentum of 0.9, a weight decay of 5e-4, a forgetting rate of 0.3, and 5 epochs of local training with a local batch size of 64. In each training batch, the local network model and The loss is calculated for all samples in the forward pass, and the expression is as follows: In the formula, For the model to the first The logits vector of each sample output (without softmax activation). No. 'The true label of each sample,' For logits vector Corresponding real tags The element where C is the total number of categories. An index for the total number of categories. The temperature parameter in LA is set to 1, and a dynamically decaying forgetting rate is used. Select the batch with the lowest loss value. The training set is dynamically optimized by selecting a larger number of candidate samples in the early stages of training to avoid discarding useful information, and gradually tightening the selection criteria in the later stages of training to focus on clean samples with high confidence.

[0044] For noisy clients, a collaborative training strategy is adopted, inspired by noise-robust learning methods; two neural networks are initialized locally on each client, and a dynamically decaying forgetting rate is introduced. To control the sample selection process for each network, the formula for the dynamically decaying forgetting rate is as follows: in, It is a local training round. The preset total number of rounds, and The initial forgetting rate was 0.3% and the minimum forgetting rate was 0.05%, respectively. In each training batch of each network, only the top performers with the lowest loss are retained. *100% of the samples are used for gradient calculation. In each training batch, the model... and model First, forward propagation is performed independently on all samples, and the sample loss vector is calculated separately for each. Then, based on the dynamically decaying forgetting rate, each of the two networks selects the samples with the lowest loss values. The proportion of samples is used to form separate clean sample candidate sets for each model. Using the model The selected low-loss (clean) sample set is used for parameter updates, while the model... Then use the model The selected clean sample set is used for training. Each network then returns its own selected low-loss sample set to the other as part of the training data for the next batch.

[0045] S7.3 Based on the original data and the enhanced data that have not been filtered and exchanged, the consistency regularization loss function is calculated through self-distillation and the consistency regularization loss function value is output. This invention calculates the soft probability distribution of the model output based on the original input data and the augmented data, and calculates the KL divergence between the two as a consistency regularization loss; this constraint forces the model to learn a smoother and more robust decision boundary, avoiding sharp overfitting to noisy labels. For the same batch of data, an enhanced version is generated (in this embodiment, a 50% probability of horizontal flipping, an 80% probability of color jittering, and a 20% probability of grayscale conversion are used), and the original data is calculated separately. and augmented data Calculate the original data using the soft probability distribution after temperature scaling and Softmax. The expression is: Computational augmentation data The expression is: Among them, temperature parameter In this embodiment, the value is set to 3.0 to control the smoothness of the probability distribution. Sensitivity experiments are performed on temperature parameters 1, 2, 3, 4, 5, 6, 7, 8, and 9. Based on this, the expression for calculating the KL divergence with batch size N and number of categories C is: In the formula, Index for total number of categories, C represents the preset number of samples in the current training batch, where C is the total number of classes. 'For sample index,' For the first The predicted probability distribution of a sample after data augmentation. For the first 'Predicted probability distribution of 'original samples' The first in the predicted distribution of the data-augmented sample 'Samples belong to category The probability, The predicted distribution of the original sample is the th 'Samples belong to category The probability of.

[0046] S7.4 Based on the original data, calculate and output the entropy regularization loss value using the entropy regularization loss function; The expression for the entropy-regularized loss function, which calculates the soft probability distribution of the original input, is as follows: In the formula, C represents the preset number of samples in the current training batch, where C is the total number of classes. 'For sample index,' For category indexing, The predicted distribution of the original sample is the th 'Samples belong to category The probability of.

[0047] S7.5. Based on the cross-entropy loss function, consistency regularization loss function, and entropy regularization loss function, calculate the total loss function and update the network model parameters in reverse. This invention calculates the entropy of the predicted distribution of the original data as the entropy regularization loss. The basic cross-entropy loss, consistency loss, and entropy loss are weighted and summed to form the total loss for local training on the noisy client, thus providing comprehensive constraints and guidance for the training. The expression for the total loss function is: In the formula, The first preset weight value, The second preset weight value, and Both are set to 0.3, used to control the weights of the KL divergence loss and entropy loss, respectively; this embodiment uses... and Parameter sensitivity analysis experiments were conducted separately. The results showed that 0.3 had the best effect in the range of 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, and 0.9, followed by 0.2 and 0.4. Therefore, in this embodiment, the parameter value was set to 0.3.

[0048] S8. Based on the updated model of all clients and the clean client set, the global model parameters are jointly updated by the distance-weighted multi-client models through distance metric and weight calculation, and finally through weighted aggregation. The updated global model is output, completing the differentiated robust training stage and the robust federated learning method for handling heterogeneous noise and non-independent identically distributed data. In the global update phase of this invention, the server calculates the model for each client. Minimum distance between the model and all clean client models (the latest model parameters obtained by locally training the clients marked as clean in this round before uploading). This generates distance weight coefficients. During aggregation, client contributions are adaptively adjusted based on the distance weights, using normalized distance... Its range is explicitly defined as [0, 1]. The closer to 1, the greater the deviation; clients with larger deviations receive lower weights in the global update, thereby suppressing the negative impact of noisy clients. Ultimately, the global model parameters are jointly updated by the distance-weighted multi-client model.

[0049] The server calculates the minimum Euclidean distance between each client model and the clean client model as an indicator of client deviation. The expression for the distance metric and weight calculation is as follows: In the formula, Let be the minimum distance for the client, and t be the training round. For clean client indexing, For a clean client set, Let t be the weight value of client i at time step t. For the client The weight value of time step t; The present invention provides for the first The minimum distance between clients is Through normalization Obtain distance weight coefficients .

[0050] The final update of the server's global model, obtained through weighted aggregation, is expressed as follows: In the formula, To preset the number of clients, This is the distance weighting coefficient. As weight, The amount of local data for client i ensures that the impact of clients with high deviation (potentially containing noise) is dynamically mitigated during the aggregation process.

[0051] To verify the effectiveness of the proposed method, it was implemented in a standard image classification federated learning scenario. The dataset used was the widely adopted CIFAR-10, containing 32×32 color images for 10 categories, with 50,000 images used for training and 10,000 for testing. To simulate a real-world non-independent and identically distributed data environment, a Dirichlet distribution was used to partition all data across different clients. Its concentration parameter ( The noise level was set to 0.5 to generate a stronger non-independent data distribution. Symmetrical and paired noise were considered for the noise settings, with the noise rate increasing linearly within the ranges [0, 0.4] or [0, 0.8] to simulate different levels of noise heterogeneity. All methods were trained for 100 epochs. Table 1 shows the accuracy of this invention in classifying non-independent and identically distributed data on the CIFAR-10 dataset under different noise settings.

[0052] Table 1: Average test accuracy (%) on the CIFAR-10 dataset By introducing a client quality assessment mechanism based on category-level loss vectors, this invention can accurately identify and distinguish clean clients from noisy clients, effectively overcoming the limitations of traditional overall loss assessment methods in discriminative scenarios with heterogeneous data distributions. Experimental results show that on the CIFAR-10 dataset, facing different levels of symmetric noise, paired noise, and non-independent identically distributed data, this invention consistently outperforms existing mainstream federated learning methods in terms of average test accuracy. Specifically, when the noise level is 0-0.4, this invention improves performance by 1.90% and 2.67% compared to the second-best performing FedNoRo method in symmetric and paired noise scenarios, respectively. Under extreme conditions of high noise levels of 0-0.8, this invention still maintains a performance advantage of approximately 2.34% (symmetric noise) and 2.55% (paired noise), fully demonstrating its superior robustness and generalization ability in heterogeneous and high-intensity noise environments. This invention focuses on the problem of noise robustness modeling in federated learning. Its technical content does not involve cross-domain applications such as health monitoring or policy review, and it differs fundamentally from sensor signal noise modeling or privacy protection and personalized fine-tuning mechanisms based on FedAvg. The proposed mechanism of "client-side partitioning based on category loss vectors—differential training—distance-aware aggregation" is a complete federated learning framework specifically designed for the coexistence of noisy and non-independent identically distributed data in privacy-preserving environments. This invention does not rely on global noise distribution assumptions, nor does it require sharing original data. While strictly adhering to privacy principles, it achieves stable model training under multi-noise patterns and highly heterogeneous data distributions. Therefore, this invention is particularly suitable for high-value scenarios with stringent requirements for data quality and model robustness, such as medical image analysis and financial risk control, providing reliable technical support for the implementation of federated learning in real-world, complex environments.

[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A robust federated learning method for handling heterogeneous noise and non-independent identically distributed data, characterized in that, Includes the following steps: S1. Initialize global model parameters based on the server. K client and category prior distributions are generated, and after preheating training for a preset number of rounds, the FedAvg algorithm is used to aggregate them. A logarithmic adjustment term (LA) is added to the logits output of the model to output the preheated global model. S2. Based on the preheated global model and the client's local dataset, calculate the average loss value through category aggregation loss and output the category-level loss vector; S3. Based on the category-level loss vector, perform missing data completion and normalization operations, and output the normalized category loss vector; The missing completion method involves filling the category loss vector with the minimum loss value corresponding to the category in the client. The normalization operation is min-max normalization; S4. Based on the normalized class loss vector, clustering is performed using a Gaussian mixture model and the expectation-maximization algorithm to output a clean client set. and noise client set The client segmentation phase based on category loss modeling, which is the first phase, has been completed. S5. Based on the global model of the current round, the server distributes the global model of the current round to all clients, and outputs the model copy obtained by each client for local training in this round. S6. Based on the clean client set, calculate and output the updated clean client model using the cross-entropy loss function; S7. Based on the set of noisy clients, the updated noisy client model is output through the collaborative training and regularization mechanism of the noisy clients. The collaborative training and regularization mechanism of the noisy client includes: a dual-network collaborative architecture, dynamically decaying sample selection, sample exchange, and total loss function calculation; The total loss function includes self-distillation consistency regularization and entropy regularization; S8. Based on the updated models of all clients and the clean client set, after calculating distance metrics and weights, the global model parameters are jointly updated by the distance-weighted multi-client models through weighted aggregation, and the updated global model is output, completing the differentiated robust training phase and the robust federated learning method for handling heterogeneous noise and non-independent identically distributed data.

2. The robust federated learning method for processing heterogeneous noise and non-independent identically distributed data according to claim 1, characterized in that, In step S2, the expression for calculating the average loss value is: in, For the first The average loss value of class C among clients, For the first Local datasets for each client The number of samples belonging to class C. For the first The set of samples of class C in a client's local dataset. for The first in One sample, For set The sample index in For the first The first client of type C One sample, For the sample The true label, This represents the cross-entropy loss function.

3. The robust federated learning method for processing heterogeneous noise and non-independent identically distributed data according to claim 1, characterized in that, In step S4, clustering is performed using a Gaussian mixture model and the expectation-maximization algorithm. Specifically, the matrix is ​​clustered into two classes using a Gaussian mixture model, and this process is repeated 9 times to reduce randomness. After each clustering, the sum of the elements of the mean vectors of the two cluster centers is compared, and the client corresponding to the one with the larger sum is identified as a noisy client. Finally, through a voting mechanism, the set of noisy clients that appears most frequently in the 9 iterations is selected as the final set of noisy clients. The remaining clients are grouped into the clean client set. .

4. A robust federated learning method for processing heterogeneous noise and non-independent identically distributed data according to claim 1, characterized in that, In step S6, the calculation expression for the cross-entropy loss function is as follows: In the formula, This is the preset number of samples in the current training batch. Index for sample size The total number of categories in the dataset. For the th sample in the th ... Real labels on the class, For the model to sample in the th The original output of the class, For the first The logarithmic adjustment term of the class.

5. A robust federated learning method for processing heterogeneous noise and non-independent identically distributed data according to claim 1, characterized in that, Step S7 specifically includes the following steps: S7.1, Dual-Network Collaborative Architecture: Based on a global model, two neural network models with identical structures and independent parameters are initialized, outputting two initialized local network models, denoted as follows: and ; S7.2 Dynamically Decaying Sample Selection and Exchange: Based on Local Network Model and With preset hyperparameters, the network calculates sample loss and performs forward propagation on the training batch data. Then, it calculates the dynamic decay forgetting rate for dynamic filtering, performs sample swapping, and outputs the samples with the lowest loss values ​​within a preset range, sorting the samples within each batch. The network output is then selected from these samples. Actual training batches and The actual training batch; The formula for calculating the forward sample loss is: In the formula, For the model to the first The logits vector of each sample output (without softmax activation). No. 'The true label of each sample,' For logits vector Corresponding real tags The element where C is the total number of categories. An index for the total number of categories. Set the temperature parameter in LA to 1; The formula for calculating the dynamic decay forgetting rate is: in, It refers to training rounds. The preset total number of rounds, and These are the preset initial forgetting rate and the minimum forgetting rate, respectively; S7.3 Based on the original data and the enhanced data that have not been filtered and exchanged, the consistency regularization loss function is calculated through self-distillation and the consistency regularization loss function value is output. S7.4 Based on the original data, calculate and output the entropy regularization loss value using the entropy regularization loss function; S7.

5. Based on the cross-entropy loss function, consistency regularization loss function, and entropy regularization loss function, calculate the total loss function and update the network model parameters in reverse. The expression for the total loss function is: In the formula, The first preset weight value, The second preset weight value, Let cross-entropy be the loss function. For consistency regularization loss function, This is the entropy regularization loss function.

6. A robust federated learning method for processing heterogeneous noise and non-independent identically distributed data according to claim 5, characterized in that, In step S7.3, the calculation expression for the consistency regularization loss function is as follows: In the formula, Index for total number of categories, C represents the preset number of samples in the current training batch, where C is the total number of classes. 'For sample index,' For the first The predicted probability distribution of a sample after data augmentation. For the first 'Predicted probability distribution of 'original samples' The first in the predicted distribution of the data-augmented sample 'Samples belong to category The probability, The predicted distribution of the original sample is the th 'Samples belong to category The probability of.

7. A robust federated learning method for processing heterogeneous noise and non-independent identically distributed data according to claim 5, characterized in that, In step S7.4, the expression for calculating the entropy regularization loss function is as follows: In the formula, C represents the preset number of samples in the current training batch, where C is the total number of classes. 'For sample index,' For category indexing, The predicted distribution of the original sample is the th 'Samples belong to category The probability of.

8. A robust federated learning method for processing heterogeneous noise and non-independent identically distributed data according to claim 1, characterized in that, In step S8, the formula for outputting the updated global model is: In the formula, To preset the number of clients, This is the distance weighting coefficient. As weight, The amount of local data on client i; The formula for calculating the weighting coefficient is as follows: in, For the first Minimum distance between clients, For clean client indexing, For the first Minimum distance between clients; The expressions for the distance metric and weight calculation are as follows: In the formula, t represents the training round. For a clean client set, Let t be the weight value of client i at time step t. For the client The weight value of time step t.

9. A robust federated learning method for processing heterogeneous noise and non-independent identically distributed data according to claim 1, characterized in that, In step S1, the expression for adding the logarithmic adjustment term (LA) after the model's logits output is: in, It is the model's response to the samples. The original logits output, This is the logits output after LA adjustment. It is the prior distribution of categories in the local data. This is the preset temperature parameter.

Citation Information

Cited By

  • Noisy label image recognition method based on active forgetting and noise suppression

    CN122176427B

  • A fan data robustness denoising method based on information theory learning

    CN122286273A