WO2021189926A1 - 业务模型训练方法、装置、***及电子设备 - Google Patents

业务模型训练方法、装置、***及电子设备 Download PDF

Info

Publication number
WO2021189926A1
WO2021189926A1 PCT/CN2020/132877 CN2020132877W WO2021189926A1 WO 2021189926 A1 WO2021189926 A1 WO 2021189926A1 CN 2020132877 W CN2020132877 W CN 2020132877W WO 2021189926 A1 WO2021189926 A1 WO 2021189926A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
iteration
data
unit
parameter
Prior art date
Application number
PCT/CN2020/132877
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 WO2021189926A1 publication Critical patent/WO2021189926A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/10Machine learning using kernel methods, e.g. support vector machines [SVM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers
    • 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

Definitions

  • One or more embodiments of this specification relate to the field of artificial intelligence, and in particular to business model training methods, devices, systems, and electronic equipment.
  • Model training is an important part of artificial intelligence technology. Model training usually relies on user sample data. Generally, the more sample data of the user, the richer the feature dimension, and the higher the accuracy of the trained model.
  • the business side does not have a large amount of user sample data with rich dimensions. For this reason, the business side needs to obtain user sample data from a third party that provides data services, and enrich the feature dimension through the third-party user sample data, thereby training Develop a better business model.
  • the business party is called the data consumer, and the third party that provides data services is called the data provider.
  • the data provider Since the user sample data is the user's private data, the data provider usually does not allow the user sample data to be provided to the data user. Moreover, even if conditions permit, as an important asset, data providers are reluctant to export data directly. Therefore, how to enrich the characteristic dimensions of data users without revealing user privacy has become an issue that the industry continues to discuss.
  • this specification provides a method for training a business model.
  • the business model includes a first model unit and a second model unit.
  • the first model unit is configured at the data provider
  • the second model unit is configured at The data consumer, the data provider holds the first sample data of the sample object, the data consumer holds the second sample data of the sample object and the label of the sample object, the first sample
  • the feature dimensions of the data and the second sample data are not exactly the same.
  • the method applied to the data provider includes: generating the current iteration based on the model parameter M T-1 of the first model unit in the last iteration Model parameter M T ; input the first sample data into the first model unit whose model parameter is M T to obtain an intermediate result, and send the intermediate result to the data user; receive the parameter update returned by the data user after the decision, the decision parameter update by the data consumer of the intermediate result and the second input data sample for the second model parameters of the model unit of N T, based on the prediction result of the output unit and the second model determining said sample object tag; N T is the model parameter of the second iteration of this model unit; when the parameter update decision is accepts this iteration of the model parameters, detecting the service model converged; if No, based on the model parameter M T of the current iteration of the first model unit, execute the step of generating the model parameter M T+1 of the next iteration; if yes, stop the iteration of the model parameter of the first model unit , And confirm that the business model training is
  • this specification provides a method for training a business model.
  • the business model includes a first model unit and a second model unit.
  • the first model unit is configured on the data provider
  • the second model unit is configured on the data provider.
  • the data consumer, the data provider holds the first sample data of the sample object, the data consumer holds the second sample data of the sample object and the label of the sample object, the first sample
  • the feature dimensions of the data and the second sample data are not exactly the same.
  • the method applied to the data user includes: generating the current iteration based on the model parameter NT-1 of the second model unit during the last iteration model parameter N T; when the intermediate result is sent by receiving the data, the intermediate result and the second sample data is input to the second model as the model parameters of the N T cells; the result is the intermediate
  • the data provider inputs the first sample data into the first model unit whose model parameter is M T , where the M T is the model parameter of the current iteration of the first model unit; based on the second model unit
  • the output prediction result and the label of the sample object determine the parameter update decision, and send the parameter update decision to the data provider, so that the data provider performs subsequent processing based on the parameter update decision; if the parameter is updated decision is to accept the current iteration the model parameters, the detecting the traffic model converged; if not, the second model based on N T cell model parameters at the current iteration, the model parameters to generate N T perform the next iteration + Step 1 ; if yes, stop
  • this specification provides a training system for a business model
  • the training system includes: a data user and a data provider;
  • the business model includes a first model unit and a second model unit, the first model unit Configured on the data provider, the second model unit is configured on the data consumer, the data provider holds the first sample data of the sample object, and the data consumer holds the second sample data of the sample object And the label of the sample object, the feature dimensions of the first sample data and the second sample data are not completely the same;
  • the data provider is used for the model based on the last iteration of the first model unit
  • the parameter M T-1 generates the model parameter M T of this iteration;
  • the first sample data is input to the first model unit whose model parameter is M T to obtain an intermediate result, and the intermediate result is sent to the data
  • the user and when it is determined that the parameter update decision returned by the data user is to accept the model parameters of this iteration, it detects whether the business model has converged, and if not, it is based on the
  • this specification provides a training device for a business model.
  • the business model includes a first model unit and a second model unit.
  • the first model unit is configured at the data provider
  • the second model unit is configured at The data consumer, the data provider holds the first sample data of the sample object, the data consumer holds the second sample data of the sample object and the label of the sample object, the first sample
  • the feature dimensions of the data and the second sample data are not exactly the same.
  • the device is applied to the data provider and includes: a generating module, which generates a cost based on the model parameter M T-1 at the last iteration of the first model unit The model parameter M T of the second iteration; a sending module, which inputs the first sample data into the first model unit whose model parameter is M T to obtain an intermediate result, and sends the intermediate result to the data user; receiving module after receiving the parameter data is returned from update decision using the updated parameter decision by the consumer to the data intermediate result and the second input data sample for the second model parameters of the model unit N T, on the basis of the prediction results and the tag output from the two model unit determining sample object; N T is the model parameter of the second iteration of this model unit; decision module, the parameter update when the decision is to accept the current iteration of the model parameter detecting the traffic model converged; if not, based on the first model means model parameter M T when the current iteration is performed to generate the model parameters M T + 1 of the next iteration step; if yes, Stop the it
  • this specification provides a training device for a business model.
  • the business model includes a first model unit and a second model unit.
  • the first model unit is configured on the data provider
  • the second model unit is configured on the data provider.
  • the data consumer, the data provider holds the first sample data of the sample object, the data consumer holds the second sample data of the sample object and the label of the sample object, the first sample
  • the feature dimensions of the data and the second sample data are not exactly the same.
  • the device is applied to the data user and includes: a generating module, which generates the cost based on the model parameter NT-1 of the second model unit at the last iteration iteration model parameters N T; second prediction module model unit, upon receiving the data sent by an intermediate result, the intermediate result and the second sample data is input to the model parameters for the N T; the The intermediate result is obtained by the data provider inputting the first sample data into the first model unit whose model parameter is M T , where the M T is the model parameter of the current iteration of the first model unit; The determining module determines the parameter update decision based on the prediction result output by the second model unit and the label of the sample object, and sends the parameter update decision to the data provider, so that the data provider updates the decision based on the parameter for subsequent processing; decision module, if the decision is to accept the parameter update model parameters of the current iteration, the traffic is detected model converged; if not, based on the model parameter N T during the second iteration of this model unit , Execute the step of
  • this specification provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein the processor executes the executable instructions to implement the services described in the first aspect Model training method.
  • this specification provides a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the business model training method described in the first aspect is implemented.
  • this specification provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein the processor executes the executable instructions to implement the services described in the second aspect Model training method.
  • this specification provides a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the business model training method described in the second aspect is implemented.
  • the data provider does not directly provide the sample data to the data user, but instead converts the sample data into an intermediate result through the first model unit, and provides the intermediate result to the data user In this way, the data of the data user is enriched under the condition that the user's private data is not leaked.
  • the data provider and the data user each iteratively update the model parameters of their respective model units, instead of the existing iterative update of the model parameters based on the gradient information of the interaction between the two parties. Therefore, only intermediate results and some notification information need to be exchanged between the two parties, without the need to exchange gradient information, so the amount of data exchanged between the two parties is greatly reduced, so bandwidth resources can be effectively saved. In addition, since there is no need to transmit gradient information, criminals cannot infer user privacy data based on gradient information, so the security of user privacy data can be guaranteed.
  • Fig. 1 is a schematic diagram of a business model training system shown in an exemplary embodiment of the present application
  • Fig. 2 is an interactive flowchart of a method for training a business model according to an exemplary embodiment of the present application
  • Fig. 3 is a flowchart of another business model training method shown in an exemplary embodiment of the present application.
  • FIG. 4 is a flowchart of another business model training method shown in an exemplary embodiment of the present application.
  • Fig. 5 is an interaction diagram of a business model training method shown in an exemplary embodiment of the present application.
  • Fig. 6 is a hardware structure diagram of an electronic device according to an exemplary embodiment of the present application.
  • Fig. 7 is a block diagram of a business model training device shown in an exemplary embodiment of the present application.
  • Fig. 8 is a block diagram of a business model training device shown in an exemplary embodiment of the present application.
  • the steps of the corresponding method may not be executed in the order shown and described in this specification.
  • the method may include more or fewer steps than described in this specification.
  • a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step in other embodiments. describe.
  • data providers can use models to convert user sample data into intermediate results (such as various credit scores, etc.) based on their understanding of the industry and relevant experience, and provide the intermediate results to data users to make Without divulging user privacy, enrich the dimension of the characteristics of data users.
  • intermediate results provided by the data provider may not fully meet the needs of the data user.
  • the data provider and the data consumer can jointly train the business model on the premise that the data of both parties is available and invisible.
  • available and invisible means that both parties cannot read each other's data, but can use the data for calculations.
  • common programs can include: federated learning.
  • the business model includes a first model unit and a second model unit.
  • the model parameters of the first model unit and the second model unit together constitute the model parameters of the business model.
  • the data consumer configures the first model unit, and the data provider configures the second model unit.
  • the two parties exchange gradient information, and complete the update of the model parameters of the first model unit and the second model unit through the exchanged gradient information, so as to complete the training of the business model.
  • the business model includes a first model unit and a second model unit.
  • the first model unit is configured on the data provider, and the second model unit It is configured on the data consumer, the data provider holds the first sample data of the sample object, the data consumer holds the second sample data of the sample object and the label of the sample object, the first sample data and the The feature dimensions of the second sample data are not exactly the same.
  • the data provider and data user can respectively iterate the model parameters of their respective model units. After the iteration, the data provider can input the first sample data into the first model unit to obtain intermediate results, and send the intermediate results to data users square.
  • the data user can input the intermediate results and the second sample data into the second model unit, and determine whether to accept the model parameters of this iteration based on the prediction result output by the second model unit and the label of the sample object. Each will continue to update iteratively on the next model parameters. If it is not accepted, the two parties will retreat to the model parameters of the last iteration, and then continue to update the next iteration of the model parameters based on the model parameters of the last iteration until the business model converges.
  • the data provider does not directly provide the sample data to the data user, but instead converts the sample data into an intermediate result through the first model unit, and provides the intermediate result to the data user In this way, the data of the data user is enriched under the condition that the user's private data is not leaked.
  • the data provider and the data user each iteratively update the model parameters of their respective model units, rather than iteratively update the model parameters based on the gradient information of the interaction between the two parties. Therefore, only intermediate results and some notification information need to be exchanged between the two parties, without the need to exchange gradient information, so the amount of data exchanged between the two parties is greatly reduced, so bandwidth resources can be effectively saved. In addition, since there is no need to transmit gradient information, criminals cannot infer user privacy data based on gradient information, so the security of user privacy data can be guaranteed.
  • Business model refers to a model that can perform business processing.
  • the business model can be a neural network, deep learning model, logistic regression, SVM (Support Vector Machine, Support Vector Machine), and so on.
  • SVM Small Vector Machine, Support Vector Machine
  • the business model may also be other linear models that can be supervised training, etc.
  • the business model is only exemplified here, and the business model is not specifically limited.
  • the business model can be used for predictive business, classification business, identification business, and so on.
  • This business model can be applied in the field of risk control.
  • a banking institution can use the user's financial data collected by itself and user behavior data of data providers such as e-commerce, and perform anti-fraud identification and credit rating based on the business model.
  • the business model can also be applied in other fields, and the application fields of the business model are not specifically limited here.
  • the business model unit is a part of the business model.
  • the business model is split into two parts, namely the first model unit and the second model unit.
  • the model parameters of the first model unit and the model parameters of the second model unit together constitute the model parameters of the business model.
  • sample objects and sample data can be users or other objects.
  • the sample objects can be vehicles and other vehicles.
  • the sample object is only exemplified, and it is not specifically limited.
  • the sample data is related data of the sample object, which is used to describe the sample object.
  • the sample data includes multiple feature dimensions.
  • the characteristic dimensions of the sample object may include: the user's age, gender, occupation, education, user operation behavior, and so on.
  • the feature dimension is only exemplified here, and it is not specifically limited.
  • sample data may be user data, or vehicle data, etc.
  • the sample data is only exemplified here, and it is not specifically limited.
  • Fig. 1 is a schematic diagram of a business model training system shown in an exemplary embodiment of the present application.
  • the business model training system includes: data provider and data user.
  • the data provider and the data user jointly train the business model.
  • the first model unit of the business model is configured on the data provider.
  • the second model unit of the business model is configured on the data consumer.
  • both the data provider and the data user store data of many objects.
  • the data provider and the data user can conduct a private intersection, so that the data provider and the data user can extract the objects shared by the two parties as sample objects, and use the data of the objects shared by the two parties as the sample objects. sample.
  • the data provider holds the first sample data of the sample object
  • the data user holds the second sample data of the sample object.
  • the feature dimensions of the first sample data and the second sample data are not completely the same.
  • the first sample data contains more feature dimensions than the second sample data contains more feature dimensions.
  • the number of feature dimensions of the two is not limited here.
  • the feature dimension of the first sample data and the feature dimension of the second sample data may overlap, or may be completely the same, or may not overlap, which is not specifically limited here.
  • FIG. 2 is an interaction flowchart of a method for training a business model according to an exemplary embodiment of the present application.
  • the method may include the following steps.
  • Step 202 The data provider generates the model parameter M T of this iteration based on the model parameter M T-1 of the first model unit in the last iteration.
  • the data provider may initialize the model parameters of the first model unit.
  • the preset matrix is fixed in each iteration.
  • the data provider may model parameters based on a first model unit from the previous iteration M T-1, And the preset probability distribution type to generate the target probability distribution.
  • the model parameter M T of this iteration obeys the determined target probability distribution. Then, the data provider can generate the model parameter M T for this iteration according to the target probability distribution.
  • the covariance matrix of the model parameters may also be configured for the first model unit.
  • the data provider can initialize the model parameters of the first model unit and initialize the covariance matrix of the first model unit.
  • the data provider may model parameters based on a first model unit from the previous iteration M T-1,
  • the covariance matrix of the last iteration of the first model unit and the preset probability distribution type generate the target probability distribution.
  • the model parameter M T of this iteration obeys the determined target probability distribution.
  • the data provider can generate the model parameter M T of this iteration that obeys the target probability distribution according to the target probability distribution.
  • the preset probability distribution type may be a normal distribution, or other types of probability distributions, such as other symmetrical distributions, as long as the condition of fine balance is satisfied.
  • the preset probability distribution type is only exemplified, and it is not specifically limited.
  • the data provider can take the model parameter M T-1 of the last iteration of the first model unit as the expectation, and the covariance matrix A T-1 of the last iteration as the expectation Variance, resulting in a normal distribution N (M T-1 , A T-1 ).
  • the model parameter M T obeys N (M T-1 , A T-1 ), that is, M T ⁇ N (M T-1 , A T-1 ).
  • the data provider can generate a set of random numbers based on the N(M T-1 , A T-1 ), and use the random numbers as the model parameter M T of this iteration.
  • taking random numbers according to the probability distribution can be realized according to the existing method of taking random numbers, which will not be repeated here.
  • the covariance matrix of the first model unit is continuously updated in each iteration.
  • the covariance matrix A T-1 of the last iteration of the first model unit can be passed through the covariance matrix A T-2 of the last iteration of the first model unit and the model parameter M of the last iteration of the first model unit. T-1 confirmed.
  • the covariance matrix of each iteration can be updated based on the covariance matrix of the previous iteration and the model parameters of this iteration when the model parameters of this iteration are accepted, or at other times
  • the update is only exemplified here, and the update timing of the covariance matrix of the first model unit is not specifically limited.
  • the covariance matrix of the model parameters Since the covariance matrix of the model parameters records the relevant information of the model parameters for each iteration, the covariance matrix can reflect the convergence direction of the business model. Therefore, the data provider based on the model parameter of the iterative M T-1 of the previous iteration and a covariance matrix A T-1, it is determined that the current iteration of the model parameters M T, such that a first model unit can be converged in the business model The model parameters are iterated in the direction, so the convergence speed of the business model can be greatly improved.
  • the covariance matrix of the previous iteration of the first model unit is an incidence matrix, or the covariance matrix of the previous iteration of the first model unit is a momentum matrix.
  • the covariance matrix of the first model unit may also be another type of matrix, such as a preset matrix, which is not specifically limited here.
  • first model unit and the second model unit may use the same model parameter update method, or different model parameter update methods, which are not specifically limited here.
  • the incidence matrix can be determined by the following formula:
  • C T-1 ⁇ C T-2 +(1- ⁇ )M T-1 ⁇ M T-1 T ;
  • CT-2 is the incidence matrix of the last iteration of the first model unit
  • CT-1 is the incidence matrix of the last iteration of the first model unit
  • M T-1 is the model parameter of the last iteration of the first model unit
  • is a preset value, such as 0.99.
  • the value of ⁇ is only exemplified, and the value of ⁇ is not specifically limited.
  • Step 204 the data consumer model parameters of the model of the second unit from the previous iteration based on N T-1, the cost of raw iterations of the model parameters N T.
  • the data user may initialize the model parameters of the second model unit.
  • the data consumer can model parameters of the model of the second unit from the previous iteration based on N T-1, And the preset probability distribution type to generate the target probability distribution.
  • This iteration of the model parameters N T obey the determined target probability distribution.
  • the data consumer can be based on the probability distribution of the target, the cost of raw iterations of the model parameters N T.
  • the covariance matrix of the model parameters can also be configured for the second model unit.
  • the data user can initialize the model parameters of the second model unit and initialize the covariance matrix of the second model unit.
  • the model parameters based on the previous iteration unit N T-1 when the cost of raw iteration model parameters N T, the data consumer can model parameters of the model of the second unit from the previous iteration based on N T-1, The covariance matrix of the last iteration of the second model unit and the preset probability distribution type generate the target probability distribution.
  • This iteration of the model parameters N T obey the determined target probability distribution.
  • the data consumer can be based on the probability distribution of the target, the subject of the present iteration generating model parameters N T certain probability distribution.
  • the preset probability distribution type can be normal distribution, or other types of distributions, such as other symmetrical distributions, as long as it meets the conditions of careful balance, here is just an example of the preset probability distribution type It is a sexual description, and it is not specifically limited.
  • the data user can take the model parameter NT -1 of the second model unit last iteration as the expectation, and use the model parameter of the second model unit last iteration of the agreement.
  • the variance matrix B T-1 is used as the variance to generate a normal distribution N (N T-1 , B T-1 ).
  • the model parameter N T obeys N (N T-1 , B T-1 ), that is, N T ⁇ N (N T-1 , B T-1 ).
  • taking random numbers according to the probability distribution can be realized according to the existing method of taking random numbers, which will not be repeated here.
  • the slope variance matrix of the second model unit is continuously updated in each iteration.
  • the covariance matrix B T-1 of the last iteration of the second model unit can be passed through the covariance matrix B T-2 of the last iteration of the second model unit and the model parameter N of the last iteration of the second model unit. T-1 confirmed.
  • the covariance matrix of each iteration can be updated based on the covariance matrix of the previous iteration and the model parameters of this iteration when the model parameters of this iteration are accepted, or at other times
  • the update is only illustrative here, and the update timing of the covariance matrix of the second model unit is not specifically limited.
  • the covariance matrix of the second model unit Since the covariance matrix of the second model unit records the relevant information of the model parameters of each iteration, the covariance matrix can reflect the convergence direction of the business model. Therefore, the data consumer according to the above-described model parameters covariance matrix iteration N B T-1, it is determined that the current iteration of the model parameters N T, the second model may be T-1 unit and the second unit from the previous iteration of the model along The direction of business model convergence is to iterate the model parameters, so the convergence speed of the business model can be greatly improved.
  • the covariance matrix of the previous iteration of the second model unit is an incidence matrix of M T-1
  • the covariance matrix of the previous iteration of the second model unit is a momentum matrix of NT-1
  • the covariance matrix of the last iteration of the second model unit may also be another type of matrix, which is not specifically limited here.
  • the incidence matrix D T-1 can be determined by the following formula:
  • D T-1 ⁇ D T-2 +(1- ⁇ )N T-1 ⁇ N T-1 T ;
  • D T-2 is the incidence matrix of the last iteration of the second model unit
  • D T-1 is the incidence matrix of the last iteration of the second model unit
  • NT -1 is the model parameter of the last iteration of the second model unit
  • is the preset value.
  • Step 206 The data provider inputs the first sample data into the first model unit whose model parameter is M T to obtain an intermediate result.
  • the data provider may provide the first side of the sample data of the target object held data is input to the model parameters to a first model means M T, the output of the first model unit model parameters of M T Intermediate results.
  • Step 208 The data provider sends the intermediate result to the data user.
  • Step 210 the data consumer intermediate result and the second sample data is input to the model parameters to a second model means N T and the sample and label prediction result of the object based on the output of the second model unit, Determine the parameter update decision.
  • the second model unit when implementing a second sample data, using only the data held by the side of the target object, and the intermediate result is input to the model parameters of the N T, to the second model as the model parameters of the N T
  • the unit outputs the prediction result.
  • the parameter update decision includes: accepting the model parameters of this iteration or not accepting the model parameters of this iteration.
  • model parameter receiving means of the present iteration receiving model parameters M T N T model parameters of the first model unit according to a second iteration of the model unit and receiving the current iteration. In other words, it means to accept the model parameters of this iteration of the business model.
  • M T does not accept the model parameters of the first model unit of the present iteration of the model parameters and acceptance N T model unit according to the second iteration. In other words, it means that the model parameters of this iteration of the business model are not accepted.
  • model parameters usually calculates the gradient of each iteration, and then determines the model parameters of this iteration based on the gradient of the previous iteration.
  • the model parameters of this model are determined by the gradient of the last model, so that the iteration of the model parameters can be carried out in the direction of good business prediction effect.
  • the model parameters of each iteration are not determined based on the gradient, but randomly determined based on the probability distribution. Therefore, when determining the model parameters of this iteration, it is also necessary to verify whether the model parameters of this iteration are carried out in the direction where the business prediction effect is good. Therefore, in this application, it is also necessary to determine whether to accept the model parameters of the business model of this iteration based on the parameter output of the second model unit of the model parameters of this iteration and the label, so as to realize that the business model is Update model parameters in the direction that meets the requirements of business forecasts.
  • the data user may calculate the value of the loss function of the business model based on the prediction result and the label with the sample object.
  • the data user can determine the amount of change in the value of the loss function of the business model based on the recorded value of the loss function in the last iteration and the value of the loss function calculated in this iteration, and based on the calculated value The amount of change determines the parameter update decision.
  • the data user when determining the parameter update decision based on the calculated change, calculates the acceptance probability value based on the change, and based on the acceptance probability, randomly determines whether to accept this iteration
  • the model parameters are used as parameter update decisions.
  • the following introduces a "based on the acceptance probability, randomly determining whether to accept the model parameters of this iteration as a parameter update decision" method.
  • the data user can also generate random numbers within a preset range; the random numbers obey a uniform distribution within the preset range.
  • the data user determines that the parameter update decision is to accept the model parameters of this iteration.
  • the data user determines that the parameter update decision is not to accept the model parameters of this iteration.
  • the acceptance probability value can be determined by the following formula:
  • P is the acceptance probability value
  • ⁇ l is the amount of change in the value of the loss function of the business model.
  • the data user can also implement “randomly determine whether to accept the model parameters of this iteration based on the acceptance probability as a parameter update decision” in other ways. This is just an example for illustration, and no specific limitation is made on it.
  • Step 212 The data user sends the parameter update decision to the data provider.
  • Step 214 When the data provider determines that the parameter update decision is to accept the model parameters of this iteration, it detects whether the business model has converged. If it does not, it will execute the next generation based on the model parameters M T of the first model unit in this iteration. If the step of the iterative model parameter M T+1 converges, the iteration of the model parameter of the first model unit is stopped, and it is determined that the service model training is completed.
  • the data provider can receive the parameter update decision sent by the data user.
  • the parameter update decision is to accept the model parameters of this iteration.
  • the data provider detects whether the service model converges when determining that the parameter update decision is to accept the model parameters of this iteration.
  • the data provider may stop the iteration of the model parameters of the local first model unit when determining the convergence of the service model.
  • Data service provider when it is determined not converged model, based on the model parameters M T when the second iteration of this model unit, perform generation of the next iteration step the model parameters M T + 1. That is, the data provider performs the next iteration in the manner shown in step 202 to step 216. In other words, the data provider will repeat steps 202 to 216 to iterate the model parameters of the first model unit until the business model converges.
  • the parameter update decision is not to accept the model parameters of this iteration.
  • the data provider determines that the parameter update decision is not to accept the model parameters of this iteration, it is based on the last iteration of the second model unit.
  • the parameter information of the model parameter M T-1 is generated, and the model parameter M T+1 of the next iteration is generated.
  • Step 216 the data consumer in determining whether to accept the decision parameter update model parameters of the current iteration, testing business model converged, if the convergence model parameters based on the second model during N T cells present iterations performed to generate the next If the step of the iterative model parameter NT +1 converges, stop the iteration of the model parameter of the second model unit, and determine that the service model training is completed.
  • the parameter update decision is to accept the model parameters of this iteration.
  • the data user determines that the parameter update decision is to accept the model parameters of this iteration, it detects whether the business model has converged.
  • the data user can determine whether the value of the loss function calculated in this iteration is within the preset error range, and if the value of the loss function in this iteration is within the preset error range, it is determined that the business model has converged.
  • the data user can also determine whether the business model has converged in other ways, which is only illustrative here and is not specifically limited.
  • the data user may stop the iteration of the model parameters of the local second model unit when determining the convergence of the business model.
  • the model parameter based on N T when the second iteration of this model unit execute the model parameters to generate the next iteration step N T + 1. That is, the data user performs the next iteration in the manner shown in step 202 to step 216. In other words, the data user will cyclically execute steps 202 to 216 to iterate the model parameters of the second model unit until the business model converges.
  • the parameter update decision is not to accept the model parameters of this iteration.
  • the data provider determines that the parameter update decision is not to accept the model parameters of this iteration, it is based on the last iteration of the second model unit.
  • the parameter information of the model parameter NT -1 is generated, and the model parameter NT +1 of the next iteration is generated.
  • the data provider does not directly provide the sample data to the data user, but instead converts the sample data into an intermediate result through the first model unit, and provides the intermediate result to the data user In this way, the data of the data user is enriched under the condition that the user's private data is not leaked.
  • the data provider and the data user each iteratively update the model parameters of their respective model units, rather than iteratively update the model parameters based on the gradient information of the interaction between the two parties. Therefore, only intermediate results and some notification information need to be exchanged between the two parties, without the need to exchange gradient information, so the amount of data exchanged between the two parties is greatly reduced, so bandwidth resources can be effectively saved. In addition, since there is no need to transmit gradient information, criminals cannot infer user privacy data based on gradient information, so the security of user privacy data can be guaranteed.
  • the business model includes a first model unit and a second model unit.
  • the first model unit is configured on the data provider, and the second model unit is configured on the data consumer.
  • the data provider holds the first sample data of the sample object, and the data consumer The second sample data of the sample object and the label of the sample object are held.
  • the feature dimensions of the first sample data and the second sample data are not completely the same.
  • the method is applied to the data provider and may include the following steps.
  • Step 302 The data provider generates the model parameter M T of this iteration based on the model parameter M T-1 of the first model unit in the last iteration.
  • Step 304 The data provider inputs the first sample data into the first model unit whose model parameter is M T to obtain an intermediate result, and sends the intermediate result to the data user.
  • Step 306 The data provider receives the parameter update decision returned by the data user, and the data user inputs the intermediate result and the second sample data into the second model unit whose model parameter is NT. after determination of the sample based on the prediction result and the object model unit outputs a second label; N T is the model parameter of the model unit according to the second iteration.
  • Step 308 When the parameter update decision is to accept the model parameters of this iteration, the data provider detects whether the service model converges;
  • Step 310 If no data provider, based on the first model means model parameter M T when the current iteration is performed to generate the next iteration step the model parameters M T + 1; if yes, stopping the first Iterate the model parameters of the model unit, and determine that the service model training is completed.
  • step 302 to step 310 reference may be made to step 202 to step 216 described above, which will not be repeated here.
  • the business model includes a first model unit and a second model unit.
  • the first model unit is configured on the data provider, and the second model unit is configured on the data consumer.
  • the data provider holds the first sample data of the sample object, and the data consumer
  • the second sample data of the sample object and the label of the sample object are held.
  • the feature dimensions of the first sample data and the second sample data are not completely the same.
  • the method is applied to the data user and may include the following steps.
  • Step 402 the data consumer model parameters of the model of the second unit from the previous iteration based on N T-1, the cost of raw iterations of the model parameters N T.
  • Step 404 When using data provided by the intermediate results sent by the data is received, the intermediate result and the second sample data is input to the second model as the model parameters of the N T cells; the result is the intermediate
  • the data provider inputs the first sample data into a first model unit whose model parameter is M T , and the M T is a model parameter of the first model unit in this iteration.
  • Step 406 The data user determines a parameter update decision based on the prediction result output by the second model unit and the label of the sample object, and sends the parameter update decision to the data provider, so that the data provider can base it on the Parameter update decision for subsequent processing.
  • Step 408 If the parameter update decision is to accept the model parameters of this iteration, the data user checks whether the service model converges.
  • Step 410 if not, the data model based on the second consumer unit model parameter N T at the current iteration, the next iteration is executed to generate the model parameters in step 1, N T +; if yes, stopping the second model Iterate the model parameters of the unit, and determine that the service model training is completed.
  • step 402 to step 410 reference may be made to step 202 to step 216 described above, which will not be repeated here.
  • FIG 5 is an interactive diagram of a business model training method shown in an exemplary embodiment of the present application.
  • the business model includes a first model unit and a second model unit.
  • the first model unit is configured on the data provider.
  • the second model unit is configured on the data user, the data provider holds the first sample data of the sample object, the data user holds the second sample data of the sample object and the label of the sample object, the first sample data and the second sample.
  • the characteristic dimensions of the data are not exactly the same, and can include the steps shown below.
  • Step 501 The data provider determines the model parameters of this iteration based on the model parameters of the current first model unit, the current first correlation matrix, and the preset probability distribution type, and modifies the model parameters of the current first model unit to this Model parameters for the second iteration.
  • step 202 For a specific implementation manner, refer to step 202, which will not be repeated here.
  • Step 502 The data user determines the model parameters of this iteration based on the model parameters of the current second model unit, the current second correlation matrix and the preset probability distribution type, and modifies the model parameters of the current second model unit to this Model parameters for the second iteration.
  • step 204 For a specific implementation manner, refer to step 204, which will not be repeated here.
  • Step 503 The data provider inputs the first sample data into the current first model unit to obtain an intermediate result.
  • Step 504 The data provider sends the intermediate result to the data user.
  • Step 505 The data user inputs the intermediate result and the second sample data into the current second model unit, and determines a parameter update decision based on the prediction result output by the current second model unit and the label of the sample object.
  • the data consumer performs step 512 after performing step 505.
  • step 210 For a specific implementation manner, refer to step 210, which will not be described in detail.
  • Step 506 The data consumer sends a parameter update decision.
  • Step 507 The data provider checks whether the parameter update decision is to accept the model parameters of this iteration. If the parameter update decision is to accept the model parameters of this iteration, step 509 to step 511 are executed; if the parameter update decision is to accept the model parameters of this iteration, then step 508 is executed.
  • Step 508 The data provider rolls back the current model parameter of the first model unit to the model parameter before modification.
  • step 508 After performing step 508, return to step 501.
  • Step 509 The data provider checks whether the service model converges. If the business model converges, step 511 is executed. If the business model does not converge, step 510 is executed.
  • Step 510 The data provider generates an incidence matrix of this iteration based on the current first incidence matrix and the model parameters of the current first model unit, and modifies the current first incidence matrix to the generated incidence matrix of this iteration.
  • step 510 After performing step 510, return to step 501.
  • Step 511 The data provider ends the process and determines that the service model training is completed.
  • Step 512 The data user checks whether the parameter update decision is to accept the model parameters of this iteration. If the parameter update decision is to accept the model parameters of this iteration, then step 514 to step 516 are executed; if the parameter update decision is to accept the model parameters of this iteration, then step 513 is executed.
  • Step 513 The data user rolls back the current model parameters of the second model unit to the model parameters before modification.
  • step 513 After performing step 513, return to step 502.
  • Step 514 The data consumer checks whether the service model converges. If the business model converges, step 516 is executed; if the business model does not converge, step 515 is executed.
  • Step 515 The data user generates an incidence matrix of this iteration based on the current second incidence matrix and the model parameters of the current second model unit, and modifies the current second incidence matrix to the generated incidence matrix of this iteration.
  • step 515 After performing step 515, return to step 502.
  • Step 516 The data consumer ends the process and determines that the service model training is completed.
  • Steps 501 to 516 are described in detail below through specific examples.
  • M T is a model parameter of the model unit a first iteration T
  • C T model unit of the first iteration of the correlation matrix T.
  • N T is the model parameter of the T-th iteration of the first model unit
  • D T is the incidence matrix of the T-th iteration of the first model unit
  • the model parameter of the current first model unit at the initial stage is M 0
  • the correlation matrix of the model parameters of the current first model unit at the initial stage (referred to as the current first correlation matrix) is C 0
  • the model parameter of the current second model unit at the initial time is N 0
  • the incidence matrix of the current second model unit model parameter at the initial time (referred to as the current second incidence matrix) is D 0 .
  • the data provider can obtain the first model unit first based on the model parameters of the current first model unit (ie M 0 ), the current first incidence matrix (ie C 0 ), and the normal distribution.
  • the model parameter M 1 of the second iteration, and the current model parameter of the first model unit is modified to M 1 .
  • the data user can obtain the model parameter N 1 of the first iteration of the second model unit based on N 0 , D 0 and the normal distribution, and modify the current model parameter of the second model unit to N 1 .
  • the data provider can input the first sample data into the current first model unit (that is , the first model unit whose model parameter is M 1 ) to obtain an intermediate result, and send the intermediate result to the data user.
  • the data user inputs the intermediate results and the second sample data into the current first model unit (that is, the first model unit with the model parameter N 1 ) to obtain the prediction result, and based on the prediction result and the label, determines the parameter update decision, and The parameter update decision is sent to the data provider.
  • the current first model unit that is, the first model unit with the model parameter N 1
  • the parameter update decision is to accept the N 1 of the first iteration, it is checked whether the business model has converged.
  • the data user can determine the incidence matrix of this iteration (ie D 0 ) and the model parameters of the current second model unit (ie N 1 ). 1 ), and modify the current second incidence matrix to the calculated incidence matrix of this iteration (that is, modify D 0 to D 1 , and the current second incidence matrix to D 1 ).
  • a second iteration of the model parameters of the second model unit is performed. After the first iteration, the current model parameter of the second model unit is N 1 , and the current second incidence matrix is D 1 .
  • the data provider may first incidence matrix based on the current (i.e. C 0), the current model parameters (i.e., M 1) of the first model unit determines the correlation matrix at the current iteration (i.e., C 1 ), and modify the current first incidence matrix to the calculated incidence matrix of this iteration (that is, modify C 0 to C 1 , and the current first incidence matrix to C 1 ). Perform the second iteration of the model parameters of the first model unit.
  • the current model parameters i.e., M 1
  • the current model parameter of the first model unit is M 1
  • the current first incidence matrix is C 1 .
  • the data provider can obtain the second model unit of the first model unit based on the model parameters of the current first model unit (ie M 1 ), the current first correlation matrix (ie C 1 ) and the normal distribution
  • the model parameter of the second iteration is M 2
  • the current model parameter of the first model unit is modified to M 2 .
  • the data user can obtain the model parameter N 2 of the second iteration of the second model unit based on N 1 , D 1 and the normal distribution, and modify the current model parameter of the second model unit to N 2 .
  • the data provider can input the first sample data into the current first model unit (that is , the first model unit whose model parameter is M 2 ) to obtain an intermediate result, and send the intermediate result to the data user.
  • the data user inputs the intermediate result and the second sample data into the current first model unit (that is, the first model unit with a model parameter of N 2 ), obtains the prediction result, and determines the parameter update decision based on the prediction result and the label.
  • the parameter update decision is sent to the data provider.
  • the model parameters of the current second model unit will be rolled back to the model parameters before the update (that is, the model parameters of the current second model Modified from N 2 to N 1 , the current model parameter of the second model unit is N 1 ), and then the third iteration of the model parameter of the second model unit is performed.
  • the current model parameter of the second model unit is N 1
  • the current second incidence matrix is D 1 .
  • the current model parameters of the first model unit will be rolled back to the model parameters before the update (that is, the current model parameters of the first model).
  • the model parameter is modified from M 2 to M 1 , the current model parameter of the first model unit is M 1 ), and then the third iteration of the model parameter of the first model unit is performed.
  • the current model parameter of the first model unit is M 1 , and the current first incidence matrix is C 1 .
  • the data provider can obtain the third model of the first model unit based on the model parameters of the current first model unit (ie M 1 ), the current first incidence matrix (ie C 1 ), and the normal distribution.
  • the model parameter of the second iteration is M 3
  • the current model parameter of the first model unit is modified to M 3 .
  • the data user can obtain the model parameter N 3 of the third iteration of the second model unit based on N 1 , D 1 and the normal distribution, and modify the current model parameter of the second model unit to N 3 .
  • the data provider can input the first sample data into the current first model unit (that is , the first model unit whose model parameter is M 3 ) to obtain an intermediate result, and send the intermediate result to the data user.
  • the data user inputs the intermediate result and the second sample data into the current first model unit (that is, the first model unit with the model parameter N 3 ), obtains the prediction result, and determines the parameter update decision based on the prediction result and the label, and adds The parameter update decision is sent to the data provider.
  • the current first model unit that is, the first model unit with the model parameter N 3
  • the parameter update decision is to accept the third iteration of N 3 , it is checked whether the business model has converged.
  • the business model converge, only the data using the correlation matrix to determine the current iteration (i.e., based on the current second correlation matrix D (i.e., D. 1), the current model parameters of the second model element (i.e., N 3), 3 ), and modify the current second incidence matrix to the calculated incidence matrix of this iteration (that is, modify D 1 to D 3 , and the current second incidence matrix to D 3 ).
  • the fourth iteration of the model parameters of the second model unit is performed.
  • the current model parameter of the second model unit is N 3
  • the current second incidence matrix is D 3 .
  • the data provider may first incidence matrix based on the current (i.e., C. 1), the current model parameters (i.e., M 1) of the first model unit determines the correlation matrix at the current iteration (i.e., C 3 ), and modify the current first incidence matrix to the calculated incidence matrix of this iteration (that is, modify C 1 to C 3 , and the current first incidence matrix to C 3 ). Perform the fourth iteration of the model parameters of the first model unit. After the third iteration, the current model parameter of the first model unit is M 3 , and the current first incidence matrix is C 3 .
  • the data provider does not directly provide the sample data to the data user, but instead converts the sample data into an intermediate result through the first model unit, and provides the intermediate result to the data user In this way, the data of the data user is enriched under the condition that the user's private data is not leaked.
  • the data provider and the data user each iteratively update the model parameters of their respective model units, rather than iteratively update the model parameters based on the gradient information of the interaction between the two parties. Therefore, only intermediate results and some notification information need to be exchanged between the two parties, without the need to exchange gradient information, so the amount of data exchanged between the two parties is greatly reduced, so bandwidth resources can be effectively saved. In addition, since there is no need to transmit gradient information, criminals cannot infer user privacy data based on gradient information, so the security of user privacy data can be guaranteed.
  • this specification also provides an embodiment of a business model training device.
  • this specification also provides an embodiment of a business model training device.
  • the embodiments of the business model training device in this specification can be applied to electronic equipment.
  • the device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware.
  • FIG. 6 it is a hardware structure diagram of the electronic equipment where the business model training device of this specification is located, except for the processor, memory, network interface, and non-volatile memory shown in Figure 6
  • the electronic device in which the device is located in the embodiment usually includes other hardware according to the actual function of the electronic device, which will not be repeated here.
  • FIG. 7 is a block diagram of a business model training apparatus shown in an exemplary embodiment of the present application.
  • the business model includes a first model unit and a second model unit.
  • the first model unit is configured on a data provider
  • the second model unit is configured on a data consumer
  • the data provider holds the first model of the sample object.
  • application of the device in a data provider comprising: a generation module 701, based on the model parameters M T-1, the cost of raw iterations of the model parameters M T when the first model unit from the previous iteration; transmitting module 702, the said first sample data input for the model parameters of the first model unit of M T, to obtain an intermediate result, and transmits the result to the intermediate data consumer; receiving module 703, a parameter update decision is returned from the reception data use, the parameter update later decision by the consumer to the data intermediate result and the second input data sample for the second model parameters of the model unit of N T, based on the prediction unit outputs a result of the second
  • the decision module 704 when the parameter update decision is that the model parameters of this iteration are not accepted, generate the model parameters of the next iteration based on the model parameters M T-1 of the last iteration of the first model M T+1 .
  • the generating module 701 determines the target probability distribution based on the model parameter M T-1 , the covariance matrix of the last iteration of the first model unit, and the preset probability distribution type; and generates the target probability distribution based on the target probability distribution The model parameter M T of this iteration that obeys the target probability distribution; wherein the covariance matrix of the last iteration of the first model unit passes through the covariance matrix of the last iteration of the first model unit and the The model parameter M T-1 of the last iteration of the first model unit is determined.
  • the covariance matrix of the last iteration of the first model unit is an incidence matrix, or the covariance matrix of the last iteration of the first model unit is a momentum matrix.
  • the covariance matrix of the last iteration of the first model unit is an incidence matrix
  • the covariance matrix of the last iteration of the first model unit is determined by the following formula:
  • C T-1 ⁇ C T-2 +(1- ⁇ )M T-1 ⁇ M T-1 T ;
  • CT-2 is the incidence matrix of the last iteration of the first model unit
  • CT-1 is the incidence matrix of the first model unit in the last iteration
  • M T-1 is the incidence matrix of the first model unit in the last iteration Model parameters
  • is a preset value.
  • the sample object is a user
  • the first sample data and the second sample data are both user data.
  • FIG. 8 is a block diagram of a business model training apparatus shown in an exemplary embodiment of the present application.
  • the business model includes a first model unit and a second model unit.
  • the first model unit is configured on a data provider
  • the second model unit is configured on a data consumer
  • the data provider holds the first model of the sample object.
  • the data user holds the second sample data of the sample object and the label of the sample object, and the feature dimensions of the first sample data and the second sample data are not completely the same
  • means in said application data consumers comprising: a generating module 801, based on the model parameters of the model unit from the previous iteration of the second N T-1, the cost of raw iterations of the model parameters N T; prediction module 802, after receiving when the data sent by an intermediate result, the intermediate result and the second sample data is input to the second model as the model parameters of the N T cells; the intermediate result is the provider of the data from the as this data is input to the model parameters of the first model unit M T obtained, the model parameters M T is the first iteration of this model unit; determining module 803, a prediction model based on the second output unit Result
  • the decision module 804 if the parameter update decision is not to accept the model parameters of this iteration, then based on the model parameter NT -1 of the second model unit in the last iteration, generate the model for the next iteration Parameter NT +1 .
  • the generating module 801 determines the target probability distribution based on the model parameter NT-1 , the covariance matrix of the last iteration of the second model unit, and the preset probability distribution type; and generates the target probability distribution based on the target probability distribution the subject of the present iteration target probability distribution model parameter N T; wherein the second unit from the previous iteration of the model covariance matrix by said second unit from the previous iteration of the model covariance matrix, and the The model parameter NT-1 of the last iteration of the second model unit is determined.
  • the covariance matrix of the last iteration of the second model unit is an incidence matrix, or the covariance matrix of the last iteration of the second model unit is a momentum matrix.
  • the covariance matrix of the second model unit is determined by the following formula:
  • D T-1 ⁇ D T-2 +(1- ⁇ )N T-1 ⁇ N T-1 T ;
  • D T-2 is the incidence matrix of the last iteration of the second model unit
  • D T-1 is the incidence matrix of the last iteration of the second model unit
  • NT -1 is the model parameter of the last iteration of the second model unit
  • is the preset value.
  • the determining module 803 calculates the value of the loss function of the business model based on the prediction result and the label with the sample object; based on the recorded value of the loss function in the last iteration And the value of the loss function calculated in this iteration to determine the amount of change in the value of the loss function of the business model; determine the parameter update decision based on the amount of change.
  • the determining module 803 calculates the acceptance probability value based on the change amount; based on the acceptance probability, randomly determines whether to accept the model parameters of this iteration as a parameter update decision.
  • this application also provides a training system for a business model.
  • the training system includes: a data user and a data provider; the business model includes a first model unit and a second model unit, and the first model unit is configured On the data provider, the second model unit is configured on the data consumer, the data provider holds the first sample data of the sample object, and the data consumer holds the second sample data of the sample object and The label of the sample object, the feature dimensions of the first sample data and the second sample data are not completely the same;
  • the data provider is used to generate the model parameter M T of this iteration based on the model parameter M T-1 of the last iteration of the first model unit; and input the first sample data into the model parameter M T
  • the first model unit of T obtains the intermediate result and sends the intermediate result to the data consumer, and when it is determined that the parameter update decision returned by the data consumer is to accept the model parameters of this iteration, it detects the business model has converged, and if not, based on the model parameters M T when the present model first iterations performed to generate the model parameters M T + 1 of the next iteration step; if yes, stopping the first model unit Iteration of model parameters of, and confirm that the training of the business model is completed;
  • the data consumer for the N T-1, the cost of raw iterations N T model parameters based on the model parameters of the model of the second unit from the previous iteration; providing intermediate results sent by the receiving data, label prediction result and the output of the sample object unit of said intermediate result and the second sample data is input to the second model as the model parameters of the N T units, based on the model parameters and N T second model parameter update determination Make a decision, and send the parameter update decision to the data provider, and when it is determined that the parameter update decision is to accept the model parameters of this iteration, check whether the business model converges; if not, based on the first model model parameter N T during iterations performed to generate the next iteration step the model parameters N T + 1; if yes, stopping the iterative model parameters of the second model unit, and determines the traffic model training is completed.
  • the data provider is configured to generate the next iteration based on the model parameter M T-1 at the last iteration of the first model when the parameter update decision is not to accept the model parameters of this iteration Model parameter M T+1 ; the data user is used to generate if the parameter update decision is not to accept the model parameter of this iteration, based on the model parameter NT -1 of the second model unit at the last iteration The model parameter NT +1 of the next iteration.
  • the data provider when the data provider generates the model parameter M T of this iteration based on the model parameter M T-1 of the last iteration of the first model unit, it is used to generate the model parameter M T-1 based on the model parameter M T-1 ,
  • the covariance matrix of the last iteration of the first model unit and the preset probability distribution type determine the target probability distribution; the model parameter M T obeys the determined target probability distribution; according to the target probability distribution, this iteration is generated
  • the model parameter M T of the last iteration of the first model unit passes through the covariance matrix of the last iteration of the first model unit and the model of the last iteration of the first model unit determining parameters M T-1; consumer of the data, based on the N model parameters of the model unit from the previous iteration of the second T-1, when the cost of raw iterations N T model parameters, the model parameters based on N T-1, the last iteration of the model covariance matrix of the second unit type and a preset probability distribution, the probability
  • the covariance matrix of the last iteration of the first model unit is an incidence matrix, or the covariance matrix of the last iteration of the first model unit is a momentum matrix;
  • the covariance matrix of the last iteration of the second model unit is a momentum matrix;
  • the covariance matrix is an incidence matrix, or the covariance matrix of the last iteration of the second model unit is a momentum matrix.
  • the covariance matrix of the last iteration of the first model unit is an incidence matrix
  • the covariance matrix of the last iteration of the first model unit is determined by the following formula:
  • C T-1 ⁇ C T-2 +(1- ⁇ )M T-1 ⁇ M T-1 T ;
  • CT-2 is the incidence matrix of the last iteration of the first model unit
  • CT-1 is the incidence matrix of the first model unit in the last iteration
  • M T-1 is the incidence matrix of the first model unit in the last iteration Model parameters
  • is a preset value.
  • the covariance matrix of the second model unit is determined by the following formula:
  • D T-1 ⁇ D T-2 +(1- ⁇ )N T-1 ⁇ N T-1 T ;
  • D T-2 is the incidence matrix of the last iteration of the second model unit
  • D T-1 is the incidence matrix of the last iteration of the second model unit
  • NT -1 is the model parameter of the last iteration of the second model unit
  • is the preset value.
  • the parameter update decision is determined, based on the prediction result, and with the For the label of the sample object, calculate the value of the loss function of the business model; determine the business model based on the recorded value of the loss function in the last iteration and the value of the loss function calculated in this iteration The amount of change in the value of the loss function; a parameter update decision is determined based on the amount of change.
  • the data user determines the parameter update decision based on the change amount, it is used to calculate the acceptance probability value based on the change amount; based on the acceptance probability, randomly determine whether to accept the model parameters of this iteration, Update the decision as a parameter.
  • the sample object is a user
  • the first sample data and the second sample data are both user data.
  • a typical implementation device is a computer.
  • the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.
  • the computer includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media, can be used to store information that can be accessed by computing devices.
  • computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as second information, and similarly, the second information may also be referred to as first information.
  • word “if” as used herein can be interpreted as "when” or “when” or "in response to determination”.

