WO2020177392A1 - 基于联邦学习的模型参数训练方法、装置、设备及介质 - Google Patents

基于联邦学习的模型参数训练方法、装置、设备及介质 Download PDF

Info

Publication number
WO2020177392A1
WO2020177392A1 PCT/CN2019/119227 CN2019119227W WO2020177392A1 WO 2020177392 A1 WO2020177392 A1 WO 2020177392A1 CN 2019119227 W CN2019119227 W CN 2019119227W WO 2020177392 A1 WO2020177392 A1 WO 2020177392A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
terminal
gradient
encryption
loss
Prior art date
Application number
PCT/CN2019/119227
Other languages
English (en)
French (fr)
Inventor
刘洋
陈天健
杨强
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Priority to EP19917861.7A priority Critical patent/EP3893170B1/en
Priority to SG11202108137PA priority patent/SG11202108137PA/en
Publication of WO2020177392A1 publication Critical patent/WO2020177392A1/zh
Priority to US17/349,175 priority patent/US20210312334A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/008Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • G06F21/6254Protecting personal data, e.g. for financial or medical purposes by anonymising data, e.g. decorrelating personal data from the owner's identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0891Revocation or update of secret information, e.g. encryption key update or rekeying
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/606Protecting data by securing the transmission between two devices or processes

