Data augmentation method based on semi-supervised federated learning under privacy protection

By using the generative adversarial network with auxiliary classifiers and the Cycle-Fed model to generate high-quality pseudo-labeled data in federated learning, and correcting local updates through adaptive parameters, the problem of pseudo-labeled data generation and local optimality in federated learning is solved. , achieving efficient semi-supervised learning.

CN115829009BActive Publication Date: 2024-10-29CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211391786.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-08
Publication Date
2024-10-29
Estimated Expiration
2042-11-08

AI Technical Summary

Technical Problem

Federated learning has challenges in generating high-quality pseudo-labeled data and improving its confidence, especially in the issue of data availability and the optimal trap of local updates. Traditional data enhancement methods are difficult to adapt to, and the authenticity of pseudo-labeled data is questionable. .

Method used

The generative adversarial network with auxiliary classifier (ACGAN) is used for data enhancement, combined with the Cycle-Fed model and the improved Dropout layer, to generate pseudo-labeled samples with double confidence through double verification of the generator and the discriminator, and use self- Adapt to parameter correction local update trends to reduce communication costs and local optimal risks.

Benefits of technology

It improves the quality and confidence of pseudo-annotated data, reduces the communication cost between the client and the server, enhances the convergence efficiency and success rate of the model, avoids local optimal traps, and achieves efficient semi-automatic modeling without manual intervention. Supervising federated learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115829009B_ABST
    Figure CN115829009B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of federated learning, and in particular to a data enhancement method based on semi-supervised federated learning under privacy protection, comprising constructing a generative adversarial network ACGAN with an auxiliary classifier, adding improved Dropout to the ACGAN, and inputting labeled data into the ACGAN for data enhancement; constructing a Cycle-Fed model including a central server and C clients, training the Cycle-Fed model using labeled samples and enhanced samples, and inputting data of unlabeled samples into the Cycle-Fed model for prediction to obtain pseudo-labeled samples; inputting the pseudo-labeled samples into a discriminator of the ACGAN for identification, obtaining pseudo-labeled samples with double reset confidence, and completing data enhancement; the present invention can not only greatly reduce the communication cost between the client and the server, but also can use a large amount of unlabeled data for semi-supervised federated learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of federated learning, and in particular to a data enhancement method based on semi-supervised federated learning under privacy protection. Background Art

[0002] There is no doubt that the rise of artificial intelligence technology is due to the complexity and availability of big data. For example, in the field of computer vision, the emergence of the ImageNet dataset has significantly accelerated research progress. Nevertheless, in the era of big data explosion, the security of private data has begun to receive widespread attention. Federated learning, a new learning paradigm, has emerged. It is infinitely close to traditional distributed machine learning by securely aggregating the model parameters of each participant without leaving the local domain. Therefore, it will not leak user privacy and violate data security regulations. However, federated learning relies on high-quality labeled data, and it is unrealistic and expensive to fully label device data. It is of practical significance to enable a large amount of unlabeled data to provide benefits for federated learning.

[0003] Federated learning needs to use unlabeled data more urgently than other machine learning. On the one hand, in cross-device federated learning, the participants are separate devices, and it is unrealistic to manually label these data, such as photos taken, text input, and physiological indicators measured by wearable devices. On the other hand, in cross-institutional federated learning where the participants are enterprises, the data involved may require professional experience or a lot of manpower and financial resources, such as machine learning in the financial and medical fields. In this case, it would be expensive to label all the data, so it is necessary to make efficient use of unlabeled data and learn the model in a weakly supervised manner.

[0004] However, techniques such as transfer learning, semi-supervised learning, self-supervised learning, and active learning are all popular research topics, but only the popularity of federated transfer learning is observed, while other techniques are relatively ignored. Therefore, this paper attempts to provide a perspective on weakly supervised methods in federated learning.

[0005] In recent years, more and more scholars have studied and paid attention to semi-supervised federated learning, which can include a large amount of unlabeled data for federated learning. Federated learning requires more high-quality labeled data, but there are still the following challenges in how to better enhance the confidence of pseudo-labeled data:

[0006] 1. Availability of generated data. Traditional data augmentation methods, such as geometric transformation and random noise addition, are difficult to adapt to federated learning scenarios because of the lack of authenticity and diversity of the generated data. How to generate high-quality data remains challenging.

