A privacy-preserving model training method and system

By adding noise to local model data and selecting some elements to upload in federated learning, combined with location information transmission, the problems of transmission pressure and privacy protection in federated learning are solved, and efficient communication and data security are achieved.

CN113722760BActive Publication Date: 2024-10-15ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111040498.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-06
Publication Date
2024-10-15
Estimated Expiration
2041-09-06

AI Technical Summary

Technical Problem

In federated learning, there are many model parameters and a large amount of data to be transmitted, which leads to increased communication and transmission pressure. At the same time, there is an urgent need for privacy protection of multi-party data. It is difficult for existing technologies to effectively reduce transmission pressure and enhance data privacy protection.

Method used

By training members to add noise to the local model data, and determine the proportion of transmission data according to the iteration rounds, select some elements from the model data for server-side aggregation, reducing the amount of transmitted data, and at the same time carrying location information during the transmission process to ensure data privacy. .

Benefits of technology

It effectively reduces the communication pressure in the federated learning process and enhances the privacy protection of model data, ensuring training accuracy while reducing the risk of data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113722760B_ABST
    Figure CN113722760B_ABST
Patent Text Reader

Abstract

The embodiments of the present specification disclose a privacy-preserving model training method and system, wherein the participants include multiple training members and a server, and the training members and the server have a model to be trained with the same structure, and one round of iterative update of the method includes: using the training samples held by itself to perform at least one local training on the model to be trained to obtain model data; adding noise to some elements in the model data; determining the transmission data ratio based on at least the current iteration round, and selecting some elements from the model data based on the transmission data ratio to obtain transmission data; transmitting the transmission data to the server so that the server performs model data aggregation; receiving the model data update result returned by the server, and performing a local model update based on the model data update result, and using the updated local model as the model to be trained for the next round of iterative update, or determining the final model based on this.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of machine learning technology, and in particular to a privacy-preserving model training method and system. Background Art

[0002] In the fields of data analysis, data mining, economic forecasting, etc., federated learning can collaboratively train machine learning models for multiple parties to use while ensuring the security of multiple parties' data. In some application scenarios, there are higher requirements for data security, so it is necessary to further protect the multi-party data in federated learning.

[0003] At present, with the gradual increase in task complexity and performance requirements, model parameters are also increasing accordingly, and the data transmitted to the server has increased exponentially, so the pressure of communication transmission is relatively large. Therefore, a model training method that can reduce the transmission pressure in the federated learning process is urgently needed. Summary of the invention

[0004] One of the embodiments of this specification provides a privacy-preserving model training method. The method includes: the method is implemented by any training member among the participants, wherein the participants include multiple training members and a server, and the training members and the server have a model to be trained with the same structure, and the method includes performing multiple rounds of iterative updates on the model parameters of the model to be trained, wherein one round of iterative updates includes: performing at least one local training on the model to be trained using the training samples held by itself to obtain model data; some elements in the model data are added with noise, and the some elements with noise added are determined based on the previous round of iterative updates; the transmission data ratio is determined at least based on the current iteration round, and some elements are selected from the model data based on the transmission data ratio to obtain transmission data; the transmission data is transmitted to the server so that the server performs model data aggregation; the model data update result returned by the server is received, and the local model is updated based on the model data update result, and the updated local model is used as the model to be trained for the next round of iterative updates, or the final model is determined based on this.

[0005] One of the embodiments of the present specification provides a privacy-protected model training system, wherein the system is placed at any training member among the participants, wherein the participants include multiple training members and a server, and the training members and the server have a model to be trained with the same structure, and the system includes a model data determination module, a transmission data determination module, a data transmission module and a local model update module, which are used to perform multiple rounds of iterative updates on the model parameters of the model to be trained, in one round of iterative updates: the model data determination module is used to perform at least one local training on the model to be trained using the training samples it holds, to obtain model data; some elements in the model data are added with noise, and the some elements with noise are determined based on the previous round of iterative updates; the transmission data determination module is used to determine the transmission data ratio based on at least the current iteration round, and select some elements from the model data based on the transmission data ratio to obtain transmission data; the data transmission module is used to transmit the transmission data to the server so that the server performs model data aggregation; the local model update module is used to receive the model data update result returned by the server, and perform local model update based on the model data update result, and use the updated local model as the model to be trained for the next round of iterative updates, or determine the final model based on this.

[0006] One of the embodiments of the present specification provides a privacy-preserving model training method, which is implemented by a server among the participants, wherein the participants include multiple training members and a server, and the training members and the server have a model to be trained with the same structure. The method includes performing multiple rounds of iterative updates on the model parameters of the model to be trained, wherein one round of iterative updates includes: receiving transmission data uploaded by each training member; the transmission data includes some elements selected by the training members from their model data, and noise is added to the model data, and the elements with noise added are determined based on the previous round of iterative updates of the training members; obtaining transmission position data of each training member, and the transmission position data reflects the position information of some elements selected by the training members in their model data; obtaining a model data summary result based on each transmission data; obtaining a position data summary result based on each transmission position data; determining a model data aggregation result based on the model data summary result and the position data summary result; and returning at least some elements in the model data aggregation result to each training member, so that each training member performs a local model update.

[0007] One of the embodiments of the present specification provides a privacy-protected model training system, the system is placed at a server among the participants, wherein the participants include multiple training members and a server, the training members and the server have a model to be trained with the same structure, the system includes a data acquisition module, a model data summary result determination module, a location data summary result determination module, a model data aggregation result determination module and a model data aggregation result return module, which are used to perform multiple rounds of iterative updates on the model parameters of the model to be trained, in one round of iterative updates: the data acquisition module is used to receive transmission data uploaded by each training member; the transmission data includes some elements selected by the training member from its model data, and noise is added to the model data, The elements to which noise is added are determined based on the previous round of iterative updates of the training members; and the transmission position data of each training member is obtained, the transmission position data reflecting the position information of the partial elements in its model data; the model data summary result determination module is used to obtain the model data summary result based on each transmission data; the position data summary result determination module is used to obtain the position data summary result based on each transmission position data; the model data aggregation result determination module is used to determine the model data aggregation result based on the model data summary result and the position data summary result; the model data aggregation result return module is used to return at least part of the elements in the model data aggregation result to each training member, so that each training member performs local model update.

[0008] One of the embodiments of the present specification provides a privacy-preserving model training method, which is implemented by any one of a plurality of training members, wherein each training member has a model to be trained with the same structure, and the method includes performing multiple rounds of iterative updates on the model parameters of the model to be trained, wherein one round of iterative updates includes: performing at least one local training on the model to be trained using the training samples held by itself to obtain model data; adding noise to some elements in the model data, and determining the some elements to which noise is added based on a previous round of iterative updates; determining a transmission data ratio based at least on a current iteration round, and selecting some elements from the model data based on the transmission data ratio to obtain transmission data; sending the transmission data to other training members; receiving transmission data sent by other training members; determining a model data aggregation result based at least on the transmission data of each training member; performing a local model update based on the model data aggregation result, and using the updated local model as the model to be trained for the next round of iterative updates, or determining a final model based thereon.

[0009] One of the embodiments of the present specification provides a privacy-protected model training system, the system is placed in any one of a plurality of training members, wherein each training member has a model to be trained with the same structure, the system is used to perform multiple rounds of iterative updates on the model parameters of the model to be trained, the system includes a model data determination module, a transmission data determination module, a data interaction module, an aggregation module and a local model update module, and in one round of iterative updates: the model data determination module is used to perform at least one local training on the model to be trained using the training samples it holds, to obtain model data; some elements in the model data are added with noise, and the some elements with noise are determined based on a previous round of iterative updates; the transmission data determination module is used to determine the transmission data ratio based on at least the current iteration round, and select some elements from the model data based on the transmission data ratio to obtain transmission data; the data interaction module is used to send the transmission data to other training members; and is used to receive transmission data sent by other training members; the aggregation module is used to determine the model data aggregation result based on at least the transmission data of each training member; the local model update module is used to update the local model based on the model data aggregation result, and use the updated local model as the model to be trained for the next round of iterative updates, or determine the final model based on this.

