A federated learning model training method based on domain generalization technology and unsupervised clustering algorithm

CN117371555BActive Publication Date: 2026-10-16EAST CHINA NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311386473.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2026-10-16
Estimated Expiration
2043-10-25

AI Technical Summary

Technical Problem

但仍存在数据环境不断演变情况下的数据的异质性问题

Benefits of technology

[0044](1) The federated learning model training method based on domain generalization technology and unsupervised clustering algorithm proposed in this invention, in steps S1-S5, allows each client's model, in addition to local model training, to utilize the federated learning architecture. This enables the exchange of model-related parameter information among the parties while protecting data privacy and ensuring that the client's data does not leave its local location. Moreover, this exchange does not expose the protected original data. Because it can access more data in this special way, the federated learning model can achieve stronger model performance than a standalone local model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117371555B_ABST
    Figure CN117371555B_ABST
Patent Text Reader

Abstract

The application discloses a federated learning model training method based on a domain generalization technology and an unsupervised clustering algorithm, which combines clustering federated learning and data feature modeling to cope with the adverse effects of data noise on model performance. Among them, a new clustering federated learning algorithm is designed by using the domain generalization technology, which can effectively model different data features and reduce the interference of noise data on the model. By clustering the client data, excellent model performance can be achieved even on clients with poor data quality. The application not only considers the domain correlation and domain independence information between different clients, but also reduces the negative effects of noise information on the model, thereby improving the effect of federated learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical fields of data privacy and security and domain generalization in deep learning, and particularly relates to a model training method based on domain generalization, unsupervised clustering algorithm and federated learning. Background Technology

[0002] Big Data Era

[0003] The arrival of the information age has brought an unprecedented influx of data. Every sector of modern society, from internet use to industrial manufacturing, generates massive amounts of data. These data come from a wide range of sources, including text, images, videos, and sensor data. This era of information explosion is aptly termed the "Big Data Era."

[0004] The importance of big data cannot be ignored. Data is not only a key resource for business and scientific research, but it also helps solve social problems such as healthcare, environmental protection, and urban planning. Data analytics has become the cornerstone of corporate decision-making, and government policymaking increasingly relies on data-driven approaches. The processing and analysis of big data has transformed the way people live and work, creating new business models and opportunities.

[0005] However, the use of big data also comes with a series of challenges, one of the most important of which is data privacy and security.

[0006] Data privacy and security

[0007] With the continuous accumulation and sharing of data, data privacy and security have become topics of great concern. The leakage of sensitive information such as personal information, sensitive business data, and medical records can cause serious harm to individuals, businesses, and society. Data breaches and misuse have already raised widespread concerns, involving legal and ethical issues.

[0008] Therefore, protecting data privacy and security is crucial. Traditional data protection methods typically involve data encryption and access control, but these methods may face performance and scalability issues when dealing with large datasets. In the information age, there is a need for more intelligent and efficient data privacy protection methods, which is one of the application scenarios for federated learning.

[0009] Federal Learning

[0010] Federated learning, as an emerging machine learning paradigm, holds great potential in addressing data privacy and security issues. Its core idea is to train models while keeping data distributed, thus avoiding the risks of storing sensitive datasets in one centralized location.

[0011] In federated learning, data is stored on local clients, models are trained locally, and only the model's parameters are transmitted to a central server for aggregation. This decentralized approach not only helps maintain data privacy but also reduces the risks associated with data transmission. The rise of federated learning offers a novel solution to data privacy issues when dealing with big data.

[0012] Furthermore, federated learning offers potential performance advantages. Since each local client can train its model locally, it can handle large-scale, distributed data without centralizing the data in one place, thus reducing data transfer and storage costs.

[0013] While federated learning offers an innovative solution for data privacy and security, it still faces a significant challenge: data heterogeneity. Data from different local clients may have different distributions and characteristics, which can lead to performance degradation in federated learning.

[0014] In summary, the era of big data has brought many opportunities and challenges, among which data privacy and security are among the most important issues. Federated learning, as a promising privacy-preserving method, combined with domain generalization technology, provides a new approach to addressing data privacy and security issues when dealing with big data. However, the heterogeneity of data in an ever-evolving data environment remains a challenge. Summary of the Invention

