Defense method against user-level attacks in privacy-preserving federated learning framework

By using random combination and user scoring mechanisms in privacy-preserving federated learning to generate and select global model replica parameters, the problem of user-level attacks is solved, the filtering of malicious gradients and the protection of data privacy are achieved, taking into account learning efficiency and security. sex.

CN113704807BInactive Publication Date: 2024-08-27UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010428806.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-20
Publication Date
2024-08-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing privacy-preserving federated learning solutions cannot effectively defend against user-level attacks, especially when user data is controlled by malicious users, and cannot detect and defend against the behavior of malicious users.

Method used

In each round of iteration, the server randomly selects a part of users to send encrypted global model parameters, and generates multiple global model copy parameters by randomly combining the encrypted gradients fed back by the user. The user evaluates and selects the optimal model copy parameters, and then Update the global model to ensure that model parameters that are not vulnerable to attack are selected as the new global model.

Benefits of technology

Through random combination and user scoring mechanism, it effectively filters abnormal gradients and defends against user-level attacks while maintaining data privacy protection, reducing the additional overhead of the server and not affecting the learning rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113704807B
    Figure CN113704807B
Patent Text Reader

Abstract

The present invention discloses a defense method against user-level attacks under a privacy-preserving federated learning framework. The method randomly combines encrypted gradients through a server so that abnormal gradients from attackers may not be selected. Therefore, when generating multiple model copies, copies that are not affected by attackers can be generated. By using the user's score for each model copy, copies that do not contain attack gradients are screened out as new global models, thereby defending against user-level attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of privacy-preserving federated learning, and in particular to a defense method against user-level attacks under a privacy-preserving federated learning framework. Background Art

[0002] With the development of distributed machine learning, it is possible for multiple users to jointly train a deep learning model. In the current federated learning scheme, each user uses his own private data to calculate the gradient, and then uploads it to the cloud server to update the global model. In this process, users do not want their data to be exposed to the cloud server, so some security protection measures (such as homomorphic encryption, etc.) are used to prevent the server from obtaining information about private data, which is also called privacy-preserving federated learning. However, due to the existence of these security protection measures, the server cannot review each user, so if some users are controlled by malicious users, the federated learning process will be vulnerable to attacks. When there are a large number of users participating in the joint learning task, there is a high probability that the user is maliciously controlled, and the privacy protection agreement allows malicious users to directly participate in the task and avoid being detected by the cloud server.

[0003] Most existing protection schemes are aimed at attacks from the server side to protect user data from being stolen by the server, but cannot defend against attacks from malicious users. Or they audit unprotected gradients, so they cannot be applied to user-level attacks under the condition that gradients are protected. On the other hand, the nature of federated learning determines that users can obtain information about the model, so encryption of the model is ineffective in defending against malicious users. Summary of the invention

[0004] The purpose of the present invention is to provide a defense method against user-level attacks under a privacy-preserving federated learning framework, which can effectively defend against user-level attacks.

[0005] The objective of the present invention is achieved through the following technical solutions:

[0006] A defense method against user-level attacks in a privacy-preserving federated learning framework, including:

[0007] In each round of iteration, the server randomly selects a portion of the clients to send the encrypted global model parameters;

[0008] The server receives the encrypted gradients fed back by each user end, obtains multiple encrypted gradient sets by random combination, uses each encrypted gradient set to update the global model respectively, generates multiple global model replica parameters, and then sends them to each user end; wherein the encrypted gradients are calculated and encrypted by the local data set after the user end updates the local model parameters using the global model parameters;

[0009] Afterwards, the server side will receive the optimal global model parameters selected by each user side, and will use statistics to select the model parameters that have been selected as the optimal global model parameters the most times as new global model parameters; among them, the user side uses the local data set to evaluate each model copy parameter, and selects the model copy parameter with the highest evaluation score as the optimal global model parameter.

[0010] It can be seen from the technical solution provided by the present invention that, since the abnormal gradients from the attacker may not be selected in the process of randomly combining the encrypted gradients by the server, it is possible to generate copies that are not affected by the attacker when multiple copies are randomly generated. The user's score for each model copy can be used to screen out the copies that are not affected by the attacker as a new global model, thereby defending against user-level attacks. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0012] Figure 1 A flowchart of a method for defending against user-level attacks in a privacy-preserving federated learning framework provided in an embodiment of the present invention;

[0013] Figure 2 A schematic diagram of a normal communication interaction process between a client and a server provided in an embodiment of the present invention;

[0014] Figure 3 A schematic diagram of the communication interaction process between an attacker infiltrating a normal client and a server provided by an embodiment of the present invention;