[0010] One of the embodiments of the present specification provides a privacy-preserving model training device, including a processor, wherein the processor is used to execute a privacy-preserving model training method. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:

[0012] Figure 1 is a schematic diagram of an application scenario of a privacy-preserving model training system according to some embodiments of this specification;

[0013] Figure 2 is an exemplary flow chart of a model training method for training members to perform privacy protection according to some embodiments of this specification;

[0014] Figure 3 is an exemplary flow chart of a local training method according to some embodiments of this specification;

[0015] Figure 4 is an exemplary flow chart of a model training method for executing privacy protection by a server according to some embodiments of this specification;

[0016] Figure 5is a module diagram of a privacy-preserving model training system according to some embodiments of this specification;

[0017] Figure 6 is a module diagram of a privacy-protected model training system according to other embodiments of this specification;

[0018] Figure 7 is an exemplary flow chart of another model training method for training members to perform privacy protection according to some embodiments of this specification;

[0019] Figure 8 This is a module diagram of another model training system for training members to perform privacy protection according to some embodiments of this specification. DETAILED DESCRIPTION

[0020] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of this specification. For ordinary technicians in this field, this specification can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.

[0021] It should be understood that the "system", "device", "unit" and / or "module" used herein are a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.

[0022] As shown in this specification and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "comprise" and "include" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0023] Flowcharts are used in this specification to illustrate the operations performed by the system according to the embodiments of this specification. It should be understood that the preceding or following operations are not necessarily performed precisely in order. Instead, the steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes, or one or more operations may be removed from these processes.

[0024] In some embodiments, federated learning can be applied to scenarios where all parties collaborate to train machine learning models for use by multiple parties while ensuring the data security of all parties. Figure 1 The first party 110, the second party 120 and the third party 130 in the network have their own data. They want to use each other's data to build unified models (for example, classification models, linear regression models, logistic regression models, neural network models, etc.), but do not want their respective data (especially private data) to be leaked. For example, Internet savings institution A has a batch of user data, and bank B has another batch of user data. The training sample set determined based on the user data of A and B can train a machine learning model with better performance. Both A and B are willing to participate in model training through each other's user data, but for some reasons A and B do not want their user data information to be leaked, or at least do not want the other party to know their user data information. A typical joint learning can be model training based on federated learning.

[0025] Figure 1 It is a schematic diagram of an application scenario of a privacy-preserving model training system according to some embodiments of this specification.

[0026] It should be noted that Figure 1 For illustrative purposes only, Figure 1 The number of training members may be two. In other embodiments, the number of training members may include a third party training member, a fourth party training member, and even an Nth party training member.

[0027] In some embodiments, the scenario 100 includes a first party 110, a second party 120, a third party 130, and a network 140. Among them, the first party 110 can be understood as a first-party training member, including a processing device 110-1 and a storage device 110-2; the second party 120 can be understood as a second-party training member, including a processing device 120-1 and a storage device 120-2; the third party 130 includes a processing device 130-1 and a storage device 130-2. In some embodiments, the third party 130 can be a training member, including training samples. In other embodiments, the third party 130 can also be a public server, which does not contain training samples and only performs calculations and data storage, such as obtaining corresponding model data aggregation results based on the transmission data and transmission location data provided by each training member.

[0028] The first party 110 and the second party 120 may both be devices with data acquisition, storage and / or transmission functions. In some embodiments, the first party 110 and the second party 120 may include but are not limited to mobile devices, tablet computers, laptop computers, desktop computers, etc. or any combination thereof. In some embodiments, the first party 110 and the second party 120 may receive relevant data from a third party 130. For example, the first party 110 may receive a model data update result issued by a third party.

[0029] The processing devices 110-1 and 120-1 of the first party and the second party may perform data and / or instruction processing. The processing devices 110-1 and 120-1 may calculate data, and may also execute related algorithms and / or instructions. For example, the processing device 110-1 of the first party 110 may receive the model data update result sent from the third party 130, and perform a local model update based on the model data update result.

[0030] The storage devices 110-2 and 120-2 of the first party and the second party can store data and / or instructions executed and used by the corresponding processing devices 110-1 and 120-1, and the processing devices 110-1 and 120-1 can implement the exemplary methods in this specification by executing or using the data and / or instructions. The storage devices 110-2 and 120-2 can be used to store model data generated by multiple rounds of iterations respectively; they can also store training samples held by the first party and the second party respectively. In some embodiments, the storage device 110-2 and the storage device 120-2 can also be a storage device, wherein the first party and the second party can only obtain their own stored data from the storage device. In some embodiments, the storage device may include a large-capacity memory, a removable memory, a volatile read-write memory, a read-only memory (ROM), etc. or any combination thereof.

[0031] The third party 130 may be a device with data acquisition, storage and / or transmission functions, such as a cloud server, a terminal processing device, etc. In some embodiments, the third party 130 may receive relevant data from the first party 110 and the second party 120. For example, the third party 130 may receive uploaded transmission data and transmission location data from the first party 110.

[0032] The third party's storage device 130-2 may store data and / or instructions executed and used by the processing device 130-1, and the processing device 130-1 may implement the exemplary method in this specification by executing or using the data and / or instructions. The storage device 130-2 may be used to store model data aggregation results; it may also store relevant instructions instructing the first party and the second party to perform operations. In some embodiments, the storage device may include a large-capacity memory, a removable memory, a volatile read-write memory, a read-only memory (ROM), etc., or any combination thereof.

[0033] The network 140 may facilitate the exchange of information and / or data. In some embodiments, one or more components of the scene 100 may send information and / or data to other components in the scene 100 that have data transmission requirements via the network 140. For example, the processing device 110-1 of the first party 110 may receive the model data update result sent by the processing device 130-1 of the third party 130 via the network 140. In some embodiments, the network 140 may be any form of wired or wireless network, or any combination thereof.

[0034] In some embodiments, the third party 130 may be omitted, and its functions may be implemented by training members, such as the first party 110 and the second party 120. At this time, each training member performs a similar processing flow to obtain a local final model through a decentralized federated learning method.

[0035] In some embodiments, model training based on federated learning is often used in situations where the model has a large amount of computation and a large number of parameters, which will put a lot of pressure on the communication transmission during the training process. Therefore, in application scenarios where federated learning is used for model training, it is often necessary to use certain methods to reduce the communication pressure during the transmission process.

[0036] In some application scenarios, it is also necessary to strengthen the privacy protection of multi-party data in federated learning. For example, it is necessary to effectively prevent the original data of the data party from being inferred after the data transmitted between training members during the training process is leaked.

[0037] In view of this, some embodiments of this specification propose a privacy-preserving model training method, which can effectively reduce the communication pressure during the training process and enhance the privacy protection of the model data by adding noise to the local model data of the training members and selecting part of the model data to upload to the server for model aggregation. This specification further proposes a method for adding noise to the model data of the training members, which ensures the training accuracy of the model while enhancing privacy protection.

[0038] For the federated learning model training, multiple participants are included, including at least one server and k training members (such as training members 1, 2, 3, ..., k). The training members refer to the data holders who participate in the federated learning model training. The characteristic data of the training sample (set) of the training member i is X i , labelled as Y i , where i = {1, 2, 3, ... k}.