[0007] 2. The confidence of pseudo-labeled data is questionable. The generation of pseudo-labels cannot be manually intervened. Although pseudo-labeled data can improve the generalization performance of the model, untrustworthy pseudo-labeled data is equivalent to dirty data. How to improve the confidence of pseudo-labeled data is urgent and difficult.

[0008] 3. The optimal trap problem of local updates. Multiple local training can reduce the communication cost of federated learning, but too many iterations may deviate from the global trend and cause model training failure. How to enable local training to adaptively adjust the update trend to prevent local optimality is obviously an issue that cannot be ignored. Summary of the invention

[0009] In order to improve the generalization ability of the generator and increase the confidence of pseudo-annotated samples, the present invention proposes a data enhancement method based on semi-supervised federated learning under privacy protection, which specifically includes the following steps:

[0010] Construct a generative adversarial network with auxiliary classifier (ACGAN for short), add improved Dropout to ACGAN, and input the labeled data into ACGAN for data enhancement;

[0011] Build a Cycle-Fed model consisting of a central server and C clients, use the labeled samples and enhanced samples to train the Cycle-Fed model, and input the data of unlabeled samples into the Cycle-Fed model to predict and obtain pseudo-labeled samples;

[0012] The pseudo-annotated samples are input into the discriminator of ACGAN for identification, and pseudo-annotated samples with double reset confidence are obtained to complete data enhancement.

[0013] Furthermore, the process of adding the improved Uout-Dropout to ACGAN includes:

[0014] Improve the calculation of the variance of the Dropout layer, that is, let X = x(1+r), where r is located Uniform distribution in

[0015] Put the improved Dropout layer after each Batch Normalization layer and the first convolutional layer of the generator;

[0016] Among them, X represents the input of the neural network, x(1+r) represents the input assigned to X after being calculated by the standard normal distribution, and r is located at The uniform distribution in

[0017] Furthermore, during the training of ACGAN, the objective function of the generator is expressed as:

[0018] M Disc = argmax(L S +L C )

[0019] Let the objective function of the discriminator be expressed as:

[0020] M Gen = argmax(L C -L S )

[0021] Among them, M Disc represents the discriminator, M Gen represents the generator; L S represents the log-likelihood function of the correct source data, L C Represents the log-likelihood function of the correct class label.

[0022] Furthermore, the process of obtaining pseudo-annotated samples with double reset confidence includes:

[0023]

[0024]

[0025] Among them, X′ v It means that the data of unlabeled samples are input into the Cycle-Fed model to predict and obtain pseudo-labeled samples; Indicates that it belongs to the unlabeled dataset D ul The data x in the target function f v () obtained pseudo-annotated data; X″ v represents a pseudo-labeled sample with double reset confidence; Indicates that the pseudo-annotated sample x′ in the initial pseudo-annotated dataset v Input discriminator M Disc () after the output result.

[0026] Furthermore, the goal of the Cycle-Fed model during training is to minimize the loss function, which is expressed as:

[0027]

[0028] Among them, F c (x) is the local objective function, is the amount of randomly sampled labeled data, is the amount of randomly sampled unlabeled data, L(,) is the cross entropy loss function, y i The labeled dataset D l The one-hot encoding of the i-th data label in, f i(x) is the labeled dataset D l The output unit of the i-th data, y′ j is the unlabeled set D ul The one-hot encoding of the jth data pseudo label in, f′ j (x) is the unlabeled set D ul The output unit of the jth data pseudo label in, is the balance coefficient.

[0029] Furthermore, the balance coefficient It is expressed as:

[0030]

[0031] Among them, t represents the variable that changes with the model iteration cycle, T1 and T2 are the simulation temperature constant values ​​of the deterministic annealing algorithm, and α max express The maximum neighborhood value of T1, T2 and α max It is a constant hyperparameter that can be set according to the specific environment. Generally, without pre-training, the parameter is set to α max =3, T1=100, T2=600.

[0032] Furthermore, the objective function of the Cycle-Fed model is modified, that is, an adaptive parameter μ is added to the objective function. The modified objective function is expressed as:

[0033]

[0034]

[0035] Among them, f c (w; w t ) represents the objective function with μ added; w represents the initial weight parameter of the model; w t Represents the updated weight parameter of the model after local iteration round t; F c (w) represents the initial objective function of the local client c; q represents the hyperparameter of the number of local training cycles; represents the weight parameter in the previous t-1th iteration of the global model; Represents the updated weight parameters of the local model in the current t-th iteration.

