A horizontal federated gradient boosting tree optimization method based on randomized greedy algorithm
By using the stochastic greedy algorithm and the EPS i l on-greedy algorithm in the federated gradient boosting tree algorithm, the histogram information transmission is optimized, the problems of high network bandwidth and privacy leakage are solved, and the training efficiency and security are improved.
Patent Information
- Application Number
- CN202110046246.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-14
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-01-14
AI Technical Summary
The existing horizontal federated gradient boosting tree algorithm needs to frequently transmit histogram information, resulting in high network bandwidth and training efficiency affected by network stability, and there is a risk of user privacy leakage. Although the introduction of a privacy protection scheme can reduce the possibility of leakage, it will increase the local Compute burden and reduce training efficiency.
The horizontal federated gradient boosting tree optimization method based on the stochastic greedy algorithm is adopted. The coordinator sets the gradient boosting tree model parameters, and determines the splitting characteristics and values through the optimal split point algorithm and the eps i l on-greedy algorithm to reduce information transmission and improve training efficiency. , reduce the risk of privacy leakage.
It effectively reduces network bandwidth requirements, improves training efficiency, reduces the risk of privacy leakage by randomly selecting segmentation features, and improves the overall federated learning performance.
Smart Images

Figure CN114841374B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of federated learning technology, and in particular to a horizontal federated gradient boosting tree optimization method based on a random greedy algorithm. Background Art
[0002] Federated learning is a machine learning framework that can effectively help multiple institutions use data and conduct machine learning modeling while meeting the requirements of user privacy protection, data security, and government regulations. It allows participants to jointly model based on unshared data, technically breaking down data silos and achieving AI collaboration. In this framework, virtual models are designed to solve the problem of collaboration between different data owners without exchanging data. The virtual model is the optimal model for all parties to aggregate data together, and each region serves local goals based on the model. Federated learning requires that the modeling results should be infinitely close to the traditional model, that is, the result of bringing together data from multiple data owners for modeling. Under the federal mechanism, the identity and status of each participant are the same, and can be built Establish a shared data strategy. The greedy algorithm is a simpler and faster design technology for certain optimal solution problems. The characteristic of the greedy algorithm is that it proceeds step by step, often based on the current situation to make the best choice according to a certain optimization measure, without considering various possible overall situations, saving a lot of time that must be spent on exhausting all possibilities to find the optimal solution. The greedy algorithm uses a top-down, iterative method to make successive greedy choices. Each time a greedy choice is made, the problem is simplified into a smaller sub-problem. Through each greedy choice, an optimal solution to the problem can be obtained. Although it is necessary to ensure that the local optimal solution can be obtained at each step, the resulting global solution is sometimes not necessarily the optimal, so the greedy algorithm should not backtrack.
[0003] However, the existing horizontal federated gradient boosting tree algorithm requires each participant and coordinator to frequently transmit histogram information, which places high requirements on the network bandwidth of the coordinator. The training efficiency is easily affected by the stability of the network. In addition, since the transmitted histogram information contains user information, there is a risk of leaking user privacy. After introducing privacy protection schemes such as multi-party secure computing, homomorphic encryption, and secret sharing, the possibility of user privacy leakage can be reduced, but it will increase the local computing burden and reduce training efficiency. Summary of the invention
[0004] The purpose of the present invention is to provide a horizontal federated gradient boosting tree optimization method based on a randomized greedy algorithm to solve the problem that the existing horizontal federated gradient boosting tree algorithm proposed in the above background technology requires each participant and coordinator to frequently transmit histogram information, which has high requirements on the network bandwidth of the coordinator, and the training efficiency is easily affected by the stability of the network. In addition, since the transmitted histogram information contains user information, there is a risk of leaking user privacy. After introducing privacy protection schemes such as multi-party secure computing, homomorphic encryption, and secret sharing, the possibility of user privacy leakage can be reduced, but it will increase the local computing burden and reduce the training efficiency.
[0005] To achieve the above object, the present invention provides the following technical solution: a horizontal federated gradient boosting tree optimization method based on a random greedy algorithm, comprising the following steps:
[0006] Step 1: The coordinator sets the relevant parameters of the gradient boosting tree model, including but not limited to the maximum number of decision trees T, the maximum tree depth L, the initial prediction value base, etc., and sends it to each participant p i .
[0007] Step 2: Set the tree counter t=1.
[0008] Step 3: For each participant p i , initialize the k-th tree training target where y 0 =y,
[0009] Step 4: Set the tree level counter l=1.
[0010] Step 5: Set the current layer node counter n=1.
[0011] Step 6: For each participant p i , according to the data of the local current node n, according to the optimal split point algorithm, determine the split point of the current node, and send the split point information to the coordinator.
[0012] Step 7: The coordinator counts the cutting point information of all participants and determines the segmentation feature f and segmentation value v according to the eps il on-greedy algorithm.
[0013] Step 8: The coordinator sends the finalized segmentation information, including but not limited to the segmentation feature f and segmentation value v, to each participant.
[0014] Step 9: Each participant splits the current node data set according to the split feature f and split value v, and assigns the new split data to the child nodes.
[0015] Step 10: Let n=n+1. If n is less than or equal to the maximum number of nodes in the current layer, continue with step 6; otherwise, continue with the next step.
[0016] Step 11: Reset the node information of the current layer according to the child nodes of the l-layer node, and set l=l+1. If l is less than or equal to the maximum depth L of the tree, continue with step 5; otherwise, continue with the next step.
[0017] Step 12: Let t = t + 1. If t is greater than or equal to the maximum number of decision trees T, continue with step 3; otherwise, end.
[0018] Preferably, the optimal segmentation point algorithm in step six is:
[0019] 1. Determine the segmentation objective function: including but not limited to the following objective functions,
[0020] Information gain: Information gain is the most commonly used indicator to measure the purity of a sample set. Assume that there are K types of samples in the node sample set D, and the proportion of the kth type of samples is p k , then the information entropy of D is defined as
[0021]
[0022] Assuming that the node is divided into V possible values according to attribute a, the information gain is defined as
[0023]
[0024] Information gain rate:
[0025]
[0026] in
[0027]
[0028] Gini coefficient:
[0029]
[0030]
[0031] Structural coefficient:
[0032]
[0033] Among them G L is the first-order gradient sum of the data set divided into the left node after the data set is split according to the split point, H L is the second-order gradient sum of the left node data set, G R and H Ris the gradient information and of the corresponding right node, γ is the tree model complexity penalty term, and λ is the second-order regular term.
[0034] 2. Determine the candidate list of segmentation values: Determine the list of segmentation values based on the current node data distribution; the segmentation value includes the segmentation feature and the segmentation feature value; the segmentation value list can be determined by the following method:
[0035] All values of all features in the dataset;
[0036] Discrete split points are determined for the value range of each feature in the data set. The split points can be selected based on the distribution of the data and evenly distributed within the value range. The uniformity is reflected in the fact that the amount of data between the split points is approximately equal or the sum of the second-order gradients is approximately equal.
[0037] Traverse the candidate list of split values and find the split point that optimizes the objective function.
[0038] Preferably, the Epsilon greedy algorithm in step 7: for each participant of node n, the node segmentation point information is sent to the coordinator, including the segmentation feature f i , split value v i , the number of node samples N i , structural coefficient; where i represents each participant;
[0039] The coordinator determines the optimal segmentation feature f based on the segmentation information of each participant and the maximum number principle. max Let X be a random number uniformly distributed between [0,1], randomly sample X to obtain x; if x <= eps il on, randomly select one of the segmentation features of each participant as the global segmentation feature; otherwise, select f max is the global segmentation feature;
[0040] Each participant recalculates the segmentation information based on the global segmentation features and sends it to the coordinator;
[0041] The coordinator determines the global split value according to the following formula: If the total number of participants is P;
[0042]
[0043] Distribute the split value to each participant and perform node splitting.
[0044] Preferably, the horizontal federated learning is a distributed structure of federated learning, in which the data features of each distributed node are the same but the sample spaces are different.
[0045] Preferably, the gradient boosting tree algorithm is an integrated model based on gradient boosting and decision tree.
[0046] Preferably, the decision tree is a basic model of the gradient boosting tree model, and based on the tree structure, the prediction direction of the sample is determined by given features at the node.
[0047] Preferably, the split point is a split position at a non-leaf node in the decision tree where data is split.
[0048] Preferably, the histogram is statistical information representing first-order gradients and second-order gradients in the node data.
[0049] Preferably, the input device may be one or more data terminals such as computers and mobile phones, or mobile terminals.
[0050] Preferably, the input device comprises a processor, and when executed by the processor, the algorithm of any one of steps one to twelve is implemented.
[0051] Compared with the prior art, the beneficial effects of the present invention are as follows: the horizontal federated gradient boosting tree optimization method based on the random greedy algorithm sets the relevant parameters of the gradient boosting tree model through the coordinator, including but not limited to the maximum number of decision trees T, the maximum tree depth L, the initial prediction value base, etc., and sends them to each participating party p i , let the tree counter t = 1, for each participant p i , let the tree layer counter l = 1, let the current layer node counter n = 1, for each participant p i According to the data of the local current node n, according to the optimal split point algorithm, the split point of the current node is determined, and the split point information is sent to the coordinator, who counts the cutting point information of all participants, according to eps il on-greedy algorithm, determine the segmentation feature f and the segmentation value v, the coordinator will finally determine the segmentation information, including but not limited to the segmentation feature f and the segmentation value v, to each participant, each participant divides the current node data set according to the segmentation feature f and the segmentation value v, and assigns the new segmentation data to the child node, let n=n+1, if n is less than or equal to the maximum number of nodes in the current layer, continue to step six, otherwise, continue to the next step, reset the current layer node information according to the child node of the l-layer node, let l=l+1, if l is less than or equal to the maximum depth L of the tree, continue to step five, otherwise, continue to the next step, let t=t+1, if t is greater than or equal to the maximum number of decision trees T, continue to step 3, otherwise, end, the horizontal federated learning supported by the benefit includes participants and coordinators, the participants have local data, the coordinators do not have any data, and are the center for information aggregation of participants. The participants calculate histograms respectively and send the histograms to the coordinators. After the coordinators summarize all the histogram information, they find the optimal segmentation point according to the greedy algorithm, and then share it with each participant to work with the internal algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 This is a schematic diagram of the architecture of the horizontal federated gradient boosting tree optimization method based on the random greedy algorithm of the present invention;
[0053] Figure 2 It is a schematic diagram of the steps of the horizontal federated gradient boosting tree optimization method based on the random greedy algorithm of the present invention;
[0054] Figure 3 It is a schematic diagram of judging the horizontal federated gradient boosting tree optimization method based on the random greedy algorithm of the present invention. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] See also Figure 1-3 The present invention provides a technical solution: a horizontal federated gradient boosting tree optimization method based on a random greedy algorithm, comprising the following steps:
[0057] Step 1: The coordinator sets the relevant parameters of the gradient boosting tree model, including but not limited to the maximum number of decision trees T, the maximum tree depth L, the initial prediction value base, etc., and sends it to each participant p i .
[0058] Step 2: Set the tree counter t=1.
[0059] Step 3: For each participant p i , initialize the k-th tree training target where y 0 =y,
[0060] Step 4: Set the tree level counter l=1.
[0061] Step 5: Set the current layer node counter n=1.
[0062] Step 6: For each participant p i , according to the data of the local current node n, according to the optimal split point algorithm, determine the split point of the current node, and send the split point information to the coordinator.
[0063] Step 7: The coordinator counts the cutting point information of all participants and determines the segmentation feature f and segmentation value v according to the eps il on-greedy algorithm.
[0064] Step 8: The coordinator sends the finalized segmentation information, including but not limited to the segmentation feature f and segmentation value v, to each participant.
[0065] Step 9: Each participant splits the current node data set according to the split feature f and split value v, and assigns the new split data to the child nodes.
[0066] Step 10: Let n=n+1. If n is less than or equal to the maximum number of nodes in the current layer, continue with step 6; otherwise, continue with the next step.
[0067] Step 11: Reset the node information of the current layer according to the child nodes of the l-layer node, and set l=l+1. If l is less than or equal to the maximum depth L of the tree, continue with step 5; otherwise, continue with the next step.
[0068] Step 12: Let t = t + 1. If t is greater than or equal to the maximum number of decision trees T, continue to step 3; otherwise, end;
[0069] Furthermore, the optimal segmentation point algorithm in step six is:
[0070] 1. Determine the segmentation objective function: including but not limited to the following objective functions,
[0071] Information gain: Information gain is the most commonly used indicator to measure the purity of a sample set. Assume that there are K types of samples in the node sample set D, and the proportion of the kth type of samples is p k , then the information entropy of D is defined as
[0072]
[0073] Assuming that the node is divided into V possible values according to attribute a, the information gain is defined as
[0074]
[0075] Information gain rate:
[0076]
[0077] in
[0078]
[0079] Gini coefficient:
[0080]
[0081] Structural coefficient:
[0082]
[0083] Among them G Lis the first-order gradient sum of the data set divided into the left node after the data set is split according to the split point, H L is the second-order gradient sum of the left node data set, G R and H R is the gradient information and of the corresponding right node, γ is the tree model complexity penalty term, and λ is the second-order regular term.
[0084] 2. Determine the candidate list of segmentation values: Determine the list of segmentation values based on the current node data distribution; the segmentation value includes the segmentation feature and the segmentation feature value; the segmentation value list can be determined by the following method:
[0085] All values of all features in the dataset;
[0086] Discrete split points are determined for the value range of each feature in the data set. The split points can be selected based on the distribution of the data and evenly distributed within the value range. The uniformity is reflected in the fact that the amount of data between the split points is approximately equal or the sum of the second-order gradients is approximately equal.
[0087] Traverse the candidate list of split values to find the split point that optimizes the objective function;
[0088] Furthermore, the Epsilon greedy algorithm in step 7: for node n
[0089] Each participant sends the node segmentation point information to the coordinator, including the segmentation feature f i , split value v i ,
[0090] Number of node samples N i , structural coefficient, where i represents each participant;
[0091] The coordinator determines the optimal segmentation feature f based on the segmentation information of each participant and the maximum number principle. max
[0092] Let X be a random number uniformly distributed between [0,1], randomly sample X to obtain x; if x <= eps il on, randomly select one of the segmentation features of each participant as the global segmentation feature;
[0093] Otherwise, select f max is the global segmentation feature;
[0094] Each participant recalculates the segmentation information based on the global segmentation features and sends it to the coordinator;
[0095] The coordinator determines the global split value according to the following formula: If the total number of participants is P;
[0096]
[0097] Distribute the split value to each participant and perform node splitting;
[0098] Furthermore, horizontal federated learning is a distributed structure of federated learning, in which the data features of each distributed node are the same but the sample space is different, which allows for better comparison work;
[0099] Furthermore, the gradient boosting tree algorithm is an integrated model based on gradient boosting and decision trees, which works better;
[0100] Furthermore, the decision tree is the basic model of the gradient boosting tree model. Based on the tree structure, the prediction direction of the sample is determined by the given features at the node, which can better help prediction;
[0101] Furthermore, the split point is the location where the data is split at the non-leaf node in the decision tree, which allows for better segmentation;
[0102] Furthermore, the histogram represents the statistical information of the first-order gradient and the second-order gradient in the node data, which is more intuitive;
[0103] Furthermore, the input device may be one or more data terminals such as computers, mobile phones, or mobile terminals for better data input;
[0104] Furthermore, the input device includes a processor, and when executed by the processor, any algorithm in steps one to twelve is implemented.
[0105] Working principle: Step 1: The coordinator sets the relevant parameters of the gradient boosting tree model, including but not limited to the maximum number of decision trees T, the maximum tree depth L, the initial prediction value base, etc., and sends it to each participant p i , Step 2: Let the tree counter t = 1, Step 3: For each participant p i , initialize the k-th tree training target where y 0 =y, Step 4: Set the tree layer counter l = 1, Step 5: Set the current layer node counter n = 1, Step 6: For each participant p i ,According to the data of the local current node n, according to the optimal segmentation point algorithm, determine the segmentation point of the current node, and send the segmentation point information to the coordinator, 1. Determine the segmentation objective function: including but not limited to the following objective functions,
[0106] Information gain: Information gain is the most commonly used indicator to measure the purity of a sample set. Assume that there are K types of samples in the node sample set D, and the proportion of the kth type of samples is p k , then the information entropy of D is defined as
[0107]
[0108] Assuming that the node is divided into V possible values according to attribute a, the information gain is defined as
[0109]
[0110] Information gain rate:
[0111]
[0112] in
[0113]
[0114] Gini coefficient:
[0115]
[0116] Structural coefficient:
[0117]
[0118] Among them G L is the first-order gradient sum of the data set divided into the left node after the data set is split according to the split point, H L is the second-order gradient sum of the left node data set, G R and H R is the gradient information and of the corresponding right node, γ is the tree model complexity penalty term, λ is the second-order regular term,
[0119] 2. Determine the candidate list of segmentation values: Determine the list of segmentation values based on the current node data distribution; the segmentation value includes the segmentation feature and the segmentation feature value; the segmentation value list can be determined by the following method:
[0120] All values of all features in the dataset;
[0121] Determine discrete split points for the value range of each feature in the data set; the split points can be selected based on the distribution of the data and evenly distributed within the value range; the uniformity is reflected in the fact that the amount of data between the split points is approximately equal or the sum of the second-order gradients is approximately equal.
[0122] Traverse the list of candidate split values to find the split point that makes the objective function optimal. Step 7: The coordinator collects the cutting point information of all participants and determines the split feature f and split value v according to the Epsilon-Greedy Algorithm. The Epsilon Greedy Algorithm in Step 7: For node n
[0123] Each participant sends the node segmentation point information to the coordinator, including the segmentation feature f i , split value v i ,
[0124] Number of node samples N i , structural coefficient; where i represents each participant;
[0125] The coordinator determines the optimal segmentation feature f based on the segmentation information of each participant and the maximum number principle. max
[0126] Let X be a random number uniformly distributed between [0,1], randomly sample X to obtain x; if x <= eps il on, randomly select one of the segmentation features of each participant as the global segmentation feature;
[0127] Otherwise, select f max is the global segmentation feature;
[0128] Each participant recalculates the segmentation information based on the global segmentation features and sends it to the coordinator;
[0129] The coordinator determines the global split value according to the following formula: If the total number of participants is P;
[0130]
[0131] Distribute the segmentation value to each participant to perform node segmentation. Step 8: The coordinator sends the final segmentation information, including but not limited to the segmentation feature f and segmentation value v, to each participant. Step 9: Each participant segments the current node data set according to the segmentation feature f and segmentation value v, and assigns the new segmentation data to the child nodes. Step 10: Let n=n+1. If n is less than or equal to the maximum number of nodes in the current layer, continue with step 6; otherwise, continue to the next step. Step 11: Reset the current layer node information according to the child nodes of the l-th layer node. Let l=l+1. If l is less than or equal to the maximum depth of the tree L, continue with step 5; otherwise, continue to the next step. Step 12: Let t=t+1. If t is greater than or equal to the maximum number of decision trees T, continue with step 3; otherwise , end, the coordinator sets the relevant parameters of the gradient boosting tree model, including but not limited to the maximum number of decision trees, the maximum depth of the tree, the initial prediction value, etc., and sends them to each participant. The coordinator sends the final segmentation information, including but not limited to the determined segmentation features and segmentation values, to each participant. Each participant segments the current node data set according to the segmentation features and segmentation values. The horizontal federated learning supported by the benefit includes participants and coordinators. The participants have local data, and the coordinator does not own any data. It is the center for aggregating information of the participants. The participants calculate histograms separately and send the histograms to the coordinator. After the coordinator summarizes all the histogram information, it finds the optimal segmentation point according to the greedy algorithm, and then shares it with each participant to work with the internal algorithm.
[0132] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A horizontal federated gradient boosting tree optimization method based on a random greedy algorithm, characterized by: The steps are as follows: Step 1: The coordinator sets the relevant parameters of the gradient boosting tree model, including the maximum number of decision trees T, the maximum tree depth L, and the initial prediction value base, and sends it to each participant p i ; Step 2: For each participant p i , initialize the k-th tree training target in Step 3: For each participant p i , according to the data of the local current node n, according to the optimal split point algorithm, determine the split point of the current node, and send the split point information to the coordinator; Step 4: The coordinator collects the cutting point information of all participants and determines the segmentation feature f and segmentation value v according to the epsilon-greedy algorithm; Step 5: The coordinator sends the final segmentation information, including the segmentation feature f and segmentation value v, to each participant; Step 6: Each participant splits the current node data set according to the split feature f and the split value v, and assigns the new split data to the child nodes; Step 7: Set n = n + 1. If n is less than or equal to the maximum number of nodes in the current layer, continue with step 3; otherwise, continue with the next step. Step 8: Reset the node information of the current layer according to the child nodes of the l-layer node, and set l=l+1. If l is less than or equal to the maximum depth of the tree L, continue with step 5; otherwise, continue with the next step; Step 9: Let t = t + 1. If t is greater than or equal to the maximum number of decision trees T, continue to step 3; otherwise, end; The optimal segmentation point algorithm in step 3: Determine the segmentation objective function: including the objective function, Information gain: Information gain is the most commonly used indicator to measure the purity of a sample set. There are K types of samples in the node sample set D, and the proportion of the kth type of samples is p. k , then the information entropy of D is defined as Assuming that the node is divided into V possible values according to attribute a, the information gain is defined as Information gain rate: in Gini coefficient: Structural coefficient: Among them G L is the first-order gradient sum of the data set divided into the left node after the data set is split according to the split point, H L is the second-order gradient sum of the left node data set, G R and H R is the gradient information and of the corresponding right node, γ is the tree model complexity penalty term, and λ is the second-order regular term; Determine the candidate list of segmentation values: Determine the list of segmentation values according to the current node data distribution; the segmentation values include segmentation features and segmentation feature values; The list of split values is determined as follows: All values of all features in the dataset; Determine discrete split points based on the value range of each feature in the data set; The selection of split points is based on the distribution of data and is evenly distributed within the value range; the evenness is reflected in the fact that the amount of data between split points is approximately equal or the sum of the second-order gradient is approximately equal; Traverse the candidate list of split values to find the split point that optimizes the objective function; Among them, horizontal federated learning is a distributed structure of federated learning, in which the data features of each distributed node are the same but the sample space is different.
2. According to claim 1, a horizontal federated gradient boosting tree optimization method based on a random greedy algorithm is characterized by: The Epsilon greedy algorithm in step 4 includes: For node n, each participant sends the node segmentation point information to the coordinator, including the segmentation feature f i , split value v i , the number of node samples N i , structural coefficient, where i represents each participant; The coordinator determines the optimal segmentation feature f based on the segmentation information of each participant and the maximum number principle. max Assume X is a random number uniformly distributed between [0,1], randomly sample X to obtain x; if x <= epsilon, randomly select one of the segmentation features of each participant as the global segmentation feature; otherwise, select f max is the global segmentation feature; Each participant recalculates the segmentation information based on the global segmentation features and sends it to the coordinator; The coordinator determines the global split value according to the following formula: If the total number of participants is P; Distribute the split value to each participant and perform node splitting.
3. The horizontal federated gradient boosting tree optimization method based on random greedy algorithm according to claim 1 is characterized in that: The gradient boosting tree is an integrated model based on gradient boosting and decision tree.
4. The horizontal federated gradient boosting tree optimization method based on random greedy algorithm according to claim 1 is characterized in that: The decision tree is the basic model of the gradient boosting tree model. Based on the tree structure, the prediction direction of the sample is determined by given features at the node.
5. The horizontal federated gradient boosting tree optimization method based on random greedy algorithm according to claim 1 is characterized in that: The split point is the location where data is split at a non-leaf node in the decision tree.