[0039] The specific implementation process of process 200 is exemplarily described below by taking training member i as an example. It can be understood that training member i can be any one of training members 1, 2, 3, ..., k. It should be understood that model data can be represented as a data list or a matrix, and the elements therein can be model parameters or model gradients.

[0040] Figure 2 This is an exemplary flowchart of a model training method for training members to perform privacy protection according to some embodiments of this specification.

[0041] In some embodiments, one or more steps in process 200 may be performed by a training member (e.g. Figure 1 110 or the second party 120 as shown in FIG. Figure 2 As shown, process 200 may include the following steps:

[0042] Step 202 : Perform at least one local training on the to-be-trained model using the training samples held by the model to obtain model data. In some embodiments, step 202 may be performed by the model data determination module 510 .

[0043] In some embodiments, in one round of iterative updates of federated learning, each training member performs one or more local trainings on the model based on the training samples it holds. Each local training can train a batch of training samples, and each batch of training samples can include one or more training samples, such as 100. In some embodiments, the training members can extract features from the training samples they hold to obtain feature data of the training samples, and input the extracted feature data into the training model to obtain the output of the current training model. Specifically, the method of feature extraction varies depending on the type of training sample data and the field to which it belongs, and is not limited in this specification.

[0044] In some embodiments, when the current round is the first round of iterative update (i.e., the first round of iterative update), each training member can initialize and generate model parameters based on the structure of the model to be trained agreed or determined by consensus with other participants. The model parameters of each training member can be different, such as each training member can randomly generate model parameters locally. In some embodiments, the initialized model parameters of each training member can also be the same, such as the server or a training member generates the initialized model parameters of the model to be trained and distributes them to other training members. In some embodiments, the model data obtained by training member i after local training can be represented as W i In some embodiments, the model data W iNoise is added, wherein the positions of some elements to which noise is added can be determined based on the previous round of iterative updates. In some embodiments, the positions of some elements to which noise is added can be determined by the position information of some elements selected in the previous round of iterative updates in the corresponding model data (such as the transmission position data of the previous round of iterative updates). The transmission position data of the previous round of iterative updates can indicate the position of the element with a larger absolute value in the model data in the previous round of iterations. Noise is added to the corresponding elements in the model data of the current round based on the transmission position data of the previous round of iterative updates, and while avoiding adding noise to all model data, the proportion of the added noise relative to the model data value can be further limited, so that the impact of noise on model accuracy is controlled within a smaller range.

[0045] For the form and acquisition method of model data, please refer to the following Figure 3 Related description.

[0046] Step 204 , determining a transmission data ratio based at least on the current iteration round, and selecting some elements from the model data based on the transmission data ratio to obtain transmission data. In some embodiments, step 204 may be performed by the transmission data determination module 520 .

[0047] Transmission data ratio α i It can be determined by the training member i. The transmission data ratio of each training member can be the same or different. As the number of iterations increases during model training, the information learned by the model in the training samples also increases. The transmission data ratio α i Assuming that the current number of iterations is t, the transmission data ratio of training member i in the tth iteration is α i,t , the transmission data ratio can be calculated by the following function: α i,t =f(t), f(t) is a function negatively correlated with t. Through such a setting, the data (such as transmission data) uploaded to the server by training member i in each iteration training will gradually decrease as the number of iterations increases. This can not only ensure the stability of model convergence, but also greatly reduce the transmission volume after the model has been stabilized after multiple iterations. For example, when the current round is the first round of iteration update, the transmission data ratio α i,1 It can be set to a larger ratio, such as 0.9, 0.8 or 0.6. When the current round is not the first round of iterative update, the transmission data ratio α i,t It can be obtained based on the following formula: f(t) = α i,1 ·ρ t (t≥2), ρ represents the attenuation coefficient, which is a constant between 0 and 1.

[0048] In some embodiments, step 204 may further include:

[0049] Determine the amount of data transmitted in the current iteration round based on the ratio of data transmitted in the current iteration round and the number of elements of the model data;

[0050] Based on the number of transmission data, some elements with the highest absolute value ranking are selected from the model data to obtain the transmission data.

[0051] Continuing with the above example, assume that the current number of iterations is 3 and the transmission data ratio is α i,t =0.9×0.85 3 =0.55, if the model data W i is a 3×3 matrix, that is, the model data includes 9 elements in total. It is easy to obtain the matrix W from the model data. i 9×0.55≈5 elements are selected from the result, thereby determining the amount of data to be transmitted in the current iteration round. It should be noted that when the product is not an integer, the corresponding first selected number can be obtained by rounding, such as rounding up, rounding down, etc. This specification does not limit this.

[0052] Furthermore, if the model data is in the following form:

[0053]

[0054] Since the number of transmitted data in the current iteration round is 3 elements, it can be obtained that the elements with the highest absolute values ​​in the model data are 6, -7 and 7, 5, 4. Therefore, based on the above five elements, the other elements can be replaced by 0 elements to obtain the transmitted data W i,s In some embodiments, the transmission data W i,s It can be expressed as:

[0055]

[0056] It can be understood that the absolute value of an element can reflect the amount of information or the size of the difference to a certain extent. Therefore, selecting some elements with higher absolute value ranking can greatly reduce the data transmission pressure caused by elements with less available information while ensuring effective information transmission.

[0057] It should be noted that, in some other embodiments, some elements may be selected through a sampling algorithm (such as random sampling, uniform sampling, Gaussian sampling or Laplace sampling, etc.) or other methods.

[0058] In some embodiments, the transmission data carries the position information of the selected partial elements in the model data, that is, the position information can be obtained by whether the elements in the transmission data are 0. Specifically, the transmission data is characterized as a sparse data list of the same dimension as the model data, and the elements in the transmission data corresponding to the positions of the unselected partial elements are 0.

[0059] In some embodiments, process 200 further includes: determining position information of selected partial elements in the model data to obtain transmission position data; and transmitting to the server also includes the transmission position data.

[0060] Step 206 , determining the position information of the partial elements in the model data to obtain transmission position data. In some embodiments, step 206 may be performed by the position data determination module 530 .

[0061] In some embodiments, the partial elements determined in step 204 are i The location information in the i In some embodiments, the transmission location data M i Characterized as the model data W i A sparse position list of the same dimension, wherein the elements in the sparse position list only include 0 and 1, and the transmission position data M i The elements corresponding to the positions of the partial elements are 1, and the remaining elements are 0. Exemplarily, in some embodiments, if the model data is a 3×3 matrix, the transmission position data is a 3×3 sparse matrix; if the model data is a 5-dimensional vector, the transmission data position list is a 5-dimensional vector whose elements only include 0 and 1.

[0062] Continuing with the above example, if the transmission data W i,s =Equation (2). At this time, only the corresponding positions of 6, -7 and 7, 5, 4 have values, so the transmission position data M i It can be:

[0063]

[0064] It should be noted that, in some embodiments, the selected elements in step 204 may include an element with a value of 0 (such as an element located in the second row and the first column). In this case, the transmitted position data M i The element corresponding to the position in is 1, that is, the transmission position data M i The element in the second row and first column is 1.

[0065] Step 208, transmitting the transmission data to the server so that the server can aggregate the model data. In some embodiments, the transmission location data can also be transmitted to the server. In some embodiments, step 208 can be performed by the data transmission module 540.

[0066] In some embodiments, the server may obtain the transmission data and transmission position data sent by all training members, and aggregate the model data to obtain an updated model. The specific process of the server aggregating can be found in the following Figure 4 Related description.

[0067] Step 210, receiving the model data update result returned by the server, and updating the local model based on the model data update result, using the updated local model as the model to be trained for the next round of iterative update, or determining the final model based on this. In some embodiments, step 210 can be performed by the local model update module 550.

[0068] In some embodiments, the model data update result sent by the server to the training member i includes the aggregated model parameters corresponding to the element position in the transmission data. The model data update result returned by the server is a sparse list in which some elements are 0. In some embodiments, the local model can be updated based on non-zero elements or elements at positions corresponding to the transmission position data. Exemplarily, the training member i can use the non-zero elements in the model data update result to update the model parameters at the corresponding positions in the model data, thereby obtaining the local model after this round of iterative updates. Furthermore, the training member i can use the updated local model as the model to be trained for the next training, or determine the final model based on this.

[0069] In some embodiments, the elements in the model data may also be gradient data (i.e., the gradient list is In the embodiment of this scenario, the model data update result sent by the server is the aggregated gradient data corresponding to the element position in the transmission data. For local model update, the training member i determines the adjustment parameter corresponding to each model parameter based on the elements in the returned model data update result. Exemplarily, the training member i can use the non-zero elements in the model data update result to update the gradient data at the corresponding position in the model data to obtain the updated model data. At this time, the elements in the updated model data are the gradient data corresponding to the model parameters one by one. Further, the training member i can calculate the adjustment parameter Among them, γ i represents the learning rate preset for training member i; Represents the updated model data. Further, the original model parameters of the model to be trained in the current iteration are Subtract the corresponding adjustment parameters to obtain the model parameters of the local model after the current iteration update Right now:

[0070] After completing the update of the current round of model, the current iteration number t can be obtained to determine whether t is less than the set threshold. If so, it is determined to perform the next round of iterative update, and the current round of model is used as the model for the next round of iterative update. Among them, the set threshold can be a pre-set positive integer to characterize the upper limit of the number of iterations (for example, the set threshold can be any value such as 5, 10, 100, etc.). When the iteration number t is not less than the set threshold, it can be determined to terminate the iteration, and each training member is notified to use the currently obtained model as the final model.

[0071] The steps described in process 200 are only some exemplary implementations of this specification, and variations based on this should still be understood to be within the scope of the description of this specification. For example, in some embodiments, step 206 can be omitted, that is, there is no need to upload the transmission position data to the server. At this time, the transmission data carries the position information of the selected partial elements in the model data. For example, the transmission data can be represented as a sparse data list of the same dimension as the model data, and the transmission data contains the selected partial elements, and the positions of these elements in the transmission data are the same as those in the model data, and the elements corresponding to the positions of the unselected partial elements in the transmission data are 0.

[0072] Figure 3 This is an exemplary flow chart of a local training method according to some embodiments of the present specification.

[0073] In some examples, the local training in step 202 may be implemented by executing one or more steps in process 300, which includes:

[0074] Step 302: Select one or more training samples from the training samples held by itself.

[0075] As described in step 202, in some embodiments, each local training may be performed using a batch of training samples, and each batch of training samples may include one or more training samples. For example, a batch of training samples may include n i The characteristic data of a single training sample can be expressed as X j , {j=1, 2, 3, ..., n i}. Understandably, different training members iThe number of training samples included can be the same or different; or the number of training samples of the same training member in different iteration rounds can be the same or different. For ease of description, the following text will explain by performing a local training on a training sample.

[0076] Step 304: Based on the model to be trained and the one or more training samples, obtain one or more corresponding gradient data lists.

[0077] In some embodiments, for any feature data X of a training sample j , training member i can forward propagate the feature data in the training sample based on the model to be trained to obtain the predicted label Then, according to the calculated predicted label And the label y in the training data of training member i j The error between them is used to calculate the loss function L j , and then use the back propagation algorithm to get the gradient data list g j Back propagation refers to the error passing through the output layer of the model to be trained, back to the hidden layer and input layer layer by layer, and determining the correction value (or gradient) of the model parameters of each layer in turn. j Contains multiple gradient elements obtained from training, and the gradient data list g j The gradient elements of correspond to the model parameters one by one, and each gradient element reflects the correction direction (increase or decrease) and correction amount of the model parameters.

[0078] Step 306 : Select some elements from the one or more gradient data lists based on the transmission position data of the previous round of iterative training to obtain one or more sparse gradient lists.

[0079] In some embodiments, when this is the first round of iteration, there is no transmission position data from the previous round of iteration training. At this time, the transmission data ratio α held by the training member can be used to calculate the transmission position data. i,1 Determine the transmission position data M i For example, let Create a list with the same dimension as the model data and all elements are 0, and then add The element of is changed to 1, and the transmission position data M is obtained. i .

[0080] In some embodiments, by j Transmitting location data M i The elements in the position where the element is 1 are retained, and the others are replaced by 0 to obtain the sparse gradient list g j,sIt can be understood that the above method reduces the dimension of the sparse gradient list and reduces the scale of adding noise.

[0081] Step 308, adding noise to the one or more sparse gradient lists, and generating an aggregated sparse gradient list;

[0082] In some embodiments, adding noise to the gradient information and then transmitting the elements in the model data to the server can avoid leakage of private data and protect data security. In some embodiments, step 308 can further include:

[0083] Performing trimming processing on elements of the one or more sparse gradient lists to obtain one or more trimmed sparse gradient lists;

[0084] The one or more pruned sparse gradient lists and the noise list are aggregated to obtain the aggregated sparse gradient list.

[0085] In some embodiments, the trimming and noise generation may be performed according to parameters preset before training or parameters sent by a server. Specifically, the parameters may include a trimming parameter C and a noise amplification factor σ.

[0086] In some embodiments, the elements of the sparse gradient list are clipped based on the clipping parameter C to obtain a clipped sparse gradient list g. j,c It can be expressed as:

[0087]

[0088] In the formula, |g j,s |2 represents the 2-norm of the sparse gradient list; the 2-norm is the sum of the squares of all elements in the sparse gradient list and then the square root, which can measure the value level of the elements in the sparse gradient list as a whole. It can be considered that by clipping through formula (4), the element values ​​in the clipped sparse gradient list can be limited as a whole, so that the 2-norm of the clipped sparse gradient list does not exceed C. In some other alternative embodiments, other methods can also be used for clipping, such as using square sum, weighted sum, absolute value sum, 1-norm, infinite norm, etc.

[0089] In some embodiments, when the absolute value of an element in the sparse gradient list is greater than the clipping parameter C, the value of the element can be replaced by the clipping parameter C while keeping the sign of the element unchanged, that is, the original element is a negative number, and the replaced element value is a negative preset clipping threshold.

[0090] In some embodiments, the noise list can be obtained based on the clipping parameter C and the noise amplification factor σ. For example, based on the variance σ 2 C 2With the mean value 0, a noise matrix that satisfies the Gaussian distribution or Laplace distribution is generated, which can be specifically expressed as: N(0, σ 2 C 2 I), where I is the list of clipped sparse gradients g j,c A list of the same dimension with all elements set to 1. In some embodiments, the sparse gradient list g is pruned j,c With the noise list N(0,σ 2 C 2 I) performing polymerization may include:

[0091] The one or more pruned sparse gradient lists and the noise list are bitwise summed;

[0092] The mean of the summation result relative to the sample number of the one or more training samples is calculated to obtain the aggregated sparse gradient list.

[0093] In some embodiments, the calculation of the aggregated sparse gradient list can be expressed as: It should be noted that the above calculation method of the aggregated sparse gradient list is only an example. In some other embodiments, each of the trimmed sparse gradient lists g may be first calculated. j,c After averaging, sum it bitwise with the noise list.

[0094] Step 310, at least using the aggregated sparse gradient list to update the model parameters of the model to be trained to obtain the model data.

[0095] In some embodiments, based on the aggregated sparse gradient list G i By updating the original model parameters of the current round, a list of model parameters preliminarily updated locally can be obtained, and the list of model parameters is used as the model data W i , specifically, the list of model parameters for local preliminary update can be expressed as: in, A list of model parameters for local preliminary update; is the original model parameter of the current round; γ i represents the learning rate preset by training member i. It can be understood that the preset learning rates γ of different training members i It can be the same or different.

[0096] In some alternative embodiments, step 310 may include:

[0097] Based on one or more gradient data lists, obtaining an aggregated gradient data list;

[0098] Using non-zero elements in the aggregated sparse gradient list to replace the gradient data corresponding to the position in the aggregated gradient data list, to obtain a merged aggregated gradient data list;

[0099] The model parameters of the model to be trained are updated by using the merged aggregated gradient data list to obtain the model data.

[0100] In some embodiments, the one or more gradient data lists g obtained in step 304 are used. j Perform aggregation to obtain the aggregated gradient data list G j In some embodiments, the method for obtaining the aggregate gradient data list can be expressed as:

[0101] In some embodiments, the non-zero elements in the aggregated sparse gradient list are used to replace the gradient data corresponding to the position in the aggregated gradient data list to obtain a merged aggregated gradient data list G. i+j . Merge the aggregated gradient data list G i+j Includes gradient data with noise added and gradient data without noise added.

[0102] In some embodiments, the merged aggregate gradient data list G is used i+j The steps of updating model parameters are based on the aggregated sparse gradient list G i The method of updating the original model parameters of the current round is similar, and reference may be made to the relevant description above, which will not be repeated here. i+j Update the model parameters, that is, the original model parameters of the current round and the aggregated sparse gradient list G i The model parameters corresponding to the 0 element position are also updated, which is conducive to accelerating the convergence of the model during training.

[0103] In the above, process 300 is that the training member i performs a local training on the training model based on the training sample data set held by itself to obtain the model data W i In some embodiments, the training member may also perform multiple rounds of iterations locally.

[0104] It is not difficult to understand that the elements in the model data obtained by process 300 are model parameters. In some alternative embodiments, the elements in the model data may also be gradient data. For example, the merged aggregated gradient data list G i+j Use as model data for subsequent steps.

[0105] Figure 4 This is an exemplary flowchart of a model training method for performing privacy protection by a server according to some embodiments of this specification.

[0106] In some embodiments, one or more steps in process 400 may be performed by a server such as Figure 1 Execute as shown in (third party 130). Figure 4 As shown, process 400 may include the following steps:

[0107] Step 402, receiving transmission data uploaded by each training member; the transmission data includes some elements selected by the training member from its model data, and noise is added to the model data, and the position of the element with noise added in the corresponding model data is determined based on the previous round of iterative update of the training member. In some embodiments, this step can be performed by the data acquisition module 610.

[0108] In some embodiments, the detailed description of the transmission data and transmission position data uploaded by each training member can be referred to the relevant description of steps 202 to 206, which will not be repeated here.

[0109] In some embodiments, the data acquisition module 610 can also acquire the transmission position data of each training member, and the transmission position data reflects the position information of the partial elements in its model data. In some embodiments, the data acquisition module 610 can directly receive the transmission position data uploaded by each training member; or, the data acquisition module 610 can generate the transmission position data of each training member based on the position information of the selected partial elements carried by the transmission data of each training member in the corresponding model data. Exemplarily, the transmission data of the training member can be characterized as a sparse data list of the same dimension as the corresponding model data, and the transmission data contains the selected partial elements, and the positions of these elements in the transmission data are the same as the positions in the corresponding model data, and the elements corresponding to the positions of the unselected partial elements in the transmission data are 0. The data acquisition module 610 can generate the transmission position data of the same dimension as the transmission data, set the elements corresponding to the positions of the non-0 elements in the transmission data in the transmission position data to 1, and set the remaining elements to 0, and so on, to obtain the transmission position data of each training member.

[0110] Step 404 , obtaining a model data summary result based on each transmission data. In some embodiments, this step may be performed by the model data summary result determination module 620 .

[0111] In some embodiments, the model data summary result may be a sparse transmission data aggregation result of each participant model. i Can be used for each transmission data W i,s The result of the bitwise sum.

[0112] Step 406, obtaining a location data summary result based on each transmission location data. In some embodiments, this step may be performed by the location data summary result determination module 630. In some embodiments, the location data summary result may be an aggregation result of the sparse location transmission data of each participant. Specifically, the location data summary result ∑M i It can be used to transmit location data M of each participant. i The result of the bitwise sum.

[0113] Step 408 : Determine a model data aggregation result based on the model data aggregation result and the location data aggregation result. In some embodiments, this step may be performed by the model data aggregation result determination module 640 .

[0114] The model data aggregation result can be a parameter list in the server that participates in the federated training update. In some embodiments, the model data aggregation result W t The element ∑W in the model data summary result can be i,s The corresponding elements ∑M in the position data summary result are i The result of the division, specifically, the model data aggregation result W t It can be expressed as: t =∑W i,s / ∑M i , where division means dividing corresponding elements.

[0115] Step 410, returning at least some elements of the model data aggregation result to each training member, so that each training member can perform local model update. In some embodiments, this step can be performed by the model data aggregation result returning module 650.

[0116] In some embodiments, at least some elements in the model data aggregation result can be transmitted through the transmission position data M corresponding to the training member. i Determine. Exemplarily, at least a partial list of elements W in the model data aggregation result returned to the training member i i,t It can be expressed as: i,t =W t *M i .

[0117] Furthermore, the training members can perform subsequent model updates based on the model parameters of the corresponding positions. The specific method for each training member to perform local model updates can be found in the description of step 210, which will not be repeated here.

[0118] Figure 7 This is an exemplary flowchart of another model training method for training members to perform privacy protection according to some embodiments of this specification.

[0119] In some embodiments, one or more steps in process 700 can be performed by any training member, and no third party as a server is required to participate. Figure 7 As shown, process 700 may include the following steps:

[0120] Step 702, using the training samples held by the system to perform at least one local training on the model to be trained to obtain model data; some elements in the model data are added with noise, and the some elements with noise added are determined based on the previous round of iterative updates. In some embodiments, step 702 can be performed by the model data determination module 810.

[0121] In some embodiments, the method of obtaining the model data is similar to step 202, and reference may be made to the relevant description of step 202, which will not be repeated here.

[0122] Step 704, determining the transmission data ratio based at least on the current iteration round, and selecting some elements from the model data based on the transmission data ratio to obtain transmission data; in some embodiments, step 704 can be performed by the transmission data determination module 820.

[0123] In some embodiments, the transmission data carries position information of selected partial elements in the model data; or, the process 700 also includes: determining the position information of selected partial elements in the model data to obtain transmission position data; and the transmission position data is also sent to the other training members.

[0124] In some embodiments, the methods of obtaining the transmission data and the transmission location data are similar to step 204 and step 206, respectively. Please refer to the relevant descriptions of step 204 and step 206, which will not be repeated here.

[0125] Step 706 , sending the transmission data to other training members; in some embodiments, step 706 may be performed by the data interaction module 830 .

[0126] In some embodiments, since all the participants are training members, the transmission data needs to be sent to other training members so that any training member can aggregate based on the transmission data of each training member. In some embodiments, the transmission data can be sent to some other training members or all other training members.

[0127] Step 708 , receiving transmission data sent by other training members; in some embodiments, step 708 may be performed by the data interaction module 830 .

[0128] In some embodiments, the training member executing process 700 needs to receive and aggregate transmission data from other training members to update the model. In some embodiments, the training member may receive transmission data sent by some other training members or all other training members.

[0129] Step 710 , determining a model data aggregation result based at least on the transmission data of each training member; in some embodiments, step 710 may be performed by the aggregation module 840 .

[0130] In some embodiments, step 710 further includes:

[0131] Acquire transmission position data of other training members, where the transmission position data reflects position information of some elements selected by other training members in their model data;

[0132] Obtaining a model data summary result based on the transmission data of each training member;

[0133] Obtaining a position data summary result based on the transmitted position data of each training member;

[0134] A model data aggregation result is determined based on the model data summary result and the location data summary result.

[0135] In some embodiments, the model data summary result is a result of bitwise summing of each transmission data, and the position data summary result is a result of bitwise summing of each transmission data position data.

[0136] In some embodiments, the model data aggregation result is the result of dividing the elements in the model data summary result by the corresponding elements in the position data summary result. The obtaining of the transmission position data of other training members includes:

[0137] Receive transmission position data sent by other training members; or generate transmission position data of other training members based on position information of selected partial elements in corresponding model data carried by the transmission data of other training members.

[0138] In some embodiments, the method for determining the model aggregation result is similar to steps 404 to 408 , and reference may be made to the related descriptions of steps 404 to 408 .

[0139] Step 712, based on the model data aggregation result, the local model is updated, and the updated local model is used as the model to be trained for the next round of iterative update, or the final model is determined based on this. In some embodiments, step 712 can be performed by the local model update module 850.

[0140] In some embodiments, the updating of the local model based on the model data aggregation result includes: replacing the elements corresponding to the positions in the model aggregation result with the elements selected in the model data to obtain an updated local model.

[0141] In some embodiments, step 712 is similar to step 210, and the relevant description of step 210 may be referred to, which will not be repeated here.

[0142] By executing process 700, each training member can train the model based on a decentralized federated learning method without the participation of the server. In some embodiments, when an individual training member is offline or terminates the training for other reasons, the remaining training members can still continue to execute process 700 to complete the joint training of the model.

[0143] It should be noted that the above descriptions of processes 200 to 400 and 700 are only for illustration and explanation, and do not limit the scope of application of this specification. For those skilled in the art, various modifications and changes can be made to the above steps under the guidance of this specification. However, these modifications and changes are still within the scope of this specification. For example, the order of step 404 and step 406 in process 400 can be reversed, or performed simultaneously.

[0144] Figure 5 This is a module diagram of a privacy-preserving model training system according to some embodiments of this specification.

[0145] like Figure 5 As shown, the privacy-preserving model training system 500 may include a model data determination module 510 , a transmission data determination module 520 , a location data determination module 530 , a data transmission module 540 , and a local model update module 550 .

[0146] The model data determination module 510 is used to perform at least one local training on the to-be-trained model using the training samples it holds to obtain model data.

[0147] The transmission data determination module 520 may be configured to determine a transmission data ratio based at least on a current iteration round, and select some elements from the model data based on the transmission data ratio to obtain transmission data.

[0148] The location data determination module 530 may be used to determine the location information of the partial elements in the model data to obtain the transmission location data. In some embodiments, the privacy-preserving model training system 500 may not include the location data determination module 530.

[0149] The data transmission module 540 may be used to transmit the transmission data and the transmission location data to a server so that the server can perform model data aggregation.

[0150] The local model update module 550 can be used to receive the model data update result returned by the server, and update the local model based on the model data update result, use the updated local model as the model to be trained for the next training, or determine the final model based on this.

[0151] Figure 6 It is a module diagram of the privacy protection model training system shown in other embodiments of this specification.

[0152] like Figure 6 As shown, the privacy-preserving model training system 600 may include a data acquisition module 610 , a model data aggregation result determination module 620 , a location data aggregation result determination module 630 , a model data aggregation result determination module 640 , and a model data aggregation result return module 650 .

[0153] The data acquisition module 610 can be used to receive transmission data uploaded by each training member; the transmission data includes some elements selected by the training members from their model data, and noise is added to the model data; the position of the elements with added noise in the corresponding model data is determined based on the position information of some elements selected by the training members in the previous round of iterative training in the corresponding model data.

[0154] The data acquisition module 610 may also be used to acquire the transmission position data of each training member, where the transmission position data reflects the position information of the partial elements in their model data.

[0155] The model data summary result determination module 620 may be used to obtain a model data summary result based on each transmission data.

[0156] The location data summary result determination module 630 may be configured to obtain a location data summary result based on each transmission location data.

[0157] The model data aggregation result determination module 640 may be configured to determine a model data aggregation result based on the model data aggregation result and the location data aggregation result.

[0158] The model data aggregation result returning module 650 may be used to return at least some elements of the model data aggregation result to each training member, so that each training member can perform a local model update.

[0159] Figure 8 It is a module diagram of a model training system for training members to perform privacy protection according to some embodiments of this specification.

[0160] like Figure 8 As shown, the privacy-preserving model training system 800 may include a model data determination module 810 , a transmission data determination module 820 , a data interaction module 830 , an aggregation module 840 , and a local model update module 850 .

[0161] The model data determination module 810 can be used to perform at least one local training on the model to be trained using the training samples it holds to obtain model data; some elements in the model data are added with noise, and the some elements with noise are determined based on the local training results of the previous round of iterative updates.

[0162] The transmission data determination module 820 may be configured to determine a transmission data ratio based at least on a current iteration round, and select some elements from the model data based on the transmission data ratio to obtain transmission data.

[0163] The data interaction module 830 may be used to send the transmission data to other training members; and to receive the transmission data sent by other training members.

[0164] The aggregation module 840 may be configured to determine a model data aggregation result based at least on the transmission data of each training member.

[0165] The local model updating module 850 can be used to update the local model based on the model data aggregation result, and use the updated local model as the model to be trained for the next round of iterative update, or determine the final model based on this.

[0166] It should be understood that Figure 5 , Figure 6 , Figure 8The system and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or a dedicated design hardware. Those skilled in the art will understand that the above methods and systems can be implemented using computer executable instructions and / or included in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the system and its modules of this specification. Not only can the hardware circuits such as ultra-large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc. be implemented, it can also be implemented with software such as executed by various types of processors, and it can also be implemented by a combination of the above hardware circuits and software (for example, firmware).

[0167] It should be noted that the above description of the privacy protection model training system and its modules is only for the convenience of description and does not limit this specification to the scope of the embodiments. It is understandable that for those skilled in the art, after understanding the principle of the system, it is possible to arbitrarily combine the modules or form a subsystem to connect with other modules without deviating from this principle. For example, in some embodiments, Figure 5 The model data determination module 510 and the transmission data determination module 520 disclosed in the specification can be different modules in a system, or a module can realize the functions of two or more modules mentioned above. For example, each module can share a storage module, or each module can have its own storage module. Such variations are all within the protection scope of this specification.

[0168] The beneficial effects that may be brought about by the embodiments of this specification include but are not limited to: (1) adding noise after sparse transmission data reduces the impact of noise on accuracy and improves model performance compared to adding noise to all data; (2) training members maintain dense models locally and retain parameter information of previous iterations, thereby reducing transmission pressure and increasing model accuracy; (3) different parameters are transmitted according to different training members, which increases the adaptability of each training member to non-independent and identically distributed (Non-IID) data sets and enables training members to obtain personalized models.

[0169] It should be noted that different embodiments may produce different beneficial effects. In different embodiments, the beneficial effects that may be produced may be any one or a combination of the above, or any other beneficial effects that may be obtained.

[0170] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of this specification. Although not explicitly stated here, those skilled in the art may make various modifications, improvements and corrections to this specification. Such modifications, improvements and corrections are suggested in this specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.

[0171] At the same time, this specification uses specific words to describe the embodiments of this specification. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of this specification. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures or characteristics in one or more embodiments of this specification can be appropriately combined.

[0172] In addition, it will be understood by those skilled in the art that various aspects of this specification may be illustrated and described by a number of patentable categories or situations, including any new and useful process, machine, product or combination of substances, or any new and useful improvements thereto. Accordingly, various aspects of this specification may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". In addition, various aspects of this specification may be represented as a computer product located in one or more computer-readable media, which includes computer-readable program code.

[0173] A computer storage medium may include a propagated data signal containing computer program code, for example, in baseband or as part of a carrier wave. The propagated signal may be in a variety of forms, including electromagnetic, optical, etc., or a suitable combination. A computer storage medium may be any computer-readable medium other than a computer-readable storage medium, which can be connected to an instruction execution system, device or apparatus to communicate, propagate or transmit the program for use. The program code on the computer storage medium may be transmitted via any suitable medium, including radio, cable, fiber optic cable, RF, or similar media, or any combination of the above media.

[0174] The computer program code required for the operation of each part of this specification can be written in any one or more programming languages, including object-oriented programming languages ​​such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, Python, etc., conventional procedural programming languages ​​such as C language, VisualBasic, Fortran2003, Perl, COBOL2002, PHP, ABAP, dynamic programming languages ​​such as Python, Ruby and Groovy, or other programming languages, etc. The program code can be run entirely on the user's computer, or run on the user's computer as an independent software package, or run partially on the user's computer and partially on a remote computer, or run entirely on a remote computer or server. In the latter case, the remote computer can be connected to the user's computer through any network form, such as a local area network (LAN) or a wide area network (WAN), or connected to an external computer (e.g., via the Internet), or in a cloud computing environment, or used as a service such as software as a service (SaaS).

[0175] In addition, unless explicitly stated in the claims, the order of the processing elements and sequences described in this specification, the use of alphanumeric characters, or the use of other names are not intended to limit the order of the processes and methods of this specification. Although the above disclosure discusses some invention embodiments that are currently considered useful through various examples, it should be understood that such details are only for illustrative purposes, and the attached claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that are consistent with the essence and scope of the embodiments of this specification. For example, although the system components described above can be implemented by hardware devices, they can also be implemented only by software solutions, such as installing the described system on an existing server or mobile device.

[0176] Similarly, it should be noted that in order to simplify the description disclosed in this specification and thus help understand one or more embodiments of the invention, in the above description of the embodiments of this specification, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this disclosure method does not mean that the features required by the subject matter of this specification are more than the features mentioned in the claims. In fact, the features of the embodiments are less than all the features of the single embodiment disclosed above.

[0177] In some embodiments, numbers describing the number of components and attributes are used. It should be understood that such numbers used in the description of the embodiments are modified by the modifiers "about", "approximately" or "substantially" in some examples. Unless otherwise specified, "about", "approximately" or "substantially" indicate that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may change according to the required features of individual embodiments. In some embodiments, the numerical parameters should take into account the specified significant digits and adopt the general method of retaining digits. Although the numerical domains and parameters used to confirm the breadth of their range in some embodiments of this specification are approximate values, in specific embodiments, the setting of such numerical values ​​is as accurate as possible within the feasible range.

[0178] Each patent, patent application, patent application publication, and other materials, such as articles, books, specifications, publications, documents, etc., cited in this specification are hereby incorporated by reference in their entirety. Except for application history documents that are inconsistent with or conflicting with the contents of this specification, documents that limit the broadest scope of the claims of this specification (currently or later attached to this specification) are also excluded. It should be noted that if the descriptions, definitions, and / or use of terms in the materials attached to this specification are inconsistent or conflicting with the contents described in this specification, the descriptions, definitions, and / or use of terms in this specification shall prevail.

[0179] Finally, it should be understood that the embodiments described in this specification are only used to illustrate the principles of the embodiments of this specification. Other variations may also fall within the scope of this specification. Therefore, as an example and not a limitation, alternative configurations of the embodiments of this specification may be considered consistent with the teachings of this specification. Accordingly, the embodiments of this specification are not limited to the embodiments explicitly introduced and described in this specification.

Claims

1. A privacy-preserving model training method, the method being implemented by any training member of a participating party, wherein: The participants include multiple training members and a server, and the training members and the server have a model to be trained with the same structure. The method includes performing multiple rounds of iterative updates on the model parameters of the model to be trained, wherein one round of iterative updates includes: Select one or more training samples from the training samples held by itself; Based on the model to be trained and the one or more training samples, obtaining one or more corresponding gradient data lists; Selecting some elements from the one or more gradient data lists based on the position information of some elements selected in the previous round of iterative training in the corresponding model data, to obtain one or more sparse gradient lists; adding noise to the one or more sparse gradient lists and generating an aggregated sparse gradient list; At least the model parameters of the model to be trained are updated using the aggregated sparse gradient list to obtain model data; Determine a transmission data ratio based at least on a current iteration round, and select some elements from the model data based on the transmission data ratio to obtain transmission data; Transmitting the transmission data to a server so that the server aggregates the model data; Receive the model data update result returned by the server, and update the local model based on the model data update result, use the updated local model as the model to be trained for the next round of iterative update, or determine the final model based on this.

2. The method according to claim 1, wherein the transmission data carries position information of the selected partial elements in the model data; or, The method further comprises: Determine the position information of the selected part of the elements in the model data to obtain transmission position data; And what is transmitted to the server also includes the transmission location data.

3. The method according to claim 2, wherein the transmission data and the model data have the same dimension, and the elements in the transmission position data corresponding to the positions of the unselected partial elements are 0; Alternatively, the transmission position data and the model data have the same dimension, and the elements in the transmission position data corresponding to the positions of the selected partial elements are 1, and the remaining elements are 0.

4. The method of claim 1, wherein adding noise to the one or more sparse gradient lists and generating an aggregated sparse gradient list comprises: Performing trimming processing on elements of the one or more sparse gradient lists to obtain one or more trimmed sparse gradient lists; The one or more pruned sparse gradient lists and the noise list are aggregated to obtain the aggregated sparse gradient list.

5. The method of claim 4, aggregating the one or more trimmed sparse gradient lists and the noise list to obtain the aggregated sparse gradient list, comprising: The one or more pruned sparse gradient lists and the noise list are bitwise summed; The mean of the summation result relative to the sample number of the one or more training samples is calculated to obtain the aggregated sparse gradient list.

6. The method according to claim 1, wherein at least using the aggregated sparse gradient list to update the model parameters of the to-be-trained model to obtain the model data comprises: Based on one or more gradient data lists, obtaining an aggregated gradient data list; Using non-zero elements in the aggregated sparse gradient list to replace the gradient data corresponding to the position in the aggregated gradient data list, to obtain a merged aggregated gradient data list; The model parameters of the model to be trained are updated by using the merged aggregated gradient data list to obtain the model data.

7. In the method of claim 1, the transmission data ratio is negatively correlated with the iteration round; The selecting some elements from the model data based on the transmission data ratio to obtain the transmission data includes: Determine the amount of data transmitted in the current iteration round based on the ratio of data transmitted in the current iteration round and the number of elements of the model data; Based on the number of transmission data, some elements with the highest absolute value ranking are selected from the model data to obtain the transmission data.

8. The method of claim 1, wherein the model data update result sent by the server includes an aggregate model parameter corresponding to an element position in the transmission data; The receiving the model data update result returned by the server and performing local model update based on the model data update result includes: The corresponding elements in the model data are replaced with the aggregated model parameters in the model data update result to obtain an updated local model.

9. A privacy-preserving model training system, the system being placed at any training member among the participants, wherein: The participants include multiple training members and a server, and the training members and the server have a model to be trained with the same structure. The system includes a model data determination module, a transmission data determination module, a data transmission module, and a local model update module, which are used to perform multiple rounds of iterative updates on the model parameters of the model to be trained. In one round of iterative updates: Select one or more training samples from the training samples held by itself; Based on the model to be trained and the one or more training samples, obtaining one or more corresponding gradient data lists; Selecting some elements from the one or more gradient data lists based on the position information of some elements selected in the previous round of iterative training in the corresponding model data, to obtain one or more sparse gradient lists; adding noise to the one or more sparse gradient lists and generating an aggregated sparse gradient list; At least using the aggregated sparse gradient list to update the model parameters of the model to be trained to obtain model data; the transmission data determination module is used to determine the transmission data ratio based on at least the current iteration round, and select some elements from the model data based on the transmission data ratio to obtain transmission data; The data transmission module is used to transmit the transmission data to the server so that the server can aggregate the model data; The local model update module is used to receive the model data update result returned by the server, and update the local model based on the model data update result, and use the updated local model as the model to be trained for the next round of iterative update, or determine the final model based on this.

10. A privacy-preserving model training method, the method being implemented by a server in a participating party, wherein: The participants include multiple training members and a server, and the training members and the server have a model to be trained with the same structure. The method includes performing multiple rounds of iterative updates on the model parameters of the model to be trained, wherein one round of iterative updates includes: Receive transmission data uploaded by each training member; the transmission data includes some elements selected by the training member from its model data, and noise is added to the model data, and the elements with noise are determined based on the previous round of iterative updates of the training member; Acquire transmission position data of each training member, wherein the transmission position data reflects position information of a part of the elements selected by the training member in its model data; The model data summary result is obtained based on the bitwise summation result of each transmission data; A position data summary result is obtained based on the bitwise summation result of each transmission position data; Determine a model data aggregation result based on the result of dividing the elements in the model data summary result by the corresponding elements in the position data summary result; At least part of the elements in the model data aggregation result are returned to each training member, so that each training member can perform local model update.

11. The method according to claim 10, wherein obtaining the transmission position data of each training member comprises: Receive transmission position data uploaded by each training member; Alternatively, the transmission position data of each training member is generated based on the position information of the selected partial elements carried by the transmission data of each training member in the corresponding model data.

12. The method as claimed in claim 11, wherein the transmission position data and the corresponding model data have the same dimension, and the elements in the transmission data position data corresponding to the positions of the selected partial elements are 1, and the remaining elements are 0.

13. The method according to claim 10, wherein the returning at least part of the elements in the model data aggregation result to each training member comprises, for any training member: Based on the transmission position data of the training member, an element at a corresponding position is selected from the model data aggregation result and returned to the training member.

14. A privacy-preserving model training system, the system being placed at a server in a participating party, wherein:The participants include multiple training members and a server, and the training members and the server have a model to be trained with the same structure. The system includes a data acquisition module, a model data summary result determination module, a location data summary result determination module, a model data aggregation result determination module, and a model data aggregation result return module, which are used to perform multiple rounds of iterative updates on the model parameters of the model to be trained, and in one round of iterative updates: The data acquisition module is used to receive the transmission data uploaded by each training member; the transmission data includes some elements selected by the training member from its model data, and noise is added to the model data, and the elements with noise are determined based on the previous round of iterative updates of the training member; and, to obtain the transmission position data of each training member, the transmission position data reflects the position information of the some elements in its model data; The model data summary result determination module is used to obtain the model data summary result based on the bitwise summation result of each transmission data; The position data summary result determination module is used to obtain the position data summary result based on the result of bitwise summation of each transmission position data; The model data aggregation result determination module is used to determine the model data aggregation result based on the result of dividing the elements in the model data aggregation result by the corresponding elements in the position data aggregation result; The model data aggregation result returning module is used to return at least part of the elements in the model data aggregation result to each training member, so that each training member can update the local model.

15. A privacy-preserving model training method, the method being implemented by any one of a plurality of training members, wherein: Each training member has a to-be-trained model with the same structure, and the method includes performing multiple rounds of iterative updates on the model parameters of the to-be-trained model, wherein one round of iterative updates includes: Select one or more training samples from the training samples held by itself; Based on the model to be trained and the one or more training samples, obtaining one or more corresponding gradient data lists; Selecting some elements from the one or more gradient data lists based on the position information of some elements selected in the previous round of iterative training in the corresponding model data, to obtain one or more sparse gradient lists; adding noise to the one or more sparse gradient lists and generating an aggregated sparse gradient list; At least the model parameters of the model to be trained are updated using the aggregated sparse gradient list to obtain model data; Determine a transmission data ratio based at least on a current iteration round, and select some elements from the model data based on the transmission data ratio to obtain transmission data; sending the transmission data to other training members; Receive transmission data sent by other training members; Determining a model data aggregation result based at least on the transmission data of each training member; The local model is updated based on the model data aggregation result, and the updated local model is used as the model to be trained for the next round of iterative update, or the final model is determined based on this.

16. The method according to claim 15, wherein the transmission data carries position information of the selected partial elements in the model data; or, The method further comprises: Determine the position information of the selected part of the elements in the model data to obtain transmission position data; And what is sent to the other training members also includes the transmission position data.

17. The method according to claim 15, wherein determining the model data aggregation result based at least on the transmission data of each training member comprises: Acquire transmission position data of other training members, where the transmission position data reflects position information of some elements selected by other training members in their model data; Obtaining a model data summary result based on the transmission data of each training member; Obtaining a position data summary result based on the transmitted position data of each training member; A model data aggregation result is determined based on the model data summary result and the location data summary result.

18. The method according to claim 17, The obtaining of the transmission position data of other training members includes: Receive transmission position data sent by other training members; or, Based on the position information of the selected partial elements carried by the transmission data of other training members in the corresponding model data, the transmission position data of other training members are generated.

19. The method according to claim 15, wherein the updating of the local model based on the model data aggregation result comprises: The selected elements in the model data replace the elements corresponding to the positions in the model aggregation results to obtain an updated local model.

20. A privacy-preserving model training system, the system being placed at any one of a plurality of training members, wherein: Each training member has a model to be trained with the same structure. The system is used to perform multiple rounds of iterative updates on the model parameters of the model to be trained. The system includes a model data determination module, a transmission data determination module, a data interaction module, an aggregation module and a local model update module, and in one round of iterative updates: The model data determination module is used to select one or more training samples from the training samples held by itself; Based on the model to be trained and the one or more training samples, obtaining one or more corresponding gradient data lists; Selecting some elements from the one or more gradient data lists based on the position information of some elements selected in the previous round of iterative training in the corresponding model data, to obtain one or more sparse gradient lists; adding noise to the one or more sparse gradient lists and generating an aggregated sparse gradient list; The transmission data determination module is used to determine the transmission data ratio based on at least the current iteration round, and select some elements from the model data based on the transmission data ratio to obtain the transmission data; The data interaction module is used to send the transmission data to other training members; and for receiving transmission data sent by other training members; The aggregation module is used to determine the model data aggregation result based on at least the transmission data of each training member; The local model updating module is used to update the local model based on the model data aggregation result, and use the updated local model as the model to be trained for the next round of iterative update, or determine the final model based on this.

21. A privacy-preserving model training device, comprising a storage medium and a processor, wherein the storage medium is used to store computer instructions, and the processor is used to execute the privacy-preserving model training method described in any one of claims 1-8, 10-13 and 15-19.