A method and apparatus using a tree model
By perturbing the leaf nodes of the tree model to generate a dense tree model, the data privacy protection problem of the model holder when providing the tree model is solved, and effective prediction and security are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
- Filing Date
- 2024-04-30
- Publication Date
- 2026-08-04
AI Technical Summary
In machine learning, model owners want to protect the data privacy of tree models, preventing them from knowing the splitting features of the model's intermediate and leaf nodes, especially when the tree model is provided to clients for prediction.
By perturbing the leaf nodes of the tree model, a first dense-state tree is generated, and a second dense-state tree is added to form a dense-state tree model. The data side can only obtain the dense-state prediction results, while the model side records the perturbation information and location information, and obtains the true prediction results through inverse processing.
This approach allows for effective prediction while protecting the data of intermediate and leaf nodes in the tree model, ensuring the model's security and privacy.
Smart Images

Figure CN118333146B_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification belong to the field of computer technology, and in particular relate to a method and apparatus using a tree model. Background Technology
[0002] In the field of machine learning, there are many types of tree models. Tree models generally refer to a class of algorithms that use tree-like structures for data segmentation and decision-making. These tree models are commonly used to solve classification, regression, and other prediction problems. In one use case of tree models, the model holder (e.g., a trading platform, payment platform, etc.) owns the model's data, including model parameters and architecture. The model holder's clients own the feature data, acting as data holders. The model holder wants to use its tree model to predict client data and obtain predicted labels; however, the clients do not want to disclose their data. In this situation, the model holder needs to provide the model to the client for prediction purposes. Therefore, the model holder needs to protect the model when providing it to the client. Summary of the Invention
[0003] The purpose of this invention is to provide a method for using a tree model to protect the model of the modeling party.
[0004] This specification provides a method for using a tree model, executed by a model provider, wherein the tree model includes a decision tree, and the method includes:
[0005] The dense tree model corresponding to the tree model is sent to the data provider. The dense tree model includes a first dense tree and a second dense tree. The first dense tree is generated by adding a perturbation value to the value of each leaf node of the decision tree. The second dense tree is generated based on the first dense tree. The output data of the dense tree model is formatted to include a first position corresponding to the first dense tree and a second position corresponding to the second dense tree. The model provider records perturbation information corresponding to the perturbation value and position information of the first position.
[0006] Receive from the data source the dense state prediction result output by the dense state tree model for the feature data of the target object;
[0007] Based on the location information and the dense state prediction result, obtain the dense state score corresponding to the first dense state tree;
[0008] The dense state fraction is processed based on the perturbation information to obtain the prediction result of the tree model.
[0009] A second aspect of this specification provides an apparatus for using a tree model, deployed on a model side, the tree model including a decision tree, the apparatus comprising:
[0010] The sending unit is used to send a dense tree model corresponding to the tree model to the data party. The dense tree model includes a first dense tree and a second dense tree. The first dense tree is generated by adding a perturbation value to the value of each leaf node of the decision tree. The second dense tree is generated based on the first dense tree. The output data of the dense tree model is formatted to include a first position corresponding to the first dense tree and a second position corresponding to the second dense tree. The model party records perturbation information corresponding to the perturbation value and position information of the first position.
[0011] A receiving unit is configured to receive from the data provider the dense state prediction result output by the dense state tree model for the feature data of the target object;
[0012] The acquisition unit is used to acquire the density score corresponding to the first density tree based on the location information and the density prediction result;
[0013] The processing unit is used to process the dense state fraction based on the perturbation information to obtain the prediction result of the tree model.
[0014] A third aspect of this specification provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method described in the first aspect.
[0015] A fourth aspect of this specification provides a computing device including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method described in the first aspect.
[0016] This specification provides a computer program product in a fifth aspect, including a computer program / instructions that, when executed by a processor, implement the steps of the method described in the first aspect.
[0017] In the solution provided in the embodiments of this specification, the leaf nodes of the tree model are protected by perturbing their values, and the intermediate nodes are protected by adding a perturbation tree to the tree model, thus obtaining a dense tree model. The data provider makes predictions based on this dense tree model without knowing any data from the tree model. The data provider sends the dense prediction results of the dense tree model to the model provider, who can then obtain the true prediction results of the tree model based on the inverse processing of the perturbation. Therefore, the model provider protects its model by providing the dense tree model to the data provider. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments in this specification, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram illustrating a scenario where a tree model is used in an embodiment of this specification;
[0020] Figure 2 This is a flowchart illustrating a method using a tree model in an embodiment of this specification.
[0021] Figure 3 This is a schematic diagram of the tree model owned by the modeler in the embodiments of this specification;
[0022] Figure 4 This is a schematic diagram of the dense tree model in the embodiments of this specification;
[0023] Figure 5 This is a diagram illustrating the architecture of a device using a tree model in an embodiment of this specification. Detailed Implementation
[0024] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0025] This specification relates to the use of tree models, particularly regression-type tree models. The tree models in this specification can also be categorical tree models, which include activation layers. The leaf node layers still output scores for the object to be predicted. The category of the object to be predicted is obtained by processing these scores based on the activation layers.
[0026] The tree model includes any of the following types: Decision Trees, which typically refer to a single tree model; Random Forests, which consist of multiple decision trees, where each tree is usually trained independently based on a different subset of data samples. In Random Forests, the prediction results of all trees can be integrated through bagging, for example, by averaging the prediction scores of all trees to obtain the model's prediction result; Boosting Trees, such as Gradient Boosting Trees and XGBoost, which consist of multiple trees added sequentially, each tree correcting the prediction errors of previously added trees to gradually improve model performance. Boosting trees integrate the prediction results of multiple trees through boosting, for example, by adding the prediction scores of multiple trees to obtain the model's prediction result.
[0027] In the tree model described above, a tree can include intermediate nodes and leaf nodes. An intermediate node represents a decision point, where a conditional judgment is made based on a splitting condition. For example, the splitting condition for a certain intermediate node might be "Is the registration time less than 10 years?", where "registration time" can be called the splitting feature of that intermediate node, and "10" can be called the splitting value of that intermediate node. Each intermediate node connects to two or more child nodes, and each child node corresponds to a sub-interval of the splitting feature of that intermediate node.
[0028] Leaf node: The leaf node is the terminal node in the tree model. In a regression tree, the value of the leaf node is a continuous numerical value.
[0029] To train the tree model, a predetermined number of training samples are first obtained, including feature data and label data. Then, intermediate nodes of the tree model are progressively generated based on these training samples to segment them. At each intermediate node, preset parameter values obtained by segmenting the training samples using various preset splitting features are acquired. These parameters include information gain, Gini impurity, information gain ratio, mean squared error, etc. The splitting feature and splitting value corresponding to each intermediate node are determined based on the magnitude of the specific parameter values corresponding to each splitting feature. During the training of the tree model, the above segmentation process continues until a specific stopping criterion is met, such as the tree reaching a preset maximum depth, the number of samples in a node falling below a certain threshold, or further segmentation failing to significantly improve prediction accuracy.
[0030] After the segmentation stops, the multiple training samples fall into each leaf node, and then the value of each leaf node can be obtained based on the label value of the training samples in each leaf node.
[0031] When using a tree model for model prediction, feature data of the object to be predicted can be obtained. This feature data is then input into the tree model, so that the object to be predicted is placed into a leaf node of the tree model based on the feature data. The predicted value of the object to be predicted is obtained based on the value of the leaf node.
[0032] In related technologies, the model holder (hereinafter referred to as the model holder) can provide the splitting features corresponding to each intermediate node of the tree model to the data holder, and the data holder (hereinafter referred to as the data holder) can perform model prediction based on the splitting features corresponding to each intermediate node of the tree model.
[0033] In this related technology, it is impossible to hide the splitting features of each intermediate node of the tree model from the data side, thus failing to fully protect the model data.
[0034] This specification provides a method using a tree model. By perturbing the values of the leaf nodes in the tree model to protect them, and by adding a perturbation tree to the tree model to protect the intermediate nodes, a dense tree model is obtained. The data provider makes predictions based on this dense tree model without knowing any data from the tree model. The data provider sends the dense prediction results of the dense tree model to the model provider, who can then obtain the true prediction results of the tree model based on the inverse processing of the perturbation. In this specification, "dense" does not refer to obtaining ciphertext through encryption, but rather to the effect of hiding the true data. For example, by perturbing the values of the leaf nodes in the tree model to obtain a first dense tree, a second dense tree is generated to obfuscate the first dense tree. Both the first and second dense trees are still plaintext decision trees.
[0035] Figure 1 This is a schematic diagram illustrating a scenario using a tree model in an embodiment of this specification. For example... Figure 1 As shown, this scenario includes a model side and a data side. The model side trains to obtain a tree model, which is, for example, encapsulated in the form of a PMML file, and includes, for example, a tree Tr. In tree Tr, intermediate nodes are represented by white circular nodes, and leaf nodes are represented by white diamond nodes. Each intermediate node corresponds to a splitting condition, and each leaf node includes a node value. The model side can obtain a dense tree model by perturbing the values of the leaf nodes in the tree model to obtain a first dense tree Etr1, and by adding a second dense tree Etr2 to protect the intermediate nodes. The intermediate nodes in the first dense tree are represented by white circular nodes to indicate that the intermediate nodes in the first dense tree Etr1 have the same attributes as the intermediate nodes in tree Tr, and the leaf nodes in the first dense tree are represented by gray diamonds to indicate that the leaf nodes in the first dense tree have different values than those in tree Tr.
[0036] In the embodiments of this specification, the first dense tree represents a dense tree obtained by perturbing the leaf nodes of the real tree, and the second dense tree represents a dense tree newly added based on the values of the first dense tree. This second dense tree can be called a perturbation tree, used to perturb the intermediate nodes included in the tree model. The model can record relevant perturbation information and position information. The perturbation information may include perturbation values used to perturb the leaf nodes, and the position information is used to indicate the position in the output data of the dense tree model corresponding to the real tree, and the dense tree model is sent to the data provider. As shown in the box corresponding to the data provider, the dense tree model may include the first dense tree ETr1 and the second dense tree ETr2.
[0037] The data provider can input its own feature data into the dense-state tree model, and then output a dense-state prediction result from the dense-state tree model. The data provider then returns the dense-state prediction result to the model provider. The model provider can process the dense-state prediction result based on pre-stored perturbation and location information to obtain the true prediction result of the tree model. During the use of this model, the first dense-state tree ETr1 and the second dense-state tree ETr2 in the dense-state tree model protect the tree Tr in the tree model, preventing the data provider from inferring the tree model based on the dense-state tree model. This protects the model while simultaneously making predictions for the client.
[0038] Figure 2 This is a flowchart of a method using a tree model in an embodiment of this specification.
[0039] like Figure 2 As shown, firstly, in step S201, the model adds a perturbation value to the value of each leaf node of the tree model to obtain a first dense tree, and adds a second dense tree to obtain a dense tree model. The output data of the dense tree model is formatted to include a first position corresponding to the first dense tree and a second position corresponding to the second dense tree, and perturbation information and position information corresponding to the first dense tree in the output of the dense tree model are recorded.
[0040] In one implementation, the tree model of the modeling party includes n decision trees (n>1). The modeling party can regard these n decision trees as the first group of trees, and add perturbation values to the leaf nodes of each tree in the first group of trees to obtain a first dense state group, which includes n first dense state trees. The modeling party also adds k second dense state groups to the tree model, each of which includes n second dense state trees.
[0041] Figure 3 This is a schematic diagram of the tree model owned by the modeler in the embodiments of this specification. Figure 3 A tree model for classification is shown, which may include three layers of code modules: a prediction layer, a computation layer, and an activation layer. The prediction layer may include n decision trees for prediction. Figure 3The diagram shows trees Tr1 and Tr2 as examples. Specifically, the prediction layer includes data such as the node structure of each decision tree, the splitting features and splitting values of each intermediate node, and the node values of each leaf node. This tree model can be a random forest or a gradient boosting tree, etc., without limitation.
[0042] Taking the gradient boosting tree as an example, this tree model is used to predict the credit rating of merchants on a trading platform. The splitting features of the intermediate nodes in tree Tr1 include features such as transaction amount, platform registration time, number of platform transactions, user rating, and number of users. The scores of the leaf nodes in tree Tr1 are used to indicate part of the credit value. The splitting features of the intermediate nodes in tree Tr2 include features such as delivery time and refund time. The scores of the leaf nodes in tree Tr2 are used to indicate part of the credit value.
[0043] When using the tree model described above to predict the performance of a specific merchant, the merchant's feature data is obtained. This feature data may include values for the following characteristics: transaction amount, platform registration time, number of platform transactions, user rating, number of users, delivery time, refund time, etc. The merchant's feature data can be input into trees Tr1 and Tr2 in the prediction layer. Specifically, taking tree Tr1 as an example, for each intermediate node in tree Tr1, the feature data corresponding to the splitting feature of that intermediate node is compared with the splitting condition of that intermediate node to determine the child node into which the merchant should be split. This determines the prediction path and leaf node into which the merchant falls in tree Tr1, and based on the value of the leaf node into which the merchant falls, the score score1 output by tree Tr1 for that merchant is obtained. Similarly, by inputting the merchant's feature data into tree Tr2, the score score2 output by tree Tr2 for that merchant can be obtained. Typically, the tree model is in PMML file format. Since the output of the model in PMML file format is in floating-point form, the score output by the tree model has 16 significant digits.
[0044] The computation layer in the tree model is used to summarize the scores of multiple trees output by the prediction layer. It's understood that if the prediction layer includes a single tree, the computation layer is not needed. The computation layer receives the output data from the prediction layer and performs corresponding calculations based on the tree model's structure. For example, in the case of a random forest tree model, the computation layer calculates the mean of score1 and score2 as the tree model's output score, Score. In the case of a gradient boosting tree model, for example, score1 = 12.51 and score2 = -1.54, the computation layer calculates the sum of score1 and score2, resulting in the computation layer's output score: Score = 12.51 + (-1.54) = 10.97.
[0045] Subsequently, the activation layer in the tree model can determine the merchant's credit rating based on the output score of the computation layer. This credit rating may include, for example, trustworthy and untrustworthy, or determine the probability of a merchant having multiple preset credit ratings. The activation layer, for example, uses the sigmoid function to perform calculations based on the score output by the computation layer to determine the merchant's credit rating. It is understood that in the case of a regression model, the activation layer may not be included, and the tree model uses the output score of the computation layer as its output.
[0046] The model can be based on Figure 3 The tree model shown generates a dense tree model to provide data providers with model predictions. Figure 4 This is a schematic diagram of the dense tree model in the embodiments of this specification. Figure 4 As shown, the dense-state tree model includes a prediction layer, a computation layer, and a transformation layer. The prediction layer includes several first dense-state trees corresponding to the real tree. Figure 4 The diagram shows the first dense tree (Etr11 and Etr12) and several newly added second dense trees (Etr11 and Etr12). Figure 4 The diagram shows the second dense tree (Etr21, Etr22, Etr31, and Etr32). The first dense tree (Etr11 and Etr12) forms the first group of dense trees, the second dense trees (Etr21 and Etr22) form the second group, and the second dense trees (Etr31 and Etr32) form the third group. The groups of dense trees in the prediction layer can be randomly arranged, and are not limited to any particular arrangement. Figure 4 The arrangement is shown below. Each dense tree group outputs the score of each tree in that group to the computation layer, which then calculates the score for each dense tree group. The transformation layer transforms the output of the computation layer.
[0047] The following is a detailed description based on Figure 3 The process of generating a dense tree model from the tree model shown.
[0048] For classification tree models, the activation layers are first removed to transform the classification tree model into a regression tree model, allowing the tree model to directly output the score. This step is not necessary for regression tree models.
[0049] Then, the model can perturb the values of the leaf nodes of each tree in the prediction layer of the tree model to hide the leaf nodes of the tree model from the data. For example, if the tree model includes n trees, n random numbers corresponding to each of the n trees can be generated, and the value of the leaf node of each tree can be increased by the corresponding random number to obtain n first dense-state trees. It is assumed that the extreme value range of the leaf nodes included in the tree model is [min(score), max(score)] (that is, the range between the minimum and maximum values of the leaf nodes included in the tree model), where score is the set of values of all leaf nodes of the tree model, then the n random numbers can be selected within the numerical range [min(score), max(score)].
[0050] For example, targeting Figure 3 The prediction layer shown allows the model to generate random numbers v1 = 0.32 and v2 = 10.9 relative to trees Tr1 and Tr2, respectively. It increments the value of each leaf node in tree Tr1 by v1 and the value of each leaf node in tree Tr2 by v2, where v1 and v2 are randomly selected between the minimum and maximum values of the leaf node values included in tree Tr1 and tree Tr2. After this perturbation, tree Tr1 is effectively encrypted. Figure 4 The first dense-state tree Etr11 shown encrypts tree Tr2 into Figure 4 The first dense-state tree Etr12 is shown. It can be understood that the first dense-state tree Etr11 and the second dense-state tree Etr12 are still plaintext decision trees. The splitting features and splitting values of their middle nodes are plaintext and are the same as the middle nodes in the trees Tr1 and Tr2 mentioned above. The values of their leaf nodes are different from the values of the leaf nodes in trees Tr1 and Tr2, but they are still plaintext values.
[0051] In addition, the model also calculates the sum of each random number, sum1, i.e., sum1 = v1 + v2 = 0.32 + 10.9 = 11.22, and records the sum of the random numbers, sum1, for subsequent recovery processing of the dense tree model output.
[0052] Then, the model team added k groups of trees to the prediction layer of the tree model, each group including n second dense-state trees. Figure 4 The image shows the newly added second and third tree groups.
[0053] In the newly added second dense-state tree, the splitting features of intermediate nodes can be randomly selected based on the frequency of occurrence of splitting features included in the tree model. For example, if the true splitting feature a1 appears 7 times, the true splitting feature a2 appears 2 times, and the true splitting feature a3 appears once in the tree model, when constructing the second dense-state tree, for an intermediate node, its splitting feature has a probability of 0.7 of being a1, a probability of 0.2 of being a2, and a probability of 0.1 of being a3. It can be understood that the second dense-state tree can also include splitting features that do not appear in the tree model. After determining the splitting features of intermediate nodes in the second dense-state tree, if the splitting feature is included in the tree model, the splitting value of the intermediate node's splitting feature can be randomly selected within the extreme range of the splitting feature in the tree model (i.e., the range before the minimum and maximum values of the splitting feature). If the splitting feature does not appear in the tree model, the splitting value of the splitting feature can be randomly selected within the range (0,1).
[0054] The depth of the second dense-state tree can be randomly selected based on the depth and frequency of occurrence of the decision trees included in the tree model.
[0055] The values of the leaf nodes in the second dense tree can be randomly selected within the extreme value range [min(score'), max(score')] of the leaf nodes in the first dense tree, where score' is the set of values of the leaf nodes in the first dense tree (including the first dense trees Etr11 and Etr12). The splitting features, splitting values, and leaf node values of the intermediate nodes in each of the second dense trees are also plaintext. In other words, the dense tree model is a plaintext tree model.
[0056] Understandable, although Figure 4 The tree shapes (i.e., tree depth, number of intermediate nodes, number of leaf nodes, connection structure between nodes, etc.) of each second dense state tree are the same, and the tree shapes of each first dense state tree are the same. It can be understood that this is just an example. In reality, each first dense state tree can have different tree shapes, and each second dense state tree can have different tree shapes.
[0057] Accordingly, the model will Figure 3 The computational layer update involves summarizing the density scores of the n dense trees included in each group of dense trees in the prediction layer. The summarization method can be found in the section above. Figure 3 The description of the computational layer in [the text] will not be repeated here. For example, refer to [reference]. Figure 4Assuming that the dense state scores output by the first dense state trees Etr11 and Etr12 in Group 1 for the feature data of the input dense state tree model are Escore11 = 12.51 + 0.32 = 12.83 and Escore12 = -1.54 + 10.90 = 9.36 respectively, the computation layer can summarize Escore11 and Escore12, for example, by adding them together, to obtain the dense state score corresponding to Group 1: Escore1 = 12.83 + 9.36 = 22.19. Assuming that the dense state scores output by the second dense state trees Etr21 and Etr22 in Group 2 for the feature data of the input dense state tree model are Escore21 = 15.25 and Escore22 = -20.51 respectively, the computation layer can add Escore21 and Escore22 together, to obtain the dense state score corresponding to Group 2: Escore2 = 15.25 - 20.51 = -5.26. Similarly, the computational layer can add the dense state scores Escore31 and Escore32 of the third group output to obtain the dense state score Escore3 = 25.53 corresponding to the third group.
[0058] Given that the dense state scores output by each group of dense state trees may be positive or negative, and include both integer and fractional parts, and since the output of the tree model is usually a double-precision floating-point number (with 16 effective bits), in order to facilitate the dense state tree model to concatenate multiple dense state scores into a single double-precision floating-point number for output, the model also adds a conversion layer to the dense state tree model. This conversion layer is used to convert the dense state scores of each group into positive integers (i.e., excluding the sign and including only the integer part), and concatenates the multiple positive integers obtained from the conversion into concatenated data, which serves as the dense state prediction result output by the dense state tree model.
[0059] Specifically, for example, for the dense tree model mentioned above, the model needs to determine the maximum and minimum value range [min(score'), max(score')] of the leaf nodes of the multiple dense trees included in the dense tree model. Thus, the value of n*min(score') can be stored in the transformation layer, and the transformation layer is set to subtract n*min(score') from the dense score of each group when the model is predicting, so that the dense score of each group can be converted into a positive number.
[0060] For example, for the scores Escore1, Escore2, and Escore3 of the above dense-state trees, assuming n*min(score') = -8.42, and the conversion layer presets n*min(score') = -8.42, when the calculation layer outputs the above Escore1, Escore2, and Escore3 to the conversion layer, the conversion layer can convert Escore1, Escore2, and Escore3 respectively, resulting in Escore1′ = 22.19 - (-8.42) = 30.61, Escore2′ = -5.26 - (-8.42) = 3.16, and Escore3′ = 25.53 - (-8.42) = 33.95.
[0061] Next, the model needs to determine the precision (i.e., the number of decimal places) of the dense state scores for each group and store it in the transformation layer. Specifically, the transformation set in the transformation layer in the previous step ensures that the values of the dense state scores for each group after transformation are within the range of [0, n·(max(score)-min(score))], thus allowing the calculation of the maximum number of integer digits in the dense state scores. This formula represents the lg obtained by rounding down n·(max(score)-min(score)). It can be understood that, in the case of a dense tree model of the random forest type, the range of dense scores for each group can be determined based on the method of calculating the model output in the random forest, and thus the value of l can be determined based on this range. This will not be elaborated further here. The decimal digits of a dense tree score are digits = l + precision. For k+1 groups of trees, the total decimal digits are (k+1)·digits = (k+1)(l + precision). The pmml file corresponding to the tree model can save a total of 15-17 digits before and after the decimal point (this article uses 16 digits as an example for calculation). Therefore, (k+1)·digits = (k+1)(l + precision) ≤ 16, and precision needs to satisfy... It is understandable that if the model or data provider has specific requirements for precision, the value of k can be adjusted, that is, the number of groups of the newly added second dense state tree can be adjusted.
[0062] After determining the precision value, the model records this value in the transformation layer and sets the account layer to convert the dense-state scores to integers based on the precision value. For example, when using a dense-state tree model, if the number of decimal places of the dense-state scores Escore1′, Escore2′, and Escore3′ converted to positive numbers is greater than the precision value, the transformation layer can truncate the decimal places of the dense-state scores Escore1′, Escore2′, and Escore3′ according to the precision value and multiply the truncated dense-state scores by 10. precision This converts the dense-state scores into integers. Understandably, the model can also set the values of the leaf nodes of the dense-state tree model based on this precision value. Assuming a precision value of 2, multiplying the transformation layers Escore1′, Escore2′, and Escore3′ by 100 respectively yields positive integer scores Escore1″ = 3061, Escore2″ = 316, and Escore3″ = 3395. Simultaneously, the model records the values of n*min(score') and precision corresponding to the tree model and the dense-state tree model, respectively, for processing the received dense-state prediction results.
[0063] Subsequently, the model also presets the positions (e.g., the number of digits) in the concatenated data output by the transformation layer that correspond to each group of dense-state trees. Assuming a precision value of 2, and the calculated dense-state scores of the groups have 2 integer digits, then the positions in the concatenated data corresponding to each group include a total of 4 digits. For example, the model can preset the leftmost 4 digits (i.e., digits 1-4 from the left) to correspond to the 3rd group of dense-state trees, preset the 5th-8th digits from the left to correspond to the 1st group of dense-state trees, and preset the 9th-12th digits from the left to correspond to the 2nd group of dense-state trees. It also records the positions (e.g., digits 5-8) in the concatenated data corresponding to the group including the first dense-state tree (i.e., group 1) for subsequent extraction of the data corresponding to group 1 from the dense-state prediction results. Therefore, when using this dense-state tree model for prediction, the transformation layer can concatenate the positive integer scores corresponding to groups 1-3 obtained above according to these preset positions, such as... Figure 4 As shown, we obtain Escore3″‖Escore1″‖Escore2″, which is 339530610316, where ‖ represents the splicing process. The dense tree model can output this spliced data as the dense prediction result.
[0064] It is understood that, in the embodiments of this specification, the inclusion of a transformation layer in the dense-state tree model is not limited. For example, the dense-state tree model can define the output data type as a string type, thereby directly concatenating the dense-state scores Escore1, Escore2, and Escore3 output by the computation layer to obtain the concatenated string as the dense-state prediction result. In this embodiment, the model can pre-record the position in the concatenated string corresponding to the first group, so as to obtain the dense-state score of the first group of dense-state trees from the dense-state prediction result.
[0065] In another implementation, such as Figure 1 As shown, the tree model of the model-side can include a decision tree Tr. The model-side can add different perturbation values or the same perturbation value to each leaf node of the tree model to obtain a first dense-state tree Etr1, and record the information of the perturbation value. For example, when different perturbation values are added to different leaf nodes, the perturbation value can be recorded corresponding to the identifier of each leaf node. Then, the model-side can add one or more second dense-state trees to the tree model in a similar manner as described above. For example... Figure 1 The diagram shows the addition of a second dense-state tree, Etr2. In this case, with... Figure 4 Compared to the dense-state tree model shown, the dense-state tree model in this embodiment does not require a computation layer. The dense-state tree model can still include a transformation layer, which can be used to receive the dense-state fraction Es1 of the first dense-state tree Etr1 and the dense-state fraction Es2 of the second dense-state tree Etr2.
[0066] The transformation layer can be similarly configured as described above to convert the dense state fractions Es1 and Es2 into positive integers and concatenate them into concatenated data. The model has pre-recorded the position in the concatenated data corresponding to the first dense state tree Etr1.
[0067] Specifically, the values of min(score) and precision can be preset in the transformation layer. The precision value can be obtained by applying the formula mentioned above. The value of n is set to 1 and calculated (assuming the dense tree model includes k second dense trees). The transformation layer is configured to convert the dense state scores output by the first and second dense trees into positive numbers based on the value of min(score'), and to convert these positive numbers into positive integers based on the value of precision. Simultaneously, the model records the values of min(score') and precision for subsequent conversion of positive integers in the dense state prediction results into dense state scores.
[0068] In one implementation, when the tree model includes multiple decision trees, the multiple first dense-state trees corresponding to the multiple decision trees can be divided into multiple groups, so that the dense-state tree model can include multiple groups including the first dense-state trees. The model can pre-record the position information of multiple positions in the output of the dense-state tree model corresponding to the multiple groups, so that the dense-state score of each group can be calculated based on the multiple positions, and the prediction result of the tree model can be calculated based on the dense-state score of each group.
[0069] It is understood that the model provider can prepare a dense tree model corresponding to the tree model in advance through the above process for use by multiple data providers. Therefore, step S201 is not a necessary step when performing model prediction.
[0070] In step S203, the model provider sends the dense tree model to the data provider.
[0071] Referring to the description above, in one implementation, the dense tree model may include a prediction layer, which includes a first dense tree and one or more second dense trees.
[0072] In another implementation, the dense tree model may include a prediction layer and a computation layer, wherein the prediction layer may include a set of first dense trees and a set or more sets of second dense trees.
[0073] In another implementation, the dense tree model may include a prediction layer, a computation layer, and a transformation layer, wherein the prediction layer may include a set of first dense trees and a set or more sets of second dense trees.
[0074] In step S205, the data provider makes predictions based on the dense state tree model to obtain dense state prediction results.
[0075] In one implementation, reference Figure 4After receiving the dense-state tree model, the data provider inputs the merchant's feature data into each of the three dense-state trees in the prediction layer of the dense-state tree model, thereby obtaining the dense-state score output by each dense-state tree. Specifically, the first dense-state tree Etr11 outputs a dense-state score Escore11 relative to the feature data, the first dense-state tree Etr12 outputs a dense-state score Escore12 relative to the feature data, the second dense-state tree Etr21 outputs a dense-state score Escore21 relative to the feature data, the second dense-state tree Etr22 outputs a dense-state score Escore22 relative to the feature data, the second dense-state tree Etr31 outputs a dense-state score Escore31 relative to the feature data, and the second dense-state tree Etr32 outputs a dense-state score Escore32 relative to the feature data. The prediction layer outputs the dense state scores Escore11 and Escore12 of the first group, Escore21 and Escore22 of the second group, and Escore31 and Escore32 of the third group to the computation layer.
[0076] As described above, the computational layer summarizes the multiple dense state scores of the first group to obtain the dense state score Escore1 of the first group, summarizes the multiple dense state scores of the second group to obtain the dense state score Escore2 of the second group, and summarizes the multiple dense state scores of the third group to obtain the dense state score Escore3 of the third group.
[0077] As described above, the transformation layer converts the dense state scores Escore1, Escore2, and Escore3 into positive integers based on the pre-stored values of n*min(score') and precision, and then concatenates them to obtain the dense state prediction results of the dense state tree model, Escore3″‖Escore1″‖Escore2″.
[0078] In another implementation, for example Figure 1 The dense tree model shown is such that after receiving the dense tree model, the data provider inputs the merchant's feature data into the first dense tree Etr1 and the second dense tree Etr2 in the dense tree model, thereby obtaining the dense tree scores output by each dense tree, such as Es1 and Es2.
[0079] As described above, the transformation layer converts the dense state scores Es1 and Es2 into positive integers based on the pre-stored values of min(score') and precision, and then concatenates them in a specific order to obtain the dense state prediction result Es2′‖Es1′ of the dense state tree model.
[0080] In step S207, the data provider sends the dense state prediction results to the model provider.
[0081] In step S209, the model obtains the dense state score corresponding to the first dense state tree based on the location information and the dense state prediction result, processes the dense state score based on the perturbation value, and obtains the prediction result.
[0082] In one implementation, the dense state prediction result is as follows: Figure 4 The data includes Escore3″‖Escore1″‖Escore2″ (e.g., 339530610316 above). The model can first determine "3061" from "339530610316" as the positive integer score corresponding to the group including the first dense state tree based on the position (e.g., the 5th to 8th position) in the pre-recorded spliced data corresponding to the group including the first dense state tree.
[0083] Then, the model can perform the inverse processing corresponding to the transformation in the transformation layer on "3061" to obtain the dense state score Escore1 of the first group. Specifically, the model divides "3061" by 100 based on the pre-recorded precision value (i.e., precision = 2) to obtain Escore1′ = 30.61. The pre-recorded value of n*min(score'), i.e., -8.42, is added to Escore1′ to obtain Escore1 = 30.61 + (-8.42) = 22.19. Afterwards, the perturbation value of the leaf node corresponding to the first group (i.e., sum1 = 11.22) can be subtracted from Escore1 to obtain the true score of the tree model: Score = 22.19 - 11.22 = 10.97.
[0084] In a tree model, such as Figure 2 The model can only run the sigmoid function if an activation layer is included. Therefore, the binary classification prediction result is obtained based on the value of y.
[0085] In another implementation, the dense state prediction result includes... Figure 1 The positive integer tree data corresponding to the first dense state tree Etr1 in the data and the data with Figure 1 The model receives the positive integer data corresponding to the second dense-state tree Etr2. After receiving the dense-state prediction result, the model can obtain the positive integer data corresponding to the first dense-state tree Etr1 based on the position in the pre-recorded concatenated data corresponding to Etr1. Then, based on the pre-recorded precision value, the positive integer data can be converted into a positive real number (i.e., including decimals), and the pre-recorded min(score') value can be added to the positive real number to obtain the dense-state score output by the first dense-state tree Etr1. Afterwards, the perturbation value of the corresponding leaf node in the first dense-state tree Etr1 can be subtracted from the dense-state score to obtain the true score of tree Tr.
[0086] In another implementation, multiple positions in the dense state prediction result correspond to a group including the first dense state tree. The model can obtain multiple positive integers from the multiple positions in the dense state prediction result based on the pre-recorded position information of these multiple positions, perform summary processing (e.g., addition) on these multiple positive integers, and then perform the same processing on the added value as described above for the "positive integer fraction" to obtain the prediction result of the tree model.
[0087] In the tree model scheme described in this specification, the intermediate and leaf nodes of the tree model are fully protected by converting the tree model into a dense tree model and sending it to the data provider for model prediction, thus protecting the model's security.
[0088] Furthermore, by maintaining the standard PMML format in the embodiments of this specification, the data provider can directly use the dense tree model for model prediction without any other modifications. Additionally, the embodiments of this specification use only one dense tree model, reducing the overhead of the data provider calling the model from the model provider.
[0089] Figure 5 This specification describes an apparatus using a tree model, deployed on a model side, wherein the tree model includes a decision tree, and the apparatus includes:
[0090] The sending unit 51 is used to send a dense tree model corresponding to the tree model to the data party. The dense tree model includes a first dense tree and a second dense tree. The first dense tree is generated by adding a perturbation value to the value of each leaf node of the decision tree. The second dense tree is generated based on the first dense tree. The output data of the dense tree model is formatted to include a first position corresponding to the first dense tree and a second position corresponding to the second dense tree. The model party records perturbation information corresponding to the perturbation value and position information of the first position.
[0091] The receiving unit 52 is used to receive from the data provider the dense state prediction result output by the dense state tree model for the feature data of the target object;
[0092] The acquisition unit 53 is used to acquire the dense state score corresponding to the first dense state tree based on the location information and the dense state prediction result;
[0093] The processing unit 54 is used to process the dense state fraction based on the perturbation information to obtain the prediction result of the tree model.
[0094] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform actions such as... Figure 2 The method shown.
[0095] This specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements, as described above. Figure 2 The method shown.
[0096] This specification provides an embodiment of a computer program product, including a computer program / instructions, which, when executed by a processor, implements... Figure 2 The steps of the method shown.
[0097] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0098] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0099] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. A typical implementation device is a server system. Of course, this application does not exclude the possibility that, with the future development of computer technology, the computer implementing the functions of the above embodiments can be, for example, a personal computer, a laptop computer, an in-vehicle human-machine interaction device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0100] While one or more embodiments of this specification provide the operational steps of the methods described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or end product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in the process, method, product, or apparatus that includes the elements is not excluded. For example, the use of terms such as "first," "second," etc., is to denote names and does not indicate any particular order.
[0101] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, when implementing one or more of these specifications, the functions of each module can be implemented in one or more software and / or hardware components, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.
[0102] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0103] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0104] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0105] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0106] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0107] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0108] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0109] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0110] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, system embodiments are basically similar to method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. In the description of this specification, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this specification. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0111] The above description is merely an embodiment of one or more embodiments of this specification and is not intended to limit the scope of these embodiments. Various modifications and variations can be made to these embodiments by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims.
Claims
1. A method using a tree model, executed by a modeler, said tree model including a decision tree, the method comprising: The dense tree model corresponding to the tree model is sent to the data provider. The dense tree model includes a first dense tree and a second dense tree. The first dense tree is generated by adding a perturbation value to the value of each leaf node of the decision tree. The second dense tree is generated based on the first dense tree or the decision tree. The output data of the dense tree model is formatted to include a first position corresponding to the first dense tree and a second position corresponding to the second dense tree. The model provider records perturbation information corresponding to the perturbation value and position information of the first position. Receive from the data source the dense state prediction result output by the dense state tree model for the feature data of the target object; Based on the location information and the dense state prediction result, obtain the dense state score corresponding to the first dense state tree; The dense state fraction is processed based on the perturbation information to obtain the prediction result of the tree model.
2. The method of claim 1, further comprising: The first dense-state tree is generated by adding a perturbation value to the value of each leaf node of the decision tree, the second dense-state tree is generated based on the first dense-state tree, and the dense-state tree model is generated based on the first dense-state tree and the second dense-state tree.
3. The method according to claim 2, wherein the tree model comprises n decision trees, and the addition of a perturbation value to the value of each leaf node of the decision trees comprises: Generate n random numbers corresponding to the n decision trees respectively. For each decision tree, add the random number corresponding to that decision tree to each of its leaf nodes. The recording of the disturbance information corresponding to the disturbance value includes: adding the n random numbers to obtain the sum of the random numbers, and recording the information corresponding to the sum of the random numbers as the disturbance information; The step of generating a second dense tree based on the first dense tree includes: generating k groups of second dense trees based on n first dense trees, each group of second dense trees including n second dense trees; The output data of the dense tree model is formatted to include a first position and k second positions, wherein the first position corresponds to the n first dense trees and the k second positions correspond to the k groups of second dense trees respectively.
4. The method according to claim 3, wherein the dense state score corresponding to the first dense state tree includes the sum of the dense state scores output by the n first dense state trees, and the step of processing the dense state score based on the perturbation information to obtain the prediction result of the tree model includes: The sum of the dense state scores output by the n first dense state trees is subtracted from the sum of the random numbers to obtain the prediction result of the tree model.
5. The method according to claim 1 or 2, wherein the perturbation value is greater than or equal to a first value and less than or equal to a second value, wherein the first value is the minimum value among all leaf nodes included in the tree model, and the second value is the maximum value among all leaf nodes included in the tree model.
6. The method according to claim 3, wherein the value range of the leaf nodes of the second dense-state tree is greater than or equal to the third value and less than or equal to the fourth value, wherein the third value is the minimum value among all perturbed values of the leaf nodes included in the tree model, and the fourth value is the maximum value among all perturbed values of the leaf nodes included in the tree model.
7. The method according to claim 6, wherein the splitting features included in the second dense-state tree are determined based on the splitting features included in the n decision trees and their occurrence frequency, and the splitting value of each splitting feature in the second dense-state tree is selected based on the range of values of the splitting value of the splitting feature in the n decision trees.
8. The method according to claim 6, wherein generating a dense tree model based on the first dense tree and the second dense tree comprises: A computational layer is generated to form the dense-state tree model. The computational layer is used to calculate the first dense-state score based on the dense-state scores output by the n first dense-state trees and to calculate the second dense-state score corresponding to each group of second dense-state trees based on the dense-state scores output by each group of second dense-state trees.
9. The method according to claim 8, wherein generating the dense tree model based on the first dense tree and the second dense tree further comprises: Based on the third and fourth values, a conversion layer is set in the dense state tree model. The conversion layer is used to convert the first dense state score and each of the second dense state scores into positive integers, and to concatenate multiple positive integers into a floating-point number as the dense state prediction result. The step of obtaining the dense state score corresponding to the first dense state tree based on the location information and the dense state prediction result includes: obtaining a positive integer corresponding to the first dense state tree from the dense state prediction result based on the location information, and transforming the positive integer using the inverse transform corresponding to the transformation layer to obtain the dense state score output by the first dense state tree.
10. The method according to claim 9, wherein setting the transformation layer of the dense-state tree model based on the third value and the fourth value comprises: The conversion layer stores a first conversion value and a second conversion value. The first conversion value is the product of n and the third value. The second conversion value is determined based on the third value, the fourth value, n, and a preset number of digits, and is used to indicate the number of decimal places of the dense fraction. The conversion layer is specifically configured to: Subtracting the first transformation value from the first dense state fraction and the second dense state fraction yields a positive number. Based on the second conversion value, each of the positive numbers is converted into a positive integer.
11. The method of claim 3, wherein the tree model includes an activation layer for classification based on the scores output by the decision tree. The process of processing the dense-state fraction based on the perturbation information to obtain the prediction result of the tree model includes: The dense-state score is processed based on the perturbation information to obtain the predicted score of the target object corresponding to the decision tree. The predicted score is then input into the activation layer to obtain the classification result of the target object.
12. An apparatus using a tree model, deployed on a model side, the tree model including a decision tree, the apparatus comprising: The sending unit is used to send a dense tree model corresponding to the tree model to the data party. The dense tree model includes a first dense tree and a second dense tree. The first dense tree is generated by adding a perturbation value to the value of each leaf node of the decision tree. The second dense tree is generated based on the first dense tree or the decision tree. The output data of the dense tree model is formatted to include a first position corresponding to the first dense tree and a second position corresponding to the second dense tree. The model party records perturbation information corresponding to the perturbation value and position information of the first position. A receiving unit is configured to receive from the data provider the dense state prediction result output by the dense state tree model for the feature data of the target object; The acquisition unit is used to acquire the density score corresponding to the first density tree based on the location information and the density prediction result; The processing unit is used to process the dense state fraction based on the perturbation information to obtain the prediction result of the tree model.
13. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-10.
14. A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-10.