Landscapes

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

Abstract

业务模型的训练方法、装置、***及电子设备,数据提供方和数据使用方各自迭代各自模型单元的模型参数,双方模型单元的模型参数共同构成了业务模型的模型参数。在迭代后,数据提供方可将第一样本数据输入至第一模型单元,得到中间结果,并将中间结果发送给数据使用方。数据使用方可将中间结果和第二样本数据输入至第二模型单元,并基于第二模型单元输出的预测结果和标签确定是否接受本次迭代的模型参数,若接受,则双发各自进行下次模型参数的迭代更新。若不接受,则双方回退至上次迭代的模型参数,继续下次模型参数的迭代更新,直至业务模型收敛,从而实现防止个人数据泄露的情况下,丰富数据使用方的数据的特征维度。

Description

业务模型训练方法、装置、***及电子设备 技术领域
本说明书一个或多个实施例涉及人工智能领域,尤其涉及业务模型训练方法、装置、***及电子设备。
背景技术
模型训练是人工智能技术中的重要组成部分。模型训练通常依赖用户的样本数据。通常情况下,用户的样本数据越多,特征维度越丰富,训练出的模型的精准性越高。
在一些场景中,业务方并没有大量的维度丰富的用户样本数据,为此,业务方需要向提供数据服务的第三方获取用户样本数据,通过第三方的用户样本数据来丰富特征维度,从而训练出更好的业务模型。这里将业务方称之为数据使用方,将提供数据服务的第三方称之为数据提供方。
由于用户样本数据是用户的隐私数据,数据提供方通常不允许将用户样本数据提供给数据使用方。而且,即使条件允许,作为重要的资产,数据提供方也不愿意将数据直接输出。因此,如何在***露用户隐私的情况下,丰富数据使用方的特征维度就成为业界持续探讨的问题。
发明内容
第一方面,本说明书提供一种业务模型的训练方法,所述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同,所述方法应用在数据提供方,包括:基于所述第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T;将所述第一样本数据输入模型参数为M T的第一模型单元,得到中间结果,并将该中间结果发送给所述数据使用方;接收数据使用方返回的参数更新决策,所述参数更新决策由所述数据使用方将所述中间结果和所述第二样本数据输入模型参数为N T的第二模型单元后,基于该第二模型单元输出的预测结果和所述样本对象的标签确定;所述N T为所述第二模型单元本次迭代的模型参数;当所述参数更新决策是接受本次迭代的模型参数时,检测所述业务模型是否收敛;若否,则基于所述第一模型单元本次迭代时的模型参数M T,执行生成下次迭代的模型参数M T+1的步骤;若是,则停止所述第一模型单元的模型参数的迭代,并确定所述业务模型训练完成。
第二方面,本说明书提供一种业务模型的训练方法,所述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同,所述方法应用在数据使用方,包括:基于所述第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T;在接收到数据提供方发送的中间结果时,将所述中间结果和所述第二样本数据输入至模型参数为N T的第二模型单元;所述中间结果是由所述数据提供方将所述第一样本数据输入至模型参数为M T的第一模型单元得到的,所述M T为所述第一模型单元本次迭代的模型参数;基于该第二模型单元输出的预测结果和所述样本对象的标签,确定参数更新决策,并将该参数更新决策发送给数据提供方,以由所述数据提供方基于该参数更新决策进行后续处理;若所述参数更新决策是接受本次迭代的模型参数,则检测所述业务模型是否收敛;若否,基于所述第二模型单元本次迭代时的模型参数N T,执行生成下次迭代的模型参数N T+1的步骤;若是,则停止所述第二模型单元的模型参数的迭代,并确定所述业务模型训练完成。
第三方面,本说明书提供一种业务模型的训练***,所述训练***包括:数据使 用方和数据提供方;所述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同;所述数据提供方,用于基于所述第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T;将所述第一样本数据输入模型参数为M T的第一模型单元,得到中间结果,并将该中间结果发送给所述数据使用方,并在确定所述数据使用方返回的参数更新决策是接受本次迭代的模型参数时,检测所述业务模型是否收敛,若否,则基于所述第一模型本次迭代时的模型参数M T,执行生成下次迭代的模型参数M T+1的步骤;若是,则停止所述第一模型单元的模型参数的迭代,并确定所述业务模型训练完成;所述数据使用方,用于基于所述第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T;在接收到数据提供方发送的中间结果时,将所述中间结果和所述第二样本数据输入至模型参数为N T的第二模型单元,并基于模型参数为N T的第二模型单元输出的预测结果和所述样本对象的标签确定参数更新决策,并将该参数更新决策发送给数据提供方,以及在确定所述参数更新决策是接受本次迭代的模型参数,则检测所述业务模型是否收敛;若否,基于所述第一模型本次迭代时的模型参数N T,执行生成下次迭代的模型参数N T+1的步骤;若是,则停止所述第二模型单元的模型参数的迭代,并确定所述业务模型训练完成。
第四方面,本说明书提供一种业务模型的训练装置,所述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同,所述装置应用在数据提供方,包括:生成模块,基于所述第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T;发送模块,将所述第一样本数据输入模型参数为M T的第一模型单元,得到中间结果,并将该中间结果发送给所述数据使用方;接收模块,接收数据使用方返回的参数更新决策,所述参数更新决策由所述数据使用方将所述中间结果和所述第二样本数据输入模型参数为N T的第二模型单元后,基于该第二模型单元输出的预测结果和所述样本对象的标签确定;所述N T为所述第二模型单元本次迭代的模型参数;决策模块,当所述参数更新决策是接受本次迭代的模型参数时,检测所述业务模型是否收敛;若否,则基于所述第一模型单元本次迭代时的模型参数M T,执行生成下次迭代的模型参数M T+1的步骤;若是,则停止所述第一模型单元的模型参数的迭代,并确定所述业务模型训练完成。
第五方面,本说明书提供一种业务模型的训练装置,所述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同,所述装置应用在数据使用方,包括:生成模块,基于所述第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T;预测模块,在接收到数据提供方发送的中间结果时,将所述中间结果和所述第二样本数据输入至模型参数为N T的第二模型单元;所述中间结果是由所述数据提供方将所述第一样本数据输入至模型参数为M T的第一模型单元得到的,所述M T为所述第一模型单元本次迭代的模型参数;确定模块,基于该第二模型单元输出的预测结果和所述样本对象的标签,确定参数更新决策,并将该参数更新决策发送给数据提供方,以由所述数据提供方基于该参数更新决策进行后续处理;决策模块,若所述参数更新决策是接受本次迭代的模型参数,则检测所述业务模型是否收敛;若否,基于所述第二模型单元本次迭代时的模型参数N T,执行生成下次迭代的模型参数N T+1的步骤;若是,则停止所述第二模型单元的 模型参数的迭代,并确定所述业务模型训练完成。
第六方面,本说明书提供一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器通过运行所述可执行指令以实现第一方面所述的业务模型训练方法。
第七方面,本说明书提供一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现第一方面所述的业务模型训练方法。
第八方面,本说明书提供一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器通过运行所述可执行指令以实现第二方面所述的业务模型训练方法。
第九方面,本说明书提供一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现第二方面所述的业务模型训练方法。
由上述描述可以看出,第一方面,由于数据提供方并没有将样本数据直接提供给数据使用方,而是将样本数据通过第一模型单元转换为中间结果,并将中间结果提供给数据使用方,从而实现了在用户隐私数据***露的情况下,丰富了数据使用方的数据。
第二方面,在本申请中,数据提供方和数据使用方是各自迭代更新各自模型单元的模型参数,而不是现有的基于双方交互的梯度信息来进行模型参数的迭代更新。所以双方之间只需要交互中间结果、以及一些通知信息,而无需交互梯度信息,所以双方之间交互的数据量大大降低,所以可以有效地节约带宽资源。此外,由于不需要传递梯度信息,从而使得不法分子无法基于梯度信息反推出用户隐私数据,所以可以保证用户隐私数据的安全性。
附图说明
图1是本申请一示例性实施例示出的一种业务模型训练***的示意图;
图2是本申请一示例性实施例示出的一种业务模型的训练方法的交互流程图;
图3是本申请一示例性实施例示出的另一种业务模型训练方法的流程图;
图4是本申请一示例性实施例示出的另一种业务模型训练方法的流程图;
图5是本申请一示例性实施例示出的一种业务模型训练方法的交互图;
图6是本申请一示例性实施例示出的一种电子设备的硬件结构图;
图7是本申请一示例性实施例示出的一种业务模型训练装置的框图;
图8是本申请一示例性实施例示出的一种业务模型训练装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书一个或多个实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书一个或多个实施例的一些方面相一致的装置和方法的例子。
需要说明的是:在其他实施例中并不一定按照本说明书示出和描述的顺序来执行相应方法的步骤。在一些其他实施例中,其方法所包括的步骤可以比本说明书所描述的更多或更少。此外,本说明书中所描述的单个步骤,在其他实施例中可能被分解为多个步骤进行描述;而本说明书中所描述的多个步骤,在其他实施例中也可能被合并为单个步骤进行描述。
在传统技术中,数据提供方可基于对行业的理解和相关经验,利用模型等将用户样本数据转化为中间结果(如各类信用评分等),并将中间结果提供给数据使用方,以使得在***露用户隐私的情况下,丰富数据使用方特征维度。然而,实际上数据提供方提供的中间结果不一定能够完全满足数据使用方的需求。
为了使得数据提供方提供的中间结果可以更好地适用于数据使用方的业务模型的训练,数据提供方和数据使用方可以在保证双方数据可用不可见的前提下联合训练业务 模型。其中,可用不可见是指双方不能读取对方数据,但是能够使用数据进行计算。
目前,常见的方案可包括:联邦学习。
在联邦学习中,业务模型包括第一模型单元和第二模型单元。第一模型单元和第二模型单元的模型参数共同组成了该业务模型的模型参数。数据使用方配置了第一模型单元,数据提供方配置了第二模型单元。在业务模型联合训练过程中,双方交互梯度信息,并通过交互的梯度信息完成第一模型单元和第二模型单元的模型参数的更新,以完成业务模型的训练。
然而,一方面,双发需要交互梯度信息才能完成第一模型单元和第二模型单元的更新,而梯度信息的数据量通常很大,双方的经常***互会严重占用双方的带宽资源。另一方面,梯度信息包含了丰富的信息,致使黑客可以通过反推梯度信息来获取用户样本数据,致使用户隐私的泄露,所以这种方案的安全性较低。
有鉴于此,本申请提供非梯度优化的模型训练方法,在本申请提供的方法中,业务模型包括第一模型单元和第二模型单元,第一模型单元配置在数据提供方,第二模型单元配置在数据使用方,数据提供方持有样本对象的第一样本数据,数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,第一样本数据和所述第二样本数据的特征维度不完全相同。
数据提供方和数据使用方可各自迭代各自模型单元的模型参数,在迭代后,数据提供方可将第一样本数据输入至第一模型单元,得到中间结果,并将中间结果发送给数据使用方。数据使用方可将中间结果和第二样本数据输入至第二模型单元,并基于第二模型单元输出的预测结果和该样本对象的标签确定是否接受本次迭代的模型参数,若接受,则双发各自继续进行下次模型参数的迭代更新。若不接受,则双方回退至上次迭代的模型参数,再以基于上次迭代的模型参数,继续下次模型参数的迭代更新,直至业务模型收敛。
由上述描述可以看出,第一方面,由于数据提供方并没有将样本数据直接提供给数据使用方,而是将样本数据通过第一模型单元转换为中间结果,并将中间结果提供给数据使用方,从而实现了在用户隐私数据***露的情况下,丰富了数据使用方的数据。
第二方面,在本申请中,数据提供方和数据使用方是各自迭代更新各自模型单元的模型参数,而不是基于双方交互的梯度信息来进行模型参数的迭代更新。所以双方之间只需要交互中间结果、以及一些通知信息,而无需交互梯度信息,所以双方之间交互的数据量大大降低,所以可以有效地节约带宽资源。此外,由于不需要传递梯度信息,从而使得不法分子无法基于梯度信息反推出用户隐私数据,所以可以保证用户隐私数据的安全性。
在介绍本申请提供的业务模型训练方法之前,先对本申请涉及的概念进行介绍。
1)业务模型,是指可以进行业务处理的模型。该业务模型可以是神经网络、深度学习模型、逻辑回归、SVM(Support Vector Machine,支持向量机)等等。当然,该业务模型也可以是其他可以进行有监督训练的线性模型等等,这里只是对业务模型进行示例性地说明,不对该业务模型进行具体地限定。
此外,该业务模型可以做预测业务、分类业务、识别业务等等。这里只是对业务模型所作的业务进行示例性地说明,不对其进行具体地限定。该业务模型可以应用在风控领域。比如,银行机构可以利用自身收集的用户的金融数据以及电商等数据提供方的用户行为数据,并基于该业务模型进行反欺诈识别、以及信用评级等等。当然,该业务模型也可以应用在其他领域,这里不对该业务模型的应用领域进行具体地限定。
2)业务模型单元,是业务模型的一部分。在本申请实施例中,业务模型被拆分成两部分,分别为第一模型单元和第二模型单元。第一模型单元的模型参数和第二模型单元的模型参数共同组成了该业务模型的模型参数。
3)样本对象、样本数据,在本申请实施例中,样本对象可以是用户,也可以是其 他对象,比如安防领域中,该样本对象可以是车辆等交通工具等等。这里只是对样本对象进行示例性地说明,不对其进行具体地限定。
样本数据是样本对象的相关数据,用于描述样本对象。样本数据包括多个特征维度。
例如,假设样本对象为用户,样本对象的特征维度可包括:用户的年龄、性别、职业、学历、用户操作行为等等。这里只是对特征维度进行示例性地说明,不对其进行具体地限定。
此外,在本申请中,该样本数据可以是用户数据,也可以是车辆的数据等等,这里只是对样本数据进行示例性地说明,不对其进行具体地限定。
下面介绍下业务模型训练***。
参见图1,图1是本申请一示例性实施例示出的一种业务模型训练***的示意图。
业务模型训练***包括:数据提供方和数据使用方。数据提供方和数据使用方联合训练业务模型。
在本申请中,数据提供方上被配置了业务模型的第一模型单元。数据使用方上被配置了业务模型的第二模型单元。
在本申请实施例中,数据提供方和数据使用方都存储有很多对象的数据。在进行模型训练前,数据提供方和数据使用方可以进行隐私求交,以使得数据提供方和数据使用方可抽取出两方共有的对象作为样本对象,并将两方共有的对象的数据作为样本数据。换句话来说,数据提供方持有样本对象的第一样本数据,所述数据使用方持有该样本对象的第二样本数据。第一样本数据和第二样本数据的特征维度不完全相同。
比如,第一样本数据包含的特征维度比第二样本数据包含的特征维度更多。当然,这里不对两者的特征维度的数量进行限定。此外,第一样本数据的特征维度与第二样本数据的特征维度可以有重叠部分,也可以完全相同,也可以不重叠,这里不进行具体地限定。
下面对本申请提供的业务模型训练方法进行详细地说明。
参见图2,图2是本申请一示例性实施例示出的一种业务模型的训练方法的交互流程图,该方法可包括如下所述步骤。
步骤202:数据提供方基于第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T
在一种可选的实现方式中,在训练开始时,数据提供方可以初始化第一模型单元的模型参数。该预设的矩阵在每次迭代中是固定不变的。
在基于第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T时,数据提供方可以基于第一模型单元上次迭代时的模型参数M T-1,以及预设的概率分布类型,生成目标概率分布。本次迭代的模型参数M T服从确定出的目标概率分布。然后,数据提供方可以依据所述目标概率分布,生成本次迭代的模型参数M T
在另一种可选的实现方式中,为了加快模型的收敛,还可以为第一模型单元配置模型参数的协方差矩阵。
在实现时,在训练开始时,数据提供方可以初始化第一模型单元的模型参数、以及初始化第一模型单元的协方差矩阵。
在基于第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T时,数据提供方可以基于第一模型单元上次迭代时的模型参数M T-1,第一模型单元上次迭代的协方差矩阵,以及预设的概率分布类型,生成目标概率分布。本次迭代的模型参数M T服从确定出的目标概率分布。然后,数据提供方可以依据所述目标概率分布,生成服从所述目标概率分布的本次迭代的模型参数M T
其中,预设的概率分布类型可以为正态分布,也可以是其他类型的概率分布,比如也可以是其他的对称分布,只要满足细致平衡条件即可。这里只是对预设的概率分布 类型进行示例性地说明,不对其进行具体地限定。
例如,假设,预设的概率分布类型为正态分布,数据提供方可以以第一模型单元上次迭代时的模型参数M T-1作为期望,以上次迭代的协方差矩阵A T-1作为方差,产生一个正态分布N(M T-1,A T-1)。其中,模型参数M T服从N(M T-1,A T-1),即M T~N(M T-1,A T-1)。
然后,数据提供方可依据该N(M T-1,A T-1)中产生一组随机数,将该随机数作为本次迭代的模型参数M T
其中,依据概率分布取随机数可依据现有取随机数的方式实现,这里不再赘述。
需要说明的是,第一模型单元的协方差矩阵是在每次迭代中不断更新的。比如,第一模型单元上次迭代的协方差矩阵A T-1,可通过该第一模型单元上上次迭代的协方差矩阵A T-2、以及第一模型单元上次迭代的模型参数M T-1确定。
此外还需要说明的是,每次迭代的协方差矩阵可以在本次迭代的模型参数被接受时,基于上次迭代的协方差矩阵和本次迭代的模型参数进行更新,也可以在其他时机下进行更新,这里只是示例性地说明,不对该第一模型单元的协方差矩阵的更新时机进行具体地限定。
由于模型参数的协方差矩阵记录了每次接受迭代的模型参数的相关信息,所以协方差矩阵可以反映出业务模型的收敛方向。所以数据提供方依据上述迭代的模型参数M T-1和上次迭代的协方差矩阵A T-1,确定本次迭代的模型参数M T时,可以使得第一模型单元是沿着业务模型收敛的方向进行模型参数的迭代,所以可以大大提高业务模型的收敛速度。
此外,上述第一模型单元上次迭代的协方差矩阵为关联矩阵,或者,所述第一模型单元上次迭代的协方差矩阵为动量矩阵。当然,第一模型单元的协方差矩阵也可以是其他类型的矩阵,比如预设的矩阵,这里不进行具体地限定。
此外,还需要说明的是,第一模型单元和第二模型单元可以采用相同的模型参数更新方式,也可以采用不同的模型参数更新方式,这里不进行具体地限定。
当第一模型单元上次迭代的协方差矩阵为关联矩阵时,该关联矩阵可通过如下公式确定:
C T-1=γC T-2+(1-γ)M T-1·M T-1 T
其中,C T-2是第一模型单元上上次迭代的关联矩阵;C T-1是第一模型单元上次迭代的关联矩阵;M T-1是第一模型单元上次迭代的模型参数;γ是预设值,例如0.99,这里只是对γ的取值进行示例性地说明,不对其进行具体地限定。
当然,这里只是给出了模型参数的关联矩阵计算的示例性说明,不对其进行具体地限定。
步骤204:数据使用方基于第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T
在一种可选的实现方式中,在训练开始时,数据使用方可以初始化第二模型单元的模型参数。
在基于第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T时,数据使用方可以基于第二模型单元上次迭代时的模型参数N T-1,以及预设的概率分布类型,生成目标概率分布。本次迭代的模型参数N T服从确定出的目标概率分布。然后,数据使用方可以依据所述目标概率分布,生成本次迭代的模型参数N T
在另一种可选的实现方式中,为了加快模型的收敛,还可以为第二模型单元配置模型参数的协方差矩阵。
在实现时,在训练开始时,数据使用方可以初始化第二模型单元的模型参数、以及初始化第二模型单元的协方差矩阵。
在基于第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T时, 数据使用方可以基于第二模型单元上次迭代时的模型参数N T-1,第二模型单元上次迭代的协方差矩阵,以及预设的概率分布类型,生成目标概率分布。本次迭代的模型参数N T服从确定出的目标概率分布。然后,数据使用方可以依据所述目标概率分布,生成服从所述目标概率分布的本次迭代的模型参数N T
其中,预设的概率分布类型可以为正态分布,也可以是其他类型的分布,比如也可以是其他的对称分布,只要满足细致平衡条件即可,这里只是对预设的概率分布类型进行示例性地说明,不对其进行具体地限定。
例如,假设,预设的概率分布类型为正态分布,数据使用方可以以第二模型单元上次迭代时的模型参数N T-1作为期望,以模型参数第二模型单元上次迭代的协方差矩阵B T-1作为方差,产生一个正态分布N(N T-1,B T-1)。其中,模型参数N T服从N(N T-1,B T-1),即N T~N(N T-1,B T-1)。
然后,数据使用方可依据该N(N T-1,B T-1)中产生一个随机数,将该随机数作为本次迭代的模型参数N T
其中,依据概率分布取随机数可依据现有取随机数的方式实现,这里不再赘述。
需要说明的是,第二模型单元的斜方差矩阵是在每次迭代中不断更新的。比如,第二模型单元上次迭代的协方差矩阵B T-1,可通过该第二模型单元上上次迭代的协方差矩阵B T-2、以及第二模型单元上次迭代的模型参数N T-1确定。
此外还需要说明的是,每次迭代的协方差矩阵可以在本次迭代的模型参数被接受时,基于上次迭代的协方差矩阵和本次迭代的模型参数进行更新,也可以在其他时机下进行更新,这里只是示例性地说明,不对该第二模型单元的协方差矩阵的更新时机进行具体地限定。
由于第二模型单元的协方差矩阵记录了每次接受迭代的模型参数的相关信息,所以协方差矩阵可以反映出业务模型的收敛方向。所以数据使用方依据上述迭代的模型参数N T-1和第二模型单元上次迭代的协方差矩阵B T-1,确定本次迭代的模型参数N T时,可以第二模型单元是沿着业务模型收敛的方向进行模型参数的迭代,所以可以大大提高业务模型的收敛速度。
此外,上述第二模型单元上次迭代的协方差矩阵为M T-1的关联矩阵,或者,所述第二模型单元上次迭代的协方差矩阵为N T-1的动量矩阵。当然,第二模型单元上次迭代的协方差矩阵也可以是其他类型的矩阵,这里不进行具体地限定。
当第二模型单元上次迭代的协方差矩阵为关联矩阵时,该关联矩阵D T-1可通过如下公式确定:
D T-1=γD T-2+(1-γ)N T-1·N T-1 T
其中,D T-2是第二模型单元上上次迭代的关联矩阵;D T-1是第二模型单元上次迭代的关联矩阵;N T-1是第二模型单元上次迭代的模型参数;γ是预设值。
当然,这里只是给出了模型参数的关联矩阵计算的示例性说明,不对其进行具体地限定。
步骤206:数据提供方将所述第一样本数据输入模型参数为M T的第一模型单元,得到中间结果。
在实现时,数据提供方可将数据提供方持有的该目标对象的第一样本数据输入至模型参数为M T的第一模型单元,以由模型参数为M T的第一模型单元输出中间结果。
步骤208:数据提供方将该中间结果发送给所述数据使用方。
步骤210:数据使用方将所述中间结果和所述第二样本数据输入至模型参数为N T的第二模型单元,并基于该第二模型单元输出的预测结果和所述样本对象的标签,确定参数更新决策。
在实现时,数据使用方可将本方持有的该目标对象的第二样本数据、以及中间结果输入至模型参数为N T的第二模型单元,以由模型参数为N T的第二模型单元输出预测 结果。
然后,数据使用方可基于该预测结果和该样本对象的标签,确定参数更新决策。该参数更新决策包括:接受本次迭代的模型参数、或者不接受本次迭代的模型参数。
其中,接受本次迭代的模型参数是指:接受本次迭代的第一模型单元的模型参数M T和接受本次迭代的第二模型单元的模型参数N T。换句话来说,是指接受业务模型本次迭代的模型参数。
不接受本次迭代的模型参数是指:不接受本次迭代的第一模型单元的模型参数M T和接受本次迭代的第二模型单元的模型参数N T。换句话来说,是指不接受业务模型本次迭代的模型参数。
需要说明的是,现有的模型参数的迭代通常是计算每次迭代的梯度,然后基于上一次迭代的梯度,确定本次迭代的模型参数。这种通过上一次模型的梯度确定本次模型的模型参数,可以使得模型参数的迭代是按照业务预测效果好的方向进行。
而在本申请中,无论是数据提供方还是数据使用方,每次迭代的模型参数并不基于梯度来确定,而是根据概率分布随机确定的。所以在确定出本次迭代的模型参数时,还需要验证本次迭代的模型参数是否是沿着业务预测效果好的方向进行的。因此,在本申请中,还需要基于参数为本次迭代的模型参数的第二模型单元输出预测结果、以及标签来确定是否接受本次迭代的业务模型的模型参数,以此来实现业务模型是按照满足业务预测要求的方向进行模型参数更新。
在基于该预测结果和该样本对象的标签,确定参数更新决策时,数据使用方可基于预测结果和与所述样本对象的标签,计算所述业务模型的损失函数的取值。数据使用方可基于已记录的上次迭代时的损失函数的取值和本次迭代计算出的所述损失函数的取值,确定业务模型损失函数取值的变化量,并基于该计算出的变化量确定参数更新决策。
在一种可选的实现方式中,在基于该计算出的变化量确定参数更新决策时,数据使用方基于所述变化量,计算接受概率值,并基于接受概率,随机确定是否接受本次迭代的模型参数,作为参数更新决策。
下面介绍一种“基于接受概率,随机确定是否接受本次迭代的模型参数,作为参数更新决策”的方式。
数据使用方还可生成预设范围内的随机数;所述随机数服从预设范围内的均匀分布。
若所述随机数小于所述接受概率值,数据使用方则确定参数更新决策为接受本次迭代的模型参数。
若所述随机数大于或等于所述接受概率值,数据使用方则确定所述参数更新决策为不接受本次迭代的模型参数。
其中,例如,接受概率值可通过如下公式确定:
P=min{exp(-Δl),1};
其中,P为接受概率值;所述Δl为业务模型损失函数取值的变化量。
当然,这里只是对接受概率的计算进行示例性地说明,不对该接受概率的计算进行具体地限定。
当然数据使用方还可通过其他方式来实现“基于接受概率,随机确定是否接受本次迭代的模型参数,作为参数更新决策”,这里只是示例性地说明,不对其进行具体地限定。
步骤212,数据使用方将该参数更新决策发送给数据提供方。
步骤214:数据提供方在确定参数更新决策是接受本次迭代的模型参数时,检测业务模型是否收敛,若不收敛则基于第一模型单元本次迭代时的模型参数M T,执行生成下次迭代的模型参数M T+1的步骤,若收敛,则停止所述第一模型单元的模型参数的迭 代,并确定所述业务模型训练完成。
在实现时,数据提供方可接收数据使用方发送的参数更新决策。
1)参数更新决策是接受本次迭代的模型参数,在本申请实施例中,数据提供方在确定参数更新决策是接受本次迭代的模型参数时,检测业务模型是否收敛。
在本申请实施例中,数据提供方在确定业务模型收敛时,可停止本地的第一模型单元的模型参数的迭代。
数据提供方在确定业务模型不收敛时,可基于所述第二模型单元本次迭代时的模型参数M T,执行生成下次迭代的模型参数M T+1的步骤。即数据提供方按照步骤202至步骤216所示的方式来进行下次迭代。换句话来说,数据提供方会循环执行步骤202至步骤216,对第一模型单元的模型参数进行迭代,直至业务模型收敛。
2)参数更新决策是不接受本次迭代的模型参数,在本申请实施例中,数据提供方在确定参数更新决策是不接受本次迭代的模型参数,则基于第二模型单元上次迭代时的模型参数M T-1的参数信息,生成下次迭代的模型参数M T+1
步骤216:数据使用方在确定参数更新决策是接受本次迭代的模型参数时,检测业务模型是否收敛,若不收敛则基于第二模型单元本次迭代时的模型参数N T,执行生成下次迭代的模型参数N T+1的步骤,若收敛,则停止所述第二模型单元的模型参数的迭代,并确定所述业务模型训练完成。
1)参数更新决策是接受本次迭代的模型参数,在本申请实施例中,数据使用方在确定参数更新决策是接受本次迭代的模型参数时,检测业务模型是否收敛。
下面介绍下数据使用方检测业务模型是否收敛的方式。
数据使用方可基于本次迭代计算的损失函数的取值是否在预设误差范围内,若本次迭代的损失函数的取值在预设误差范围内,则确定业务模型收敛。
数据使用方确定本次迭代的损失函数的取值不在预设误差范围内,则确定业务模型不收敛。
当然,数据使用方还可以通过其他方式来确定业务模型是否收敛,这里只是示例性地说明,不对其进行具体地限定。
在本申请实施例中,数据使用方在确定业务模型收敛时,可停止本地的第二模型单元的模型参数的迭代。
数据使用方在确定业务模型不收敛时,可基于所述第二模型单元本次迭代时的模型参数N T,执行生成下次迭代的模型参数N T+1的步骤。即数据使用方按照步骤202至步骤216所示的方式来进行下次迭代。换句话来说,数据使用方会循环执行步骤202至步骤216,对第二模型单元的模型参数进行迭代,直至业务模型收敛。
2)参数更新决策是不接受本次迭代的模型参数,在本申请实施例中,数据提供方在确定参数更新决策是不接受本次迭代的模型参数,则基于第二模型单元上次迭代时的模型参数N T-1的参数信息,生成下次迭代的模型参数N T+1
由上述描述可以看出,第一方面,由于数据提供方并没有将样本数据直接提供给数据使用方,而是将样本数据通过第一模型单元转换为中间结果,并将中间结果提供给数据使用方,从而实现了在用户隐私数据***露的情况下,丰富了数据使用方的数据。
第二方面,在本申请中,数据提供方和数据使用方是各自迭代更新各自模型单元的模型参数,而不是基于双方交互的梯度信息来进行模型参数的迭代更新。所以双方之间只需要交互中间结果、以及一些通知信息,而无需交互梯度信息,所以双方之间交互的数据量大大降低,所以可以有效地节约带宽资源。此外,由于不需要传递梯度信息,从而使得不法分子无法基于梯度信息反推出用户隐私数据,所以可以保证用户隐私数据的安全性。
参见图3,图3是本申请一示例性实施例示出的另一种业务模型训练方法的流程图。业务模型包括第一模型单元和第二模型单元,第一模型单元配置在数据提供方,第二模 型单元配置在数据使用方,数据提供方持有样本对象的第一样本数据,数据使用方持有样本对象的第二样本数据和样本对象的标签,第一样本数据和第二样本数据的特征维度不完全相同,方法应用在数据提供方,可包括如下所示步骤。
步骤302:数据提供方基于第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T
步骤304:数据提供方将所述第一样本数据输入模型参数为M T的第一模型单元,得到中间结果,并将该中间结果发送给所述数据使用方。
步骤306:数据提供方接收数据使用方返回的参数更新决策,所述参数更新决策由所述数据使用方将所述中间结果和所述第二样本数据输入模型参数为N T的第二模型单元后,基于该第二模型单元输出的预测结果和所述样本对象的标签确定;所述N T为所述第二模型单元本次迭代的模型参数。
步骤308:数据提供方当所述参数更新决策是接受本次迭代的模型参数时,检测所述业务模型是否收敛;
步骤310:数据提供方若否,则基于所述第一模型单元本次迭代时的模型参数M T,执行生成下次迭代的模型参数M T+1的步骤;若是,则停止所述第一模型单元的模型参数的迭代,并确定所述业务模型训练完成。
需要说明的是,步骤302至步骤310的实现方式可参见上文所述的步骤202至步骤216,这里不再赘述。
参见图4,图4是本申请一示例性实施例示出的另一种业务模型训练方法的流程图。业务模型包括第一模型单元和第二模型单元,第一模型单元配置在数据提供方,第二模型单元配置在数据使用方,数据提供方持有样本对象的第一样本数据,数据使用方持有样本对象的第二样本数据和样本对象的标签,第一样本数据和第二样本数据的特征维度不完全相同,方法应用在数据使用方,可包括如下所示步骤。
步骤402:数据使用方基于第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T
步骤404:数据使用方在接收到数据提供方发送的中间结果时,将所述中间结果和所述第二样本数据输入至模型参数为N T的第二模型单元;所述中间结果是由所述数据提供方将所述第一样本数据输入至模型参数为M T的第一模型单元得到的,所述M T为所述第一模型单元本次迭代的模型参数。
步骤406:数据使用方基于该第二模型单元输出的预测结果和所述样本对象的标签,确定参数更新决策,并将该参数更新决策发送给数据提供方,以由所述数据提供方基于该参数更新决策进行后续处理。
步骤408:数据使用方若所述参数更新决策是接受本次迭代的模型参数,则检测所述业务模型是否收敛。
步骤410:若否,数据使用方基于所述第二模型单元本次迭代时的模型参数N T,执行生成下次迭代的模型参数N T+1的步骤;若是,则停止所述第二模型单元的模型参数的迭代,并确定所述业务模型训练完成。
需要说明的是,步骤402至步骤410的实现方式可参见上文所述的步骤202至步骤216,这里不再赘述。
参见图5,图5是本申请一示例性实施例示出的一种业务模型训练方法的交互图,业务模型包括第一模型单元和第二模型单元,第一模型单元配置在数据提供方,第二模型单元配置在数据使用方,数据提供方持有样本对象的第一样本数据,数据使用方持有样本对象的第二样本数据和样本对象的标签,第一样本数据和第二样本数据的特征维度不完全相同,可包括如下所示步骤。
步骤501:数据提供方基于当前第一模型单元的模型参数、当前第一关联矩阵和预设的概率分布类型,确定本次迭代的模型参数,并将当前第一模型单元的模型参数修改 为本次迭代的模型参数。
具体实现方式可参见步骤202,这里不再赘述。
步骤502:数据使用方基于当前第二模型单元的模型参数、当前第二关联矩阵和预设的概率分布类型,确定本次迭代的模型参数,并将当前第二模型单元的模型参数修改为本次迭代的模型参数。
具体实现方式可参见步骤204,这里不再赘述。
步骤503:数据提供方将第一样本数据输入至当前第一模型单元,得到中间结果。
步骤504:数据提供方向数据使用方发送中间结果。
步骤505:数据使用方将中间结果和第二样本数据输入至当前第二模型单元,基于当前第二模型单元输出的预测结果和样本对象的标签确定参数更新决策。
数据使用方在执行完步骤505之后,执行步骤512。
具体实现方式,可参见步骤210,这不再赘述。
步骤506:数据使用方发送参数更新决策。
步骤507:数据提供方检测参数更新决策是否是接受本次迭代的模型参数。若参数更新决策是接受本次迭代的模型参数,则执行步骤509至步骤511;若参数更新决策是接受本次迭代的模型参数,则执行步骤508。
步骤508:数据提供方将当前第一模型单元的模型参数回退为修改前的模型参数。
在执行步骤508后,返回步骤501。
步骤509:数据提供方检测业务模型是否收敛。若业务模型收敛,则执行步骤511。若业务模型不收敛,则执行步骤510。
步骤510:数据提供方基于当前第一关联矩阵、当前第一模型单元的模型参数,生成本次迭代的关联矩阵,并将当前第一关联矩阵修改为生成的本次迭代的关联矩阵。
在执行步骤510后,返回步骤501。
步骤511:数据提供方结束流程,并确定所述业务模型训练完成。
步骤512:数据使用方检测参数更新决策是否是接受本次迭代的模型参数。若参数更新决策是接受本次迭代的模型参数,则执行步骤514至步骤516;若参数更新决策是接受本次迭代的模型参数,则执行步骤513。
步骤513:数据使用方将当前第二模型单元的模型参数回退为修改前的模型参数。
在执行步骤513后,返回步骤502。
步骤514:数据使用方检测业务模型是否收敛。若业务模型收敛,则执行步骤516;若业务模型不收敛,则执行步骤515。
步骤515:数据使用方基于当前第二关联矩阵、当前第二模型单元的模型参数,生成本次迭代的关联矩阵,并将当前第二关联矩阵修改为生成的本次迭代的关联矩阵。
在执行步骤515之后,返回步骤502。
步骤516:数据使用方结束流程,并确定所述业务模型训练完成。
下面通过具体的例子对步骤501至步骤516进行详细地说明。
假设,M T为第一模型单元第T次迭代的模型参数,C T第一模型单元第T次迭代的关联矩阵。
N T为第一模型单元第T次迭代的模型参数,D T第一模型单元第T次迭代的关联矩阵。
假设,初始时的当前第一模型单元的模型参数为M 0,初始时的当前第一模型单元模型参数的关联矩阵(简称为当前第一关联矩阵)为C 0。初始时的当前第二模型单元的模型参数为N 0,初始时的当前第二模型单元模型参数的关联矩阵(简称为当前第二关联矩阵)为D 0
对于业务模型的第一次迭代:数据提供方可基于当前第一模型单元的模型参数(即M 0)、当前第一关联矩阵(即C 0)和正态分布,得到第一模型单元第一次迭代的模型 参数M 1,并将当前第一模型单元的模型参数修改为M 1。数据使用方可基于N 0、D 0和正态分布,得到第二模型单元第一次迭代的模型参数N 1,并将当前第二模型单元的模型参数修改为N 1。然后,数据提供方可将第一样本数据输入至当前第一模型单元(即模型参数为M 1的第一模型单元),得到中间结果,并将中间结果发送给数据使用方。
数据使用方将中间结果和第二样本数据输入至当前第一模型单元(即模型参数为N 1的第一模型单元),得到预测结果,并基于预测结果和标签,确定参数更新决策,并将参数更新决策发送给数据提供方。
对于数据使用方来说,若该参数更新决策是接受第一次迭代的N 1,则检测业务模型是否收敛。在本例中,假设业务模型收敛,数据使用方可基于当前第二关联矩阵(即D 0)、当前第二模型单元的模型参数(即N 1),确定本次迭代的关联矩阵(即D 1),并将当前第二关联矩阵修改为计算出的本次迭代的关联矩阵(即将D 0修改为D 1,当前第二关联矩阵为D 1)。然后,进行第二模型单元的模型参数的第二次迭代。在第一次迭代完后,当前第二模型单元的模型参数为N 1,当前第二关联矩阵为D 1
对于数据提供方来说,若接收到的参数更新决策是接受第一次迭代的M 1,则检测业务模型是否收敛。在本例中,假设业务模型收敛,数据提供方可基于当前第一关联矩阵(即C 0)、当前第一模型单元的模型参数(即M 1),确定本次迭代的关联矩阵(即C 1),并将当前第一关联矩阵修改为计算出的本次迭代的关联矩阵(即将C 0修改为C 1,当前第一关联矩阵为C 1)。进行第一模型单元的模型参数的第二次迭代。
在第一次迭代完后,当前第一模型单元的模型参数为M 1,当前第一关联矩阵为C 1
对于业务模型的第二次迭代:数据提供方可基于当前第一模型单元的模型参数(即M 1)、当前第一关联矩阵(即C 1)和正态分布,得到第一模型单元第二次迭代的模型参数M 2,并将当前第一模型单元的模型参数修改为M 2。数据使用方可基于N 1、D 1和正态分布,得到第二模型单元第二次迭代的模型参数N 2,并将当前第二模型单元的模型参数修改为N 2。然后,数据提供方可将第一样本数据输入至当前第一模型单元(即模型参数为M 2的第一模型单元),得到中间结果,并将中间结果发送给数据使用方。
数据使用方将中间结果和第二样本数据输入至当前第一模型单元(即模型参数为N 2的第一模型单元),得到预测结果,并基于预测结果和标签,确定参数更新决策,并将参数更新决策发送给数据提供方。
对于数据使用方来说,若该参数更新决策是不接受第二次迭代的N 2,则将当前第二模型单元的模型参数回退至更新前的模型参数(即将当前第二模型的模型参数由N 2修改为N 1,当前第二模型单元的模型参数为N 1),然后进行第二模型单元的模型参数的第三次迭代。在第二次迭代完后,当前第二模型单元的模型参数为N 1,当前第二关联矩阵为D 1
对于数据提供方来说,若接收到的参数更新决策是不接受第二次迭代的M 2,则将当前第一模型单元的模型参数回退至更新前的模型参数(即将当前第一模型的模型参数由M 2修改为M 1,当前第一模型单元的模型参数为M 1),然后进行第一模型单元的模型参数的第三次迭代。在第二次迭代完后,当前第一模型单元的模型参数为M 1,当前第一关联矩阵为C 1
对于业务模型的第三次迭代:数据提供方可基于当前第一模型单元的模型参数(即M 1)、当前第一关联矩阵(即C 1)和正态分布,得到第一模型单元第三次迭代的模型参数M 3,并将当前第一模型单元的模型参数修改为M 3。数据使用方可基于N 1、D 1和正态分布,得到第二模型单元第三次迭代的模型参数N 3,并将当前第二模型单元的模型参数修改为N 3。然后,数据提供方可将第一样本数据输入至当前第一模型单元(即模型参数为M 3的第一模型单元),得到中间结果,并将中间结果发送给数据使用方。
数据使用方将中间结果和第二样本数据输入至当前第一模型单元(即模型参数为N 3的第一模型单元),得到预测结果,并基于预测结果和标签,确定参数更新决策,并 将参数更新决策发送给数据提供方。
对于数据使用方来说,若该参数更新决策是接受第三次迭代的N 3,则检测业务模型是否收敛。在本例中,假设业务模型收敛,数据使用方可基于当前第二关联矩阵(即D 1)、当前第二模型单元的模型参数(即N 3),确定本次迭代的关联矩阵(即D 3),并将当前第二关联矩阵修改为计算出的本次迭代的关联矩阵(即将D 1修改为D 3,当前第二关联矩阵为D 3)。然后,进行第二模型单元的模型参数的第四次迭代。在第三次迭代完后,当前第二模型单元的模型参数为N 3,当前第二关联矩阵为D 3
对于数据提供方来说,若接收到的参数更新决策是接受第三次迭代的M 3,则检测业务模型是否收敛。在本例中,假设业务模型收敛,数据提供方可基于当前第一关联矩阵(即C 1)、当前第一模型单元的模型参数(即M 1),确定本次迭代的关联矩阵(即C 3),并将当前第一关联矩阵修改为计算出的本次迭代的关联矩阵(即将C 1修改为C 3,当前第一关联矩阵为C 3)。进行第一模型单元的模型参数的第四次迭代。在第三次迭代完后,当前第一模型单元的模型参数为M 3,当前第一关联矩阵为C 3
依次类推,直至业务模型收敛。
由上述描述可以看出,第一方面,由于数据提供方并没有将样本数据直接提供给数据使用方,而是将样本数据通过第一模型单元转换为中间结果,并将中间结果提供给数据使用方,从而实现了在用户隐私数据***露的情况下,丰富了数据使用方的数据。
第二方面,在本申请中,数据提供方和数据使用方是各自迭代更新各自模型单元的模型参数,而不是基于双方交互的梯度信息来进行模型参数的迭代更新。所以双方之间只需要交互中间结果、以及一些通知信息,而无需交互梯度信息,所以双方之间交互的数据量大大降低,所以可以有效地节约带宽资源。此外,由于不需要传递梯度信息,从而使得不法分子无法基于梯度信息反推出用户隐私数据,所以可以保证用户隐私数据的安全性。
与上述业务模型训练方法实施例相对应,本说明书还提供了业务模型训练装置的实施例。
与上述业务模型训练方法实施例相对应,本说明书还提供了一种业务模型训练装置的实施例。本说明书的业务模型训练装置的实施例可以应用在电子设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图6所示,为本说明书的业务模型训练装置所在电子设备的一种硬件结构图,除了图6所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。
参见图7,图7是本申请一示例性实施例示出的一种业务模型训练装置的框图。
所述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同,所述装置应用在数据提供方,包括:生成模块701,基于所述第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T;发送模块702,将所述第一样本数据输入模型参数为M T的第一模型单元,得到中间结果,并将该中间结果发送给所述数据使用方;接收模块703,接收数据使用方返回的参数更新决策,所述参数更新决策由所述数据使用方将所述中间结果和所述第二样本数据输入模型参数为N T的第二模型单元后,基于该第二模型单元输出的预测结果和所述样本对象的标签确定;所述N T为所述第二模型单元本次迭代的模型参数;决策模块704,当所述参数更新决策是接受本次迭代的模型参数时,检测所述业务模型是否收敛;若否,则基于所述第一模型单元本次迭代时的模型参数M T,执行 生成下次迭代的模型参数M T+1的步骤;若是,则停止所述第一模型单元的模型参数的迭代,并确定所述业务模型训练完成。
可选的,所述决策模块704,当所述参数更新决策是不接受本次迭代的模型参数时,基于第一模型上次迭代时的模型参数M T-1,生成下次迭代的模型参数M T+1
可选的,所述生成模块701,基于模型参数M T-1、第一模型单元上次迭代的协方差矩阵以及预设的概率分布类型,确定目标概率分布;依据所述目标概率分布,生成服从所述目标概率分布的本次迭代的模型参数M T;其中,所述第一模型单元上次迭代的协方差矩阵通过所述第一模型单元上上次迭代时的协方差矩阵、以及所述第一模型单元上次迭代的模型参数M T-1确定。
可选的,所述第一模型单元上次迭代的协方差矩阵为关联矩阵,或者,所述第一模型单元上次迭代的协方差矩阵为动量矩阵。
可选的,当所述第一模型单元上次迭代的协方差矩阵为关联矩阵时,所述第一模型单元上次迭代的协方差矩阵通过如下公式确定:
C T-1=γC T-2+(1-γ)M T-1·M T-1 T
其中,C T-2是第一模型单元上上次迭代的关联矩阵;C T-1是第一模型单元上次迭代时的关联矩阵;M T-1是第一模型单元上次迭代时的模型参数;γ是预设值。
可选的,所述样本对象为用户,所述第一样本数据和所述第二样本数据均为用户数据。
参见图8,图8是本申请一示例性实施例示出的一种业务模型训练装置的框图。
所述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同,所述装置应用在数据使用方,包括:生成模块801,基于所述第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T;预测模块802,在接收到数据提供方发送的中间结果时,将所述中间结果和所述第二样本数据输入至模型参数为N T的第二模型单元;所述中间结果是由所述数据提供方将所述第一样本数据输入至模型参数为M T的第一模型单元得到的,所述M T为所述第一模型单元本次迭代的模型参数;确定模块803,基于该第二模型单元输出的预测结果和所述样本对象的标签,确定参数更新决策,并将该参数更新决策发送给数据提供方,以由所述数据提供方基于该参数更新决策进行后续处理;决策模块804,若所述参数更新决策是接受本次迭代的模型参数,则检测所述业务模型是否收敛;若否,基于所述第二模型单元本次迭代时的模型参数N T,执行生成下次迭代的模型参数N T+1的步骤;若是,则停止所述第二模型单元的模型参数的迭代,并确定所述业务模型训练完成。
可选的,所述决策模块804,若所述参数更新决策是不接受本次迭代的模型参数,则基于第二模型单元上次迭代时的模型参数N T-1,生成下次迭代的模型参数N T+1
可选的,所述生成模块801,基于模型参数N T-1、第二模型单元上次迭代的协方差矩阵以及预设的概率分布类型,确定目标概率分布;依据所述目标概率分布,生成服从所述目标概率分布的本次迭代的模型参数N T;其中,所述第二模型单元上次迭代的协方差矩阵通过所述第二模型单元上上次迭代的协方差矩阵、以及所述第二模型单元上次迭代的模型参数N T-1确定。
可选的,所述第二模型单元上次迭代的协方差矩阵为关联矩阵,或者,所述第二模型单元的上次迭代的协方差矩阵为动量矩阵。
可选的,当所述第二模型单元上次迭代的协方差矩阵为关联矩阵时,所述第二模型单元的协方差矩阵通过如下公式确定:
D T-1=γD T-2+(1-γ)N T-1·N T-1 T
其中,D T-2是第二模型单元上上次迭代的关联矩阵;D T-1是第二模型单元上次迭代的关联矩阵;N T-1是第二模型单元上次迭代的模型参数;γ是预设值。
可选的,所述确定模块803,基于所述预测结果和与所述样本对象的标签,计算所述业务模型的损失函数的取值;基于已记录的上次迭代时的损失函数的取值和本次迭代计算出的所述损失函数的取值,确定业务模型损失函数取值的变化量;基于所述变化量确定参数更新决策。
可选的,所述确定模块803,基于所述变化量,计算接受概率值;基于接受概率,随机确定是否接受本次迭代的模型参数,作为参数更新决策。
此外,本申请还提供一种业务模型的训练***,所述训练***包括:数据使用方和数据提供方;所述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同;
所述数据提供方,用于基于所述第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T;将所述第一样本数据输入模型参数为M T的第一模型单元,得到中间结果,并将该中间结果发送给所述数据使用方,并在确定所述数据使用方返回的参数更新决策是接受本次迭代的模型参数时,检测所述业务模型是否收敛,若否,则基于所述第一模型本次迭代时的模型参数M T,执行生成下次迭代的模型参数M T+1的步骤;若是,则停止所述第一模型单元的模型参数的迭代,并确定所述业务模型训练完成;
所述数据使用方,用于基于所述第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T;在接收到数据提供方发送的中间结果时,将所述中间结果和所述第二样本数据输入至模型参数为N T的第二模型单元,并基于模型参数为N T的第二模型单元输出的预测结果和所述样本对象的标签确定参数更新决策,并将该参数更新决策发送给数据提供方,以及在确定所述参数更新决策是接受本次迭代的模型参数,则检测所述业务模型是否收敛;若否,基于所述第一模型本次迭代时的模型参数N T,执行生成下次迭代的模型参数N T+1的步骤;若是,则停止所述第二模型单元的模型参数的迭代,并确定所述业务模型训练完成。
可选的,所述数据提供方,用于当所述参数更新决策是不接受本次迭代的模型参数时,基于第一模型上次迭代时的模型参数M T-1,生成下次迭代的模型参数M T+1;所述数据使用方,用于若所述参数更新决策是不接受本次迭代的模型参数,则基于第二模型单元上次迭代时的模型参数N T-1,生成下次迭代的模型参数N T+1
可选的,所述数据提供方,在基于所述第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T时,用于基于模型参数M T-1、第一模型单元上次迭代的协方差矩阵以及预设的概率分布类型,确定目标概率分布;所述模型参数M T服从确定出的目标概率分布;依据所述目标概率分布,生成本次迭代的模型参数M T;其中,所述第一模型单元上次迭代的协方差矩阵通过所述第一模型单元上上次迭代时的协方差矩阵、以及所述第一模型单元上次迭代的模型参数M T-1确定;所述数据使用方,在基于所述第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T时,用于基于模型参数N T-1、第二模型单元上次迭代的协方差矩阵以及预设的概率分布类型,确定目标概率分布;所述模型参数N T服从确定出的目标概率分布;依据所述目标概率分布,生成本次迭代的模型参数N T;其中,所述第二模型单元上次迭代的协方差矩阵通过所述第二模型单元上上次迭代的协方差矩阵、以及所述第二模型单元上次迭代的模型参数N T-1确定。
可选的,所述第一模型单元上次迭代的协方差矩阵为关联矩阵,或者,所述第一模型单元上次迭代的协方差矩阵为动量矩阵;所述第二模型单元上次迭代的协方差矩阵 为关联矩阵,或者,所述第二模型单元的上次迭代的协方差矩阵为动量矩阵。
可选的,当所述第一模型单元上次迭代的协方差矩阵为关联矩阵时,所述第一模型单元上次迭代的协方差矩阵通过如下公式确定:
C T-1=γC T-2+(1-γ)M T-1·M T-1 T
其中,C T-2是第一模型单元上上次迭代的关联矩阵;C T-1是第一模型单元上次迭代时的关联矩阵;M T-1是第一模型单元上次迭代时的模型参数;γ是预设值。
当所述第二模型单元上次迭代的协方差矩阵为关联矩阵时,所述第二模型单元的协方差矩阵通过如下公式确定:
D T-1=γD T-2+(1-γ)N T-1·N T-1 T
其中,D T-2是第二模型单元上上次迭代的关联矩阵;D T-1是第二模型单元上次迭代的关联矩阵;N T-1是第二模型单元上次迭代的模型参数;γ是预设值。
可选的,所述数据使用方,在基于模型参数为N T的第二模型单元输出的预测结果和所述样本对象的标签,确定参数更新决策时,用于基于所述预测结果和与所述样本对象的标签,计算所述业务模型的损失函数的取值;基于已记录的上次迭代时的损失函数的取值和本次迭代计算出的所述损失函数的取值,确定业务模型损失函数取值的变化量;基于所述变化量确定参数更新决策。
可选的,所述数据使用方,在基于所述变化量确定参数更新决策时,用于基于所述变化量,计算接受概率值;基于接受概率,随机确定是否接受本次迭代的模型参数,作为参数更新决策。
可选的,所述样本对象为用户,所述第一样本数据和所述第二样本数据均为用户数据。
上述实施例阐明的***、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
在一个典型的配置中,计算机包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不 排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
在本说明书一个或多个实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本说明书一个或多个实施例可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
以上所述仅为本说明书一个或多个实施例的较佳实施例而已,并不用以限制本说明书一个或多个实施例,凡在本说明书一个或多个实施例的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书一个或多个实施例保护的范围之内。

