Method for determining split points of non-leaf nodes of tree model
In the tree model training of privacy calculation, intersection samples are obtained in advance and the derivative cumulative value slice is calculated. Combined with the gain value calculation formula after removing the constant term, the problem of low calculation efficiency of split points of non-leaf nodes is solved, and a more efficient calculation process is achieved.
Patent Information
- Application Number
- CN202411970712.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-02
AI Technical Summary
During the tree model training process of privacy computing, the calculation efficiency of split points of non-leaf nodes is low, especially because it requires multiple secret division operations, which takes a long time.
By pre-acquisitioning samples of multiple participants and bucketing the samples, the derivative accumulated value of each bucket is fragmented. Then, using the gain value calculation formula after removing the constant term, the gain value denominator slice and the gain value numerator slice are calculated in combination with the second party, and the splitting point is determined.
By reducing the number of secret divisions, the efficiency of split point calculation is improved and the time consumption in privacy calculation is reduced.
Smart Images

Figure CN119917945A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification belong to the field of privacy computing technology, and in particular, to a method for determining splitting points of non-leaf nodes in a tree model. Background Art
[0002] A decision tree model is a tree structure that can be used to score or classify the attributes of a target object based on the input feature values of the target object. Privacy computing is a method in which multiple parties conduct joint data processing without disclosing their own data. With the continuous development of privacy computing technology, there is a need in the existing technology for privacy computing in which two parties jointly train a tree model.
[0003] In the process of training the privacy-preserving tree model, a large amount of sensitive data structure information is required, which requires the use of more encryption technologies and more cumbersome privacy-preserving processes to ensure data security during the joint training of the tree model. Therefore, compared with the initial plaintext tree model training process, the privacy-preserving tree model training process will consume more time, generally two orders of magnitude more than the plaintext tree model training process.
[0004] In the process of privacy computing tree model training, the calculation of the split point of non-leaf nodes is a relatively time-consuming process. Specifically, the split point is calculated according to the gain value formula Determine that in this process, for each bucket, both parties jointly use the division and addition operations of secret sharing to calculate the gain value shard <gain>, and compare the gain values corresponding to each bucket, determine the bucket corresponding to the maximum gain value, and use the bucket threshold and features corresponding to the bucket as the splitting condition of the non-leaf node.
[0005] Each calculation <gain>It is necessary to perform three secret division operations, which takes a long time and the calculation process of the splitting point is inefficient. Summary of the invention
[0006] The purpose of this specification is to provide a method for determining the splitting points of non-leaf nodes in a tree model.
[0007] In a first aspect, the present specification provides a method for determining a split point of a non-leaf node of a tree model, which is applied to a first party. The method also involves a second party, which obtains a plurality of intersection samples of the first party and the second party by jointly performing a privacy intersection with the second party in advance, and performs bucket processing on the intersection samples according to feature values; for each non-leaf node, the method includes:
[0008] Determine the derivative cumulative value slices corresponding to each bucket; the derivative cumulative value includes the sum of the derivative values of the intersection samples whose characteristic values do not exceed the bucket threshold corresponding to the bucket, and the sum of the derivative values of the intersection samples whose characteristic values are greater than the bucket threshold corresponding to the bucket;
[0009] For each bucket, the derivative cumulative value slice corresponding to the bucket is used, and the gain value calculation formula with the constant term removed is used in conjunction with the second party to determine the gain value denominator slice and the gain value numerator slice corresponding to each bucket;
[0010] By using a secret comparison method jointly executed with the second party, the number of the bucket whose gain value meets the preset condition is determined according to the gain value denominator slice and the gain value numerator slice corresponding to each bucket, so as to determine the corresponding split point according to the number.
[0011] In an optional implementation, the secret comparison method jointly performed with the second party determines the number of the bucket of the bucket whose gain value meets the preset condition according to the gain value denominator slice and the gain value numerator slice corresponding to each bucket, including:
[0012] Using the gain value denominator shard and the gain value numerator shard corresponding to each bucket, the second party is combined to calculate the gain value shard corresponding to each bucket;
[0013] A secret comparison method is jointly performed with the second party to determine a gain value shard whose gain value meets the condition from the gain value shards corresponding to each bucket, and determine the corresponding bucket number.
[0014] The second aspect of the present specification provides a split point determination device for a non-leaf node of a tree model, which is applied to a first party, and obtains a plurality of intersection samples of the first party and the second party by jointly performing a privacy intersection in advance with a second party, and performs bucket processing on the intersection samples according to feature values; for each non-leaf node, the device includes:
[0015] A derivative cumulative value shard determination module is used to determine the derivative cumulative value shards corresponding to each bucket; the derivative cumulative value includes the sum of the derivative values of the intersection samples whose characteristic values do not exceed the bucket threshold corresponding to the bucket, and the sum of the derivative values of the intersection samples whose characteristic values are greater than the bucket threshold corresponding to the bucket;
[0016] A gain value calculation module is used to determine, for each bucket, a gain value denominator slice and a gain value numerator slice corresponding to each bucket by using the derivative cumulative value slice corresponding to the bucket and jointly with the second party by using the gain value calculation formula with the constant term removed;
[0017] A secret comparison module is used to determine the bucket number of the bucket whose gain value meets the preset conditions according to the gain value denominator slice and the gain value numerator slice corresponding to each bucket through a secret comparison method jointly executed with the second party, so as to determine the corresponding split point according to the number.
[0018] A third aspect of the present specification provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute the method for determining splitting points of non-leaf nodes of a tree model described in the first aspect.
[0019] The fourth aspect of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method for determining the splitting point of the non-leaf node of the tree model described in the first aspect is implemented.
[0020] A fifth aspect of the present specification provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the method for determining splitting points of non-leaf nodes of a tree model described in the first aspect.
[0021] This specification proposes a method for determining the splitting point of a non-leaf node of a tree model. The first party and the second party obtain multiple intersection samples of the first party and the second party in advance through a jointly executed private intersection, and bucket the intersection samples. Further, the derivative cumulative value shards corresponding to each bucket are determined, and for each bucket, the two parties jointly calculate the gain value using the gain value calculation formula after removing the constant term and commonizing it, and obtain the gain value denominator shard and the gain value numerator shard. Further, based on the denominator and numerator shards of the gain value, the splitting point is determined. In the above method, the constant term in the gain value accumulation formula is removed, and the formula after removing the constant term is commonized, and the gain value denominator shard and the gain value numerator shard are calculated based on the gain value calculation formula after commonizing, thereby reducing the number of secret divisions by at least one time and speeding up the calculation efficiency of the splitting point. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use 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 ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0023] Figure 1 is a schematic diagram of a tree model in one embodiment;
[0024] Figure 2 is a flow chart of a method for determining a split point of a non-leaf node of a tree model in one embodiment of this specification;
[0025] Figure 3 is a flowchart of a method for determining a split point of a non-leaf node of a tree model in another embodiment of the present specification;
[0026] Figure 4 It is a block diagram of a device for determining a split point of a non-leaf node of a tree model in one embodiment of the present specification. DETAILED DESCRIPTION
[0027] In order 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 in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0028] With the requirements of data security, privacy computing methods that take into account privacy protection requirements and data utilization have been widely used. In related technologies, multiple participants use their own data to perform joint privacy computing, such as joint modeling, joint federated learning, etc. As a technology that can solve a variety of complex machine learning problems while protecting data privacy and security, the privacy-preserving tree model joint modeling technology has a wide range of applications in related technologies. The privacy-preserving tree model is a tree model computing method that protects the privacy of the data party's input data. This method usually uses privacy computing technologies such as secret sharing and homomorphic encryption to complete the model training and model prediction calculation of the tree model by two or more parties while protecting the privacy of the input data and the privacy of the computing process data.
[0029] The tree model mentioned above is also a decision tree model. For ease of understanding, the specific use and training methods of the decision tree model in plain text will be explained below.
[0030] The decision tree model generally exists in the form of a binary tree. It determines which leaf node a sample falls on based on the splitting conditions of the non-leaf nodes, and determines the score or classification of the sample based on the weight value of the leaf node. Figure 1 As shown, Figure 1 It is a simple decision tree. The content in the non-leaf node represents the splitting condition of the node, A is the identifier of a certain feature, and the number is the corresponding splitting threshold. The content in the leaf node represents the weight value of the leaf node. If the sample meets the condition that is less than the corresponding splitting threshold, it will fall into the node on the left side of the node, otherwise it will fall into the node on the right side until the sample falls into a leaf node. For example, if the feature value of feature A of a certain sample is 1, then according to the splitting condition judgment of each non-leaf node, it can be determined that the sample falls into the leftmost leaf node, then the score value of the sample is 1. It should be noted that Figure 1 What is shown is a simple decision tree model. The decision tree model actually used may not generate the judgment conditions of non-leaf nodes based on only one feature, but may also complete the classification or scoring of samples through multiple trees at the same time.
[0031] There are many training methods for tree models, generally including gradient boosting decision tree (GBDT), extreme gradient boosting tree (XGBoost), etc. GBDT will be briefly introduced here. GBDT is an iterative decision tree algorithm that combines gradient boosting and decision tree algorithms. Multiple decision trees are trained iteratively, and each decision tree is trained on the residual (the difference between the predicted value and the actual value) of the previous tree. During the training process, the structure and parameters of each decision tree are continuously optimized by the gradient boosting method to minimize the loss function of the model. In the prediction stage, the prediction results of multiple decision trees are summed or weighted averaged to obtain the final prediction result. Gradient decision trees are usually used to solve regression and classification problems. For example, a tree model can be trained to classify the financial credit risk of users, so as to quickly identify users with credit risks (such as fraud risks).
[0032] Specifically, the training process of the tree model is generally divided into six steps: feature sorting and bucketing, derivative calculation, bucket accumulation, gain value and split point calculation, sample division, and leaf node weight calculation.
[0033] Feature sorting and bucketing, that is, sorting samples according to the size of the eigenvalue, and determining the bucket corresponding to each sample according to the size of the eigenvalue. Different buckets correspond to different eigenvalue size ranges. By bucketing the eigenvalues, the efficiency of model training can be improved. For example, after the features are bucketed, the subsequent training process can determine the size relationship of the eigenvalues in units of buckets, which facilitates the calculation of the gain value (the specific calculation process is described later). And when calculating the split point, the split point can be selected from each bucket threshold instead of traversing all possible values of the eigenvalue to determine the split point.
[0034] In addition, when a sample has multiple types of features, it is necessary to divide the sample into buckets according to the feature values of different features, and determine the buckets corresponding to each feature value of the sample. For example, if the first feature value of the sample is 1, it is divided into bucket numbered 1, and if the second feature value of the sample is 10, it is divided into bucket numbered 10.
[0035] Through bucketing, we can get the bucket numbers corresponding to each sample. Each bucket corresponds to a unique bucket number, and the bucket numbers corresponding to different types of features do not overlap. For example, if a sample has m features, and each feature is divided into b buckets, then there are a total of m*b buckets, and the bucket numbers corresponding to each bucket in the m*b buckets do not overlap. For example, the first type of feature corresponds to the bucket numbered 1-b, the second type of feature corresponds to the bucket numbered b+1-2b, and so on.
[0036] After the bucketing is completed, each tree can be trained. As for the number of trees, multiple trees can be determined in advance, and each tree can be trained sequentially. In order to reduce the occurrence of overfitting, it is also possible to first train a tree based on the sample, and then use the residual of the tree to train the next tree until the residual is less than a certain value. When training each tree, the depth of the tree can be pre-specified.
[0037] The training process for the tth tree specifically includes:
[0038] 1. Determine the derivative value of each sample by derivatizing the loss function.
[0039] For ease of understanding, the derivation formula in XGBoost is first explained. It should be noted that the method of this specification can be used not only in XGBoost, but also in the training of tree models such as GBDT. Here, XGBoost is used as an example for explanation, which does not limit this specification.
[0040] The objective function can be expressed as formula (1):
[0041]
[0042] in, is the loss function, which is used to measure the quality of the model prediction results, Ω(f t ) is a regular term used to reduce the degree of overfitting of the model. n is the total number of samples involved in training, y i is the label of sample i, is the prediction result of the first t-1 trees, which is a constant value. t (x i ) is the variable to be confirmed, that is, the prediction result of the tth tree in the current training for the sample. γ,λ are hyperparameters, T is the tree f t The number of leaf nodes, w j is the weight value of the jth leaf node.
[0043] In the binary classification problem, the loss function l uses log loss, and the specific formula is shown in formula (2):
[0044]
[0045] By differentiating the loss function, we can obtain the first-order derivative value g and the second-order derivative value h of the function, as shown in formula (3):
[0046]
[0047] 2. For each non-leaf node, perform bucket accumulation, use the gain value to determine the split point and sample division.
[0048] (1) According to the sample partitioning result of the parent node of the non-leaf node, determine the samples that fall into the non-leaf node. And use the derivative values of the samples that fall into the non-leaf node to determine the derivative cumulative values corresponding to each bucket. That is, for each bucket, for the samples that belong to the bucket and fall into the current non-leaf node, add up the derivative values of these samples to obtain the derivative cumulative values corresponding to each bucket. The derivative cumulative values here include the first-order derivative cumulative value and the second-order derivative cumulative value. That is, we can get:
[0049]
[0050] Among them, G j is the cumulative value of the first-order derivative corresponding to the bucket numbered j, H j is the cumulative value of the second-order derivative corresponding to the bucket numbered j. The reason for calculating the cumulative value of the derivative will be explained below.
[0051] (2) Using the information gain method, determine the gain value corresponding to the bucket threshold of each bucket, and determine the maximum gain value. The bucket threshold of the bucket corresponding to the maximum gain value is used as the split point.
[0052] Next, the derivation of the gain value calculation formula will be explained.
[0053] We need to train the objective function towards the trend of gradient descent, and we need to approximate it according to the trend of the derivative. For the loss function, we can As x+Δx in Taylor expansion. According to Taylor expansion, And g i To use the loss function Find the first-order partial derivative, h i To use the loss function Find the second-order partial derivative. Therefore, by removing the constant value in the objective function, the objective function can be expanded into formula (5):
[0054]
[0055] in, Represents the weight value of the leaf node where the i-th sample falls in the tree model.
[0056] because With w j There is a corresponding mapping relationship: I j =i|q(x i ) = j, that is, sample x i It will eventually be classified into the jth leaf node (through I j Convert the traversal on the sample to the traversal on the leaf node), so that Obj (t) It is only related to the leaf nodes of the tree to be constructed. Since n>>T (T is the number of leaf nodes), there are a large number of repeated w values. Therefore, we use the derivative accumulation values G and H obtained by formula (4) to merge these identical w values and further update Obj (t) ,get:
[0057]
[0058] Formula (6) can be viewed as T equations about w j A quadratic function of one variable. Since the coefficient of the quadratic term (H j +λ)>0, therefore, each leaf node is When taking the minimum value, we can get:
[0059]
[0060] According to formula (7), the final leaf node weight value range is related to the structure and node distribution information. Next, we will explain how to construct the tree structure, that is, how to determine the split point of the tree model.
[0061] In the related art, split finding refers to determining the best split features and split thresholds for each node when building a decision tree to maximize the prediction accuracy of the model. The calculation of the split point is usually performed by measuring the change in purity or impurity of the node after the split. Indicators such as the Gini coefficient, information gain, or mean square error are usually used to evaluate the selection of the split point. The feature that reduces the impurity the most and the corresponding split point are selected as the split point. This is a better split for a single cut.
[0062] Next, the split point calculation method based on information gain will be explained.
[0063] In order to reduce the cost of trying to construct the tree structure, a greedy algorithm is used to initialize a tree with only one root node, and then traverse each leaf node according to The magnitude of the decrease (i.e. enumerate the current node splitting situation to obtain the maximum gain value), determine the splitting point, and expand the tree structure one by one. Therefore, as shown below, the Gain value formula (8) after the previous node split can be determined by subtraction:
[0064]
[0065] Among them, G L and G R Respectively represent the sum of the derivative values of samples whose eigenvalues are less than or equal to and greater than the splitting threshold of the splitting point.
[0066] The Gain values corresponding to each bucket threshold can be calculated, and the largest one can be selected as the split point corresponding to the non-leaf node.
[0067] 3. For each leaf node, use formula (7) to calculate the weight value of the leaf node.
[0068] In this way, the tree model can be trained.
[0069] After explaining the training method of the tree model in the plaintext case, we will next explain the problems encountered in calculating the splitting points when two parties jointly train the tree model in the privacy computing scenario.
[0070] Next, the calculation process of the split point will be explained. The two parties hold the derivative cumulative value slices corresponding to each bucket, and calculate the gain value based on the derivative cumulative value slices. Where λ is a hyperparameter constant, G L , H L They represent the sum of all derivatives of all current feature values t that are less than a bucket boundary value T of a certain feature, that is, Similarly,
[0071] In privacy computing, the derivative value is obtained based on the predicted value and the label value. In this scenario, generally only one party has the plain text of the label value. If the other party knows the derivative value of each intersection sample, it may be possible to infer the label value through the derivative value, resulting in privacy leakage. Therefore, in this method, the derivative accumulation value is encrypted in the form of secret sharing.
[0072] Therefore, in order to calculate the gain value corresponding to each bucket, it is necessary to use the derivative cumulative value shard corresponding to the bucket for each bucket, and jointly perform the addition, subtraction, multiplication and division of the secret sharing of both parties to obtain the calculation result of the final gain value shard.
[0073] After obtaining the gain values corresponding to each bucket number, it is necessary to obtain the maximum gain value among the gain values corresponding to each bucket number and the bucket number corresponding to the maximum gain value through the privacy maximum calculation method. Since the number of buckets is m, where m is the total number of features and bin is the number of buckets for each feature. For the secret share of m*bin gain values, the privacy maximum calculation method needs to perform (m*bin-1) secret comparisons and oblivious transmission operations. Among them, the secret comparison can obtain the ciphertext value of the comparison result of two ciphertext values, that is, the ciphertext value of the data that represents the size relationship between the two data. <s>, and then reuse <s>As a selection basis for oblivious transmission, the ciphertext of the larger value of the two values and the ciphertext of its bucket number are secretly obtained.
[0074] In the above method, the number of executions of secret sharing multiplication, division (hereinafter referred to as secret multiplication, secret division), secret comparison and oblivious transmission is all in the order of O(m*bin). Analysis of the basic operators of the above privacy computing shows that a secret division takes 20 times as long as a secret multiplication, and a secret comparison takes 1.5 times as long as a secret multiplication.
[0075] It can be seen that secret division is the main factor affecting the performance of split point calculation.
[0076] The related technology only optimizes the performance of basic operators (such as secret division), but lacks a method for optimizing the splitting point calculation algorithm itself.
[0077] Based on this, this specification proposes a method for determining the splitting point of a non-leaf node of a tree model. The first party and the second party obtain multiple intersection samples of the first party and the second party in advance through a jointly executed privacy intersection, and bucket the intersection samples. Further, the derivative cumulative value shards corresponding to each bucket are determined, and for each bucket, the gain value calculation formula after removing the constant term is used, and the two parties jointly calculate the gain value to obtain the gain value denominator shard and the gain value numerator shard. Further, based on the denominator and numerator shards of the gain value, the splitting point is determined.
[0078] For the gain value calculation formula, Consider different buckets. <G L >+ <G R > and <H L >+ <H R > is fixed in size, which is the sum of the derivative value slices of all intersection samples falling into the parent node. Therefore, is a constant term.
[0079] Based on this, the above method removes the constant term in the gain value accumulation formula, and performs a common denominator on the formula after removing the constant term. The gain value calculation formula after the common denominator is used to calculate the gain value denominator shard and the gain value numerator shard, thereby reducing the number of secret divisions by at least one time and speeding up the calculation efficiency of the splitting point.
[0080] Next, a method for determining the splitting point of a non-leaf node of a tree model shown in this specification will be described in detail. This method involves two parties, namely the first party and the second party. Next, this specification will be described based on the execution method of the first party. For the application scenario of this method, the tree model trained by this method can be used to classify the financial credit risk of users. For example, the first party can be a bank, and the second party can be a party that records the transaction data of each user.
[0081] Before executing the method steps shown in this specification, the two parties can first jointly train the tree model to determine the derivative accumulation value shards corresponding to each bucket. Specifically, the first party can obtain multiple intersection samples of the first party and the second party through a jointly executed privacy intersection in advance with the second party, and bucket the intersection samples according to the feature values, calculate the derivative values of each intersection sample, and perform bucket accumulation.
[0082] Next, the above process will be explained through a specific example. It should be noted that the following example does not limit this specification, and it is also possible to use other two methods in the related technology to jointly train the tree model.
[0083] First Party P A and the second party P B A sample set with different characteristics, where P A Own A Features, P B Own m B Features and label information Y, m = m A +m B The two parties can use the private set intersection (PSI) method to determine multiple intersection samples based on the primary key information of each sample. The primary key information is the unique identification information that can distinguish the sample, such as identity information, mobile phone number, etc. For the same sample, the primary key of the sample owned by different participants is the same. The intersection sample is the sample held by both parties.
[0084] After both parties obtain the intersection samples through private intersection, they can perform bucketing operations based on the feature values of each intersection sample. The specific meaning of bucketing operations is detailed in the previous article and will not be repeated here. For example, the first party can use m A The value of each feature in the features determines the bucket corresponding to each feature of each intersection sample. Each feature can be divided into b buckets.
[0085] Then, the two parties can continue to use the bucketed data to train the tree model. In the specific training process, the number of trees and the depth of the tree can be preset, and each tree can be trained separately. In addition, in order to prevent overfitting, after training a tree, it can also be determined whether to train the next tree based on the difference between the predicted value and the label value.
[0086] The training process for the kth tree may include:
[0087] First, the two parties can perform joint derivation based on the predicted value and label value of each intersection sample according to the formula shown in formula (3), and the two parties can each obtain: the ciphertext of the first-order derivative value and the second-order derivative value of each intersection sample.
[0088] The predicted value is the predicted value output by the first k-1 trees before training the tree. In an optional implementation, both the predicted value and the label value can be held by two participants in the form of secret sharing shards, and the two participants obtain the shards of the first-order derivative value and the second-order derivative value according to the four arithmetic operations of secret sharing.
[0089] Among them, Secret Sharing (SS) is a commonly used encryption data sharing primitive and is widely used in the privacy computing process. Its basic principle is to split a secret (such as a key) into multiple shares (shares), also called shards, and give the multiple shares to different people for safekeeping. Only when more than a threshold number of people merge their shares can the secret be recovered; no information about the secret can be recovered from shares less than the threshold number. In multi-party secure computing, the threshold number is usually the same as the number of participants. For two participants P0 and P1, arithmetic secret sharing is performed by splitting the plaintext value x of length l bits into two random number shares <x>0∈2 l and <x>1∈2 l Stored by P0 and P1 respectively, and satisfying x=( <x> 0+ <x>1) mod2 l For the convenience of description, this patent uses <x>Describe the ciphertext corresponding to the plaintext x, and the ciphertext <x>0 and <x>1 is held by P0 and P1 respectively. Secret sharing technology supports the four arithmetic operations of addition, subtraction, multiplication and division on the ciphertext.
[0090] Second, for each non-leaf node, you can perform the following steps:
[0091] (1) Both parties use a secret sharing-to-homomorphic encryption protocol to obtain the homomorphic ciphertext of the first-order derivative value and the homomorphic ciphertext of the second-order derivative value of each intersection sample.
[0092] Specifically, for the homomorphic ciphertext obtained by the first party, it can be: the second party locally encrypts the first-order derivative value fragment and the second-order derivative value fragment using its own public key, and sends the encrypted derivative value fragment to the first party. The first party performs a homomorphic addition operation on the homomorphic ciphertext of the received first-order derivative value fragment and the first-order derivative value fragment held locally to obtain the homomorphic ciphertext of the first-order derivative value. Finally, the first party can obtain: {[g i ] B ,[h i ] B } i∈[1,n] g is the first-order derivative value, h is the second-order derivative value, and n is the total number of intersection samples.
[0093] Homomorphic encryption is an encryption method commonly used in privacy computing. Compared with ordinary encryption, homomorphic encryption has the property of homomorphism, that is, it can perform calculations on encrypted data. For example, by performing homomorphic addition operations on the homomorphic encrypted ciphertext [a] of a and the unencrypted data b, the ciphertext [a+b] of a+b can be obtained, and a, b or a+b will not be leaked during the operation, and the decryption key does not need to be used.
[0094] (2) Both parties are local: Based on the bucket information of each intersection sample and the sample distribution of the current node, for each bucket, the derivative values of the intersection samples that fall into the current node and belong to the bucket are accumulated.
[0095] Specifically, as mentioned above, the sample distribution can be shared with the computational secret. After determining the split point of each non-leaf node, the sample distribution of the child nodes of each node needs to be updated. Therefore, since the sample distribution has been used to update the first-order derivative value and the second-order derivative value, the specific step can be: for each bucket, according to the bucket number of each intersection sample, accumulate {[g i ] B ,[h i ] B } i∈[1,n] In {[g i ] B ,[h i ] B } i∈[1,n] The corresponding plaintext in is 0, so even if it is accumulated, it will not affect the final result.
[0096] (3) Both parties obtain the shards of the accumulated results corresponding to each bucket according to the Homomorphic Encryption to Arithmetic Secret Sharing (H2A) protocol. <G i , q >, <H i,q } i∈[1,m],q∈[1,b] G represents the accumulated result of the first-order derivative value g, and h represents the accumulated result of the second-order derivative value.
[0097] Since the first party holds the m corresponding to the first party A The cumulative result of each bucket of each feature in the features, so H2A is needed here so that both parties can obtain: A The sharding of the cumulative result of each bucket of each feature in the features. Similarly, H2A is also needed to make: B The shards of the accumulated results of each bucket of each feature in the features. Then merge them to get { <G i,q >, <H i , q >} i∈[1,m],q∈[1,b] This corresponds to Figure 3 The two parties in the process determine the sum of the derivatives of their respective buckets, where the sum of the derivatives is the cumulative result shard mentioned above.
[0098] For ease of understanding, a specific example of H2A is given here, which does not limit the present specification.
[0099] Assume that the first party has the homomorphic ciphertext of the first data. The two parties generate random numbers f1 and f2 respectively. The second party homomorphically encrypts f2 and sends the homomorphic ciphertext of f2 to the first party. The first party generates two secret sharing shards of f1 and sends the shards to the other party. For example, if the first party generates shard 1 and shard 2 of f1, it can keep shard 1 and send shard 2 to the second party.
[0100] The first party can calculate the homomorphic ciphertext of the first data, the homomorphic ciphertext of f2, and the homomorphic sum of f1, and send the homomorphic sum to the second party for decryption. The second party obtains the plaintext of the sum of the first data, f1, and f2. Furthermore, the second party can obtain the plaintext of the sum of the first data and f1 based on the plaintext of f2 held locally, which is referred to as the second data here. Furthermore, the second party can generate two fragments of the second data and send the corresponding fragments to the first party. Further, the two parties use the fragments of the second data held by each party, subtract the fragment of f1, and obtain the fragments of the first data held by each party.
[0101] (4) Use the accumulated results corresponding to each bucket to calculate the split point.
[0102] The specific flow chart of this method can be shown as follows Figure 2 As shown, including:
[0103] Step 201, determine the derivative cumulative value slices corresponding to each bucket.
[0104] The derivative accumulation value includes the sum of the derivative values of the intersection samples whose characteristic values do not exceed the bucket threshold corresponding to the bucket, and the sum of the derivative values of the intersection samples whose characteristic values are greater than the bucket threshold corresponding to the bucket.
[0105] Specifically, in order to complete the calculation of the gain value, according to the gain value calculation formula in formula (8), first, for each bucket, it is necessary to obtain <gl>and <gr>For the convenience of explanation, for each bucket, the sum of the derivative values of the intersection samples whose eigenvalues do not exceed the bucket threshold corresponding to the bucket is called the left derivative cumulative value slice corresponding to the bucket. Correspondingly, the sum of the derivative values of the intersection samples whose eigenvalues are greater than the bucket threshold corresponding to the bucket is the right derivative cumulative value slice corresponding to the bucket.
[0106] The derivative values utilized may include a first-order derivative value g and a second-order derivative value h. Correspondingly, the derivative cumulative value slices may include derivative cumulative value slices corresponding to the first-order derivative and derivative cumulative value slices corresponding to the second-order derivative.
[0107] Correspondingly, the derivative cumulative value slices of each bucket include: first-order derivative left cumulative value slices, first-order right cumulative value slices, second-order derivative left cumulative value slices, and second-order right cumulative value slices. The first-order derivative left cumulative value is the sum of the first-order derivative values of the intersection samples whose characteristic values do not exceed the corresponding bucket threshold, that is, <gl>The first-order derivative right cumulative value is the sum of the first-order derivative values of the intersection samples whose eigenvalues are greater than the corresponding bucket threshold, that is, <gr>The left cumulative value of the second-order derivative is the sum of the second-order derivative values of the intersection samples whose eigenvalues do not exceed the corresponding bucket threshold, that is, <hl>The right cumulative value of the second-order derivative is the sum of the second-order derivative values of the intersection samples whose eigenvalues are greater than the corresponding bucket threshold, that is, <hr> The first-order derivative value and the second-order derivative value are obtained by respectively calculating the first-order derivative and the second-order derivative of the loss function. The specific calculation formulas of the first-order derivative and the second-order derivative are referred to above and will not be repeated here.
[0108] As for the specific acquisition method, it can be calculated according to the accumulated result slices of the derivative values obtained in the above steps.
[0109] Next, we will use the Figure 3 This step is illustrated by using the example in .
[0110] The two parties can first <G i,q >, <H i,q >} i∈[1,m],q∈[1,b] Calculate the derivative cumulative value slices corresponding to each bucket. For the first-order derivative, the qth bucket of the i-th feature, In this specification, the second-order derivative value is similar to this and will not be described in detail. b is the number of buckets for each feature, also referred to as bins in this specification. This step corresponds to Figure 3 The derivative accumulation value fragments corresponding to each bucket are calculated according to the bucket boundary value, that is, <G L >、 <G R >、 <G L > and <H R >. Among them, <G L > Equivalent to the previous <gl>, <G R > Equivalent to the previous <gr>.
[0111] Step 203, for each bucket, using the derivative cumulative value slice corresponding to the bucket, and jointly using the gain value calculation formula with the constant term removed by the second party, determine the gain value denominator slice and the gain value numerator slice corresponding to each bucket.
[0112] Specifically, in the information gain method, In the formula, for any bucket, that is, when i and k take any value (where i represents the type number of the feature and k represents the number of the bucket in the bucket corresponding to the feature), <G L [i][k]>+ <G R [i][k]> and <H L [i][k]>+ <H R [i][k]> are all fixed values. <G L [i][k]>+ <G R [i][k]> is the sum of the first-order derivative values of all intersection samples falling into the node, <H L [i][k]>+ <H R [i][k]> is the sum of the second-order derivative values of all intersection samples falling into the node. Therefore, the third term of the formula For each gain value Gain[i][k], it is the same and is a constant term and can be omitted.
[0113] That is, the constant term mentioned above is: data calculated based on the sum of the second-order derivative values of all intersection samples falling into the node and the sum of the first-order derivative values of all intersection samples falling into the node.
[0114] After removing the constant term, we can get Further denominating the formula, we get Recorded as The gain value denominator is sliced into<Gain_y> =( <H L >+λ)( <H R >+λ). The gain value numerator is divided into<Gain_x> = <G L > 2 ( <H R >+λ)+ <G R > 2 ( <H L >+λ).
[0115] In other words, the gain value denominator slice is calculated based on the second-order left derivative cumulative value and the second-order right derivative cumulative value. Specifically, it is calculated based on the secret sharing multiplication operation of the first value and the second value, the first value is the sum of the second-order left derivative cumulative value and the fixed value, and the second value is the sum of the second-order right derivative cumulative value and the fixed value.
[0116] The gain value numerator slice is calculated based on the first-order left derivative cumulative value, the first-order right derivative cumulative value, the second-order left derivative cumulative value, and the second-order right derivative cumulative value. Specifically, it is calculated based on the secret sharing addition operation of the third value and the fourth value, and the third value is calculated based on the square of the first-order left derivative cumulative value and the secret sharing multiplication operation of the second value. The fourth value is calculated based on the square of the first-order right derivative cumulative value and the secret sharing multiplication operation of the first value.
[0117] The above derivative cumulative values are all in the form of slices during specific calculations.
[0118] In addition, in the above gain value calculation formula, the number of multiplication operations for secret sharing is increased due to the common denominator. This makes it possible that in actual application, the plaintext value corresponding to the product is greater than the maximum plaintext threshold 2 T Where T is the maximum number of bits for storing secret shared plaintext and ciphertext (generally, T = 64 or 128), and the fractional bits of the fixed-point secret share occupy p bits.
[0119] In case of overflow, the high-bit overflow usually occurs, which will affect the final calculation result. In order to prevent the final gain value calculation result from being affected, it is necessary to control the overflow risk in the calculation process in advance. For example, all derivative accumulation value slices are truncated to the last multiple bits.
[0120] In addition, this specification also provides a solution for adaptively truncating the derivative cumulative value, which can more flexibly ensure the accuracy of the calculation result. Specifically, according to the length of the derivative cumulative value slice, it can be judged whether the corresponding plaintext will overflow after the secret sharing multiplication operation is performed, and in the case of possible overflow, the secret share truncation method is performed on the derivative cumulative value slice.
[0121] For ease of understanding, the secret share truncation method will be explained here first. Secret share truncation is mainly used to adjust the value range of secret sharing and data extraction operations related to bits. For example, if a ciphertext needs to be divided by an integer power of 2 or needs to be right-shifted by bits because the plaintext range overflows, it can be directly implemented by truncating the last digit and filling the high bits with random numbers. This process is called secret share truncation. During the truncation process, the highest bit and the lowest bit after truncation may cause errors due to the presence of carry in the ciphertext. Usually, the result obtained by secret comparison is used to repair the significant error of the highest bit, while ignoring the small error of the lowest bit.
[0122] In order to determine whether the plaintext of the product of each derivative cumulative value fragment has an overflow risk, the bits of the derivative cumulative value fragment are first analyzed. According to the derivative value range -1≤ <g>≤1 and 0≤ <h>≤0.25, we can get -n≤ <G L >, <G R >≤n and 0≤ <H L >, <H R >≤0.25n. Calculated based on the number of bits, <G L >, <G R >Value ratio <H L >, <H R >Percentage of special
[0123] For ease of understanding, the secret sharing of fixed-point numbers is explained here, and then the above bg and bh formulas are explained. Since privacy computing involves a large number of floating-point operations, the secret sharing ciphertext value cannot represent the data after the decimal point. If only the integer part of the floating-point number is taken for calculation, it will cause a large error. For example, if 0.5 and 1.25 are secret multiplied, if only the integer part is taken, the answer is 0*1=0, which is a large error.
[0124] To solve the above problems, the related art always proposes a secret sharing technology based on fixed-point numbers, that is, for a plaintext floating-point number x, before being encrypted by secret sharing, x will be amplified by 2 according to the predetermined floating-point number bit precision f. f Then encrypt it, that is, satisfy x*2 f =( <x> 0+ <x>1) mod 2 l , so that the value after the decimal point is expanded to an integer for calculation. f can represent the number of digits of the offset of the vertex number.
[0125] The addition and subtraction of fixed-point numbers are the same as general secret sharing, but the multiplication and division need to consider the change in the number of floating-point digits. For example, after executing the secret sharing multiplication, the number of decimal places will become 2f, and it is necessary to truncate the last f bits of the secret sharing value, that is, reduce the calculation result by 2. l For example, when f=3, the fixed-point number corresponding to 0.5 is 0.5*(2^3)=4, and the fixed-point number corresponding to 1.25 is 10. The two are secretly multiplied, and the plaintext result is 4*10=40. However, compared with the original plaintext, this result is expanded by 2^2f times, which exceeds the expansion of the fixed-point number by 2^f times, so it is necessary to reduce it by 2^f times again to become a new fixed-point number 5 (the plaintext corresponding to the fixed-point number 5 is 5 / (2^3)=0.625).
[0126] Therefore, only for fixed-point numbers, the number of bits of both need to be determined by the above formulas for bg and bh.
[0127] Furthermore, since the product of the derivative cumulative value slice and the derivative cumulative value slice needs to be calculated in the process of calculating the gain value slice, for the derivative cumulative value slice corresponding to each bucket, the following can be done: obtain the number of bits of the slice; when the number of bits of the slice is greater than half of the highest number of bits, determine the second difference between the number of bits of the slice and half of the highest number of bits; and use the secret share truncation method to remove the number of bits of the second difference at the end of the slice. Since the second difference may be the same for different first-order derivative cumulative value slices or different second-order derivative cumulative value slices, the second difference can be calculated only once.
[0128] Next, three types of overflow that may occur during the calculation of gain value denominator slicing and gain value numerator slicing are explained.
[0129] First, for the gain value numerator slice, it is necessary to calculate the square of the first-order left derivative cumulative value slice <G L > 2 and the square of the cumulative value of the first right derivative <G R > 2 Then the number of bits of the above-mentioned fragment can be bg, and the number of bits of the fragment is greater than half of the maximum number of bits, that is, In this case, there is a risk of overflow and a second difference needs to be calculated. And use the secret share truncation method to remove <G L > and <G R >The d1 bit at the end.
[0130] Otherwise, there is no overflow risk. In the above specific embodiment, d1 can be set to 0 without truncation. Then, the processed derivative accumulation value slices can be used for secret multiplication operations to calculate <G L > 2 and <G R > 2 .for <G L > 2 and <G R > 2 For , the maximum number of bits is b1=2(bg-d1)-f.
[0131] Second, for the gain value denominator slice, it is necessary to calculate the product of the first value and the second value mentioned above. Correspondingly, the number of bits of the slice can be bh, and the number of bits of the slice is greater than half of the maximum number of bits, that is, bh> There is a risk of overflow. A second difference can be calculated And use the secret share truncation method to remove <H L >+λ and <H R >+d2 bits at the end of λ.
[0132] Otherwise, there is no overflow risk, so let d2 = 0, and no truncation is required. Then, the processed derivative accumulation value slices can be used for secret multiplication to obtain the gain value denominator slices. Specifically,<Gain_y> =( <H L >+λ)( <H R >+λ). The maximum number of bits of the gain value denominator slice is b2=2(bh-d2)-f.
[0133] Third, for the gain value numerator sharding, it is necessary to use <G L > 2 , <G R > 2 and the second value ( <H R >+λ)、first value( <H L >+λ) to perform a secret multiplication operation. Therefore, for <G L > 2 , <G R > 2 ,like There is an overflow risk. And use the secret share truncation method to remove <G L > 2 , <G R > 2 Otherwise, set d3 = 0, no overflow risk, no need for truncation. Then, use the secret multiplication of fixed-point secret shares to calculate<Gain_x> The maximum number of bits is b3 = (b1-d3) + b2-f.
[0134] Through the above calculation, the gain value denominator slice and the gain value numerator slice can be obtained by the adaptive truncation method. The above method also corresponds to Figure 3 Adaptively truncated secret multiplication computation in<Gain_x> and<Gain_y> .
[0135] Step 205, through a secret comparison method jointly performed with the second party, the bucket number of the bucket whose gain value meets the preset condition is determined according to the gain value denominator slice and the gain value numerator slice corresponding to each bucket, so as to determine the corresponding split point according to the number.
[0136] Specifically, after obtaining the gain value denominator shard and the gain value numerator shard, the shards can be used for secret comparison to determine the gain value that meets the preset conditions, thereby determining the split point. Determining the corresponding split point according to the number, that is, using the feature and bucket threshold corresponding to the bucket number as the split feature and split threshold of the node, respectively.
[0137] The preset condition here may be: the gain value is greater than the preset value, the gain value is at least greater than a preset number of gain values, or the gain value that meets the preset condition is the maximum value of the gain values corresponding to each bucket.
[0138] Specifically, the gain value can be compared with a preset specific value. When a gain value greater than the specific value is obtained, it can be determined that the gain value is a gain value that meets the preset conditions. Alternatively, multiple gain values can be compared in batches. After a preset round of gain value comparisons, a gain value is selected from the gain values selected after the preset round as the gain value that meets the preset conditions. Alternatively, multiple rounds of comparisons are performed and the maximum gain value is selected as the gain value that meets the preset conditions.
[0139] The purpose of selecting a gain value that meets the preset conditions can be achieved through multiple secret comparisons. Among them, how to determine the larger value of the two gain values to be compared in the secret comparison process can be: using the gain value denominator slice and the gain value numerator slice corresponding to each bucket, jointly with the second party to calculate the gain value slice corresponding to each bucket; jointly executing the secret comparison method with the second party, determining the gain value slice whose gain value meets the conditions from the gain value slices corresponding to each bucket, and determining its corresponding bucket number.
[0140] That is, for each bucket, the gain value denominator slice and the gain value numerator slice are used to perform secret division in conjunction with the second party to calculate the gain value of each bucket, and then the gain value is secretly compared. Compared with the related art, which requires three secret divisions for each bucket gain value, this method only needs to calculate one secret division operation, and through the common denominator, secret multiplication replaces secret division, and the speed of secret multiplication is faster than that of secret division, which can improve efficiency.
[0141] In addition, this specification also provides a method for calculating a splitting point without division.
[0142] Specifically, in each secret comparison process, for two gain values to be compared, the following are performed: jointly performing a secret shared product operation with the second party, using the first gain value denominator shard and the second gain value numerator shard to determine the shard of the first result, and using the second gain value denominator shard and the first gain value numerator shard to determine the shard of the second result; the first gain value denominator shard and the first gain value numerator shard are shards corresponding to the first bucket, and the second gain value denominator shard and the second gain value numerator shard are shards corresponding to the second bucket; and jointly performing the secret comparison method with the second party, when the first result does not exceed the second result, determining that the comparison result is a larger gain value corresponding to the first bucket, and when the first result is greater than the second result, determining that the comparison result is a larger gain value corresponding to the second bucket.
[0143] In other words, in each secret multiplication, for the first gain value and the second gain value, considering that the gain value denominator slice is always greater than 0, the first gain value and the second gain value to be compared can be multiplied by the first gain value denominator and the second gain value denominator. That is, by comparing: the product of the first gain value numerator slice and the second gain value denominator slice, and the product of the first value-added denominator slice and the second gain value numerator, it can be determined which gain value is the larger gain value.
[0144] Using the specific example above, we can use the gain value denominator slices, gain value numerator slices, and the bucket numbers corresponding to each bucket to form an array {<Gain_x> ,<Gain_y> , <idx>}. In the bucket numbering here, the bucket numbers corresponding to different features are continuous. For example, for the first type of feature, the bucket numbers are from 0 to 9, then for the second type of feature, the bucket numbers are from 10 to 19, and so on. This step corresponds to Figure 3 The array Z in can be input into the secret maximum calculation function.
[0145] Remove two elements from the array, namely the secret shares corresponding to the two gain values to be compared, Gain0 and Gain1, which can be recorded as {<Gain_x0> ,<Gain_y0> , <idx0>}and{<Gain_x1> ,<Gain_y1> , <idx1>}. Then, according to the two parties <Gain_x0*<Gain_y1> and<Gain_x1*Gain_y0> The value determines the size of Gain0 and Gain1.
[0146] if<Gain_x0><Gain_y1> ≥<Gain_x1><Gain_y0> , it proves that Gain0 is the larger gain value. Otherwise, it is determined that Gain1 is the larger gain value.
[0147] The secret comparison result can be represented in the form of secret sharing. For example, if Gain0≥Gain1, then <res>= <0> ,otherwise <res>= <1> .
[0148] In the above method, res can be a Boolean secret sharing, and other values can be arithmetic secret sharing. Unique secret sharing satisfies XOR sharing, that is, <res> B Two shards of and Satisfy XOR operation The superscript B here indicates that it is a Boolean secret sharing, which can facilitate the inadvertent transmission later.
[0149] The above method uses secret multiplication to replace the cumbersome secret division operation. Although the above method adds O(m*bin) secret multiplication and OT operations (specifically how to add OT operations will be explained below), the computational complexity of secret division is much higher than that of secret multiplication and OT operations. Therefore, the above method can still further improve the computational efficiency.
[0150] In addition, as mentioned above, the method of this specification may cause a plaintext overflow problem of the secret multiplication result due to the addition of the secret multiplication operation. Therefore, for each gain value denominator slice or gain value numerator slice, it is also possible to: obtain the number of bits of the slice; when the number of bits of the slice is greater than half of the highest number of bits, determine the first difference between the number of bits of the slice and half of the highest number of bits; and use the secret share truncation method to remove the first difference number of bits at the end of the slice.
[0151] In other words, for the gain value denominator shard or the gain value numerator shard, the bits exceeding half of the maximum number of bits at the end of the shard are removed by the cryptographic share truncation method.
[0152] Let’s use the above example to explain it in detail.<Gain_x><Gain_y> When Then And truncate<Gain_x> The last d4 bit; if Then And truncate<Gain_y> Finally, by multiplying the fixed-point secret share secret, we can calculate<Gain_x><Gain_y> This step corresponds to Figure 3 Adaptively truncated secret multiplication computation in<Gain_x0><Gain_y1> and<Gain_x1><Gain_y0> .
[0153] In addition, when the gain value that meets the preset conditions is the maximum gain value, in the above method, since the maximum gain value needs to be selected from m*bin gain values, then (m*bin-1) times of selection based on<Gain_x> ,<Gain_y> To reduce the number of communication rounds, the related art generally performs multiple secret comparisons in one round. Then (m*bin-1) secret comparisons can be performed by at most The batch secret comparison operation performed in each round is also referred to as the first operation in this specification.
[0154] This specification also provides a method for accelerating in each round of the first operation.
[0155] Specifically, the multiple secret comparisons performed are completed by M rounds of first operations (where M can be the above-mentioned In some cases, M may be smaller than ), each round of the first operation includes a plurality of secret comparisons performed in parallel. For each round of the first operation, when the number of secret comparisons performed in parallel in the round of the first operation is greater than a first value, the first secret comparison scheme is adopted; when the number of secret comparisons performed in parallel in the round of the first operation does not exceed the first value, the second secret comparison scheme is adopted; the first value is the performance intersection point of the first secret comparison scheme and the second secret comparison scheme, and when the number of secret comparisons in a round is greater than the first value, the performance of the first secret comparison scheme is better than that of the second secret comparison scheme.
[0156] Specifically, the number of comparisons in multiple rounds of first operations is unbalanced. Specifically, in the first round of first operations, there are The data of each group are compared at the same time, and the maximum value is obtained respectively. Maximum values, divided into two groups, and so on, up to The maximum value can be obtained in the first operation of the round. In this process, the data size of the batch secret comparison of the first operation will follow an exponential decrease, that is, from the first round secret comparisons, decreasing to 1 secret comparison in the final round.
[0157] There are generally two types of secret comparison schemes in the related art. One type is the first secret comparison scheme, which requires many rounds of communication for secret comparison, fast communication speed for each round, and large overall communication volume. The other type is the second secret comparison scheme, which requires few rounds of communication for secret comparison, slow communication speed for each round, and small overall communication volume. When the scale of data for batch secret comparison is large, the first secret comparison scheme is more suitable, otherwise the second secret comparison scheme is more suitable.
[0158] Therefore, the above method proposes a threshold-based secret comparison scheme selection strategy, that is, after measuring the performance intersection point of the two secret comparison schemes according to the current environment, record the number X as the threshold. During the protocol execution, for batch secret comparisons with a number greater than X, a scheme with fast speed, large communication volume, and many rounds is used, otherwise, a secret comparison with slow speed, small communication volume, and few rounds is used. Figure 3 In the example, this step corresponds to the operation of selecting a strategy for comparing sizes based on a secret comparison scheme of a threshold.
[0159] The performance intersection point is the number of secret comparisons performed in batches when the performance of the first secret comparison scheme and the second secret comparison scheme are the same. The first secret comparison scheme may be a secret comparison based on GMW (Goldreich-Micali-Wigderson), and the second secret comparison scheme may be a secret comparison based on a garbled circuit (GC).
[0160] In this way, no matter the data size in the first operation of each round is large or small, a secret comparison scheme with better performance can be selected, thereby improving the overall calculation speed.
[0161] For each secret comparison, after obtaining the secret comparison result, since the secret comparison result exists in the form of Boolean secret sharing ciphertext, it is necessary to further: ensure that both parties cannot know the specific comparison result plaintext, so that both parties can obtain the gain value denominator shard and gain value numerator shard required for the next secret comparison, that is, the gain value numerator shard and gain value denominator shard of the larger gain value.
[0162] Here, a specific implementation method of obtaining the gain value denominator slice and the gain value numerator slice by an oblivious transmission method is proposed, and this implementation method does not limit this specification.
[0163] Specifically, the above step 205 may include: executing the following steps multiple times until a gain value that meets a preset condition is obtained:
[0164] The gain value denominator shard and the gain value numerator shard corresponding to the two buckets are used for secret comparison to obtain a secret comparison result; the gain value denominator shard and the gain value numerator shard corresponding to the two buckets are used as input, and the second party jointly performs two-choice oblivious transmission to obtain the gain value denominator shard and the gain value numerator shard corresponding to the bucket with a larger gain value represented by the secret comparison result, and the obtained gain value denominator shard and gain value numerator shard participate in the next secret comparison.
[0165] The secret comparison result may be in the form of a shard, specifically, the Boolean secret sharing shard mentioned above. The above method obtains the gain value denominator shard and the gain value numerator shard corresponding to the larger gain value through inadvertent transmission.
[0166] In addition, since the ciphertext of the split point needs to be output in the end, the bucket number shards corresponding to the two buckets can be used as input here, and the second party can jointly perform two-choice oblivious transmission to obtain the bucket number shards of the bucket with a larger gain value represented by the secret comparison result. The obtained bucket number shards participate in the next secret comparison.
[0167] That is, we also use oblivious transmission to obtain the bucket number corresponding to the larger gain value. In this way, we can finally determine the shard with the bucket number corresponding to the gain value that meets the preset conditions.<Max_idx> . Then we can use<Max_idx> =<max_i*bin+max_k> , determine the split point as the max_kth bucket of max_i.
[0168] In other words, both parties will<Gain_x0> ,<Gain_x1>}、{<Gain_y0> ,<Gain_y1>}and{ <idx0> , <idx1>} as the input data of three sets of two-choice oblivious transfer protocols, and use 4 to calculate the output <res> B As a basis for selection, obtain the secret share of the larger of the two gain values <Gain_x res >、 <Gain_y res > and <idx res >. This step also corresponds to Figure 3 The secret maximum value extraction method based on the oblivious transfer protocol is used to perform the secret comparison process. After the secret comparison is completed, the secret comparison result can be used to calculate the next secret maximum value.
[0169] For ease of understanding, we briefly introduce oblivious transfer. Oblivious transfer (OT) is a two-party cryptographic protocol widely used in nonlinear scenarios of secure multi-party computing. 1-out-of-2 OT is a common oblivious transfer. The specific process is that the data party (Receiver) has two secrets {m0, m1} as protocol inputs, and the requesting party (Sender) takes the target value c∈{0, 1} as input. In the end, the Sender can and only can obtain the secret value mc, while the Receiver cannot obtain any useful information.
[0170] As for the specific oblivious transmission method, since the target value c involved in the above oblivious transmission method is plain text, and the secret comparison result res here is cipher text, the above specific example will be used here to illustrate the method of oblivious transmission through cipher text in this specification.
[0171] Ciphertext<Gain_x0> ,<Gain_x1>}and <res>Take this as an example to illustrate: <Gain_y res > and <idx res The method of obtaining P is similar to that of P, so I will not go into details here. A Holds secret share {<Gain_x0> A ,<Gain_x1> A }and P B Holds secret share {<Gain_x0> B ,<Gain_x1> B }and First, P A Generate a random number r, if Then {<Gain_x0-r> A ,<Gain_x1-r> A } as the input of the first OT; otherwise, if Then swap the input<Gain_x0-r> A and<Gain_x1-r> A , and {<Gain_x1-r> A ,<Gain_x0-r> A } as the input for the first OT.
[0172] Correspondingly, P B Will As the first OT selection input, you can get <Gain_x res -r> A Here, when When , since 0 XOR 0 or 1 are both original values, Can be obtained smoothly <Gain_x res -r> A On the contrary, when When , since 1 XOR 0 or 1 are opposite values, and the input of OT is also inverted, we can also get <Gain_x res -r> A .
[0173] Similarly, for the second OT, both parties exchange identities to perform the OT operation, that is, P B Generate a random number r2, if Then {<Gain_x0-r2> B ,<Gain_x1-r2> B } as the input of the second OT; otherwise, if Then swap the positions of the two,<Gain_x1-r2> B ,<Gain_x0-r2> B } as the input of the second OT. A Will As the second OT selection input, we can get <Gain_x res -r2> B Finally, P A Will <Gain_x res -r2> B +r as new shard <Gain_x res > A , P B Will <Gain_x res -r> A +r2 as the new shard <Gain_x res > B The calculation is complete.
[0174] In this way, while ensuring that both parties cannot obtain the result of the secret comparison by obtaining the original shards and both parties hold the ciphertext of the secret comparison result, the acquisition of new shards with larger gain value denominator and gain value numerator is completed.
[0175] The above method can be used to obtain the bucket number ciphertext corresponding to the split point<Max_idx> , complete the calculation of the splitting points of non-leaf nodes.
[0176] Further, according to<max_idx> and m A ×b, determine which side the split point belongs to, and thus determine<max_idx> To which party the data is disclosed. The party that obtains max_idx further knows that the splitting boundary of the lth node is the jth bucket of the ith feature and the corresponding bucketing threshold based on max_idx=i×nb+j, and obtains the splitting condition of the corresponding node.
[0177] Based on the split point, the sample distribution of the child nodes corresponding to the non-leaf node is updated, and the sample distribution is used to update <g l > and <h l >, that is, the first-order derivative value and the second-order derivative value of each intersection sample corresponding to the lth node. Further, both parties can use The leaf node weight values are calculated jointly.
[0178] This specification also provides a split point determination device for a non-leaf node of a tree model, which is applied to a first party, and obtains a plurality of intersection samples of the first party and the second party by jointly executing a privacy intersection with the second party in advance, and performs bucket processing on the intersection samples according to the characteristic values; for each non-leaf node. Figure 4 As shown, the device comprises:
[0179] The derivative cumulative value shard determination module 410 is used to determine the derivative cumulative value shards corresponding to each bucket; the derivative cumulative value includes the sum of the derivative values of the intersection samples whose characteristic values do not exceed the bucket threshold corresponding to the bucket, and the sum of the derivative values of the intersection samples whose characteristic values are greater than the bucket threshold corresponding to the bucket;
[0180] A gain value calculation module 420 is used to determine, for each bucket, a gain value denominator slice and a gain value numerator slice corresponding to each bucket by using the derivative cumulative value slice corresponding to the bucket and jointly using the gain value calculation formula with the constant term removed with the second party;
[0181] The secret comparison module 430 is used to determine the bucket number of the bucket whose gain value meets the preset conditions according to the gain value denominator slice and the gain value numerator slice corresponding to each bucket through a secret comparison method jointly executed with the second party, so as to determine the corresponding split point according to the number.
[0182] In an optional embodiment, the secret comparison module 430 is specifically used to jointly perform a secret sharing product operation with the second party, determine the shard of the first result using the first gain value denominator shard and the second gain value numerator shard, and determine the shard of the second result using the second gain value denominator shard and the first gain value numerator shard; the first gain value denominator shard and the first gain value numerator shard are shards corresponding to the first bucket, and the second gain value denominator shard and the second gain value numerator shard are shards corresponding to the second bucket; jointly perform the secret comparison method with the second party, and when the first result does not exceed the second result, determine the comparison result as representing that the gain value corresponding to the first bucket is larger, and when the first result is greater than the second result, determine the comparison result as representing that the gain value of the second bucket is larger.
[0183] In an optional embodiment, the above-mentioned device also includes a secret share truncation module 440 (not shown in the figure), which is used to obtain the number of bits of the slice; when the number of bits of the slice is greater than half of the highest number of bits, determine the first difference between the number of bits of the slice and half of the highest number of bits; and use the secret share truncation method to remove the first difference number of bits at the end of the slice.
[0184] In an optional implementation, the secret comparison module 430 is specifically used to use the gain value denominator slice and the gain value numerator slice corresponding to each bucket to jointly calculate the gain value slice corresponding to each bucket with the second party; jointly execute the secret comparison method with the second party to determine the gain value slice whose gain value meets the conditions from the gain value slices corresponding to each bucket, and determine the corresponding bucket number.
[0185] In an optional implementation, the secret comparison module 430 is specifically used to execute the following steps multiple times until a gain value that meets preset conditions is obtained: a secret comparison is performed using the gain value denominator slice and the gain value numerator slice corresponding to the two buckets to obtain a secret comparison result; the gain value denominator slice and the gain value numerator slice corresponding to the two buckets are used as input, and a two-choice inadvertent transmission is performed jointly with the second party to obtain the gain value denominator slice and the gain value numerator slice corresponding to the bucket with a larger gain value represented by the secret comparison result, and the obtained gain value denominator slice and gain value numerator slice participate in the next secret comparison.
[0186] In an optional embodiment, the first party and the second party hold bucket number slices corresponding to each bucket, and also include an oblivious transmission module 450 (not shown in the figure), which is used to take the bucket number slices corresponding to the two buckets as input, and jointly perform a two-choice oblivious transmission with the second party to obtain the bucket number slice of the bucket with a larger gain value represented by the secret comparison result, and the obtained bucket number slice participates in the next secret comparison.
[0187] In an optional implementation, the multiple secret comparisons are performed through M rounds of first operations, and each round of first operations includes multiple secret comparisons performed in parallel; for each round of first operations, when the number of secret comparisons performed in parallel in the round of first operations is greater than a first value, the first secret comparison scheme is adopted; when the number of secret comparisons performed in parallel in the round of first operations does not exceed the first value, the second secret comparison scheme is adopted; the first value is the performance intersection point of the first secret comparison scheme and the second secret comparison scheme, and when the number of secret comparisons in a round is greater than the first value, the performance of the first secret comparison scheme is better than that of the second secret comparison scheme.
[0188] In an optional implementation, the secret share truncation module 440 (not shown in the figure) is also used to obtain the number of bits of the slice; when the number of bits of the slice is greater than half of the highest number of bits, determine the second difference between the number of bits of the slice and half of the highest number of bits; and use the secret share truncation method to remove the number of bits of the second difference at the end of the slice.
[0189] In an optional embodiment, the derivative cumulative value shards include: first-order derivative left cumulative value shards, first-order right cumulative value shards, second-order derivative left cumulative value shards, and second-order derivative right cumulative value shards; the first-order derivative left cumulative value is the sum of the first-order derivative values of the intersection samples whose eigenvalues do not exceed the corresponding bucket threshold, the first-order derivative right cumulative value is the sum of the first-order derivative values of the intersection samples whose eigenvalues are greater than the corresponding bucket threshold, the second-order derivative left cumulative value is the sum of the second-order derivative values of the intersection samples whose eigenvalues do not exceed the corresponding bucket threshold, and the second-order derivative right cumulative value is the sum of the second-order derivative values of the intersection samples whose eigenvalues are greater than the corresponding bucket threshold. The first-order derivative value and the second-order derivative value are obtained by respectively taking the first-order derivative and the second-order derivative of the loss function.
[0190] In the 1990s, it was very clear whether the improvement of a technology was a hardware improvement (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements in the method flow today can be regarded as direct improvements in the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs. The original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, 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, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0191] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0192] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, this specification does not exclude that with the development of computer technology in the future, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0193] Although one or more embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.
[0194] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0195] This specification is described with reference to the flowcharts and / or block diagrams of the methods, apparatus (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0196] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0197] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0198] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0199] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0200] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. 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, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0201] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present 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.
[0202] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0203] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference term "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, in the absence of mutual contradiction, a person skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0204] The above description is only an example of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. For those skilled in the art, one or more embodiments of the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims.< / res> < / res> < / idx0> < / res> < / res> < / res> < / idx> < / x> < / x> < / h> < / g> < / gr> < / gl> < / hl> < / gr> < / gl> < / gr> < / gl> < / x> < / x> < / x> < / x> < / x> < / x> < / x> < / s> < / s> < / gain> < / gain>
Claims
1. A method for determining a split point of a non-leaf node of a tree model, applied to a first party, the method also involves a second party, in advance, obtaining a plurality of intersection samples of the first party and the second party by jointly performing a privacy intersection with the second party, and performing bucket processing on the intersection samples according to feature values; For each non-leaf node, the method includes: Determine the derivative cumulative value slices corresponding to each bucket; the derivative cumulative value includes the sum of the derivative values of the intersection samples whose characteristic values do not exceed the bucket threshold corresponding to the bucket, and the sum of the derivative values of the intersection samples whose characteristic values are greater than the bucket threshold corresponding to the bucket; For each bucket, the derivative cumulative value slice corresponding to the bucket is used, and the gain value calculation formula with the constant term removed is used in conjunction with the second party to determine the gain value denominator slice and the gain value numerator slice corresponding to each bucket; By using a secret comparison method jointly executed with the second party, the number of the bucket whose gain value meets the preset condition is determined according to the gain value denominator slice and the gain value numerator slice corresponding to each bucket, so as to determine the corresponding split point according to the number.
2. According to the method of claim 1, the execution process of each secret comparison includes: and jointly perform a secret sharing product operation with the second party, determine the shard of the first result using the first gain value denominator shard and the second gain value numerator shard, and determine the shard of the second result using the second gain value denominator shard and the first gain value numerator shard; the first gain value denominator shard and the first gain value numerator shard are shards corresponding to the first bucket, and the second gain value denominator shard and the second gain value numerator shard are shards corresponding to the second bucket; A secret comparison method is jointly executed with a second party. When the first result does not exceed the second result, the comparison result is determined to be a larger gain value corresponding to the first bucket. When the first result is greater than the second result, the comparison result is determined to be a larger gain value corresponding to the second bucket.
3. The method according to claim 2, for each gain value denominator slice or gain value numerator slice, the method further comprises: Get the number of bits of the fragment; In the case where the number of bits of the fragment is greater than half of the highest number of bits, determining a first difference between the number of bits of the fragment and half of the highest number of bits; The first difference number of bits at the end of the slice is removed using the secret share truncation method.
4. The method according to claim 1, wherein the secret comparison method jointly performed with the second party determines the number of the bucket of the bucket whose gain value meets the preset condition according to the gain value denominator slice and the gain value numerator slice corresponding to each bucket, comprising: Perform the following steps multiple times until a gain value that meets the preset conditions is obtained: The gain value denominator slice and the gain value numerator slice corresponding to the two buckets are used to perform secret comparison to obtain a secret comparison result; The gain value denominator shard and gain value numerator shard corresponding to the two buckets are taken as input, and the second party jointly performs two-choice oblivious transmission to obtain the gain value denominator shard and gain value numerator shard corresponding to the bucket with a larger gain value represented by the secret comparison result. The obtained gain value denominator shard and gain value numerator shard participate in the next secret comparison.
5. The method according to claim 4, wherein the first party and the second party hold bucket number shards corresponding to each bucket, and the method further comprises: The bucket number shards corresponding to the two buckets are taken as input, and the two-choice oblivious transmission is performed jointly with the second party to obtain the bucket number shard of the bucket with a larger gain value represented by the secret comparison result, and the obtained bucket number shards are involved in the next secret comparison.
6. The method according to claim 4, wherein: The multiple secret comparisons are performed through M rounds of first operations, each round of first operations includes multiple secret comparisons performed in parallel; for each round of first operations, when the number of secret comparisons performed in parallel in the round of first operations is greater than a first value, a first secret comparison scheme is adopted; when the number of secret comparisons performed in parallel in the round of first operations does not exceed the first value, a second secret comparison scheme is adopted; the first value is the performance intersection point of the first secret comparison scheme and the second secret comparison scheme, and when the number of secret comparisons in a round is greater than the first value, the performance of the first secret comparison scheme is better than that of the second secret comparison scheme.
7. The method according to claim 1, for each derivative cumulative value shard corresponding to each bucket, the method further comprises: Get the number of bits of the fragment; When the number of bits of the fragment is greater than half of the highest number of bits, determining a second difference between the number of bits of the fragment and half of the highest number of bits; The secret share truncation method is used to remove the second difference number of bits at the end of the slice.
8. The method according to claim 1, wherein the derivative accumulation value slicing comprises: The first-order derivative left cumulative value slicing, the first-order derivative right cumulative value slicing, the second-order derivative left cumulative value slicing, the second-order derivative right cumulative value slicing; The left cumulative value of the first-order derivative is the sum of the first-order derivative values of the intersection samples whose eigenvalues do not exceed the corresponding bucket threshold, the right cumulative value of the first-order derivative is the sum of the first-order derivative values of the intersection samples whose eigenvalues are greater than the corresponding bucket threshold, the left cumulative value of the second-order derivative is the sum of the second-order derivative values of the intersection samples whose eigenvalues do not exceed the corresponding bucket threshold, and the right cumulative value of the second-order derivative is the sum of the second-order derivative values of the intersection samples whose eigenvalues are greater than the corresponding bucket threshold. The first-order derivative value and the second-order derivative value are obtained by respectively taking the first-order derivative and the second-order derivative of the loss function.
9. According to the method described in any one of claims 1 to 8, the gain value that meets the preset conditions is the maximum value of the gain values corresponding to each bucket.
10. A computing device comprising a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 9 is implemented.