XGBoost longitudinal federated learning method and system based on secret sharing
By using Shamir's secret sharing technology in XGBoost vertical federated learning, the problem of large computing overhead for homomorphic encryption method is solved, and privacy protection with low computing overhead and efficient model training is achieved.
Patent Information
- Application Number
- CN202411089254.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-06
AI Technical Summary
The existing XGBoost vertical federated learning method based on homomorphic encryption has high computational overhead, resulting in low model training efficiency and cannot meet the needs of rapid iteration and actual deployment.
Shamir's secret sharing technology is used to secretly share the gradient and feature division matrix in XGBoost vertical federated learning, and the product of the feature division matrix and the gradient vector is calculated on the secret sharing share to construct a tree model.
It reduces the computational complexity, improves the efficiency of model training, and realizes privacy protection with low computing overhead.
Smart Images

Figure CN119094117A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of federated learning and cryptography, and in particular to an XGBoost longitudinal federated learning method and system based on secret sharing. Background Art
[0002] In order to solve the security problem of XGBoost vertical federated learning where sample label values are distributed in the hands of multiple participants, Zhu et al. proposed a vertical federated training method for XGBoost distributed labels based on homomorphic encryption in the article "PIVODL: Privacy-preserving vertical federated learning over distributed labels" published in "IEEE Transactions on Artificial Intelligence". It prevents participants from inferring the gradients of other participants by assigning feature partitioning and calculating the information gain of the partition to different participants. The participant who provides feature partitioning is called the source client, and the participant who calculates the information gain is called the partition client. The partition client is randomly selected by the source client. Other participants calculate the gradient of the locally owned label based on the partition provided by the source client, and encrypt it with the public key of the partition client and send it to the source client. The source client aggregates all gradients through homomorphic encryption, and then sends the gradient sum to the partition client for decryption. The partition client calculates the information gain in plain text, and then compares the information gain to obtain the best partition point. The disadvantage of this method is that it mainly uses homomorphic encryption technology to protect the privacy of data. However, homomorphic encryption technology has a very obvious disadvantage, that is, the computational overhead is very large, so the PIVODL solution has a large computational overhead, low model training efficiency and long time. The time overhead of machine learning is very important. If the model training time is too long, it will affect the efficiency of actual applications, which is crucial for rapid iteration and actual deployment. Summary of the invention
[0003] The problem to be solved by the present invention is to realize XGBoost vertical federated learning with privacy protection when the sample label values are dispersed in the hands of different participants. The purpose of the present invention is to provide a XGBoost vertical federated learning method and system based on secret sharing to achieve XGBoost vertical federated learning with privacy protection with low computational overhead in order to solve the problem of high computational overhead of the PIVODL scheme. The method described in the present invention mainly uses Shamir's secret sharing technology to realize privacy protection in the process of XGBoost vertical federated learning, so that each participant cannot obtain information about the sample data of other participants during the XGBoost vertical federated training and prediction process.
[0004] To achieve the above object, the present invention provides an XGBoost vertical federated learning method based on secret sharing, comprising:
[0005] S1. Each participant initializes the XGBoost model based on prior agreement;
[0006] S2. Each participant calculates the first-order gradient and second-order gradient of each local sample based on the local sample label value and sample prediction value;
[0007] S3. Based on the first-order gradient and the second-order gradient, a tree in the XGBoost model is constructed using the Shamir secret sharing method;
[0008] S4. Judge the constructed tree; if the currently generated tree is not the last one, use the generated tree to predict and update the sample prediction value, and return to S2; otherwise, end.
[0009] Optionally, the initialization of S1 includes:
[0010] S1.1. Set parameters; the parameters include: the number of trees, the maximum depth of the tree, the hyperparameters required by the XGBoost model, and the minimum number of samples in a node;
[0011] S1.2. Each participant initializes each tree locally;
[0012] S1.3. Initialize the sample prediction value to 0.
[0013] Optionally, S3 constructs a tree in the XGBoost model based on the first-order gradient and the second-order gradient, including:
[0014] S3.1. Each participant shares the first-order gradient and the second-order gradient with other participants through Shamir secret sharing and aggregates the received shared shares;
[0015] S3.2. Each participant constructs a private feature partitioning bucket based on the local features, allocates local samples to each bucket, and constructs a feature partitioning matrix for each feature;
[0016] S3.3. Each participant shares the feature partition matrix with other participants through Shamir secret sharing;
[0017] S3.4. Each participant multiplies the received feature partition matrix with the first-order gradient and the second-order gradient respectively, and sends the multiplication result to the server;
[0018] S3.5. After receiving the multiplication results sent by each participant, the server uses the Shamir secret sharing reconstruction method to reconstruct and obtain two vectors, one of which is the first-order gradient and the other is the second-order gradient. Each element of the vector is the sum of the sample gradients of a feature partition bucket. A partition is inserted between the vector elements to divide the vector elements. The sum of the elements above the partition is the sum of the gradients of the left child node after the partition, and the sum of the elements below the partition is the sum of the gradients of the right child node after the partition. The splitting gain of each partition is calculated, and the partition with the largest splitting gain is the optimal partition. The server sends the matrix column and row number corresponding to the optimal partition to each participant;
[0019] S3.6. Each participant determines whether the feature corresponding to the optimal partition is its own feature. If so, the participant records the feature and threshold locally in the current node, constructs a tree based on the current node, and splits the samples in the current node into a left child node and a right child node according to the optimal partition, and determines whether the child node is a leaf node; if the child node is a leaf node, the server is notified to calculate the leaf node value, and the server sends the leaf node value to the non-feature provider, and sends the leaf node value injected with Gaussian noise that satisfies differential privacy to the feature provider, and then each participant records the received leaf node value locally and returns the leaf node; otherwise, the sample ID set of the left and right child nodes after the split is sent to everyone;
[0020] S3.7. Each participant splits the samples in the new current node into a left child node and a right child node, and then uses the left and right child nodes as the new current nodes respectively, repeats steps S3.1-S3.7 to generate left and right subtrees, and completes the tree construction.
[0021] Optionally, determining whether a child node is a leaf node includes:
[0022] If the depth of the child node reaches the preset maximum depth of the tree or the number of samples in the child node is less than the preset minimum number of samples in the node, the child node is a leaf node.
[0023] To achieve the above object, the present invention also proposes an XGBoost vertical federated learning system based on secret sharing, the system comprising: an initialization module, a gradient calculation module, a construction module and a prediction output module;
[0024] The initialization module is used for each participant to initialize the XGBoost model based on a prior agreement;
[0025] The gradient calculation module is used by each participant to calculate the first-order gradient and second-order gradient of each local sample according to the local sample label value and sample prediction value;
[0026] The construction module is used to construct a tree based on the first-order gradient and the second-order gradient using the Shamir secret sharing method;
[0027] The prediction output module is used to judge the constructed tree; if the currently generated tree is not the last one, the generated tree is used to predict and update the sample prediction value, the first-order gradient and the second-order gradient of each local sample are recalculated, and the next tree is constructed; otherwise, the process ends.
[0028] Optionally, the initialization module includes: a setting unit, a local initialization unit and a sample prediction value initialization unit;
[0029] The setting unit is used to set parameters; the parameters include: the number of trees, the maximum depth of the tree, and the hyperparameters required by the XGBoost model;
[0030] The local initialization unit is used for each participant to initialize each tree locally;
[0031] The sample prediction value initialization unit is used to initialize the sample prediction value to 0.
[0032] Optionally, the construction module constructs a tree based on the first-order gradient and the second-order gradient, comprising:
[0033] S3.1. Each participant shares the first-order gradient and the second-order gradient with other participants through Shamir secret sharing and aggregates the received shared shares;
[0034] S3.2. Each participant constructs a private feature partitioning bucket based on the local features, allocates local samples to each bucket, and constructs a feature partitioning matrix for each feature;
[0035] S3.3. Each participant shares the feature partition matrix with other participants through Shamir secret sharing;
[0036] S3.4. Each participant multiplies the received feature partition matrix with the first-order gradient and the second-order gradient respectively, and sends the multiplication result to the server;
[0037] S3.5. After receiving the multiplication results sent by each participant, the server uses the Shamir secret sharing reconstruction method to reconstruct and obtain two vectors, one of which is the first-order gradient and the other is the second-order gradient. Each element of the vector is the sum of the sample gradients of a feature partition bucket. A partition is inserted between the vector elements to partition the vector elements. The sum of the elements above the partition is the sum of the gradients of the left child node after the partition, and the sum of the elements below the partition is the sum of the gradients of the right child node after the partition. The splitting gain of each partition is calculated, and the partition with the largest splitting gain is the optimal partition. The server sends the matrix column and row number corresponding to the optimal partition to each participant;
[0038] S3.6. Each participant determines whether the feature corresponding to the optimal partition is its own feature. If so, the participant records the feature and threshold locally in the current node, constructs a tree based on the current node, and splits the samples in the current node into a left child node and a right child node according to the optimal partition, and determines whether the child node is a leaf node; if the child node is a leaf node, the server is notified to calculate the leaf node value, and the server sends the leaf node value to the non-feature provider, and sends the leaf node value injected with Gaussian noise that satisfies differential privacy to the feature provider, and then each participant records the received leaf node value locally and returns the leaf node; otherwise, the sample ID set of the left and right child nodes after the split is given to everyone;
[0039] S3.7. Each participant splits the samples in the new current node into a left child node and a right child node, and then uses the left and right child nodes as the new current nodes respectively, repeats steps S3.1-S3.7 to generate left and right subtrees, and completes the tree construction.
[0040] Optionally, determining whether a child node is a leaf node includes:
[0041] If the depth of the child node reaches the preset maximum depth of the tree or the number of samples in the child node is less than the preset minimum number of samples in the node, the child node is a leaf node.
[0042] The present invention has the following beneficial effects:
[0043] The present invention uses Shamir's secret sharing technology to secretly share the gradient and feature partition matrix during the tree construction process, and calculates the product of the feature partition matrix and the gradient vector on the secret sharing share. This makes the present invention have lower computational complexity than the prior art, so the method of the present invention has higher efficiency than the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0045] Figure 1 It is a schematic diagram of the overall process of XGBoost vertical federated learning based on secret sharing in an embodiment of the present invention;
[0046] Figure 2 This is a schematic diagram of the interaction between participants when a node is split during the construction process of an XGBoost longitudinal federated learning tree based on secret sharing in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0048] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0049] like Figure 1 This embodiment proposes an XGBoost longitudinal federated learning method based on secret sharing, which mainly includes the following processes and steps:
[0050] Step 1: Execute the initialization process; each participant initializes the XGBoost model based on the prior agreement;
[0051] Step 2: Each participant calculates the first-order gradient and second-order gradient of each local sample based on the local sample label value and predicted value;
[0052] Step 3, execute the tree construction process;
[0053] Step 4. If the currently generated tree is not the last one, use the generated tree to predict and update the sample prediction value, and return to Step 2; otherwise, end;
[0054] The initialization process includes the following steps:
[0055] Step 1. Set parameters, including the number of trees, the maximum depth of the tree, the hyperparameters required by the XGBoost model, the minimum number of samples in a node, etc.
[0056] Step 2. Each participant initializes each tree locally;
[0057] Step 3, initialize the sample prediction value to 0;
[0058] The tree construction process includes the following steps:
[0059] Step 1. Each participant shares the first-order gradient and the second-order gradient with other participants through Shamir secret sharing, and aggregates the received shared shares;
[0060] Step 2: Each participant constructs a private feature partitioning bucket based on the local features, allocates samples to each bucket, and constructs a feature partitioning matrix for each feature;
[0061] Step 3. Each participant shares the feature partition matrix constructed in Step 2 with other participants through Shamir secret sharing;
[0062] Step 4. Each participant multiplies the received feature partition matrix with the first-order gradient and the second-order gradient respectively, and sends the result to the server;
[0063] Step 5. After receiving the multiplication results sent by each participant, the server uses Shamir's secret sharing reconstruction method to reconstruct two vectors, one of which is the first-order gradient and the other is the second-order gradient. Each element of the vector is the sum of the sample gradients of a feature partition bucket. A partition is inserted between the vector elements to divide the vector elements. The sum of the elements above the partition is the sum of the gradients of the left child node after the partition, and the sum of the elements below the partition is the sum of the gradients of the right child node after the partition. The splitting gain of each partition is calculated, and the partition with the largest splitting gain is the optimal partition. The server sends the matrix column and row number corresponding to the optimal partition to each participant.
[0064] Step 6. Each participant determines whether the feature corresponding to the optimal partition is its own feature. If so, the participant records the feature and threshold locally in the current node, constructs a tree based on the current node, and splits the samples in the current node into a left child node and a right child node according to the optimal partition, and determines whether the child node is a leaf node; if the child node is a leaf node, the server is notified to calculate the leaf node value, and the server sends the leaf node value to the non-feature provider, and sends the leaf node value injected with Gaussian noise that satisfies differential privacy to the feature provider, and then each participant records the received leaf node value locally and returns the leaf node; otherwise, the sample ID set of the left and right child nodes after the split is sent to everyone;
[0065] Step 7. Each participant splits the samples in the new current node into a left child node and a right child node, and then uses the left and right child nodes as the new current nodes respectively, repeating the above steps of Step 1-Step 7 to generate left and right subtrees, completing the tree construction.
[0066] Among them, if the depth of the child node reaches the preset maximum depth of the tree or the number of samples in the child node is less than the preset minimum number of samples in the node, the child node is a leaf node.
[0067] The flowchart of the method of this embodiment is shown in the accompanying drawings. Figure 1 shown.
[0068] Compared with existing research, this embodiment uses Shamir secret sharing technology in Step 1 and Step 3 of the tree construction process, and calculates the product of the feature partition matrix and the gradient vector based on the secret sharing share in Step 4, so that this embodiment has lower computational complexity than the existing technology, that is, this embodiment has higher efficiency than the existing technology.
[0069] The main privacy protection technology used is Shamir's secret sharing technology, and its protocol content is shown in Table 1.
[0070] Table 1 Shamir's secret sharing protocol
[0071]
[0072] The main protocol of an XGBoost longitudinal federated learning method based on secret sharing in this embodiment is shown in Table 2.
[0073] Table 2 Main protocol of XGBoost vertical federated learning based on secret sharing
[0074]
[0075]
[0076] The initialization process of step 1 of Table 2 is shown in Table 3.
[0077] Table 3 XGBoost vertical federated learning initialization protocol based on secret sharing
[0078]
[0079] The process of constructing the XGBoost vertical federated learning tree based on secret sharing in step 2 of Table 2 is shown in Table 4. The interaction process of the participants is shown in the attached figure. Figure 2 shown.
[0080] Table 4 XGBoost vertical federated learning tree construction process based on secret sharing
[0081]
[0082]
[0083]
[0084] The prediction process of step 2 of Table 2 is shown in Table 5.
[0085] Table 5 XGBoost federated prediction protocol based on secret sharing
[0086]
[0087] This embodiment also proposes an XGBoost vertical federated learning system based on secret sharing, including: an initialization module, a gradient calculation module, a construction module and a prediction output module;
[0088] Initialization module, used for initialization;
[0089] The gradient calculation module is used by each participant to calculate the first-order gradient and second-order gradient of each local sample based on the local sample label value and sample prediction value;
[0090] A construction module, used to construct a tree based on the first-order gradient and the second-order gradient using the Shamir secret sharing method;
[0091] The prediction output module is used to judge the constructed tree; if the currently generated tree is not the last one, the generated tree is used to predict and update the sample prediction value, recalculate the first-order gradient and second-order gradient of each local sample, and construct the next tree; otherwise, the process ends.
[0092] Further, the initialization module includes: a setting unit, a local initialization unit and a sample prediction value initialization unit;
[0093] The setting unit is used to set parameters; the parameters include: the number of trees, the maximum depth of the tree, and the hyperparameters required by the XGBoost model;
[0094] A local initialization unit, used by each participant to initialize each tree locally;
[0095] The local initialization unit is used to initialize the sample prediction value to 0.
[0096] Furthermore, the construction module constructs a tree based on the first-order gradient and the second-order gradient, including:
[0097] S3.1. Each participant shares the first-order gradient and the second-order gradient with other participants through Shamir secret sharing and aggregates the received shared shares;
[0098] S3.2. Each participant constructs a private feature partitioning bucket based on the local features, allocates local samples to each bucket, and constructs a feature partitioning matrix for each feature;
[0099] S3.3. Each participant shares the feature partition matrix with other participants through Shamir secret sharing;
[0100] S3.4. Each participant multiplies the received feature partition matrix with the first-order gradient and the second-order gradient respectively, and sends the multiplication result to the server;
[0101] S3.5. After receiving the multiplication results sent by each participant, the server uses the Shamir secret sharing reconstruction method to reconstruct and obtain two vectors, one of which is the first-order gradient and the other is the second-order gradient. Each element of the vector is the sum of the sample gradients of a feature partition bucket. A partition is inserted between the vector elements to partition the vector elements. The sum of the elements above the partition is the sum of the gradients of the left child node after the partition, and the sum of the elements below the partition is the sum of the gradients of the right child node after the partition. The splitting gain of each partition is calculated, and the partition with the largest splitting gain is the optimal partition. The server sends the matrix column and row number corresponding to the optimal partition to each participant;
[0102] S3.6. Each participant determines whether the feature corresponding to the optimal partition is its own feature. If so, the participant records the feature and threshold locally in the current node, constructs a tree based on the current node, and splits the samples in the current node into a left child node and a right child node according to the optimal partition, and determines whether the child node is a leaf node; if the child node is a leaf node, the server is notified to calculate the leaf node value, and the server sends the leaf node value to the non-feature provider, and sends the leaf node value injected with Gaussian noise that satisfies differential privacy to the feature provider, and then each participant records the received leaf node value locally and returns the leaf node; otherwise, the sample IDs of the left and right child nodes after the split are set to everyone;
[0103] S3.7. Each participant splits the samples in the new current node into a left child node and a right child node, and then uses the left and right child nodes as the new current nodes respectively, repeats steps S3.1-S3.7 to generate left and right subtrees, and completes the tree construction.
[0104] Furthermore, judging whether a child node is a leaf node includes:
[0105] If the depth of the child node reaches the preset maximum depth of the tree or the number of samples in the child node is less than the preset minimum number of samples in the node, the child node is a leaf node.
[0106] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A secret sharing-based XGBoost longitudinal federated learning method, It is characterized in that include: S1. Each participant initializes the XGBoost model based on prior agreement; S2. Each participant calculates the first-order gradient and second-order gradient of each local sample based on the local sample label value and sample prediction value; S3. Based on the first-order gradient and the second-order gradient, a tree in the XGBoost model is constructed using the Shamir secret sharing method; S4. Judge the constructed tree; if the currently generated tree is not the last one, use the generated tree to predict and update the sample prediction value, and return to S2; otherwise, end.
2. The XGBoost longitudinal federated learning method based on secret sharing according to claim 1, It is characterized in that S1 initialization includes: S1.
1. Set parameters; the parameters include: the number of trees, the maximum depth of the tree, the hyperparameters required by the XGBoost model, and the minimum number of samples in a node; S1.
2. Each participant initializes each tree locally; S1.
3. Initialize the sample prediction value to 0.
3. The XGBoost longitudinal federated learning method based on secret sharing according to claim 1, It is characterized in that S3 constructs a tree in the XGBoost model based on the first-order gradient and the second-order gradient, including: S3.
1. Each participant shares the first-order gradient and the second-order gradient with other participants through Shamir secret sharing and aggregates the received shared shares; S3.
2. Each participant constructs a private feature partitioning bucket based on the local features, allocates local samples to each bucket, and constructs a feature partitioning matrix for each feature; S3.
3. Each participant shares the feature partition matrix with other participants through Shamir secret sharing; S3.
4. Each participant multiplies the received feature partition matrix with the first-order gradient and the second-order gradient respectively, and sends the multiplication result to the server; S3.
5. After receiving the multiplication results sent by each participant, the server uses the Shamir secret sharing reconstruction method to reconstruct and obtain two vectors, one of which is the first-order gradient and the other is the second-order gradient. Each element of the vector is the sum of the sample gradients of a feature partition bucket. A partition is inserted between the vector elements to divide the vector elements. The sum of the elements above the partition is the sum of the gradients of the left child node after the partition, and the sum of the elements below the partition is the sum of the gradients of the right child node after the partition. The splitting gain of each partition is calculated, and the partition with the largest splitting gain is the optimal partition. The server sends the matrix column and row number corresponding to the optimal partition to each participant; S3.
6. Each participant determines whether the feature corresponding to the optimal partition is its own feature. If so, the participant records the feature and threshold locally in the current node, constructs a tree based on the current node, and splits the samples in the current node into a left child node and a right child node according to the optimal partition, and determines whether the child node is a leaf node; if the child node is a leaf node, the server is notified to calculate the leaf node value, and the server sends the leaf node value to the non-feature provider, and sends the leaf node value injected with Gaussian noise that satisfies differential privacy to the feature provider, and then each participant records the received leaf node value locally and returns the leaf node; otherwise, the sample ID set of the left and right child nodes after the split is sent to everyone; S3.
7. Each participant splits the samples in the new current node into a left child node and a right child node, and then uses the left and right child nodes as the new current nodes respectively, repeats steps S3.1-S3.7 to generate left and right subtrees, and completes the tree construction.
4. The XGBoost longitudinal federated learning method based on secret sharing according to claim 3, It is characterized in that Determining whether a child node is a leaf node includes: If the depth of the child node reaches the preset maximum depth of the tree or the number of samples in the child node is less than the preset minimum number of samples in the node, the child node is a leaf node.
5. An XGBoost vertical federated learning system based on secret sharing, It is characterized in that Applying the XGBoost longitudinal federated learning method based on secret sharing as described in any one of claims 1 to 4, the system comprises: an initialization module, a gradient calculation module, a construction module and a prediction output module; The initialization module is used for each participant to initialize the XGBoost model based on a prior agreement; The gradient calculation module is used by each participant to calculate the first-order gradient and second-order gradient of each local sample according to the local sample label value and sample prediction value; The construction module is used to construct a tree based on the first-order gradient and the second-order gradient using the Shamir secret sharing method; The prediction output module is used to judge the constructed tree; if the currently generated tree is not the last one, the generated tree is used to predict and update the sample prediction value, the first-order gradient and the second-order gradient of each local sample are recalculated, and the next tree is constructed; otherwise, the process ends.
6. The XGBoost vertical federated learning system based on secret sharing according to claim 5, It is characterized in that The initialization module includes: a setting unit, a local initialization unit and a sample prediction value initialization unit; The setting unit is used to set parameters; the parameters include: the number of trees, the maximum depth of the tree, and the hyperparameters required by the XGBoost model; The local initialization unit is used for each participant to initialize each tree locally; The sample prediction value initialization unit is used to initialize the sample prediction value to 0.
7. The XGBoost vertical federated learning system based on secret sharing according to claim 6, It is characterized in that The construction module constructs a tree based on the first-order gradient and the second-order gradient, comprising: S3.
1. Each participant shares the first-order gradient and the second-order gradient with other participants through Shamir secret sharing and aggregates the received shared shares; S3.
2. Each participant constructs a private feature partitioning bucket based on the local features, allocates local samples to each bucket, and constructs a feature partitioning matrix for each feature; S3.
3. Each participant shares the feature partition matrix with other participants through Shamir secret sharing; S3.
4. Each participant multiplies the received feature partition matrix with the first-order gradient and the second-order gradient respectively, and sends the multiplication result to the server; S3.
5. After receiving the multiplication results sent by each participant, the server uses the Shamir secret sharing reconstruction method to reconstruct and obtain two vectors, one of which is the first-order gradient and the other is the second-order gradient. Each element of the vector is the sum of the sample gradients of a feature partition bucket. A partition is inserted between the vector elements to partition the vector elements. The sum of the elements above the partition is the sum of the gradients of the left child node after the partition, and the sum of the elements below the partition is the sum of the gradients of the right child node after the partition. The splitting gain of each partition is calculated, and the partition with the largest splitting gain is the optimal partition. The server sends the matrix column and row number corresponding to the optimal partition to each participant; S3.
6. Each participant determines whether the feature corresponding to the optimal partition is its own feature. If so, the participant records the feature and threshold locally in the current node, constructs a tree based on the current node, and splits the samples in the current node into a left child node and a right child node according to the optimal partition, and determines whether the child node is a leaf node; if the child node is a leaf node, the server is notified to calculate the leaf node value, and the server sends the leaf node value to the non-feature provider, and sends the leaf node value injected with Gaussian noise that satisfies differential privacy to the feature provider, and then each participant records the received leaf node value locally and returns the leaf node; otherwise, the sample ID set of the left and right child nodes after the split is given to everyone; S3.
7. Each participant splits the samples in the new current node into a left child node and a right child node, and then uses the left and right child nodes as the new current nodes respectively, repeats steps S3.1-S3.7 to generate left and right subtrees, and completes the tree construction.
8. The XGBoost longitudinal federated learning method based on secret sharing according to claim 7, It is characterized in that Determining whether a child node is a leaf node includes: If the depth of the child node reaches the preset maximum depth of the tree or the number of samples in the child node is less than the preset minimum number of samples in the node, the child node is a leaf node.