[0015] Figure 4 A schematic diagram of a method for defending against user-level attacks provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0016] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings 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 protection scope of the present invention.

[0017] The embodiment of the present invention provides a defense method against user-level attacks in a privacy-preserving federated learning framework, which mainly includes:

[0018] In each round of iteration, the server randomly selects a portion of the clients to send the encrypted global model parameters;

[0019] The server receives the encrypted gradients fed back by each user end, obtains multiple encrypted gradient sets by random combination, uses each encrypted gradient set to update the global model respectively, generates multiple global model replica parameters, and then sends them to each user end; wherein the encrypted gradients are calculated and encrypted by the local data set after the user end updates the local model parameters using the global model parameters;

[0020] Afterwards, the server side will receive the optimal global model parameters selected by each user side, and will use statistics to select the model parameters that have been selected as the optimal global model parameters the most times as new global model parameters; among them, the user side uses the local data set to evaluate each model copy parameter, and selects the model copy parameter with the highest evaluation score as the optimal global model parameter.

[0021] like Figure 1 As shown in Figure 1, the main process of this method involves the server and the user. The server stores the parameters of the encrypted global model, and the user stores the user's own data set and local model. Encryption uses an encryption scheme that can be additively homomorphic, or other forms of encryption schemes; the process in each round of iteration t is as follows:

[0022] 1) The server maintains a global model M global ,The server randomly selects a part of the users to send the encrypted global model parameters.

[0023] In the embodiment of the present invention, a portion of users are randomly selected as a user terminal set for verification.

[0024] 2) Any user terminal U randomly selected by the server i Download global model parameters encrypted by public key pk Use the private key sk to decrypt and update the local model parameters, and then use the local data set data i,t Computing Gradients Encrypt with the public key pk and upload to the server.

[0025] In the embodiment of the present invention, gradient refers to the gradient calculated by the user end using local data and global model parameters, which is used to update the global model; in the formula, LocalTrain is the process in which the user end uses the local data set and the global model to perform local training to calculate the gradient.

[0026] 3) After collecting the encrypted gradients, the server randomly combines these encrypted gradients to form multiple encrypted gradient sets, and uses each gradient set to update the global model separately to obtain multiple model copy parameters.

[0027] As an example, the server uses an encrypted gradient set G selected The update is performed to obtain a model copy parameter, and the encrypted model copy parameter result is:

[0028]

[0029] in, represents the encrypted global model copy parameter, and G represents an encrypted gradient.

[0030] Those skilled in the art will understand that a model copy refers to multiple different new models obtained by updating the same model using different gradient sets. Considering that the model exists in the form of parameters, it is directly described here as a model copy parameter.

[0031] 4) The server numbers these model copy parameters and sends them to each client. The client uses the local data set to evaluate each model copy parameter, scores it, selects the optimal model copy parameter number and uploads it.

[0032] Similar to before, the user receives the encrypted model copy parameters, which are decrypted using the private key sk and then evaluated using the local data set. During the evaluation, the local data set can be used to calculate the loss function of the model copy parameters. The smaller the loss function, the higher the evaluation score. Therefore, each user can use the model copy parameters with the smallest loss function as the optimal model copy parameters.

[0033] When an attacker infiltrates a normal user terminal and sends abnormal gradients to the server terminal, the server terminal can generate a gradient set that does not contain abnormal gradients and a gradient set that contains abnormal gradients through random combination, and will generate corresponding global model replica parameters by updating the global model. During the evaluation process on the user terminal, the evaluation score of the global model replica parameters obtained by updating the global model with the gradient set that does not contain abnormal gradients will be higher than the evaluation score of the global model replica parameters obtained by updating the global model with the gradient set that contains abnormal gradients.

[0034] In the embodiment of the present invention, the user terminals that send the global model replica parameters are the user terminal set used for calculation; the user terminal set used for verification partially overlaps with the user terminal set used for calculation, or does not overlap, or is a completely identical user terminal set.

[0035] If there is no overlap between the user-side set used for verification and the user-side set used for calculation, the gradient calculation and model screening processes are performed simultaneously to improve efficiency.

[0036] The above are the main solutions involved in the present invention, and the principles of the above solutions are explained below.

[0037] like Figure 2 As shown in the figure, it is the normal communication interaction process between the user end and the server end. Figure 3 As shown, when the attacker U a The mixed user terminal performs the same procedure as the normal user terminal but uploads the opposite gradient (or any other data), thereby affecting the global gradient update process.

