Longitudinal federal forgetting learning method based on poisoning attack intervention training
Through the Taylor expansion optimization loss function and the Paillier homomorphic encryption algorithm, combined with the anomaly detection and parameter rollback of the benchmark data set, the problem of insufficient application of vertical federated learning in complex data environments and difficulty in resisting malicious attacks is solved, achieving a more efficient Data privacy protection and model performance improvement.
Patent Information
- Application Number
- CN202410602575.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-09-06
AI Technical Summary
The application of vertical federated learning in processing complex data environments has not been fully explored, and it is difficult to resist the catastrophic damage caused by malicious attacks, affecting user data privacy and security.
A longitudinal federated forgetting learning method based on poisoning attack intervention training is adopted, the loss function is optimized through Taylor expansion, the Paillier homomorphic encryption algorithm is used to transfer the gradient, and the benchmark data set is used for anomaly detection and parameter rollback to repair the poisoning attack. Influence.
It improves the performance and robustness of the model, can repair the damage caused by poisoning attacks without requiring additional recovery training, ensures data privacy and security, and enhances the adaptability and generalization capabilities of the model.
Smart Images

Figure CN118606932A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data security and privacy protection, and relates to privacy computing, federated learning technology and federated forgetting learning technology, specifically a vertical federated forgetting learning method based on poisoning attack intervention training. Background Art
[0002] The current Internet is full of various data generated by users, which contains users' privacy and sensitive information, and data security issues are becoming increasingly prominent. With the development of machine learning technology, a lot of user data is used to train models, but traditional machine learning requires all user data to be trained together, which makes it impossible to guarantee the security of training data.
[0003] As the value of data is mined by more companies, people pay more and more attention to the ownership of data. Relevant laws also give users the ownership of their own data. For example, the European Union issued the General Data Protection Regulation, and California enacted the California Consumer Privacy Act. These laws not only clarify the ownership of data by users, but also give users the right to delete data, which means that users can ask companies or models to clear the impact of their data. Federated learning was born in this context. It is a special paradigm of machine learning. In the training process of federated learning, each user as a client can train data locally, thus avoiding the risk of exposing data to other clients, and then send the training results to the server, which completes the final aggregation task. Federated learning can not only protect user data privacy, but also avoid data silos.
[0004] In order to satisfy the user's right to delete, researchers combined federated learning with machine forgetting and proposed the field of federated forgetting learning. Federated learning is divided into three categories: horizontal federated learning, vertical federated learning, and federated transfer learning. Most of the current research on federated forgetting learning focuses on horizontal federated learning, which mainly trains on data in the same field. As a method that can combine data from different fields for training, the application of vertical federated learning in forgetting learning has not been fully explored and studied, which limits the ability of federated forgetting learning to deal with complex data environments. Secondly, although federated forgetting learning aims to delete the impact of user data to protect user privacy and data security, it is difficult to resist catastrophic damage caused by malicious attacks. Summary of the invention
[0005] In order to improve the defense capability of federated forgetting learning in dealing with malicious attacks, the present invention proposes a longitudinal federated forgetting learning method based on poisoning attack intervention training. This method optimizes the loss function through Taylor expansion, adopts the Paillier homomorphic encryption algorithm to transfer gradients, uses a benchmark data set for anomaly detection, and eliminates the influence of malicious samples attacked by poisoning through parameter rollback. The damage caused by poisoning attacks can be repaired without additional recovery training.
[0006] To achieve the above object, the technical solution of the present invention is:
[0007] A longitudinal federated unlearning learning method based on poisoning attack intervention training includes the following steps:
[0008] Step 1: Select two participants A and B to participate in the vertical federated learning training and allocate local data to the participants Poison the local data of the participants to form malicious data, and at the same time Stored on Server C.
[0009] Step 2: Vertical federated learning uses logistic regression training to initialize the intermediate parameters θ = {θ A ,θ B}, In order to improve the confidentiality of the training process, the Paillier homomorphic encryption algorithm is used in the training process. After the training, the participants update the intermediate parameters according to the gradient to generate the local model of the participants.
[0010] Step 3: Server C calculates the benchmark dataset The participants calculate the detection score of the local data and determine whether the data features are abnormal. Participants A and B each generate an abnormal sequence Store the exception results into the exception sequence.
[0011] Step 4: Participants A and B each generate and initialize a regular parameter sequence Ω = {Ω A ,Ω B}, load the exception sequence in step 3 In each round of training, the intermediate parameters of the regular parameter sequence are stored and iterated according to the abnormal sequence results, and then the abnormal intermediate parameters in the abnormal sequence are replaced with the corresponding intermediate parameters in the regular parameter sequence.
[0012] Step 5: Load the intermediate parameters θ in the local models of each participant in step 4. Server C will integrate the intermediate parameters to generate the intermediate parameters of the final forgetting model, and then use the data of the test set to predict the data labels. The performance of the final forgetting model is determined by calculating the accuracy of the predicted value and the true value.
[0013] Based on the above scheme, the Paillier homomorphic encryption algorithm can be used to improve data security during training. Homomorphic encryption allows data to be calculated without decrypting it, thereby ensuring that data exchange between participants is carried out in an encrypted state and protecting the privacy and security of the data. By detecting and replacing abnormal intermediate parameters, the model can gradually forget those parameters that may cause performance degradation during training, thereby improving the final performance of the model. In addition, the integration of intermediate parameters by server C also helps to generate a more accurate and reliable final forgetting model. This method allows participants to dynamically adjust their local models according to changes in data features during training. By generating and updating abnormal sequences and regular parameter sequences, the model can adapt to anomalies and changes in the data, thereby maintaining its adaptability and flexibility. Vertical federated learning allows different participants to conduct collaborative training while maintaining data privacy. This method can be extended to more participants and larger datasets, thereby further improving the performance and robustness of the model. Through poisoning attacks and anomaly detection, the model can learn more about data distribution and potential anomalies during training, which helps to improve the generalization ability of the model on unseen data. By actively introducing poisoning attacks during the training process and taking corresponding intervention measures, this method can reduce the impact of data poisoning attacks on model performance in actual environments and improve the robustness of the model.
[0014] Furthermore, the step 1 specifically includes:
[0015] Step 1.1: The local data of the two training participants have the same data ID but different data features. The local data of participants A and B are expressed by formula (1):
[0016]
[0017] In the formula, is the feature space, represents the label space, It is the ID space.
[0018] Next, determine the characteristic dimensions of the local data of the participants. There are a total of Dimensional data features, assign non-overlapping feature dimensions to participants A and B, and participant A assigns Dimensional data features, participant B allocation Except The remaining data features, the data feature dimensions of the local data of participants A and B are shown in formula (2):
[0019]
[0020] In the formula, The local data of the representative party In the data The data corresponding to the dimensional data feature, n is the total number of samples of local data.
[0021] Data with the same ID only contains one label data. The label data is assigned to participant B, also known as the active party, which refers to the participant that contains both data features and data labels. The local data of participant B is represented as in Represents the label of the data sample; and participant A which only contains data features is called the passive party.
[0022] Step 1.2: Carry out a poisoning attack on the participant (one or two) to disrupt the participant's local data, so that the participant has a large amount of abnormal malicious data, and define the participant as a malicious participant.
[0023] Step 1.3: Use a benchmark dataset with the same data features and labeled data, which is smaller than the local data The benchmark datasets are stored on server C as the benchmark datasets of participants A and B respectively.
[0024] Furthermore, the step 2 specifically includes:
[0025] Step 2.1: Use logistic regression to train longitudinal federated learning and initialize the intermediate parameters θ = {θ A ,θ B}, each data feature dimension corresponds to an intermediate parameter.
[0026] Step 2.2: The loss function l(·) is expressed by formula (3):
[0027]
[0028] in Represents the data characteristics of the data sample; Represents the label of the data sample; T represents the transposition operation of the intermediate parameter θ;
[0029] Step 2.3: In order to enable the loss function to be Paillier encrypted, the sixth-order Taylor expansion is used to optimize the loss function. The gradients of participants A and B are calculated based on the optimized loss function, as shown in formulas (4) and (5), respectively:
[0030]
[0031] Where, X A is the set of local data features of participant A, X Bis the set of local data features of participant B, Y is the set of local label data of participant B, and λ is the regularization parameter.
[0032] Step 2.4: Server C generates a key pair and sends the public key to participants A and B. Participants A and B conduct interactive local training and collaboratively calculate their own gradients. The encrypted gradients are decrypted by server C and then the real gradients are passed to participants A and B. The participants update the intermediate parameters based on the real gradients. The intermediate parameter update is expressed by formula (6):
[0033]
[0034] Where lr is the learning rate and len(·) is the function for calculating the data length.
[0035] Furthermore, the step 3 specifically includes:
[0036] Step 3.1: Server C uses the benchmark dataset Calculate the mean of the benchmark dataset Standard Deviation In the formula Indicates the benchmark dataset The data value of the p-th dimension feature of the data; Indicates the local data of the participant. The data value of the p-th dimension feature of the local data; the participant calculates the detection score of each dimension of the local data feature, and the detection score calculation method is expressed by formula (7):
[0037]
[0038] In the formula, p represents the dimension of data features, is the detection score of the p-th dimension data feature in the local data.
[0039] Step 3.2: Participants A and B each generate an exception sequence A threshold δ is set to determine whether the detection score is abnormal. The elements of the abnormal sequence are expressed as formula (8):
[0040]
[0041] In the formula, is the abnormal result of the p-th dimension data feature, 1 is abnormal, 0 is normal, and |·| represents the absolute value.
[0042] Furthermore, the step 4 specifically includes:
[0043] Participants A and B each generate a regular parameter sequence Ω = {Ω A ,Ω B} and complete the initialization. In each round of training, the intermediate parameters of the data features with an abnormal sequence of 0 are stored in the corresponding position of the regular parameter sequence. When the corresponding abnormal sequence of a data feature is 1, the intermediate parameters in the regular parameter sequence replace the abnormal intermediate parameters of the participant to complete the forgetting operation. Finally, the intermediate parameters formed by the training of the participants are all non-abnormal.
[0044] Furthermore, the step 5 specifically includes:
[0045] Load the intermediate parameters θ of participants A and B obtained in step 4 = {θ A ,θ B}, the intermediate parameters are used as the intermediate parameters of the final forget model after training. The server integrates the final intermediate parameters and uses the test set to determine the performance of the final forget model.
[0046] The beneficial effects of the present invention include:
[0047] The present invention firstly optimizes the loss function of the participants during local training through Taylor approximation expansion, and then adopts Paillier homomorphic encryption algorithm to encrypt the intermediate parameters of the participants to prevent the server from cracking the intermediate parameters and thus obtaining local data; and proposes a mechanism capable of detecting malicious samples subjected to poisoning attacks, which identifies malicious samples by performing anomaly detection on the intermediate parameters of the local model of the participants using a benchmark data set stored on the server; finally, the normal intermediate parameters are replaced with the intermediate parameters affected by the malicious samples by parameter rollback, which not only restores the performance of the model subjected to poisoning attacks, but also does not require additional recovery training for the model, and the accuracy is even higher than that of the model without poisoning attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a schematic diagram of the overall structure of the longitudinal federated forgetting learning method based on poisoning attack intervention training of the present invention;
[0049] Figure 2 It is a flow chart of the longitudinal federated forgetting learning method based on poisoning attack intervention training of the present invention;
[0050] Figure 3 This is a flow chart of step 2 in the longitudinal federated forgetting learning method based on poisoning attack intervention training of the present invention. DETAILED DESCRIPTION
[0051] The embodiments of the present invention are implemented on the premise of the technical solution of the present invention, and detailed implementation methods and specific operation processes are given, but the protection scope of the present invention is not limited to the following embodiments.
[0052] Example 1
[0053] This embodiment uses Windows system as the development environment, Pycharm as the development platform, Python as the development language, Pytorch as the development framework, and adopts the longitudinal federated forgetting learning method based on poisoning attack intervention training of the present invention to complete the binary classification label prediction task for the text data set.
[0054] The present invention uses the Bank Marketing dataset, Adult dataset, Credit Card dataset and BreastCancer dataset as input data for experiments. In this embodiment, taking the Bank Marketing dataset as input data as an example, the longitudinal federated forgetting learning method for poisoning attack intervention training includes the following steps:
[0055] Step 1: After preprocessing the Bank Marketing dataset, split the data, assign the data to two parties, store the benchmark dataset and the test set in the server, and initialize the intermediate parameters;
[0056] Step 2: Start training of vertical federated learning. The server generates a key pair and sends the public key to the participants. The participants perform local training. Each participant interacts and collaborates, and sends the gradient of this round of calculation to the server. The server decrypts and then back-propagates the gradient to the participants. The participants update the intermediate parameters according to the gradient.
[0057] Step 3: The server calculates the mean and standard deviation of the benchmark data set. The participants calculate the detection score of each feature dimension of the local data based on these two differences, and store the abnormal results in the abnormal sequence. If the feature dimension is normal, the intermediate parameters are stored in the regular parameter sequence, which can be iterated with the increase of training rounds. The intermediate parameters identified as abnormal are replaced with the corresponding intermediate parameters in the regular parameter sequence, and the forgetting operation is completed by parameter rollback to determine the final intermediate parameters. The server aggregates the intermediate parameters to generate the final forgetting model. The present invention uses the area under the ROC curve (AUC) and the mean square error (MSE) as evaluation indicators, where the closer the AUC value is to 1, the better the classification performance of the model, and the smaller the MSE value is, the closer the predicted results of the model are to the actual results.
[0058] According to the above steps, the present invention is compared with the method of the local model of the participant subjected to poisoning attack (FL-A), the vertical federated learning subjected to poisoning attack (FL), and the retrained vertical federated learning (Retrain). As can be seen from Table 1, the evaluation index of the method proposed in the present invention on the Bank Marketing test set is better than that of other comparison methods except retraining. Among them, the AUC value of the present invention is even higher than the AUC of the retraining method. The training time of the comparison methods is slightly different, so the difference in training time can be ignored.
[0059] Table 1 Comparison of performance of various methods on the Bank Marketing test set
[0060]
[0061] In summary, only specific embodiments of the present invention are provided to describe the basic principles, advantages and purposes of the present invention. It should be clearly understood by those skilled in the art that the present invention is not limited to the above embodiments, and more changes and substitutions can be imagined based on the above description and without departing from the accuracy and scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A longitudinal federated forgetting learning method based on poisoning attack intervention training, It is characterized in that The method comprises the following steps: Step 1: Select two participants A and B to participate in the vertical federated learning training and allocate local data to the participants Poison the local data of the participants to form malicious data, and at the same time Stored on server C; Step 2: Vertical federated learning uses logistic regression training to initialize the intermediate parameters θ = {θ A ,θ B }, the Paillier homomorphic encryption algorithm is used in the training process. After the training is completed, the participants update the intermediate parameters according to the gradient to generate the local model of the participants; Step 3: Server C calculates the benchmark dataset The participants calculate the detection score of the local data and determine whether the data features are abnormal. Participants A and B each generate an abnormal sequence Store the abnormal results into the abnormal sequence; Step 4: Participants A and B each generate and initialize a regular parameter sequence Ω = {Ω A ,Ω B }, load the exception sequence in step 3 In each round of training, the intermediate parameters of the regular parameter sequence are stored and iterated according to the abnormal sequence results, and then the abnormal intermediate parameters in the abnormal sequence are replaced with the corresponding intermediate parameters in the regular parameter sequence; Step 5: Load the intermediate parameters θ in the local models of each participant in step 4. Server C integrates the intermediate parameters to generate the intermediate parameters of the final forgetting model. Then, the data of the test set is used to predict the data labels. The performance of the final forgetting model is determined by calculating the accuracy of the predicted value and the true value.
2. According to claim 1, a longitudinal federated forgetting learning method based on poisoning attack intervention training, It is characterized in that The step 1 specifically includes: Step 1.1: The local data of the two training participants have the same data ID but different data features. The local data of participants A and B are expressed by formula (1): In the formula, is the feature space, represents the label space, is the ID space; Next, determine the characteristic dimensions of the local data of the participants. There are a total of Dimensional data features, assign non-overlapping feature dimensions to participants A and B, and participant A assigns Dimensional data features, participant B allocation Except The remaining data features, the data feature dimensions of the local data of participants A and B are shown in formula (2): In the formula, The local data of the representative party In the data The data corresponding to the dimensional data feature, n is the total number of samples of local data; Data with the same ID only contains one label data, and the label data is assigned to participant B, that is, participant B is the active party that contains both data features and data labels. The local data of participant B is represented as in Represents the label of the data sample; Party A, which only contains data features, is the passive party; Step 1.2: Carry out poisoning attacks on one or two participants to disrupt the local data of the participants, so that the participants have a large amount of abnormal malicious data, and define the participants as malicious participants; Step 1.3: Use a benchmark dataset with the same data features and labeled data, which is smaller than the local data The benchmark datasets are stored on server C as the benchmark datasets of participants A and B respectively.
3. A longitudinal federated forgetting learning method based on poisoning attack intervention training according to claim 1 or 2, It is characterized in that The step 2 specifically includes: Step 2.1: Use logistic regression to train longitudinal federated learning and initialize the intermediate parameters θ = {θ A ,θ B }, each data feature dimension corresponds to an intermediate parameter; Step 2.2: The loss function l(·) is expressed by formula (3): in Represents the data characteristics of the data sample; Represents the label of the data sample; T represents the transposition operation of the intermediate parameter θ; Step 2.3: Use the sixth-order Taylor expansion to optimize the loss function so that the loss function can be Paillier encrypted. Calculate the gradients of participants A and B according to the optimized loss function, as shown in formulas (4) and (5) respectively: In the formula, X A is the set of local data features of participant A, X B is the set of local data features of participant B, Y is the set of local label data of participant B, and λ is the regularization parameter; Step 2.4: Server C generates a key pair and sends the public key to participants A and B. Participants A and B conduct interactive local training and collaboratively calculate their own gradients. The encrypted gradients are decrypted by server C and then the real gradients are passed to participants A and B. The participants update the intermediate parameters based on the real gradients. The intermediate parameter update is expressed by formula (6): Where lr is the learning rate and len(·) is the function for calculating the data length.
4. According to claim 2, a longitudinal federated forgetting learning method based on poisoning attack intervention training, It is characterized in that The step 3 specifically includes: Step 3.1: Server C uses the benchmark dataset Calculate the mean of the benchmark dataset Standard Deviation In the formula Indicates the benchmark dataset The data value of the p-th dimension feature of the data; Indicates the local data of the participant. The data value of the p-th dimension feature of the local data; the participant calculates the detection score of each dimension of the local data feature, and the detection score calculation method is expressed by formula (7): In the formula, p represents the dimension of data features, is the detection score of the p-th dimension data feature in the local data; Step 3.2: Participants A and B each generate an exception sequence A threshold δ is set to determine whether the detection score is abnormal. The elements of the abnormal sequence are expressed as formula (8): In the formula, is the abnormal result of the p-th dimension data feature, 1 is abnormal, 0 is normal, and |·| represents the absolute value.
5. According to claim 4, a longitudinal federated forgetting learning method based on poisoning attack intervention training, It is characterized in that The step 4 specifically includes: the participants A and B each generate a regular parameter sequence Ω={Ω A ,Ω B } and complete the initialization. In each round of training, the intermediate parameters of the data features with an abnormal sequence of 0 are stored in the corresponding position of the regular parameter sequence. When the corresponding abnormal sequence of a data feature is 1, the intermediate parameters in the regular parameter sequence replace the abnormal intermediate parameters of the participant to complete the forgetting operation until the intermediate parameters formed by the final training of the participant are non-abnormal.
Citation Information
Cited By
Decentralized longitudinal federal forgetting learning method based on split learning attack resistance
CN119210826A
Decentralized vertical federated forgetting learning method based on split learning to resist attacks
CN119210826B
Back door defense method and system based on reverse forgetting
CN120030542A
