WO2020173228A1 - 机器学习模型的联合训练方法、装置、设备及存储介质 - Google Patents

机器学习模型的联合训练方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2020173228A1
WO2020173228A1 PCT/CN2020/070857 CN2020070857W WO2020173228A1 WO 2020173228 A1 WO2020173228 A1 WO 2020173228A1 CN 2020070857 W CN2020070857 W CN 2020070857W WO 2020173228 A1 WO2020173228 A1 WO 2020173228A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
node
label
error
target model
Prior art date
Application number
PCT/CN2020/070857
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 京东数字科技控股有限公司
Publication of WO2020173228A1 publication Critical patent/WO2020173228A1/zh

Links

Images

Classifications

    • 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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning

Definitions

  • the present disclosure relates to the field of computer technology, and in particular to a joint training method of machine learning models, a joint training device of machine learning models, electronic equipment, and computer-readable storage media.
  • Machine learning is the core technology in the field of artificial intelligence, and its development largely determines the degree of artificial intelligence.
  • machine learning models are becoming more and more complex, and the amount of data and calculation required to train the model has greatly increased.
  • a method of joint training by multiple servers or terminals has appeared.
  • the existing joint training methods generally have potential security risks of data leakage, which limits their application in machine learning technology.
  • the present disclosure provides a joint training method of a machine learning model, a joint training device of a machine learning model, an electronic device and a computer-readable storage medium, thereby at least to some extent overcoming the existing joint training method with potential safety hazards.
  • a joint training method of a machine learning model which is applied to a joint training system
  • the joint training system includes a data node and a label node
  • the method includes: the data node is acquired for training The sample data; the data node processes the sample data through the first part of the target model to obtain intermediate data, and sends the intermediate data to the label node; the label node passes the second part of the target model Process the intermediate data, and obtain error data based on the label data corresponding to the sample data; the label node sends the error data to the data node; the data node adjusts the first data according to the error data Part of the parameters, and/or the tag node adjusts the parameters of the second part according to the error data; wherein, the target model is composed of the first part and the second part.
  • a joint training method of a machine learning model which is applied to a data node of a joint training system, the joint training system further includes a label node; the method includes: obtaining sample data for training Processing the sample data through the first part of the target model to obtain intermediate data; sending the intermediate data to the tag node; if error data is received from the tag node, adjusting the first part according to the error data Part of the parameters.
  • a joint training method of a machine learning model which is applied to a label node of a joint training system
  • the joint training system further includes a data node; the method includes: receiving intermediate data from the data node Data; process the intermediate data through the second part of the target model, and obtain error data based on the label data corresponding to the data index information; send the error data to the data node; adjust the target model according to the error data The parameters of the second part.
  • a joint training device for a machine learning model, which is applied to a data node of a joint training system, the joint training system further includes a label node; the device includes: an acquisition module for acquiring The processing module is used to process the sample data through the first part of the target model to obtain intermediate data; the sending module is used to send the intermediate data to the label node; the adjustment module is used to If error data is received from the tag node, the parameters of the first part are adjusted according to the error data.
  • a joint training device for a machine learning model, which is applied to a label node of a joint training system
  • the joint training system further includes a data node
  • the device includes: a receiving module for receiving The data node receives the intermediate data; the processing module is used to process the intermediate data through the second part of the target model, and the error data is obtained based on the tag data corresponding to the data index information; the sending module is used to send the error data to The data node; an adjustment module for adjusting the parameters of the second part of the target model according to the error data.
  • an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions Perform any of the above-mentioned joint training methods of machine learning models.
  • a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, a joint training method of any one of the above-mentioned machine learning models is realized.
  • the data node of the joint training system provides sample data for training, the label node provides label data, the data node obtains the intermediate data through the first part of the target model, and the label node obtains the error data through the second part of the target model.
  • the two nodes are separated Adjust the parameters according to the error data to realize the joint training of the target model.
  • a joint training method is proposed that is conducive to privacy protection.
  • the data node and the label node respectively hold one aspect of the data required for training and a part of the target model, and the data and model of one party are not for the other party. It can be seen that, therefore, the privacy and security of the data are guaranteed, and the needs of multiple business scenarios can be met, and the universal applicability of the joint training method can be improved.
  • the data node and the label node synchronize the data division processing, and respectively adjust the parameters according to the error data, thereby distributing the traditional model training task performed by a single host to two or more hosts
  • the overall computing power has been improved, which is conducive to improving efficiency.
  • Fig. 1 shows an architecture diagram of a joint training system of this exemplary embodiment
  • Fig. 2 shows a flow chart of a joint training method in this exemplary embodiment
  • Fig. 3 shows a schematic flow chart of a joint training method in this exemplary embodiment
  • Fig. 4 shows a schematic diagram of the first part of the target model in this exemplary embodiment
  • Fig. 5 shows a flow chart of another joint training method in this exemplary embodiment
  • Fig. 6 shows a flow chart of yet another joint training method in this exemplary embodiment
  • Fig. 7 shows a structural block diagram of a joint training device in this exemplary embodiment
  • Fig. 8 shows a structural block diagram of another joint training device in this exemplary embodiment
  • FIG. 9 shows an electronic device for implementing the above method in this exemplary embodiment
  • Fig. 10 shows a computer-readable storage medium for implementing the above-mentioned method in this exemplary embodiment.
  • Example embodiments will now be described more fully with reference to the accompanying drawings.
  • the example embodiments can be implemented in various forms, and should not be construed as being limited to the examples set forth herein; on the contrary, the provision of these embodiments makes the present disclosure more comprehensive and complete, and fully conveys the concept of the example embodiments To those skilled in the art.
  • the described features, structures or characteristics may be combined in one or more embodiments in any suitable way.
  • Fig. 1 shows an architecture diagram of a joint training system that can run this method.
  • the joint training system 100 may include a data node 110, a label node 120, and a network 130.
  • the data node 110 is used to provide sample data required for training
  • the label node 120 is used to provide label data corresponding to the sample data.
  • label data refers to the label or annotation of sample data.
  • the data node 110 and the tag node 120 are connected through a network 130 for data exchange.
  • the data node 110 and the label node 120 jointly provide the data required for training, and neither party can perform training alone, which also determines that the joint training system 100 is a two-sided structure.
  • the data node 110 is a server
  • the label The node 120 is a user terminal
  • the data node 110 is a public cloud
  • the tag node 120 is a private cloud, and so on.
  • the number of nodes shown in FIG. 1 is only exemplary, and either the data node 110 or the tag node 120 may be a cluster formed by multiple physical devices.
  • the data node 110 is a distributed server cluster, and the tag node 120
  • this disclosure does not specifically limit this.
  • FIG. 2 shows a flow chart of the method of this exemplary embodiment, and the execution subject may be the joint training system 100 of FIG. 1.
  • the joint training method may include steps S210 to S250:
  • step S210 the data node obtains sample data for training.
  • the sample data can be various types of data such as user behavior data, image data, and text data, which are used as input data in model training.
  • the data node can obtain sample data in the corresponding database.
  • Fig. 3 shows a schematic flow chart of a joint training method.
  • the joint training method may further include step S205: the tag node sends data index information to the data node; accordingly, Step S210 may be: the data node obtains sample data according to the data index information.
  • data index information is used to identify the data required for training.
  • data index information can be associated with sample data
  • label nodes data index information can be associated with label data. Therefore, through data index information, you can An association between the sample data and the label data is established between the label nodes.
  • the data index information can be the user's unique identifier, such as the user account, the IMEI (International Mobile Equipment Identity, International Mobile Equipment Identity) of the mobile terminal, the mobile phone number, etc., or other forms of data identification.
  • the user The unique identification is data index information, the data node provides the user's behavior data as sample data, and the label node provides the user's real label as label data. The user unique identification makes the sample data correspond to the label data.
  • the joint training process can be initiated by either the data node or the label node.
  • the data node initiates the joint training of the machine learning model and sends a request to the label node
  • the label node initiates the process for joint training in response to the request.
  • the data index information is returned to the data node through this process; or the label node first starts the process for joint training and sends a request to the data node.
  • the request may contain data index information, and the data node receives the request and extracts the data index from it Information; or the joint training process is initiated by a third party, and the third party sends data index information to the data node and the label node at the same time, and the data node and the label node start the process for joint training at the same time, and enter the steps shown in Figure 2.
  • the tag node may encrypt the data index information and send it to the data node.
  • the key can be configured on the data node and the tag node in advance, and the data node can decrypt Obtain the data index information; the data node and the label node are configured with the same hash encryption algorithm.
  • the label node sends the data index information to the data node after hash encryption. After the data node obtains the hash value, the same is found in the local database
  • the data index information corresponding to the hash value of is the data index information sent by the label node.
  • step S220 the data node processes the sample data through the first part of the target model to obtain intermediate data, and sends the intermediate data to the label node.
  • the target model is a model that requires joint training. It consists of a first part and a second part.
  • the first part is configured on the data node, usually the front-end part of the target model, and the second part is configured on the label node.
  • the above is usually the back-end part of the target model.
  • the output of the first part can be connected to the input of the second part.
  • the data processing process can also be seen as two stages.
  • the first part of the processing is the first stage
  • the second part of the processing is the second stage
  • the first and The second stage is two consecutive stages.
  • the neural network model Take the neural network model as an example.
  • the first part can be the input layer only, or it can include the input layer and several intermediate layers. That is, the intermediate data can be the sample data itself or The data after feature extraction of the sample data is then sent to the label node through network transmission. In either case, for the label node, it does not obtain the specific structure and parameters of the first part of the target model, so the sample data cannot be obtained by backward inference from the intermediate data, that is, the label node cannot obtain the sample data.
  • step S230 the tag node processes the intermediate data through the second part of the target model, and obtains error data based on the tag data corresponding to the sample data.
  • the second part of the target model includes an output terminal.
  • the corresponding output result can be obtained, and the difference between the output result and the label data can be calculated to obtain error data.
  • the label data is obtained in advance and has a corresponding relationship with the sample data.
  • the association between the sample data and the label data can be unified between the two nodes through the data index information. For example, when the label node starts the process for joint training, the data node Sending data index information, or the data node sends the data index information together when sending the intermediate data, or the intermediate data itself has index information (the index information usually comes from the sample data), and the label data associated with it can be determined through the index information .
  • the loss function can be calculated by the following cross-entropy formula based on multiple label data.
  • the form of the loss function represents the error.
  • Loss (- ⁇ i y i log(1/p i )), Loss is the loss function, p i represents the i-th output result, which is obtained by processing the i-th group of sample data through the second part of the target model, y i represents the i-th tag data, which has a corresponding relationship with p i .
  • the error data can also include the error weight value of each parameter of the model calculated based on the difference or loss function, the gradient value of each part of the model, etc.
  • the specific content of the error data is related to the specific training method of the model, which is not particularly limited in the present disclosure.
  • step S240 the tag node sends the error data to the data node.
  • the tag node can send error data representing the difference between the output result of the model and the tag data to the data node, and can also send the error weight value of each parameter of the model, the gradient value of each part of the model, etc. to the data node .
  • the label data cannot be derived from the error data, that is, the data node cannot obtain the label data. It can be seen that in this exemplary embodiment, the data node holds the sample data, and the label node holds the label data. During the joint training process, the two nodes cannot know the data held by the other party, thus ensuring the privacy and the data. safety.
  • step S250 the data node adjusts the parameters of the first part according to the error data, and/or the label node adjusts the parameters of the second part according to the error data.
  • adjusting the parameters is the training process, and its purpose is to optimize and adjust the parameters of the target model to a certain state, so that the error data is less than a predetermined value or even zero.
  • the parameters can be adjusted by means of local random adjustment, gradient descent, etc., which is not particularly limited in the present disclosure.
  • steps S210 to S250 are the complete process of one parameter adjustment in the joint training process.
  • the training process may include multiple parameter adjustment processes, and one or more steps may be executed multiple times, for example: For each batch (for example, 64 or 128 groups) of sample data and label data, steps S220 to S250 are executed once to perform a parameter adjustment.
  • the training process can usually also include training and verification processes. For example, the sample data is divided into training set and validation set, the label data is also divided into training set and verification set, and the sample data and label data of the training set are used for training. Steps S210 to S250 are executed one or more times, and then the sample data and tag data of the verification set are used for verification, and steps S210 to S230 are executed. It should be understood that the above-mentioned multiple situations belong to the protection scope of the present disclosure.
  • step S230 the following steps S231 to S233 may be further included:
  • Step S231 the tag node judges whether the preset condition is reached according to the error data
  • Step S232 if the preset condition is reached, the tag node sends training end information to the data node, and determines the target model based on the current first part and second part;
  • step S233 if the preset condition is not met, the label node executes step S240.
  • the preset condition refers to the condition for judging whether the target model has been trained, for example, whether the target model converges, whether the accuracy rate meets the standard, etc.
  • the error data can be used to determine whether the preset conditions are reached. For example: determine whether the error data is less than a predetermined value. If it is less, the parameters of the target model have converged; or separately determine whether the errors on multiple label data are less than a predetermined value, if it exceeds A certain proportion of the error is less than a predetermined value, then the accuracy of the target model reaches the standard, and so on. If the preset conditions are met, the target model training is completed, and the tag node sends this information to the data node to inform the data node that the training is complete.
  • the parameters of the target model are no longer adjusted, the first part held by the data node and the tag node
  • the second part held together constitutes the final target model, and neither party can obtain a complete model alone. If the preset conditions are not reached, the model needs to be further optimized, and steps S240 and S250 can be performed to adjust parameters.
  • the data node is the server of the platform party (such as the electronic financial platform), which provides user behavior data
  • the label node is the business partner (such as banks, insurance companies, credit bureaus and other organizations that have business or data sharing needs with the electronic financial platform)
  • the server provides the user’s true credit data.
  • the two parties can jointly train machine learning models without actually sharing the data to meet the needs of user credit evaluation, behavior prediction, product prediction, etc. It is especially suitable for sample data or labels
  • the data involves sensitive data such as user transaction information and deposit information.
  • the data node is the server, which provides users' online log data
  • the label node is the user terminal, which provides their own real user portraits.
  • the two parties can jointly train machine learning models to meet the business needs of different users under personalized labels and provide different users Personalized intelligent services, in this process, the server cannot obtain the user's tag data, which is beneficial to the user's privacy protection.
  • data nodes of the joint training system provide sample data for training
  • label nodes provide label data
  • data nodes obtain intermediate data through the first part of the target model
  • label nodes obtain intermediate data through the second part of the target model.
  • the two nodes respectively adjust the parameters according to the error data to realize the joint training of the target model.
  • a joint training method is proposed that is conducive to privacy protection.
  • the data node and the label node respectively hold one aspect of the data required for training and a part of the target model, and the data and model of one party are not for the other party.
  • the data node and the label node synchronize the data division processing, and respectively adjust the parameters according to the error data, thereby distributing the traditional model training task performed by a single host to two or more hosts
  • the overall computing power has been improved, which is conducive to improving efficiency.
  • step S220 may be implemented through the following steps:
  • the data node processes the sample data through the first part of the target model to obtain intermediate data, and sends the encrypted intermediate data to the label node.
  • encryption can be achieved in a variety of specific ways, for example: pre-configure keys on the data node and the label node, the data node encrypts the intermediate data, and then transmits it to the label node, the label node decrypts the intermediate data, which can improve data transmission
  • pre-configure keys on the data node and the label node the data node encrypts the intermediate data, and then transmits it to the label node, the label node decrypts the intermediate data, which can improve data transmission
  • the security of the process prevents data from being stolen.
  • the above method of configuring the key is based on the disclosure of intermediate data between the data node and the label node, or the form of not disclosing the intermediate data to the label node.
  • the above encryption process can be the same.
  • the label node receives the ciphertext of the homomorphic encrypted intermediate data, and calculates and processes the ciphertext through the second part of the target model without affecting the processing result.
  • encryption algorithms that meet the homomorphism of addition and multiplication can be used, such as Paillier algorithm, Gentry algorithm, etc.; for other types of machine learning models, it is also possible Use other forms of homomorphic encryption algorithms such as RSA.
  • the following processing methods can be specifically adopted: using asymmetric encryption, only the public key is configured on the label node, which can encrypt the label data through the public key, and from the data The node obtains the ciphertext of the intermediate data, and after the calculation of the second part of the target model, the calculation result and the ciphertext of the label data are calculated to obtain the error data; noise is added during the data transmission process.
  • This processing method will be described below Specific instructions.
  • the tag node may also encrypt the error data and send it to the data node, similar to the process of encrypting the intermediate data, so as to improve the security of the error data.
  • the safety optimization can also be performed in the form of noise, and step S240 can be implemented through the following steps:
  • the tag node sends the noise-added error data to the data node.
  • noise is an interference value, which can perform operations such as addition, subtraction, multiplication, and division with the error data.
  • the purpose is to make small changes to the error data so that the data node cannot obtain the real error data, and has little influence on subsequent calculations.
  • the data node After the data node receives the error data containing noise, it adjusts the parameters according to the data, which can increase the generalization ability of the target model to a certain extent, prevent overfitting, and further protect the privacy of the data.
  • the label node obtains the error data and the gradient for the second part of the target model
  • the data node obtains the gradient of the first part of the target model.
  • the target model is a neural network model as an example to illustrate the processing process of intermediate data and error data.
  • Data node pair Decrypt and remove ⁇ w noise in for compensation calculation: Calculation And transmit to the label node;
  • the label node uses the residual to calculate the weight gradient [dw] and the propagation gradient separately Add noise to [dw] send To the data node;
  • ⁇ g noise Get a gradient with a layer of noise That is, the gradient of the second part of the neural network model, so the second part of the parameter can be updated and adjusted: It can be seen that the parameters of the second part include ⁇ w noise, so it is expressed as From Remove noise in [ ⁇ w ] ⁇ : Obtain the encrypted propagation gradient [dx] and send it to the data node;
  • the data node decrypts [dx] to obtain dx, which can continue back propagation, and finally obtain the gradient of the first part of the parameter.
  • the parameters of the target model are adjusted through backpropagation, and in the data transmission between the data node and the label node, the data privacy is protected by encryption and noise addition. At the same time, Ensure the validity of the calculation results.
  • the noise can also be sparsely processed accordingly.
  • the noise matrix ⁇ w has a certain proportion of value 0.
  • the above specific method of thinning processing is only for illustrative purposes, and the present disclosure does not specifically limit this.
  • the exemplary embodiment of the present disclosure also provides a joint training method of a machine learning model, which can be applied to the data node 110 of the joint training system 100 in FIG. 1.
  • the method may include steps S510 to S540:
  • Step S510 obtain sample data for training
  • Step S520 process the sample data through the first part of the target model to obtain intermediate data
  • Step S530 Send the intermediate data to the label node
  • step S540 if error data is received from the tag node, the parameters of the first part are adjusted according to the error data.
  • step S510 is the same as step S210 in FIG. 2
  • steps S520 and S530 are the same as step S220
  • step S540 is the same as the steps performed by the data node in step S250, that is, the method steps of steps S510 to S540 are in the method of FIG.
  • the method steps performed by the data node can adjust the parameters of the first part of the target model without knowing the label data and the second part of the target model, so as to realize the model under the premise of protecting data privacy Joint training.
  • the joint training method may further include the following steps:
  • the current first part is determined as the final first part of the target model.
  • the process can be seen in step S232 in Figure 3.
  • the received training end information indicates that the tag node judges that the target model has been trained, the current first part is the final first part, and the target model is the first part currently held by the data node Determined together with the second part currently held by the label node.
  • the joint training method may further include the following steps: obtaining data index information from the label node; accordingly, step S510 may be implemented by the following steps: obtaining sample data according to the data index information. This process can refer to steps S205 and S210 in FIG. 3.
  • step S530 may be: sending the encrypted intermediate data to the label node.
  • step S530 may be: if error data containing noise is received from the tag node, adjusting the parameters of the first part according to the error data containing noise.
  • the above-mentioned encryption of the intermediate data may adopt homomorphic encryption.
  • the exemplary embodiment of the present disclosure also provides a joint training method of a machine learning model, which can be applied to the label node 120 of the joint training system 100 in FIG. 1.
  • the method may include steps S610 to S640:
  • Step S610 receiving intermediate data from the data node
  • Step S620 process the intermediate data through the second part of the target model, and obtain error data based on the label data corresponding to the data index information;
  • Step S630 sending the error data to the data node
  • Step S640 Adjust the parameters of the second part of the target model according to the error data.
  • step S610 is the same as step S230 in FIG. 2 of S620
  • step S630 is the same as step S240
  • step S640 is the same as the steps performed by the tag node in step S250, that is, the method steps of steps S610 to S640 are the tag nodes in the method of FIG. The method steps performed by the node.
  • the label node can adjust the parameters of the second part of the target model without knowing the sample data and the first part of the target model, so as to realize the model's optimization under the premise of protecting data privacy. Joint training.
  • step S620 is used to enable the tag node to determine which tag data to use, which can be sent by the tag node to the data node in advance, or it can be the information carried in the intermediate data, or it can be When the third party initiates the joint training process, it sends index information to the data node and the label node at the same time.
  • the joint training method may further include the following steps:
  • steps S630 and S640 are continued.
  • the joint training method may further include the following steps: sending data index information to the data node, so that the data node processes the sample data corresponding to the data index information through the first part of the target model to obtain intermediate data .
  • This process can refer to steps S205 and S210 in FIG. 3.
  • step S610 may be: receiving encrypted intermediate data from the data node.
  • step S630 may be: sending error data containing noise to the data node.
  • the foregoing intermediate data may be encrypted by a homomorphic encryption algorithm.
  • Exemplary embodiments of the present disclosure also provide a joint training device for machine learning models, which can be applied to the data node 110 of the joint training system 100 in FIG. 1, and the joint training system 100 may also include a label node 120; as shown in FIG. ,
  • the device 700 may include: an acquisition module 710, configured to acquire sample data for training; a processing module 720, configured to process the sample data through the first part of the target model to obtain intermediate data; and a sending module 730, configured to convert the intermediate data Send to the tag node; the adjustment module 740, if the error data is received from the tag node, adjust the first part of the parameters according to the error data.
  • the joint training device may further include: a determining module, configured to determine the current first part as the final first part of the target model if the training end information is received from the tag node.
  • the obtaining module may be used to obtain data index information from the tag node, and obtain sample data according to the data index information.
  • the sending module may be used to send the encrypted intermediate data to the label node.
  • the adjustment module may be configured to adjust the parameters of the first part according to the error data containing noise if the error data containing noise is received from the tag node.
  • the above-mentioned intermediate data may adopt homomorphic encryption.
  • a device for joint training of machine learning models is provided, which can be applied to the label node 120 of the joint training system 100 in FIG. 1.
  • the joint training system 100 may also include a data node 110; as shown in FIG. ,
  • the device 800 may include: a receiving module 810, configured to receive intermediate data from a data node; a processing module 820, configured to process the intermediate data through the second part of the target model, and obtain error data based on the label data corresponding to the data index information;
  • the sending module 830 is used to send the error data to the data node;
  • the adjustment module 840 is used to adjust the parameters of the second part of the target model according to the error data.
  • the processing module may also be used to determine whether a preset condition is reached according to the error data; the sending module may also be used to send training end information to the data node if the preset condition is reached, and the current first The second part is determined as the final second part of the target model, and if the preset conditions are not met, the error data is sent to the data node.
  • the sending module may also be used to send data index information to the data node, so that the data node processes the sample data corresponding to the data index information through the first part of the target model to obtain intermediate data.
  • the receiving module may be used to receive encrypted intermediate data from the data node.
  • the sending module may be used to send error data containing noise to the data node.
  • the above-mentioned intermediate data may adopt homomorphic encryption.
  • Exemplary embodiments of the present disclosure also provide an electronic device capable of implementing the above method.
  • the electronic device 900 according to this exemplary embodiment of the present disclosure will be described below with reference to FIG. 9.
  • the electronic device 900 shown in FIG. 9 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
  • the electronic device 900 is represented in the form of a general-purpose computing device.
  • the components of the electronic device 900 may include, but are not limited to: the aforementioned at least one processing unit 910, the aforementioned at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), and a display unit 940.
  • the storage unit stores program codes, and the program codes can be executed by the processing unit 910, so that the processing unit 910 executes the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section of this specification.
  • the processing unit 910 may execute the method steps shown in FIG. 2, FIG. 3, FIG. 5, or FIG. 6, etc.
  • the storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 921 and/or a cache storage unit 922, and may further include a read-only storage unit (ROM) 923.
  • RAM random access storage unit
  • ROM read-only storage unit
  • the storage unit 920 may also include a program/utility tool 924 having a set of (at least one) program module 925.
  • program module 925 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
  • the bus 930 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
  • the electronic device 900 may also communicate with one or more external devices 1100 (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 900, and/or communicate with Any device (eg, router, modem, etc.) that enables the electronic device 900 to communicate with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 950.
  • the electronic device 900 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 960.
  • networks for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet
  • the network adapter 960 communicates with other modules of the electronic device 900 through the bus 930. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
  • the exemplary embodiments described herein can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the exemplary embodiment of the present disclosure.
  • a computing device which may be a personal computer, a server, a terminal device, or a network device, etc.
  • Exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which is stored a program product capable of implementing the above method of this specification.
  • various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code.
  • the program product runs on a terminal device, the program code is used to make the terminal device execute the above-mentioned instructions in this specification.
  • the steps according to various exemplary embodiments of the present disclosure are described in the "Exemplary Methods" section.
  • a program product 1000 for implementing the above method according to an exemplary embodiment of the present disclosure is described. It can adopt a portable compact disk read-only memory (CD-ROM) and include program codes, and can be used in a terminal Running on equipment, such as a personal computer.
  • CD-ROM compact disk read-only memory
  • the program product of the present disclosure is not limited thereto.
  • the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or combined with an instruction execution system, device, or device.
  • the program product can adopt any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
  • the program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
  • the program code for performing the operations of the present disclosure can be written in any combination of one or more programming languages.
  • the programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming. Language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using Internet service providers) Business to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service providers Internet service providers
  • modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory.
  • the features and functions of two or more modules or units described above may be embodied in one module or unit.
  • the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Medical Informatics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Machine Translation (AREA)

