WO2020125251A1 - Federated learning-based model parameter training method, device, apparatus, and medium - Google Patents
Federated learning-based model parameter training method, device, apparatus, and medium Download PDFInfo
- Publication number
- WO2020125251A1 WO2020125251A1 PCT/CN2019/116082 CN2019116082W WO2020125251A1 WO 2020125251 A1 WO2020125251 A1 WO 2020125251A1 CN 2019116082 W CN2019116082 W CN 2019116082W WO 2020125251 A1 WO2020125251 A1 WO 2020125251A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- model
- encryption
- terminal
- trained
- model parameter
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
Definitions
- the present application relates to the field of data processing technology, and in particular to a model parameter training method, device, equipment, and medium based on federal learning.
- Machine learning is one of the core research areas of artificial intelligence, and how to continue machine learning under the premise of protecting data privacy and meeting legal compliance requirements is a trend that is now concerned in the field of machine learning. Under this background, people The study proposed the concept of "federal learning”.
- Federated learning uses technical algorithms to encrypt the built models. Both sides of the federation can conduct model training to obtain model parameters without giving their own data. Federated learning protects user data privacy through the exchange of parameters under the encryption mechanism. The data and the model itself It will not be transmitted, nor can it guess the other party’s data, so there is no possibility of leakage at the data level, nor does it violate stricter data protection laws such as GDPR (General Data Protection Regulation, "General Data Protection Regulation", etc., can maintain data integrity to a high degree while ensuring data privacy.
- GDPR General Data Protection Regulation, "General Data Protection Regulation", etc.
- the existing method based on federation modeling can only be based on the exchange of the parameters of the two parties for joint modeling when the A and B samples are marked.
- the main purpose of the present application is to provide a model parameter training method, device, equipment and medium based on federation learning, aiming to realize the union based on the feature space of the samples of the two federations being the same, if one side has a label and the other side has a missing label
- the sample data of the labeled party obtains the parameters in the model of the labeled missing party, which improves the accuracy of the model of the labeled missing party.
- the model parameter training method based on federated learning includes the following steps:
- the second terminal uses the first encryption model parameter as an initial parameter of the model to be trained, and trains the second terminal according to a second sample of the second terminal The model to be trained, and the first encryption loss value is calculated; the first sample and the second sample have the same feature dimension;
- the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained.
- the step of using the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained includes:
- the step of using the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained includes:
- a training stop instruction is sent to the second terminal, so that after receiving the training stop instruction, the second terminal uses the encryption corresponding to the loss value
- the gradient value updates the first encryption model parameter to obtain the second encryption model parameter, and uses the second encryption model parameter as the final parameter of the model to be trained.
- the method further includes:
- Decrypt the loss value and detect whether the model to be trained is in a converged state according to the decrypted loss value.
- the method further includes:
- a continuous training instruction is sent to the second terminal, so that after receiving the continuous training instruction, the second terminal according to the loss value
- the encryption gradient value updates the first encryption model parameter to obtain a third encryption model parameter, and the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate a second encryption loss value
- Decrypt the loss value and detect whether the model to be trained is in a converged state according to the decrypted loss value.
- the step of using the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained further includes:
- decrypt the second encryption model parameter In response to the decryption request, decrypt the second encryption model parameter, and send the decrypted second encryption model parameter to the second terminal.
- the step of using the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained further includes:
- the present application also proposes a model parameter training device based on federal learning.
- the device is provided at the first terminal, and the device includes:
- a first sending module configured to send a first encryption model parameter to a second terminal, where the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;
- a first receiving module configured to receive a first encryption loss value sent by the second terminal, wherein the second terminal uses the first encryption model parameter as an initial parameter of the model to be trained, according to the second terminal Of the second sample to train the model to be trained and calculate the first encryption loss value; the first sample and the second sample have the same feature dimension;
- a decryption detection module used to decrypt the loss value and detect whether the model to be trained is in a converged state according to the decrypted loss value
- the determining module is configured to use the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained after the decryption detection module detects that the model to be trained is in a convergence state.
- the present application also proposes a model parameter training device based on federation learning, the device includes: a memory, a processor, and a federation-based training device stored on the memory and capable of running on the processor
- the model parameter training readable instruction for learning, the model parameter training readable instruction based on federation learning implements the steps of the model parameter training method based on federation learning as described above when executed by the processor.
- the present application also proposes a storage medium, which is applied to a computer, and the storage medium stores model parameter training readable instructions based on federal learning, and the model parameter training readable instructions based on federal learning When executed by the processor, the steps of the model parameter training method based on federation learning described above are realized.
- the first encryption model parameter is sent to the second terminal, and the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;
- An encryption loss value wherein the second terminal uses the first encryption model parameter as the initial parameter of the model to be trained, trains the model to be trained according to the second sample of the second terminal, and calculates the A first encryption loss value; the first sample and the second sample have the same feature dimension; decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value; If it is detected that the model to be trained is in a convergent state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained; thus, in the case where the feature spaces of the samples of both federations are the same, The sample of the first terminal has a label, and when the sample label of the second terminal is missing, the model parameters of the second terminal are obtained by combining the sample data of the first terminal, and the accuracy of the model of the second
- FIG. 1 is a schematic structural diagram of a hardware operating environment involved in an embodiment of the present application
- FIG. 2 is a schematic flowchart of a first embodiment of a model parameter training method based on federal learning in this application;
- FIG. 3 is a schematic diagram of the detailed steps of step S400 in the first embodiment of the model parameter training method based on federal learning of this application;
- FIG. 4 is a schematic flowchart of a second embodiment of a model parameter training method based on federal learning in this application;
- FIG. 5 is a schematic flowchart of a third embodiment of a model parameter training method based on federal learning in this application;
- FIG. 6 is a schematic flowchart of a fourth embodiment of a model parameter training method based on federal learning in this application.
- FIG. 1 is a schematic structural diagram of a hardware operating environment involved in a solution of an embodiment of the present application.
- FIG. 1 is a schematic diagram of the hardware operating environment of the model parameter training device.
- the model parameter training device in the embodiment of the present application may be a terminal device such as a PC or a portable computer.
- the model parameter training device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
- the communication bus 1002 is used to implement connection communication between these components.
- the user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface and a wireless interface.
- the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
- the memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as disk storage.
- the memory 1005 may optionally be a storage device independent of the foregoing processor 1001.
- model parameter training device does not constitute a limitation on the model parameter training device, and may include more or fewer components than the illustration, or a combination of certain components, or different Parts layout.
- the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and model parameter training readable instructions based on federation learning.
- the operating system is a readable instruction that manages and controls the hardware and software resources of the model parameter training device, and supports the operation of the model parameter training readable instruction based on federal learning and other software or readable instructions.
- the user interface 1003 is mainly used for data communication with each terminal;
- the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server;
- the processor 1001 can be used for calling
- the model parameter training based on federated learning stored in the memory 1005 trains readable instructions, and performs the following operations:
- the second terminal uses the first encryption model parameter as an initial parameter of the model to be trained, and trains the second terminal according to a second sample of the second terminal The model to be trained, and the first encryption loss value is calculated; the first sample and the second sample have the same feature dimension;
- the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained.
- FIG. 2 is a schematic flowchart of a first embodiment of a model parameter training method based on federal learning in this application.
- the embodiment of the present application provides an embodiment of a model parameter training method based on federated learning. It should be noted that although the logic sequence is shown in the flowchart, in some cases, it may be executed in an order different from here The steps shown or described.
- the model parameter training method based on federated learning in the embodiment of the present application is applied to the first terminal.
- the first terminal and the second terminal in the embodiment of the present application may be terminal devices such as PCs and portable computers, respectively, and are not specifically limited herein.
- Step S100 Send a first encryption model parameter to a second terminal, where the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;
- Machine learning is one of the core research areas of artificial intelligence, and how to continue machine learning under the premise of protecting data privacy and meeting legal compliance requirements is a trend that is now concerned in the field of machine learning. Under this background, people The study proposed the concept of "federal learning”.
- Federated learning uses technical algorithms to encrypt the built models. Both sides of the federation can conduct model training to obtain model parameters without giving their own data. Federated learning protects user data privacy through the exchange of parameters under the encryption mechanism. The data and the model itself It will not be transmitted, nor can it guess the other party’s data, so there is no possibility of leakage at the data level, nor does it violate stricter data protection laws such as GDPR (General Data Protection Regulation, "General Data Protection Regulation", etc., can maintain data integrity to a high degree while ensuring data privacy.
- GDPR General Data Protection Regulation, "General Data Protection Regulation", etc.
- the existing method based on federation modeling can only be based on the exchange of the parameters of the two parties for joint modeling when the A and B samples are marked.
- various embodiments of the model parameter training method based on federal learning in this application are proposed.
- Horizontal federation learning refers to the overlapping of user features in two data sets (ie, the first sample and the second sample described in the embodiments of the present application), while the user overlap is less In the case of, divide the data set according to the horizontal direction (that is, the user dimension), and take out the part of the data with the same user characteristics but not the same users for training.
- This method is called horizontal federation learning. For example, there are two banks in different regions, and their user groups are from their respective regions, and their intersection is very small. However, their businesses are very similar, so the recorded user characteristics are the same.
- first the first terminal is trained according to the first sample of the first terminal to obtain the initial model parameters.
- the first terminal encrypts the initial model parameters using the encryption algorithm in the federated learning to obtain the first encryption model parameters, and the first An encryption model parameter is sent to the second terminal.
- Step S200 Receive a first encryption loss value sent by the second terminal, where the second terminal uses the first encryption model parameter as the initial parameter of the model to be trained, based on the second sample of the second terminal Training the model to be trained, and calculating the first encryption loss value; the first sample and the second sample have the same feature dimension;
- the second terminal uses the first encryption model parameters as the initial parameters of the model to be trained, and according to the second terminal only The second sample data with a small amount of labels is used for model training, and the encryption loss value is calculated. It can be understood that the second sample label is partially missing compared to the first sample label, that is, the second sample label is higher than the first The label of a copy should be less.
- the second terminal uses the first encryption model parameter as the initial parameter of its model to be trained, trains the model to be trained according to the second sample of the second terminal that is missing, and calculates the first encryption loss value Then, the first encrypted loss value is sent to the first terminal, and the first terminal receives the first encrypted loss value sent by the second terminal.
- Step S300 decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value
- the first terminal After receiving the encrypted loss value sent by the second terminal, the first terminal decrypts the encrypted loss value sent by the second terminal based on the corresponding decryption algorithm, and detects the to-be-trained according to the decrypted loss value Whether the model is converging.
- whether the model to be trained is in a converged state is detected according to the decrypted loss value, which may specifically be that the first terminal decrypts the encryption loss values sent by the second terminal twice in succession, Calculate the difference between these two loss values, and determine whether the difference is less than or equal to a preset threshold. When it is determined that the difference is less than or equal to the preset threshold, determine that the model to be trained is in a converged state When it is determined that the difference is greater than the preset threshold, it is determined that the model to be trained is not in a converged state.
- the decrypted loss value which may specifically be that the first terminal decrypts the encryption loss values sent by the second terminal twice in succession
- Step S400 if it is detected that the model to be trained is in a converged state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained.
- the second terminal calculates the corresponding encryption gradient value and encryption loss value. Due to the encryption of the first encryption model parameters, the second terminal cannot judge the pending value based on the encryption loss value. Whether the training model has converged, the second terminal sends the encrypted loss value to the first terminal, and the first terminal decrypts the loss value to determine whether the model to be trained has converged.
- the first terminal detects that the model to be trained is in a convergence state according to the decrypted loss value, and uses the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained. Training model training is complete.
- FIG. 3 is a schematic diagram of the refinement steps of step S400 in this embodiment; as an implementation manner, in this embodiment, step S400 may include the following refinement steps:
- Step S401 If it is detected that the model to be trained is in a convergence state, obtain an encrypted gradient value corresponding to the loss value sent by the second terminal, and decrypt the gradient value;
- Step S402 Update the first encryption model parameter according to the decrypted gradient value to obtain a second encryption model parameter
- Step S403 Send the second encryption model parameters to the second terminal as the final parameters of the model to be trained.
- the first terminal detects that the model to be trained is in a converged state, and the first terminal obtains the encrypted gradient value corresponding to the loss value sent by the second terminal and decrypts the gradient value.
- the second terminal calculates the corresponding encryption gradient value and encryption loss value, and sends the calculated encryption gradient value and encryption loss value to the first terminal simultaneously .
- the first terminal first decrypts the encrypted loss value, then detects that the model to be trained is in a converged state according to the decrypted current loss value, and then the first terminal decrypts the encrypted gradient value corresponding to the current loss value, and then decrypts
- the gradient value of is used to update the first encryption model parameter to obtain the second encryption model parameter.
- the first terminal sends the second encryption model parameters to the second terminal and determines the second encryption model parameters as the final parameters of the model to be trained of the second terminal, and the training of the model to be trained is completed. Therefore, when the feature spaces of the samples of the two federations are the same, the sample of the first terminal is labeled, and the sample of the second terminal is missing, the sample data of the first terminal is combined to obtain the model parameters of the second terminal. Improve the accuracy of the second terminal model.
- step S400 if it is detected that the model to be trained is in a converged state, the second encryption model parameter determined based on the loss value is used as the target
- the steps of training the final parameters of the model include the following refinement steps:
- a training stop instruction is sent to the second terminal, so that after receiving the training stop instruction, the second terminal uses the encryption corresponding to the loss value
- the gradient value updates the first encryption model parameter to obtain the second encryption model parameter, and uses the second encryption model parameter as the final parameter of the model to be trained.
- the second terminal calculates the encryption gradient value and the encryption loss value during the process of training the model to be trained according to the first encryption model parameter, The second terminal only sends the calculated encrypted loss value to the first terminal, the first terminal decrypts the encrypted loss value, and detects that the model to be trained is in a convergence state according to the decrypted current loss value, and the first terminal sends Stop training instruction to the second terminal, after receiving the stop training instruction, the second terminal updates the first encryption model parameter according to the calculated encryption gradient value corresponding to the loss value to obtain the second Encrypt the model parameters, and use the second encrypted model parameters as the final parameters of the model to be trained, and the training of the model to be trained is completed, thereby realizing the case that the feature space of the samples of the two federations is the same, the sample of the first terminal If there is a label, and the sample label of the second terminal is missing, the sample data of the first terminal is combined with the model parameters of the second terminal
- the first encryption model parameter is sent to the second terminal, and the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;
- the first encryption loss value wherein the second terminal uses the first encryption model parameter as the initial parameter of the model to be trained, trains the model to be trained according to the second sample of the second terminal, and calculates The first encryption loss value; the first sample and the second sample have the same feature dimension; decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value ; If it is detected that the model to be trained is in a convergence state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained.
- FIG. 4 is a schematic flowchart of a second embodiment of a model parameter training method based on federal learning according to the present application. Based on the first embodiment of the model parameter training method based on federal learning described above, in this embodiment, step S300 The loss value, and after the step of detecting whether the model to be trained is in a converged state according to the decrypted loss value, the method further includes:
- Step S501 If it is detected that the model to be trained is in an unconverged state, obtain an encrypted gradient value corresponding to the loss value sent by the second terminal, and decrypt the gradient value;
- the first terminal detects that the model to be trained is in an unconverged state, and the first terminal obtains the encrypted gradient value corresponding to the loss value sent by the second terminal and decrypts the gradient value.
- the second During the process of training the model to be trained according to the parameters of the first encryption model, the terminal calculates the encryption gradient value and the encryption loss value, and simultaneously sends the calculated encryption gradient value and the encryption loss value to the first terminal, and the first terminal first decrypts the encryption The loss value, and then it is detected that the model to be trained is in an unconverged state according to the decrypted current loss value.
- Step S502 Update the first encryption model parameter according to the decrypted gradient value to obtain a third encryption model parameter
- the first terminal After detecting that the model to be trained is in an unconverged state, the first terminal decrypts the encryption gradient value corresponding to the current loss value, and updates the first encryption model parameters according to the decrypted gradient value to obtain the third encryption model parameter.
- Step S503 Send the third encryption model parameter to the second terminal, so that the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate a second encryption loss value;
- the first terminal sends the third encryption model parameter to the second terminal, and the second terminal continues to train the model to be trained according to the third encryption model parameter, and calculates the second encryption loss value and the encryption gradient corresponding to the second encryption loss value Value, the first terminal sends the second encryption loss value to the first terminal for the first terminal to detect whether the model to be trained has converged.
- Step S504 Obtain the second encrypted loss value sent by the second terminal, and proceed to step S300, decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value; After obtaining the second encrypted loss value, the first terminal enters the first terminal to decrypt the loss value, and detects whether the model to be trained is in a converged state according to the decrypted loss value. The first terminal detects When the model to be trained is in a convergent state, step S400 is entered to determine that the second encrypted model parameter corresponding to the loss value in the current model convergence state is the final parameter of the model to be trained.
- step S501 is entered again, and the second terminal continues to iteratively train the model to be trained according to the updated encryption model parameters and sends the encryption loss value calculated in the training process to the first terminal until After the first terminal detects that the model to be trained is in a convergence state according to the encryption loss value sent by it, the second terminal obtains the final encryption parameters of the model to be trained determined by the first terminal, and the model training of the second terminal is completed.
- step S300 the loss value is decrypted, and according to the decrypted
- the step of detecting whether the loss value is in a convergence state after the loss value further includes:
- a continuous training instruction is sent to the second terminal, so that after receiving the continuous training instruction, the second terminal according to the loss value
- the encryption gradient value updates the first encryption model parameter to obtain a third encryption model parameter, and the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate a second encryption loss value
- step S300 decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value.
- the first terminal detects that the model to be trained is in an unconverged state, and then sends a continuous training instruction to all The second terminal, and the process of updating the encryption model parameters based on the encryption gradient value is performed at the second terminal.
- the second terminal After the second terminal receives the continuation training instruction sent by the first terminal, the second terminal according to the loss value Update the first encryption model parameter with the corresponding encryption gradient value to obtain the third encryption model parameter, and then the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate the second encryption loss value, and Send the second encrypted loss value to the first terminal, and after obtaining the second encrypted loss value sent by the second terminal, the first terminal proceeds to step S300, that is, to enter the first terminal to decrypt the loss value, and according to the decrypted
- the step of detecting whether the model to be trained is in a convergent state by the loss value, and the first terminal detects that the model to be trained is in a convergent state then proceeds to step S400 to determine a second encryption model corresponding to the loss value in the current convergent state
- the parameter is the final parameter of the model to be trained, and the model training is completed; if the first terminal detects that the model to be trained is in an unconverged state, it
- the sample data of the first terminal is combined to obtain the second terminal Model parameters to improve the accuracy of the second terminal model.
- FIG. 5 is a schematic flowchart of a third embodiment of a model parameter training method based on federal learning according to the present application.
- step S400 if detected When the model to be trained is in a convergence state, the step of using the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained further includes:
- Step S601 Receive the second encryption model parameter and a decryption request for the second encryption model parameter sent by the second terminal;
- Step S602 in response to the decryption request, decrypt the second encryption model parameter, and send the decrypted second encryption model parameter to the second terminal.
- the sample data of the first terminal is combined to enable the second terminal to obtain the encrypted model parameters of the training.
- the first terminal receives the second encryption model parameter and the decryption request for the second encryption model parameter sent by the second terminal, and in response to the decryption request, decrypts the second encryption model parameter , And send the decrypted second encrypted model parameters to the second terminal, so that the second terminal can predict the results according to the decrypted model parameters, and realize the application of the model trained by the first terminal to the features And mark the missing second terminal, which greatly expands the scope of application of federal learning and effectively improves the predictive ability of the second terminal model.
- FIG. 6 is a schematic flowchart of a fourth embodiment of a model parameter training method based on federal learning according to the present application.
- step S400 if detected When the model to be trained is in a convergence state, the step of using the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained further includes:
- Step S603 Receive an encryption prediction result obtained by the second terminal based on the second encryption model parameter and a decryption request for the encryption prediction result;
- Step S604 in response to the decryption request, decrypt the prediction result, and send the decrypted prediction result to the second terminal.
- the first terminal receives an encryption prediction result obtained by the second terminal based on the second encryption model parameter and a decryption request for the encryption prediction result, and in response to the decryption request, decrypts the prediction
- the decrypted prediction result is sent to the second terminal, so that the second terminal can predict the result according to the finally determined encryption model parameters to obtain the encryption prediction result, and the first terminal will encrypt the prediction result
- the model trained by the first terminal is applied to the second terminal with missing features and annotations, thereby greatly expanding the scope of application of federal learning and effectively improving the predictive ability of the second terminal model .
- the embodiments of the present application also provide a model parameter training device based on federal learning.
- the device is provided at the first terminal, and the device includes:
- a first sending module configured to send a first encryption model parameter to a second terminal, where the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;
- a first receiving module configured to receive a first encryption loss value sent by the second terminal, wherein the second terminal uses the first encryption model parameter as an initial parameter of the model to be trained, according to the second terminal Of the second sample to train the model to be trained and calculate the first encryption loss value; the first sample and the second sample have the same feature dimension;
- a decryption detection module used to decrypt the loss value and detect whether the model to be trained is in a converged state according to the decrypted loss value
- the determining module is configured to use the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained after the decryption detection module detects that the model to be trained is in a convergence state.
- the determination module includes:
- An acquisition and decryption unit for acquiring an encryption gradient value corresponding to the loss value sent by the second terminal and decrypting the gradient value after the decryption detection module detects that the model to be trained is in a convergence state
- An updating unit configured to update the first encryption model parameter according to the decrypted gradient value to obtain a second encryption model parameter
- the first determining unit is configured to send the second encryption model parameter to the second terminal as the final parameter of the model to be trained.
- the determination module includes:
- a second determining unit configured to send a training stop instruction to the second terminal after the decryption detection module detects that the model to be trained is in a convergence state, so that the second terminal receives the training stop After the instruction, update the first encryption model parameter according to the encryption gradient value corresponding to the loss value to obtain the second encryption model parameter, and use the second encryption model parameter as the final parameter of the model to be trained .
- the device further includes:
- a decryption module for acquiring an encrypted gradient value corresponding to the loss value sent by the second terminal and decrypting the gradient value after the decryption detection module detects that the model to be trained is in an unconverged state
- An update module configured to update the first encryption model parameter according to the decrypted gradient value to obtain a third encryption model parameter
- a second sending module configured to send the third encryption model parameter to the second terminal, so that the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate a second encryption loss value
- the first obtaining module is configured to obtain the second encrypted loss value sent by the second terminal, and send the second encrypted loss value to the decryption detection module.
- the device further includes:
- a third sending module configured to send a continuation training instruction to the second terminal after the decryption detection module detects that the model to be trained is in an unconverged state, so that the second terminal receives the continuation After the training instruction, the first encryption model parameter is updated according to the encryption gradient value corresponding to the loss value to obtain the third encryption model parameter, and the second terminal continues to train the third encryption model parameter according to the third encryption model parameter To train the model and calculate the second encryption loss value;
- the second obtaining module is configured to obtain the second encrypted loss value sent by the second terminal, and send the second encrypted loss value to the decryption detection module.
- the device further includes:
- a second receiving module configured to receive the second encryption model parameter and the decryption request for the second encryption model parameter sent by the second terminal;
- the first decryption module is configured to decrypt the second encryption model parameter in response to the decryption request, and send the decrypted second encryption model parameter to the second terminal.
- the device further includes:
- a third receiving module configured to receive an encrypted prediction result obtained by the second terminal based on the second encryption model parameters and a decryption request for the encrypted prediction result
- the second decryption module is configured to decrypt the prediction result in response to the decryption request, and send the decrypted prediction result to the second terminal.
- the steps of the model parameter training device based on federation learning proposed in this embodiment implement the steps of the model parameter training method based on federation learning as described above, and will not be repeated here.
- an embodiment of the present application also provides a model parameter training device based on federation learning, the device includes: a memory, a processor, and a model based on federation learning stored on the memory and operable on the processor Parameter training readable instruction, the model parameter training readable instruction based on federation learning implements the steps of the model parameter training method based on federation learning described above when executed by the processor.
- model parameter training readable instruction based on federation learning running on the processor For the method implemented when the model parameter training readable instruction based on federation learning running on the processor is executed, reference may be made to various embodiments of the model parameter training method based on federation learning in the present application, and details are not described here.
- an embodiment of the present application further proposes a computer-readable storage medium on which is stored a model parameter training readable instruction based on federal learning, and the model parameter training readable instruction based on federal learning is executed by a processor To implement the steps of the model parameter training method based on federated learning as described above.
- model parameter training readable instruction based on federation learning running on the processor For the method implemented when the model parameter training readable instruction based on federation learning running on the processor is executed, reference may be made to various embodiments of the model parameter training method based on federation learning in the present application, and details are not described here.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Storage Device Security (AREA)
Abstract
A federated learning-based model parameter training method, a device, an apparatus, and a medium. The method comprises: sending a first encryption model parameter to a second terminal (S100); receiving a first encryption loss value sent by the second terminal (S200), wherein the second terminal uses the first encryption model parameter as an initial parameter of a model to be trained, trains the model according to a second sample of the second terminal, and calculates the first encryption loss value, and a first sample and the second sample have the same feature dimension; decrypting the loss value, and detecting, according to the decrypted loss value, whether the model is in a convergence state (S300); and if so, using a second encryption model parameter determined on the basis of the loss value as a final parameter of the model (S400). The method realizes acquisition of a parameter in a model of a participant having incompletely labeled data by incorporating labeled sample data from the other participant in the two federated learning participants, thereby improving accuracy of the model of the participant having incompletely labeled data.
Description
本申请要求2018年12月17日提交中国专利局、申请号为201811547471.9、发明名称为“基于联邦学习的模型参数训练方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中This application requires the priority of the Chinese patent application submitted to the Chinese Patent Office on December 17, 2018, with the application number 201811547471.9 and the invention titled "Model Parameter Training Methods, Devices, Equipment, and Storage Media Based on Federal Learning," and all of its contents Incorporation by reference
技术领域Technical field
本申请涉及数据处理技术领域,尤其涉及一种基于联邦学习的模型参数训练方法、装置、设备及介质。The present application relates to the field of data processing technology, and in particular to a model parameter training method, device, equipment, and medium based on federal learning.
背景技术Background technique
“机器学习”是人工智能的核心研究领域之一,而如何在保护数据隐私、满足合法合规要求的前提下继续进行机器学习,是机器学习领域现在关注的一个趋势,在此背景下,人们研究提出了“联邦学习”的概念。"Machine learning" is one of the core research areas of artificial intelligence, and how to continue machine learning under the premise of protecting data privacy and meeting legal compliance requirements is a trend that is now concerned in the field of machine learning. Under this background, people The study proposed the concept of "federal learning".
联邦学习利用技术算法加密建造的模型,联邦双方在不用给出己方数据的情况下,也可进行模型训练得到模型参数,联邦学习通过加密机制下的参数交换方式保护用户数据隐私,数据和模型本身不会进行传输,也不能反猜对方数据,因此在数据层面不存在泄露的可能,也不违反更严格的数据保护法案如GDPR(General
Data Protection Regulation,《通用数据保护条例》)等,能够在较高程度保持数据完整性的同时,保障数据隐私。Federated learning uses technical algorithms to encrypt the built models. Both sides of the federation can conduct model training to obtain model parameters without giving their own data. Federated learning protects user data privacy through the exchange of parameters under the encryption mechanism. The data and the model itself It will not be transmitted, nor can it guess the other party’s data, so there is no possibility of leakage at the data level, nor does it violate stricter data protection laws such as GDPR (General
Data Protection Regulation, "General Data Protection Regulation", etc., can maintain data integrity to a high degree while ensuring data privacy.
目前,在联邦双方A、B样本的特征空间相同的情况下,现有的基于联邦建模的方法只能基于A、B样本均有标注的情况下交换双方参数联合建模,而对于A方有标注,B方标注缺失的情况并不适用,因此,如何联合A方的样本数据得到B方模型中的参数,提高B方模型的准确度,是亟待解决的问题。At present, in the case where the feature spaces of the A and B samples of the two federations are the same, the existing method based on federation modeling can only be based on the exchange of the parameters of the two parties for joint modeling when the A and B samples are marked. There are annotations, and the absence of annotations from Party B is not applicable. Therefore, how to combine the sample data of Party A to obtain the parameters in Party B model and improve the accuracy of Party B model is an urgent problem to be solved.
发明内容Summary of the invention
本申请的主要目的在于提供一种基于联邦学习的模型参数训练方法、装置、设备及介质,旨在基于联邦双方样本的特征空间相同,对于一方有标注,另一方标注缺失的情况下,实现联合有标注方的样本数据得到标注缺失方模型中的参数,提高标注缺失方模型的准确度。The main purpose of the present application is to provide a model parameter training method, device, equipment and medium based on federation learning, aiming to realize the union based on the feature space of the samples of the two federations being the same, if one side has a label and the other side has a missing label The sample data of the labeled party obtains the parameters in the model of the labeled missing party, which improves the accuracy of the model of the labeled missing party.
为实现上述目的,本申请提供一种基于联邦学习的模型参数训练方法,应用于第一终端,所述基于联邦学习的模型参数训练方法包括以下步骤:To achieve the above objective, the present application provides a model parameter training method based on federated learning, which is applied to the first terminal. The model parameter training method based on federated learning includes the following steps:
发送第一加密模型参数至第二终端,所述第一加密模型参数为所述第一终端根据所述第一终端的第一样本训练得到;Sending a first encryption model parameter to a second terminal, where the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;
接收所述第二终端发送的第一加密损失值,其中,所述第二终端以所述第一加密模型参数作为待训练模型的初始参数,根据所述第二终端的第二样本训练所述待训练模型,并计算得到所述第一加密损失值;所述第一样本与所述第二样本具有相同的特征维度;Receiving a first encryption loss value sent by the second terminal, wherein the second terminal uses the first encryption model parameter as an initial parameter of the model to be trained, and trains the second terminal according to a second sample of the second terminal The model to be trained, and the first encryption loss value is calculated; the first sample and the second sample have the same feature dimension;
解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态;Decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value;
若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数。If it is detected that the model to be trained is in a convergence state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained.
可选地,所述若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数的步骤包括:Optionally, if it is detected that the model to be trained is in a convergence state, the step of using the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained includes:
若检测到所述待训练模型处于收敛状态,则获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值;If it is detected that the model to be trained is in a converged state, obtain an encrypted gradient value corresponding to the loss value sent by the second terminal, and decrypt the gradient value;
根据解密后的所述梯度值对所述第一加密模型参数进行更新,得到第二加密模型参数;Updating the first encryption model parameter according to the decrypted gradient value to obtain a second encryption model parameter;
将所述第二加密模型参数作为所述待训练模型的最终参数发送至所述第二终端。Sending the second encryption model parameter to the second terminal as the final parameter of the model to be trained.
可选地,所述若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数的步骤包括:Optionally, if it is detected that the model to be trained is in a convergence state, the step of using the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained includes:
若检测到所述待训练模型处于收敛状态,则发送停止训练指令至所述第二终端,以使所述第二终端在接收到所述停止训练指令后,根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新以获取第二加密模型参数,并将所述第二加密模型参数作为所述待训练模型的最终参数。If it is detected that the model to be trained is in a convergent state, a training stop instruction is sent to the second terminal, so that after receiving the training stop instruction, the second terminal uses the encryption corresponding to the loss value The gradient value updates the first encryption model parameter to obtain the second encryption model parameter, and uses the second encryption model parameter as the final parameter of the model to be trained.
可选地,所述解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态的步骤之后还包括:Optionally, after the step of decrypting the loss value and detecting whether the model to be trained is in a converged state according to the decrypted loss value, the method further includes:
若检测到所述待训练模型处于未收敛状态,则获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值;If it is detected that the model to be trained is in an unconverged state, obtain an encrypted gradient value corresponding to the loss value sent by the second terminal, and decrypt the gradient value;
根据解密后的所述梯度值对所述第一加密模型参数进行更新,得到第三加密模型参数;Updating the first encryption model parameter according to the decrypted gradient value to obtain a third encryption model parameter;
发送所述第三加密模型参数至所述第二终端,以使所述第二终端根据所述第三加密模型参数继续训练所述待训练模型并计算第二加密损失值;Sending the third encryption model parameter to the second terminal, so that the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate a second encryption loss value;
获取所述第二终端发送的所述第二加密损失值,并进入步骤:Obtain the second encrypted loss value sent by the second terminal, and enter the step:
解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态。Decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value.
可选地,所述解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态的步骤之后还包括:Optionally, after the step of decrypting the loss value and detecting whether the model to be trained is in a converged state according to the decrypted loss value, the method further includes:
若检测到所述待训练模型处于未收敛状态,则发送继续训练指令至所述第二终端,以使所述第二终端在接收到所述继续训练指令后,根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新以获取第三加密模型参数,所述第二终端根据所述第三加密模型参数继续训练所述待训练模型并计算第二加密损失值;If it is detected that the model to be trained is in an unconverged state, a continuous training instruction is sent to the second terminal, so that after receiving the continuous training instruction, the second terminal according to the loss value The encryption gradient value updates the first encryption model parameter to obtain a third encryption model parameter, and the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate a second encryption loss value;
获取所述第二终端发送的所述第二加密损失值,并进入步骤:Obtain the second encrypted loss value sent by the second terminal, and enter the step:
解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态。Decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value.
可选地,所述若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数步骤之后还包括:Optionally, if it is detected that the model to be trained is in a convergence state, the step of using the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained further includes:
接收所述第二终端发送的所述第二加密模型参数以及针对于所述第二加密模型参数的解密请求;Receiving the second encryption model parameter and the decryption request for the second encryption model parameter sent by the second terminal;
响应于所述解密请求,解密所述第二加密模型参数,并将解密后的所述第二加密模型参数发送至所述第二终端。In response to the decryption request, decrypt the second encryption model parameter, and send the decrypted second encryption model parameter to the second terminal.
可选地,所述若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数步骤之后还包括:Optionally, if it is detected that the model to be trained is in a convergence state, the step of using the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained further includes:
接收所述第二终端基于所述第二加密模型参数获得的加密预测结果以及针对于所述加密预测结果的解密请求;Receiving an encryption prediction result obtained by the second terminal based on the second encryption model parameter and a decryption request for the encryption prediction result;
响应于所述解密请求,解密所述预测结果,并将解密后的所述预测结果发送至所述第二终端。In response to the decryption request, decrypt the prediction result, and send the decrypted prediction result to the second terminal.
此外,为实现上述目的,本申请还提出一种基于联邦学习的模型参数训练装置,所述装置设于第一终端,所述装置包括:In addition, in order to achieve the above purpose, the present application also proposes a model parameter training device based on federal learning. The device is provided at the first terminal, and the device includes:
第一发送模块,用于发送第一加密模型参数至第二终端,所述第一加密模型参数为所述第一终端根据所述第一终端的第一样本训练得到;A first sending module, configured to send a first encryption model parameter to a second terminal, where the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;
第一接收模块,用于接收所述第二终端发送的第一加密损失值,其中,所述第二终端以所述第一加密模型参数作为待训练模型的初始参数,根据所述第二终端的第二样本训练所述待训练模型,并计算得到所述第一加密损失值;所述第一样本与所述第二样本具有相同的特征维度;A first receiving module, configured to receive a first encryption loss value sent by the second terminal, wherein the second terminal uses the first encryption model parameter as an initial parameter of the model to be trained, according to the second terminal Of the second sample to train the model to be trained and calculate the first encryption loss value; the first sample and the second sample have the same feature dimension;
解密检测模块,用于解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态;A decryption detection module, used to decrypt the loss value and detect whether the model to be trained is in a converged state according to the decrypted loss value;
确定模块,用于在所述解密检测模块检测到所述待训练模型处于收敛状态后,将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数。The determining module is configured to use the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained after the decryption detection module detects that the model to be trained is in a convergence state.
此外,为实现上述目的,本申请还提出一种基于联邦学习的模型参数训练设备,所述设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的基于联邦学习的模型参数训练可读指令,所述基于联邦学习的模型参数训练可读指令被所述处理器执行时实现如上所述的基于联邦学习的模型参数训练方法的步骤。In addition, in order to achieve the above purpose, the present application also proposes a model parameter training device based on federation learning, the device includes: a memory, a processor, and a federation-based training device stored on the memory and capable of running on the processor The model parameter training readable instruction for learning, the model parameter training readable instruction based on federation learning implements the steps of the model parameter training method based on federation learning as described above when executed by the processor.
此外,为实现上述目的,本申请还提出一种存储介质,应用于计算机,所述存储介质上存储有基于联邦学习的模型参数训练可读指令,所述基于联邦学习的模型参数训练可读指令被处理器执行时实现如上所述的基于联邦学习的模型参数训练方法的步骤。In addition, in order to achieve the above purpose, the present application also proposes a storage medium, which is applied to a computer, and the storage medium stores model parameter training readable instructions based on federal learning, and the model parameter training readable instructions based on federal learning When executed by the processor, the steps of the model parameter training method based on federation learning described above are realized.
本申请通过发送第一加密模型参数至第二终端,所述第一加密模型参数为所述第一终端根据所述第一终端的第一样本训练得到;接收所述第二终端发送的第一加密损失值,其中,所述第二终端以所述第一加密模型参数作为待训练模型的初始参数,根据所述第二终端的第二样本训练所述待训练模型,并计算得到所述第一加密损失值;所述第一样本与所述第二样本具有相同的特征维度;解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态;若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数;由此,在联邦双方样本的特征空间相同的情况,第一终端的样本有标注,第二终端的样本标注缺失的情况下,实现了联合第一终端的样本数据得到第二终端的模型参数,提高了第二终端模型的准确度。In this application, the first encryption model parameter is sent to the second terminal, and the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal; An encryption loss value, wherein the second terminal uses the first encryption model parameter as the initial parameter of the model to be trained, trains the model to be trained according to the second sample of the second terminal, and calculates the A first encryption loss value; the first sample and the second sample have the same feature dimension; decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value; If it is detected that the model to be trained is in a convergent state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained; thus, in the case where the feature spaces of the samples of both federations are the same, The sample of the first terminal has a label, and when the sample label of the second terminal is missing, the model parameters of the second terminal are obtained by combining the sample data of the first terminal, and the accuracy of the model of the second terminal is improved.
附图说明BRIEF DESCRIPTION
图1是本申请实施例方案涉及的硬件运行环境的结构示意图;FIG. 1 is a schematic structural diagram of a hardware operating environment involved in an embodiment of the present application;
图2为本申请基于联邦学习的模型参数训练方法第一实施例的流程示意图; 2 is a schematic flowchart of a first embodiment of a model parameter training method based on federal learning in this application;
图3为本申请基于联邦学习的模型参数训练方法第一实施例中步骤S400的细化步骤示意图;FIG. 3 is a schematic diagram of the detailed steps of step S400 in the first embodiment of the model parameter training method based on federal learning of this application;
图4为本申请基于联邦学习的模型参数训练方法第二实施例的流程示意图;4 is a schematic flowchart of a second embodiment of a model parameter training method based on federal learning in this application;
图5为本申请基于联邦学习的模型参数训练方法第三实施例的流程示意图;FIG. 5 is a schematic flowchart of a third embodiment of a model parameter training method based on federal learning in this application;
图6为本申请基于联邦学习的模型参数训练方法第四实施例的流程示意图。FIG. 6 is a schematic flowchart of a fourth embodiment of a model parameter training method based on federal learning in this application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional characteristics and advantages of the present application will be further described in conjunction with the embodiments and with reference to the drawings.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
如图1所示,图1是本申请实施例方案涉及的硬件运行环境的结构示意图。As shown in FIG. 1, FIG. 1 is a schematic structural diagram of a hardware operating environment involved in a solution of an embodiment of the present application.
需要说明的是,图1即可为模型参数训练装置的硬件运行环境的结构示意图。本申请实施例模型参数训练装置可以是PC,便携计算机等终端设备。It should be noted that FIG. 1 is a schematic diagram of the hardware operating environment of the model parameter training device. The model parameter training device in the embodiment of the present application may be a terminal device such as a PC or a portable computer.
如图1所示,该模型参数训练装置可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile
memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1, the model parameter training device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to implement connection communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile
memory), such as disk storage. The memory 1005 may optionally be a storage device independent of the foregoing processor 1001.
本领域技术人员可以理解,图1中示出的模型参数训练装置结构并不构成对模型参数训练装置的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the model parameter training device shown in FIG. 1 does not constitute a limitation on the model parameter training device, and may include more or fewer components than the illustration, or a combination of certain components, or different Parts layout.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作***、网络通信模块、用户接口模块以及基于联邦学习的模型参数训练可读指令。其中,操作***是管理和控制模型参数训练装置硬件和软件资源的可读指令,支持基于联邦学习的模型参数训练可读指令以及其它软件或可读指令的运行。As shown in FIG. 1, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and model parameter training readable instructions based on federation learning. Among them, the operating system is a readable instruction that manages and controls the hardware and software resources of the model parameter training device, and supports the operation of the model parameter training readable instruction based on federal learning and other software or readable instructions.
在图1所示的模型参数训练装置中,用户接口1003主要用于与各个终端进行数据通信;网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;而处理器1001可以用于调用存储器1005中存储的基于联邦学习的模型参数训练可读指令,并执行以下操作:In the model parameter training device shown in FIG. 1, the user interface 1003 is mainly used for data communication with each terminal; the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; and the processor 1001 can be used for calling The model parameter training based on federated learning stored in the memory 1005 trains readable instructions, and performs the following operations:
发送第一加密模型参数至第二终端,所述第一加密模型参数为所述第一终端根据所述第一终端的第一样本训练得到;Sending a first encryption model parameter to a second terminal, where the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;
接收所述第二终端发送的第一加密损失值,其中,所述第二终端以所述第一加密模型参数作为待训练模型的初始参数,根据所述第二终端的第二样本训练所述待训练模型,并计算得到所述第一加密损失值;所述第一样本与所述第二样本具有相同的特征维度;Receiving a first encryption loss value sent by the second terminal, wherein the second terminal uses the first encryption model parameter as an initial parameter of the model to be trained, and trains the second terminal according to a second sample of the second terminal The model to be trained, and the first encryption loss value is calculated; the first sample and the second sample have the same feature dimension;
解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态;Decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value;
若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数。If it is detected that the model to be trained is in a convergence state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained.
基于上述的结构,提出基于联邦学习的模型参数训练方法的各个实施例。Based on the above structure, various embodiments of the model parameter training method based on federated learning are proposed.
参照图2,图2为本申请基于联邦学习的模型参数训练方法第一实施例的流程示意图。Referring to FIG. 2, FIG. 2 is a schematic flowchart of a first embodiment of a model parameter training method based on federal learning in this application.
本申请实施例提供了基于联邦学习的模型参数训练方法的实施例,需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The embodiment of the present application provides an embodiment of a model parameter training method based on federated learning. It should be noted that although the logic sequence is shown in the flowchart, in some cases, it may be executed in an order different from here The steps shown or described.
本申请实施例基于联邦学习的模型参数训练方法应用于第一终端,本申请实施例第一终端与第二终端可以分别是PC,便携计算机等终端设备,在此不做具体限制。The model parameter training method based on federated learning in the embodiment of the present application is applied to the first terminal. The first terminal and the second terminal in the embodiment of the present application may be terminal devices such as PCs and portable computers, respectively, and are not specifically limited herein.
本实施例基于联邦学习的模型参数训练方法包括:The model parameter training method based on federated learning in this embodiment includes:
步骤S100,发送第一加密模型参数至第二终端,所述第一加密模型参数为所述第一终端根据所述第一终端的第一样本训练得到;Step S100: Send a first encryption model parameter to a second terminal, where the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;
“机器学习”是人工智能的核心研究领域之一,而如何在保护数据隐私、满足合法合规要求的前提下继续进行机器学习,是机器学习领域现在关注的一个趋势,在此背景下,人们研究提出了“联邦学习”的概念。"Machine learning" is one of the core research areas of artificial intelligence, and how to continue machine learning under the premise of protecting data privacy and meeting legal compliance requirements is a trend that is now concerned in the field of machine learning. Under this background, people The study proposed the concept of "federal learning".
联邦学习利用技术算法加密建造的模型,联邦双方在不用给出己方数据的情况下,也可进行模型训练得到模型参数,联邦学习通过加密机制下的参数交换方式保护用户数据隐私,数据和模型本身不会进行传输,也不能反猜对方数据,因此在数据层面不存在泄露的可能,也不违反更严格的数据保护法案如GDPR(General
Data Protection Regulation,《通用数据保护条例》)等,能够在较高程度保持数据完整性的同时,保障数据隐私。Federated learning uses technical algorithms to encrypt the built models. Both sides of the federation can conduct model training to obtain model parameters without giving their own data. Federated learning protects user data privacy through the exchange of parameters under the encryption mechanism. The data and the model itself It will not be transmitted, nor can it guess the other party’s data, so there is no possibility of leakage at the data level, nor does it violate stricter data protection laws such as GDPR (General
Data Protection Regulation, "General Data Protection Regulation", etc., can maintain data integrity to a high degree while ensuring data privacy.
目前,在联邦双方A、B样本的特征空间相同的情况下,现有的基于联邦建模的方法只能基于A、B样本均有标注的情况下交换双方参数联合建模,而对于A方有标注,B方标注缺失的情况并不适用,为了解决这一问题,提出本申请基于联邦学习的模型参数训练方法的各个实施例。At present, in the case where the feature spaces of the A and B samples of the two federations are the same, the existing method based on federation modeling can only be based on the exchange of the parameters of the two parties for joint modeling when the A and B samples are marked. There are annotations, and the absence of the B-side annotations is not applicable. To solve this problem, various embodiments of the model parameter training method based on federal learning in this application are proposed.
本申请基于横向联邦学习,横向联邦学习是指在两个数据集(即可以是本申请实施例中所述的第一样本和第二样本)的用户特征重叠较多,而用户重叠较少的情况下,把数据集按照横向(即用户维度)切分,并取出双方用户特征相同而用户不完全相同的那部分数据进行训练。这种方法叫做横向联邦学习。比如有两家不同地区的银行,它们的用户群体分别来自各自所在的地区,相互的交集很小。但是,它们的业务很相似,因此,记录的用户特征是相同的。This application is based on horizontal federation learning. Horizontal federation learning refers to the overlapping of user features in two data sets (ie, the first sample and the second sample described in the embodiments of the present application), while the user overlap is less In the case of, divide the data set according to the horizontal direction (that is, the user dimension), and take out the part of the data with the same user characteristics but not the same users for training. This method is called horizontal federation learning. For example, there are two banks in different regions, and their user groups are from their respective regions, and their intersection is very small. However, their businesses are very similar, so the recorded user characteristics are the same.
本实施例中,首先第一终端根据第一终端的第一样本训练得到初始模型参数,第一终端采用联邦学习中的加密算法对初始模型参数进行加密得到第一加密模型参数,并将第一加密模型参数发送至第二终端。In this embodiment, first the first terminal is trained according to the first sample of the first terminal to obtain the initial model parameters. The first terminal encrypts the initial model parameters using the encryption algorithm in the federated learning to obtain the first encryption model parameters, and the first An encryption model parameter is sent to the second terminal.
步骤S200,接收所述第二终端发送的第一加密损失值,其中,所述第二终端以所述第一加密模型参数作为待训练模型的初始参数,根据所述第二终端的第二样本训练所述待训练模型,并计算得到所述第一加密损失值;所述第一样本与所述第二样本具有相同的特征维度;Step S200: Receive a first encryption loss value sent by the second terminal, where the second terminal uses the first encryption model parameter as the initial parameter of the model to be trained, based on the second sample of the second terminal Training the model to be trained, and calculating the first encryption loss value; the first sample and the second sample have the same feature dimension;
在本实施例中,第二终端接收到所述第一终端发送的第一加密模型参数后,第二终端将第一加密模型参数作为其待训练模型的初始参数,并根据第二终端中仅有少量标注的第二样本数据进行模型训练,计算得到加密损失值,可以理解的是,所述第二样本标注相较于第一样本标注是部分缺失的,即第二样本的标注比第一样本的标注要少。In this embodiment, after the second terminal receives the first encryption model parameters sent by the first terminal, the second terminal uses the first encryption model parameters as the initial parameters of the model to be trained, and according to the second terminal only The second sample data with a small amount of labels is used for model training, and the encryption loss value is calculated. It can be understood that the second sample label is partially missing compared to the first sample label, that is, the second sample label is higher than the first The label of a copy should be less.
第二终端以所述第一加密模型参数作为其待训练模型的初始参数,根据所述第二终端的标注缺失的第二样本训练所述待训练模型,并计算得到所述第一加密损失值,然后发送所述第一加密损失值至第一终端,第一终端接收所述第二终端发送的第一加密损失值。The second terminal uses the first encryption model parameter as the initial parameter of its model to be trained, trains the model to be trained according to the second sample of the second terminal that is missing, and calculates the first encryption loss value Then, the first encrypted loss value is sent to the first terminal, and the first terminal receives the first encrypted loss value sent by the second terminal.
步骤S300,解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态;Step S300, decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value;
第一终端接收到第二终端发送的加密损失值后,基于对应的的解密算法,第一终端解密第二终端发来的加密损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态。After receiving the encrypted loss value sent by the second terminal, the first terminal decrypts the encrypted loss value sent by the second terminal based on the corresponding decryption algorithm, and detects the to-be-trained according to the decrypted loss value Whether the model is converging.
进一步地,作为一种实施方式,根据解密后的所述损失值检测所述待训练模型是否处于收敛状态,具体可以是第一终端将第二终端连续两次发送的加密损失值分别解密后,计算这两个损失值的差值,并判断所述差值是否小于或者等于预设阈值,当判断出所述差值小于或者等于所述预设阈值时,确定所述待训练模型处于收敛状态;当判断出所述差值大于所述预设阈值时,确定所述待训练模型未处于收敛状态。Further, as an implementation manner, whether the model to be trained is in a converged state is detected according to the decrypted loss value, which may specifically be that the first terminal decrypts the encryption loss values sent by the second terminal twice in succession, Calculate the difference between these two loss values, and determine whether the difference is less than or equal to a preset threshold. When it is determined that the difference is less than or equal to the preset threshold, determine that the model to be trained is in a converged state When it is determined that the difference is greater than the preset threshold, it is determined that the model to be trained is not in a converged state.
步骤S400,若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数。Step S400, if it is detected that the model to be trained is in a converged state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained.
第二终端在根据第一加密模型参数训练所述待训练模型的过程中,计算得到对应的加密梯度值和加密损失值,由于第一加密模型参数加密,第二终端无法根据加密损失值判断待训练模型是否收敛,第二终端将加密损失值发送给第一终端由第一终端对所述损失值解密后判断待训练模型是否收敛。During the process of training the model to be trained according to the parameters of the first encryption model, the second terminal calculates the corresponding encryption gradient value and encryption loss value. Due to the encryption of the first encryption model parameters, the second terminal cannot judge the pending value based on the encryption loss value. Whether the training model has converged, the second terminal sends the encrypted loss value to the first terminal, and the first terminal decrypts the loss value to determine whether the model to be trained has converged.
本实施例中,第一终端根据解密后的损失值检测到所述待训练模型处于收敛状态,并将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数,待训练模型训练完成。In this embodiment, the first terminal detects that the model to be trained is in a convergence state according to the decrypted loss value, and uses the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained. Training model training is complete.
具体地,参照图3,图3为本实施例中步骤S400的细化步骤示意图;作为一种实施方式,本实施例中,步骤S400可以包括如下细化步骤:Specifically, referring to FIG. 3, FIG. 3 is a schematic diagram of the refinement steps of step S400 in this embodiment; as an implementation manner, in this embodiment, step S400 may include the following refinement steps:
步骤S401,若检测到所述待训练模型处于收敛状态,则获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值;Step S401: If it is detected that the model to be trained is in a convergence state, obtain an encrypted gradient value corresponding to the loss value sent by the second terminal, and decrypt the gradient value;
步骤S402,根据解密后的所述梯度值对所述第一加密模型参数进行更新,得到第二加密模型参数;Step S402: Update the first encryption model parameter according to the decrypted gradient value to obtain a second encryption model parameter;
步骤S403,将所述第二加密模型参数作为所述待训练模型的最终参数发送至所述第二终端。Step S403: Send the second encryption model parameters to the second terminal as the final parameters of the model to be trained.
作为一种实施方式,第一终端检测到所述待训练模型处于收敛状态,第一终端获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值,本实施例中,第二终端根据第一加密模型参数训练待训练模型的过程中,计算得到对应的加密梯度值和加密损失值,并将计算得到的加密梯度值和加密损失值同时发送至第一终端,第一终端首先解密加密损失值,然后根据解密后的当前损失值检测到所述待训练模型处于收敛状态,然后第一终端解密与所述当前损失值对应的加密梯度值,并根据解密后的梯度值对第一加密模型参数进行更新得到第二加密模型参数。As an implementation manner, the first terminal detects that the model to be trained is in a converged state, and the first terminal obtains the encrypted gradient value corresponding to the loss value sent by the second terminal and decrypts the gradient value. In the example, during the process of training the model to be trained according to the parameters of the first encryption model, the second terminal calculates the corresponding encryption gradient value and encryption loss value, and sends the calculated encryption gradient value and encryption loss value to the first terminal simultaneously , The first terminal first decrypts the encrypted loss value, then detects that the model to be trained is in a converged state according to the decrypted current loss value, and then the first terminal decrypts the encrypted gradient value corresponding to the current loss value, and then decrypts The gradient value of is used to update the first encryption model parameter to obtain the second encryption model parameter.
第一终端发送第二加密模型参数至第二终端并将第二加密模型参数确定为第二终端的待训练模型的最终参数,待训练模型训练完成。由此,实现了在联邦双方样本的特征空间相同的情况,第一终端的样本有标注,第二终端的样本标注缺失的情况下,联合第一终端的样本数据得到第二终端的模型参数,提高第二终端模型的准确度。The first terminal sends the second encryption model parameters to the second terminal and determines the second encryption model parameters as the final parameters of the model to be trained of the second terminal, and the training of the model to be trained is completed. Therefore, when the feature spaces of the samples of the two federations are the same, the sample of the first terminal is labeled, and the sample of the second terminal is missing, the sample data of the first terminal is combined to obtain the model parameters of the second terminal. Improve the accuracy of the second terminal model.
进一步地,在本申请其它实施例中,区别于本实施例,步骤S400,若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数的步骤包括如下细化步骤:Further, in other embodiments of this application, different from this embodiment, in step S400, if it is detected that the model to be trained is in a converged state, the second encryption model parameter determined based on the loss value is used as the target The steps of training the final parameters of the model include the following refinement steps:
若检测到所述待训练模型处于收敛状态,则发送停止训练指令至所述第二终端,以使所述第二终端在接收到所述停止训练指令后,根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新以获取第二加密模型参数,并将所述第二加密模型参数作为所述待训练模型的最终参数。If it is detected that the model to be trained is in a convergent state, a training stop instruction is sent to the second terminal, so that after receiving the training stop instruction, the second terminal uses the encryption corresponding to the loss value The gradient value updates the first encryption model parameter to obtain the second encryption model parameter, and uses the second encryption model parameter as the final parameter of the model to be trained.
区别于所述的基于联邦学习的模型参数训练方法第一实施例,本实施方式中,第二终端根据第一加密模型参数训练待训练模型的过程中,计算得到加密梯度值和加密损失值,第二终端仅将计算得到的加密损失值发送至第一终端,第一终端解密所述加密损失值,并且根据解密后的当前损失值检测到所述待训练模型处于收敛状态,第一终端发送停止训练指令至所述第二终端,第二终端在接收到所述停止训练指令后,根据计算得到的与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新得到第二加密模型参数,并将所述第二加密模型参数作为所述待训练模型的最终参数,待训练模型训练完成,由此,实现了在联邦双方样本的特征空间相同的情况,第一终端的样本有标注,第二终端的样本标注缺失的情况下,联合第一终端的样本数据得到第二终端的模型参数,提高第二终端模型的准确度。Different from the first embodiment of the model parameter training method based on federation learning, in this embodiment, the second terminal calculates the encryption gradient value and the encryption loss value during the process of training the model to be trained according to the first encryption model parameter, The second terminal only sends the calculated encrypted loss value to the first terminal, the first terminal decrypts the encrypted loss value, and detects that the model to be trained is in a convergence state according to the decrypted current loss value, and the first terminal sends Stop training instruction to the second terminal, after receiving the stop training instruction, the second terminal updates the first encryption model parameter according to the calculated encryption gradient value corresponding to the loss value to obtain the second Encrypt the model parameters, and use the second encrypted model parameters as the final parameters of the model to be trained, and the training of the model to be trained is completed, thereby realizing the case that the feature space of the samples of the two federations is the same, the sample of the first terminal If there is a label, and the sample label of the second terminal is missing, the sample data of the first terminal is combined with the model parameters of the second terminal to improve the accuracy of the model of the second terminal.
本实施例通过发送第一加密模型参数至第二终端,所述第一加密模型参数为所述第一终端根据所述第一终端的第一样本训练得到;接收所述第二终端发送的第一加密损失值,其中,所述第二终端以所述第一加密模型参数作为待训练模型的初始参数,根据所述第二终端的第二样本训练所述待训练模型,并计算得到所述第一加密损失值;所述第一样本与所述第二样本具有相同的特征维度;解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态;若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数。实现了在联邦双方样本的特征空间相同的情况,第一终端的样本有标注,第二终端的样本标注缺失的情况下,联合第一终端的样本数据得到第二终端的模型参数,提高第二终端模型的准确度。In this embodiment, the first encryption model parameter is sent to the second terminal, and the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal; The first encryption loss value, wherein the second terminal uses the first encryption model parameter as the initial parameter of the model to be trained, trains the model to be trained according to the second sample of the second terminal, and calculates The first encryption loss value; the first sample and the second sample have the same feature dimension; decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value ; If it is detected that the model to be trained is in a convergence state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained. It is realized that when the feature space of the samples of the two federations is the same, the sample of the first terminal is labeled, and the sample of the second terminal is missing, the sample data of the first terminal is combined to obtain the model parameters of the second terminal, and the second The accuracy of the terminal model.
进一步地,提出本申请基于联邦学习的模型参数训练方法第二实施例。Further, the second embodiment of the model parameter training method based on federal learning in this application is proposed.
参照图4,图4为本申请基于联邦学习的模型参数训练方法第二实施例的流程示意图,基于上述基于联邦学习的模型参数训练方法第一实施例,本实施例中,步骤S300,解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态的步骤之后还包括:Referring to FIG. 4, FIG. 4 is a schematic flowchart of a second embodiment of a model parameter training method based on federal learning according to the present application. Based on the first embodiment of the model parameter training method based on federal learning described above, in this embodiment, step S300 The loss value, and after the step of detecting whether the model to be trained is in a converged state according to the decrypted loss value, the method further includes:
步骤S501,若检测到所述待训练模型处于未收敛状态,则获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值;Step S501: If it is detected that the model to be trained is in an unconverged state, obtain an encrypted gradient value corresponding to the loss value sent by the second terminal, and decrypt the gradient value;
第一终端检测到所述待训练模型处于未收敛状态,第一终端获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值,本实施例中,第二终端根据第一加密模型参数训练待训练模型的过程中,计算得到加密梯度值和加密损失值,并将计算得到的加密梯度值和加密损失值同时发送至第一终端,第一终端首先解密加密损失值,然后根据解密后的当前损失值检测到所述待训练模型处于未收敛状态。The first terminal detects that the model to be trained is in an unconverged state, and the first terminal obtains the encrypted gradient value corresponding to the loss value sent by the second terminal and decrypts the gradient value. In this embodiment, the second During the process of training the model to be trained according to the parameters of the first encryption model, the terminal calculates the encryption gradient value and the encryption loss value, and simultaneously sends the calculated encryption gradient value and the encryption loss value to the first terminal, and the first terminal first decrypts the encryption The loss value, and then it is detected that the model to be trained is in an unconverged state according to the decrypted current loss value.
步骤S502,根据解密后的所述梯度值对所述第一加密模型参数进行更新,得到第三加密模型参数;Step S502: Update the first encryption model parameter according to the decrypted gradient value to obtain a third encryption model parameter;
在检测到所述待训练模型处于未收敛状态后,第一终端解密与所述当前损失值对应的加密梯度值,并根据解密后的梯度值对第一加密模型参数进行更新得到第三加密模型参数。After detecting that the model to be trained is in an unconverged state, the first terminal decrypts the encryption gradient value corresponding to the current loss value, and updates the first encryption model parameters according to the decrypted gradient value to obtain the third encryption model parameter.
步骤S503,发送所述第三加密模型参数至所述第二终端,以使所述第二终端根据所述第三加密模型参数继续训练所述待训练模型并计算第二加密损失值;Step S503: Send the third encryption model parameter to the second terminal, so that the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate a second encryption loss value;
第一终端发送所述第三加密模型参数至第二终端,第二终端根据第三加密模型参数继续训练待训练模型,并计算得到第二加密损失值和与第二加密损失值对应的加密梯度值,第一终端发送第二加密损失值至第一终端用于第一终端检测待训练模型是否收敛。The first terminal sends the third encryption model parameter to the second terminal, and the second terminal continues to train the model to be trained according to the third encryption model parameter, and calculates the second encryption loss value and the encryption gradient corresponding to the second encryption loss value Value, the first terminal sends the second encryption loss value to the first terminal for the first terminal to detect whether the model to be trained has converged.
步骤S504,获取所述第二终端发送的所述第二加密损失值,并进入步骤S300,解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态;第一终端在获取到第二加密损失值后,进入上述第一终端解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态的步骤,第一终端检测到所述待训练模型处于收敛状态,则进入步骤S400,确定与当前模型收敛状态下损失值对应的第二加密模型参数为待训练模型的最终参数,模型训练完成,若第一终端检测到所述待训练模型处于未收敛状态,则再次进入步骤S501,第二终端继续根据更新后加密模型参数迭代训练所述待训练模型并将训练过程中计算得到的加密损失值发送至第一终端,直至第一终端根据其发送的加密损失值检测所述待训练模型处于收敛状态后,第二终端获取第一终端确定的待训练模型的最终加密参数,第二终端的模型训练完成。Step S504: Obtain the second encrypted loss value sent by the second terminal, and proceed to step S300, decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value; After obtaining the second encrypted loss value, the first terminal enters the first terminal to decrypt the loss value, and detects whether the model to be trained is in a converged state according to the decrypted loss value. The first terminal detects When the model to be trained is in a convergent state, step S400 is entered to determine that the second encrypted model parameter corresponding to the loss value in the current model convergence state is the final parameter of the model to be trained. The model training is completed, if the first terminal detects If the model to be trained is in an unconverged state, step S501 is entered again, and the second terminal continues to iteratively train the model to be trained according to the updated encryption model parameters and sends the encryption loss value calculated in the training process to the first terminal until After the first terminal detects that the model to be trained is in a convergence state according to the encryption loss value sent by it, the second terminal obtains the final encryption parameters of the model to be trained determined by the first terminal, and the model training of the second terminal is completed.
进一步地,作为一种实施方式,在本申请其它实施例中,区别于所述的基于联邦学习的模型参数训练方法第二实施例,步骤S300,解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态的步骤之后还包括:Further, as an implementation manner, in other embodiments of the present application, it is different from the second embodiment of the model parameter training method based on federal learning. In step S300, the loss value is decrypted, and according to the decrypted The step of detecting whether the loss value is in a convergence state after the loss value further includes:
若检测到所述待训练模型处于未收敛状态,则发送继续训练指令至所述第二终端,以使所述第二终端在接收到所述继续训练指令后,根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新以获取第三加密模型参数,所述第二终端根据所述第三加密模型参数继续训练所述待训练模型并计算第二加密损失值;If it is detected that the model to be trained is in an unconverged state, a continuous training instruction is sent to the second terminal, so that after receiving the continuous training instruction, the second terminal according to the loss value The encryption gradient value updates the first encryption model parameter to obtain a third encryption model parameter, and the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate a second encryption loss value;
获取所述第二终端发送的所述第二加密损失值,并进入步骤S300,解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态。Obtain the second encrypted loss value sent by the second terminal, and proceed to step S300, decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value.
可以理解的是,区别于所述的基于联邦学习的模型参数训练方法第二实施例,本实施方式中,第一终端检测到所述待训练模型处于未收敛状态,则发送继续训练指令至所述第二终端,而基于加密梯度值更新加密模型参数的过程是在第二终端进行,第二终端在接收到第一终端发送的所述继续训练指令后,第二终端根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新得到第三加密模型参数,然后第二终端根据所述第三加密模型参数继续训练所述待训练模型并计算第二加密损失值,再将第二加密损失值发送至第一终端,第一终端获取到第二终端发送的第二加密损失值后,进入步骤S300,即进入上述第一终端解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态的步骤,第一终端检测到所述待训练模型处于收敛状态,则进入步骤S400,确定与当前收敛状态下损失值对应的第二加密模型参数为待训练模型的最终参数,模型训练完成;若第一终端检测到所述待训练模型处于未收敛状态,则再次发送继续训练指令至所述第二终端继续训练并接收第二终端继续训练过程中发送的加密损失值,直至第一终端基于第二终端发送的加密损失值检测出待训练模型处于收敛状态后,第二终端根据加密梯度值更新得到待训练模型的最终加密参数,第二终端的待训练模型训练完成。It can be understood that, unlike the second embodiment of the model parameter training method based on federated learning, in this embodiment, the first terminal detects that the model to be trained is in an unconverged state, and then sends a continuous training instruction to all The second terminal, and the process of updating the encryption model parameters based on the encryption gradient value is performed at the second terminal. After the second terminal receives the continuation training instruction sent by the first terminal, the second terminal according to the loss value Update the first encryption model parameter with the corresponding encryption gradient value to obtain the third encryption model parameter, and then the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate the second encryption loss value, and Send the second encrypted loss value to the first terminal, and after obtaining the second encrypted loss value sent by the second terminal, the first terminal proceeds to step S300, that is, to enter the first terminal to decrypt the loss value, and according to the decrypted The step of detecting whether the model to be trained is in a convergent state by the loss value, and the first terminal detects that the model to be trained is in a convergent state, then proceeds to step S400 to determine a second encryption model corresponding to the loss value in the current convergent state The parameter is the final parameter of the model to be trained, and the model training is completed; if the first terminal detects that the model to be trained is in an unconverged state, it sends another training instruction to the second terminal to continue training and receives the second terminal to continue training The encryption loss value sent in the process until the first terminal detects that the model to be trained is in a convergence state based on the encryption loss value sent by the second terminal, the second terminal updates the final encryption parameter of the model to be trained according to the encryption gradient value, the second The training of the terminal to be trained is completed.
本实施例通过上述方式,实现了在联邦双方样本的特征空间相同的情况,第一终端的样本有标注,第二终端的样本标注缺失的情况下,联合第一终端的样本数据得到第二终端的模型参数,提高第二终端模型的准确度。In this embodiment, in the above manner, when the feature spaces of the samples of the two federations are the same, the sample of the first terminal is labeled, and the sample of the second terminal is missing, the sample data of the first terminal is combined to obtain the second terminal Model parameters to improve the accuracy of the second terminal model.
进一步地,提出本申请基于联邦学习的模型参数训练方法第三实施例。Further, a third embodiment of the model parameter training method based on federal learning in this application is proposed.
参照图5,图5为本申请基于联邦学习的模型参数训练方法第三实施例的流程示意图,基于上述基于联邦学习的模型参数训练方法第一实施例,本实施例中,步骤S400,若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数步骤之后还包括:Referring to FIG. 5, FIG. 5 is a schematic flowchart of a third embodiment of a model parameter training method based on federal learning according to the present application. Based on the first embodiment of the model parameter training method based on federal learning described above, in this embodiment, step S400, if detected When the model to be trained is in a convergence state, the step of using the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained further includes:
步骤S601,接收所述第二终端发送的所述第二加密模型参数以及针对于所述第二加密模型参数的解密请求;Step S601: Receive the second encryption model parameter and a decryption request for the second encryption model parameter sent by the second terminal;
步骤S602,响应于所述解密请求,解密所述第二加密模型参数,并将解密后的所述第二加密模型参数发送至所述第二终端。Step S602, in response to the decryption request, decrypt the second encryption model parameter, and send the decrypted second encryption model parameter to the second terminal.
在联邦双方样本的特征空间相同、第一终端的样本有标注以及第二终端样本标注缺失的情况下,联合第一终端的样本数据,使第二终端得到了训练完成的加密模型参数,本实施例中,第一终端接收所述第二终端发送的所述第二加密模型参数以及针对于所述第二加密模型参数的解密请求,响应于所述解密请求,解密所述第二加密模型参数,并将解密后的所述第二加密模型参数发送至所述第二终端,由此,第二终端可以根据解密后的模型参数进行结果预测,实现了将第一终端训练的模型应用在特征和标注缺失的第二终端,从而极大程度的拓展了联邦学习的应用范围,有效提高第二终端模型的预测能力。In the case where the feature space of the samples of both federations is the same, the samples of the first terminal are labeled, and the samples of the second terminal are missing, the sample data of the first terminal is combined to enable the second terminal to obtain the encrypted model parameters of the training. This implementation In an example, the first terminal receives the second encryption model parameter and the decryption request for the second encryption model parameter sent by the second terminal, and in response to the decryption request, decrypts the second encryption model parameter , And send the decrypted second encrypted model parameters to the second terminal, so that the second terminal can predict the results according to the decrypted model parameters, and realize the application of the model trained by the first terminal to the features And mark the missing second terminal, which greatly expands the scope of application of federal learning and effectively improves the predictive ability of the second terminal model.
进一步地,提出本申请基于联邦学习的模型参数训练方法第四实施例。Further, the fourth embodiment of the model parameter training method based on federal learning in this application is proposed.
参照图6,图6为本申请基于联邦学习的模型参数训练方法第四实施例的流程示意图,基于上述基于联邦学习的模型参数训练方法第一实施例,本实施例中,步骤S400,若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数步骤之后还包括:Referring to FIG. 6, FIG. 6 is a schematic flowchart of a fourth embodiment of a model parameter training method based on federal learning according to the present application. Based on the first embodiment of the model parameter training method based on federal learning described above, in this embodiment, step S400, if detected When the model to be trained is in a convergence state, the step of using the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained further includes:
步骤S603,接收所述第二终端基于所述第二加密模型参数获得的加密预测结果以及针对于所述加密预测结果的解密请求;Step S603: Receive an encryption prediction result obtained by the second terminal based on the second encryption model parameter and a decryption request for the encryption prediction result;
步骤S604,响应于所述解密请求,解密所述预测结果,并将解密后的所述预测结果发送至所述第二终端。Step S604, in response to the decryption request, decrypt the prediction result, and send the decrypted prediction result to the second terminal.
本实施例中,在联邦双方样本的特征空间相同、第一终端的样本有标注以及第二终端样本标注缺失的情况下,联合第一终端的样本数据,第二终端得到了训练完成的加密模型参数,进一步地,第一终端接收所述第二终端基于所述第二加密模型参数获得的加密预测结果以及针对于所述加密预测结果的解密请求,响应于所述解密请求,解密所述预测结果,并将解密后的所述预测结果发送至所述第二终端,由此,第二终端可以根据最终确定的加密模型参数进行结果预测,得到加密预测结果,由第一终端将加密预测结果解密后返回至第二终端,实现了将第一终端训练的模型应用在特征和标注缺失的第二终端,从而极大程度的拓展了联邦学习的应用范围,有效提高第二终端模型的预测能力。In this embodiment, when the feature space of the samples of the two federations is the same, the samples of the first terminal are labeled, and the sample labels of the second terminal are missing, the sample data of the first terminal is combined, and the second terminal obtains the trained encryption model Parameters, further, the first terminal receives an encryption prediction result obtained by the second terminal based on the second encryption model parameter and a decryption request for the encryption prediction result, and in response to the decryption request, decrypts the prediction As a result, the decrypted prediction result is sent to the second terminal, so that the second terminal can predict the result according to the finally determined encryption model parameters to obtain the encryption prediction result, and the first terminal will encrypt the prediction result After decryption, it is returned to the second terminal, and the model trained by the first terminal is applied to the second terminal with missing features and annotations, thereby greatly expanding the scope of application of federal learning and effectively improving the predictive ability of the second terminal model .
此外,本申请实施例还提出一种基于联邦学习的模型参数训练装置,所述装置设于第一终端,所述装置包括:In addition, the embodiments of the present application also provide a model parameter training device based on federal learning. The device is provided at the first terminal, and the device includes:
第一发送模块,用于发送第一加密模型参数至第二终端,所述第一加密模型参数为所述第一终端根据所述第一终端的第一样本训练得到;A first sending module, configured to send a first encryption model parameter to a second terminal, where the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;
第一接收模块,用于接收所述第二终端发送的第一加密损失值,其中,所述第二终端以所述第一加密模型参数作为待训练模型的初始参数,根据所述第二终端的第二样本训练所述待训练模型,并计算得到所述第一加密损失值;所述第一样本与所述第二样本具有相同的特征维度;A first receiving module, configured to receive a first encryption loss value sent by the second terminal, wherein the second terminal uses the first encryption model parameter as an initial parameter of the model to be trained, according to the second terminal Of the second sample to train the model to be trained and calculate the first encryption loss value; the first sample and the second sample have the same feature dimension;
解密检测模块,用于解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态;A decryption detection module, used to decrypt the loss value and detect whether the model to be trained is in a converged state according to the decrypted loss value;
确定模块,用于在所述解密检测模块检测到所述待训练模型处于收敛状态后,将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数。The determining module is configured to use the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained after the decryption detection module detects that the model to be trained is in a convergence state.
可选地,所述确定模块包括:Optionally, the determination module includes:
获取解密单元,用于在所述解密检测模块检测到所述待训练模型处于收敛状态后,获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值;An acquisition and decryption unit for acquiring an encryption gradient value corresponding to the loss value sent by the second terminal and decrypting the gradient value after the decryption detection module detects that the model to be trained is in a convergence state;
更新单元,用于根据解密后的所述梯度值对所述第一加密模型参数进行更新,得到第二加密模型参数;An updating unit, configured to update the first encryption model parameter according to the decrypted gradient value to obtain a second encryption model parameter;
第一确定单元,用于将所述第二加密模型参数作为所述待训练模型的最终参数发送至所述第二终端。The first determining unit is configured to send the second encryption model parameter to the second terminal as the final parameter of the model to be trained.
可选地,所述确定模块包括:Optionally, the determination module includes:
第二确定单元,用于在所述解密检测模块检测到所述待训练模型处于收敛状态后,发送停止训练指令至所述第二终端,以使所述第二终端在接收到所述停止训练指令后,根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新以获取第二加密模型参数,并将所述第二加密模型参数作为所述待训练模型的最终参数。A second determining unit, configured to send a training stop instruction to the second terminal after the decryption detection module detects that the model to be trained is in a convergence state, so that the second terminal receives the training stop After the instruction, update the first encryption model parameter according to the encryption gradient value corresponding to the loss value to obtain the second encryption model parameter, and use the second encryption model parameter as the final parameter of the model to be trained .
可选地,所述装置还包括:Optionally, the device further includes:
获取解密模块,用于在所述解密检测模块检测到所述待训练模型处于未收敛状态后,获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值;Acquiring a decryption module, for acquiring an encrypted gradient value corresponding to the loss value sent by the second terminal and decrypting the gradient value after the decryption detection module detects that the model to be trained is in an unconverged state;
更新模块,用于根据解密后的所述梯度值对所述第一加密模型参数进行更新,得到第三加密模型参数;An update module, configured to update the first encryption model parameter according to the decrypted gradient value to obtain a third encryption model parameter;
第二发送模块,用于发送所述第三加密模型参数至所述第二终端,以使所述第二终端根据所述第三加密模型参数继续训练所述待训练模型并计算第二加密损失值;A second sending module, configured to send the third encryption model parameter to the second terminal, so that the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate a second encryption loss value;
第一获取模块,用于获取所述第二终端发送的所述第二加密损失值,并发送所述第二加密损失值至所述解密检测模块。The first obtaining module is configured to obtain the second encrypted loss value sent by the second terminal, and send the second encrypted loss value to the decryption detection module.
可选地,所述装置还包括:Optionally, the device further includes:
第三发送模块,用于在所述解密检测模块检测到所述待训练模型处于未收敛状态后,发送继续训练指令至所述第二终端,以使所述第二终端在接收到所述继续训练指令后,根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新以获取第三加密模型参数,所述第二终端根据所述第三加密模型参数继续训练所述待训练模型并计算第二加密损失值;A third sending module, configured to send a continuation training instruction to the second terminal after the decryption detection module detects that the model to be trained is in an unconverged state, so that the second terminal receives the continuation After the training instruction, the first encryption model parameter is updated according to the encryption gradient value corresponding to the loss value to obtain the third encryption model parameter, and the second terminal continues to train the third encryption model parameter according to the third encryption model parameter To train the model and calculate the second encryption loss value;
第二获取模块,用于获取所述第二终端发送的所述第二加密损失值,并发送所述第二加密损失值至所述解密检测模块。The second obtaining module is configured to obtain the second encrypted loss value sent by the second terminal, and send the second encrypted loss value to the decryption detection module.
可选地,所述装置还包括:Optionally, the device further includes:
第二接收模块,用于接收所述第二终端发送的所述第二加密模型参数以及针对于所述第二加密模型参数的解密请求;A second receiving module, configured to receive the second encryption model parameter and the decryption request for the second encryption model parameter sent by the second terminal;
第一解密模块,用于响应于所述解密请求,解密所述第二加密模型参数,并将解密后的所述第二加密模型参数发送至所述第二终端。The first decryption module is configured to decrypt the second encryption model parameter in response to the decryption request, and send the decrypted second encryption model parameter to the second terminal.
可选地,所述装置还包括:Optionally, the device further includes:
第三接收模块,用于接收所述第二终端基于所述第二加密模型参数获得的加密预测结果以及针对于所述加密预测结果的解密请求;A third receiving module, configured to receive an encrypted prediction result obtained by the second terminal based on the second encryption model parameters and a decryption request for the encrypted prediction result;
第二解密模块,用于响应于所述解密请求,解密所述预测结果,并将解密后的所述预测结果发送至所述第二终端。The second decryption module is configured to decrypt the prediction result in response to the decryption request, and send the decrypted prediction result to the second terminal.
本实施例提出的基于联邦学习的模型参数训练装置各个模块运行时实现如上所述的基于联邦学习的模型参数训练方法的步骤,在此不再赘述。The steps of the model parameter training device based on federation learning proposed in this embodiment implement the steps of the model parameter training method based on federation learning as described above, and will not be repeated here.
此外,本申请实施例还提出一种基于联邦学习的模型参数训练设备,所述设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的基于联邦学习的模型参数训练可读指令,所述基于联邦学习的模型参数训练可读指令被所述处理器执行时实现如上所述的基于联邦学习的模型参数训练方法的步骤。In addition, an embodiment of the present application also provides a model parameter training device based on federation learning, the device includes: a memory, a processor, and a model based on federation learning stored on the memory and operable on the processor Parameter training readable instruction, the model parameter training readable instruction based on federation learning implements the steps of the model parameter training method based on federation learning described above when executed by the processor.
其中,在所述处理器上运行的基于联邦学习的模型参数训练可读指令被执行时所实现的方法可参照本申请基于联邦学习的模型参数训练方法各个实施例,此处不再赘述。
For the method implemented when the model parameter training readable instruction based on federation learning running on the processor is executed, reference may be made to various embodiments of the model parameter training method based on federation learning in the present application, and details are not described here.
The
此外,本申请实施例还提出一种计算机可读存储介质,所述存储介质上存储有基于联邦学习的模型参数训练可读指令,所述基于联邦学习的模型参数训练可读指令被处理器执行时实现如上所述的基于联邦学习的模型参数训练方法的步骤。In addition, an embodiment of the present application further proposes a computer-readable storage medium on which is stored a model parameter training readable instruction based on federal learning, and the model parameter training readable instruction based on federal learning is executed by a processor To implement the steps of the model parameter training method based on federated learning as described above.
其中,在所述处理器上运行的基于联邦学习的模型参数训练可读指令被执行时所实现的方法可参照本申请基于联邦学习的模型参数训练方法各个实施例,此处不再赘述。For the method implemented when the model parameter training readable instruction based on federation learning running on the processor is executed, reference may be made to various embodiments of the model parameter training method based on federation learning in the present application, and details are not described here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, It also includes other elements that are not explicitly listed, or include elements inherent to this process, method, article, or device. Without more restrictions, the element defined by the sentence "include one..." does not exclude that there are other identical elements in the process, method, article or device that includes the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The sequence numbers of the above embodiments of the present application are for description only, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods in the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware, but in many cases the former is better Implementation. Based on this understanding, the technical solutions of the present application can essentially be reflected in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, The CD-ROM includes several instructions to enable a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to perform the methods described in the embodiments of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only preferred embodiments of the present application, and do not limit the scope of the patent of the present application. Any equivalent structure or equivalent process transformation made by the description and drawings of this application, or directly or indirectly used in other related technical fields The same reason is included in the patent protection scope of this application.
Claims (20)
- 一种基于联邦学习的模型参数训练方法,其中,应用于第一终端,所述基于联邦学习的模型参数训练方法包括以下步骤: A model parameter training method based on federation learning, which is applied to a first terminal, and the model parameter training method based on federation learning includes the following steps:发送第一加密模型参数至第二终端,所述第一加密模型参数为所述第一终端根据所述第一终端的第一样本训练得到;Sending a first encryption model parameter to a second terminal, where the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;接收所述第二终端发送的第一加密损失值,其中,所述第二终端以所述第一加密模型参数作为待训练模型的初始参数,根据所述第二终端的第二样本训练所述待训练模型,并计算得到所述第一加密损失值;所述第一样本与所述第二样本具有相同的特征维度;Receiving a first encryption loss value sent by the second terminal, wherein the second terminal uses the first encryption model parameter as an initial parameter of the model to be trained, and trains the second terminal according to a second sample of the second terminal The model to be trained, and the first encryption loss value is calculated; the first sample and the second sample have the same feature dimension;解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态;Decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value;若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数。If it is detected that the model to be trained is in a convergence state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained.
- 如权利要求1所述的基于联邦学习的模型参数训练方法,其中,所述若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数的步骤包括:The model parameter training method based on federated learning according to claim 1, wherein, if it is detected that the model to be trained is in a converged state, the second encryption model parameter determined based on the loss value is used as the target The steps to train the final parameters of the model include:若检测到所述待训练模型处于收敛状态,则获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值;If it is detected that the model to be trained is in a converged state, obtain an encrypted gradient value corresponding to the loss value sent by the second terminal, and decrypt the gradient value;根据解密后的所述梯度值对所述第一加密模型参数进行更新,得到第二加密模型参数;Updating the first encryption model parameter according to the decrypted gradient value to obtain a second encryption model parameter;将所述第二加密模型参数作为所述待训练模型的最终参数发送至所述第二终端。Sending the second encryption model parameter to the second terminal as the final parameter of the model to be trained.
- 如权利要求1所述的基于联邦学习的模型参数训练方法,其中,所述若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数的步骤包括:The model parameter training method based on federated learning according to claim 1, wherein, if it is detected that the model to be trained is in a converged state, the second encryption model parameter determined based on the loss value is used as the target The steps to train the final parameters of the model include:若检测到所述待训练模型处于收敛状态,则发送停止训练指令至所述第二终端,以使所述第二终端在接收到所述停止训练指令后,根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新以获取第二加密模型参数,并将所述第二加密模型参数作为所述待训练模型的最终参数。If it is detected that the model to be trained is in a convergent state, a training stop instruction is sent to the second terminal, so that after receiving the training stop instruction, the second terminal uses the encryption corresponding to the loss value The gradient value updates the first encryption model parameter to obtain the second encryption model parameter, and uses the second encryption model parameter as the final parameter of the model to be trained.
- 如权利要求1所述的基于联邦学习的模型参数训练方法,其中,所述解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态的步骤之后还包括:The model parameter training method based on federation learning according to claim 1, wherein the step of decrypting the loss value and detecting whether the model to be trained is in a converged state according to the decrypted loss value further comprises :若检测到所述待训练模型处于未收敛状态,则获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值;If it is detected that the model to be trained is in an unconverged state, obtain an encrypted gradient value corresponding to the loss value sent by the second terminal, and decrypt the gradient value;根据解密后的所述梯度值对所述第一加密模型参数进行更新,得到第三加密模型参数;Updating the first encryption model parameter according to the decrypted gradient value to obtain a third encryption model parameter;发送所述第三加密模型参数至所述第二终端,以使所述第二终端根据所述第三加密模型参数继续训练所述待训练模型并计算第二加密损失值;Sending the third encryption model parameter to the second terminal, so that the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate a second encryption loss value;获取所述第二终端发送的所述第二加密损失值,并进入步骤:Obtain the second encrypted loss value sent by the second terminal, and enter the step:解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态。Decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value.
- 如权利要求1所述的基于联邦学习的模型参数训练方法,其特征在The method for training model parameters based on federated learning according to claim 1, characterized in that于,所述解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态的步骤之后还包括:After the step of decrypting the loss value and detecting whether the model to be trained is in a converged state according to the decrypted loss value, the method further includes:若检测到所述待训练模型处于未收敛状态,则发送继续训练指令至所述第二终端,以使所述第二终端在接收到所述继续训练指令后,根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新以获取第三加密模型参数,所述第二终端根据所述第三加密模型参数继续训练所述待训练模型并计算第二加密损失值;If it is detected that the model to be trained is in an unconverged state, a continuous training instruction is sent to the second terminal, so that after receiving the continuous training instruction, the second terminal according to the loss value The encryption gradient value updates the first encryption model parameter to obtain a third encryption model parameter, and the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate a second encryption loss value;获取所述第二终端发送的所述第二加密损失值,并进入步骤:Obtain the second encrypted loss value sent by the second terminal, and enter the step:解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态。Decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value.
- 如权利要求1所述的基于联邦学习的模型参数训练方法,其中,所述若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数步骤之后还包括:The model parameter training method based on federated learning according to claim 1, wherein, if it is detected that the model to be trained is in a converged state, the second encryption model parameter determined based on the loss value is used as the target After the final parameter step of training the model also includes:接收所述第二终端发送的所述第二加密模型参数以及针对于所述第二加密模型参数的解密请求;Receiving the second encryption model parameter and the decryption request for the second encryption model parameter sent by the second terminal;响应于所述解密请求,解密所述第二加密模型参数,并将解密后的所述第二加密模型参数发送至所述第二终端。In response to the decryption request, decrypt the second encryption model parameter, and send the decrypted second encryption model parameter to the second terminal.
- 如权利要求1所述的基于联邦学习的模型参数训练方法,其中,所述若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数步骤之后还包括:The model parameter training method based on federated learning according to claim 1, wherein, if it is detected that the model to be trained is in a converged state, the second encryption model parameter determined based on the loss value is used as the target After the final parameter step of training the model also includes:接收所述第二终端基于所述第二加密模型参数获得的加密预测结果以及针对于所述加密预测结果的解密请求;Receiving an encryption prediction result obtained by the second terminal based on the second encryption model parameter and a decryption request for the encryption prediction result;响应于所述解密请求,解密所述预测结果,并将解密后的所述预测结果发送至所述第二终端。In response to the decryption request, decrypt the prediction result, and send the decrypted prediction result to the second terminal.
- 一种基于联邦学习的模型参数训练装置,其中,所述装置设于第一终端,所述装置包括:A model parameter training device based on federal learning, wherein the device is provided at a first terminal, and the device includes:第一发送模块,用于发送第一加密模型参数至第二终端,所述第一加密模型参数为所述第一终端根据所述第一终端的第一样本训练得到;A first sending module, configured to send a first encryption model parameter to a second terminal, where the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;第一接收模块,用于接收所述第二终端发送的第一加密损失值,其中,所述第二终端以所述第一加密模型参数作为待训练模型的初始参数,根据所述第二终端的第二样本训练所述待训练模型,并计算得到所述第一加密损失值;所述第一样本与所述第二样本具有相同的特征维度;A first receiving module, configured to receive a first encryption loss value sent by the second terminal, wherein the second terminal uses the first encryption model parameter as an initial parameter of the model to be trained, according to the second terminal Of the second sample to train the model to be trained and calculate the first encryption loss value; the first sample and the second sample have the same feature dimension;解密检测模块,用于解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态;A decryption detection module, used to decrypt the loss value and detect whether the model to be trained is in a converged state according to the decrypted loss value;确定模块,用于在所述解密检测模块检测到所述待训练模型处于收敛状态后,将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数。The determining module is configured to use the second encryption model parameter determined based on the loss value as the final parameter of the model to be trained after the decryption detection module detects that the model to be trained is in a convergence state.
- 如权利要求8所述的基于联邦学习的模型参数训练装置,其中,所述确定模块包括:The model parameter training device based on federal learning according to claim 8, wherein the determination module comprises:获取解密单元,用于在所述解密检测模块检测到所述待训练模型处于收敛状态后,获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值;An acquisition and decryption unit for acquiring an encryption gradient value corresponding to the loss value sent by the second terminal and decrypting the gradient value after the decryption detection module detects that the model to be trained is in a convergence state;更新单元,用于根据解密后的所述梯度值对所述第一加密模型参数进行更新,得到第二加密模型参数;An updating unit, configured to update the first encryption model parameter according to the decrypted gradient value to obtain a second encryption model parameter;第一确定单元,用于将所述第二加密模型参数作为所述待训练模型的最终参数发送至所述第二终端。The first determining unit is configured to send the second encryption model parameter to the second terminal as the final parameter of the model to be trained.
- 如权利要求8所述的基于联邦学习的模型参数训练装置,其中,所述确定模块包括:The model parameter training device based on federal learning according to claim 8, wherein the determination module comprises:第二确定单元,用于在所述解密检测模块检测到所述待训练模型处于收敛状态后,发送停止训练指令至所述第二终端,以使所述第二终端在接收到所述停止训练指令后,根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新以获取第二加密模型参数,并将所述第二加密模型参数作为所述待训练模型的最终参数。A second determining unit, configured to send a training stop instruction to the second terminal after the decryption detection module detects that the model to be trained is in a convergence state, so that the second terminal receives the training stop After the instruction, update the first encryption model parameter according to the encryption gradient value corresponding to the loss value to obtain the second encryption model parameter, and use the second encryption model parameter as the final parameter of the model to be trained .
- 如权利要求8所述的基于联邦学习的模型参数训练装置,其中,所述装置还包括:The apparatus for training model parameters based on federal learning according to claim 8, wherein the apparatus further comprises:获取解密模块,用于在所述解密检测模块检测到所述待训练模型处于未收敛状态后,获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值;Acquiring a decryption module, for acquiring an encrypted gradient value corresponding to the loss value sent by the second terminal and decrypting the gradient value after the decryption detection module detects that the model to be trained is in an unconverged state;更新模块,用于根据解密后的所述梯度值对所述第一加密模型参数进行更新,得到第三加密模型参数;An update module, configured to update the first encryption model parameter according to the decrypted gradient value to obtain a third encryption model parameter;第二发送模块,用于发送所述第三加密模型参数至所述第二终端,以使所述第二终端根据所述第三加密模型参数继续训练所述待训练模型并计算第二加密损失值;A second sending module, configured to send the third encryption model parameter to the second terminal, so that the second terminal continues to train the model to be trained according to the third encryption model parameter and calculate a second encryption loss value;第一获取模块,用于获取所述第二终端发送的所述第二加密损失值,并发送所述第二加密损失值至所述解密检测模块。The first obtaining module is configured to obtain the second encrypted loss value sent by the second terminal, and send the second encrypted loss value to the decryption detection module.
- 如权利要求8所述的基于联邦学习的模型参数训练装置,其特征在The model parameter training device based on federal learning as claimed in claim 8, characterized in that于,所述装置还包括:Therefore, the device further includes:第三发送模块,用于在所述解密检测模块检测到所述待训练模型处于未收敛状态后,发送继续训练指令至所述第二终端,以使所述第二终端在接收到所述继续训练指令后,根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新以获取第三加密模型参数,所述第二终端根据所述第三加密模型参数继续训练所述待训练模型并计算第二加密损失值;A third sending module, configured to send a continuation training instruction to the second terminal after the decryption detection module detects that the model to be trained is in an unconverged state, so that the second terminal receives the continuation After the training instruction, the first encryption model parameter is updated according to the encryption gradient value corresponding to the loss value to obtain the third encryption model parameter, and the second terminal continues to train the third encryption model parameter according to the third encryption model parameter To train the model and calculate the second encryption loss value;第二获取模块,用于获取所述第二终端发送的所述第二加密损失值,并发送所述第二加密损失值至所述解密检测模块。The second obtaining module is configured to obtain the second encrypted loss value sent by the second terminal, and send the second encrypted loss value to the decryption detection module.
- 如权利要求8所述的基于联邦学习的模型参数训练装置,其中,所述装置还包括:The apparatus for training model parameters based on federal learning according to claim 8, wherein the apparatus further comprises:第二接收模块,用于接收所述第二终端发送的所述第二加密模型参数以及针对于所述第二加密模型参数的解密请求;A second receiving module, configured to receive the second encryption model parameter and the decryption request for the second encryption model parameter sent by the second terminal;第一解密模块,用于响应于所述解密请求,解密所述第二加密模型参数,并将解密后的所述第二加密模型参数发送至所述第二终端。The first decryption module is configured to decrypt the second encryption model parameter in response to the decryption request, and send the decrypted second encryption model parameter to the second terminal.
- 如权利要求8所述的基于联邦学习的模型参数训练装置,其中,所述装置还包括:The apparatus for training model parameters based on federal learning according to claim 8, wherein the apparatus further comprises:第三接收模块,用于接收所述第二终端基于所述第二加密模型参数获得的加密预测结果以及针对于所述加密预测结果的解密请求;A third receiving module, configured to receive an encrypted prediction result obtained by the second terminal based on the second encryption model parameters and a decryption request for the encrypted prediction result;第二解密模块,用于响应于所述解密请求,解密所述预测结果,并将解密后的所述预测结果发送至所述第二终端。The second decryption module is configured to decrypt the prediction result in response to the decryption request, and send the decrypted prediction result to the second terminal.
- 一种基于联邦学习的模型参数训练设备,其中,所述设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的基于联邦学习的模型参数训练可读指令,所述基于联邦学习的模型参数训练可读指令被所述处理器执行时实现下步骤:A model parameter training device based on federated learning, wherein the device includes: a memory, a processor, and readable instructions for model parameter training based on federated learning stored on the memory and runable on the processor, When the readable instruction for model parameter training based on federation learning is executed by the processor, the following steps are implemented:发送第一加密模型参数至第二终端,所述第一加密模型参数为所述第一终端根据所述第一终端的第一样本训练得到;Sending a first encryption model parameter to a second terminal, where the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;接收所述第二终端发送的第一加密损失值,其中,所述第二终端以所述第一加密模型参数作为待训练模型的初始参数,根据所述第二终端的第二样本训练所述待训练模型,并计算得到所述第一加密损失值;所述第一样本与所述第二样本具有相同的特征维度;Receiving a first encryption loss value sent by the second terminal, wherein the second terminal uses the first encryption model parameter as an initial parameter of the model to be trained, and trains the second terminal according to a second sample of the second terminal The model to be trained, and the first encryption loss value is calculated; the first sample and the second sample have the same feature dimension;解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态;Decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value;若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数。If it is detected that the model to be trained is in a convergence state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained.
- 如权利要求15所示的基于联邦学习的模型参数训练设备,其中,所述若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数的步骤包括:The model parameter training device based on federal learning according to claim 15, wherein, if it is detected that the model to be trained is in a convergence state, the second encryption model parameter determined based on the loss value is used as the target The steps to train the final parameters of the model include:若检测到所述待训练模型处于收敛状态,则获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值;If it is detected that the model to be trained is in a converged state, obtain an encrypted gradient value corresponding to the loss value sent by the second terminal, and decrypt the gradient value;根据解密后的所述梯度值对所述第一加密模型参数进行更新,得到第二加密模型参数;Updating the first encryption model parameter according to the decrypted gradient value to obtain a second encryption model parameter;将所述第二加密模型参数作为所述待训练模型的最终参数发送至所述第二终端。Sending the second encryption model parameter to the second terminal as the final parameter of the model to be trained.
- 如权利要求15所示的基于联邦学习的模型参数训练设备,其中,所述若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数的步骤包括:The model parameter training device based on federal learning according to claim 15, wherein, if it is detected that the model to be trained is in a converged state, the second encryption model parameter determined based on the loss value is used as the target The steps to train the final parameters of the model include:若检测到所述待训练模型处于收敛状态,则发送停止训练指令至所述第二终端,以使所述第二终端在接收到所述停止训练指令后,根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新以获取第二加密模型参数,并将所述第二加密模型参数作为所述待训练模型的最终参数。If it is detected that the model to be trained is in a convergent state, a training stop instruction is sent to the second terminal, so that after receiving the training stop instruction, the second terminal uses the encryption corresponding to the loss value The gradient value updates the first encryption model parameter to obtain the second encryption model parameter, and uses the second encryption model parameter as the final parameter of the model to be trained.
- 一种存储介质,其中,应用于计算机,所述存储介质上存储有基于联邦学习的模型参数训练可读指令,所述基于联邦学习的模型参数训练可读指令被处理器执行时实现如下步骤:A storage medium, wherein it is applied to a computer, and the storage medium stores model parameter training readable instructions based on federated learning, and the model parameters training readable instructions based on federated learning implement the following steps when executed by a processor:发送第一加密模型参数至第二终端,所述第一加密模型参数为所述第一终端根据所述第一终端的第一样本训练得到;Sending a first encryption model parameter to a second terminal, where the first encryption model parameter is obtained by training the first terminal according to the first sample of the first terminal;接收所述第二终端发送的第一加密损失值,其中,所述第二终端以所述第一加密模型参数作为待训练模型的初始参数,根据所述第二终端的第二样本训练所述待训练模型,并计算得到所述第一加密损失值;所述第一样本与所述第二样本具有相同的特征维度;Receiving a first encryption loss value sent by the second terminal, wherein the second terminal uses the first encryption model parameter as an initial parameter of the model to be trained, and trains the second terminal according to a second sample of the second terminal The model to be trained, and the first encryption loss value is calculated; the first sample and the second sample have the same feature dimension;解密所述损失值,并根据解密后的所述损失值检测所述待训练模型是否处于收敛状态;Decrypt the loss value, and detect whether the model to be trained is in a converged state according to the decrypted loss value;若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数。If it is detected that the model to be trained is in a convergence state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained.
- 如权利要求18所述的存储介质,其中,所述若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数的步骤包括:The storage medium according to claim 18, wherein if it is detected that the model to be trained is in a convergence state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained The steps include:若检测到所述待训练模型处于收敛状态,则获取所述第二终端发送的与所述损失值对应的加密梯度值,解密所述梯度值;If it is detected that the model to be trained is in a converged state, obtain an encrypted gradient value corresponding to the loss value sent by the second terminal, and decrypt the gradient value;根据解密后的所述梯度值对所述第一加密模型参数进行更新,得到第二加密模型参数;Updating the first encryption model parameter according to the decrypted gradient value to obtain a second encryption model parameter;将所述第二加密模型参数作为所述待训练模型的最终参数发送至所述第二终端。Sending the second encryption model parameter to the second terminal as the final parameter of the model to be trained.
- 如权利要求18所述的存储介质,其中,所述若检测到所述待训练模型处于收敛状态,则将基于所述损失值确定的第二加密模型参数作为所述待训练模型的最终参数的步骤包括:The storage medium according to claim 18, wherein if it is detected that the model to be trained is in a convergence state, the second encryption model parameter determined based on the loss value is used as the final parameter of the model to be trained The steps include:若检测到所述待训练模型处于收敛状态,则发送停止训练指令至所述第二终端,以使所述第二终端在接收到所述停止训练指令后,根据与所述损失值对应的加密梯度值对所述第一加密模型参数进行更新以获取第二加密模型参数,并将所述第二加密模型参数作为所述待训练模型的最终参数。 If it is detected that the model to be trained is in a convergent state, a training stop instruction is sent to the second terminal, so that after receiving the training stop instruction, the second terminal uses the encryption corresponding to the loss value The gradient value updates the first encryption model parameter to obtain the second encryption model parameter, and uses the second encryption model parameter as the final parameter of the model to be trained. The
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811547471.9A CN109635462A (en) | 2018-12-17 | 2018-12-17 | Model parameter training method, device, equipment and medium based on federation's study |
CN201811547471.9 | 2018-12-17 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020125251A1 true WO2020125251A1 (en) | 2020-06-25 |
Family
ID=66074956
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/116082 WO2020125251A1 (en) | 2018-12-17 | 2019-11-06 | Federated learning-based model parameter training method, device, apparatus, and medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109635462A (en) |
WO (1) | WO2020125251A1 (en) |
Families Citing this family (34)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109635462A (en) * | 2018-12-17 | 2019-04-16 | 深圳前海微众银行股份有限公司 | Model parameter training method, device, equipment and medium based on federation's study |
CN110210233B (en) * | 2019-04-19 | 2024-05-24 | 平安科技(深圳)有限公司 | Combined construction method and device of prediction model, storage medium and computer equipment |
CN110288094B (en) * | 2019-06-10 | 2020-12-18 | 深圳前海微众银行股份有限公司 | Model parameter training method and device based on federal learning |
CN110276210B (en) * | 2019-06-12 | 2021-04-23 | 深圳前海微众银行股份有限公司 | Method and device for determining model parameters based on federal learning |
CN110263908B (en) * | 2019-06-20 | 2024-04-02 | 深圳前海微众银行股份有限公司 | Federal learning model training method, apparatus, system and storage medium |
CN110263921B (en) * | 2019-06-28 | 2021-06-04 | 深圳前海微众银行股份有限公司 | Method and device for training federated learning model |
CN112149174B (en) * | 2019-06-28 | 2024-03-12 | 北京百度网讯科技有限公司 | Model training method, device, equipment and medium |
CN110298185A (en) * | 2019-06-28 | 2019-10-01 | 北京金山安全软件有限公司 | Model training method and device, electronic equipment and storage medium |
CN112182635B (en) * | 2019-07-03 | 2024-02-23 | 北京百度网讯科技有限公司 | Method, device, equipment and medium for realizing joint modeling |
CN112183757B (en) * | 2019-07-04 | 2023-10-27 | 创新先进技术有限公司 | Model training method, device and system |
EP3767511B1 (en) * | 2019-07-19 | 2021-08-25 | Siemens Healthcare GmbH | Securely performing parameter data updates |
CN110379407B (en) * | 2019-07-22 | 2021-10-19 | 出门问问(苏州)信息科技有限公司 | Adaptive speech synthesis method, device, readable storage medium and computing equipment |
CN110378749B (en) * | 2019-07-25 | 2023-09-26 | 深圳前海微众银行股份有限公司 | Client similarity evaluation method and device, terminal equipment and storage medium |
CN110399742B (en) * | 2019-07-29 | 2020-12-18 | 深圳前海微众银行股份有限公司 | Method and device for training and predicting federated migration learning model |
CN110490738A (en) * | 2019-08-06 | 2019-11-22 | 深圳前海微众银行股份有限公司 | A kind of federal learning method of mixing and framework |
CN110442457A (en) * | 2019-08-12 | 2019-11-12 | 北京大学深圳研究生院 | Model training method, device and server based on federation's study |
CN110705627A (en) * | 2019-09-26 | 2020-01-17 | 深圳前海微众银行股份有限公司 | Target detection method, target detection system, target detection device and readable storage medium |
CN112699990B (en) * | 2019-10-22 | 2024-06-07 | 杭州海康威视数字技术股份有限公司 | Neural network model training method and device and electronic equipment |
CN110797124B (en) * | 2019-10-30 | 2024-04-12 | 腾讯科技(深圳)有限公司 | Model multiterminal collaborative training method, medical risk prediction method and device |
CN110851869B (en) * | 2019-11-14 | 2023-09-19 | 深圳前海微众银行股份有限公司 | Sensitive information processing method, device and readable storage medium |
US11588621B2 (en) | 2019-12-06 | 2023-02-21 | International Business Machines Corporation | Efficient private vertical federated learning |
CN110955907B (en) * | 2019-12-13 | 2022-03-25 | 支付宝(杭州)信息技术有限公司 | Model training method based on federal learning |
CN111062056B (en) * | 2019-12-13 | 2022-03-15 | 支付宝(杭州)信息技术有限公司 | Private data protection modeling method, system and device based on transfer learning |
CN111160961B (en) * | 2019-12-20 | 2023-10-17 | 深圳前海微众银行股份有限公司 | Information recommendation method and device |
CN112668016B (en) * | 2020-01-02 | 2023-12-08 | 华控清交信息科技(北京)有限公司 | Model training method and device and electronic equipment |
US11948096B2 (en) | 2020-03-13 | 2024-04-02 | International Business Machines Corporation | Adaptively adjusting influence in federated learning model updates |
US11645582B2 (en) | 2020-03-27 | 2023-05-09 | International Business Machines Corporation | Parameter sharing in federated learning |
CN111598254B (en) * | 2020-05-22 | 2021-10-08 | 深圳前海微众银行股份有限公司 | Federal learning modeling method, device and readable storage medium |
CN112132277A (en) * | 2020-09-21 | 2020-12-25 | 平安科技(深圳)有限公司 | Federal learning model training method and device, terminal equipment and storage medium |
CN112417478B (en) * | 2020-11-24 | 2024-06-14 | 深圳前海微众银行股份有限公司 | Data processing method, device, equipment and storage medium |
CN112836767B (en) * | 2021-03-03 | 2024-07-12 | 深圳前海微众银行股份有限公司 | Federal modeling method, apparatus, device, storage medium, and program product |
CN113239023A (en) * | 2021-04-20 | 2021-08-10 | 浙江大学德清先进技术与产业研究院 | Remote sensing data-oriented federal learning model training method |
CN113378198B (en) * | 2021-06-24 | 2022-04-15 | 深圳市洞见智慧科技有限公司 | Federal training system, method and device for model for protecting user identification |
CN113239391B (en) * | 2021-07-13 | 2023-01-10 | 深圳市洞见智慧科技有限公司 | Third-party-free logistic regression federal learning model training system and method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160098633A1 (en) * | 2014-10-02 | 2016-04-07 | Nec Laboratories America, Inc. | Deep learning model for structured outputs with high-order interaction |
CN107633242A (en) * | 2017-10-23 | 2018-01-26 | 广州视源电子科技股份有限公司 | Network model training method, device, equipment and storage medium |
CN108364018A (en) * | 2018-01-25 | 2018-08-03 | 北京墨丘科技有限公司 | A kind of guard method of labeled data, terminal device and system |
CN108491928A (en) * | 2018-03-29 | 2018-09-04 | 腾讯科技(深圳)有限公司 | Model parameter training method, device, server and storage medium |
CN108805185A (en) * | 2018-05-29 | 2018-11-13 | 腾讯科技(深圳)有限公司 | Training method, device, storage medium and the computer equipment of model |
CN109635462A (en) * | 2018-12-17 | 2019-04-16 | 深圳前海微众银行股份有限公司 | Model parameter training method, device, equipment and medium based on federation's study |
-
2018
- 2018-12-17 CN CN201811547471.9A patent/CN109635462A/en active Pending
-
2019
- 2019-11-06 WO PCT/CN2019/116082 patent/WO2020125251A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160098633A1 (en) * | 2014-10-02 | 2016-04-07 | Nec Laboratories America, Inc. | Deep learning model for structured outputs with high-order interaction |
CN107633242A (en) * | 2017-10-23 | 2018-01-26 | 广州视源电子科技股份有限公司 | Network model training method, device, equipment and storage medium |
CN108364018A (en) * | 2018-01-25 | 2018-08-03 | 北京墨丘科技有限公司 | A kind of guard method of labeled data, terminal device and system |
CN108491928A (en) * | 2018-03-29 | 2018-09-04 | 腾讯科技(深圳)有限公司 | Model parameter training method, device, server and storage medium |
CN108805185A (en) * | 2018-05-29 | 2018-11-13 | 腾讯科技(深圳)有限公司 | Training method, device, storage medium and the computer equipment of model |
CN109635462A (en) * | 2018-12-17 | 2019-04-16 | 深圳前海微众银行股份有限公司 | Model parameter training method, device, equipment and medium based on federation's study |
Also Published As
Publication number | Publication date |
---|---|
CN109635462A (en) | 2019-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020125251A1 (en) | Federated learning-based model parameter training method, device, apparatus, and medium | |
WO2020029585A1 (en) | Neural network federation modeling method and device employing transfer learning, and storage medium | |
WO2021056760A1 (en) | Federated learning data encryption method, apparatus and device, and readable storage medium | |
WO2014040501A1 (en) | Method and system for generating and authorizing dynamic password | |
WO2020224246A1 (en) | Block chain-based data management method and apparatus, device and storage medium | |
WO2021092973A1 (en) | Sensitive information processing method and device, and readable storage medium | |
WO2020147383A1 (en) | Process examination and approval method, device and system employing blockchain system, and non-volatile storage medium | |
WO2018076865A1 (en) | Data sharing method, device, storage medium, and electronic device | |
WO2013025085A2 (en) | Apparatus and method for supporting family cloud in cloud computing system | |
WO2018076841A1 (en) | Data sharing method, apparatus, storage medium and server | |
WO2017071363A1 (en) | Password sharing method, password sharing system, and terminal device | |
WO2020147385A1 (en) | Data entry method and apparatus, terminal and computer-readable storage medium | |
WO2018090823A1 (en) | Method and system for protecting system partition key data, and terminal | |
WO2020186775A1 (en) | Service data providing method, apparatus and device, and computer-readable storage medium | |
WO2020087981A1 (en) | Method and apparatus for generating risk control audit model, device and readable storage medium | |
WO2019139420A1 (en) | Electronic device, server, and control method therefor | |
WO2020062615A1 (en) | Gamma value adjustment method and apparatus for display panel, and display device | |
WO2022255529A1 (en) | Learning method for generating lip-sync video on basis of machine learning and lip-sync video generating device for executing same | |
WO2020114184A1 (en) | Joint modeling method, apparatus and device, and computer-readable storage medium | |
WO2020114333A1 (en) | Video-based ar education method, smart television, storage medium, and device | |
WO2021027134A1 (en) | Data storage method, apparatus and device and computer storage medium | |
WO2016192589A1 (en) | Information transmission method, apparatus and system | |
WO2018053904A1 (en) | Information processing method and terminal | |
WO2017016272A1 (en) | Method, apparatus and system for processing virtual resource data | |
WO2019112117A1 (en) | Method and computer program for inferring meta information of text content creator |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19899133 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19899133 Country of ref document: EP Kind code of ref document: A1 |