Definitions

  • This application relates to the field of data processing technology, and in particular to a method, device, equipment and medium for training model parameters based on federated learning.
  • Machine learning is one of the core research areas of artificial intelligence, and how to continue machine learning while protecting data privacy and meeting legal compliance requirements is a trend in the field of machine learning. In this context, people The research puts forward the concept of "federal learning”.
  • Federated learning encrypts the model built using technical algorithms. Both parties of the federation can also perform model training to obtain model parameters without providing their own data. Federated learning protects user data privacy, data and the model itself through parameter exchange under the encryption mechanism It will not transmit or guess the other party’s data, so there is no possibility of leakage at the data level, nor will it violate more stringent data protection laws such as GDPR (General Data Protection Regulation, "General Data Protection Regulation”). While maintaining data integrity to a high degree, data privacy is guaranteed. However, the current federated learning technology must rely on a trusted third party to use the third party to aggregate and model the data of the federated parties, which makes the application of federated learning limited in some scenarios.
  • the main purpose of this application is to provide a model parameter training method, device, equipment and storage medium based on federated learning, aiming to achieve model training without a trusted third party and only using data from both federations to avoid application restrictions .
  • the model parameter training method based on federated learning includes:
  • the first terminal When the first terminal receives the encrypted second data sent by the second terminal, the first terminal obtains the loss encryption value and the first gradient encryption value according to the encrypted second data;
  • a second gradient value is obtained according to the random vector and the decrypted first gradient value, and the sample parameter corresponding to the second gradient value is determined as the Describe the model parameters of the model to be trained.
  • the model parameter training device based on federated learning includes:
  • a data acquisition module configured to, when the first terminal receives the encrypted second data sent by the second terminal, the first terminal obtains the loss encryption value and the first gradient encryption value according to the encrypted second data;
  • the first sending module is configured to randomly generate a random vector of the same dimension as the first gradient encryption value, blur the first gradient encryption value based on the random vector, and combine the blurred first gradient encryption value with Sending the lost encrypted value to the second terminal;
  • the model detection module is configured to, when receiving the decrypted first gradient value and loss value returned by the second terminal based on the blurred first gradient encryption value and the loss encryption value, according to the decrypted value The loss value of to detect whether the model to be trained is in a convergent state;
  • the parameter determination module is configured to, if it is detected that the model to be trained is in a convergent state, obtain a second gradient value according to the random vector and the decrypted first gradient value, and correspond to the second gradient value
  • the sample parameter of is determined as the model parameter of the model to be trained.
  • this application also provides a model parameter training device based on federated learning.
  • the model parameter training device based on federated learning includes: a memory, a processor, and a A model parameter training program based on federated learning running on the processor, and when the model parameter training program based on federated learning is executed by the processor, the steps of the model parameter training method based on federated learning as described above are implemented.
  • the present application also provides a storage medium that stores a model parameter training program based on federated learning.
  • the model parameter training program based on federated learning is executed by a processor to achieve the above The steps of the model parameter training method based on federated learning are described.
  • This application provides a method, device, equipment and medium for training model parameters based on federated learning.
  • the first terminal uses the encrypted second data Obtain the loss encryption value and the first gradient encryption value; randomly generate a random vector with the same dimension as the first gradient encryption value, blur the first gradient encryption value based on the random vector, and combine the blurred first gradient encryption value and
  • the loss encrypted value is sent to the second terminal; upon receiving the decrypted first gradient value and loss value returned by the second terminal based on the blurred first gradient encryption value and the loss encrypted value, according to the decrypted first gradient value and loss value
  • the loss value detects whether the model to be trained is in a convergent state; if it is detected that the model to be trained is in a convergent state, the first terminal obtains the second gradient value according to the random vector and the decrypted first gradient value, that is, removes the decrypted first gradient value.
  • a random vector in the gradient value is used to restore the true gradient value to obtain the second gradient value, and then the sample parameter corresponding to the second gradient value is determined as the model parameter of the model to be trained.
  • This application only uses the data transmission and calculation between the first terminal and the second terminal to finally obtain the loss value, and then determine the model parameters in the model to be trained. Model training can be performed without a reliable third party and only using data from both parties
  • the second data received by the first terminal in this application is the encrypted data of the intermediate result of the model.
  • the data in the communication process between the first terminal and the second terminal is encrypted and obfuscated. Therefore, this application The original feature data will not be leaked, and the same level of security assurance can be achieved, ensuring the privacy and security of terminal sample data.
  • FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the application;
  • FIG. 2 is a schematic flowchart of a first embodiment of a model parameter training method based on federated learning in this application;
  • step S10 is a schematic diagram of the detailed flow of step S10 in the first embodiment of the application.
  • FIG. 4 is a schematic flowchart of a second embodiment of a model parameter training method based on federated learning in this application;
  • FIG. 5 is a schematic flowchart of a third embodiment of a model parameter training method based on federated learning according to this application;
  • Fig. 6 is a schematic diagram of functional modules of a first embodiment of a model parameter training device based on federated learning in this application.
  • FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the application.
  • the model parameter training device based on federated learning in the embodiment of the present application may be a terminal device such as a smart phone, a PC (Personal Computer, personal computer), a tablet computer, a portable computer, and a server.
  • a terminal device such as a smart phone, a PC (Personal Computer, personal computer), a tablet computer, a portable computer, and a server.
  • the model parameter training device based on federated learning may include a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
  • the communication bus 1002 is used to implement connection and communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also 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 non-volatile memory (non-volatile memory), such as a magnetic disk memory.
  • the memory 1005 may also be a storage device independent of the foregoing processor 1001.
  • model parameter training device based on federated learning does not constitute a limitation on the model parameter training device based on federated learning, and may include more or fewer components than shown. Or combine certain components, or different component arrangements.
  • the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a model parameter training program based on federated learning.
  • the network interface 1004 is mainly used to connect to a back-end server and communicate with the back-end server;
  • the user interface 1003 is mainly used to connect to a client and communicate with the client;
  • the processor 1001 can be used to Call the model parameter training program based on federated learning stored in the memory 1005, and execute the following steps of the model parameter training method based on federated learning.
  • This application provides a model parameter training method based on federated learning.
  • FIG. 2 is a schematic flowchart of a first embodiment of a model parameter training method based on federated learning in this application.
  • the model parameter training method based on federated learning includes:
  • Step S10 When the first terminal receives the encrypted second data sent by the second terminal, the first terminal obtains the loss encryption value and the first gradient encryption value according to the encrypted second data;
  • the first terminal when the first terminal receives the encrypted second data sent by the second terminal, the first terminal obtains the loss encryption value and the first gradient encryption value according to the encrypted second data.
  • the first terminal and the second terminal may be terminal devices such as smart phones, personal computers, tablet computers, portable computers, and servers, and the second data is calculated by the second terminal based on its sample data and corresponding sample parameters, which is The intermediate result of the model, and then the second terminal encrypts the second data, can generate the public key and the private key through the key pair generation software, and then use the generated public key to encrypt the second data through the homomorphic encryption algorithm to obtain The encrypted second data to ensure the privacy and security of the transmitted data.
  • the method for acquiring the loss encryption value and the first gradient encryption value is: after the first terminal receives the second data sent by the second terminal, the first terminal acquires the first data corresponding to the second data, and The specimen label corresponding to the first data; then the loss value is calculated based on the first data, the encrypted second data, the sample label, and the preset loss function, using the public key of the second terminal (the second terminal will send its public key to The first terminal) encrypts the calculation factors of each calculated loss value through the homomorphic encryption algorithm to obtain the encrypted loss value, which is recorded as the loss encryption value; then the gradient function is obtained according to the preset loss function, and calculated according to the gradient function
  • the first gradient value is encrypted by using the public key of the second terminal to encrypt the first gradient value through a homomorphic encryption algorithm to obtain the encrypted first gradient value, which is recorded as the first gradient encryption value.
  • Step S20 randomly generating a random vector with the same dimension as the first gradient encryption value, blurring the first gradient encryption value based on the random vector, and encrypting the first gradient encryption value after the blur and the loss Value sent to the second terminal;
  • the first terminal randomly generates a random vector with the same dimension as the first gradient encryption value, and blurs the first gradient encryption value based on the random vector, that is, if the first gradient
  • the encrypted value is [[g]]]
  • the random vector is R
  • the first gradient encrypted value after blurring is [[g+R]]]
  • the second terminal receives the first gradient encryption value and the loss encryption value, it decrypts the first gradient encryption value and the loss encryption value with the private key of the second terminal to obtain the decrypted first gradient value And loss value.
  • Step S30 upon receiving the decrypted first gradient value and loss value returned by the second terminal based on the blurred first gradient encryption value and the loss encryption value, according to the decrypted loss value Check whether the model to be trained is in a state of convergence;
  • the first terminal When the first terminal receives the decrypted first gradient value and loss value returned by the second terminal based on the blurred first gradient encryption value and the loss encryption value, the first terminal detects whether the model to be trained is based on the decrypted loss value In a state of convergence.
  • the step of "detecting whether the model to be trained is in a convergent state according to the decrypted loss value" includes:
  • Step a1 Obtain the first loss value acquired by the first terminal last time, and record the decrypted loss value as the second loss value;
  • the first terminal After the first terminal obtains the decrypted loss value, the first terminal obtains the first loss value previously obtained by the first terminal, and records the decrypted loss value as the second loss value. It should be noted that when the model to be trained is not in a convergent state, the first terminal will continue to obtain the lost encrypted value according to the encrypted second data sent by the second terminal, and then send the lost encrypted value to the second terminal for decryption. Then, the decrypted loss value returned by the second terminal is received until the model to be trained is in a convergent state. The first loss value is also the loss value after decryption by the second terminal. It can be understood that the first loss value is the decrypted loss value sent by the second terminal last time, and the second loss value is the decrypted loss value currently sent by the second terminal.
  • Step a2 Calculate the difference between the first loss value and the second loss value, and determine whether the difference is less than or equal to a preset threshold;
  • the first terminal After the first terminal obtains the first loss value and the second loss value, the first terminal calculates the difference between the first loss value and the second loss value, and determines whether the difference is less than or equal to a preset threshold.
  • the specific value of the preset threshold can be set in advance according to specific needs, and there is no specific restriction on the value corresponding to the preset threshold in this embodiment.
  • Step a3 when the difference is less than or equal to a preset threshold, it is determined that the model to be trained is in a state of convergence;
  • Step a4 When the difference is greater than a preset threshold, it is determined that the model to be trained is not in a convergent state.
  • the first terminal determines that the model to be trained is in a convergent state; when determining that the difference is greater than the preset threshold, the first terminal determines that the model to be trained is not in a convergent state.
  • Step S40 if it is detected that the model to be trained is in a convergent state, a second gradient value is obtained according to the random vector and the decrypted first gradient value, and the sample parameter corresponding to the second gradient value Determined as the model parameters of the model to be trained.
  • the first terminal obtains the second gradient value according to the random vector and the decrypted first gradient value, that is, removes the random vector in the decrypted first gradient value to restore the real Gradient value, obtain the second gradient value, and then determine the sample parameter corresponding to the second gradient value as the model parameter of the model to be trained.
  • the embodiment of the application provides a model parameter training method based on federated learning.
  • the first terminal receives the encrypted second data sent by the second terminal, the first terminal obtains the lost encrypted value according to the encrypted second data And the first gradient encryption value; randomly generate a random vector with the same dimension as the first gradient encryption value, blur the first gradient encryption value based on the random vector, and then blur the first gradient encryption value and the loss encryption value Sent to the second terminal; upon receiving the decrypted first gradient value and loss value returned by the second terminal based on the blurred first gradient encryption value and the loss encryption value, the pending value is detected according to the decrypted loss value Whether the training model is in a convergent state; if it is detected that the model to be trained is in a convergent state, the first terminal will obtain the second gradient value according to the random vector and the decrypted first gradient value, that is, remove the decrypted first gradient value To restore the true gradient value to obtain the second gradient value, and then determine the sample parameter corresponding to the second
  • This application only uses the data transmission and calculation between the first terminal and the second terminal to finally obtain the loss value, and then determine the model parameters in the model to be trained. Model training can be performed without a reliable third party and only using data from both parties.
  • the second data received by the first terminal in this application is the encrypted data of the intermediate result of the model.
  • the data in the communication process between the first terminal and the second terminal is encrypted and obfuscated. Therefore, this application The original feature data will not be leaked, and the same level of security assurance can be achieved, ensuring the privacy and security of terminal sample data.
  • FIG. 3 is an example diagram of a detailed flow of step S10 in the first embodiment of this application.
  • step S10 includes:
  • Step S11 when the first terminal receives the encrypted second data sent by the second terminal, the first terminal obtains the corresponding first data and the sample label corresponding to the first data;
  • the first terminal after the first terminal receives the second data sent by the second terminal, the first terminal obtains the corresponding first data and the specimen tag corresponding to the first data.
  • the first data and the second data are the intermediate results of the model.
  • the first data is calculated by the first terminal based on its sample data and corresponding sample parameters
  • the second data is calculated by the second terminal based on its sample data and corresponding sample parameters.
  • the parameters are calculated.
  • the second data may be the sum of the product of the sample parameter in the second terminal and the corresponding variable value of the characteristic variable in the sample data of the second terminal intersection, and the square of the sum of the product.
  • the calculation formula corresponding to the original second data can be:
  • the square of the sum of products is expressed as: Among them, w 1 , w 2 ...w n represent the sample parameters corresponding to the second terminal, the number of variable values corresponding to the characteristic variables in the second terminal is equal to the number of sample parameters corresponding to the second terminal, that is, one variable value corresponds to one sample Parameters, x represents the characteristic value of the characteristic variable, 1,2...n represents the number of corresponding variable values and sample parameters. If there are three variable values for each feature variable in the second terminal intersection sample data, then It should be noted that the second data sent by the second terminal to the first terminal is encrypted second data.
  • the second terminal uses the public key of the second terminal to encrypt it through a homomorphic encryption algorithm.
  • the second data, the encrypted second data is obtained, and the encrypted first data is sent to the second terminal.
  • the second data sent to the first terminal that is, the encrypted second data can be expressed as [[u A ]] and
  • the process of calculating the first data by the first terminal is similar to the process of calculating the second data by the second terminal.
  • the formula for calculating the sum of the product of the product of the sample parameter in the first terminal and the corresponding variable value of the characteristic variable in the sample data of the first terminal is: Among them, w 1 , w 2 ...w n represent sample parameters corresponding to characteristic values of characteristic variables of each sample data in the first terminal.
  • Step S12 Calculate a loss value based on the first data, the encrypted second data, the sample label, and a preset loss function, and encrypt the loss value using a homomorphic encryption algorithm to obtain an encrypted loss value, Recorded as lost encrypted value;
  • the first terminal After the first terminal receives the encrypted second data and obtains the corresponding first data and its corresponding sample label, it calculates the loss based on the first data, the encrypted second data, the sample label and the preset loss function Value, and encrypt the loss value using a homomorphic encryption algorithm to obtain the encrypted loss value, which is recorded as the loss encrypted value.
  • the loss value is expressed as loss, among them, y represents the label value of the sample label corresponding to the first data.
  • the value of the label value corresponding to the sample label can be set according to specific needs. For example, in this embodiment, "0" and "1" can be used to indicate labels corresponding to different sample labels. value.
  • the first terminal uses the public key of the second terminal (the second terminal will send its public key to the first terminal), and encrypts each calculation factor of the calculated loss value through a homomorphic encryption algorithm. To get the loss value after encryption.
  • Step S13 Obtain a gradient function according to the preset loss function, calculate a first gradient value according to the gradient function, and encrypt the first gradient value using a homomorphic encryption algorithm to obtain the encrypted first gradient value, and record Make the first gradient encryption value.
  • the parameter server is adopted. Both the first terminal and the second terminal have independent parameter servers for aggregation and update synchronization of their respective sample data, while avoiding the leakage of their respective sample data, and The sample parameters corresponding to the first terminal and the second terminal, that is, the model parameters are stored separately, which improves the security of the data of the first terminal and the second terminal.
  • the loss value is calculated according to the received encrypted second data from the second terminal, the first data of the first terminal, and the sample label corresponding to the first data, and the homomorphic encryption algorithm is used to encrypt the loss value. Encryption is performed to obtain the loss encryption value, so that the first terminal cannot obtain the specific sample data of the second terminal in the process of calculating the loss value, so that the first terminal can calculate the model parameters in conjunction with the second terminal sample data.
  • the loss value required to calculate the model parameters is calculated on the basis of not exposing the sample data of the second terminal, which improves the privacy of the sample data of the second terminal in the process of calculating the model parameters.
  • the model parameter training method based on federated learning further includes:
  • Step S50 calculating an encryption intermediate result based on the encrypted second data and the first data, encrypting the encryption intermediate result by a preset public key, to obtain a double encryption intermediate result;
  • the first terminal can calculate the encrypted intermediate result according to the encrypted second data and the obtained first data, and then use the preset public The key encrypts the intermediate result of encryption to obtain the intermediate result of double encryption.
  • the preset public key is a public key generated by the first terminal according to the key pair generation software, and is the public key of the first terminal.
  • Step S60 sending the intermediate double encryption result to the second terminal, so that the second terminal calculates a double encryption gradient value based on the intermediate double encryption result;
  • the double encryption intermediate result is sent to the second terminal, so that the second terminal calculates the double encryption gradient value based on the double encryption intermediate result, and the second terminal sends the double encryption gradient value to the first terminal.
  • Step S70 upon receiving the double encryption gradient value returned by the second terminal, decrypt the double encryption gradient value by the private key corresponding to the preset public key, and encrypt the decrypted double encryption
  • the gradient value is sent to the second terminal, so that the second terminal decrypts the decrypted double encryption gradient value to obtain the gradient value of the second terminal.
  • the first terminal When the first terminal receives the double encryption gradient value returned by the second terminal, it decrypts the double encryption gradient value once through the private key corresponding to the preset public key (that is, the private key of the first terminal), and then decrypts the double encryption gradient value.
  • the double encryption gradient value of is sent to the second terminal, so that the second terminal uses its private key (that is, the private key of the second terminal) to decrypt the decrypted double encryption gradient value twice to obtain the gradient value of the second terminal , And then the second terminal can update the model parameters according to the gradient value of the second terminal.
  • the first data and the second data communicated between the first terminal and the second terminal are all encrypted data of the intermediate result of the model. There is no leakage of the original feature data, and other data transmission processes are also carried out. Encryption can train the model parameters of the second terminal and determine the model parameters of the second terminal while ensuring the privacy and security of terminal data.
  • the model parameter training method based on federated learning further includes:
  • Step S80 Receive the encrypted sample data sent by the second terminal, obtain the first part gradient value of the second terminal according to the encrypted sample data and the first data, and encrypt the first part using a homomorphic encryption algorithm The gradient value, the first part of the encrypted gradient value is obtained, which is recorded as the second gradient encrypted value;
  • the second terminal can send encrypted sample data to the first terminal, so that the first terminal calculates the partial gradient value of the second terminal according to the encrypted sample data .
  • the first terminal receives the encrypted sample data sent by the second terminal, and then obtains the first partial gradient value of the second terminal according to the encrypted sample data and the first data obtained according to the encrypted second data, and uses the first The public keys of the two terminals encrypt the first partial gradient value through a homomorphic encryption algorithm to obtain the encrypted first partial gradient value, which is recorded as the second gradient encryption value.
  • Step S90 Send the second gradient encryption value to the second terminal, so that the second terminal is based on the second gradient encryption value and a second partial gradient value calculated according to the second data, Obtain the gradient value of the second terminal.
  • the second gradient encryption value is sent to the second terminal, so that the second terminal obtains the gradient value of the second terminal based on the second gradient encryption value and the second partial gradient value calculated according to the second data.
  • the second terminal calculates the second partial gradient value according to the second data, and decrypts the received second gradient encrypted value at the same time to obtain the first partial gradient value, and then combines the first partial gradient value and the second partial gradient value
  • the gradient value of the second terminal is combined to obtain the gradient value of the second terminal, and the second terminal may update the model parameter according to the gradient value of the second terminal.
  • the first terminal obtains a part of the gradient of the second terminal (that is, the first part of the gradient value) through the received encrypted sample data sent by the second terminal, and then combines the encrypted first part of the gradient value (that is, the second The encrypted gradient value) is sent to the second terminal, so that after decryption by the second terminal, the first part of the gradient value is obtained, and then the first part of the gradient value and the second part of the gradient value (calculated locally by the second terminal) are combined.
  • To obtain the gradient value of the second terminal and then update the model parameters according to the gradient value of the second terminal.
  • this embodiment trains the model parameters of the second terminal to determine the model parameters of the second terminal. At the same time, since the data communicated by the first terminal and the second terminal are both encrypted, the terminal can be guaranteed Data privacy and security.
  • the same method as in the first embodiment may be used to calculate the gradient value of the second terminal.
  • the first terminal sends the encrypted first data to the second terminal, and when the second terminal receives the encrypted first data sent by the first terminal, the second terminal obtains the data according to the encrypted first data
  • the loss encryption value and gradient encryption value of the second terminal a random vector of the same dimension as the gradient encryption value of the second terminal is randomly generated, and the gradient encryption value of the second terminal is blurred based on the random vector, and the blurred first
  • the gradient encryption value of the second terminal and the loss encryption value of the second terminal are sent to the first terminal; after receiving the fuzzy gradient encryption value of the second terminal and the loss encryption value of the second terminal returned by the first terminal
  • the model parameter training method based on federated learning further includes:
  • step A obtain a second gradient value according to the random vector and the decrypted first gradient value, update the second gradient value, and update The second gradient value after the corresponding update sample parameters;
  • the first terminal obtains the second gradient value according to the random vector and the decrypted first gradient value, that is, remove The random vector in the decrypted first gradient value is used to restore the true gradient value to obtain the second gradient value, and then update the second gradient value, and correspondingly update the sample parameters according to the updated second gradient value.
  • the method for updating the sample parameter is: calculating the product of the updated second gradient value and the preset coefficient, and subtracting the product from the sample parameter to obtain the updated sample parameter.
  • the coefficient is preset, that is, the preset coefficient, and its corresponding value can be set according to specific needs; g is the updated gradient value.
  • Step B Generate a corresponding gradient value update instruction and send it to the second terminal, so that the second terminal updates the gradient value of the second terminal according to the gradient value update instruction, and according to the updated first The gradient value of the second terminal updates the corresponding sample parameter.
  • the first terminal generates a corresponding gradient value update instruction and sends it to the second terminal, so that the second terminal updates the gradient value of the second terminal according to the gradient value update instruction, and updates the corresponding gradient value according to the updated gradient value of the second terminal
  • the sample parameters The method for updating the sample parameter of the second terminal is basically the same as the method for updating the gradient value of the first terminal, which will not be repeated here.
  • step B and step A is in no particular order.
  • the model parameter training method based on federated learning further includes:
  • Step C After the first terminal determines the model parameters and receives the execution request, the first terminal sends the execution request to the second terminal, so that the second terminal receives the After executing the request, return the first prediction score to the first terminal according to the corresponding model parameter and the variable value of the characteristic variable corresponding to the execution request;
  • the first terminal detects whether the execution request is received. After the first terminal receives the execution request, the first terminal sends the execution request to the second terminal. When the second terminal receives the execution request, the second terminal obtains its corresponding model parameter and the variable value of the characteristic variable corresponding to the execution request, and calculates the first prediction score according to the model parameter and variable value, and The first prediction score is sent to the first terminal. It is understandable that the formula for the first terminal to calculate the first prediction score is:
  • Step D After receiving the first prediction score, calculate a second prediction score according to the determined model parameters and the variable values of the characteristic variables corresponding to the execution request;
  • the first terminal After the first terminal receives the first prediction score sent by the second terminal, the first terminal calculates the second prediction score according to the determined model parameter and the variable value of the feature variable corresponding to the execution request.
  • the formula for the first terminal to calculate the second prediction score is:
  • Step E Adding the first prediction score and the second prediction score to obtain a total prediction score, and inputting the total prediction score into the model to be trained to obtain a model score, and according to the model score Determine whether to execute the execution request.
  • the first terminal When the first terminal obtains the first prediction score and the second prediction score, the first terminal adds the first prediction score and the second prediction score to obtain the sum of the prediction scores, and inputs the sum of the prediction scores into the model to be trained to obtain Model score.
  • the expression for the sum of predicted scores is:
  • the expression of the model to be trained is:
  • the first terminal can determine whether to execute the execution request according to the model score. If the model to be trained is a fraud model and the execution request is a loan request, if the calculated model score is greater than or equal to the preset score, the first terminal determines that the loan request is a fraud request and refuses to execute the loan request; if The calculated model score is less than the preset score, and the first terminal determines that the loan request is a real loan request, and executes the loan request.
  • the execution request is analyzed through the to-be-trained model to determine whether to execute the execution request, which improves the security in the process of executing the request by the first terminal.
  • This application also provides a model parameter training device based on federated learning.
  • FIG. 6 is a schematic diagram of the functional modules of the first embodiment of the model parameter training device based on federated learning in this application.
  • the model parameter training device based on federated learning includes:
  • the data acquisition module 10 is configured to, when the first terminal receives the encrypted second data sent by the second terminal, the first terminal obtains the loss encryption value and the first gradient encryption value according to the encrypted second data ;
  • the first sending module 20 is configured to randomly generate a random vector with the same dimension as the first gradient encryption value, blur the first gradient encryption value based on the random vector, and perform the blurred first gradient encryption value And sending the lost encrypted value to the second terminal;
  • the model detection module 30 is configured to, when receiving the decrypted first gradient value and loss value returned by the second terminal based on the blurred first gradient encryption value and the loss encryption value, according to the decryption The latter loss value detects whether the model to be trained is in a convergent state;
  • the parameter determination module 40 is configured to, if it is detected that the model to be trained is in a convergent state, obtain a second gradient value according to the random vector and the decrypted first gradient value, and compare it with the second gradient value The corresponding sample parameter is determined as the model parameter of the model to be trained.
  • the data acquisition module 10 includes:
  • the first acquiring unit is configured to, when the first terminal receives the encrypted second data sent by the second terminal, the first terminal acquires the corresponding first data and the sample label corresponding to the first data;
  • the first encryption unit is configured to calculate a loss value based on the first data, the encrypted second data, the sample label, and a preset loss function, and encrypt the loss value using a homomorphic encryption algorithm to obtain encryption
  • the loss value of is recorded as the loss encrypted value
  • the second encryption unit is configured to obtain a gradient function according to the preset loss function, calculate a first gradient value according to the gradient function, and encrypt the first gradient value using a homomorphic encryption algorithm to obtain an encrypted first
  • the gradient value is recorded as the first gradient encryption value.
  • model parameter training device based on federated learning further includes:
  • a first calculation module configured to send the double encryption intermediate result to the second terminal, so that the second terminal calculates a double encryption gradient value based on the double encryption intermediate result
  • the second decryption module is configured to, when receiving the double encryption gradient value returned by the second terminal, decrypt the double encryption gradient value by using the private key corresponding to the preset public key, and decrypt it The latter double encryption gradient value is sent to the second terminal, so that the second terminal decrypts the decrypted double encryption gradient value to obtain the gradient value of the second terminal.
  • model parameter training device based on federated learning further includes:
  • the second encryption module is configured to receive encrypted sample data sent by the second terminal, obtain the first partial gradient value of the second terminal according to the encrypted sample data and the first data, and encrypt it by using a homomorphic encryption algorithm
  • the first partial gradient value is obtained by obtaining the encrypted first partial gradient value, which is recorded as the second gradient encrypted value;
  • the second sending module is configured to send the second gradient encryption value to the second terminal, so that the second terminal is based on the second gradient encryption value and the second gradient calculated according to the second data. Part of the gradient value to obtain the gradient value of the second terminal.
  • model parameter training device based on federated learning further includes:
  • the instruction sending module is configured to generate a corresponding gradient value update instruction and send it to the second terminal, so that the second terminal updates the gradient value of the second terminal according to the gradient value update instruction, and according to the update The gradient value of the subsequent second terminal updates the corresponding sample parameter.
  • model parameter training device based on federated learning further includes:
  • the score obtaining module is used to add the first prediction score and the second prediction score to obtain a total prediction score, and input the total prediction score into the model to be trained to obtain the model score, and according to the The model score determines whether to execute the execution request.
  • model detection module 30 includes:
  • the first determining unit is configured to determine that the model to be trained is in a convergent state when the difference is less than or equal to a preset threshold;
  • the second determining unit is configured to determine that the model to be trained is not in a convergent state when the difference is greater than a preset threshold.
  • each module in the model parameter training device based on federated learning corresponds to the steps in the embodiment of the model parameter training method based on federated learning, and its functions and realization process are not repeated here.
  • the present application also provides a storage medium that stores a model parameter training program based on federated learning.
  • the model parameter training program based on federated learning is executed by a processor, the method described in any of the above embodiments is implemented. The steps of the model parameter training method based on federated learning.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Medical Informatics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Complex Calculations (AREA)
  • Machine Translation (AREA)