[0036] Furthermore, the weight parameters of the local model after updating in the tth iteration are It is expressed as:

[0037]

[0038] Among them, β(t) is a measure of the vector similarity between the global model weight gradient and the local model weight gradient.

[0039] Furthermore, after the pseudo-annotated samples are input into the discriminator of ACGAN for identification, the JS divergence between each annotated dataset and the unlabeled dataset is calculated, and the pseudo-annotated data with JS divergence less than the set threshold is regarded as the pseudo-annotated sample with double reset confidence. The JS divergence between each annotated dataset and the unlabeled dataset is expressed as:

[0040]

[0041] Among them, P data (x l ) means it belongs to the labeled set D l Data x l The distribution of P data (x ul ) indicates that it belongs to the unlabeled set D ul Data x ul distribution; KL() means calculating KL divergence; JSD() means calculating JSD divergence; x l represents the labeled data, x ul Indicates unlabeled data.

[0042] The pseudo-labeled data of the present invention can be trained locally in a cyclic iterative manner without human intervention through secondary identification of the discriminator, which can not only greatly reduce the communication cost between the client and the server, but also can use a large amount of unlabeled data for semi-supervised federated learning; in addition, using the global update gradient of the last iteration to limit the local update can also alleviate the local optimal situation and enhance the convergence efficiency and success rate of the central model. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a schematic diagram of the process framework of the data enhancement method based on semi-supervised federated learning under privacy protection of the present invention;

[0044] Figure 2 This is an example given in the embodiment of the present invention;

[0045] Figure 3 This is a model framework diagram of the data enhancement method based on semi-supervised federated learning under privacy protection of the present invention;

[0046] Figure 4 This is the process of enhancing data using ACGAN in the present invention;

[0047] Figure 5 This is a data flow relationship diagram in the present invention. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] The present invention proposes a data enhancement method based on semi-supervised federated learning under privacy protection, which specifically includes the following steps:

[0050] Construct a generative adversarial network ACGAN with an auxiliary classifier, add improved Dropout to ACGAN, and input the labeled data into ACGAN for data enhancement;

[0051] Build a Cycle-Fed model consisting of a central server and C clients, use the labeled samples and enhanced samples to train the Cycle-Fed model, and input the data of unlabeled samples into the Cycle-Fed model to predict and obtain pseudo-labeled samples;

[0052] The pseudo-annotated samples are input into the discriminator of ACGAN for identification, and pseudo-annotated samples with double reset confidence are obtained to complete data enhancement.

[0053] In the process of studying data enhancement in this invention, an interesting phenomenon is found, such as Figure 2 , the counterfeit money produced by the counterfeit money machine has a very high symmetrical similarity with the pseudo-annotated data generated by the model. The discriminator can identify the authenticity of the data just like the money detector can identify the authenticity of the money. With the simultaneous improvement of the discriminator and the generator, the quality of the pseudo-annotated data also increases; but when the generator generates some copies of the source data in order to deliberately cater to the discriminator, it will cause the generator to crash. In view of the problem that federated learning requires more high-quality annotated data, there are still challenges in how to better enhance the confidence of pseudo-annotated data. Therefore, this application proposes a data enhancement method based on semi-supervised federated learning under privacy protection.

[0054] Figure 1 In the overall process diagram of the present invention, the input of data enhancement in the present invention is random noise, category labels, labeled data sets and unlabeled data sets processed by the model, that is, Figure 1 After steps S1 to S4, the output is a global central model, a data enhancement set, a pseudo-annotated data set, and a pseudo-annotated data set with double reset confidence. Specifically, the following steps are included:

[0055] S1. Data enhancement

[0056] By reducing the sensitivity to variance shift, the generalization ability of the generator is improved to achieve the purpose of diverse and highly simulated data enhancement. The structure of the data enhancement part is as follows: Figure 4 As shown, the generator generates labeled generated data based on the category label and random noise, and inputs the labeled generated data and the labeled real data into the discriminator. The discriminator makes two judgments, namely, whether the data is a real sample or a generated sample, and judges the category of the sample.

[0057] S11. Improved ACGAN

[0058] In this embodiment, a generative adversarial network ACGAN with an auxiliary classifier is used, considering the variance shift problem that may be caused by the random removal of neurons by native Dropout. Instead of directly abandoning Dropout or placing a Dropout layer only after the BN layer, it is better to try to reduce the variance sensitivity to provide a better possibility.