[0038] like Figure 4 As shown in the figure, the server randomly combines the received gradients. In the process of randomly combining gradients, a gradient set that does not contain malicious gradients is generated. Using this set to update the model can obtain a model copy that is not attacked. The user side has the ability to discern the performance of the model. For model copies that are obviously attacked, users can easily find them (abnormal models will have excessively large loss functions). For model copies that are not obviously attacked, due to the robustness of federated learning to errors in training, it will not have a significant impact on the main task. For the attacker U a Unless the uploaded abnormal gradient has a significant impact on the model immediately (loss increases significantly or accuracy decreases significantly), the impact of the abnormal gradient will be quickly masked by the impact of the normal gradient update due to the existence of a large number of normal gradients. Therefore, the user end can make a good enough choice for the model copy.

[0039] Although the solution provided by the embodiment of the present invention uses only a part of the gradient in each round of update, which will slightly reduce the learning rate, it will not affect the final performance. Many privacy-preserving learning solutions also only use a part of the gradient, so the problem of slower learning rate is acceptable.

[0040] The solution provided by the embodiment of the present invention mainly achieves the following beneficial effects:

[0041] 1) Abnormal gradients can be filtered out while the gradients are protected: During the process of random combination and scoring of gradients, the server only obtains information about which gradients are more useful for the learning task, and cannot obtain any information about the gradient data itself. Therefore, the security of the gradient, that is, the privacy of user data, is still protected. On the other hand, through user feedback, the optimal gradient set is selected, that is, the gradient set that does not contain malicious gradients, and malicious gradients are successfully filtered out.

[0042] 2) It can take into account both privacy protection and defense against user-level attacks, because the server does not need to obtain more information about the gradients uploaded by users: The reason is the same as above, the server does not obtain more information about the gradients.

[0043] 3) The task of evaluating the normality of the gradient (detecting anomalies in the gradient) is transferred to legitimate users, which does not cause additional overhead to the server. Since the forward computing efficiency of deep learning is very high, the process of users evaluating the model does not incur a large computing overhead.

[0044] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiments can be implemented by software, or by means of software plus necessary general hardware platforms. Based on such understanding, the technical solutions of the above embodiments can be embodied in the form of software products, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0045] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A defense method against user-level attacks in a privacy-preserving federated learning framework, characterized in that: include: In each round of iteration, the server randomly selects a portion of the clients to send the encrypted global model parameters; The server receives the encrypted gradients fed back by each user end, obtains multiple encrypted gradient sets by random combination, uses each encrypted gradient set to update the global model respectively, generates multiple global model replica parameters, and then sends them to each user end; wherein the encrypted gradients are calculated and encrypted by the local data set after the user end updates the local model parameters using the global model parameters; Afterwards, the server side will receive the optimal global model parameters selected by each user side, and will use statistics to select the model parameters that have been selected as the optimal global model parameters the most times as new global model parameters; among them, the user side uses the local data set to evaluate each model copy parameter, and selects the model copy parameter with the highest evaluation score as the optimal global model parameter.

2. The method for defending against user-level attacks in a privacy-preserving federated learning framework according to claim 1, characterized in that: When an attacker infiltrates a normal user terminal and sends abnormal gradients to the server terminal, the server terminal can generate a gradient set that does not contain abnormal gradients and a gradient set that contains abnormal gradients through random combination. By updating the global model, the corresponding global model copy parameters will be generated; During the evaluation process on the user side, the evaluation score of the global model replica parameters obtained by updating the global model with a gradient set that does not contain abnormal gradients will be higher than the evaluation score of the global model replica parameters obtained by updating the global model with a gradient set that contains abnormal gradients.

3. The method for defending against user-level attacks in a privacy-preserving federated learning framework according to claim 1, characterized in that: The server maintains a global model M global In each iteration t, any user U randomly selected by the server i Download global model parameters encrypted by public key pk Use the private key sk to decrypt and update the local model parameters, and then use the local data set data i,t Computing Gradients The data is encrypted with the public key pk and uploaded to the server. LocalTrain is the process in which the user uses the local data set and the global model to perform local training and calculate the gradient. The server uses the collected encrypted gradients Update the model: in, represents the encrypted model copy parameter, G represents an encrypted gradient, G selected Represents an encrypted gradient set.

4. The method for defending against user-level attacks in a privacy-preserving federated learning framework according to claim 1, characterized in that: A portion of users randomly selected is the user terminal set for verification, and the user terminals that send the global model copy parameters are the user terminal set for calculation; the user terminal set for verification and the user terminal set for calculation may partially overlap, may not overlap, or may be completely the same user terminal set.

5. The method for defending against user-level attacks in a privacy-preserving federated learning framework according to claim 1, characterized in that: The server numbered the global model replica parameters and sent them to each client, which then received the number corresponding to the optimal global model parameter selected by the client.