Abstract

本申请公开了一种基于联邦学习的模型参数训练方法、装置、设备及介质。该方法包括:当第一终端接收到第二终端发送的加密后的第二数据时,获取对应的损失加密值和第一梯度加密值;随机生成与第一梯度加密值同维度的随机向量,基于随机向量对第一梯度加密值进行模糊,并将模糊后的第一梯度加密值和损失加密值发送至第二终端;在接收到第二终端返回的解密后的第一梯度值和损失值时,根据解密后的损失值检测待训练模型是否处于收敛状态;若是,则根据随机向量和解密后的第一梯度值得到第二梯度值,并将与第二梯度值对应的样本参数确定为模型参数。

Description

基于联邦学习的模型参数训练方法、装置、设备及介质
本申请要求于2019年3月1日提交中国专利局、申请号为201910158538.8、发明名称为“基于联邦学习的模型参数训练方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及数据处理技术领域,尤其涉及一种基于联邦学习的模型参数训练方法、装置、设备及介质。
背景技术
“机器学习”是人工智能的核心研究领域之一,而如何在保护数据隐私、满足合法合规要求的前提下继续进行机器学习,是机器学习领域现在关注的一个趋势,在此背景下,人们研究提出了“联邦学习”的概念。
联邦学习利用技术算法加密建造的模型,联邦双方在不用给出己方数据的情况下,也可进行模型训练得到模型参数,联邦学习通过加密机制下的参数交换方式保护用户数据隐私,数据和模型本身不会进行传输,也不能反猜对方数据,因此在数据层面不存在泄露的可能,也不违反更严格的数据保护法案如GDPR(General Data Protection Regulation,《通用数据保护条例》)等,能够在较高程度保持数据完整性的同时,保障数据隐私。然而,目前的联邦学习技术都必须依靠可信第三方,以通过第三方来对联邦双方的数据进行聚合后建模,从而使得联邦学习在一些场景下应用有限。
发明内容
本申请的主要目的在于提供一种基于联邦学习的模型参数训练方法、装置、设备及存储介质,旨在实现无需可信第三方而仅用联邦双方数据就可以进行模型训练,以避免应用受限。
为实现上述目的,本申请提供一种基于联邦学习的模型参数训练方法,所述基于联邦学习的模型参数训练方法包括:
当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端根 据所述加密后的第二数据得到损失加密值和第一梯度加密值;
随机生成与所述第一梯度加密值同维度的随机向量,基于所述随机向量对所述第一梯度加密值进行模糊,并将模糊后的第一梯度加密值和所述损失加密值发送至所述第二终端;
在接收到所述第二终端基于所述模糊后的第一梯度加密值和所述损失加密值返回的解密后的第一梯度值和损失值时,根据所述解密后的损失值检测待训练模型是否处于收敛状态;
若检测到所述待训练模型处于收敛状态,则根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,并将与所述第二梯度值对应的样本参数确定为所述待训练模型的模型参数。
此外,为实现上述目的,本申请还提供一种基于联邦学习的模型参数训练装置,所述基于联邦学习的模型参数训练装置包括:
数据获取模块,用于当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端根据所述加密后的第二数据得到损失加密值和第一梯度加密值;
第一发送模块,用于随机生成与所述第一梯度加密值同维度的随机向量,基于所述随机向量对所述第一梯度加密值进行模糊,并将模糊后的第一梯度加密值和所述损失加密值发送至所述第二终端;
模型检测模块,用于在接收到所述第二终端基于所述模糊后的第一梯度加密值和所述损失加密值返回的解密后的第一梯度值和损失值时,根据所述解密后的损失值检测待训练模型是否处于收敛状态;
参数确定模块,用于若检测到所述待训练模型处于收敛状态,则根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,并将与所述第二梯度值对应的样本参数确定为所述待训练模型的模型参数。
此外,为实现上述目的,本申请还提供一种基于联邦学习的模型参数训练设备,所述基于联邦学习的模型参数训练设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的基于联邦学习的模型参数训练程序,所述基于联邦学习的模型参数训练程序被所述处理器执行时实现如上所述的基于联邦学习的模型参数训练方法的步骤。
此外,为实现上述目的,本申请还提供一种存储介质,所述存储介质上存储有基于联邦学习的模型参数训练程序,所述基于联邦学习的模型参数训练程 序被处理器执行时实现如上所述的基于联邦学习的模型参数训练方法的步骤。
本申请提供一种基于联邦学习的模型参数训练方法、装置、设备及介质,当第一终端接收到第二终端发送的加密后的第二数据时,第一终端根据该加密后的第二数据得到损失加密值和第一梯度加密值;随机生成与该第一梯度加密值同维度的随机向量,基于该随机向量对该第一梯度加密值进行模糊,将模糊后的第一梯度加密值和该损失加密值发送至第二终端;在接收到第二终端基于该模糊后的第一梯度加密值和该损失加密值返回的解密后的第一梯度值和损失值时,根据该解密后的损失值检测待训练模型是否处于收敛状态;若检测到待训练模型处于收敛状态,第一终端则根据该随机向量和解密后的第一梯度值得到第二梯度值,即去掉该解密后的第一梯度值中的随机向量,以还原真实梯度值,得到第二梯度值,然后将与该第二梯度值对应的样本参数确定为待训练模型的模型参数。本申请仅通过第一终端和第二终端之间的数据传输与计算,最终得到损失值,进而确定待训练模型中的模型参数,可无需可靠第三方而仅用两方数据就可以进行模型训练,以避免应用受限,同时,本申请中第一终端接收到的第二数据是模型中间结果的加密数据,第一终端和第二终端通信过程中的数据通过加密和模糊处理,因此本申请不会泄露原始特征数据,可达到同样级别的安全保证,保障终端样本数据的隐私性和安全性。
附图说明
图1为本申请实施例方案涉及的硬件运行环境的设备结构示意图;
图2为本申请基于联邦学习的模型参数训练方法第一实施例的流程示意图;
图3为本申请第一实施例中步骤S10的细化流程示意图;
图4为本申请基于联邦学习的模型参数训练方法第二实施例的流程示意图;
图5为本申请基于联邦学习的模型参数训练方法第三实施例的流程示意图;
图6为本申请基于联邦学习的模型参数训练装置第一实施例的功能模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定 本申请。
参照图1,图1为本申请实施例方案涉及的硬件运行环境的设备结构示意图。
本申请实施例基于联邦学习的模型参数训练设备可以是智能手机、PC(Personal Computer,个人计算机)、平板电脑、便携计算机和服务器等终端设备。
如图1所示,该基于联邦学习的模型参数训练设备可以包括:处理器1001,例如CPU,通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如Wi-Fi接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。
本领域技术人员可以理解,图1中示出的基于联邦学习的模型参数训练设备结构并不构成对基于联邦学习的模型参数训练设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及基于联邦学习的模型参数训练程序。
在图1所示的终端中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端,与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的基于联邦学习的模型参数训练程序,并执行以下基于联邦学习的模型参数训练方法的各个步骤。
基于上述硬件结构,提出本申请基于联邦学习的模型参数训练方法的各实施例。
本申请提供一种基于联邦学习的模型参数训练方法。
参照图2,图2为本申请基于联邦学习的模型参数训练方法第一实施例的流程示意图。
在本实施例中,该基于联邦学习的模型参数训练方法包括:
步骤S10,当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端根据所述加密后的第二数据得到损失加密值和第一梯度加密值;
在本实施例中,当第一终端接收到第二终端发送的加密后的第二数据时,第一终端根据该加密后的第二数据得到损失加密值和第一梯度加密值。其中,第一终端和第二终端可以为智能手机、个人计算机、平板电脑、便携计算机和和服务器等终端设备,第二数据为第二终端根据其样本数据和对应的样本参数计算得到的,为模型中间结果,然后第二终端对第二数据进行加密,可通过密钥对生成软件生成公钥和私钥,然后采用该生成的公钥,通过同态加密算法对第二数据进行加密,得到加密后的第二数据,以保障传输数据的隐私性和安全性。此外,损失加密值和第一梯度加密值的获取方法为:当第一终端接收到第二终端发送的第二数据后,第一终端获取与该第二数据对应的第一数据,及与该第一数据对应的标本标签;然后基于第一数据、加密后的第二数据、样本标签和预设损失函数计算损失值,采用第二终端的公钥(第二终端会将其公钥发送至第一终端),通过同态加密算法加密各个计算损失值的计算因子,以得到加密后的损失值,记作损失加密值;然后根据预设损失函数得到梯度函数,并根据该梯度函数计算得到第一梯度值,并采用第二终端的公钥,通过同态加密算法加密该第一梯度值,得到加密的第一梯度值,记作第一梯度加密值。具体的获取过程可参照下述实施例,此处不作赘述。
步骤S20,随机生成与所述第一梯度加密值同维度的随机向量,基于所述随机向量对所述第一梯度加密值进行模糊,并将模糊后的第一梯度加密值和所述损失加密值发送至所述第二终端;
第一终端在得到损失加密值和第一梯度加密值后,随机生成与该第一梯度加密值同维度的随机向量,基于该随机向量对该第一梯度加密值进行模糊,即若第一梯度加密值为[[g]],随机向量为R,则模糊后的第一梯度加密值为[[g+R]],然后将模糊后的第一梯度加密值和该损失加密值发送至第二终端。对应的,第二终端在接收到该第一梯度加密值和损失加密值时,通过第二终端的私钥对该第一梯度加密值和损失加密值进行解密,得到解密后的第一梯度值和损失值。
步骤S30,在接收到所述第二终端基于所述模糊后的第一梯度加密值和所述损失加密值返回的解密后的第一梯度值和损失值时,根据所述解密后的损失值检测待训练模型是否处于收敛状态;
第一终端在接收到第二终端基于该模糊后的第一梯度加密值和该损失加密值返回的解密后的第一梯度值和损失值时,根据该解密后的损失值检测待训 练模型是否处于收敛状态。具体的,步骤“根据所述解密后的损失值检测待训练模型是否处于收敛状态”包括:
步骤a1,获取所述第一终端前一次获取到的第一损失值,并将所述解密后的损失值记作第二损失值;
当第一终端得到解密后的损失值后,第一终端获取第一终端前一次获取到的第一损失值,并将解密后的损失值记为第二损失值。需要说明的是,当待训练模型未处于收敛状态时,第一终端会持续根据第二终端发送的加密后的第二数据得到损失加密值,然后将损失加密值发送给第二终端进行解密,进而接收第二终端返回的解密后的损失值,直到待训练模型处于收敛状态。第一损失值也是第二终端解密后的损失值。可以理解的是,第一损失值是第二终端前一次发送的解密后的损失值,第二损失值是第二终端当前发送的解密后的损失值。
步骤a2,计算所述第一损失值与所述第二损失值之间的差值,并判断所述差值是否小于或者等于预设阈值;
当第一终端获取到第一损失值和第二损失值后,第一终端计算第一损失值与第二损失值之间的差值,并判断该差值是否小于或者等于预设阈值。其中,该预设阈值的具体数值可预先根据具体需要进行设置,在本实施例中对预设阈值对应的数值不做具体限制。
步骤a3,当所述差值小于或者等于预设阈值时,则判定所述待训练模型处于收敛状态;
步骤a4,当所述差值大于预设阈值时,则判定所述待训练模型未处于收敛状态。
当该差值小于或者等于预设阈值时,第一终端则判定待训练模型处于收敛状态;当确定该差值大于预设阈值时,第一终端则判定待训练模型未处于收敛状态。
步骤S40,若检测到所述待训练模型处于收敛状态,则根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,并将与所述第二梯度值对应的样本参数确定为所述待训练模型的模型参数。
若检测到待训练模型处于收敛状态,第一终端则根据该随机向量和解密后的第一梯度值得到第二梯度值,即去掉该解密后的第一梯度值中的随机向量,以还原真实梯度值,得到第二梯度值,然后将与该第二梯度值对应的样本参数确定为该待训练模型的模型参数。
本申请实施例提供一种基于联邦学习的模型参数训练方法,当第一终端接收到第二终端发送的加密后的第二数据时,第一终端根据该加密后的第二数据得到损失加密值和第一梯度加密值;随机生成与该第一梯度加密值同维度的随机向量,基于该随机向量对该第一梯度加密值进行模糊,将模糊后的第一梯度加密值和该损失加密值发送至第二终端;在接收到第二终端基于该模糊后的第一梯度加密值和该损失加密值返回的解密后的第一梯度值和损失值时,根据该解密后的损失值检测待训练模型是否处于收敛状态;若检测到待训练模型处于收敛状态,第一终端则根据该随机向量和解密后的第一梯度值得到第二梯度值,即去掉该解密后的第一梯度值中的随机向量,以还原真实梯度值,得到第二梯度值,然后将与该第二梯度值对应的样本参数确定为待训练模型的模型参数。本申请仅通过第一终端和第二终端之间的数据传输与计算,最终得到损失值,进而确定待训练模型中的模型参数,可无需可靠第三方而仅用两方数据就可以进行模型训练,以避免应用受限,同时,本申请中第一终端接收到的第二数据是模型中间结果的加密数据,第一终端和第二终端通信过程中的数据通过加密和模糊处理,因此本申请不会泄露原始特征数据,可达到同样级别的安全保证,保障终端样本数据的隐私性和安全性。
进一步的,参照图3,图3为本申请第一实施例中步骤S10的细化流程示例图。
具体的,步骤S10包括:
步骤S11,当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端获取对应的第一数据,及与所述第一数据对应的样本标签;
在本实施例中,当第一终端接收到第二终端发送的第二数据后,第一终端获取对应的第一数据,及与该第一数据对应的标本标签。其中,第一数据和第二数据均为模型中间结果,第一数据是第一终端根据其样本数据和对应的样本参数计算得到的,第二数据是第二终端根据其样本数据和对应的样本参数计算得到的。具体的,第二数据可以为第二终端中样本参数与第二终端交集样本数据中特征变量对应变量值乘积之和,以及该乘积之和的平方。原始第二数据对应的计算公式可以为:
Figure PCTCN2019119227-appb-000001
乘积之和的平方表示为:
Figure PCTCN2019119227-appb-000002
其中,w 1,w 2…w n表示第二终端对应的样本参数,第二终端中特征变量对应变量值的个数与第二终端对应样本参数的个数相等,即一个变量值对应一个样本参数,x表示特征变量的特征值,1,2…n表示对应变量值和样本参数 的个数。如当第二终端交集样本数据中的每个特征变量存在三个变量值,则
Figure PCTCN2019119227-appb-000003
需要说明的是,第二终端发送给第一终端的第二数据是加密后的第二数据,当第二终端计算得到第二数据后,采用第二终端的公钥,通过同态加密算法加密第二数据,得到加密后的第二数据,并将加密后的第一数据发送给第二终端。其中,发送给第一终端的第二数据,即加密后的第二数据可表示为[[u A]]和
Figure PCTCN2019119227-appb-000004
第一终端计算第一数据的过程与第二终端计算第二数据的过程类似,如计算第一终端中样本参数与第一终端交集样本数据中特征变量对应变量值乘积之和的公式为:
Figure PCTCN2019119227-appb-000005
其中,w 1,w 2…w n表示第一终端中各个样本数据特征变量对应特征值的样本参数。
步骤S12,基于所述第一数据、所述加密后的第二数据、所述样本标签和预设损失函数计算损失值,并采用同态加密算法加密所述损失值,得到加密的损失值,记作损失加密值;
第一终端在接收到加密后的第二数据,并获取到对应的第一数据及其对应的样本标签后,基于第一数据、加密后的第二数据、样本标签和预设损失函数计算损失值,并采用同态加密算法加密所述损失值,得到加密的损失值,记作损失加密值。
具体的,将损失值表示为loss,
Figure PCTCN2019119227-appb-000006
其中,
Figure PCTCN2019119227-appb-000007
y表示第一数据对应样本标签的标签值,样本标签对应的标签值的数值可根据具体需要而设置,如在本实施例中,如可用“0”和“1”表示不同样本标签对应的标签值。当第一终端计算得到损失值后,第一终端采用第二终端的公钥(第二终端会将其公钥发送至第一终端),通过同态加密算法加密各个计算损失值的计算因子,以得到加密后的损失值。将加密后的损失值(即损失加密值)表示为[[loss]],log 2、yw Tx和(w Tx) 2为计算损失值的计算因子,
Figure PCTCN2019119227-appb-000008
其中,[[u]]=[[u A+u B]]=[[u A]]+[[u B]],
Figure PCTCN2019119227-appb-000009
步骤S13,根据所述预设损失函数得到梯度函数,并根据所述梯度函数计算得到第一梯度值,并采用同态加密算法加密所述第一梯度值,得到加密的第一梯度值,记作第一梯度加密值。
然后根据预设损失函数得到梯度函数,并根据该梯度函数计算得到第一梯度值,并采用第二终端的公钥,通过同态加密算法加密该第一梯度值,得到加密的第一梯度值,记作第一梯度加密值。
具体的,第一终端计算其对应梯度值(即第一梯度值)的公式为:
Figure PCTCN2019119227-appb-000010
在计算得到第一梯度值后,第一终端采用其第二终端的公钥,通过同态加密算法对该第一梯度值进行加密,以得到加密后的损失值(即第一梯度加密值),对应的,第一梯度加密值的公式为:[[g]]=∑[[d]]x,其中,
Figure PCTCN2019119227-appb-000011
需要说明的是,在本实施例中,采用参数服务器的方式,第一终端和第二终端都拥有独立的参数服务器,用于各自样本数据的聚合更新同步,同时避免各自样本数据的泄露,且第一终端和第二终端对应的样本参数,即模型参数都是各自存储的,提高了第一终端和第二终端数据的安全性。
本实施例通过根据接收到的来源于第二终端的加密后的第二数据、第一终端的第一数据以及第一数据对应的样本标签计算损失值,并采用同态加密算法加密对损失值进行加密,得到损失加密值,使第一终端在计算损失值过程中,并不能获取第二终端的具体样本数据,实现了第一终端在联合第二终端样本数据计算模型参数过程中,可在不暴露第二终端样本数据的基础上计算出计算模型参数所需的损失值,提高了计算模型参数过程中第二终端样本数据的隐私性。
基于上述各实施方式,提出本申请基于联邦学习的模型参数训练方法的第二实施例。
参照图4,在本实施例中,所述基于联邦学习的模型参数训练方法还包括:
步骤S50,根据所述加密后的第二数据和所述第一数据计算得到加密中间结果,通过预设公钥对所述加密中间结果进行加密,得到双重加密中间结果;
作为第二终端的梯度值的其中一种获取方式,在本实施例中,第一终端可根据加密后的第二数据和上述获取到的第一数据计算得到加密中间结果,然后通过预设公钥对该加密中间结果进行加密,得到双重加密中间结果。其中,该预设公钥是第一终端根据密钥对生成软件生成的公钥,是第一终端的公钥。
步骤S60,将所述双重加密中间结果发送至所述第二终端,以使得所述第二终端基于所述双重加密中间结果计算得到双重加密梯度值;
然后,将该双重加密中间结果发送至第二终端,以使得第二终端基于该双 重加密中间结果计算得到双重加密梯度值,进而第二终端将该双重加密梯度值发送至第一终端。
步骤S70,在接收到所述第二终端返回的所述双重加密梯度值时,通过与所述预设公钥对应的私钥对所述双重加密梯度值进行解密,并将解密后的双重加密梯度值发送至所述第二终端,以使得所述第二终端对所述解密后的双重加密梯度值进行解密,得到所述第二终端的梯度值。
第一终端在接收到第二终端返回的双重加密梯度值时,通过与该预设公钥对应的私钥(即第一终端的私钥)对双重加密梯度值进行一次解密,并将解密后的双重加密梯度值发送至第二终端,以使得第二终端采用其私钥(即第二终端的私钥)对该解密后的双重加密梯度值进行二次解密,得到第二终端的梯度值,进而第二终端可根据该第二终端的梯度值来更新模型参数。
在本实施例中,第一终端和第二终端两方进行通信的第一数据和第二数据都是模型中间结果的加密数据,不存在泄露原始特征数据,且其他数据传输过程中也进行了加密,可在保障终端数据隐私性和安全性的同时,对第二终端的模型参数进行训练,确定第二终端的模型参数。
基于上述各实施方式,提出本申请基于联邦学习的模型参数训练方法的第三实施例。
参照图5,在本实施例中,所述基于联邦学习的模型参数训练方法还包括:
步骤S80,接收所述第二终端发送的加密样本数据,根据所述加密样本数据和所述第一数据得到所述第二终端的第一部分梯度值,并采用同态加密算法加密所述第一部分梯度值,得到加密的第一部分梯度值,记作第二梯度加密值;
作为第二终端的梯度值的又一种获取方式,在本实施例中,第二终端可以发送加密样本数据至第一终端,使得第一终端根据该加密样本数据计算第二终端的部分梯度值。具体的,第一终端接收第二终端发送的加密样本数据,然后根据加密样本数据和上述根据加密后的第二数据获取到的第一数据,得到第二终端的第一部分梯度值,并采用第二终端的公钥通过同态加密算法加密该第一部分梯度值,得到加密的第一部分梯度值,将其记作第二梯度加密值。
步骤S90,将所述第二梯度加密值发送至所述第二终端,以使得所述第二终端基于所述第二梯度加密值和根据所述第二数据计算得到的第二部分梯度值,得到所述第二终端的梯度值。
然后,将该第二梯度加密值发送至第二终端,以使得第二终端基于该第二 梯度加密值和根据第二数据计算得到的第二部分梯度值,得到第二终端的梯度值。具体的,第二终端根据第二数据计算得到的第二部分梯度值,同时对接收到的第二梯度加密值进行解密,得到第一部分梯度值,然后,将第一部分梯度值和第二部分梯度值这两部分梯度值结合可得到该第二终端的梯度值,进而第二终端可根据该第二终端的梯度值来更新模型参数。
在本实施例中,第一终端通过接收到的第二终端发送的加密样本数据,得到第二终端梯度的一部分(即第一部分梯度值),然后将加密后的第一部分梯度值(即第二梯度加密值)发送至第二终端,使得第二终端解密后,得到第一部分梯度值,进而结合该第一部分梯度值和第二部分梯度值(第二终端本地计算得到的)这两部分梯度值,得到该第二终端的梯度值,进而根据该第二终端的梯度值来更新模型参数。通过上述方式,本实施例对第二终端的模型参数进行训练,确定出第二终端的模型参数,同时,由于第一终端和第二终端两方进行通信的数据均进行了加密,可保障终端数据的隐私性和安全性。
此外,需要说明的是,作为第二终端的梯度值的另一种获取方式,可采用与第一实施例中相同的方法来计算第二终端的梯度值。具体的,第一终端将加密后的第一数据发送到第二终端,第二终端在接收到第一终端发送的加密后的第一数据时,第二终端根据该加密后的第一数据得到第二终端的损失加密值和梯度加密值;随机生成与该第二终端的梯度加密值同维度的随机向量,基于该随机向量对该第二终端的梯度加密值进行模糊,将模糊后的第二终端的梯度加密值和该第二终端的损失加密值发送至第一终端;在接收到第一终端基于该模糊后的第二终端的梯度加密值和该第二终端的损失加密值返回的解密后的第二终端的梯度值和损失值时,根据该解密后的第二终端的损失值检测待训练模型是否处于收敛状态;若检测到待训练模型处于收敛状态,第二终端则根据该随机向量和解密后的第二终端的梯度值得到第二终端的梯度值,即去掉该解密后的第二终端的梯度值中的随机向量,以还原真实梯度值,得到第二终端的梯度值,然后将与该第二终端的梯度值对应的样本参数确定为待训练模型的模型参数。此过程与上述第一实施例中基本相似,可参照上述第一实施例,此处不作赘述。
进一步的,基于上述各实施方式,提出本申请基于联邦学习的模型参数训练方法的第四实施例。在本实施例中,在步骤S30之后,所述基于联邦学习的 模型参数训练方法还包括:
若检测到所述待训练模型未处于收敛状态,则执行步骤A:根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,更新所述第二梯度值,并根据更新后的第二梯度值,对应更新样本参数;
在本实施例中,若检测到待训练模型未处于收敛状态,即差值大于预设阈值时,第一终端则根据该随机向量和解密后的第一梯度值得到第二梯度值,即去掉该解密后的第一梯度值中的随机向量,以还原真实梯度值,得到第二梯度值,进而更新第二梯度值,并根据更新后的第二梯度值,对应更新样本参数。
其中,样本参数的更新方法为:计算更新后的第二梯度值与预设系数之间的乘积,将样本参数减去该乘积,以得到更新后的样本参数。具体的,第一终端根据更新后的梯度值更新其对应样本参数所用公式为:w=w 0-ηg,其中,w表示更新后的样本参数,w 0表示更新前的样本参数;η为一个系数,是预先设置好的,即预设系数,其对应的数值可根据具体需要而设置;g为更新后的梯度值。
步骤B,生成对应的梯度值更新指令,并发送至所述第二终端,以使得所述第二终端根据所述梯度值更新指令更新所述第二终端的梯度值,并根据更新后的第二终端的梯度值更新对应的样本参数。
第一终端生成对应的梯度值更新指令,并发送至第二终端,以使得第二终端根据该梯度值更新指令更新第二终端的梯度值,并根据更新后的第二终端的梯度值更新对应的样本参数。其中,第二终端的样本参数的更新方法与第一终端梯度值的更新方法基本相同,此处不作赘述。
需要说明的是,步骤B与步骤A的执行顺序不分先后。
进一步的,基于上述各实施方式,提出本申请基于联邦学习的模型参数训练方法的第五实施例。在本实施例中,在步骤S30之后,所述基于联邦学习的模型参数训练方法还包括:
步骤C,当所述第一终端确定模型参数,且接收到执行请求后,所述第一终端将所述执行请求发送给所述第二终端,以使得所述第二终端在接收到所述执行请求后,根据对应的模型参数和与所述执行请求对应特征变量的变量值返回第一预测分数给所述第一终端;
在本实施例中,当第一终端确定模型参数后,第一终端检测是否接收到执行请求。当第一终端接收到执行请求后,第一终端将该执行请求发送给第二终 端。当第二终端接收到执行请求后,第二终端获取其对应的模型参数,以及获取与该执行请求对应特征变量的变量值,并根据该模型参数和变量值计算得到第一预测分数,并将该第一预测分数发送给第一终端。可以理解的是,第一终端计算第一预测分数的公式为:
Figure PCTCN2019119227-appb-000012
步骤D,当接收到所述第一预测分数后,根据确定的所述模型参数和与所述执行请求对应特征变量的变量值,计算第二预测分数;
当第一终端接收到第二终端发送的第一预测分数后,第一终端根据其所确定的模型参数和与该执行请求对应特征变量的变量值计算第二预测分数。其中,第一终端计算第二预测分数的公式为:
Figure PCTCN2019119227-appb-000013
步骤E,将所述第一预测分数和所述第二预测分数相加,得到预测分数总和,并根据所述预测分数总和输入所述待训练模型中,得到模型分数,并根据所述模型分数确定是否执行所述执行请求。
当第一终端得到第一预测分数和第二预测分数后,第一终端将第一预测分数和第二预测分数相加,得到预测分数总和,并将该预测分数总和输入待训练模型中,得到模型分数。其中,预测分数总和的表达式为:
Figure PCTCN2019119227-appb-000014
待训练模型的表达式为:
Figure PCTCN2019119227-appb-000015
当得到模型分数后,第一终端可根据该模型分数判断是否执行该执行请求。如当该待训练模型为欺诈模型,该执行请求为贷款请求时,若计算所得的模型分数大于或者等于预设分数,第一终端则确定该贷款请求为欺诈请求,拒绝执行该贷款请求;若计算所得的模型分数小于预设分数,第一终端则确定该贷款请求为真实的贷款请求,执行该贷款请求。
本实施例通过第一终端接收到执行请求后,通过待训练模型分析该执行请求,以确定是否执行该执行请求,提高了第一终端执行请求过程中的安全性。
本申请还提供一种基于联邦学习的模型参数训练装置。
参照图6,图6为本申请基于联邦学习的模型参数训练装置第一实施例的功能模块示意图。
所述基于联邦学习的模型参数训练装置包括:
数据获取模块10,用于当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端根据所述加密后的第二数据得到损失加密值和第一梯度加密值;
第一发送模块20,用于随机生成与所述第一梯度加密值同维度的随机向量,基于所述随机向量对所述第一梯度加密值进行模糊,并将模糊后的第一梯度加密值和所述损失加密值发送至所述第二终端;
模型检测模块30,用于在接收到所述第二终端基于所述模糊后的第一梯度加密值和所述损失加密值返回的解密后的第一梯度值和损失值时,根据所述解密后的损失值检测待训练模型是否处于收敛状态;
参数确定模块40,用于若检测到所述待训练模型处于收敛状态,则根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,并将与所述第二梯度值对应的样本参数确定为所述待训练模型的模型参数。
进一步的,所述数据获取模块10包括:
第一获取单元,用于当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端获取对应的第一数据,及与所述第一数据对应的样本标签;
第一加密单元,用于基于所述第一数据、所述加密后的第二数据、所述样本标签和预设损失函数计算损失值,并采用同态加密算法加密所述损失值,得到加密的损失值,记作损失加密值;
第二加密单元,用于根据所述预设损失函数得到梯度函数,并根据所述梯度函数计算得到第一梯度值,并采用同态加密算法加密所述第一梯度值,得到加密的第一梯度值,记作第一梯度加密值。
进一步的,所述基于联邦学习的模型参数训练装置还包括:
第一加密模块,用于根据所述加密后的第二数据和所述第一数据计算得到加密中间结果,通过预设公钥对所述加密中间结果进行加密,得到双重加密中间结果;
第一计算模块,用于将所述双重加密中间结果发送至所述第二终端,以使得所述第二终端基于所述双重加密中间结果计算得到双重加密梯度值;
第二解密模块,用于在接收到所述第二终端返回的所述双重加密梯度值时,通过与所述预设公钥对应的私钥对所述双重加密梯度值进行解密,并将解密后的双重加密梯度值发送至所述第二终端,以使得所述第二终端对所述解密后的双重加密梯度值进行解密,得到所述第二终端的梯度值。
进一步的,所述基于联邦学习的模型参数训练装置还包括:
第二加密模块,用于接收所述第二终端发送的加密样本数据,根据所述加密样本数据和所述第一数据得到所述第二终端的第一部分梯度值,并采用同态 加密算法加密所述第一部分梯度值,得到加密的第一部分梯度值,记作第二梯度加密值;
第二发送模块,用于将所述第二梯度加密值发送至所述第二终端,以使得所述第二终端基于所述第二梯度加密值和根据所述第二数据计算得到的第二部分梯度值,得到所述第二终端的梯度值。
进一步的,所述基于联邦学习的模型参数训练装置还包括:
参数更新模块,用于若检测到所述待训练模型未处于收敛状态,则根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,更新所述第二梯度值,并根据更新后的第二梯度值,对应更新样本参数;
指令发送模块,用于生成对应的梯度值更新指令,并发送至所述第二终端,以使得所述第二终端根据所述梯度值更新指令更新所述第二终端的梯度值,并根据更新后的第二终端的梯度值更新对应的样本参数。
进一步的,所述基于联邦学习的模型参数训练装置还包括:
第三发送模块,用于当所述第一终端确定模型参数,且接收到执行请求后,所述第一终端将所述执行请求发送给所述第二终端,以使得所述第二终端在接收到所述执行请求后,根据对应的模型参数和与所述执行请求对应特征变量的变量值返回第一预测分数给所述第一终端;
第二计算模块,用于当接收到所述第一预测分数后,根据确定的所述模型参数和与所述执行请求对应特征变量的变量值,计算第二预测分数;
分数获取模块,用于将所述第一预测分数和所述第二预测分数相加,得到预测分数总和,并根据所述预测分数总和输入所述待训练模型中,得到模型分数,并根据所述模型分数确定是否执行所述执行请求。
进一步的,所述模型检测模块30包括:
第二获取单元,用于获取所述第一终端前一次获取到的第一损失值,并将所述解密后的损失值记作第二损失值;
差值判断单元,用于计算所述第一损失值与所述第二损失值之间的差值,并判断所述差值是否小于或者等于预设阈值;
第一判定单元,用于当所述差值小于或者等于预设阈值时,则判定所述待训练模型处于收敛状态;
第二判定单元,用于当所述差值大于预设阈值时,则判定所述待训练模型未处于收敛状态。
其中,上述基于联邦学习的模型参数训练装置中各个模块的功能实现与上述基于联邦学习的模型参数训练方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。
本申请还提供一种存储介质,该存储介质上存储有基于联邦学习的模型参数训练程序,所述基于联邦学习的模型参数训练程序被处理器执行时实现如以上任一项实施例所述的基于联邦学习的模型参数训练方法的步骤。
本申请存储介质的具体实施例与上述基于联邦学习的模型参数训练方法各实施例基本相同,在此不作赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种基于联邦学习的模型参数训练方法,其中,所述基于联邦学习的模型参数训练方法包括:
    当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端根据所述加密后的第二数据得到损失加密值和第一梯度加密值;
    随机生成与所述第一梯度加密值同维度的随机向量,基于所述随机向量对所述第一梯度加密值进行模糊,并将模糊后的第一梯度加密值和所述损失加密值发送至所述第二终端;
    在接收到所述第二终端基于所述模糊后的第一梯度加密值和所述损失加密值返回的解密后的第一梯度值和损失值时,根据所述解密后的损失值检测待训练模型是否处于收敛状态;
    若检测到所述待训练模型处于收敛状态,则根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,并将与所述第二梯度值对应的样本参数确定为所述待训练模型的模型参数。
  2. 如权利要求1所述的基于联邦学习的模型参数训练方法,其中,所述当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端根据所述加密后的第二数据得到损失加密值和第一梯度加密值的步骤包括:
    当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端获取对应的第一数据,及与所述第一数据对应的样本标签;
    基于所述第一数据、所述加密后的第二数据、所述样本标签和预设损失函数计算损失值,并采用同态加密算法加密所述损失值,得到加密的损失值,记作损失加密值;
    根据所述预设损失函数得到梯度函数,并根据所述梯度函数计算得到第一梯度值,并采用同态加密算法加密所述第一梯度值,得到加密的第一梯度值,记作第一梯度加密值。
  3. 如权利要求2所述的基于联邦学习的模型参数训练方法,其中,所述基于联邦学习的模型参数训练方法还包括:
    根据所述加密后的第二数据和所述第一数据计算得到加密中间结果,通过预设公钥对所述加密中间结果进行加密,得到双重加密中间结果;
    将所述双重加密中间结果发送至所述第二终端,以使得所述第二终端基于所述双重加密中间结果计算得到双重加密梯度值;
    在接收到所述第二终端返回的所述双重加密梯度值时,通过与所述预设公钥对应的私钥对所述双重加密梯度值进行解密,并将解密后的双重加密梯度值发送至所述第二终端,以使得所述第二终端对所述解密后的双重加密梯度值进行解密,得到所述第二终端的梯度值。
  4. 如权利要求2所述的基于联邦学习的模型参数训练方法,其中,所述基于联邦学习的模型参数训练方法还包括:
    接收所述第二终端发送的加密样本数据,根据所述加密样本数据和所述第一数据得到所述第二终端的第一部分梯度值,并采用同态加密算法加密所述第一部分梯度值,得到加密的第一部分梯度值,记作第二梯度加密值;
    将所述第二梯度加密值发送至所述第二终端,以使得所述第二终端基于所述第二梯度加密值和根据所述第二数据计算得到的第二部分梯度值,得到所述第二终端的梯度值。
  5. 如权利要求3所述的基于联邦学习的模型参数训练方法,其中,所述根据所述解密后的损失值检测待训练模型是否处于收敛状态的步骤之后,还包括:
    若检测到所述待训练模型未处于收敛状态,则根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,更新所述第二梯度值,并根据更新后的第二梯度值,对应更新样本参数;
    生成对应的梯度值更新指令,并发送至所述第二终端,以使得所述第二终端根据所述梯度值更新指令更新所述第二终端的梯度值,并根据更新后的第二终端的梯度值更新对应的样本参数。
  6. 如权利要求1所述的基于联邦学习的模型参数训练方法,其中,所述根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,并将与所述第二梯度值对应的样本参数确定为所述待训练模型的模型参数的步骤之后,还包括:
    当所述第一终端确定模型参数,且接收到执行请求后,所述第一终端将所述执行请求发送给所述第二终端,以使得所述第二终端在接收到所述执行请求后,根据对应的模型参数和与所述执行请求对应特征变量的变量值返回第一预测分数给所述第一终端;
    当接收到所述第一预测分数后,根据确定的所述模型参数和与所述执行请求对应特征变量的变量值,计算第二预测分数;
    将所述第一预测分数和所述第二预测分数相加,得到预测分数总和,并根据所述预测分数总和输入所述待训练模型中,得到模型分数,并根据所述模型分数确定是否执行所述执行请求。
  7. 如权利要求1所述的基于联邦学习的模型参数训练方法,其中,所述根据所述解密后的损失值检测待训练模型是否处于收敛状态的步骤包括:
    获取所述第一终端前一次获取到的第一损失值,并将所述解密后的损失值记作第二损失值;
    计算所述第一损失值与所述第二损失值之间的差值,并判断所述差值是否小于或者等于预设阈值;
    当所述差值小于或者等于预设阈值时,则判定所述待训练模型处于收敛状态;
    当所述差值大于预设阈值时,则判定所述待训练模型未处于收敛状态。
  8. 一种基于联邦学习的模型参数训练装置,其中,所述基于联邦学习的模型参数训练装置包括:
    数据获取模块,用于当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端根据所述加密后的第二数据得到损失加密值和第一梯度加密值;
    第一发送模块,用于随机生成与所述第一梯度加密值同维度的随机向量,基于所述随机向量对所述第一梯度加密值进行模糊,并将模糊后的第一梯度加密值和所述损失加密值发送至所述第二终端;
    模型检测模块,用于在接收到所述第二终端基于所述模糊后的第一梯度加密值和所述损失加密值返回的解密后的第一梯度值和损失值时,根据所述解密后的损失值检测待训练模型是否处于收敛状态;
    参数确定模块,用于若检测到所述待训练模型处于收敛状态,则根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,并将与所述第二梯度值对应的样本参数确定为所述待训练模型的模型参数。
  9. 如权利要求8所述的基于联邦学习的模型参数训练装置,其中,所述数据获取模块包括:
    第一获取单元,用于当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端获取对应的第一数据,及与所述第一数据对应的样本标签;
    第一加密单元,用于基于所述第一数据、所述加密后的第二数据、所述样 本标签和预设损失函数计算损失值,并采用同态加密算法加密所述损失值,得到加密的损失值,记作损失加密值;
    第二加密单元,用于根据所述预设损失函数得到梯度函数,并根据所述梯度函数计算得到第一梯度值,并采用同态加密算法加密所述第一梯度值,得到加密的第一梯度值,记作第一梯度加密值。
  10. 如权利要求9所述的基于联邦学习的模型参数训练装置,其中,所述基于联邦学习的模型参数训练装置还包括:
    第一加密模块,用于根据所述加密后的第二数据和所述第一数据计算得到加密中间结果,通过预设公钥对所述加密中间结果进行加密,得到双重加密中间结果;
    第一计算模块,用于将所述双重加密中间结果发送至所述第二终端,以使得所述第二终端基于所述双重加密中间结果计算得到双重加密梯度值;
    第二解密模块,用于在接收到所述第二终端返回的所述双重加密梯度值时,通过与所述预设公钥对应的私钥对所述双重加密梯度值进行解密,并将解密后的双重加密梯度值发送至所述第二终端,以使得所述第二终端对所述解密后的双重加密梯度值进行解密,得到所述第二终端的梯度值。
  11. 如权利要求9所述的基于联邦学习的模型参数训练装置,其中,所述基于联邦学习的模型参数训练装置还包括:
    第二加密模块,用于接收所述第二终端发送的加密样本数据,根据所述加密样本数据和所述第一数据得到所述第二终端的第一部分梯度值,并采用同态加密算法加密所述第一部分梯度值,得到加密的第一部分梯度值,记作第二梯度加密值;
    第二发送模块,用于将所述第二梯度加密值发送至所述第二终端,以使得所述第二终端基于所述第二梯度加密值和根据所述第二数据计算得到的第二部分梯度值,得到所述第二终端的梯度值。
  12. 如权利要求10所述的基于联邦学习的模型参数训练装置,其中,所述基于联邦学习的模型参数训练装置还包括:
    参数更新模块,用于若检测到所述待训练模型未处于收敛状态,则根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,更新所述第二梯度值,并根据更新后的第二梯度值,对应更新样本参数;
    指令发送模块,用于生成对应的梯度值更新指令,并发送至所述第二终端, 以使得所述第二终端根据所述梯度值更新指令更新所述第二终端的梯度值,并根据更新后的第二终端的梯度值更新对应的样本参数。
  13. 如权利要求8所述的基于联邦学习的模型参数训练装置,其中,所述基于联邦学习的模型参数训练装置还包括:
    第三发送模块,用于当所述第一终端确定模型参数,且接收到执行请求后,所述第一终端将所述执行请求发送给所述第二终端,以使得所述第二终端在接收到所述执行请求后,根据对应的模型参数和与所述执行请求对应特征变量的变量值返回第一预测分数给所述第一终端;
    第二计算模块,用于当接收到所述第一预测分数后,根据确定的所述模型参数和与所述执行请求对应特征变量的变量值,计算第二预测分数;
    分数获取模块,用于将所述第一预测分数和所述第二预测分数相加,得到预测分数总和,并根据所述预测分数总和输入所述待训练模型中,得到模型分数,并根据所述模型分数确定是否执行所述执行请求。
  14. 如权利要求8所述的基于联邦学习的模型参数训练装置,其中,所述模型检测模块包括:
    第二获取单元,用于获取所述第一终端前一次获取到的第一损失值,并将所述解密后的损失值记作第二损失值;
    差值判断单元,用于计算所述第一损失值与所述第二损失值之间的差值,并判断所述差值是否小于或者等于预设阈值;
    第一判定单元,用于当所述差值小于或者等于预设阈值时,则判定所述待训练模型处于收敛状态;
    第二判定单元,用于当所述差值大于预设阈值时,则判定所述待训练模型未处于收敛状态。
  15. 一种基于联邦学习的模型参数训练设备,其中,所述基于联邦学习的模型参数训练设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的基于联邦学习的模型参数训练程序,所述基于联邦学习的模型参数训练程序被所述处理器执行时实现如下步骤:
    当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端根据所述加密后的第二数据得到损失加密值和第一梯度加密值;
    随机生成与所述第一梯度加密值同维度的随机向量,基于所述随机向量对 所述第一梯度加密值进行模糊,并将模糊后的第一梯度加密值和所述损失加密值发送至所述第二终端;
    在接收到所述第二终端基于所述模糊后的第一梯度加密值和所述损失加密值返回的解密后的第一梯度值和损失值时,根据所述解密后的损失值检测待训练模型是否处于收敛状态;
    若检测到所述待训练模型处于收敛状态,则根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,并将与所述第二梯度值对应的样本参数确定为所述待训练模型的模型参数。
  16. 如权利要求15所述的基于联邦学习的模型参数训练设备,其中,所述基于联邦学习的模型参数训练程序被所述处理器执行时还实现如下步骤:
    当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端获取对应的第一数据,及与所述第一数据对应的样本标签;
    基于所述第一数据、所述加密后的第二数据、所述样本标签和预设损失函数计算损失值,并采用同态加密算法加密所述损失值,得到加密的损失值,记作损失加密值;
    根据所述预设损失函数得到梯度函数,并根据所述梯度函数计算得到第一梯度值,并采用同态加密算法加密所述第一梯度值,得到加密的第一梯度值,记作第一梯度加密值。
  17. 如权利要求16所述的基于联邦学习的模型参数训练设备,其中,所述基于联邦学习的模型参数训练程序被所述处理器执行时还实现如下步骤:
    根据所述加密后的第二数据和所述第一数据计算得到加密中间结果,通过预设公钥对所述加密中间结果进行加密,得到双重加密中间结果;
    将所述双重加密中间结果发送至所述第二终端,以使得所述第二终端基于所述双重加密中间结果计算得到双重加密梯度值;
    在接收到所述第二终端返回的所述双重加密梯度值时,通过与所述预设公钥对应的私钥对所述双重加密梯度值进行解密,并将解密后的双重加密梯度值发送至所述第二终端,以使得所述第二终端对所述解密后的双重加密梯度值进行解密,得到所述第二终端的梯度值。
  18. 一种存储介质,其中,所述存储介质上存储有基于联邦学习的模型参数训练程序,所述基于联邦学习的模型参数训练程序被处理器执行时实现如下步骤:
    当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端根据所述加密后的第二数据得到损失加密值和第一梯度加密值;
    随机生成与所述第一梯度加密值同维度的随机向量,基于所述随机向量对所述第一梯度加密值进行模糊,并将模糊后的第一梯度加密值和所述损失加密值发送至所述第二终端;
    在接收到所述第二终端基于所述模糊后的第一梯度加密值和所述损失加密值返回的解密后的第一梯度值和损失值时,根据所述解密后的损失值检测待训练模型是否处于收敛状态;
    若检测到所述待训练模型处于收敛状态,则根据所述随机向量和所述解密后的第一梯度值得到第二梯度值,并将与所述第二梯度值对应的样本参数确定为所述待训练模型的模型参数。
  19. 如权利要求18所述的存储介质,其中,所述基于联邦学习的模型参数训练程序被处理器执行时还实现如下步骤:
    当第一终端接收到第二终端发送的加密后的第二数据时,所述第一终端获取对应的第一数据,及与所述第一数据对应的样本标签;
    基于所述第一数据、所述加密后的第二数据、所述样本标签和预设损失函数计算损失值,并采用同态加密算法加密所述损失值,得到加密的损失值,记作损失加密值;
    根据所述预设损失函数得到梯度函数,并根据所述梯度函数计算得到第一梯度值,并采用同态加密算法加密所述第一梯度值,得到加密的第一梯度值,记作第一梯度加密值。
  20. 如权利要求19所述的存储介质,其中,所述基于联邦学习的模型参数训练程序被处理器执行时还实现如下步骤:
    根据所述加密后的第二数据和所述第一数据计算得到加密中间结果,通过预设公钥对所述加密中间结果进行加密,得到双重加密中间结果;
    将所述双重加密中间结果发送至所述第二终端,以使得所述第二终端基于所述双重加密中间结果计算得到双重加密梯度值;
    在接收到所述第二终端返回的所述双重加密梯度值时,通过与所述预设公钥对应的私钥对所述双重加密梯度值进行解密,并将解密后的双重加密梯度值发送至所述第二终端,以使得所述第二终端对所述解密后的双重加密梯度值进行解密,得到所述第二终端的梯度值。