[0059] The original variance shift is caused by the difference in expectations between the training mode and the test mode. It is known that in the training mode, when Variance Var Train for:

[0060]

[0061] In the test mode, when X = x, x ~ N (0, 1) the variance Var Test for:

[0062]

[0063] From formulas (1) and (2), we can see that the original variance shift ratio Δ(v) = 1, while the addition of Dropout leads to

[0064]

[0065]

[0066] In this embodiment, let X = x(1+r), r~N(0,1), and modify r to be located at The uniform distribution in the , the improved Dropout variance shift (4) is obtained. When p is smaller, the variance shift is less affected than before. At the same time, the improved Dropout layer is placed after each Batch Normalization layer of the generator, even after the first convolution layer. This embodiment will add an improved ACGAN after Dropout called Uout-ACGAN, using the independent distribution characteristics of x and r, which can make M GenBetter generate data samples with high simulation diversity D aug .

[0067] S12: Annotated data enhancement.

[0068] S121: Define Uout-ACGAN data enhancement set D aug .

[0069] Assume that the source labeled data is Each instance i∈D l , X i represents the feature vector of labeled sample i, Y i represents the label class of the labeled sample i, N l Indicates the amount of labeled data. Generate high-fidelity data using Uout-ACGAN Each instance j∈D aug , represents the feature vector of enhanced sample j, Y j represents the label class of the enhanced sample j, N aug Indicates the data size of the augmented sample dataset.

[0070] S122: Generator M of Uout-ACGAN Gen and the discriminator M Disc

[0071] Each client has a different M Gen and M Disc , this is because the data are not independent and identically distributed. Gen Depends on the noise z and the class label Generate samples M Disc Then learn D l The data distribution of and the probability distribution of c.

[0072]

[0073]

[0074] Among them, M Gen (c,z) means inputting noise z and class label c into generator M Gen Generated data; P(D l |X) indicates D l P(c|X) represents the data distribution of feature X in class label c.

[0075] Each client has a different discriminator M Disc and generator M Gen , this is because the data are not independent and identically distributed. GenThe input is not only random noise z, but also a class label M Disc It is not only used for data enhancement, but also can enhance the confidence of pseudo-annotations.

[0076] M Disc = argmax(L S +L C ) (7)

[0077] M Gen = argmax(L C -L S ) (8)

[0078] The Uout-ACGAN objective function consists of two parts: the log-likelihood function L of the correct source data S and the log-likelihood function L of the correct class label C .

[0079]

[0080] L C =E[logP(C=c|X real )]+E[logP(C=c)|X fake ] (10)

[0081] In which, let θ Disc is the parameter vector of the generator and θ Gen is the parameter vector of the generator; E[] means to find the expectation; X real Indicates labeled data, that is, real samples; X fake express Defined in Formula 5, M Gen Given the noise z and the class label Guide to generate samples.

[0082] S2. Model building

[0083] In traditional federated learning, clients with more data are more likely to be selected. However, data-poor parties may provide some features to enhance the robustness and generalization of the model. To solve this problem, this embodiment uses data enhancement to make up for the data volume of some participants, specifically using pseudo-annotated data after secondary identification.

[0084] The model framework diagram constructed by the present invention is as follows Figure 3As shown, it mainly includes two aspects: federated learning and Cycle-Fed model. Corresponding to the federated learning part, it includes a server and multiple client terminals connected to the server. The federated learning part sends the model to the Cycle-Fed model, and the Cycle-Fed model performs gradient updates on the sent model. The process of gradient updating the Cycle-Fed model includes: when receiving the sent model, that is, the initial model, use the enhanced samples and the labeled samples to train the initial model; after completing the training of the initial model, that is, the updated model, input the unlabeled samples into the updated model, label the unlabeled samples, and obtain pseudo-labeled samples; input the pseudo-labeled samples into the discriminator, and select the pseudo-labeled samples with double reset reliability; input the enhanced samples, the labeled samples, and the pseudo-labeled samples with double reset reliability into the updated model for training to obtain an enhanced model, update the parameters of the initial model through the parameters of the enhanced model, and then use the updated model to update the parameters of the federated learning model. This embodiment is mainly explained by the following two steps:

[0085] S21: Define the training dataset.