[0015] To address the above problems, this invention innovatively proposes a federated learning model training method based on domain generalization technology and unsupervised clustering algorithms. Considering the differences in data domains among different clients, it proposes to distinguish between similar and dissimilar data among clients to train a model sensitive to different data features. Furthermore, it proposes using an unsupervised clustering algorithm to group different clients, and then training a federated learning model separately within each cluster, ultimately obtaining a high-performing synthetic neural network model. By modeling different features of the data, the influence of noisy data on model performance is better eliminated, enabling personalized adjustments and improving overall robustness.

[0016] The specific technical solution for achieving the objective of this invention is as follows:

[0017] A federated learning model training method based on domain generalization technology and unsupervised clustering algorithm is provided for data feature modeling and noisy data processing, enabling personalized adjustments and improving overall robustness. The method includes the following steps:

[0018] Model warm-up stage

[0019] Step S1: During each round of communication in federated learning, the central server sends the global neural network model parameters to each local client to update its local model parameters.

[0020] Step S2: The local client trains the neural network model using the local training set, defines the mean squared error loss function and KL divergence as optimization objectives, uses gradient descent as the optimization method, and iteratively trains the local model.

[0021] Step S3: After local training is completed, the client uploads the parameters of the local neural network model to the central server via network communication.

[0022] Step S4: The central server aggregates the model parameters uploaded from local clients and updates the global neural network model parameters on the central server.

[0023] Step S5: Repeat steps S1-S4 until the loss of the global neural network model trained on each client is less than 0.1.

[0024] Data partitioning phase

[0025] Step S6: On each local client, identify its local data, distinguishing between In Distribution (ID) data and Out of Distribution (OOD) data, specifically including:

[0026] (1) Each client uses its local dataset to train the pre-trained global model and introduces regularization during the loss calculation process to obtain a loss that satisfies a Gaussian distribution on the local dataset.

[0027] (2) Next, the loss distribution of the local data is fitted using a Gaussian mixture model (GMM), which fits the loss distribution of the local data as a combination of two Gaussian distributions;

[0028] (3) Based on the fitted loss distribution, the client data is divided into two subdomains: one is the InDistribution (ID) subdomain, which represents the common part of the client data with similar data distribution; the other is the OutOf Distribution (OOD) subdomain, which represents the individual part of the client data with different data distribution.

[0029] Model training phase

[0030] Step S7: Train two different models simultaneously on each local client:

[0031] a. Training the OOD Correct Classification Model: A model is used to correctly classify OOD samples;

[0032] b. Training the OOD misclassification model: Another model is used to misclassify OOD samples;

[0033] Step S8: After the client trains the model, it uploads the parameters of the two local neural network models to the central server. After receiving the model parameters sent by all local clients, the central server uses the unsupervised clustering algorithm K-means to cluster the OOD correct classification model and the OOD incorrect classification model respectively, and divides all models into G1 groups according to the model parameters, where G1 ranges from 2 to 5.

[0034] Step S9: After grouping the local clients, train the federated learning model independently within each group;

[0035] Step S10: During each round of communication, the central server of the current group sends the neural network model parameters of the current group to the local client of the current group to update the parameters of its two models.

[0036] Step S11: Each client in the group performs local model training as in step S7;

[0037] Step S12: Each client in the group uploads the parameters of the two local neural network models to the central server of the current group via network communication.

[0038] Step S13: The central server within each group aggregates the two neural network model parameters uploaded from the local client and updates the two neural network model parameters of the current group's central server;

[0039] Step S14: Repeat steps S10-S13 until the model of each group converges or reaches a fixed number of communication rounds, then stop training. Each group obtains a final global generative model, and training is complete.

[0040] Model prediction stage

[0041] Step S15: Collect N random samples from the standard normal distribution, where N is adjusted according to the specific business scenario;

[0042] Step S16: For each group of clients, the prediction results of the two models are weighted and combined; the weights can be dynamically adjusted according to the model performance to achieve a more comprehensive prediction effect.

[0043] Beneficial effects of the present invention

[0044] (1) The federated learning model training method based on domain generalization technology and unsupervised clustering algorithm proposed in this invention, in steps S1-S5, allows each client's model, in addition to local model training, to utilize the federated learning architecture. This enables the exchange of model-related parameter information among the parties while protecting data privacy and ensuring that the client's data does not leave its local location. Moreover, this exchange does not expose the protected original data. Because it can access more data in this special way, the federated learning model can achieve stronger model performance than a standalone local model training.