PCT/CN2019/119227 2019-03-01 2019-11-18 基于联邦学习的模型参数训练方法、装置、设备及介质 WO2020177392A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP19917861.7A EP3893170B1 (en) 2019-03-01 2019-11-18 Federated learning-based model parameter training method, apparatus and device, and medium
SG11202108137PA SG11202108137PA (en) 2019-03-01 2019-11-18 Model parameter training method, apparatus, and device based on federation learning, and medium
US17/349,175 US20210312334A1 (en) 2019-03-01 2021-06-16 Model parameter training method, apparatus, and device based on federation learning, and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910158538.8A CN109886417B (zh) 2019-03-01 2019-03-01 基于联邦学习的模型参数训练方法、装置、设备及介质
CN201910158538.8 2019-03-01

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/349,175 Continuation US20210312334A1 (en) 2019-03-01 2021-06-16 Model parameter training method, apparatus, and device based on federation learning, and medium

Publications (1)

Publication Number Publication Date
WO2020177392A1 true WO2020177392A1 (zh) 2020-09-10

Family

ID=66930508

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119227 WO2020177392A1 (zh) 2019-03-01 2019-11-18 基于联邦学习的模型参数训练方法、装置、设备及介质

Country Status (5)

Country Link
US (1) US20210312334A1 (zh)
EP (1) EP3893170B1 (zh)
CN (1) CN109886417B (zh)
SG (1) SG11202108137PA (zh)
WO (1) WO2020177392A1 (zh)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150280A (zh) * 2020-10-16 2020-12-29 北京百度网讯科技有限公司 提升匹配效率的联邦学习方法及设备、电子设备和介质
CN112232528A (zh) * 2020-12-15 2021-01-15 之江实验室 一种联邦学习模型训练方法、装置及联邦学习系统
CN112231309A (zh) * 2020-10-14 2021-01-15 深圳前海微众银行股份有限公司 纵向联邦数据统计的去重方法、装置、终端设备及介质
CN112330048A (zh) * 2020-11-18 2021-02-05 中国光大银行股份有限公司 评分卡模型训练方法、装置、存储介质及电子装置
CN112633409A (zh) * 2020-12-31 2021-04-09 深圳前海微众银行股份有限公司 预测方法、纵向联邦学习和横向联邦学习的模型训练方法
CN112949741A (zh) * 2021-03-18 2021-06-11 西安电子科技大学 基于同态加密的卷积神经网络图像分类方法
CN112966307A (zh) * 2021-04-20 2021-06-15 钟爱健康科技(广东)有限公司 一种基于联邦学习张量因子分解的医疗隐私数据保护方法
CN113011599A (zh) * 2021-03-23 2021-06-22 上海嗨普智能信息科技股份有限公司 基于异构数据的联邦学习系统
CN113190872A (zh) * 2021-05-28 2021-07-30 脸萌有限公司 数据保护方法、网络结构训练方法、装置、介质及设备
CN113297602A (zh) * 2021-06-17 2021-08-24 深圳前海微众银行股份有限公司 数据处理方法、装置、设备及存储介质
CN113435592A (zh) * 2021-05-22 2021-09-24 西安电子科技大学 一种隐私保护的神经网络多方协作无损训练方法及系统
CN113496258A (zh) * 2021-06-28 2021-10-12 成都金融梦工场投资管理有限公司 一种基于边缘计算的物联网设备非共享数据训练方法
CN113657616A (zh) * 2021-09-02 2021-11-16 京东科技信息技术有限公司 联邦学习模型的更新方法和装置
CN113762531A (zh) * 2021-03-19 2021-12-07 北京沃东天骏信息技术有限公司 一种联邦学习系统
CN113836559A (zh) * 2021-09-28 2021-12-24 中国银联股份有限公司 一种联邦学习中的样本对齐方法、装置、设备及存储介质
CN113923225A (zh) * 2020-11-16 2022-01-11 京东科技控股股份有限公司 基于分布式架构的联邦学习平台、方法、设备和存储介质
US20220060235A1 (en) * 2020-08-18 2022-02-24 Qualcomm Incorporated Federated learning for client-specific neural network parameter generation for wireless communication
CN114168988A (zh) * 2021-12-16 2022-03-11 大连理工大学 一种联邦学习模型聚合方法及电子装置
CN114511102A (zh) * 2022-02-28 2022-05-17 杭州博盾习言科技有限公司 用于跨特征联邦学习的数据处理方法、装置、系统及设备