[0086] The present invention considers a Cycle-Fed model, in which the data flow process is as follows: Figure 5 As shown in Figure 2, the model consists of a central server S and C clients. In the Cycle-Fed model, the labeled dataset is used Training a Discriminator The discriminator output data augmentation set Using labeled datasets And data augmentation set Training the initial model And the unlabeled dataset Input the initial model that has completed training Get pseudo-annotated dataset And the pseudo-annotated dataset Input Discriminator Get a pseudo-label dataset with double reset confidence And use the labeled dataset Data augmentation set And a pseudo-label dataset with double reset confidence For the initial model For further training. The server is only used for model aggregation and contains a public dataset as a validation set For each client C∈{C1,...,C k}, each client has a labeled dataset D l and an augmented dataset D aug , another client has an unlabeled dataset Dul In fact, the labeled data is much less than the unlabeled data, so N l <<N ul In cross-institutional horizontal federated learning, the dataset of the local client is IID, while the datasets between clients can be Non-IID.

[0087] S22: Pseudo-label the unlabeled data.

[0088] S221: Define pseudo-annotated dataset

[0089] initial Since v∈D ul No label class, only an X v To represent the feature vector. Using the initial model After prediction, let the 20% with higher confidence probability be the initial pseudo-label dataset D pl , each instance v∈D in the dataset pl , X′ v represents a pseudo-label sample. v (x) is the output unit of the objective function, and x is the input feature vector; in particular, using M Disc Right D pl Perform secondary identification to obtain Where X″ v represents a pseudo-labeled sample with double reset confidence.

[0090]

[0091]

[0092] S222: Coefficient α(t) for balancing the difference in the amount of pseudo-annotated data.

[0093] α(t) is a balancing factor, and the proper scheduling of this factor is crucial to network performance. If α(t) is too high, this factor will interfere with training even with labeled data. If α(t) is too small, unlabeled data cannot be better utilized. In addition, by gradually increasing the deterministic annealing process of α(t), it is hoped that it will help the optimization process avoid bad local minima, so that the pseudo-labels of unlabeled data are as close to the true labels as possible.

[0094]

[0095] Among them, T1 and T2 are the temperature values ​​of simulated annealing, and the initialization of the T2 value is also very important.

[0096] In the standard semi-supervised learning setting, since the labeled data is much less than the unlabeled data, that is, Nl <<N ul . It is necessary to minimize the losses from labeled data and unlabeled data in a balanced manner, so the local objective function is updated as follows:

[0097]

[0098] L(y,f(x))=-ylogf(x)-(1-y)log(1-f(x)) (15)

[0099] Among them, F c (x) is the local objective function, is the amount of randomly sampled labeled data, is the amount of randomly sampled unlabeled data, L(y i ,f i (x)) is the cross entropy loss function, y i Yes D l One-hot encoding of the label, f i (x) is D l The output unit of y′ j Yes D ul The one-hot encoding of the pseudo-label, f′ j (x) is D ul The output unit of the pseudo label.

[0100] The algorithm of the present invention combines pseudo-labeling. In each iteration, the model uses the prediction of the previous iteration as D ul Theoretically, based on the entropy regularization assumption, it is possible to benefit from unlabeled data in the maximum a posteriori estimation framework, which minimizes the class probability conditional entropy H(y ul |x ul ) as in formula (16). Entropy is a measure of class overlap. As class overlap decreases, the density of data points at the decision boundary decreases. Low-density separation between classes is achieved without any density modeling.

[0101]

[0102] in, is the feature vector of the jth unlabeled sample, is the unknown label of the jth unlabeled sample, N Class is the number of categories.

[0103] At the same time, this embodiment defines the maximum posterior distribution By maximizing the conditional log-likelihood of the labeled data, we also minimize the class probability conditional entropy H(y ul|x ul ), unlabeled data can be used to obtain better generalization performance.

[0104]

[0105] in, is the feature vector of the jth labeled sample, is the category of the jth labeled sample. λ is the coefficient of the two balances.

[0106] The effectiveness of the pseudo-labeling of the present invention can be proved by formulas (16) to (17).

[0107] In particular, the present invention takes the top 20% pseudo labels y' with high confidence ul Join D mix =∑(D l +D aug +D pl ). At this time, D pl Although the confidence level of is high, it is not enough to meet the requirements. Therefore, consider using M Disc Right D pl Perform secondary screening to obtain D dt , then update D mix =∑(D l +D aug +D dt ).