Abstract

一种机器学习模型的联合训练方法、装置、电子设备及计算机可读存储介质,属于计算机技术领域。该方法包括:数据节点(110)获取用于训练的样本数据(S210);数据节点(110)通过目标模型的第一部分处理样本数据,得到中间数据,并将中间数据发送至标签节点(120)(S220);标签节点(120)通过目标模型的第二部分处理中间数据,并基于样本数据对应的标签数据,得到误差数据(S230);标签节点(120)将误差数据发送至数据节点(110)(S240);数据节点(110)根据误差数据调整第一部分的参数,和/或标签节点(120)根据误差数据调整第二部分的参数(S250);其中,目标模型由第一部分和第二部分组成。该方法实现联合训练过程中数据节点(110)与标签节点(120)之间的数据不透明,提高数据的隐私性与安全性。

Description

机器学习模型的联合训练方法、装置、设备及存储介质
本申请要求于2019年02月26日提交中国专利局、申请号为CN201910142560.3、申请名称为“机器学习模型的联合训练方法、装置、设备及存储介质”的专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及计算机技术领域,尤其涉及一种机器学习模型的联合训练方法、机器学习模型的联合训练装置、电子设备与计算机可读存储介质。
背景技术
机器学习作为人工智能领域的核心技术,其发展状况很大程度上决定了人工智能的发展程度。目前,随着机器学习与大数据的结合,机器学习模型日益复杂化,训练模型所需的数据量与运算量大大增加,在此情况下,出现了由多台服务器或终端进行联合训练的方法。然而,现有的联合训练方法普遍存在数据泄露的安全隐患,限制了其在机器学习技术上的应用。
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。
发明内容
本公开提供了一种机器学习模型的联合训练方法、机器学习模型的联合训练装置、电子设备与计算机可读存储介质,进而至少在一定程度上克服现有的联合训练方法存在安全隐患的问题。
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。
根据本公开的第一方面,提供一种机器学习模型的联合训练方法,应用于联合训练系统,所述联合训练系统包括数据节点和标签节点;所述方法包括:所述数据节点获取用于训练的样本数据;所述数据节点通过目标模型的第一部分处理所述样本数据,得到中间数据,并将所述中间数据发送至所述标签节点;所述标签节点通过所述目标模型的第二部分处理所述中间数据,并基于所述样本数据对应的标签数据,得到误差数据;所述标签节点将所述误差数据发送至所述数据节点;所述数据节点根据所述误差数据调整所述第一部分的参数,和/或所述标签节点根据所述误差数据调整所述第二部分的参数;其中,所述目标模型由所述第一部分和所述第二部分组成。
根据本公开的第二方面,提供一种机器学习模型的联合训练方法,应用于联合训练系统的数据节点,所述联合训练系统还包括标签节点;所述方法包括:获取用于训 练的样本数据;通过目标模型的第一部分处理所述样本数据,得到中间数据;将所述中间数据发送至所述标签节点;如果从所述标签节点接收到误差数据,则根据所述误差数据调整所述第一部分的参数。
根据本公开的第三方面,提供一种机器学习模型的联合训练方法,应用于联合训练系统的标签节点,所述联合训练系统还包括数据节点;所述方法包括:从所述数据节点接收中间数据;通过目标模型的第二部分处理所述中间数据,并基于数据索引信息对应的标签数据得到误差数据;将所述误差数据发送至所述数据节点;根据所述误差数据调整所述目标模型的第二部分的参数。
根据本公开的第四方面,提供一种机器学习模型的联合训练装置,应用于联合训练系统的数据节点,所述联合训练系统还包括标签节点;所述装置包括:获取模块,用于获取用于训练的样本数据;处理模块,用于通过目标模型的第一部分处理所述样本数据,得到中间数据;发送模块,用于将所述中间数据发送至所述标签节点;调整模块,用于如果从所述标签节点接收到误差数据,则根据所述误差数据调整所述第一部分的参数。
根据本公开的第五方面,提供一种机器学习模型的联合训练装置,应用于联合训练系统的标签节点,所述联合训练系统还包括数据节点;所述装置包括:接收模块,用于从所述数据节点接收中间数据;处理模块,用于通过目标模型的第二部分处理所述中间数据,并基于数据索引信息对应的标签数据得到误差数据;发送模块,用于将所述误差数据发送至所述数据节点;调整模块,用于根据所述误差数据调整所述目标模型的第二部分的参数。
根据本公开的第六方面,提供一种电子设备,包括:处理器;以及存储器,用于存储所述处理器的可执行指令;其中,所述处理器配置为经由执行所述可执行指令来执行上述任意一种机器学习模型的联合训练方法。
根据本公开的第七方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一种机器学习模型的联合训练方法。
本公开的示例性实施例具有以下有益效果:
联合训练系统的数据节点提供用于训练的样本数据,标签节点提供标签数据,数据节点通过目标模型的第一部分得到中间数据,标签节点通过目标模型的第二部分得到误差数据,两方节点再分别根据误差数据进行参数调整,以实现目标模型的联合训练。一方面,提出了一种有利于隐私保护的联合训练方法,由数据节点与标签节点分别持有训练所需的一个方面的数据以及目标模型的一个部分,且一方的数据以及模型对于另一方不可见,因此保障了数据的隐私性与安全性,可以满足多种业务场景的需求,提高联合训练方法的普遍适用性。另一方面,在训练过程中,数据节点与标签节点对于数据进行同步的分工处理,并分别根据误差数据进行参数调整,从而将传统由单个主机进行的模型训练任务分散到了两个或多个主机上,整体的运算能力得到提升, 有利于提高效率。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出本示例性实施例的一种联合训练系统的架构图;
图2示出本示例性实施例中一种联合训练方法的流程步骤图;
图3示出本示例性实施例中一种联合训练方法的流程示意图;
图4示出本示例性实施例中目标模型第一部分的示意图;
图5示出本示例性实施例中另一种联合训练方法的流程步骤图;
图6示出本示例性实施例中再一种联合训练方法的流程步骤图;
图7示出本示例性实施例中一种联合训练装置的结构框图;
图8示出本示例性实施例中另一种联合训练装置的结构框图;
图9示出本示例性实施例中一种用于实现上述方法的电子设备;
图10示出本示例性实施例中一种用于实现上述方法的计算机可读存储介质。
具体实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。
本公开的示例性实施例首先提供了一种机器学习模型的联合训练方法,图1示出了可以运行该方法的联合训练系统的架构图。如图1所示,该联合训练系统100可以包括数据节点110、标签节点120与网络130,数据节点110用于提供训练所需的样本数据,标签节点120用于提供样本数据对应的标签数据,在本文中,标签数据指样本数据的标签或标注。数据节点110与标签节点120之间通过网络130连接,进行数据交互。可见,数据节点110与标签节点120共同提供了训练所需的数据,任何一方无法单独实行训练,这也决定了联合训练系统100是一种双侧的结构,例如:数据节点110是服务器,标签节点120是用户终端;数据节点110是公有云,标签节点120是私有云,等等。
应当理解,图1所示的各节点数目仅是示例性的,数据节点110或标签节点120 都可以是由多个实体设备形成的集群,例如数据节点110为分布式的服务器集群,标签节点120为大量的用户终端,本公开对此不做特别限定。
图2示出了本示例性实施例的方法的流程步骤图,其执行主体可以是图1的联合训练系统100。如图2所示,该联合训练方法可以包括步骤S210~S250:
步骤S210中,数据节点获取用于训练的样本数据。
其中,根据应用场景与实际需求的不同,样本数据可以是用户行为数据、图像数据、文本数据等各种类型的数据,用于在模型训练中作为输入数据。数据节点可以在相应的数据库中获取样本数据。
图3示出了一种联合训练方法的流程示意图,如图3所示,在一示例性实施例中,联合训练方法还可以包括步骤S205:标签节点向数据节点发送数据索引信息;相应的,步骤S210可以是:数据节点根据数据索引信息获取样本数据。
其中,数据索引信息用于标识训练所需的数据,对于数据节点,数据索引信息可以关联样本数据,对于标签节点,数据索引信息可以关联标签数据,因此,通过数据索引信息,可以在数据节点与标签节点之间建立样本数据与标签数据的关联对应。数据索引信息可以是用户唯一标识,如用户账号、移动终端的IMEI(International Mobile Equipment Identity,国际移动设备识别码)、手机号等,也可以是其他形式的数据标识等,举例而言,以用户唯一标识为数据索引信息,数据节点提供该用户的行为数据作为样本数据,标签节点提供该用户的真实标签作为标签数据,通过用户唯一标识使得样本数据对应于标签数据。
联合训练过程可以由数据节点和标签节点中的任一方发起,例如:数据节点启动对于机器学习模型的联合训练,向标签节点发送请求,标签节点响应于该请求,启动用于联合训练的进程,通过该进程向数据节点返回数据索引信息;或者标签节点首先启动用于联合训练的进程,向数据节点发送请求,该请求中可以包含数据索引信息,数据节点接收到该请求,从中提取出数据索引信息;或者联合训练过程由第三方发起,第三方同时向数据节点与标签节点发送数据索引信息,数据节点与标签节点同时启动用于联合训练的进程,进入图2所示的步骤。
在一示例性实施例中,为了保障信息的安全性,标签节点可以将数据索引信息加密后发送至数据节点,举例说明:可以预先在数据节点与标签节点上配置密钥,则数据节点通过解密得到数据索引信息;数据节点与标签节点配置相同的哈希加密算法,标签节点将数据索引信息通过哈希加密后发送至数据节点,数据节点获取哈希值后,在本地的数据库中查找出相同的哈希值所对应的数据索引信息,即为标签节点发送的数据索引信息。
步骤S220中,数据节点通过目标模型的第一部分处理样本数据,得到中间数据,并将中间数据发送至标签节点。
本示例性实施例中,目标模型为需要进行联合训练的模型,其由第一部分与第二 部分组成,第一部分配置于数据节点上,通常为目标模型的前端部分,第二部分配置于标签节点上,通常为目标模型的后端部分,第一部分的输出可以与第二部分的输入相连接。可见,目标模型是由两方节点共同持有,任一方无法单独获得整个模型,从而在一定程度上保障了数据在两方节点之间的隐私性与安全性。
基于目标模型的第一部分与第二部分,对数据的处理过程也可以看作是两个阶段,第一部分的处理过程为第一阶段,第二部分的处理过程为第二阶段,第一阶段与第二阶段为连续的两个阶段。以目标模型是神经网络模型为例进行说明,如图4所示,第一部分可以是只有输入层的部分,也可以包括输入层以及若干中间层,即中间数据可以是样本数据本身,也可以是对样本数据进行特征提取后的数据,然后通过网络传输发送至标签节点。无论是哪种情况,对于标签节点而言,其并未获得目标模型第一部分的具体结构与参数,因此无法通过中间数据倒推得到样本数据,即标签节点无法获知样本数据。
步骤S230中,标签节点通过目标模型的第二部分处理中间数据,并基于样本数据对应的标签数据,得到误差数据。
其中,目标模型的第二部分包括输出端,将中间数据输入第二部分,可以得到对应的输出结果,计算输出结果与标签数据的差值,可以得到误差数据。标签数据为预先获取的,与样本数据具有对应关系,可以通过数据索引信息在两方节点之间统一样本数据与标签数据的关联,例如标签节点在启动用于联合训练的进程时,向数据节点发送数据索引信息,或者数据节点在发送中间数据时,将数据索引信息一起发送,又或者中间数据本身具有索引信息(该索引信息通常来自于样本数据),可通过索引信息确定与其关联的标签数据。需要说明的是,实际应用中标签数据的数量通常较多,每个标签数据对应于一组样本数据,在计算误差数据时,可以基于多个标签数据,通过以下交叉熵公式计算损失函数,以损失函数的形式表征误差。
Loss=(-∑ iy ilog(1/p i)),Loss为损失函数,p i表示第i个输出结果,是通过目标模型的第二部分处理第i组样本数据所得到的,y i表示第i个标签数据,与p i之间具有对应关系。
需要补充的是,除了上述输出结果与标签数据的差值或损失函数,误差数据还可以包括基于该差值或损失函数所计算的模型各参数的误差权重值、模型各部分的梯度值等,误差数据的具体内容与模型的具体训练方式相关,本公开对此不做特别限定。
步骤S240中,标签节点将误差数据发送至数据节点。
本示例性实施例中,标签节点可以将表示模型输出结果与标签数据差值的误差数据发送至数据节点,也可以将模型各参数的误差权重值、模型各部分的梯度值等发送至数据节点。
对于数据节点而言,由于其并未获得目标模型第二部分的具体结构与参数,根据误差数据无法推得标签数据,即数据节点无法获知标签数据。可见,本示例性实施例 中,数据节点持有样本数据,标签节点持有标签数据,在联合训练的过程中,两方节点无法获知对方所持有的数据,从而保障了数据的隐私性与安全性。
步骤S250中,数据节点根据误差数据调整第一部分的参数,和/或标签节点根据误差数据调整第二部分的参数。
其中,调整参数即训练的过程,其目的是将目标模型的参数优化调整到一定的状态,使得误差数据小于预定值甚至为0。在一次调整中,可以仅仅调整第一部分或第二部分的参数,也可以同时调整两个部分的参数,这与目标模型训练的具体进度相关。根据目标模型与误差数据的具体形式,可以采用局部随机调整、梯度下降等方式进行参数调整,本公开对此不做特别限定。
需要说明的是,步骤S210~S250为联合训练过程中一次参数调整的完整过程,训练过程可能包含了多次参数调整的过程,则可以将多次执行其中的一个或多个步骤,例如:对于每一批(batch,如64或128组)样本数据和标签数据,执行一次步骤S220~S250,以进行一次参数调整。此外,训练过程通常还可以包括训练与验证的过程,例如:将样本数据划分训练集与验证集,对标签数据也同样划分训练集与验证集,利用训练集的样本数据与标签数据进行训练,执行一次或多次步骤S210~S250,再利用验证集的样本数据与标签数据进行验证,执行步骤S210~S230。应当理解,上述多种情况都属于本公开的保护范围。
在一示例性实施例中,参考上述图3所示,在步骤S230后,还可以包括以下步骤S231~S233:
步骤S231,标签节点根据误差数据判断是否达到预设条件;
步骤S232,如果达到预设条件,则标签节点向数据节点发送训练结束信息,以当前的第一部分和第二部分确定目标模型;
步骤S233,如果未达到预设条件,则标签节点执行步骤S240。
其中,预设条件是指判断目标模型是否训练完成的条件,例如可以是目标模型是否收敛、准确率是否达标等。可以根据误差数据判断是否达到预设条件,举例说明:判断误差数据是否小于预定值,如果小于,则目标模型的参数已经收敛;或者分别判断多个标签数据上的误差是否小于预定值,如果超过一定比例的误差小于预定值,则目标模型的准确率达标,等等。如果达到预设条件,表示目标模型训练完成,标签节点将该信息发送至数据节点,以告知数据节点训练完成,此时不再调整目标模型的参数,数据节点所持有的第一部分与标签节点所持有的第二部分共同构成最终的目标模型,任一方无法单独获得完整的模型。如果未达到预设条件,说明模型还需要进一步优化,可以执行步骤S240与S250以进行参数调整。
基于图3所示的循环形式的方法流程,可以实现机器学习模型联合训练的完整过程。下面对本实施例的应用场景做示例性说明,当然,下述示例并不能对本方案的应用范围造成限定:
数据节点为平台方(例如电子金融平台)的服务器,提供用户的行为数据,标签节点为业务合作方(例如银行、保险公司、征信机构等与电子金融平台有业务或数据共享需求的组织)的服务器,提供用户的真实信用数据,双方可以在实际不共享数据的情况下,联合训练机器学习模型,以满足用户信用评估、行为预测、产品预测等方面的需求,特别适用于样本数据或标签数据涉及到用户交易信息、存款信息等敏感数据的情况。数据节点为服务器,提供用户的在线日志数据,标签节点为用户终端,提供自己的真实用户画像,双方可以联合训练机器学习模型,以满足不同用户个性化标签下的业务需求,为不同的用户提供个性化的智能服务,在此过程中服务器无法获取到用户的标签数据,有利于用户的隐私保护。
在本示例性实施例中,联合训练系统的数据节点提供用于训练的样本数据,标签节点提供标签数据,数据节点通过目标模型的第一部分得到中间数据,标签节点通过目标模型的第二部分得到误差数据,两方节点再分别根据误差数据进行参数调整,以实现目标模型的联合训练。一方面,提出了一种有利于隐私保护的联合训练方法,由数据节点与标签节点分别持有训练所需的一个方面的数据以及目标模型的一个部分,且一方的数据以及模型对于另一方不可见,因此保障了数据的隐私性与安全性,可以满足多种业务场景的需求,提高联合训练方法的普遍适用性。另一方面,在训练过程中,数据节点与标签节点对于数据进行同步的分工处理,并分别根据误差数据进行参数调整,从而将传统由单个主机进行的模型训练任务分散到了两个或多个主机上,整体的运算能力得到提升,有利于提高效率。
为了进一步提高数据的安全性,在一示例性实施例中,步骤S220可以通过以下步骤实现:
数据节点通过目标模型的第一部分处理样本数据,得到中间数据,并将加密后的中间数据发送至标签节点。
其中,加密可以通过多种具体方式实现,例如:预先在数据节点与标签节点上配置密钥,数据节点对中间数据加密,然后传输至标签节点,标签节点对中间数据解密,这样能提高数据传输过程的安全性,防止数据被窃取。
当然,上述配置密钥的方式是基于在数据节点与标签节点之间公开中间数据,也可以采用对标签节点不公开中间数据的形式,在一示例性实施例中,上述加密的过程可以采用同态加密,则标签节点接收到经过同态加密的中间数据的密文,通过目标模型的第二部分对该密文进行计算处理,不影响处理结果。例如:由于大部分机器学习模型的参数运算以加法与数乘为主,可以采用满足加法与数乘同态的加密算法,如Paillier算法、Gentry算法等;对于其他类型的机器学习模型,也可以采用RSA等其他形式的同态加密算法。
基于同态加密的方式,为了得到有效的误差数据,可以具体采用以下几种处理方法:利用非对称加密,在标签节点上仅配置公钥,其可以通过公钥对标签数据加密, 并且从数据节点获取中间数据的密文,经过目标模型第二部分的计算后,将计算结果与标签数据的密文做差以得到误差数据;在数据传输的过程中添加噪声,这种处理方法将在下文具体说明。
相对应的,在一示例性实施例中,标签节点也可以将误差数据加密后发送至数据节点,类似于中间数据加密的过程,以提高误差数据的安全性。
在一示例性实施例中,也可以采用噪声的形式进行安全性的优化,步骤S240可以通过以下步骤实现:
标签节点将添加噪声的误差数据发送至数据节点。
其中,噪声是一个干扰值,其可以与误差数据进行加减乘除等操作,目的是对误差数据进行数值的微小改变,使得数据节点无法获得真实的误差数据,且对于后续计算的影响较小。数据节点在接收到包含噪声的误差数据后,根据该数据进行参数调整,可以在一定程度上增加目标模型的泛化能力,防止过拟合,同时进一步保障数据的隐私性。
基于上述中间数据加密以及误差数据添加噪声的方法,利用数据节点与标签节点之间的信息不对称性,通过算法上的设计,可以在两方节点互相数据不透明的情况下实现各自的计算目标:标签节点得到误差数据以及针对目标模型第二部分参数的梯度,数据节点得到目标模型第一部分参数的梯度。下面以目标模型是神经网络模型为例,对中间数据及误差数据的处理过程做示例性说明。
(1)隐私保护的正向传播过程,计算残差:
数据节点将样本数据x输入神经网络模型的第一部分,进行多层非线性变换:a=Act(W 1×x+b)(Act()为激活函数,W,b为神经网络参数),得到中间数据a,利用Paillier算法对a加密,以[a]表示加密后的数据,将其发送至标签节点;
标签节点得到加密的[a]后,输入神经网络模型的第二部分,计算第二部分的参数
Figure PCTCN2020070857-appb-000001
(该参数包含了∈ w噪声,因此用
Figure PCTCN2020070857-appb-000002
表示,下文将具体为何包含∈ w噪声)与[a]之间的加权和:
Figure PCTCN2020070857-appb-000003
并加入噪声∈ z,将计算结果
Figure PCTCN2020070857-appb-000004
回传至数据节点;
数据节点对
Figure PCTCN2020070857-appb-000005
解密,并去除
Figure PCTCN2020070857-appb-000006
中的∈ w噪声以进行补偿计算:
Figure PCTCN2020070857-appb-000007
Figure PCTCN2020070857-appb-000008
计算
Figure PCTCN2020070857-appb-000009
并传输至标签节点;
标签节点去除
Figure PCTCN2020070857-appb-000010
中∈ z噪声
Figure PCTCN2020070857-appb-000011
计算Softmax值
Figure PCTCN2020070857-appb-000012
从而得到残差δ=p-y,残差即神经网络模型中的误差数据,y为标签数据。
(2)隐私保护的反向传播过程,计算梯度:
标签节点利用残差分别计算权重梯度[dw]与传播梯度
Figure PCTCN2020070857-appb-000013
Figure PCTCN2020070857-appb-000014
将[dw]添加噪声
Figure PCTCN2020070857-appb-000015
发送
Figure PCTCN2020070857-appb-000016
至数据节点;
数据节点对
Figure PCTCN2020070857-appb-000017
进行解密,在解密后的
Figure PCTCN2020070857-appb-000018
中加入噪声
Figure PCTCN2020070857-appb-000019
(η为设定的模型学习速率)以得到含有二层噪声的权重梯度
Figure PCTCN2020070857-appb-000020
并连同积累的加密的噪声[∈ w]一起发送至标签节点;同时对噪声∈ w进行累加:
Figure PCTCN2020070857-appb-000021
标签节点去除
Figure PCTCN2020070857-appb-000022
中∈ g噪声:
Figure PCTCN2020070857-appb-000023
得到含有一层噪声的梯度
Figure PCTCN2020070857-appb-000024
即神经网络模型第二部分参数的梯度,因此可以进行第二部分参数的更新调整:
Figure PCTCN2020070857-appb-000025
可见,第二部分的参数包含了∈ w噪声,因此表示为
Figure PCTCN2020070857-appb-000026
Figure PCTCN2020070857-appb-000027
中去除噪声[∈ w]δ:
Figure PCTCN2020070857-appb-000028
得到加密后的传播梯度[dx],将其发送至数据节点;
数据节点对[dx]进行解密得到dx,可以继续进行反向传播,最终得到第一部分参数的梯度。
通过上述方法过程,实现了通过反向传播调整目标模型的参数,且在数据节点与标签节点的数据传输中,通过加密与添加噪声的方式,对数据的隐私性起到了强保护的作用,同时保证了计算结果的有效性。
对于目标模型为神经网络模型的情况,在一示例性实施例中,可以采用一定的稀疏化处理方式,简化运算过程,达到加速的目的,例如:利用非线性激活函数ReLU=Max(0,x)为神经网络模型的激活函数,对激活值进行稀疏化;加入Dropout层,对激活值进行稀疏化,如可以在第一部分的最后一层加入。此外,在包含噪声计算的情况中,也可以相应的对噪声进行稀疏化处理,例如:初始化稀疏噪声矩阵∈ g与∈ z,设定矩阵中有一定比例的数值为0;对于累加噪声,设定累加后噪声矩阵∈ w有一定比例的数值为0。当然,以上稀疏化处理的具体方式仅是为了示例性说明,本公开对此不做特别限定。
本公开的示例性实施例还提供了一种机器学习模型的联合训练方法,可以应用于图1中联合训练系统100的数据节点110。如图5所示,该方法可以包括步骤S510~S540:
步骤S510,获取用于训练的样本数据;
步骤S520,通过目标模型的第一部分处理样本数据,得到中间数据;
步骤S530,将中间数据发送至标签节点;
步骤S540,如果从标签节点接收到误差数据,则根据误差数据调整第一部分的参数。
其中,步骤S510与图2中的步骤S210相同,步骤S520与S530与步骤S220相同,步骤S540与步骤S250中数据节点所执行的步骤相同,即步骤S510~S540的方法步骤为图2的方法中数据节点所执行的方法步骤,通过该方法,数据节点可以在未获知标签数据以及目标模型第二部分的情况下对目标模型的第一部分进行参数调整,从而在保护数据隐私性的前提下实现模型的联合训练。
在一示例性实施例中,联合训练方法还可以包括以下步骤:
如果从标签节点接收到训练结束信息,则将当前的第一部分确定为目标模型最终的第一部分。该过程可以参见图3中的步骤S232,接收到训练结束信息说明标签节点判断目标模型已经训练完成,则当前的第一部分即为最终的第一部分,目标模型由数据节点当前所持有的第一部分与标签节点当前所持有的第二部分共同确定。
在一示例性实施例中,联合训练方法还可以包括以下步骤:从标签节点获取数据索引信息;相应的,步骤S510可以通过以下步骤实现:根据数据索引信息获取样本数据。该过程可以参见图3中的步骤S205与S210。
在一示例性实施例中,步骤S530可以是:将加密后的中间数据发送至标签节点。
在一示例性实施例中,步骤S530可以是:如果从标签节点接收到包含噪声的误差数据,则根据包含噪声的误差数据调整第一部分的参数。
在一示例性实施例中,上述对中间数据的加密可以采用同态加密。
本公开的示例性实施例还提供了一种机器学习模型的联合训练方法,可以应用于图1中联合训练系统100的标签节点120。如图6所示,该方法可以包括步骤S610~S640:
步骤S610,从数据节点接收中间数据;
步骤S620,通过目标模型的第二部分处理中间数据,并基于数据索引信息对应的标签数据得到误差数据;
步骤S630,将误差数据发送至数据节点;
步骤S640,根据误差数据调整目标模型的第二部分的参数。
其中,步骤S610与S620图2中的步骤S230相同,步骤S630与步骤S240相同,步骤S640与步骤S250中标签节点所执行的步骤相同,即步骤S610~S640的方法步骤为图2的方法中标签节点所执行的方法步骤,通过该方法,标签节点可以在未获知样本数据以及目标模型第一部分的情况下对目标模型的第二部分进行参数调整,从而在保护数据隐私性的前提下实现模型的联合训练。
需要说明的是,步骤S620中的数据索引信息用于使标签节点确定使用哪个或哪些标签数据,其可以由标签节点事先向数据节点发送,也可以是中间数据中所携带的信息,还可以是第三方在发起联合训练过程时,同时向数据节点与标签节点发送的索引信息。
在一示例性实施例中,步骤S620之后,联合训练方法还可以包括以下步骤:
根据误差数据判断是否达到预设条件;
如果达到预设条件,则向数据节点发送训练结束信息,并将当前的第二部分确定为目标模型最终的第二部分;
如果未达到预设条件,则继续执行步骤S630与S640。
该过程可以参见图3中的步骤S231~S233,如果达到预设条件,说明目标模型已经训练完成,将该信息以训练结束信息的形式通知到数据节点,标签节点上当前的第二部分即为最终的第二部分,目标模型由数据节点当前所持有的第一部分与标签节点 当前所持有的第二部分共同确定。
在一示例性实施例中,步骤S610之前,联合训练方法还可以包括以下步骤:向数据节点发送数据索引信息,使数据节点通过目标模型的第一部分处理数据索引信息对应的样本数据以得到中间数据。该过程可以参见图3中的步骤S205与S210。
在一示例性实施例中,步骤S610可以是:从数据节点接收加密后的中间数据。
在一示例性实施例中,步骤S630可以是:将包含噪声的误差数据发送至数据节点。
在一示例性实施例中,上述中间数据可以通过同态加密算法进行加密。
本公开的示例性实施例还提供一种机器学习模型的联合训练装置,可以应用于图1中联合训练系统100的数据节点110,联合训练系统100还可以包括标签节点120;如图7所示,该装置700可以包括:获取模块710,用于获取用于训练的样本数据;处理模块720,用于通过目标模型的第一部分处理样本数据,得到中间数据;发送模块730,用于将中间数据发送至标签节点;调整模块740,用于如果从标签节点接收到误差数据,则根据误差数据调整第一部分的参数。
在一示例性实施例中,联合训练装置还可以包括:确定模块,用于如果从标签节点接收到训练结束信息,则将当前的第一部分确定为目标模型最终的第一部分。
在一示例性实施例中,获取模块可以用于从标签节点获取数据索引信息,并根据数据索引信息获取样本数据。
在一示例性实施例中,发送模块可以用于将加密后的中间数据发送至标签节点。
在一示例性实施例中,调整模块可以用于如果从标签节点接收到包含噪声的误差数据,则根据包含噪声的误差数据调整第一部分的参数。
在一示例性实施例中,上述中间数据可以采用同态加密。
根据本公开的第五方面,提供一种机器学习模型的联合训练装置,可以应用于图1中联合训练系统100的标签节点120,联合训练系统100还可以包括数据节点110;如图8所示,该装置800可以包括:接收模块810,用于从数据节点接收中间数据;处理模块820,用于通过目标模型的第二部分处理中间数据,并基于数据索引信息对应的标签数据得到误差数据;发送模块830,用于将误差数据发送至数据节点;调整模块840,用于根据误差数据调整目标模型的第二部分的参数。
在一示例性实施例中,处理模块还可以用于根据误差数据判断是否达到预设条件;发送模块还可以用于如果达到预设条件,则向数据节点发送训练结束信息,并将当前的第二部分确定为目标模型最终的第二部分,以及如果未达到预设条件,则将误差数据发送至数据节点。
在一示例性实施例中,发送模块还可以用于向数据节点发送数据索引信息,使数据节点通过目标模型的第一部分处理数据索引信息对应的样本数据以得到中间数据。
在一示例性实施例中,接收模块可以用于从数据节点接收加密后的中间数据。
在一示例性实施例中,发送模块可以用于将包含噪声的误差数据发送至数据节点。
在一示例性实施例中,上述中间数据可以采用同态加密。
上述装置中各模块的具体细节在方法部分的实施例中已经详细说明,因此不再赘述。
本公开的示例性实施例还提供了一种能够实现上述方法的电子设备。
所属技术领域的技术人员能够理解,本公开的各个方面可以实现为系统、方法或程序产品。因此,本公开的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。
下面参照图9来描述根据本公开的这种示例性实施例的电子设备900。图9显示的电子设备900仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图9所示,电子设备900以通用计算设备的形式表现。电子设备900的组件可以包括但不限于:上述至少一个处理单元910、上述至少一个存储单元920、连接不同系统组件(包括存储单元920和处理单元910)的总线930、显示单元940。
其中,存储单元存储有程序代码,程序代码可以被处理单元910执行,使得处理单元910执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。例如,处理单元910可以执行图2、图3、图5或图6所示的方法步骤等。
存储单元920可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)921和/或高速缓存存储单元922,还可以进一步包括只读存储单元(ROM)923。
存储单元920还可以包括具有一组(至少一个)程序模块925的程序/实用工具924,这样的程序模块925包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线930可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备900也可以与一个或多个外部设备1100(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备900交互的设备通信,和/或与使得该电子设备900能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口950进行。并且,电子设备900还可以通过网络适配器960与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网 络适配器960通过总线930与电子设备900的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备900使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开示例性实施例的方法。
本公开的示例性实施例还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本公开的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当程序产品在终端设备上运行时,程序代码用于使终端设备执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。
参考图10所示,描述了根据本公开的示例性实施例的用于实现上述方法的程序产品1000,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本公开的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言的任意组合来编写用于执行本公开操作的程序 代码,程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
此外,上述附图仅是根据本公开示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的示例性实施例,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施例。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限。

Claims (22)

  1. 一种机器学习模型的联合训练方法,应用于联合训练系统,其特征在于,所述联合训练系统包括数据节点和标签节点;所述方法包括:
    所述数据节点获取用于训练的样本数据;
    所述数据节点通过目标模型的第一部分处理所述样本数据,得到中间数据,并将所述中间数据发送至所述标签节点;
    所述标签节点通过所述目标模型的第二部分处理所述中间数据,并基于所述样本数据对应的标签数据,得到误差数据;
    所述标签节点将所述误差数据发送至所述数据节点;
    所述数据节点根据所述误差数据调整所述第一部分的参数,和/或所述标签节点根据所述误差数据调整所述第二部分的参数;
    其中,所述目标模型由所述第一部分和所述第二部分组成。
  2. 根据权利要求1所述的方法,其特征在于,所述得到误差数据之后,所述方法还包括:
    所述标签节点根据所述误差数据判断是否达到预设条件;
    如果达到所述预设条件,则所述标签节点向所述数据节点发送训练结束信息,以当前的所述第一部分和所述第二部分确定所述目标模型;
    如果未达到所述预设条件,则所述标签节点执行将所述误差数据发送至所述数据节点的步骤。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述标签节点向所述数据节点发送数据索引信息;
    所述数据节点获取用于训练的样本数据,包括:
    所述数据节点根据所述数据索引信息获取所述样本数据。
  4. 根据权利要求1所述的方法,其特征在于,所述数据节点通过目标模型的第一部分处理所述样本数据,得到中间数据,并将所述中间数据发送至所述标签节点,包括:
    所述数据节点通过目标模型的第一部分处理所述样本数据,得到中间数据,并将加密后的所述中间数据发送至所述标签节点。
  5. 根据权利要求4所述的方法,其特征在于,所述标签节点将所述误差数据发送至所述数据节点,包括:
    所述标签节点将添加噪声的误差数据发送至所述数据节点。
  6. 根据权利要求4所述的方法,其特征在于,所述中间数据采用同态加密。
  7. 一种机器学习模型的联合训练方法,其特征在于,应用于联合训练系统的数据节点,所述联合训练系统还包括标签节点;所述方法包括:
    获取用于训练的样本数据;
    通过目标模型的第一部分处理所述样本数据,得到中间数据;
    将所述中间数据发送至所述标签节点;
    如果从所述标签节点接收到误差数据,则根据所述误差数据调整所述第一部分的参数。
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    如果从所述标签节点接收到训练结束信息,则将当前的所述第一部分确定为所述目标模型最终的第一部分。
  9. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    从所述标签节点获取数据索引信息;
    所述获取用于训练的样本数据,包括:
    根据所述数据索引信息获取所述样本数据。
  10. 根据权利要求7所述的方法,其特征在于,所述将所述中间数据发送至所述标签节点,包括:
    将加密后的所述中间数据发送至所述标签节点。
  11. 根据权利要求10所述的方法,其特征在于,所述如果从所述标签节点接收到误差数据,则根据所述误差数据调整所述第一部分的参数,包括:
    如果从所述标签节点接收到包含噪声的误差数据,则根据所述包含噪声的误差数据调整所述第一部分的参数。
  12. 根据权利要求10所述的方法,其特征在于,所述中间数据采用同态加密。
  13. 一种机器学习模型的联合训练方法,其特征在于,应用于联合训练系统的标签节点,所述联合训练系统还包括数据节点;所述方法包括:
    从所述数据节点接收中间数据;
    通过目标模型的第二部分处理所述中间数据,并基于数据索引信息对应的标签数据得到误差数据;
    将所述误差数据发送至所述数据节点;
    根据所述误差数据调整所述目标模型的第二部分的参数。
  14. 根据权利要求13所述的方法,其特征在于,所述基于数据索引信息对应的标签数据得到误差数据之后,所述方法还包括:
    根据所述误差数据判断是否达到预设条件;
    如果达到所述预设条件,则向所述数据节点发送训练结束信息,并将当前的所述第二部分确定为所述目标模型最终的第二部分;
    如果未达到所述预设条件,则执行将所述误差数据发送至所述数据节点的步骤。
  15. 根据权利要求13所述的方法,其特征在于,所述从所述数据节点接收中间数据之前,所述方法还包括:
    向所述数据节点发送所述数据索引信息,使所述数据节点通过所述目标模型的第一部分处理所述数据索引信息对应的样本数据以得到所述中间数据。
  16. 根据权利要求13所述的方法,其特征在于,所述从所述数据节点接收中间数据,包括:
    从所述数据节点接收加密后的所述中间数据。
  17. 根据权利要求16所述的方法,其特征在于,所述将所述误差数据发送至所述数据节点,包括:
    将包含噪声的误差数据发送至所述数据节点。
  18. 根据权利要求16所述的方法,其特征在于,所述中间数据采用同态加密。
  19. 一种机器学习模型的联合训练装置,其特征在于,应用于联合训练系统的数据节点,所述联合训练系统还包括标签节点;所述装置包括:
    获取模块,用于获取用于训练的样本数据;
    处理模块,用于通过目标模型的第一部分处理所述样本数据,得到中间数据;
    发送模块,用于将所述中间数据发送至所述标签节点;
    调整模块,用于如果从所述标签节点接收到误差数据,则根据所述误差数据调整所述第一部分的参数。
  20. 一种机器学习模型的联合训练装置,其特征在于,应用于联合训练系统的标签节点,所述联合训练系统还包括数据节点;所述装置包括:
    接收模块,用于从所述数据节点接收中间数据;
    处理模块,用于通过目标模型的第二部分处理所述中间数据,并基于数据索引信息对应的标签数据得到误差数据;
    发送模块,用于将所述误差数据发送至所述数据节点;
    调整模块,用于根据所述误差数据调整所述目标模型的第二部分的参数。
  21. 一种电子设备,其特征在于,包括:
    处理器;以及
    存储器,用于存储所述处理器的可执行指令;
    其中,所述处理器配置为经由执行所述可执行指令来执行权利要求1-18任一项所述的方法。
  22. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1-18任一项所述的方法。
PCT/CN2020/070857 2019-02-26 2020-01-08 机器学习模型的联合训练方法、装置、设备及存储介质 WO2020173228A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910142560.3A CN111612167B (zh) 2019-02-26 2019-02-26 机器学习模型的联合训练方法、装置、设备及存储介质
CN201910142560.3 2019-02-26

Publications (1)

Publication Number Publication Date
WO2020173228A1 true WO2020173228A1 (zh) 2020-09-03

Family

ID=72199896

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/070857 WO2020173228A1 (zh) 2019-02-26 2020-01-08 机器学习模型的联合训练方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN111612167B (zh)
WO (1) WO2020173228A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326889A (zh) * 2021-06-16 2021-08-31 北京百度网讯科技有限公司 用于训练模型的方法和装置

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116034381A (zh) * 2020-11-06 2023-04-28 华为技术有限公司 通信方法和通信装置
CN116049084A (zh) * 2021-10-28 2023-05-02 华为技术有限公司 一种模型训练系统和方法
CN116489148A (zh) * 2022-01-14 2023-07-25 华为技术有限公司 一种聚合通信方法及装置
CN114121206B (zh) * 2022-01-26 2022-05-20 中电云数智科技有限公司 一种基于多方联合k均值建模的病例画像方法及装置
CN114529336A (zh) * 2022-01-27 2022-05-24 中银金融科技有限公司 基于etc数据的客户画像构建系统及方法
CN114708109B (zh) * 2022-03-01 2022-11-11 上海钐昆网络科技有限公司 风险识别模型的训练方法、装置、设备及存储介质
CN114330673A (zh) * 2022-03-15 2022-04-12 支付宝(杭州)信息技术有限公司 一种对业务预测模型进行多方联合训练的方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105023580A (zh) * 2015-06-25 2015-11-04 中国人民解放军理工大学 基于可分离深度自动编码技术的无监督噪声估计和语音增强方法
US20170270406A1 (en) * 2016-03-18 2017-09-21 Qualcomm Incorporated Cloud-based processing using local device provided sensor data and labels
CN108446770A (zh) * 2017-02-16 2018-08-24 中国科学院上海高等研究院 一种基于采样的分布式机器学习慢节点处理系统及方法
WO2018174873A1 (en) * 2017-03-22 2018-09-27 Visa International Service Association Privacy-preserving machine learning
CN108667734A (zh) * 2018-05-18 2018-10-16 南京邮电大学 一种基于q学习和lstm神经网络的快速路由决策算法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10535014B2 (en) * 2014-03-10 2020-01-14 California Institute Of Technology Alternative training distribution data in machine learning
EP3192016B1 (en) * 2014-09-12 2019-05-08 Microsoft Technology Licensing, LLC Computing system for training neural networks
US20170132528A1 (en) * 2015-11-06 2017-05-11 Microsoft Technology Licensing, Llc Joint model training
US11144616B2 (en) * 2017-02-22 2021-10-12 Cisco Technology, Inc. Training distributed machine learning with selective data transfers
US11443226B2 (en) * 2017-05-17 2022-09-13 International Business Machines Corporation Training a machine learning model in a distributed privacy-preserving environment
US20200151611A1 (en) * 2017-05-26 2020-05-14 Google Llc Machine-Learned Model System
CN109308418B (zh) * 2017-07-28 2021-09-24 创新先进技术有限公司 一种基于共享数据的模型训练方法及装置
CN109189825B (zh) * 2018-08-10 2022-03-15 深圳前海微众银行股份有限公司 横向数据切分联邦学习建模方法、服务器及介质
CN109345302B (zh) * 2018-09-27 2023-04-18 腾讯科技(深圳)有限公司 机器学习模型训练方法、装置、存储介质和计算机设备
CN109299161B (zh) * 2018-10-31 2022-01-28 创新先进技术有限公司 一种数据选择方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105023580A (zh) * 2015-06-25 2015-11-04 中国人民解放军理工大学 基于可分离深度自动编码技术的无监督噪声估计和语音增强方法
US20170270406A1 (en) * 2016-03-18 2017-09-21 Qualcomm Incorporated Cloud-based processing using local device provided sensor data and labels
CN108446770A (zh) * 2017-02-16 2018-08-24 中国科学院上海高等研究院 一种基于采样的分布式机器学习慢节点处理系统及方法
WO2018174873A1 (en) * 2017-03-22 2018-09-27 Visa International Service Association Privacy-preserving machine learning
CN108667734A (zh) * 2018-05-18 2018-10-16 南京邮电大学 一种基于q学习和lstm神经网络的快速路由决策算法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326889A (zh) * 2021-06-16 2021-08-31 北京百度网讯科技有限公司 用于训练模型的方法和装置

Also Published As

Publication number Publication date
CN111612167B (zh) 2024-04-16
CN111612167A (zh) 2020-09-01

Similar Documents

Publication Publication Date Title
WO2020173228A1 (zh) 机器学习模型的联合训练方法、装置、设备及存储介质
WO2021204040A1 (zh) 联邦学习数据处理方法、装置、设备及存储介质
CN110399742B (zh) 一种联邦迁移学习模型的训练、预测方法及装置
JP7011083B2 (ja) 信用調査システム、信用調査データの記憶方法、装置及びコンピュータプログラム
WO2022089256A1 (zh) 联邦神经网络模型的训练方法、装置、设备、计算机程序产品及计算机可读存储介质
CN110189192B (zh) 一种信息推荐模型的生成方法及装置
WO2021114911A1 (zh) 用户风险评估方法及装置、电子设备、存储介质
WO2020134704A1 (zh) 基于联邦学习的模型参数训练方法、终端、系统及介质
EP2880553B1 (en) Uniquely identifying a network-connected entity
CN113505882B (zh) 基于联邦神经网络模型的数据处理方法、相关设备及介质
CN111400504B (zh) 企业关键人的识别方法和装置
CN111259446B (zh) 基于联邦迁移学习的参数处理方法、设备及存储介质
CN111310204B (zh) 数据处理的方法及装置
CN112287379B (zh) 业务数据使用方法、装置、设备、存储介质和程序产品
WO2023071105A1 (zh) 一种特征变量的分析方法、装置、计算机设备及存储介质
CN113051586B (zh) 联邦建模系统及方法、联邦模型预测方法、介质、设备
WO2021159669A1 (zh) 系统安全登录方法、装置、计算机设备和存储介质
US20230186049A1 (en) Training method and apparatus for a neural network model, device and storage medium
US11734455B2 (en) Blockchain-based data processing method and apparatus, device, and storage medium
CN115526425A (zh) 一种基于区块链和大数据的金融数据预测系统及方法
CN114025310B (zh) 基于边缘计算环境的位置服务隐私保护方法、装置及介质
CN116633688B (zh) 一种aigc服务隐私保护方法和设备
WO2022121183A1 (zh) 文本模型的训练方法、识别方法、装置、设备及存储介质
CN113239401A (zh) 一种基于电力物联网的大数据分析系统、方法及计算机存储介质
CN117349685A (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: 20762419

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20.01.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20762419

Country of ref document: EP

Kind code of ref document: A1