A privacy-oriented diffusion model driven unsupervised domain generalization method
By generating virtual data through a diffusion model and performing decoupled representation learning and federated confidence voting, the problems of data privacy leakage and communication pressure in unsupervised federated domain generalization are solved, and the convergence speed and accuracy of the model are improved.
Patent Information
- Application Number
- CN202311013570.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-08-11
AI Technical Summary
Existing technologies in unsupervised federated domain generalization have problems such as data privacy leakage, high communication pressure, negative transfer, and malicious clients affecting model performance.
A diffusion model-driven unsupervised domain generalization method is adopted. By training the diffusion model in the target domain to generate virtual data, the client performs decoupled representation learning and federated confidence voting, dynamically adjusts the model weights, generates a virtual prediction domain and performs fine-tuning.
It achieves privacy protection for target domain data, reduces communication pressure, identifies and filters out poor quality or malicious source domains, and improves the convergence speed and accuracy of the model.
Smart Images

Figure CN116882480B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to an unsupervised domain generalization method driven by a diffusion model for privacy protection. Background Art
[0002] Federated learning is a distributed learning paradigm that enables multiple participants to collaboratively train machine learning models without sharing local data, thereby protecting their data privacy and reducing communication overhead. However, federated learning also faces some challenges. Different participants may have different data characteristics, labels, or quality, which can lead to inconsistent model performance in different environments and even negative transfer. Furthermore, due to the large amount of data in real-world scenarios, experts may face a heavy labeling workload, resulting in incorrect labels, missing labels, or no labels at all, which may compromise the quality of a participant's model or make training impossible.
[0003] Unsupervised federated domain generalization was proposed to address these issues. It does not rely on any label information in the target domain, but instead uses unsupervised learning techniques to align and transfer data between different source and target domains. Unsupervised federated domain generalization can effectively address the challenges of data heterogeneity and missing labels in federated learning environments, enhance the adaptability and robustness of models across multiple domains, and enable models to generalize to unknown target domains. Unsupervised federated domain generalization can be applied to various fields, such as healthcare, finance, and the Internet of Things. Different stakeholders can leverage this technology to improve model performance and efficiency while protecting data privacy. For example, in the field of medical image segmentation, the image quality or segmentation accuracy of equipment collected by different hospitals may vary, and the data may be subject to distributional shift, making simple average aggregation inappropriate. Some hospitals may also lack the resources and capabilities to determine the classification of image cases, so they need to learn from other hospitals while protecting their own data.
[0004] Therefore, unsupervised federated domain generalization is a challenging and important research direction, but it also has relatively more technical difficulties. First, it requires the federated model to be robust and adaptable to unknown target domains, where the data distribution and characteristics may differ from those of the source domain. Second, it needs to protect the data privacy of the source and target domains, which means that the federated model cannot access or share any original data during training or inference. Third, it must cope with the heterogeneity and diversity of the source domain, which may include noisy, biased, or even malicious data that may impair the performance of the federated model. Fourth, it requires a general algorithmic framework to address a wide range of potential applications in real-world scenarios, such as cross-device image recognition, cross-language natural language processing, and cross-platform voice recognition.
[0005] Currently, most of the domain generalization methods in the prior art are based on generative adversarial training for representation alignment. A privacy protection federated domain generalization method in the prior art includes a FedKA algorithm. This algorithm uses feature distribution matching in a global workspace, so that the global model can learn domain-invariant client features without knowing the constraints of the client data. The FedKA algorithm uses a federated voting mechanism to generate pseudo-labels for the target domain according to the consensus of the clients, so as to fine-tune the global model.
[0006] The processing procedure of the above FedKA algorithm includes:
[0007] Step 1: The target domain initializes the global model and distributes it to each client.
[0008] Step 2: Each client extracts domain-specific features and domain-common features using local data and target domain data, and calculates the latest local model parameters.
[0009] Step 3: Each client uploads its domain-common features to the target domain, and the target domain aligns the domain-common features of each client using the feature distribution matching method to obtain a unified global feature space.
[0010] Step 4: The target server aggregates all client model parameters and performs average calculation on these model parameters to update the latest model parameters.
[0011] Step 5: Each client uses the federated voting method to generate virtual labels for the target domain input samples based on the local training model. The target server fine-tunes the target domain model using these virtual labels.
[0012] Step 6: All clients perform a new round of federated domain generalization.
[0013] The disadvantages of the above privacy protection federated domain generalization method using the FedKA algorithm include:
[0014] When extracting domain-specific features and domain-common features, the FedKA algorithm requires the clients to access the target domain data, which may cause data privacy leakage of the target domain, although the data between the clients is not uploaded locally.
[0015] In each round of federated domain generalization, the target domain uses the multi-kernel maximum mean difference algorithm for feature distribution matching. This method not only needs to adjust the kernel number and distribution for adaptation, but also requires a large number of communications between each client and the target domain, resulting in high communication pressure and easy privacy leakage.
[0016] The FedKA algorithm uses simple average aggregation, so it cannot handle some clients with poor quality or malicious poisoning, resulting in negative migration of the domain.
[0017] Federated voting uses average probability voting. When faced with clients of poor quality or malicious poisoning, this voting method can lead to errors in predicted labels due to large deviations in probability, resulting in negative domain transfer. Summary of the Invention
[0018] The present invention provides a privacy-preserving diffusion model-driven unsupervised domain generalization method to achieve effective privacy protection for data in the target domain.
[0019] In order to achieve the above-mentioned purpose, the present invention adopts the following technical solutions.
[0020] A privacy-preserving diffusion model-driven unsupervised domain generalization method, including:
[0021] Step S1: training the diffusion model on the target server in the target domain;
[0022] Step S2: The target server sends the trained diffusion model and the initialized global model to each client;
[0023] Step S3: After receiving the global model, each client samples virtual target domain data from the diffusion model, performs decoupled representation learning on the virtual target domain data, extracts domain-specific features and shared features, uses the classifiers in the specific features to construct a local client model, and trains the client model.
[0024] Step S4: Each client uploads the domain's shared features and the trained client model to the target server in the target domain. The target server uses the domain's shared features through each client model to perform federated confidence voting on the target domain's samples. The most likely prediction data is voted out, and the probability weight matrix is obtained to generate a virtual prediction domain.
[0025] Step S5: The target server dynamically adjusts the weight of each client model based on the contribution of each client to the virtual prediction domain, aggregates the updated client models, and obtains an updated global model;
[0026] Step S6: Use the virtual prediction domain voted by the federation confidence to fine-tune the updated global model to obtain a new model for the next round of federation delivery and target domain sample label prediction.
[0027] Preferably, the step S1: training the diffusion model on the target server in the target domain includes:
[0028] Training the diffusion model U on the target server θ , randomly sampling data from the distribution Gradually adding noise to the data After the Tth calculation, obtaining Diffusion model U θ is described by a Markov chain, i.e. t = 1, …, T, where β t is a linear interpolation parameter from 0.0001 to 0.02, and T is the number of diffusion steps;
[0029] The diffusion model is used to generate a virtual data domain with the same distribution as the target domain data set, and the source domain of the client restores data with a similar distribution to the target domain based on the diffusion model through Gaussian noise.
[0030] Preferably, the step S3: after each client receives the global model, the virtual target domain data is sampled from the diffusion model, the decoupling representation learning is performed on the virtual target domain data, the domain-specific features and shared features are extracted, the classifier in the specific features is used to construct the local client model, and the client model is trained, including:
[0031] The global model includes three parts: extracting domain shared features, label classifier and domain classifier, the label classifier contains domain-specific features and domain-specific classifier weights, and each client model samples virtual target domain sample data from the diffusion model Using the feature extractor to map the sample data to the feature space H: and obtain the shared features of the domain and the specific features, and use the label classifier f c : to construct the local client model, train the client model, and use the label classifier f c : to predict the label category according to the features .
[0032] Preferably, the step S4: each client uploads the shared features of the domain and the trained client model to the target server in the target domain, and the target server uses the shared features of the domain to perform federated confidence voting on the target domain samples through each client model, obtains the maximum possible prediction data by voting, obtains the probability weight matrix, generates a virtual prediction domain, including:
[0033] Each client uploads the shared features of the domain and the trained client models are uploaded to a target server in a target domain, and the target server utilizes the consensus knowledge of the source domains expanding a virtual domain
[0034] Preferably, the step S5: the target server dynamically adjusts the weights of the respective client models according to the contributions of the respective clients to the virtual prediction domain, aggregates the updated respective client models to obtain an updated global model, comprises:
[0035] the total knowledge quality is defined as wherein S' ∈ S, n CK represents the number of domains exceeding CK, the max function is to find the maximum value of the CK function probability, that is, the predicted label classification value, and the knowledge contribution of each client according to CQ is calculated as CC(S k ) = CQ(S) - CQ(S\{S k}), and and CC(S k ) are used to readjust the weights of the client models L k , which are calculated as wherein
[0036] The target server aggregates the updated respective client models to obtain an updated global model G.
[0037] Preferably, the step S6: the target server performs federated confidence voting on the samples of the target domain through the updated global model to obtain the predicted labels of the samples of the target domain, comprises:
[0038] each client model L k trained locally on each client is regarded as a task, and the global model G aggregated through the consensus focus is regarded as a pre-trained model, and the global model G is used to learn a virtual prediction domain generated by federated confidence voting wherein y K+2 = argmax c (P x η), and P = P is the prediction probability of each source domain to the target domain, is a probability weight matrix;
[0039] samples x K+2 are sampled from the virtual prediction domain , and virtual feature learning is performed on the global model G to obtain so that the target domain can learn the feature distribution of each source domain, and the updated global model is fine-tuned to obtain a new global model for the next round of federated delivery and prediction of the labels of the samples of the target domain.
[0040] As can be seen from the technical solutions provided by the embodiments of the present invention described above, the present invention uses a diffusion model to effectively protect the privacy of data in the target domain and is sufficiently versatile. The use of decoupled representation learning rather than domain distance minimization significantly reduces communication pressure.
[0041] Additional aspects and advantages of the present invention will be set forth in part in the following description, will become apparent from the following description, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 A processing flow chart of a privacy-preserving diffusion model-driven unsupervised domain generalization method provided by the present invention;
[0044] Figure 2 A schematic diagram of a virtual feature generation algorithm for a target domain provided by the present invention;
[0045] Figure 3 A schematic diagram of an algorithm for aligning source domain features with virtual features provided by the present invention;
[0046] Figure 4 A flowchart of the algorithm process for dynamic aggregation of models provided by the present invention;
[0047] Figure 5 This is a flowchart of the algorithm process for virtual feature learning provided by the present invention. DETAILED DESCRIPTION
[0048] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limiting the present invention.
[0049] It is to be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It is further understood that the terms "comprise" (or comprise), "comprises" (or comprises) and "comprising" (or comprises) when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It is further understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements can be present. Furthermore, "connected" or "coupled" as used herein can include wirelessly connected or coupled. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0050] It is to be understood that the terms so used are intended to encompass like and related terms. Furthermore, these terms are used either alone or with other terms that also are used alone or with other terms, in the specification and / or claims, including deposited code embodiments. Unless otherwise expressly defined herein, terms of orientation such as "vertical," "horizontal," "top," "bottom," "front," "back," "left," "right," and the like are used to denote relative positions for the purposes of illustration and the specific embodiments described herein. It is understood that the disclosed embodiments are suitable for use in a wide variety of orientations, unless otherwise indicated herein, and that the terms should be interpreted similarly wherever they occur.
[0051] In order to make the person skilled in the art understand the embodiments of the present application, the following will be further explained and described with several specific embodiments as examples in conjunction with the accompanying drawings, and each embodiment does not constitute a limitation to the embodiments of the present application.
[0052] The present application proposes an unsupervised federated domain generalization general framework based on diffusion model, which can guarantee the data privacy of each domain in domain generalization, reduce the communication round of model aggregation, identify and filter out poor quality or malicious source domain, and improve the convergence speed and accuracy of target domain model. In the present application, the data privacy and universality of the target domain are guaranteed by the diffusion model, and the data privacy of the client is realized by the federated learning. At the same time, the communication pressure of the multi-core maximum mean difference calculation module is reduced by decoupling the virtual feature distribution alignment. In addition, the negative transfer relief ability of the domain is realized by dynamically adjusting the contribution of the virtual prediction domain voted by the client's knowledge to the federated confidence. In order to further accelerate the self-adaptation of the target model, we use the target domain model to learn the virtual prediction domain and fine-tune the target model.
[0053] The processing flow of the privacy protection oriented diffusion model driven unsupervised domain generalization method provided by the present application is as shown in Figure 1 The processing steps include the following steps:
[0054] Step S1: training a diffusion model on a target server in a target domain. The diffusion model is trained on unlabeled data of the target domain, for example, in the (mt, mm, sv, sy) → up generalization task in the digit-5 data set, the diffusion model is trained on the unlabeled picture data set up.
[0055] The diffusion model is used to generate a virtual data domain with the same distribution as the target domain data set. In the source domain of the client, the data with similar distribution to the target domain can be restored based on the diffusion model through Gaussian noise, so as to protect the original data of the target domain and align the feature distribution.
[0056] Step S2: the target server sends the trained diffusion model and the initialized global model to each client. The global model does not contain data and is a classification model used for training. The global model needs to be sent to the client every round, and the aggregation is also the global model, while the diffusion model only needs to be sent once.
[0057] Step S3: after each client receives the global model, the virtual target domain data is sampled from the diffusion model, the decoupling feature learning is performed on the virtual target domain data, the domain specific features and shared features are extracted, the classifier in the specific features is used to construct the local client model, and the client model is trained.
[0058] The client model is the local classification model of the client after the global classification model is sent to each client in the source domain. The function is to extract features and predict classification labels. The processing process can be seen Figure 2 and Figure 3 algorithm table.
[0059] Step S4: each client uploads the domain shared features and the trained client model to the target server in the target domain, and the target server generates a virtual data set through voting.
[0060] The target server predicts the unlabeled target domain data through the federated confidence voting of each client model, and obtains the probability weight matrix of the maximum possible prediction data voted. The probability matrix of each client is compared with the average probability. If it is greater than, the support number +1, and the highest support number is the final prediction label, and a virtual data set is generated.
[0061] Step S5: the target server dynamically adjusts the weight of each client model according to the contribution of each client to the virtual data set, aggregates the updated each client model, and obtains the updated global model.
[0062] Step S6: Use the virtual prediction domain voted by the federation confidence to fine-tune the updated global model to obtain a new model for the next round of federation delivery and target domain sample label prediction.
[0063] Specifically, the above step S1 includes: training the diffusion model U on the target server θ First, from the distribution Randomly extract data Gradually add noise to the data After the Tth calculation, we get A simple distribution (such as Gaussian distribution) is achieved. The diffusion model can be described by a Markov chain, that is, t=1,…,T, where β t is a parameter that is linearly interpolated from 0.0001 to 0.02, and T is the number of diffusion steps. For different fields, different U θ For training, we use DDPM, Diffusion-LM, and DiffWave for images, text, and sound, respectively.
[0064] Specifically, the above step S2 includes: obtaining the trained diffusion model U θ Then, noise samples are randomly drawn from the Gaussian noise distribution x T As the result of T calculations, reversely restore the original sample x0, so that we can get a virtual data set This dataset The feature distribution of is roughly the same as that of the target domain. For images, Dpm-solver++ is used to accelerate sampling, while text and sound maintain the original model sampling method.
[0065] The global model is a classification model, and the virtual dataset is a dataset with a feature distribution similar to the target domain data, allowing feature alignment without access to the target domain data. The target server sends the trained diffusion model and the initialized global model to each client.
[0066] Specifically, the above step S3 includes: each client model samples sample data of the virtual target domain from the diffusion model Use feature extractor (generator) to extract sample data Mapping to feature space H: and obtain the shared characteristics of the domain Then the label classifier f c : According to the characteristics To predict the label category.
[0067] The globally issued model is divided into three parts: 1, extracting domain shared features, 2, label classifier, and 3, domain classifier. The label classifier contains domain-specific features and domain-specific classifier weights. The goal of the algorithm is to predict by extracting reliable shared features of each domain to quickly generalize to unknown target domains.
[0068] Figure 2 A target domain virtual feature generation algorithm schematic diagram is provided for the application. In order to realize a more accurate classifier and minimize the feature difference between the client and the target domain, the discriminator is designed as a domain classifier f d : H(x) -> DP, indicating from the client or a virtually generated domain Then the gradient of the feature function H(x) is reversed and the label classification loss is increased to confuse the discriminator and obtain a feature space with small difference between In order to reduce the influence of domain-specific features, in the first few rounds of training, we use the hyperbolic tangent function to control the strength of gradient reversal, where b is the current batch number, e is the current epoch number, E is the total epoch number, and B is the total batch number. Therefore, the entire module C can be represented as where
[0069] Figure 3 A source domain feature and virtual feature alignment algorithm schematic diagram is provided for the application. This processing process is the virtual feature alignment part. The purpose is to extract the shared features of the domain for alignment. The domain-specific features are not used for alignment because they belong to the own features of each domain and do not have universality. The domain-specific features are only used for local model training.
[0070] Specifically, the above step S4 includes: each client uploads the domain shared features to the target server in the target domain, and the target server uses the consensus knowledge of each source domain Extending a virtual domain
[0071] Specifically, the above step S5 includes:
[0072] The total knowledge quality is defined as where S' is in S, n CK represents the number of domains exceeding CK, and the max function is to find the maximum value of the CK function probability, that is, the predicted label classification value. According to CQ, the knowledge contribution of each client can be calculated as CC(S k) = CQ(S) - CQ(S\{S k}), then we can use and CC(S k ) to re-adjust the weights of the client model L k . This can be calculated as where
[0073] The target server aggregates the updated individual client models to obtain an updated global model G. Figure 4 The algorithm process flowchart of model dynamic aggregation provided by the application.
[0074] Specifically, the above step S6 includes: Figure 5 The algorithm process flowchart of virtual feature learning provided by the application. By referring to the concept of meta-learning, a method called virtual feature learning is designed, and the client model L k trained locally on each client in a round is regarded as a task, and the global model G aggregated through consensus focusing is regarded as a pre-training model. Then, the global model G is used to learn the virtual prediction domain generated by federated confidence voting where y K+2 = argmax c (P x η), and is the prediction probability of each source domain to the target domain, is a probability weight matrix. Samples x are sampled from the virtual prediction domain K+2 , and the global model G is virtually feature-learned to obtain so that the target domain can learn the feature distribution of each source domain faster and accelerate convergence.
[0075] The target server learns the data of the virtual prediction domain and adjusts the global model to obtain a new model for federated distribution in the next round and prediction of the sample label of the target domain.
[0076] The spread model is unchanged. It only needs to be transmitted once. The client model and the global model are the same classification model, which is only divided into the global of the target and the independent of each client. The global model aggregated after each round needs to be distributed to each client to replace the model of the last round, which is consistent with federated learning, except that the model is divided into a feature extractor, a label classifier and a domain classifier.
[0077] To sum up, the embodiment of the application uses the spread model to better protect the privacy of the data of the target domain and has sufficient versatility. Using decoupled representation learning without using domain distance minimization calculation greatly reduces the communication pressure.
[0078] The method of the present application uses federal confidence voting and knowledge focusing, and can alleviate domain negative transfer and distribution deviation. The use of a virtual feature learning module can accelerate the convergence of the model.
[0079] Those skilled in the art can understand that the modules or flows in the drawings are not necessarily required to implement the present application.
[0080] From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and necessary general hardware platforms. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in various embodiments or some parts of the embodiments.
[0081] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, the device or system embodiments are described more simply because they are basically similar to the method embodiments, and the relevant parts can be referred to the part of the method embodiments. The device and system embodiments described above are only illustrative, and the units described as separate components can be or can not be physically separated, and the components displayed as units can be or can not be physical units, i.e., they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0082] The above is only the preferred embodiment of the present application, but the protection scope of the present application is not limited to this. Any changes or replacements within the technical scope disclosed by the present application can be easily thought of by those skilled in the art, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A privacy-preserving diffusion model-driven unsupervised domain generalization method, characterized by: include: Step S1: training the diffusion model on the target server in the target domain; Step S2: The target server sends the trained diffusion model and the initialized global model to each client; Step S3: After receiving the global model, each client samples virtual target domain data from the diffusion model, performs decoupled representation learning on the virtual target domain data, extracts domain-specific features and shared features, uses the classifiers in the specific features to construct a local client model, and trains the client model. Step S4: Each client uploads the domain's shared features and the trained client model to the target server in the target domain. The target server uses the domain's shared features through each client model to perform federated confidence voting on the target domain's samples. The most likely prediction data is voted out, and the probability weight matrix is obtained to generate a virtual prediction domain. Step S5: The target server dynamically adjusts the weight of each client model based on the contribution of each client to the virtual prediction domain, aggregates the updated client models, and obtains an updated global model; Step S6: Use the virtual prediction domain voted by the federation confidence to fine-tune the updated global model to obtain a new model for the next round of federation delivery and target domain sample label prediction.
2. The method according to claim 1, characterized in that The step S1: training the diffusion model on the target server in the target domain, includes: Train the diffusion model U on the target server θ , from the distribution Randomly extract data Gradually add noise to the data Until the Tth calculation, we get Diffusion Model U θ It is described by a Markov chain, that is, t=1,…,T, where β t is a parameter that is linearly interpolated from 0.0001 to 0.02, and T is the number of diffusion steps; The diffusion model is used to generate a virtual data domain with the same distribution as the target domain data set. In the source domain of the client, data with a similar distribution to the target domain is restored through Gaussian noise based on the diffusion model.
3. The method according to claim 2, characterized in that Step S3: After receiving the global model, each client samples virtual target domain data from the diffusion model, performs decoupled representation learning on the virtual target domain data, extracts domain-specific features and shared features, uses classifiers in the specific features to construct a local client model, and trains the client model, including: The global model is distributed in three parts: extracting domain shared features, labeling classifiers, and domain classifiers. The labeling classifier contains domain-specific features and domain-specific classifier weights. Each client model samples sample data of the virtual target domain from the diffusion model. Use feature extractor to extract sample data Mapping to feature space and obtain the shared characteristics of the domain and unique features, using label classifiers in unique features Construct a local client model, train the client model, and label classifier According to the characteristics To predict the label category.
4. The method according to claim 3, characterized in that Step S4: Each client uploads the domain's shared features and the trained client model to the target server in the target domain. The target server uses the domain's shared features through each client model to perform federated confidence voting on samples in the target domain. The most likely prediction data voted out is used to obtain a probability weight matrix and generate a virtual prediction domain, including: Each client takes the shared characteristics of the domain The trained client model is uploaded to the target server in the target domain, and the target server uses the consensus knowledge of each source domain Extending a virtual domain 5. The method according to claim 4, characterized in that The step S5: the target server dynamically adjusts the weight of each client model according to the contribution of each client to the virtual prediction domain, aggregates the updated client models, and obtains an updated global model, including: Define the overall knowledge quality as where S′∈S,n CK It represents the number of domains that exceed CK. The max function is to find the maximum probability of the CK function, that is, the predicted label classification value. The knowledge contribution of each client in CQ is calculated as CC(S k )=CQ(S)-CQ(S\{S k }),use and CC(Sk) to readjust the client model L k The weight of in The target server aggregates the updated client models to obtain the updated global model G.
6. The method according to claim 5, characterized in that Step S6: The target server performs a federated confidence vote on the samples of the target domain using the updated global model to obtain the predicted labels of the samples of the target domain, including: The client model L trained locally on each client k As a task, the global model G aggregated by consensus focusing is regarded as a pre-training model, and the global model G is used to learn the virtual prediction domain generated by federated confidence voting. where y K+2 =argmax c (P×η), and is the predicted probability of each source domain to the target domain, is the probability weight matrix; From the virtual prediction domain Sample x is sampled from K+2 , virtual feature learning is performed on the global model G to obtain This enables the target domain to learn the feature distribution of each source domain, fine-tune the updated global model, and obtain a new global model for the next round of federation distribution and target domain sample label prediction.
Citation Information
Patent Citations
Unsupervised federated learning method based on generalization domain self-adaption
CN113420888A
Generalized face forgery detection method based on domain invariant features
CN114692741A