[0108] Since the pseudo-label class is actually the real class label, in Uout-ACGAN with classifier, the class label can be used as an auxiliary to identify the data. Disc The JS divergence can be used to measure the difference in data distribution (18). The smaller the JS divergence between labeled data and unlabeled data, the higher the confidence of the pseudo-labeling. The calculation of the JS divergence between labeled data and unlabeled data is expressed as:

[0109]

[0110] Among them, V(x l ,x ul ) is used to measure x l With x ul The distribution distance, P data (x) is the data distribution of data x; P data (x l ) means it belongs to the labeled set D l Data x l The distribution of P data (x ul ) indicates that it belongs to the unlabeled set D ul Data x uldistribution; KL() means calculating KL divergence; JSD() means calculating JSD divergence; x l represents the labeled data, x ul Indicates unlabeled data.

[0111] S3: Correction update trend.

[0112] The present invention utilizes the central trend of the previous iteration to automatically correct the local update direction, hoping to alleviate the local optimal trap problem.

[0113] S31: Define correction terms.

[0114] S311: Define the local loop count hyperparameter q.

[0115] Multiple local training can reduce the amount of communication. The number of cycles is an important hyperparameter q. If q is too large, it may fall into the local optimal trap, causing the global model to fail to converge. If q is too small, it will increase the communication load and make it difficult to achieve the best effect of the model.

[0116] S312: Define a local adaptive term μ.

[0117] Due to the heterogeneity of cross-institutional systems, too many local updates may cause the model to fall into the local optimal trap. We propose to add an adaptive term μ to the local objective function to effectively limit the impact of local updates of variables. This parameter can adaptively adjust the convergence direction of local updates. Client c t ∈C minimizes the loss function f by approximating the correction term c This correction term is very helpful for the difficult convergence problem caused by local heterogeneity, and the automatic correction does not require human intervention.

[0118]

[0119] S32: Local optimal update trend correction.

[0120] We found that local correction terms may help maintain a balance between global and local update trends. Due to the heterogeneity of data and devices, the values ​​of q and μ should be locally personalized rather than globally unified. And we believe that there is a certain connection between these two hyperparameters. Since μ can constrain the direction of iteration to be close to the global update trend, it can ensure the convergence of the global model while ensuring local optimization updates. And q can also limit the local from falling into the local optimal trap by changing the number of local iterations. Specifically, we not only add the correction term to the local function, but also make it automatically constrain the size of q instead of using a fixed number of iterations. For different clients c t ∈C, it is more reasonable to use an adaptive number of iterations.

[0121]

[0122] S33: Optimize client random selection.

[0123] Improve the random selection of participants. Although randomness helps promote fairness, the heterogeneity of devices may still make the model difficult to train. Considering that the last global update is often retained locally, the vector similarity between the global gradient and the local gradient is calculated to decide whether to upload the update to the global participating aggregation. In fact, the convergence speed of the global model of federated learning is often not balanced, because the gradient descent is fast at first and then slow. Suppose a balance parameter β(t). In the cycle where the gradient descent is fast, β(t) is larger, and in the cycle where the gradient descent is slow, β(t) is smaller. When setting the balance parameter β(t), technicians in this field generally initialize its value to 1. As the iteration round t increases, β(t) also decreases linearly.

[0124]

[0125] Intuitively, the cosine similarity between the global model parameter gradient and the local model parameter gradient can simply and effectively evaluate the similarity, that is, the closer the cosine distance is to 1, the more relevant the local update is to the central update trend. According to this idea, the solution provided by the present invention can dynamically identify local gradient updates and exclude updates with weak correlation.