Claims (43)

  1. 一种业务模型的训练方法,所述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同,所述方法应用在数据提供方,包括:
    基于所述第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T
    将所述第一样本数据输入模型参数为M T的第一模型单元,得到中间结果,并将该中间结果发送给所述数据使用方;
    接收数据使用方返回的参数更新决策,所述参数更新决策由所述数据使用方将所述中间结果和所述第二样本数据输入模型参数为N T的第二模型单元后,基于该第二模型单元输出的预测结果和所述样本对象的标签确定;所述N T为所述第二模型单元本次迭代的模型参数;
    当所述参数更新决策是接受本次迭代的模型参数时,检测所述业务模型是否收敛;
    若否,则基于所述第一模型单元本次迭代时的模型参数M T,执行生成下次迭代的模型参数M T+1的步骤;
    若是,则停止所述第一模型单元的模型参数的迭代,并确定所述业务模型训练完成。
  2. 根据权利要求1所述的方法,所述方法还包括:
    当所述参数更新决策是不接受本次迭代的模型参数时,基于第一模型上次迭代时的模型参数M T-1,生成下次迭代的模型参数M T+1
  3. 根据权利要求1所述的方法,基于所述第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T,包括:
    基于模型参数M T-1、第一模型单元上次迭代的协方差矩阵以及预设的概率分布类型,确定目标概率分布;
    依据所述目标概率分布,生成服从所述目标概率分布的本次迭代的模型参数M T
    其中,所述第一模型单元上次迭代的协方差矩阵通过所述第一模型单元上上次迭代时的协方差矩阵、以及所述第一模型单元上次迭代的模型参数M T-1确定。
  4. 根据权利要求3所述的方法,所述第一模型单元上次迭代的协方差矩阵为关联矩阵,或者,所述第一模型单元上次迭代的协方差矩阵为动量矩阵。
  5. 根据权利要求4所述的方法,当所述第一模型单元上次迭代的协方差矩阵为关联矩阵时,所述第一模型单元上次迭代的协方差矩阵通过如下公式确定:
    C T-1=γC T-2+(1-γ)M T-1·M T-1 T
    其中,C T-2是第一模型单元上上次迭代的关联矩阵;
    C T-1是第一模型单元上次迭代时的关联矩阵;
    M T-1是第一模型单元上次迭代时的模型参数;
    γ是预设值。
  6. 根据权利要求1所述的方法,所述样本对象为用户,所述第一样本数据和所述第二样本数据均为用户数据。
  7. 一种业务模型的训练方法,所述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同,所述方法应用在数据使用方,包括:
    基于所述第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T
    在接收到数据提供方发送的中间结果时,将所述中间结果和所述第二样本数据输入至模型参数为N T的第二模型单元;所述中间结果是由所述数据提供方将所述第一样本 数据输入至模型参数为M T的第一模型单元得到的,所述M T为所述第一模型单元本次迭代的模型参数;
    基于该第二模型单元输出的预测结果和所述样本对象的标签,确定参数更新决策,并将该参数更新决策发送给数据提供方,以由所述数据提供方基于该参数更新决策进行后续处理;
    若所述参数更新决策是接受本次迭代的模型参数,则检测所述业务模型是否收敛;
    若否,基于所述第二模型单元本次迭代时的模型参数N T,执行生成下次迭代的模型参数N T+1的步骤;
    若是,则停止所述第二模型单元的模型参数的迭代,并确定所述业务模型训练完成。
  8. 根据权利要求7所述的方法,所述方法还包括:
    若所述参数更新决策是不接受本次迭代的模型参数,则基于第二模型单元上次迭代时的模型参数N T-1,生成下次迭代的模型参数N T+1
  9. 根据权利要求7所述的方法,基于所述第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T,包括:
    基于模型参数N T-1、第二模型单元上次迭代的协方差矩阵以及预设的概率分布类型,确定目标概率分布;
    依据所述目标概率分布,生成服从所述目标概率分布的本次迭代的模型参数N T
    其中,所述第二模型单元上次迭代的协方差矩阵通过所述第二模型单元上上次迭代的协方差矩阵、以及所述第二模型单元上次迭代的模型参数N T-1确定。
  10. 根据权利要求9所述的方法,所述第二模型单元上次迭代的协方差矩阵为关联矩阵,或者,所述第二模型单元的上次迭代的协方差矩阵为动量矩阵。
  11. 根据权利要求10所述的方法,当所述第二模型单元上次迭代的协方差矩阵为关联矩阵时,所述第二模型单元的协方差矩阵通过如下公式确定:
    D T-1=γD T-2+(1-γ)N T-1·N T-1 T
    其中,D T-2是第二模型单元上上次迭代的关联矩阵;
    D T-1是第二模型单元上次迭代的关联矩阵;
    N T-1是第二模型单元上次迭代的模型参数;
    γ是预设值。
  12. 根据权利要求7所述的方法,基于模型参数为N T的第二模型单元输出的预测结果和所述样本对象的标签,确定参数更新决策,包括:
    基于所述预测结果和与所述样本对象的标签,计算所述业务模型的损失函数的取值;
    基于已记录的上次迭代时的损失函数的取值和本次迭代计算出的所述损失函数的取值,确定业务模型损失函数取值的变化量;
    基于所述变化量确定参数更新决策。
  13. 根据权利要求12所述的方法,所述基于所述变化量确定参数更新决策,包括:
    基于所述变化量,计算接受概率值;
    基于所述接受概率值,随机确定是否接受本次迭代的模型参数,作为参数更新决策。
  14. 根据权利要求13所述的方法,所述基于所述变化量,计算接受概率值,包括:
    通过如下公式计算接受概率值:
    P=min{exp(-Δl),1};
    其中,P为接受概率值;
    所述Δl为业务模型损失函数取值的变化量。
  15. 根据权利要求7至14中任一项所述的方法,所述样本对象为用户,所述第一样本数据和第二样本数据为用户数据。
  16. 一种业务模型的训练***,所述训练***包括:数据使用方和数据提供方;所 述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同;
    所述数据提供方,用于基于所述第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T;将所述第一样本数据输入模型参数为M T的第一模型单元,得到中间结果,并将该中间结果发送给所述数据使用方,并在确定所述数据使用方返回的参数更新决策是接受本次迭代的模型参数时,检测所述业务模型是否收敛,若否,则基于所述第一模型本次迭代时的模型参数M T,执行生成下次迭代的模型参数M T+1的步骤;若是,则停止所述第一模型单元的模型参数的迭代,并确定所述业务模型训练完成;
    所述数据使用方,用于基于所述第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T;在接收到数据提供方发送的中间结果时,将所述中间结果和所述第二样本数据输入至模型参数为N T的第二模型单元,并基于模型参数为N T的第二模型单元输出的预测结果和所述样本对象的标签确定参数更新决策,并将该参数更新决策发送给数据提供方,以及在确定所述参数更新决策是接受本次迭代的模型参数,则检测所述业务模型是否收敛;若否,基于所述第一模型本次迭代时的模型参数N T,执行生成下次迭代的模型参数N T+1的步骤;若是,则停止所述第二模型单元的模型参数的迭代,并确定所述业务模型训练完成。
  17. 根据权利要求16所述的***,
    所述数据提供方,用于当所述参数更新决策是不接受本次迭代的模型参数时,基于第一模型上次迭代时的模型参数M T-1,生成下次迭代的模型参数M T+1
    所述数据使用方,用于若所述参数更新决策是不接受本次迭代的模型参数,则基于第二模型单元上次迭代时的模型参数N T-1,生成下次迭代的模型参数N T+1
  18. 根据权利要求16所述的***,
    所述数据提供方,在基于所述第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T时,用于基于模型参数M T-1、第一模型单元上次迭代的协方差矩阵以及预设的概率分布类型,确定目标概率分布;依据所述目标概率分布,生成服从所述目标概率分布的本次迭代的模型参数M T;其中,所述第一模型单元上次迭代的协方差矩阵通过所述第一模型单元上上次迭代时的协方差矩阵、以及所述第一模型单元上次迭代的模型参数M T-1确定;
    所述数据使用方,在基于所述第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T时,用于基于模型参数N T-1、第二模型单元上次迭代的协方差矩阵以及预设的概率分布类型,确定目标概率分布;依据所述目标概率分布,生成服从所述目标概率分布的本次迭代的模型参数N T;其中,所述第二模型单元上次迭代的协方差矩阵通过所述第二模型单元上上次迭代的协方差矩阵、以及所述第二模型单元上次迭代的模型参数N T-1确定。
  19. 根据权利要求18所述的***,所述第一模型单元上次迭代的协方差矩阵为关联矩阵,或者,所述第一模型单元上次迭代的协方差矩阵为动量矩阵;
    所述第二模型单元上次迭代的协方差矩阵为关联矩阵,或者,所述第二模型单元的上次迭代的协方差矩阵为动量矩阵。
  20. 根据权利要求19所述的***,
    当所述第一模型单元上次迭代的协方差矩阵为关联矩阵时,所述第一模型单元上次迭代的协方差矩阵通过如下公式确定:
    C T-1=γC T-2+(1-γ)M T-1·M T-1 T
    其中,C T-2是第一模型单元上上次迭代的关联矩阵;
    C T-1是第一模型单元上次迭代时的关联矩阵;
    M T-1是第一模型单元上次迭代时的模型参数;
    γ是预设值;
    当所述第二模型单元上次迭代的协方差矩阵为关联矩阵时,所述第二模型单元的协方差矩阵通过如下公式确定:
    D T-1=γD T-2+(1-γ)N T-1·N T-1 T
    其中,D T-2是第二模型单元上上次迭代的关联矩阵;
    D T-1是第二模型单元上次迭代的关联矩阵;
    N T-1是第二模型单元上次迭代的模型参数;
    γ是预设值。
  21. 根据权利要求16所述的***,
    所述数据使用方,在基于模型参数为N T的第二模型单元输出的预测结果和所述样本对象的标签,确定参数更新决策时,用于基于所述预测结果和与所述样本对象的标签,计算所述业务模型的损失函数的取值;基于已记录的上次迭代时的损失函数的取值和本次迭代计算出的所述损失函数的取值,确定业务模型损失函数取值的变化量;基于所述变化量确定参数更新决策。
  22. 根据权利要求21所述的***,
    所述数据使用方,在基于所述变化量确定参数更新决策时,用于基于所述变化量,计算接受概率值;基于所述接受概率值,随机确定是否接受本次迭代的模型参数,作为参数更新决策。
  23. 根据权利要求22所述的***,
    所述数据使用方,在基于所述变化量,计算接受概率值时,用于通过如下公式计算接受概率值:
    P=min{exp(-Δl),1};
    其中,P为接受概率值;
    所述Δl为业务模型损失函数取值的变化量。
  24. 根据权利要求16至23任一项所述的***,所述样本对象为用户,所述第一样本数据和所述第二样本数据均为用户数据。
  25. 一种业务模型的训练装置,所述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同,所述装置应用在数据提供方,包括:
    生成模块,基于所述第一模型单元上次迭代时的模型参数M T-1,生成本次迭代的模型参数M T
    发送模块,将所述第一样本数据输入模型参数为M T的第一模型单元,得到中间结果,并将该中间结果发送给所述数据使用方;
    接收模块,接收数据使用方返回的参数更新决策,所述参数更新决策由所述数据使用方将所述中间结果和所述第二样本数据输入模型参数为N T的第二模型单元后,基于该第二模型单元输出的预测结果和所述样本对象的标签确定;所述N T为所述第二模型单元本次迭代的模型参数;
    决策模块,当所述参数更新决策是接受本次迭代的模型参数时,检测所述业务模型是否收敛;若否,则基于所述第一模型单元本次迭代时的模型参数M T,执行生成下次迭代的模型参数M T+1的步骤;若是,则停止所述第一模型单元的模型参数的迭代,并确定所述业务模型训练完成。
  26. 根据权利要求25所述的装置,所述决策模块,当所述参数更新决策是不接受本次迭代的模型参数时,基于第一模型上次迭代时的模型参数M T-1,生成下次迭代的模 型参数M T+1
  27. 根据权利要求25所述的装置,所述生成模块,基于模型参数M T-1、第一模型单元上次迭代的协方差矩阵以及预设的概率分布类型,确定目标概率分布;依据所述目标概率分布,生成服从所述目标概率分布的本次迭代的模型参数M T
    其中,所述第一模型单元上次迭代的协方差矩阵通过所述第一模型单元上上次迭代时的协方差矩阵、以及所述第一模型单元上次迭代的模型参数M T-1确定。
  28. 根据权利要求27所述的装置,所述第一模型单元上次迭代的协方差矩阵为关联矩阵,或者,所述第一模型单元上次迭代的协方差矩阵为动量矩阵。
  29. 根据权利要求28所述的装置,当所述第一模型单元上次迭代的协方差矩阵为关联矩阵时,所述第一模型单元上次迭代的协方差矩阵通过如下公式确定:
    C T-1=γC T-2+(1-γ)M T-1·M T-1 T
    其中,C T-2是第一模型单元上上次迭代的关联矩阵;
    C T-1是第一模型单元上次迭代时的关联矩阵;
    M T-1是第一模型单元上次迭代时的模型参数;
    γ是预设值。
  30. 根据权利要求25所述的装置,所述样本对象为用户,所述第一样本数据和所述第二样本数据均为用户数据。
  31. 一种业务模型的训练装置,所述业务模型包括第一模型单元和第二模型单元,所述第一模型单元配置在数据提供方,所述第二模型单元配置在数据使用方,所述数据提供方持有样本对象的第一样本数据,所述数据使用方持有所述样本对象的第二样本数据和所述样本对象的标签,所述第一样本数据和所述第二样本数据的特征维度不完全相同,所述装置应用在数据使用方,包括:
    生成模块,基于所述第二模型单元上次迭代时的模型参数N T-1,生成本次迭代的模型参数N T
    预测模块,在接收到数据提供方发送的中间结果时,将所述中间结果和所述第二样本数据输入至模型参数为N T的第二模型单元;所述中间结果是由所述数据提供方将所述第一样本数据输入至模型参数为M T的第一模型单元得到的,所述M T为所述第一模型单元本次迭代的模型参数;
    确定模块,基于该第二模型单元输出的预测结果和所述样本对象的标签,确定参数更新决策,并将该参数更新决策发送给数据提供方,以由所述数据提供方基于该参数更新决策进行后续处理;
    决策模块,若所述参数更新决策是接受本次迭代的模型参数,则检测所述业务模型是否收敛;若否,基于所述第二模型单元本次迭代时的模型参数N T,执行生成下次迭代的模型参数N T+1的步骤;若是,则停止所述第二模型单元的模型参数的迭代,并确定所述业务模型训练完成。
  32. 根据权利要求31所述的装置,所述决策模块,若所述参数更新决策是不接受本次迭代的模型参数,则基于第二模型单元上次迭代时的模型参数N T-1,生成下次迭代的模型参数N T+1
  33. 根据权利要求31所述的装置,所述生成模块,基于模型参数N T-1、第二模型单元上次迭代的协方差矩阵以及预设的概率分布类型,确定目标概率分布;依据所述目标概率分布,生成服从所述目标概率分布的本次迭代的模型参数N T;其中,所述第二模型单元上次迭代的协方差矩阵通过所述第二模型单元上上次迭代的协方差矩阵、以及所述第二模型单元上次迭代的模型参数N T-1确定。
  34. 根据权利要求33所述的装置,所述第二模型单元上次迭代的协方差矩阵为关联矩阵,或者,所述第二模型单元的上次迭代的协方差矩阵为动量矩阵。
  35. 根据权利要求34所述的装置,当所述第二模型单元上次迭代的协方差矩阵为 关联矩阵时,所述第二模型单元的协方差矩阵通过如下公式确定:
    D T-1=γD T-2+(1-γ)N T-1·N T-1 T
    其中,D T-2是第二模型单元上上次迭代的关联矩阵;
    D T-1是第二模型单元上次迭代的关联矩阵;
    N T-1是第二模型单元上次迭代的模型参数;
    γ是预设值。
  36. 根据权利要求31所述的装置,所述确定模块,基于所述预测结果和与所述样本对象的标签,计算所述业务模型的损失函数的取值;基于已记录的上次迭代时的损失函数的取值和本次迭代计算出的所述损失函数的取值,确定业务模型损失函数取值的变化量;基于所述变化量确定参数更新决策。
  37. 根据权利要求36所述的装置,所述确定模块,基于所述变化量,计算接受概率值;基于所述接受概率值,随机确定是否接受本次迭代的模型参数,作为参数更新决策。
  38. 根据权利要求37所述的装置,所述确定模块,通过如下公式计算接受概率值:
    P=min{exp(-Δl),1};
    其中,P为接受概率值;
    所述Δl为业务模型损失函数取值的变化量。
  39. 根据权利要求31至38任一项所述的装置,所述样本对象为用户,所述第一样本数据和第二样本数据为用户数据。
  40. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器通过运行所述可执行指令以实现如权利要求1-6中任一项所述的方法。
  41. 一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如权利要求1-6中任一项所述的方法。
  42. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器通过运行所述可执行指令以实现如权利要求7-15中任一项所述的方法。
  43. 一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如权利要求7-15中任一项所述的方法。