[0045] (2) The federated learning model training method based on domain generalization technology and unsupervised clustering algorithm proposed in this invention, in step S6, considers that the data collected by the client in real-world scenarios is very likely to be noisy, which will cause the entire federated learning model to incorrectly fit the features of noisy data. This invention proposes to use a Gaussian mixture model (GMM) to fit the loss distribution of local data, dividing the client data into two subdomains: the ID subdomain represents the common part of the client data, and the OOD subdomain represents the individual part of the client data, in order to distinguish the noisy data and perform corresponding processing.

[0046] (3) The federated learning model training method based on domain generalization technology and unsupervised clustering algorithm proposed in this invention, in step S7, considers that the data collected by the client in real-world scenarios is very likely to be noisy, which may cause the entire federated learning model to incorrectly fit the features of noisy data. This invention proposes to train two different models: one model is used to correctly classify OOD samples, and the other model is used to misclassify OOD samples. By training two different models, different features of the data are modeled, mitigating the impact of noisy data on model performance.

[0047] (4) The federated learning model training method based on domain generalization technology and unsupervised clustering algorithm proposed in this invention, in steps S8-S14, allows for independent training of the federated learning model within each group. Since the clients in each group are trained under conditions of similar data distribution, this can largely alleviate the harm caused by differences in data distribution to the training of the federated model. The model parameters within each group can be optimized more effectively.

[0048] (5) The federated learning model training method based on domain generalization technology and unsupervised clustering algorithm proposed in this invention can make good predictions on different data distributions in steps S15-S16 according to different common needs, using the model of a central server of a specific group.

[0049] (6) This invention proposes a federated learning model training method based on domain generalization technology and unsupervised clustering algorithm. Although there has been much research on data heterogeneity in federated learning, the handling of noise labeling problems is still in its early stages. The training method proposed in this invention can effectively alleviate the data heterogeneity and noise labeling problems in federated learning.

[0050] (7) This invention proposes a federated learning model training method based on domain generalization technology and unsupervised clustering algorithm. Currently, there are some targeted methods for noise labeling in the field of domain generalization, but the combination of domain generalization technology and federated learning is relatively rare. The training method proposed in this invention combines domain generalization technology and federated learning, which can effectively alleviate the problems of data heterogeneity and noise labeling in federated learning, and allow the model to better adapt to data from different clients, thereby improving the performance and robustness of the model.

[0051] (8) Errors or inaccurate labels resulting from manual annotation, uncertainties in automatic annotation, or problems during data collection—i.e., noisy labels—have a significant impact on the performance and accuracy of federated learning, as they may cause the model to learn incorrect patterns or reduce its generalization ability. This invention cleverly combines domain generalization techniques to learn models that model different features, thereby resisting the influence of noisy labels on the training results.

[0052] (9) Data heterogeneity in federated learning, where local data from participants (e.g., client devices) differs in feature distribution, label distribution, or data size, significantly impacts the performance and generalization ability of federated learning. This is because the effectiveness of a model trained on one device may not be directly generalized to other devices. This invention performs K-means clustering on models trained by different participants, grouping them into groups, and then trains federated learning within each group. This alleviates the problems caused by inconsistent data distribution in federated learning training optimization, ultimately resulting in a high-performing federated learning model. Attached Figure Description

[0053] Figure 1 This is a schematic diagram illustrating how the Gaussian mixture model used by the local client of this invention fits the loss distribution of the target data.

[0054] Figure 2 This is an architecture diagram of the central server and local client model for federated learning in this invention. Detailed Implementation

[0055] The present invention will be further described in detail below with reference to the specific implementation process and accompanying drawings, including the conditions, process, training methods, etc. of implementing the present invention. Except for the content specifically mentioned below, all of them are general knowledge in the field, and the present invention has no special limitations.

[0056] This invention proposes a model training method based on domain generalization, unsupervised clustering algorithm, and federated learning, which specifically includes the following steps:

[0057] Suppose there are N local clients {C1, C2, ..., C...} N Each has its own training data {D1, D2, ..., D}. N In addition, federated learning also requires a central server S. The central server S does not host the dataset; it primarily collaborates with clients to complete model training tasks. At the model level, the participating parties C... i Has local model M i The central server S possesses the global model M. g All models involved in this invention have the same structure, being multi-layered convolutional neural networks with the same number of layers and parameters. Let the parameters of the model on the local client be θ. i The parameters of the model on the central server S are θ. g In fact, this invention does not impose many restrictions on the specific network structure of the training model, as long as it meets the requirements of a convolutional neural network model architecture. The model architecture diagram of this invention is as follows: Figure 2 As shown.