[0126] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A pseudo-annotated data enhancement method based on semi-supervised federated learning under privacy protection, characterized in that: In cross-device federated learning, participants are separate devices that store unlabeled data. Unlabeled data includes photos, text input, and physiological indicators measured by wearable devices. Data enhancement is performed on the pseudo-labeled data corresponding to the unlabeled data in the device, which specifically includes the following steps: Construct a generative adversarial network ACGAN with an auxiliary classifier, add the improved Dropout to ACGAN, and input the labeled data into ACGAN for data enhancement; the process of adding the improved Uout-Dropout to ACGAN includes: Improve the calculation of the variance of the Dropout layer, that is, let X = x(1+r), and r is modified to be located at Uniform distribution in Put the improved Dropout layer after each Batch Normalization layer and the first convolutional layer of the generator; Among them, X represents the input of the neural network, x(1+r) represents the input assigned to X after being calculated by the standard normal distribution, and r is located at The uniform distribution in A Cycle-Fed model consisting of a central server and C clients is constructed. The Cycle-Fed model is trained using labeled samples and enhanced samples, and the data of unlabeled samples are input into the Cycle-Fed model to predict pseudo-labeled samples. The goal of the Cycle-Fed model during training is to minimize the loss function, which is expressed as: Among them, F c (x) is the local objective function, is the amount of randomly sampled labeled data, is the amount of randomly sampled unlabeled data, L(,) is the cross entropy loss function, y i The labeled dataset D l The one-hot encoding of the i-th data label in, f i (x) is the labeled dataset D l The output unit of the i-th data, y′ j is the unlabeled set D ul The one-hot encoding of the j-th data pseudo label in f j ′(x) is the unlabeled set D ul The output unit of the jth data pseudo label in ; α(t) is the balance coefficient, expressed as: Among them, t represents the variable that changes with the model iteration cycle, T1 and T2 are the simulation temperature constant values ​​of the deterministic annealing algorithm, and α max represents the maximum neighborhood value of α(t); T1, T2 and α max It is a constant hyperparameter that can be set according to the specific environment. Generally, without pre-training, the parameter is set to α max =3, T1=100, T2=600; The objective function of the Cycle-Fed model is modified, that is, an adaptive parameter μ is added to the objective function. The modified objective function is expressed as: Among them, f c (w; w t ) represents the objective function with μ added; w represents the initial weight parameter of the model; w t Represents the updated weight parameter of the model after local iteration round t; F c (w) represents the initial objective function of the local client c; q represents the hyperparameter of the number of local training cycles; represents the weight parameter in the previous t-1th iteration of the global model; Represents the updated weight parameter of the local model in the current t-th iteration, expressed as: Among them, β(t) is the vector similarity that measures the weight gradient of the global model and the weight gradient of the local model; The pseudo-annotated samples are input into the discriminator of ACGAN for identification, and pseudo-annotated samples with double reset confidence are obtained to complete data enhancement.

2. The pseudo-annotated data enhancement method based on semi-supervised federated learning under privacy protection according to claim 1, characterized in that: During the training of ACGAN, the objective function of the generator is expressed as: M Disc =argmax(L S +L C ) Let the objective function of the discriminator be expressed as: M Gen =argmax(L C -L S ) Among them, M Disc represents the discriminator, M Gen represents the generator; L S represents the log-likelihood function of the correct source data, L C Represents the log-likelihood function of the correct class label.

3. The pseudo-annotated data enhancement method based on semi-supervised federated learning under privacy protection according to claim 1, characterized in that: The process of obtaining pseudo-annotated samples with double reset confidence includes: Among them, X′ v It means that the data of unlabeled samples are input into the Cycle-Fed model to predict and obtain pseudo-labeled samples; Indicates that it belongs to the unlabeled dataset D ul The data x in the target function f v ( ) Pseudo-labeled data obtained; X″ v represents a pseudo-labeled sample with double reset confidence; Indicates that the pseudo-annotated sample x′ in the initial pseudo-annotated dataset v Input discriminator M Disc ( ) is the output result.

4. The pseudo-annotated data enhancement method based on semi-supervised federated learning under privacy protection according to claim 1, characterized in that: After the pseudo-annotated samples are input into the discriminator of ACGAN for identification, the JS divergence between each annotated dataset and the unlabeled dataset is calculated, and the pseudo-annotated data with JS divergence less than the set threshold is regarded as the pseudo-annotated sample with double reset confidence. The JS divergence between each annotated dataset and the unlabeled dataset is expressed as: Among them, P data (x l ) means it belongs to the labeled set D l Data x l The distribution of P data (x ul ) indicates that it belongs to the unlabeled set D ul Data x ul distribution; KL() means calculating KL divergence; JSD() means calculating JSD divergence; x l represents the labeled data, x ul Indicates unlabeled data.

Citation Information

Patent Citations

  • Semi-supervised multispectral and panchromatic remote sensing image fusion method and system

    CN111340743A

  • Missing data filling generation method based on dual-condition generative adversarial network

    CN114757335A