Families Citing this family (77)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109886417B (zh) * 2019-03-01 2024-05-03 深圳前海微众银行股份有限公司 基于联邦学习的模型参数训练方法、装置、设备及介质
CN110263908B (zh) * 2019-06-20 2024-04-02 深圳前海微众银行股份有限公司 联邦学习模型训练方法、设备、系统及存储介质
CN112149706B (zh) * 2019-06-28 2024-03-15 北京百度网讯科技有限公司 模型训练方法、装置、设备和介质
CN112149141B (zh) * 2019-06-28 2023-08-29 北京百度网讯科技有限公司 模型训练方法、装置、设备和介质
CN110263921B (zh) * 2019-06-28 2021-06-04 深圳前海微众银行股份有限公司 一种联邦学习模型的训练方法及装置
CN112149174B (zh) * 2019-06-28 2024-03-12 北京百度网讯科技有限公司 模型训练方法、装置、设备和介质
CN112182594B (zh) * 2019-07-02 2023-08-04 北京百度网讯科技有限公司 一种数据加密方法及装置
CN112182595B (zh) 2019-07-03 2024-03-26 北京百度网讯科技有限公司 基于联邦学习的模型训练方法及装置
CN110399742B (zh) * 2019-07-29 2020-12-18 深圳前海微众银行股份有限公司 一种联邦迁移学习模型的训练、预测方法及装置
CN110414688A (zh) * 2019-07-29 2019-11-05 卓尔智联(武汉)研究院有限公司 信息分析方法、装置、服务器及存储介质
CN110472745B (zh) * 2019-08-06 2021-04-27 深圳前海微众银行股份有限公司 一种联邦学习中的信息传输方法及装置
CN110728375B (zh) * 2019-10-16 2021-03-19 支付宝(杭州)信息技术有限公司 多个计算单元联合训练逻辑回归模型的方法和装置
CN110807528B (zh) * 2019-10-30 2024-11-05 深圳前海微众银行股份有限公司 特征相关性计算方法、设备及计算机可读存储介质
CN110991512B (zh) * 2019-11-26 2023-08-04 广东美的白色家电技术创新中心有限公司 物体识别模型的联合训练方法、服务器及电器设备
CN110990857B (zh) * 2019-12-11 2021-04-06 支付宝(杭州)信息技术有限公司 保护隐私安全的多方联合进行特征评估的方法及装置
CN110995737B (zh) * 2019-12-13 2022-08-02 支付宝(杭州)信息技术有限公司 联邦学习的梯度融合方法及装置和电子设备
CN111144576A (zh) * 2019-12-13 2020-05-12 支付宝(杭州)信息技术有限公司 模型训练方法、装置和电子设备
CN110955907B (zh) * 2019-12-13 2022-03-25 支付宝(杭州)信息技术有限公司 一种基于联邦学习的模型训练方法
CN111125735B (zh) * 2019-12-20 2021-11-02 支付宝(杭州)信息技术有限公司 一种基于隐私数据进行模型训练的方法及系统
CN111143878B (zh) * 2019-12-20 2021-08-03 支付宝(杭州)信息技术有限公司 一种基于隐私数据进行模型训练的方法及系统
CN111178524B (zh) * 2019-12-24 2024-06-14 中国平安人寿保险股份有限公司 基于联邦学习的数据处理方法、装置、设备及介质
CN111190487A (zh) * 2019-12-30 2020-05-22 中国科学院计算技术研究所 一种建立数据分析模型的方法
WO2021142703A1 (zh) * 2020-01-16 2021-07-22 深圳前海微众银行股份有限公司 基于联邦迁移学习的参数处理方法、设备及存储介质
CN111241567B (zh) * 2020-01-16 2023-09-01 深圳前海微众银行股份有限公司 纵向联邦学习中的数据共享方法、系统及存储介质
CN111260061B (zh) * 2020-03-09 2022-07-19 厦门大学 联邦学习梯度交换中的差异化加噪方法及系统
CN111401621B (zh) * 2020-03-10 2023-06-23 深圳前海微众银行股份有限公司 基于联邦学习的预测方法、装置、设备及存储介质
CN111428887B (zh) * 2020-03-19 2023-05-12 腾讯云计算(北京)有限责任公司 一种基于多个计算节点的模型训练控制方法、装置及系统
CN111415015B (zh) * 2020-03-27 2021-06-04 支付宝(杭州)信息技术有限公司 业务模型训练方法、装置、系统及电子设备
US11645582B2 (en) 2020-03-27 2023-05-09 International Business Machines Corporation Parameter sharing in federated learning
CN111178547B (zh) * 2020-04-10 2020-07-17 支付宝(杭州)信息技术有限公司 一种基于隐私数据进行模型训练的方法及系统
CN111177768A (zh) * 2020-04-10 2020-05-19 支付宝(杭州)信息技术有限公司 保护数据隐私的双方联合训练业务预测模型的方法和装置
CN111783139B (zh) * 2020-06-29 2024-07-19 京东科技控股股份有限公司 联邦学习分类树构建方法、模型构建方法,及终端设备
CN111722043B (zh) * 2020-06-29 2021-09-14 南方电网科学研究院有限责任公司 一种电力设备故障检测方法、装置及系统
CN111768008B (zh) * 2020-06-30 2023-06-16 平安科技(深圳)有限公司 联邦学习方法、装置、设备和存储介质
CN111797999A (zh) * 2020-07-10 2020-10-20 深圳前海微众银行股份有限公司 纵向联邦建模优化方法、装置、设备及可读存储介质
CN111856934B (zh) * 2020-07-16 2022-11-15 南京大量数控科技有限公司 一种同构智能车间之间的联邦学习数据处理算法
CN112102939B (zh) * 2020-07-24 2023-08-04 西安电子科技大学 心脑血管疾病参考信息预测系统、方法、装置及电子设备
CN114066116A (zh) * 2020-08-05 2022-02-18 新智数字科技有限公司 用于锅炉负荷率与能效回归模型的训练方法和装置
CN111915019B (zh) * 2020-08-07 2023-06-20 平安科技(深圳)有限公司 联邦学习方法、系统、计算机设备和存储介质
CN111986804B (zh) * 2020-08-31 2024-12-10 深圳平安医疗健康科技服务有限公司 基于体温数据进行模型训练的方法、装置和计算机设备
CN112241537B (zh) * 2020-09-23 2023-02-10 易联众信息技术股份有限公司 纵向联邦学习建模方法、系统、介质及设备
CN111935179B (zh) * 2020-09-23 2021-01-12 支付宝(杭州)信息技术有限公司 一种基于可信执行环境的模型训练方法和装置
CN112016632B (zh) * 2020-09-25 2024-04-26 北京百度网讯科技有限公司 模型联合训练方法、装置、设备和存储介质
US11902424B2 (en) * 2020-11-20 2024-02-13 International Business Machines Corporation Secure re-encryption of homomorphically encrypted data
CN113806759B (zh) * 2020-12-28 2024-07-16 京东科技控股股份有限公司 联邦学习模型的训练方法、装置、电子设备和存储介质
CA3143855A1 (en) * 2020-12-30 2022-06-30 Atb Financial Systems and methods for federated learning on blockchain
CN114691167A (zh) * 2020-12-31 2022-07-01 华为技术有限公司 机器学习模型更新的方法和装置
CN112347500B (zh) * 2021-01-11 2021-04-09 腾讯科技(深圳)有限公司 分布式系统的机器学习方法、装置、系统、设备及存储介质
CN112765898B (zh) * 2021-01-29 2024-05-10 上海明略人工智能(集团)有限公司 多任务联合训练模型方法、系统、电子设备和存储介质
CN112818374B (zh) * 2021-03-02 2025-06-10 深圳前海微众银行股份有限公司 一种模型的联合训练方法、设备、存储介质及程序产品
US12229280B2 (en) * 2021-03-16 2025-02-18 Accenture Global Solutions Limited Privacy preserving cooperative learning in untrusted environments
CN112949760B (zh) * 2021-03-30 2024-05-10 平安科技(深圳)有限公司 基于联邦学习的模型精度控制方法、装置及存储介质
CN112906912A (zh) * 2021-04-01 2021-06-04 深圳市洞见智慧科技有限公司 纵向联邦学习中无可信第三方的回归模型训练方法及系统
CN113239023A (zh) * 2021-04-20 2021-08-10 浙江大学德清先进技术与产业研究院 一种面向遥感数据的联邦学习模型训练方法
CN113033828B (zh) * 2021-04-29 2022-03-22 江苏超流信息技术有限公司 模型训练方法、使用方法、系统、可信节点及设备
CN113268758B (zh) * 2021-06-17 2022-11-04 上海万向区块链股份公司 基于联邦学习的数据共享系统、方法、介质及设备
CN113536667B (zh) * 2021-06-22 2024-03-01 同盾科技有限公司 联邦模型训练方法、装置、可读存储介质及设备
CN113378198B (zh) * 2021-06-24 2022-04-15 深圳市洞见智慧科技有限公司 一种保护用户标识的模型的联邦训练系统、方法及装置
CN113239391B (zh) * 2021-07-13 2023-01-10 深圳市洞见智慧科技有限公司 一种无第三方的逻辑回归联邦学习模型训练系统及方法
CN113704779A (zh) * 2021-07-16 2021-11-26 杭州医康慧联科技股份有限公司 加密的分布式机器学习训练方法
CN113537493B (zh) * 2021-07-23 2023-12-08 深圳宏芯宇电子股份有限公司 人工智能模型训练方法、装置、远端平台和可读存储介质
CN113642740B (zh) * 2021-08-12 2023-08-01 百度在线网络技术(北京)有限公司 模型训练方法及装置、电子设备和介质
CN113657613B (zh) * 2021-08-23 2024-08-30 北京易真学思教育科技有限公司 预测模型训练方法、数据处理装置和系统
CN113537516B (zh) 2021-09-15 2021-12-14 北京百度网讯科技有限公司 分布式机器学习模型的训练方法、装置、设备和介质
CN113543120B (zh) * 2021-09-17 2021-11-23 百融云创科技股份有限公司 一种基于联邦学习的移动终端信用反欺诈预估方法及系统
CN113947215A (zh) * 2021-10-26 2022-01-18 平安科技(深圳)有限公司 联邦学习管理方法、装置、计算机设备及存储介质
CN116070255A (zh) * 2021-11-03 2023-05-05 航天信息股份有限公司 一种数据隐私计算方法、装置、设备及介质
CN114006769B (zh) * 2021-11-25 2024-02-06 中国银行股份有限公司 基于横向联邦学习的模型训练方法及其设备
CN114429223B (zh) * 2022-01-26 2023-11-07 上海富数科技有限公司 异构模型建立方法及装置
CN114580663B (zh) * 2022-03-01 2025-05-02 浙江大学 面向数据非独立同分布场景的联邦学习方法及系统
CN114611720B (zh) * 2022-03-14 2023-08-08 抖音视界有限公司 联邦学习模型训练方法、电子设备及存储介质
CN115021985B (zh) * 2022-05-23 2023-06-16 北京融数联智科技有限公司 一种无需第三方参与的逻辑回归模型训练方法及系统
CN114996733B (zh) * 2022-06-07 2023-10-20 光大科技有限公司 一种聚合模型更新处理方法及装置
CN115378707B (zh) * 2022-08-23 2024-03-29 西安电子科技大学 基于门限同态的自适应采样联邦学习隐私保护方法
CN115169589B (zh) * 2022-09-06 2023-01-24 北京瑞莱智慧科技有限公司 一种参数更新方法、数据处理方法及相关设备
CN116401683A (zh) * 2023-03-10 2023-07-07 支付宝(杭州)信息技术有限公司 一种模型训练方法、装置、存储介质以及电子设备
CN116886271B (zh) * 2023-09-07 2023-11-21 蓝象智联(杭州)科技有限公司 一种用于纵向联邦XGboost模型训练的梯度聚合方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165725A (zh) * 2018-08-10 2019-01-08 深圳前海微众银行股份有限公司 基于迁移学习的神经网络联邦建模方法、设备及存储介质
CN109165515A (zh) * 2018-08-10 2019-01-08 深圳前海微众银行股份有限公司 基于联邦学习的模型参数获取方法、系统及可读存储介质
CN109255444A (zh) * 2018-08-10 2019-01-22 深圳前海微众银行股份有限公司 基于迁移学习的联邦建模方法、设备及可读存储介质
CN109886417A (zh) * 2019-03-01 2019-06-14 深圳前海微众银行股份有限公司 基于联邦学习的模型参数训练方法、装置、设备及介质

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9749128B2 (en) * 2014-05-15 2017-08-29 Xerox Corporation Compact fuzzy private matching using a fully-homomorphic encryption scheme
US10320752B2 (en) * 2014-10-24 2019-06-11 National Ict Australia Limited Gradients over distributed datasets
EP3203679A1 (en) * 2016-02-04 2017-08-09 ABB Schweiz AG Machine learning based on homomorphic encryption
EP3958158B1 (en) * 2017-03-22 2023-04-26 Visa International Service Association Privacy-preserving machine learning
CN109754105B (zh) * 2017-11-07 2024-01-05 华为技术有限公司 一种预测方法及终端、服务器
CN109325584B (zh) * 2018-08-10 2021-06-25 深圳前海微众银行股份有限公司 基于神经网络的联邦建模方法、设备及可读存储介质
CN109189825B (zh) * 2018-08-10 2022-03-15 深圳前海微众银行股份有限公司 横向数据切分联邦学习建模方法、服务器及介质
US10970402B2 (en) * 2018-10-19 2021-04-06 International Business Machines Corporation Distributed learning preserving model security
CN109461001B (zh) * 2018-10-22 2021-07-09 创新先进技术有限公司 基于第二模型获取第一模型的训练样本的方法和装置
CN109167695B (zh) * 2018-10-26 2021-12-28 深圳前海微众银行股份有限公司 基于联邦学习的联盟网络构建方法、设备及可读存储介质
US11469878B2 (en) * 2019-01-28 2022-10-11 The Toronto-Dominion Bank Homomorphic computations on encrypted data within a distributed computing environment
US11343068B2 (en) * 2019-02-06 2022-05-24 International Business Machines Corporation Secure multi-party learning and inferring insights based on encrypted data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165725A (zh) * 2018-08-10 2019-01-08 深圳前海微众银行股份有限公司 基于迁移学习的神经网络联邦建模方法、设备及存储介质
CN109165515A (zh) * 2018-08-10 2019-01-08 深圳前海微众银行股份有限公司 基于联邦学习的模型参数获取方法、系统及可读存储介质
CN109255444A (zh) * 2018-08-10 2019-01-22 深圳前海微众银行股份有限公司 基于迁移学习的联邦建模方法、设备及可读存储介质
CN109886417A (zh) * 2019-03-01 2019-06-14 深圳前海微众银行股份有限公司 基于联邦学习的模型参数训练方法、装置、设备及介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3893170A4 *

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220060235A1 (en) * 2020-08-18 2022-02-24 Qualcomm Incorporated Federated learning for client-specific neural network parameter generation for wireless communication
US11909482B2 (en) * 2020-08-18 2024-02-20 Qualcomm Incorporated Federated learning for client-specific neural network parameter generation for wireless communication
CN112231309B (zh) * 2020-10-14 2024-05-07 深圳前海微众银行股份有限公司 纵向联邦数据统计的去重方法、装置、终端设备及介质
CN112231309A (zh) * 2020-10-14 2021-01-15 深圳前海微众银行股份有限公司 纵向联邦数据统计的去重方法、装置、终端设备及介质
CN112150280A (zh) * 2020-10-16 2020-12-29 北京百度网讯科技有限公司 提升匹配效率的联邦学习方法及设备、电子设备和介质
CN112150280B (zh) * 2020-10-16 2023-06-30 北京百度网讯科技有限公司 提升匹配效率的联邦学习方法及设备、电子设备和介质
CN113923225A (zh) * 2020-11-16 2022-01-11 京东科技控股股份有限公司 基于分布式架构的联邦学习平台、方法、设备和存储介质
CN112330048A (zh) * 2020-11-18 2021-02-05 中国光大银行股份有限公司 评分卡模型训练方法、装置、存储介质及电子装置
CN112232528B (zh) * 2020-12-15 2021-03-09 之江实验室 一种联邦学习模型训练方法、装置及联邦学习系统
CN112232528A (zh) * 2020-12-15 2021-01-15 之江实验室 一种联邦学习模型训练方法、装置及联邦学习系统
CN112633409A (zh) * 2020-12-31 2021-04-09 深圳前海微众银行股份有限公司 预测方法、纵向联邦学习和横向联邦学习的模型训练方法
CN112949741A (zh) * 2021-03-18 2021-06-11 西安电子科技大学 基于同态加密的卷积神经网络图像分类方法
CN112949741B (zh) * 2021-03-18 2023-04-07 西安电子科技大学 基于同态加密的卷积神经网络图像分类方法
CN113762531A (zh) * 2021-03-19 2021-12-07 北京沃东天骏信息技术有限公司 一种联邦学习系统
CN113011599A (zh) * 2021-03-23 2021-06-22 上海嗨普智能信息科技股份有限公司 基于异构数据的联邦学习系统
CN112966307B (zh) * 2021-04-20 2023-08-22 钟爱健康科技(广东)有限公司 一种基于联邦学习张量因子分解的医疗隐私数据保护方法
CN112966307A (zh) * 2021-04-20 2021-06-15 钟爱健康科技(广东)有限公司 一种基于联邦学习张量因子分解的医疗隐私数据保护方法
CN113435592B (zh) * 2021-05-22 2023-09-22 西安电子科技大学 一种隐私保护的神经网络多方协作无损训练方法及系统
CN113435592A (zh) * 2021-05-22 2021-09-24 西安电子科技大学 一种隐私保护的神经网络多方协作无损训练方法及系统
CN113190872A (zh) * 2021-05-28 2021-07-30 脸萌有限公司 数据保护方法、网络结构训练方法、装置、介质及设备
CN113297602A (zh) * 2021-06-17 2021-08-24 深圳前海微众银行股份有限公司 数据处理方法、装置、设备及存储介质
CN113496258A (zh) * 2021-06-28 2021-10-12 成都金融梦工场投资管理有限公司 一种基于边缘计算的物联网设备非共享数据训练方法
CN113657616A (zh) * 2021-09-02 2021-11-16 京东科技信息技术有限公司 联邦学习模型的更新方法和装置
CN113657616B (zh) * 2021-09-02 2023-11-03 京东科技信息技术有限公司 联邦学习模型的更新方法和装置
CN113836559A (zh) * 2021-09-28 2021-12-24 中国银联股份有限公司 一种联邦学习中的样本对齐方法、装置、设备及存储介质
CN114168988A (zh) * 2021-12-16 2022-03-11 大连理工大学 一种联邦学习模型聚合方法及电子装置
CN114168988B (zh) * 2021-12-16 2024-05-03 大连理工大学 一种联邦学习模型聚合方法及电子装置
CN114511102A (zh) * 2022-02-28 2022-05-17 杭州博盾习言科技有限公司 用于跨特征联邦学习的数据处理方法、装置、系统及设备
CN114511102B (zh) * 2022-02-28 2025-02-07 杭州博盾习言科技有限公司 用于跨特征联邦学习的数据处理方法、装置、系统及设备