[0058] The goal of this invention is to train a federated learning model that effectively mitigates the problems of data heterogeneity and noisy labels. This model learns to model different features to resist the impact of noisy labels on training results, providing a technical solution for low-quality data collected in real-world scenarios.

[0059] Perform data processing as follows:

[0060] Model warm-up stage

[0061] The parameters of the central server model are randomly initialized as θ. g .

[0062] Step S1: During each round of communication in federated learning, the central server will send the global neural network model parameters θ g The parameters are sent to each local client. After receiving the model's parameters, the local client sets its own local model parameters θ. i Updated to θ g ;

[0063] Step S2: Each client trains the model using local data. This training process is a parameter optimization process, taking a specific client C as an example. i For example, in its model with parameters θ i Based on this, we adopt the approach of minimizing KL divergence and reconstruction loss, with the following optimization objective:

[0064]

[0065] Where x is the input of the model, and the output is obtained after the model makes predictions. This represents the mean squared error loss of the input and output. Represents distribution The KL divergence distance to the standard normal distribution N(0, I);

[0066] This invention employs stochastic gradient descent (SGD) to optimize the aforementioned objective function, with a learning rate of 0.01, a batch size of 64, and a 32-dimensional low-dimensional vector z. Training is performed locally for 5 epochs, during which the model parameters θ... i The model is constantly being updated and optimized, which continuously improves its ability to fit local data.

[0067] Step S3: After local training is complete, each client C i The parameters θ in the local neural network model are transmitted via network communication. i Uploaded to the central server S;

[0068] Step S4: The central server aggregates the model parameters θ uploaded from local clients. i Update the model parameters θ on the central server. g ;

[0069]

[0070] in Indicates client C i Model parameters, Indicates client C i The number of samples in the dataset;

[0071] Step S5: Repeat steps S1-S4 until the loss of the global neural network model on each client is less than 0.1.

[0072] Data partitioning phase

[0073] Step S6: On each local client, identify its local data, distinguishing between In Distribution (ID) data and Out of Distribution (OOD) data, by following these steps:

[0074] A Gaussian Mixture Model (GMM) is used to fit the loss distribution of the local data, dividing the client data into two subdomains: the ID subdomain representing the common components of the client data, and the OOD subdomain representing the unique components of the client data. To ensure that the loss distribution follows a Gaussian distribution, regularization is introduced in the loss calculation.

[0075]

[0076] Where N represents the number of mixture components (Gaussian distribution), which is 2 here, φ i This represents the weight of each component in the mixture, satisfying... μ i Let ∑i represent the mean vector of each mixture component, ∑i represent the covariance matrix of each mixture component, D represent the dimension of the data, and x represent the observed data points. (x-μ) i ) T (x-μ) i The transpose of )

[0077] The fitting graph of the Gaussian mixture model of this invention to the data distribution is shown below. Figure 1 As shown;

[0078] Model training phase

[0079] Step S7: Train two different models simultaneously on each local client:

[0080] a. OOD Correct Classification Model M i1 Training: A model is used to correctly classify OOD samples.

[0081] b. OOD (Out of Detail) Misclassification Model M i2 Training: Another model was used to misclassify OOD samples.

[0082] Then the parameters θ of the two trained models i1 θ i2 Uploaded to the central server;

[0083] Step S8: After receiving the model parameters sent by all local clients, the central server uses the unsupervised clustering algorithm K-means to cluster the OOD correct classification model and the OOD incorrect classification model respectively, and divides all models into G1 groups according to the model parameters. The range of G1 is 2-5. The process is as follows.

[0084] (1) Randomly select a client's model parameter from the client model set Q as the first initial cluster center;

[0085] (2) Next, calculate the shortest distance between the model parameters of each client and the existing cluster centers, denoted by L(i), and select the model parameter corresponding to the maximum value among all L as the next cluster center;

[0086] (3) Repeat steps (1) and (2) until G1 groups are selected;

[0087] (4) According to the principle of minimizing the distance to the cluster center, the model parameters of all clients are assigned to the class of each center point, and the mean value of the model parameters in G1 classes is calculated as the center point of the next iteration.

[0088] (5) Repeat (4) until the center point no longer changes or the specified number of iterations is reached, and the clustering process ends;

[0089] Using the K-means clustering algorithm, all client models are divided into G1 groups according to their model parameters. The model parameters in each group are then weighted and averaged to obtain G1 model parameters.