PCT/CN2020/132877 2020-03-27 2020-11-30 业务模型训练方法、装置、***及电子设备 WO2021189926A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010228702.0A CN111415015B (zh) 2020-03-27 2020-03-27 业务模型训练方法、装置、***及电子设备
CN202010228702.0 2020-03-27

Publications (1)

Publication Number Publication Date
WO2021189926A1 true WO2021189926A1 (zh) 2021-09-30

Family

ID=71493358

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/132877 WO2021189926A1 (zh) 2020-03-27 2020-11-30 业务模型训练方法、装置、***及电子设备

Country Status (2)

Country Link
CN (1) CN111415015B (zh)
WO (1) WO2021189926A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114266406A (zh) * 2021-12-24 2022-04-01 北京航空航天大学 一种基于联邦学习的大范围路网交通流状态预测方法
CN117540827A (zh) * 2024-01-08 2024-02-09 杭州吉利汽车数字科技有限公司 模型热更新方法、装置、设备及计算机可读存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111415015B (zh) * 2020-03-27 2021-06-04 支付宝(杭州)信息技术有限公司 业务模型训练方法、装置、***及电子设备
CN112906912A (zh) * 2021-04-01 2021-06-04 深圳市洞见智慧科技有限公司 纵向联邦学习中无可信第三方的回归模型训练方法及***
CN116468132A (zh) * 2022-01-10 2023-07-21 华为技术有限公司 用户数据处理的***、方法以及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170293857A1 (en) * 2016-04-08 2017-10-12 Here Global B.V. Distributed online learning for privacy-preserving personal predictive models
CN109886417A (zh) * 2019-03-01 2019-06-14 深圳前海微众银行股份有限公司 基于联邦学习的模型参数训练方法、装置、设备及介质
CN110751294A (zh) * 2019-10-31 2020-02-04 深圳前海微众银行股份有限公司 联合多方特征数据的模型预测方法、装置、设备及介质
CN111415015A (zh) * 2020-03-27 2020-07-14 支付宝(杭州)信息技术有限公司 业务模型训练方法、装置、***及电子设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107292325A (zh) * 2016-03-31 2017-10-24 日本电气株式会社 用于训练混合模型的方法和设备
CN107688849B (zh) * 2017-07-28 2021-04-13 赛灵思电子科技(北京)有限公司 一种动态策略定点化训练方法及装置
CN109426894A (zh) * 2017-08-22 2019-03-05 阿里巴巴集团控股有限公司 用户信息共享、竞价方法、装置、***及电子设备
US10410121B2 (en) * 2017-10-25 2019-09-10 SparkCognition, Inc. Adjusting automated neural network generation based on evaluation of candidate neural networks
CN108985929B (zh) * 2018-06-11 2022-04-08 创新先进技术有限公司 训练方法、业务数据分类处理方法及装置、电子设备
CN109345302B (zh) * 2018-09-27 2023-04-18 腾讯科技(深圳)有限公司 机器学习模型训练方法、装置、存储介质和计算机设备
CN110796270A (zh) * 2019-10-25 2020-02-14 深圳市超算科技开发有限公司 一种机器学习模型选择方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170293857A1 (en) * 2016-04-08 2017-10-12 Here Global B.V. Distributed online learning for privacy-preserving personal predictive models
CN109886417A (zh) * 2019-03-01 2019-06-14 深圳前海微众银行股份有限公司 基于联邦学习的模型参数训练方法、装置、设备及介质
CN110751294A (zh) * 2019-10-31 2020-02-04 深圳前海微众银行股份有限公司 联合多方特征数据的模型预测方法、装置、设备及介质
CN111415015A (zh) * 2020-03-27 2020-07-14 支付宝(杭州)信息技术有限公司 业务模型训练方法、装置、***及电子设备

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114266406A (zh) * 2021-12-24 2022-04-01 北京航空航天大学 一种基于联邦学习的大范围路网交通流状态预测方法
CN117540827A (zh) * 2024-01-08 2024-02-09 杭州吉利汽车数字科技有限公司 模型热更新方法、装置、设备及计算机可读存储介质
CN117540827B (zh) * 2024-01-08 2024-04-09 杭州吉利汽车数字科技有限公司 模型热更新方法、装置、设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN111415015A (zh) 2020-07-14
CN111415015B (zh) 2021-06-04