Also Published As

Publication number Publication date
SG11202108137PA (en) 2021-08-30
US20210312334A1 (en) 2021-10-07
EP3893170C0 (en) 2024-02-28
EP3893170A1 (en) 2021-10-13
EP3893170A4 (en) 2022-08-31
CN109886417A (zh) 2019-06-14
EP3893170B1 (en) 2024-02-28
CN109886417B (zh) 2024-05-03

Similar Documents

Publication Publication Date Title
WO2020177392A1 (zh) 基于联邦学习的模型参数训练方法、装置、设备及介质
US11947680B2 (en) Model parameter training method, terminal, and system based on federation learning, and medium
US20210232974A1 (en) Federated-learning based method of acquiring model parameters, system and readable storage medium
CN106716914B (zh) 用于漫游的受保护内容的安全密钥管理
US9088580B2 (en) Access control based on user and service
CN110704860A (zh) 提升安全性的纵向联邦学习方法、设备、系统及存储介质
US12028460B2 (en) Verifying user interactions on a content platform
WO2021022717A1 (zh) 联邦学习中特征相关性分析方法、装置及可读存储介质
CN111401277A (zh) 人脸识别模型更新方法、装置、设备和介质
CN110519268B (zh) 基于区块链的投票方法、装置、设备、系统及存储介质
US20100124902A1 (en) Secure Data Exchange with Identity Information Exchange
CN116502732B (zh) 基于可信执行环境的联邦学习方法以及系统
US11860918B1 (en) Virtual secure rooms
US20240259201A1 (en) Virtual environment-to-real world secured communication channel
Sultan et al. A novel image-based homomorphic approach for preserving the privacy of autonomous vehicles connected to the cloud
WO2023142440A1 (zh) 一种图像加密、图像处理方法、装置、设备及介质
CN112087422A (zh) 一种边缘计算中基于属性加密的外包访问控制方法
CN114240347A (zh) 业务服务安全对接方法、装置、计算机设备、存储介质
CN111414636B (zh) 识别模型的更新方法、装置、设备及存储介质
Singh et al. Mutual authentication framework using fog computing in healthcare
CN116015627A (zh) 一种基于对称算法的人脸识别防篡改方法及系统
CN114978620B (zh) 身份标识号的加密方法和解密方法
CN118233132A (zh) 一种数据安全传输方法、装置、设备和介质
CN108696355B (zh) 一种防止用户头像盗用的方法及系统
CN110175283A (zh) 一种推荐模型的生成方法及装置

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: 19917861

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019917861

Country of ref document: EP

Effective date: 20210707

NENP Non-entry into the national phase

Ref country code: DE