[0090] Step S9: After grouping the local clients, train the federated learning model independently within each group;

[0091] Step S10: Client C within each group i In each round of communication, the central server S of the current group will send the neural network model parameters θ of the current group. gi1 and θ gi2 Send to the local client in the current group to update the parameters θ of its two models. i1 =θ gi1 θ i2 =θ gi2 ;

[0092] Step S11: Client C within each group i Then, perform local model training in the same step as S7.

[0093] Step S12: Client C within each group i The parameters θ of the two local neural network models are transmitted via network communication. i1 and θ i2 Uploaded to the central server S of the current group;

[0094] Step S13: The central server S within each group aggregates the two neural network model parameters uploaded from the local client and updates the two neural network model parameters θ of the current group's central server. gi1 and θ gi2 ;

[0095] Step S14: Repeat steps S10-S13 until the model of each group converges to a loss of less than 0.01 or reaches a fixed number of communication rounds. Stop training, and each group obtains a final global model aggregated within the group. Training ends.

[0096] Model prediction stage

[0097] Step S15: Collect N from the standard normal distribution s N random samples, where N s Adjustments can be made based on specific business scenarios;

[0098] Step S16: For each group's client, the prediction results from the two models are weighted and combined. The weights can be dynamically adjusted based on model performance to achieve a more comprehensive prediction effect.

Claims

1. A federated learning model training method based on domain generalization technology and unsupervised clustering algorithm, characterized in that, The method includes the following steps: Model warm-up stage Step S1: During each round of communication in federated learning, the central server sends the global neural network model parameters to each local client to update its local model parameters; Step S2: The local client trains the neural network model using the local training set, defines the mean squared error loss function and KL divergence as optimization objectives, uses gradient descent as the optimization method, and iteratively trains the local model. Step S3: After local training is completed, the client uploads the parameters of the local neural network model to the central server via network communication. Step S4: The central server aggregates the model parameters uploaded from local clients and updates the global neural network model parameters on the central server. Step S5: Repeat steps S1-S4 until the loss of the global neural network model trained on each client is less than 0.

1. Data partitioning phase Step S6: On each local client, identify its local data, distinguishing between ID data and OOD data, specifically including: (1) Each client trains the pre-trained global model using the local dataset and introduces regularization during the loss calculation process to obtain a loss that satisfies a Gaussian distribution on the local dataset. (2) Next, the loss distribution of the local data is fitted using a Gaussian mixture model (GMM), which fits the loss distribution of the local data as a combination of two Gaussian distributions. (3) Based on the fitted loss distribution, the client data is divided into two subdomains: one is the ID subdomain, which represents the common part of the client data with similar data distribution; the other is the OOD subdomain, which represents the individual part of the client data with different data distribution. Model training phase Step S7: Train two different models simultaneously on each local client: a. OOD Correct Classification Model Training: A model is used to correctly classify OOD samples; b. OOD Misclassification Model Training: Another model is used to misclassify OOD samples; Step S8: After the client trains the model, it uploads the parameters of the two local neural network models to the central server. After receiving the model parameters sent by all local clients, the central server uses the unsupervised clustering algorithm K-means to cluster the OOD correct classification model and the OOD incorrect classification model respectively, and divides all models into G1 groups according to the model parameters, where G1 ranges from 2 to 5. Step S9: After grouping the local clients, train the federated learning model independently within each group; Step S10: During each round of communication, the central server of the current group sends the neural network model parameters of the current group to the local client of the current group to update the parameters of its two models. Step S11: Each client in the group performs local model training as in step S7; Step S12: Each client in the group uploads the parameters of the two local neural network models to the central server of the current group via network communication. Step S13: The central server within each group aggregates the two neural network model parameters uploaded from the local client and updates the two neural network model parameters of the current group's central server; Step S14: Repeat steps S10-S13 until the model of each group converges or reaches a fixed number of communication rounds, then stop training. Each group obtains a final global generative model, and training is complete. Model prediction stage Step S15: Collect a random sample from the standard normal distribution, where the specific business scenario may be adjusted. Step S16: The client in each group performs a weighted combination of the prediction results from the two models; the weights can be dynamically adjusted according to the model performance to achieve a more comprehensive prediction effect.

Citation Information

Patent Citations

  • Flight delay prediction system and method based on federated learning

    CN113112032A

  • VAE-based medical care federated learning framework determination method

    CN113792856A