Similar Documents

Publication Publication Date Title
WO2021189926A1 (zh) 业务模型训练方法、装置、***及电子设备
Poongodi et al. Prediction of the price of Ethereum blockchain cryptocurrency in an industrial finance system
WO2021114974A1 (zh) 用户风险评估方法及装置、电子设备、存储介质
US11809993B2 (en) Systems and methods for determining graph similarity
CN111401558B (zh) 数据处理模型训练方法、数据处理方法、装置、电子设备
TWI690191B (zh) 圖結構模型訓練、垃圾帳戶識別方法、裝置以及設備
WO2021114911A1 (zh) 用户风险评估方法及装置、电子设备、存储介质
US11989633B2 (en) Shared learning across separate entities with private data features
US11893493B2 (en) Clustering techniques for machine learning models
US11258584B2 (en) Method, apparatus and electronic device for blockchain transactions
US11997098B2 (en) Using one or more networks to assess one or more metrics about an entity
CN111915023A (zh) 一种基于联邦学习的超参数确定方法及装置
CN113011646B (zh) 一种数据处理方法、设备以及可读存储介质
Zhang et al. Credit risk assessment based on long short-term memory model
WO2022174787A1 (zh) 模型训练
CN112015909B (zh) 知识图谱的构建方法及装置、电子设备、存储介质
US20220083571A1 (en) Systems and methods for classifying imbalanced data
Zhu et al. Distance based multiple kernel ELM: A fast multiple kernel learning approach
CN113743678B (zh) 一种用户信用评分预测方法及相关设备
US20240144278A1 (en) Systems and methods for fraud monitoring
CN112231746B (zh) 联合数据分析方法、装置、***及计算机可读存储介质
CN116720214A (zh) 一种用于隐私保护的模型训练方法及装置
CN114757700A (zh) 物品销量预测模型训练方法、物品销量预测方法及装置
US20240095553A1 (en) Systems and methods for evaluating counterfactual samples for explaining machine learning models
CN111797126B (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: 20926701

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20926701

Country of ref document: EP

Kind code of ref document: A1