Longitudinal federal predictive optimization method, device, medium and computer program product
By combining the target prediction model and the vertical federated residual enhancement model in the longitudinal federated prediction model with weighted aggregation, the problem of low prediction accuracy of misaligned samples is solved, and higher overall sample prediction accuracy and stability are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WEBANK (CHINA)
- Filing Date
- 2021-08-25
- Publication Date
- 2026-05-19
AI Technical Summary
Existing longitudinal federated forecasting models have low overall sample forecasting accuracy when forecasting unaligned samples, and their performance is limited due to insufficient data.
By acquiring the samples to be predicted and performing local iterative training based on the target prediction model, and combining the prediction results and weights of the vertical federated residual improvement model, a target federated prediction result is generated, thereby improving the prediction accuracy of misaligned samples.
It achieves higher accuracy in longitudinal federated prediction of aligned samples, while also enabling accurate prediction of unaligned samples locally, thus improving the overall sample prediction accuracy and maintaining prediction stability when participant data is missing or down.
Smart Images

Figure CN113673699B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology in financial technology (Fintech), and more particularly to a vertical federated prediction optimization method, apparatus, medium, and computer program product. Background Technology
[0002] With the continuous development of fintech, especially internet fintech, more and more technologies (such as distributed systems and artificial intelligence) are being applied in the financial field. However, the financial industry is also placing higher demands on technology, such as on the distribution of tasks to be completed.
[0003] With the continuous development of computer software and artificial intelligence computing, the application of artificial intelligence technology is becoming increasingly widespread. Currently, existing vertical federated prediction models require vertical federated learning modeling based on aligned samples among the participants. After modeling, the vertical federated prediction model is distributed across each participant, with each participant holding only a portion of the model. Therefore, in vertical federated prediction scenarios, for unaligned samples, the predictor needs to use a separate model locally for prediction. Consequently, the predictor cannot perform sample prediction based on the complete model for unaligned samples, resulting in lower overall sample prediction accuracy. Furthermore, the insufficient alignment data also limits the model performance of the vertical federated learning model. Therefore, existing vertical federated prediction methods suffer from low overall sample prediction accuracy. Summary of the Invention
[0004] The main purpose of this application is to provide a vertical federated forecasting optimization method, device, medium, and computer program product, which aims to solve the technical problem of low overall sample forecasting accuracy in the prior art.
[0005] To achieve the above objectives, this application provides a vertical federated prediction optimization method, which is applied to a first device, and includes:
[0006] A sample to be predicted is acquired, and a model prediction is performed on the sample to be predicted based on the target prediction model to obtain a first-party model prediction result, wherein the target prediction model is obtained by local iterative training of the first device;
[0007] Receive the second-party model prediction result generated by the second device based on the vertical federated residual boosting model for the ID matching sample corresponding to the sample to be predicted, and the second-party model weights corresponding to the vertical federated residual boosting model;
[0008] Obtain the weights of the first-party model corresponding to the target prediction model, and based on the weights of the first-party model and the weights of the second-party model, perform weighted aggregation on the prediction results of the first-party model and the prediction results of the second-party model to obtain the target federated prediction result.
[0009] To achieve the above objectives, this application provides a vertical federated prediction optimization method, which is applied to a second device, and includes:
[0010] Find ID matching samples, and perform model prediction on the ID matching samples based on the longitudinal federated residual boosting model to obtain the second-party model prediction results;
[0011] Obtain the second-party model weights corresponding to the longitudinal federated residual enhancement model, and send the second-party model prediction results and the second-party model weights to the first device, so that the first device can generate a target federated prediction result based on the first-party model prediction results generated by the target prediction model for the samples to be predicted corresponding to the training ID matching samples, the first-party model weights corresponding to the target prediction model, the second-party model prediction results and the second-party model weights, wherein the target prediction model is obtained by the first device through local iterative training.
[0012] To achieve the above objectives, this application provides a vertical federated learning modeling optimization method, which is applied to a first device, and includes:
[0013] Extract the initial weights of the first-party model and obtain the training samples and the corresponding training sample labels;
[0014] Based on the training samples, the training sample labels, and the first-party initial model weights, the target prediction model is obtained by iteratively training and optimizing the target prediction model by calculating the first-party model prediction loss corresponding to the target prediction model to be trained;
[0015] The training sample labels and the first-party model prediction loss are sent to the second device so that the second device can calculate the second-party model prediction loss and optimize the training residual enhancement model based on the residual loss calculated by the second-party model prediction loss and the first-party model prediction loss to obtain the vertical federated residual enhancement model.
[0016] To achieve the above objectives, this application provides a vertical federated learning modeling optimization method, which is applied to a second device. The vertical federated learning modeling optimization method includes:
[0017] The system obtains the initial weights of the second-party model and receives the training sample labels and the prediction loss of the first-party model sent by the first device. The prediction loss of the first-party model is calculated by the first device based on the prediction result of the first-party model on the training sample corresponding to the training ID matching sample of the target prediction model and the training sample labels.
[0018] Obtain training ID matching samples, and improve the model based on the residual to be trained, perform model prediction on the training ID matching samples to obtain the prediction results of the second-party training model;
[0019] Based on the training sample labels, the prediction results of the second-party training model, and the initial weights of the second-party model, calculate the prediction loss of the second-party model.
[0020] Based on the residual loss generated by the prediction loss of the first-party model and the prediction loss of the second-party model, the training residual enhancement model is iteratively optimized to obtain the longitudinal federated residual enhancement model.
[0021] This application also provides a vertical federated prediction optimization apparatus, wherein the vertical federated prediction optimization apparatus is a virtual apparatus and is applied to a first device, and the vertical federated prediction optimization apparatus includes:
[0022] The model prediction module is used to acquire the sample to be predicted and perform model prediction on the sample to be predicted based on the target prediction model to obtain the first-party model prediction result, wherein the target prediction model is obtained by local iterative training of the first device;
[0023] The receiving module is used to receive the second-party model prediction result generated by the second device based on the vertical federated residual boosting model for the ID matching sample corresponding to the sample to be predicted, and the second-party model weights corresponding to the vertical federated residual boosting model.
[0024] The weighted aggregation module is used to obtain the weights of the first-party model corresponding to the target prediction model, and to perform weighted aggregation on the prediction results of the first-party model and the prediction results of the second-party model based on the weights of the first-party model and the weights of the second-party model to obtain the target federated prediction result.
[0025] This application also provides a vertical federated prediction optimization apparatus, which is a virtual apparatus and is applied to a second device. The vertical federated prediction optimization apparatus includes:
[0026] The model prediction module is used to find ID matching samples and perform model prediction on the ID matching samples based on the longitudinal federated residual boosting model to obtain the second-party model prediction results.
[0027] The sending module is used to obtain the second-party model weights corresponding to the longitudinal federated residual enhancement model, and send the second-party model prediction results and the second-party model weights to the first device, so that the first device can generate a target federated prediction result based on the first-party model prediction results generated by the target prediction model for the samples to be predicted corresponding to the training ID matching samples, the first-party model weights corresponding to the target prediction model, the second-party model prediction results and the second-party model weights, wherein the target prediction model is obtained by the first device through local iterative training.
[0028] This application also provides a vertical federated learning modeling optimization device, which is a virtual device and is applied to a first device. The vertical federated learning modeling optimization device includes:
[0029] The acquisition module is used to extract the initial weights of the first-party model and to obtain the training samples and the training sample labels corresponding to the training samples.
[0030] The iterative optimization module is used to iteratively train and optimize the target prediction model based on the training samples, the training sample labels, and the first-party initial model weights, by calculating the first-party model prediction loss corresponding to the target prediction model to be trained, and to obtain the target prediction model.
[0031] The sending module is used to send the training sample labels and the first-party model prediction loss to the second device, so that the second device can calculate the second-party model prediction loss and optimize the training residual enhancement model based on the residual loss calculated by the second-party model prediction loss and the first-party model prediction loss to obtain the vertical federated residual enhancement model.
[0032] This application also provides a vertical federated learning modeling optimization device, which is a virtual device and is applied to a second device. The vertical federated learning modeling optimization device includes:
[0033] The receiving module is used to obtain the initial model weights of the second party and receive the training sample labels and the first party model prediction loss sent by the first device, wherein the first party model prediction loss is calculated by the first device based on the first party model prediction result of the target prediction model on the training sample corresponding to the training ID matching sample and the training sample labels.
[0034] The model prediction module is used to obtain training ID matching samples, and improve the model based on the residual to be trained, and perform model prediction on the training ID matching samples to obtain the prediction results of the second-party training model.
[0035] The loss calculation module is used to calculate the prediction loss of the second-party model based on the training sample labels, the prediction results of the second-party training model, and the initial weights of the second-party model.
[0036] The iterative optimization module is used to iteratively optimize the training residual boosting model based on the residual loss generated by the prediction loss of the first-party model and the prediction loss of the second-party model, so as to obtain the longitudinal federated residual boosting model.
[0037] This application also provides a vertical federated prediction optimization device, which is a physical device. The vertical federated prediction optimization device includes: a memory, a processor, and a program of the vertical federated prediction optimization method stored in the memory and executable on the processor. When the program of the vertical federated prediction optimization method is executed by the processor, it can implement the steps of the vertical federated prediction optimization method as described above.
[0038] This application also provides a vertical federated learning modeling optimization device, which is a physical device. The vertical federated learning modeling optimization device includes: a memory, a processor, and a program of the vertical federated learning modeling optimization method stored in the memory and executable on the processor. When the program of the vertical federated learning modeling optimization method is executed by the processor, it can implement the steps of the vertical federated learning modeling optimization method as described above.
[0039] This application also provides a medium, which is a readable storage medium, on which a program implementing the vertical federated prediction optimization method is stored. When the program of the vertical federated prediction optimization method is executed by a processor, it implements the steps of the vertical federated prediction optimization method as described above.
[0040] This application also provides a medium, which is a readable storage medium, on which a program implementing a longitudinal federated learning modeling optimization method is stored. When the program is executed by a processor, it implements the steps of the longitudinal federated learning modeling optimization method as described above.
[0041] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the vertical federated prediction optimization method as described above.
[0042] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the longitudinal federated learning modeling optimization method as described above.
[0043] This application provides a vertical federated prediction optimization method, device, medium, and computer program product. Compared to the existing technology that uses vertical federated prediction to accurately predict aligned samples by combining aligned samples from other participants, and to predict unaligned samples locally based on a partially local vertical federated prediction model, this application obtains the sample to be predicted and performs model prediction on the sample based on a target prediction model to obtain a first-party model prediction result. Since the target prediction model is locally iteratively trained by the first device, it achieves the goal of predicting the sample locally based on the locally iteratively trained target prediction model. Therefore, for unaligned samples, the first device can independently and accurately predict the sample based on the target prediction model as a complete model. Furthermore, it receives the second-party model prediction result generated by the second device performing model prediction on the ID matching sample corresponding to the sample to be predicted based on the vertical federated residual boosting model, and the second-party model weights corresponding to the vertical federated residual boosting model. Specifically, for ID matching samples aligned with the sample to be predicted, the second device performs model prediction on the ID matching sample corresponding to the sample based on the vertical federated residual boosting model. ID matching sample execution model prediction can generate residual enhancement information corresponding to the sample to be predicted, that is, the second-party model prediction result. Then, the first-party model weight corresponding to the target prediction model is obtained. Based on the first-party model weight and the second-party model weight, the first-party model prediction result and the second-party model prediction result are weighted and aggregated to obtain the target federated prediction result. Therefore, for the sample to be predicted that is an aligned sample between the first device and the second device, the first device can use the residual enhancement information (second-party model prediction result) generated by the second device based on the vertical federated residual enhancement model for the ID matching sample aligned with the sample to be predicted to improve the accuracy of the first-party model prediction result output by the target prediction model. This realizes vertical federated prediction of the sample to be predicted based on residual enhancement information. Therefore, it achieves the goal of accurately predicting unaligned samples locally based on the complete model when performing vertical federated prediction of aligned samples with higher accuracy based on residual enhancement information. Thus, it overcomes the technical defect that the predictor cannot perform sample prediction of unaligned samples based on the complete model when performing federated prediction of aligned samples with higher accuracy, which makes the overall sample prediction accuracy lower. This improves the overall sample prediction accuracy of vertical federated prediction. Attached Figure Description
[0044] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0045] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a flowchart illustrating the first embodiment of the vertical federated prediction optimization method of this application;
[0047] Figure 2 This is a flowchart illustrating the second embodiment of the vertical federated prediction optimization method of this application;
[0048] Figure 3 This is a flowchart illustrating the first embodiment of the longitudinal federated learning modeling optimization method of this application;
[0049] Figure 4 This is a flowchart illustrating the second embodiment of the longitudinal federated learning modeling optimization method of this application;
[0050] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the vertical federated prediction optimization method in this application embodiment;
[0051] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the vertical federated learning modeling optimization method in the embodiments of this application.
[0052] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0053] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0054] This application provides a vertical federated prediction optimization method. In the first embodiment of the vertical federated prediction optimization method of this application, refer to... Figure 1 The vertical federated prediction optimization method is applied to the first device, and the vertical federated prediction optimization method includes:
[0055] Step S10: Obtain the sample to be predicted, and perform model prediction on the sample to be predicted based on the target prediction model to obtain the first-party model prediction result, wherein the target prediction model is obtained by local iterative training of the first device;
[0056] In this embodiment, it should be noted that the vertical federated prediction optimization method is applied to a vertical federated learning scenario, where both the first device and the second device are participants in the scenario. The first device has samples with labeled samples, while the second device has samples without labeled samples. The first device is the predictor, performing the prediction task, while the second device is the auxiliary data provider, providing residual enhancement information to the first device to improve the accuracy of the prediction results generated by the first device.
[0057] In one feasible approach, the target prediction model can be a multi-layer neural network or a deep factorization machine model, used to classify the samples to be predicted. For example, assuming the output of the last fully connected layer of the target prediction model is z, and the activation function is the sigmoid function, then the classification result P = sigmoid(z), where P is the probability that the sample to be predicted belongs to a preset sample category.
[0058] Specifically, in step S10, the sample to be predicted is obtained, and then the sample to be predicted is input into the target prediction model for data processing. The data processing process includes convolution, pooling, and fully connected layers to obtain the output of the last fully connected layer of the target prediction model, thereby obtaining the target fully connected layer output. The target fully connected layer output is then converted into a first-party model prediction result through a preset activation function. The first-party model prediction result can be a classification probability.
[0059] Prior to the step of performing model prediction on the sample to be predicted based on the target prediction model to obtain the first-party model prediction result, the vertical federated prediction optimization method further includes:
[0060] Step A10: Extract the initial weights of the first-party model and obtain the training samples and the corresponding training sample labels;
[0061] In this embodiment, it should be noted that the number of training samples is at least 1, the training sample label is the identifier of the training sample, and the initial model weight of the first party is the initial value of the model weight representing the prediction accuracy of the model, which is preset in the first device. The model weight can be set to the logarithm of the ratio of the number of correctly classified samples to the number of misclassified samples; optionally, the initial value of the model weight can be set to 1.
[0062] Step A20: Based on the training samples, the training sample labels, and the first-party initial model weights, the target prediction model is iteratively trained and optimized by calculating the first-party model prediction loss corresponding to the target prediction model to be trained, thereby obtaining the target prediction model.
[0063] In this embodiment, it should be noted that the iterative training process of the target prediction model to be trained includes multiple iteration rounds, wherein each iteration round requires iterative training based on a preset number of training samples.
[0064] Specifically, in step A20, the training samples are input into the target prediction model to be trained to perform model prediction, obtaining the training model prediction result. Based on the training samples, the training model prediction result, and the first-party initial model weights, the first-party model prediction loss is calculated to determine whether the first-party model prediction loss has converged. If the first-party model prediction loss converges, the target prediction model to be trained is used as the target prediction model. If the first-party model prediction loss has not converged, based on the gradient calculated from the first-party model prediction loss, the target prediction model to be trained is updated using a preset model optimization method. The first-party initial model weights are also updated based on the training model prediction result and the training sample labels. The process then returns to the execution step: obtaining the training samples and their corresponding training sample labels for the next iteration. The preset model optimization method includes gradient descent and gradient ascent, etc. The formula for calculating the first-party model prediction loss based on the training samples, the training model prediction result, and the first-party initial model weights is as follows:
[0065]
[0066] Among them, L A (θ A ,α A ,X A Y) represents the prediction loss of the first-party model, and N represents the prediction loss of the second-party model. A θ represents the number of training samples in one iteration. A For the target prediction model to be trained, α A X represents the initial model weights of the first party. A For N A The training sample set consists of N training samples, and Y is N. A The label set consisting of the training sample labels corresponding to each training sample, y i Let x be the label of the i-th training sample in one iteration. A,i Let be the features of the i-th training sample in one iteration.
[0067] Further, after step A20, the first device counts the number of correctly classified samples and the number of misclassified samples during the iterative training of the target prediction model, obtaining the first-party correctly classified samples and the first-party misclassified samples. The first-party model weights are generated by calculating the ratio of the first-party correctly classified samples to the first-party misclassified samples. The formula for calculating the first-party model weights is as follows:
[0068]
[0069] Where, α A Let A be the weight of the first-party model, B be the number of correctly classified samples by the first-party model, and B be the number of incorrectly classified samples by the first-party model.
[0070] Step A30: The training sample labels and the first-party model prediction loss are sent to the second device, so that the second device can calculate the second-party model prediction loss based on the residual boosting model to be trained, the training ID matching sample corresponding to the training sample, the sample labels, and the obtained second-party initial model weights, and optimize the residual boosting model to be trained based on the residual loss calculated by the second-party model prediction loss and the first-party model prediction loss to obtain the vertical federated residual boosting model.
[0071] In this embodiment, it should be noted that the initial model weight of the second party is the initial value of the model weight representing the prediction accuracy of the model, which is preset in the second device. The model weight can be set to the logarithm of the ratio of the number of correctly classified samples to the number of misclassified samples. Optionally, the initial value of the model weight can be set to 1.
[0072] Specifically, in step A30, the training sample label, the corresponding first-party model prediction loss, and the corresponding training sample ID for each training sample during the iterative training of the target prediction model are sent to the second device. The second device then extracts the training sample ID and, based on the training sample ID, finds a training ID matching sample for the sample to be predicted. The second device then performs model prediction by inputting the training ID matching sample into the residual boosting model to be trained, obtaining the second-party training model prediction result corresponding to the training ID matching sample. Based on the second-party training model prediction result corresponding to the training ID matching sample, the corresponding training sample label, and the obtained second-party initial model weights, the second-party model prediction loss is calculated. The process of calculating the second-party model prediction loss can be referred to the process of the first device calculating the first-party model prediction loss, and will not be repeated here. The second device then calculates the residual loss based on the first-party model prediction loss and the second-party model prediction loss, and determines whether the residual loss has converged. If the residual loss converges, the training residual boosting model is used as the longitudinal federated residual boosting model; if the residual loss does not converge, the training residual boosting model is updated based on the gradient calculated from the residual loss, and the second-party initial model weights are updated based on the prediction results of the second-party training model corresponding to the training ID matching sample and the corresponding sample labels, and the execution step is returned: the second device extracts the training sample ID and performs the next iteration. The specific formula for calculating the residual loss by the second device is as follows:
[0073]
[0074] Where, L(θ) B ,α B ,X B Y) is the residual loss, N C θ represents the number of training ID matching samples in one iteration. B For the residual boosting model to be trained, α B X represents the initial model weights of the second party. B For N C The training sample set consists of N training ID matching samples, where Y is N. C The set of labels consisting of the training sample labels corresponding to each training ID matching sample. Let i be the label of the i-th training sample in one iteration. The features of the i-th training ID matching sample in one iteration are: For N C The first-party model prediction loss corresponding to each training ID matching sample.
[0075] Furthermore, the second device counts the number of correctly classified samples and the number of misclassified samples during the iterative training of the longitudinal federated residual boosting model, obtaining the second-party correctly classified sample count and the second-party misclassified sample count. Then, by calculating the ratio of the second-party correctly classified sample count to the second-party misclassified sample count, the second-party model weights are generated. The specific process of the second device generating the second-party model weights is similar to the process of the first device generating the first-party model weights, and will not be repeated here.
[0076] Step S20: Receive the second-party model prediction result generated by the second device based on the longitudinal federated residual boosting model for the ID matching sample corresponding to the sample to be predicted, and the second-party model weights corresponding to the longitudinal federated residual boosting model.
[0077] In this embodiment, it should be noted that the vertical federated residual enhancement model can be obtained by the second device performing residual learning based on vertical federated learning with the first device, using the sample labels in the first device and the model prediction loss of the target prediction model on the vertical federated common samples. The specific process of the second device performing residual learning based on vertical federated learning with the first device, using the sample labels in the first device and the model prediction loss of the target prediction model on the vertical federated common samples, can be referred to steps A10 to A30 above, and will not be repeated here. The vertical federated common samples are samples in the second device whose IDs are aligned with those in the first device, that is, training ID matching samples corresponding to the training samples in the first device.
[0078] Specifically, in step S20, the second device inputs the ID matching sample corresponding to the sample to be predicted into the longitudinal federated residual boosting model, performs model prediction on the ID matching sample, obtains the second-party model prediction result, and then sends the second-party model prediction result and the second-party model weight corresponding to the longitudinal federated residual boosting model to the first device, and then the first device receives the second-party model prediction result and the second-party model weight sent by the second device.
[0079] Prior to the step of receiving the second-party model prediction result generated by the second device performing model prediction on the sample to be predicted based on the vertical federated residual boosting model and the second-party model weights corresponding to the vertical federated residual boosting model, the vertical federated prediction optimization method further includes:
[0080] Step B10: Send the ID of the sample to be predicted corresponding to the sample to be predicted to the second device so that the second device can find the ID matching sample corresponding to the sample ID to be predicted.
[0081] In this embodiment, it should be noted that the sample ID to be predicted is the sample ID of the sample to be predicted.
[0082] Step B20: If a search failure message is received from the second device, the prediction result of the first-party model is used as the target prediction result.
[0083] Specifically, in step B20, if a lookup failure message is received from the second device, it proves that the sample to be predicted is not an aligned sample between the first device and the second device. Then, the prediction result of the first model is used as the target prediction result, so as to achieve the purpose of performing sample prediction on the sample to be predicted independently based on the target prediction model as a complete model.
[0084] Step B30: If no search failure information is received from the second device, then the following steps are executed: Receive the second-party model prediction result generated by the second device based on the longitudinal federated residual boosting model for the sample to be predicted, and the second-party model weights corresponding to the longitudinal federated residual boosting model.
[0085] In this embodiment, if no lookup failure information is received from the second device, it proves that the sample to be predicted is an aligned sample between the first device and the second device. Then, the following steps are executed: receiving the second-party model prediction result generated by the second device based on the vertical federated residual boosting model for the sample to be predicted, and the second-party model weights corresponding to the vertical federated residual boosting model, to obtain the residual boosting information sent by the second device. The residual boosting information is the second-party model prediction result output by the vertical federated residual boosting model in the second device.
[0086] Step S30: Obtain the weights of the first-party model corresponding to the target prediction model, and based on the weights of the first-party model and the weights of the second-party model, perform weighted aggregation on the prediction results of the first-party model and the prediction results of the second-party model to obtain the target federated prediction result.
[0087] In this embodiment, specifically, the weights of the first-party model corresponding to the target prediction model are obtained. Based on the first-party model weights and the second-party model weights, the prediction results of the first-party model and the prediction results of the second-party model are weighted and aggregated according to a preset aggregation rule to obtain the target federated prediction result. The preset aggregation rule includes summation and averaging, thereby achieving the goal of improving the accuracy of the first device's sample prediction for the sample to be predicted by utilizing the residual enhancement information generated by the second device.
[0088] Furthermore, the target prediction model can be set as a binary classification model for use as a recommendation model. That is, by performing binary classification on the sample to be predicted, it determines whether to recommend the item corresponding to the sample to be predicted or whether to recommend the item to the user corresponding to the sample to be predicted. Since the embodiments of this application achieve the goal of accurately predicting unaligned samples locally based on the complete model when performing vertical federated prediction based on residual enhancement information with higher accuracy on aligned samples, the overall sample prediction accuracy of vertical federated prediction is improved, thus improving the overall recommendation accuracy of the recommendation model.
[0089] Furthermore, existing vertical federated prediction models require collaboration among all participants in the vertical federated learning process to perform model predictions. If any participant experiences data loss or service outage, it becomes impossible to predict samples based on the complete model and sample data, thus affecting the accuracy of sample predictions. However, in this embodiment, since the target prediction model is held solely by the first device, even if the second device experiences data loss or service outage, the first device can still rely on the target prediction model as a complete model to perform sample predictions independently, thereby improving the accuracy of sample predictions when participants in the vertical federated learning process experience data loss or service outages.
[0090] This application provides a vertical federated prediction optimization method. Compared to the existing technology where, for misaligned samples in a vertical federated prediction scenario, the predictor performs local prediction based on a locally held portion of the vertical federated prediction model, this application obtains the sample to be predicted and performs model prediction on the sample based on a target prediction model to obtain a first-party model prediction result. Since the target prediction model is locally iteratively trained by the first device, the purpose of performing sample prediction on the sample to be predicted locally based on the locally iteratively trained target prediction model is achieved. Therefore, for a sample to be predicted that is misaligned, the first device can independently and accurately predict the sample based on the target prediction model as a complete model. Furthermore, it receives the second-party model prediction result generated by the second device performing model prediction on the ID matching sample corresponding to the sample to be predicted based on the vertical federated residual boosting model, and the second-party model weights corresponding to the vertical federated residual boosting model. For ID-matching samples aligned with the samples to be predicted, the second device performs model prediction on the ID-matching samples based on the vertical federated residual boosting model to generate residual boosting information corresponding to the samples to be predicted, i.e., the second-party model prediction result. Then, it obtains the first-party model weights corresponding to the target prediction model, and based on the first-party model weights and the second-party model weights, performs weighted aggregation on the first-party model prediction result and the second-party model prediction result to obtain the target federated prediction result. Therefore, for samples to be predicted that are aligned between the first and second devices, the first device can use the residual boosting information (second-party model prediction result) generated by the second device based on the vertical federated residual boosting model for the ID-matching samples aligned with the samples to be predicted to improve the accuracy of the first-party model prediction result output by the target prediction model, thus achieving vertical federated prediction of the samples to be predicted based on residual boosting information. Therefore, this method achieves the goal of accurately predicting unaligned samples locally on its own, based on the complete model, while performing more accurate longitudinal federated predictions based on residual enhancement information for aligned samples. This overcomes the technical defect that the predictor cannot perform sample predictions based on the complete model for unaligned samples when performing more accurate federated predictions for aligned samples, thus reducing the overall sample prediction accuracy. This method improves the overall sample prediction accuracy of longitudinal federated predictions.
[0091] Furthermore, referring to Figure 2 In another embodiment of this application, the vertical federated prediction optimization method is applied to a second device, and the vertical federated prediction optimization method includes:
[0092] Step C10: Locate ID matching samples and perform model prediction on the ID matching samples based on the longitudinal federated residual boosting model to obtain the second-party model prediction results;
[0093] In this embodiment, it should be noted that the vertical federated residual enhancement model is obtained by the second device based on the vertical federated common samples, combining the sample labels in the first device and the model prediction loss of the target prediction model on the vertical federated common samples, and performing residual learning based on vertical federated learning with the first device. The specific process of the second device obtaining the vertical federated residual enhancement model based on the vertical federated common samples, combining the sample labels in the first device and the model prediction loss of the target prediction model on the vertical federated common samples, and performing residual learning based on vertical federated learning with the first device can be referred to the content of steps A10 to A30 above, and will not be repeated here.
[0094] Specifically, in step C10, the ID matching sample corresponding to the sample to be predicted is found, and the ID matching sample is input into the vertical federated residual boosting model for data processing. The data processing includes convolution, pooling, and fully connected layers to obtain the output of the last fully connected layer of the vertical federated residual boosting model, thus obtaining the output of the second fully connected layer. A preset activation function is then used to convert the output of the second fully connected layer into a second classification probability, which is then used as the prediction result of the second model.
[0095] The vertical federated prediction optimization method further includes, after the step of finding ID matching samples, the following:
[0096] Step D10: If the search is successful, proceed to the following step: Based on the longitudinal federated residual boosting model, perform model prediction on the ID matching sample to obtain the second-party model prediction result;
[0097] In this embodiment, if the search is successful, it proves that the second device possesses an aligned sample corresponding to the sample to be predicted, i.e., an ID-matched sample. Then, the following steps are executed: based on the vertical federated residual enhancement model, model prediction is performed on the ID-matched sample to obtain the second-party model prediction result, thereby generating residual enhancement information corresponding to the sample to be predicted based on the vertical federated residual enhancement model. The residual enhancement information is the second-party model prediction result. This residual enhancement information is then sent to the first device, allowing the first device to improve the accuracy of its sample prediction results for the sample to be predicted based on the residual enhancement information.
[0098] Step D20: If the search fails, the search failure information is fed back to the first device, so that after receiving the search failure information, the first device can use the first-party model prediction result generated by the target prediction model for the sample to be predicted as the target prediction result.
[0099] In this embodiment, if the search fails, it proves that the second device does not have an aligned sample corresponding to the sample to be predicted, and then sends a search failure message back to the first device. After receiving the search failure message, the first device can directly use the first-party model prediction result generated by the target prediction model for the sample to be predicted as the target prediction result, so as to achieve the purpose of independently predicting unaligned samples based on the target prediction model as a complete model.
[0100] Prior to the step of performing model prediction on the ID-matching samples based on the vertical federated residual boosting model to obtain the second-party model prediction results, the vertical federated prediction optimization method further includes:
[0101] Step E10: Obtain the initial weights of the second-party model and receive the training sample labels and the prediction loss of the first-party model sent by the first device. The prediction loss of the first-party model is calculated by the first device based on the prediction results of the training model on the training samples and the training sample labels.
[0102] In this embodiment, it should be noted that the specific process of the first device generating the first-party model prediction loss can be referred to the specific content of steps A10 to A20 above, and will not be repeated here.
[0103] Additionally, it should be noted that the first device needs to send the training sample ID, the corresponding training sample label, and the corresponding first-party model prediction loss of all training samples corresponding to the target prediction model during the iterative training process to the second device.
[0104] Step E20: Obtain training ID matching samples, and perform model prediction on the training ID matching samples based on the residual improvement model to be trained, to obtain the prediction result of the second-party training model;
[0105] Specifically, in step E20, after receiving the training sample IDs of each training sample corresponding to the target prediction model sent by the first device, the training sample IDs are extracted, and the training ID matching samples corresponding to the training sample IDs are found. Then, the training ID matching samples are input into the residual improvement model to be trained to perform model prediction, and the prediction result of the second training model is obtained.
[0106] Step E30: Calculate the second-party model prediction loss based on the training sample labels, the prediction results of the second-party training model, and the weights of the second-party initial model.
[0107] Specifically, the training sample labels corresponding to the training samples matching the training ID are extracted, and the second-party model prediction loss is calculated based on the training sample labels, the prediction results of the second-party training model, and the initial weights of the second-party model. The specific formula for calculating the second-party model prediction loss based on the training sample labels, the prediction results of the second-party training model, and the initial weights of the second-party model is as follows:
[0108]
[0109] Among them, L B (θ B ,α B ,X B Y) represents the prediction loss of the second-party model, and N C θ represents the number of training ID matching samples in one iteration. B For the residual boosting model to be trained, α B X represents the initial model weights of the second party. B For N C The training sample set consists of N training ID matching samples, where Y is N. C The set of labels consisting of the training sample labels corresponding to each training ID matching sample. Let i be the label of the i-th training sample in one iteration. Let be the features of the i-th training ID matching sample in one iteration.
[0110] Step E40: Based on the residual loss generated by the prediction loss of the first-party model and the prediction loss of the second-party model, iteratively optimize the training residual enhancement model to obtain the longitudinal federated residual enhancement model.
[0111] Specifically, based on the prediction loss of the first-party model and the prediction loss of the second-party model, a residual loss is calculated, and then it is determined whether the residual loss has converged. If the residual boosting model converges, the residual boosting model to be trained is used as the longitudinal federated residual boosting model; if the residual loss has not converged, based on the gradient calculated by the residual loss, the residual boosting model to be trained is updated using a preset model optimization method, and based on the prediction result of the second-party training model corresponding to the training ID matching sample and the corresponding training sample label, the initial weights of the second-party model are updated, and the execution step is returned: obtain the training ID matching sample and perform the next iteration. The specific process of calculating the residual loss based on the prediction loss of the first-party model and the prediction loss of the second-party model can be found in step A30, and will not be repeated here.
[0112] Furthermore, the second device counts the number of correctly classified samples and the number of misclassified samples in the residual boosting model during iterative training, obtaining the second-party correctly classified sample count and the second-party misclassified sample count. Then, by calculating the ratio of the second-party correctly classified sample count to the second-party misclassified sample count, the second-party model weights are generated. The specific process of the second device generating the second-party model weights is similar to the process of the first device generating the first-party model weights, and will not be repeated here.
[0113] Step C20: Obtain the second-party model weights corresponding to the longitudinal federated residual enhancement model, and send the second-party model prediction results and the second-party model weights to the first device, so that the first device can generate a target federated prediction result based on the first-party model prediction results generated by the target prediction model for the samples to be predicted corresponding to the training ID matching samples, the first-party model weights corresponding to the target prediction model, the second-party model prediction results, and the second-party model weights. The target prediction model is obtained by the first device through local iterative training.
[0114] In this embodiment, it should be noted that the specific process by which the first device generates the first-party model prediction result based on the target prediction model for the sample to be predicted corresponding to the training ID matching sample can be referred to the specific steps in step S10, and will not be repeated here.
[0115] Specifically, the second-party model weights corresponding to the longitudinal federated residual enhancement model are obtained, and the prediction results and weights of the second-party model are sent to the first device. The first device then performs weighted aggregation on the prediction results of the first-party model and the second-party model based on the first-party model weights and the second-party model weights corresponding to the target prediction model, according to a preset aggregation rule, to obtain the target federated prediction result. This achieves the optimization of the first-party model prediction results of the samples to be predicted in the first device based on the residual enhancement information of the second device, thereby improving the accuracy of the first device's sample prediction results for the samples to be predicted.
[0116] This application provides a vertical federated prediction optimization method. Compared to the existing technology where the predictor performs local prediction based on a locally held portion of the vertical federated prediction model for misaligned samples in a vertical federated prediction scenario, this application first finds ID-matching samples and performs model prediction on the ID-matching samples based on the vertical federated residual enhancement model to obtain the second-party model prediction result. This achieves the purpose of generating residual enhancement information corresponding to the sample to be predicted in the first device. Then, the second-party model weights corresponding to the vertical federated residual enhancement model are obtained, and the second-party model prediction result and the second-party model weights are sent to the first device. The first device then generates the target federated prediction result based on the first-party model prediction result generated by the target prediction model for the sample to be predicted corresponding to the ID-matching sample, the first-party model weights corresponding to the target prediction model, the second-party model prediction result, and the second-party model weights. The target prediction model is obtained through local iterative training by the first device. This enables the optimization of the first-party model prediction results generated by the first device using residual enhancement information generated by the second device for aligned samples, thereby generating target federated prediction results with higher sample prediction accuracy. Furthermore, since the target prediction model is obtained through local iterative training by the first device, for unaligned samples, the first device can also perform sample prediction locally on its own based on the target prediction model, which serves as a complete model. This overcomes the technical defect that the predictor cannot perform sample prediction based on the complete model for unaligned samples when performing more accurate federated prediction for aligned samples, resulting in lower overall sample prediction accuracy. This improves the overall sample prediction accuracy of vertical federated prediction.
[0117] Furthermore, referring to Figure 3 In another embodiment of this application, a vertical federated learning modeling optimization method is also provided. This vertical federated learning modeling optimization method is applied to a first device and includes:
[0118] Step F10: Extract the first-party initial model weights and obtain the training samples and the corresponding training sample labels;
[0119] In this embodiment, it should be noted that the vertical federated learning modeling optimization method is applied to a vertical federated learning scenario, where both the first device and the second device are participants in the scenario. The first device has samples with labeled samples, while the second device has samples without labeled samples. The first device acts as the predictor, used to construct a prediction model, while the second device acts as the auxiliary data provider, used to construct a vertical federated residual boosting model that provides residual boosting information to the first device, thereby improving the accuracy of the prediction results generated by the prediction model in the first device.
[0120] Additionally, it should be noted that the number of training samples is at least one, the training sample label is the identifier of the training sample, and the initial model weight of the first party is the initial value of the model weight representing the prediction accuracy of the model, which is preset in the first device. Specifically, the model weight can be set to the logarithm of the ratio of the number of correctly classified samples to the number of misclassified samples; optionally, the initial value of the model weight can be set to 1.
[0121] Step F20: Based on the training samples, the training sample labels, and the first-party initial model weights, the target prediction model is iteratively trained and optimized by calculating the first-party model prediction loss corresponding to the target prediction model to be trained, thereby obtaining the target prediction model.
[0122] Specifically, by inputting the training samples into the target prediction model to be trained and performing model prediction, the prediction result of the training model is obtained. Based on the training samples, the prediction result of the training model, and the initial weights of the first-party model, the prediction loss of the first-party model is calculated, and then it is determined whether the prediction loss of the first-party model has converged. If the prediction loss of the first-party model has converged, the target prediction model to be trained is used as the target prediction model; if the prediction loss of the first-party model has not converged, based on the gradient calculated by the prediction loss of the first-party model, the target prediction model to be trained is updated using a preset model optimization method, and the initial weights of the first-party model are updated based on the prediction result of the training model and the labels of the training samples, and the process returns to the execution step: obtaining the training samples and the corresponding training sample labels, and performing the next iteration. The preset model optimization method includes gradient descent and gradient ascent, etc. The calculation process of calculating the prediction loss of the first-party model based on the training samples, the prediction result of the training model, and the initial weights of the first-party model can be referred to the specific content in step A20, and will not be repeated here.
[0123] The step of obtaining a target prediction model by iteratively training and optimizing the target prediction model based on the training samples, the training sample labels, and the first-party initial model weights includes:
[0124] Step F21: Based on the target prediction model to be trained, perform model prediction on the training samples to obtain the training model prediction result;
[0125] Specifically, in step F21, the training samples are input into the target prediction model to be trained for data processing. This data processing includes convolution, pooling, and fully connected layers to obtain the output of the last fully connected layer of the target prediction model, thus obtaining the output of the trained fully connected layer. Then, based on a preset activation function, the output of the trained fully connected layer is converted into the prediction result of the trained model.
[0126] Step F22: Calculate the prediction loss of the first-party model based on the training sample labels, the prediction results of the training model, and the initial weights of the first-party model.
[0127] In this embodiment, it should be noted that the specific calculation process of step F22 can be referred to the content of step A20, and will not be repeated here.
[0128] Step F23: Update the initial weights of the first-party model based on the prediction results of the training model and the labels of the training samples;
[0129] Specifically, in step F23, based on the prediction results of the training model and the labels of the training samples, the number of currently misclassified samples and the number of currently correctly classified samples corresponding to the residual improvement model to be trained are updated. Then, the first-party initial model weights are recalculated by calculating the ratio of the number of currently correctly classified samples to the number of currently misclassified samples. The process of recalculating the first-party initial model weights can be referred to in detail in step A20 on the process of the first device calculating the first-party model weights, which will not be repeated here.
[0130] Step F24: Based on the prediction loss of the first-party model and the updated weights of the first-party initial model, iteratively optimize the target prediction model to be trained to obtain the target prediction model.
[0131] Specifically, it is determined whether the prediction loss of the first-party model has converged. If the prediction loss of the first-party model has converged, the target prediction model to be trained is used as the target prediction model, and the updated first-party initial model weights are used as the first-party model weights. If the prediction loss of the first-party model has not converged, the target prediction model to be trained is updated based on the gradient calculated by the prediction loss of the first-party model using a preset model optimization method, and the execution steps are returned: obtaining training samples and the corresponding training sample labels, so as to realize the next round of iteration based on the updated target prediction model to be trained and the updated first-party initial model weights.
[0132] The longitudinal federated learning modeling optimization method further includes, after the step of calculating the prediction loss of the first-party model corresponding to the target prediction model to be trained by iteratively training and optimizing the target prediction model to obtain the target prediction model based on the training samples, the training sample labels, and the first-party initial model weights, the method further includes:
[0133] Step G10: Obtain the number of correctly classified first-party samples and the number of incorrectly classified first-party samples corresponding to the target prediction model;
[0134] In this embodiment, it should be noted that the number of correctly classified samples by the first party is the number of training samples in which the output classification label of the training sample and the corresponding training sample label are consistent during the iterative training process of the target prediction model, and the number of incorrectly classified samples by the first party is the number of training samples in which the output classification label of the training sample and the corresponding training sample label are inconsistent during the iterative training process of the target prediction model.
[0135] Step G20: The first-party model weights are generated by calculating the ratio of the number of correctly classified samples to the number of incorrectly classified samples.
[0136] In this embodiment, the specific calculation process of step G20 is as follows:
[0137]
[0138] Where, α A Let A be the weight of the first-party model, B be the number of correctly classified samples by the first-party model, and B be the number of incorrectly classified samples by the first-party model.
[0139] Step F30: The training sample labels and the first-party model prediction loss are sent to the second device so that the second device can calculate the second-party model prediction loss and optimize the training residual enhancement model based on the residual loss calculated by the second-party model prediction loss and the first-party model prediction loss to obtain the vertical federated residual enhancement model.
[0140] In this embodiment, it should be noted that the second-party model prediction loss is calculated based on the residual improvement model to be trained, the training ID matching sample corresponding to the training sample, the sample label, and the obtained second-party initial model weights.
[0141] Specifically, during the iterative training of the target prediction model, the training sample labels, the corresponding first-party model prediction losses, and the corresponding training sample IDs for all training samples are sent to the second device. The second device then extracts the training sample IDs and, based on these IDs, finds matching samples. These matching samples are then input into the residual enhancement model to be trained to perform model prediction, obtaining the second-party training model prediction result. Based on the second-party training model prediction result corresponding to the matching samples, the corresponding training sample labels, and the obtained second-party initial model weights, the second-party model prediction loss is calculated. The second device then calculates the residual loss based on the first-party model prediction loss and the second-party model prediction loss, and iteratively optimizes the residual enhancement model to be trained based on the residual loss to obtain the vertical federated residual enhancement model. The specific process of the second device constructing the vertical federated residual enhancement model can be found in steps A10 to A30, and will not be repeated here.
[0142] The method for optimizing the vertical federated learning modeling after the steps of sending the training sample labels and the first-party model prediction loss to the second device for the second device to calculate the second-party model prediction loss and optimizing the residual boosting model to be trained based on the residual loss calculated by the second-party model prediction loss and the first-party model prediction loss to obtain the vertical federated residual boosting model further includes:
[0143] Step H10: Obtain the sample to be predicted, and perform model prediction on the sample to be predicted based on the target prediction model to obtain the first-party model prediction result;
[0144] In this embodiment, specifically, a sample to be predicted is obtained, and then the sample to be predicted is input into a target prediction model for data processing. The data processing process includes convolution, pooling, and fully connected layers to obtain the output of the last fully connected layer of the target prediction model, thus obtaining the target fully connected layer output. The target fully connected layer output is then converted into a classification probability using a preset activation function, and the classification probability is then used as the prediction result of the first-party model.
[0145] Step H20: Receive the second-party model prediction result and the second-party model weights generated by the second device based on the longitudinal federated residual boosting model for the ID matching sample corresponding to the sample to be predicted.
[0146] In this embodiment, specifically, the ID of the sample to be predicted is sent to a second device, which then searches for a matching sample based on the ID. If the second device finds a match, it performs model prediction on the matching sample using a vertical federated residual boosting model to obtain a second-party model prediction result. The second-party model prediction result and the corresponding weights of the vertical federated residual boosting model are then sent to a first device, which receives the second-party model prediction result and the weights. If the second device fails to find a match, it sends a search device information back to the first device. If the first device receives the search device information, it confirms that the sample to be predicted is an unaligned sample, and the first-party model prediction result is directly used as the target prediction result, thus achieving the purpose of predicting unaligned samples based on a complete target prediction model.
[0147] Step H30: Based on the first-party model weights and the second-party model weights corresponding to the target prediction model, the prediction results of the first-party model and the prediction results of the second-party model are weighted and aggregated to obtain the target federated prediction result.
[0148] In this embodiment, specifically, based on the first-party model weights and the second-party model weights corresponding to the target prediction model, the prediction results of the first-party model and the prediction results of the second-party model are weighted and aggregated by a preset aggregation rule to obtain the target federated prediction result.
[0149] This application provides a vertical federated learning modeling optimization method. First, it extracts the initial weights of a first-party model and obtains training samples and their corresponding labels. Then, based on the training samples, labels, and initial weights, it iteratively trains and optimizes the target prediction model by calculating the prediction loss of the first-party model corresponding to the target prediction model to be trained, thus obtaining a target prediction model. This achieves the goal of constructing a complete target prediction model locally on a first device. Next, the training sample labels and the prediction loss of the first-party model are sent to a second device for calculating the prediction loss of the second-party model. Based on the residual loss calculated from the second and first-party model prediction losses, the residual boosting model to be trained is optimized to obtain a vertical federated residual boosting model. This achieves the goal of constructing a vertical federated residual boosting model on a second device using residual learning based on vertical federated learning. Furthermore, based on the target prediction model of the first device and the longitudinal federated residual enhancement model at the second device, it is possible to achieve more accurate longitudinal federated prediction of aligned samples based on residual enhancement information. At the same time, based on the target prediction model as a complete model, it is possible to accurately predict unaligned samples locally. This lays the foundation for overcoming the technical defect that the predictor cannot perform sample prediction of unaligned samples based on the complete model when performing more accurate federated prediction of aligned samples, which leads to a decrease in the overall sample prediction accuracy.
[0150] Furthermore, referring to Figure 4 In another embodiment of this application, a vertical federated learning modeling optimization method is also provided. This vertical federated learning modeling optimization method is applied to a second device and includes:
[0151] Step Q10: Obtain the initial weights of the second-party model and receive the training sample labels and the first-party model prediction loss sent by the first device. The first-party model prediction loss is calculated by the first device based on the first-party model prediction result of the target prediction model on the training samples corresponding to the training ID matching samples and the training sample labels.
[0152] In this embodiment, it should be noted that the specific process of the first device calculating the first-party model prediction loss can be referred to the specific content in steps A10 to A20, and will not be repeated here.
[0153] Obtain the initial weights of the second-party model and receive the training sample labels and the prediction loss of the first-party model sent by the first device. Specifically, obtain the initial weights of the second-party model and receive the training sample labels and the corresponding prediction losses of the first-party model for all training samples of the target prediction model during iterative training sent by the first device.
[0154] Step Q20: Obtain training ID matching samples, and perform model prediction on the training ID matching samples based on the residual improvement model to be trained, to obtain the prediction result of the second-party training model;
[0155] Specifically, after receiving the training sample IDs corresponding to all training samples of the target prediction model sent by the first device, the training sample IDs are extracted, and the training ID matching samples corresponding to the training sample IDs are found. Then, the training ID matching samples are input into the residual improvement model to be trained to perform model prediction and obtain the prediction result of the second-party training model.
[0156] Step Q30: Calculate the prediction loss of the second-party model based on the training sample labels, the prediction results of the second-party training model, and the initial weights of the second-party model.
[0157] In this embodiment, it should be noted that the specific process of the second device calculating the second-party model prediction loss in step Q30 can be referred to the specific content in step E30, and will not be repeated here.
[0158] Step Q40: Based on the residual loss generated by the prediction loss of the first-party model and the prediction loss of the second-party model, iteratively optimize the training residual boosting model to obtain the longitudinal federated residual boosting model.
[0159] Specifically, based on the prediction loss of the first-party model and the prediction loss of the second-party model, a residual loss is calculated, and then it is determined whether the residual loss has converged. If the residual boosting model converges, the residual boosting model to be trained is used as the vertical federated residual boosting model; if the vertical federated residual boosting model has not converged, based on the gradient calculated by the residual loss, the residual boosting model to be trained is updated using a preset model optimization method, and based on the prediction result of the second-party training model corresponding to the training ID matching sample and the corresponding sample label, the initial weights of the second-party model are updated, and the execution step is returned: obtain the training ID matching sample and perform the next iteration. The specific process of calculating the residual loss based on the prediction loss of the first-party model and the prediction loss of the second-party model can be referred to the specific content in step A30, and will not be repeated here.
[0160] The longitudinal federated learning modeling optimization method further includes, after the step of iteratively optimizing the trainable residual boosting model based on the residual loss generated by the first-party model prediction loss and the second-party model prediction loss to obtain the longitudinal federated residual boosting model:
[0161] Step W10: Obtain the number of correctly classified samples and the number of incorrectly classified samples corresponding to the longitudinal federated residual boosting model.
[0162] In this embodiment, it should be noted that the number of correctly classified samples in the second party is the number of training ID matching samples in which the output classification label of the training ID matching sample and the corresponding training sample label are consistent during the iterative training process of the vertical federated residual boosting model, and the number of incorrectly classified samples in the second party is the number of training ID matching samples in which the output classification label of the training ID matching sample and the corresponding training sample label are inconsistent during the iterative training process of the vertical federated residual boosting model.
[0163] Step W20: The second-party model weights are generated by calculating the ratio of the number of correctly classified samples to the number of incorrectly classified samples.
[0164] In this embodiment, the specific calculation process of step W20 is as follows:
[0165]
[0166] Where, α A Here, A represents the number of correctly classified samples by the second-party model, and B represents the number of incorrectly classified samples by the second-party model.
[0167] The longitudinal federated learning modeling optimization method further includes, after the step of iteratively optimizing the trainable residual boosting model based on the residual loss to obtain the longitudinal federated residual boosting model:
[0168] Step R10: Find ID matching samples, and perform model prediction on the ID matching samples based on the longitudinal federated residual boosting model to obtain the second-party model prediction results;
[0169] Specifically, the system receives the ID of the sample to be predicted corresponding to the sample to be predicted sent by the first device, finds the ID matching sample corresponding to the ID, and performs model prediction by inputting the ID matching sample into the longitudinal federated residual boosting model to obtain the second-party model prediction result. The specific process of the second device generating the second-party model prediction result can be referred to the specific content in step C10, and will not be repeated here.
[0170] Step R20: Send the second-party model prediction result and the second-party model weights corresponding to the longitudinal federated residual enhancement model to the first device, so that the first device can generate a target federated prediction result based on the first-party model prediction result generated by the target prediction model for the sample to be predicted corresponding to the training ID matching sample, the first-party model weights corresponding to the target prediction model, the second-party model prediction result, and the second-party model weights. The target prediction model is obtained by the first device through local iterative training.
[0171] In this embodiment, it should be noted that the specific process by which the first device generates the first-party model prediction result based on the target prediction model for the sample to be predicted corresponding to the training ID matching sample can be referred to the specific steps in step S10, and will not be repeated here.
[0172] Specifically, the second-party model weights corresponding to the longitudinal federated residual enhancement model are obtained, and the prediction results and weights of the second-party model are sent to the first device. The first device then performs weighted aggregation on the prediction results of the first-party model and the second-party model based on the first-party model weights and the second-party model weights corresponding to the target prediction model, according to a preset aggregation rule, to obtain the target federated prediction result. This achieves the optimization of the first-party model prediction results of the samples to be predicted in the first device based on the residual enhancement information of the second device, thereby improving the sample prediction results of the samples to be predicted in the first device.
[0173] This application provides a method for optimizing vertical federated learning modeling. It obtains initial second-party model weights and receives training sample labels and a first-party model prediction loss from a first device. The first-party model prediction loss is calculated by the first device based on the first-party model prediction result of the target prediction model on the training sample corresponding to the training ID matching sample and the training sample labels. Then, it obtains training ID matching samples and performs model prediction on the training ID matching samples based on the residual boosting model to be trained, obtaining a second-party training model prediction result. Based on the training sample labels, the second-party training model prediction result, and the second-party initial model weights, it calculates the second-party model prediction loss. Based on the residual loss generated from the first-party model prediction loss and the second-party model prediction loss, iteratively optimizes the residual boosting model to be trained, obtaining the vertical federated residual boosting model, thus achieving the goal of performing residual learning based on vertical federated learning jointly with the first device. Furthermore, based on the longitudinal federated residual enhancement model, for aligned samples, the residual enhancement information generated by the second device can be used to optimize the first-party model prediction results generated by the first device, so as to generate target federated prediction results with higher sample prediction accuracy. This lays the foundation for overcoming the technical defect that the predictor cannot perform sample prediction based on the complete model for unaligned samples when performing federated prediction with higher accuracy for aligned samples, thus reducing the overall sample prediction accuracy.
[0174] Reference Figure 5 , Figure 5 This is a schematic diagram of the device architecture of the hardware operating environment involved in the embodiments of this application.
[0175] like Figure 5As shown, the vertical federated prediction optimization device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to establish communication between the processor 1001 and the memory 1005. The memory 1005 may be high-speed RAM or stable non-volatile memory, such as disk storage. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0176] Optionally, the vertical federated prediction optimization device may also include a rectangular user interface, a network interface, a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, etc. The rectangular user interface may include a display screen and an input submodule such as a keyboard; optionally, the rectangular user interface may also include a standard wired interface or a wireless interface. The network interface may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0177] Those skilled in the art will understand that Figure 5 The vertical federated prediction optimization device architecture shown in the figure does not constitute a limitation on the vertical federated prediction optimization device, which may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0178] like Figure 5 As shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, and a vertical federated prediction optimization program. The operating system is a program that manages and controls the hardware and software resources of the vertical federated prediction optimization device, supporting the operation of the vertical federated prediction optimization program and other software and / or programs. The network communication module is used to enable communication between the various components within the memory 1005, as well as communication with other hardware and software in the vertical federated prediction optimization system.
[0179] exist Figure 5 In the vertical federated prediction optimization device shown, the processor 1001 is used to execute the vertical federated prediction optimization program stored in the memory 1005 to implement the steps of the vertical federated prediction optimization method described above.
[0180] The specific implementation of the vertical federated prediction optimization device in this application is basically the same as the embodiments of the above-described vertical federated prediction optimization method, and will not be repeated here.
[0181] Reference Figure 6 , Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application.
[0182] like Figure 6 As shown, the vertical federated learning modeling optimization device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to establish communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM or a stable, non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0183] Optionally, the longitudinal federated learning modeling optimization device may also include a rectangular user interface, a network interface, a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, etc. The rectangular user interface may include a display screen and an input submodule such as a keyboard; optionally, the rectangular user interface may also include a standard wired interface or a wireless interface. The network interface may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0184] Those skilled in the art will understand that Figure 6 The structure of the longitudinal federated learning modeling optimization device shown in the figure does not constitute a limitation on the longitudinal federated learning modeling optimization device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0185] like Figure 6 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, and a vertical federated learning modeling optimization program. The operating system is a program that manages and controls the hardware and software resources of the vertical federated learning modeling optimization device, supporting the operation of the vertical federated learning modeling optimization program and other software and / or programs. The network communication module is used to enable communication between the various components within the memory 1005, as well as communication with other hardware and software in the vertical federated learning modeling optimization system.
[0186] exist Figure 6 In the vertical federated learning modeling optimization device shown, the processor 1001 is used to execute the vertical federated learning modeling optimization program stored in the memory 1005 to implement the steps of the vertical federated learning modeling optimization method described above.
[0187] The specific implementation of the vertical federated learning modeling optimization device in this application is basically the same as the embodiments of the above-mentioned vertical federated learning modeling optimization method, and will not be repeated here.
[0188] This application embodiment also provides a vertical federated prediction optimization apparatus, which is applied to a first device, and the vertical federated prediction optimization apparatus includes:
[0189] The model prediction module is used to acquire the sample to be predicted and perform model prediction on the sample to be predicted based on the target prediction model to obtain the first-party model prediction result, wherein the target prediction model is obtained by local iterative training of the first device;
[0190] The receiving module is configured to receive the second-party model prediction result generated by the second device based on the vertical federated residual boosting model for the ID matching samples corresponding to the sample to be predicted, and the second-party model weights corresponding to the vertical federated residual boosting model. The vertical federated residual boosting model is obtained by the second device through residual learning based on vertical federated learning, using vertical federated common samples, combining the sample labels in the first device and the model prediction loss of the target prediction model on the vertical federated common samples.
[0191] The weighted aggregation module is used to obtain the weights of the first-party model corresponding to the target prediction model, and to perform weighted aggregation on the prediction results of the first-party model and the prediction results of the second-party model based on the weights of the first-party model and the weights of the second-party model to obtain the target federated prediction result.
[0192] Optionally, the vertical federated prediction optimization device is further used for:
[0193] The ID of the sample to be predicted corresponding to the sample to be predicted is sent to the second device so that the second device can find the ID matching sample corresponding to the sample ID to be predicted;
[0194] If a search failure message is received from the second device, the prediction result of the first-party model is used as the target prediction result.
[0195] If no lookup failure message is received from the second device, the following steps are performed: receive the second-party model prediction result generated by the second device based on the longitudinal federated residual boosting model for the sample to be predicted, and the second-party model weights corresponding to the longitudinal federated residual boosting model.
[0196] Optionally, the vertical federated prediction optimization device is further used for:
[0197] Extract the initial weights of the first-party model and obtain the training samples and the corresponding training sample labels;
[0198] Based on the training samples, the training sample labels, and the first-party initial model weights, the target prediction model is obtained by iteratively training and optimizing the target prediction model by calculating the first-party model prediction loss corresponding to the target prediction model to be trained;
[0199] The training sample labels and the first-party model prediction loss are sent to the second device, so that the second device can calculate the second-party model prediction loss based on the residual boosting model to be trained, the training ID matching sample corresponding to the training sample, the sample label, and the obtained second-party initial model weights, and optimize the residual boosting model to be trained based on the residual loss calculated by the second-party model prediction loss and the first-party model prediction loss to obtain the vertical federated residual boosting model.
[0200] The specific implementation of the vertical federated prediction optimization device in this application is basically the same as the embodiments of the vertical federated prediction optimization method described above, and will not be repeated here.
[0201] This application embodiment also provides a vertical federated prediction optimization apparatus, which is applied to a second device, and the vertical federated prediction optimization apparatus includes:
[0202] The model prediction module is used to find ID matching samples and perform model prediction on the ID matching samples based on the vertical federated residual boosting model to obtain the second-party model prediction result. The vertical federated residual boosting model is obtained by the second device based on vertical federated common samples, combining the sample labels and target prediction model's model prediction loss on the vertical federated common samples from the first device, and performing residual learning based on vertical federated learning with the first device.
[0203] The sending module is used to obtain the second-party model weights corresponding to the longitudinal federated residual enhancement model, and send the second-party model prediction results and the second-party model weights to the first device, so that the first device can generate a target federated prediction result based on the first-party model prediction results generated by the target prediction model for the samples to be predicted corresponding to the training ID matching samples, the first-party model weights corresponding to the target prediction model, the second-party model prediction results and the second-party model weights, wherein the target prediction model is obtained by the first device through local iterative training.
[0204] Optionally, the vertical federated prediction optimization device is further used for:
[0205] If the search is successful, proceed to the following steps: Based on the longitudinal federated residual boosting model, perform model prediction on the ID matching sample to obtain the second-party model prediction result;
[0206] If the search fails, a search failure message is sent to the first device, so that the first device can use the first-party model prediction result generated by the target prediction model for the sample to be predicted as the target prediction result after receiving the search failure message.
[0207] The specific implementation of the vertical federated prediction optimization device in this application is basically the same as the embodiments of the vertical federated prediction optimization method described above, and will not be repeated here.
[0208] This application embodiment also provides a vertical federated learning modeling optimization device, which is applied to a first device, and the vertical federated learning modeling optimization device includes:
[0209] The acquisition module is used to extract the initial weights of the first-party model and to obtain the training samples and the training sample labels corresponding to the training samples.
[0210] The iterative optimization module is used to iteratively train and optimize the target prediction model based on the training samples, the training sample labels, and the first-party initial model weights, by calculating the first-party model prediction loss corresponding to the target prediction model to be trained, and to obtain the target prediction model.
[0211] The sending module is used to send the training sample labels and the first-party model prediction loss to the second device, so that the second device can calculate the second-party model prediction loss and optimize the training residual enhancement model based on the residual loss calculated from the second-party model prediction loss and the first-party model prediction loss, thereby obtaining a vertical federated residual enhancement model. The second-party model prediction loss is calculated based on the training residual enhancement model to be trained, the training ID matching samples corresponding to the training samples, the sample labels, and the obtained second-party initial model weights.
[0212] Optionally, the iterative optimization module is further configured to:
[0213] Based on the target prediction model to be trained, perform model prediction on the training samples to obtain the training model prediction results;
[0214] Based on the training sample labels, the training model prediction results, and the first-party initial model weights, calculate the first-party model prediction loss;
[0215] Based on the prediction results of the training model and the labels of the training samples, update the weights of the first-party initial model;
[0216] Based on the prediction loss of the first-party model and the updated weights of the first-party initial model, the target prediction model to be trained is iteratively optimized to obtain the target prediction model.
[0217] Optionally, the longitudinal federated learning modeling optimization device is further used for:
[0218] Obtain the number of correctly classified first-party samples and the number of incorrectly classified first-party samples corresponding to the target prediction model;
[0219] The first-party model weights are generated by calculating the ratio of the number of correctly classified samples to the number of incorrectly classified samples.
[0220] Optionally, the longitudinal federated learning modeling optimization device is further used for:
[0221] Obtain the sample to be predicted, and perform model prediction on the sample to be predicted based on the target prediction model to obtain the first-party model prediction result;
[0222] Receive the second-party model prediction result and the second-party model weights generated by the second device based on the longitudinal federated residual improvement model for the ID matching sample corresponding to the sample to be predicted;
[0223] Based on the first-party model weights and the second-party model weights corresponding to the target prediction model, the prediction results of the first-party model and the prediction results of the second-party model are weighted and aggregated to obtain the target federated prediction result.
[0224] The specific implementation of the vertical federated learning modeling optimization device in this application is basically the same as the embodiments of the above-mentioned vertical federated learning modeling optimization method, and will not be repeated here.
[0225] This application embodiment also provides a vertical federated learning modeling optimization device, which is applied to a second device, and the vertical federated learning modeling optimization device includes:
[0226] The receiving module is used to obtain the initial model weights of the second party and receive the training sample labels and the first party model prediction loss sent by the first device, wherein the first party model prediction loss is calculated by the first device based on the first party model prediction result of the target prediction model on the training sample corresponding to the training ID matching sample and the training sample labels.
[0227] The model prediction module is used to obtain training ID matching samples, and improve the model based on the residual to be trained, and perform model prediction on the training ID matching samples to obtain the prediction results of the second-party training model.
[0228] The loss calculation module is used to calculate the prediction loss of the second-party model based on the training sample labels, the prediction results of the second-party training model, and the initial weights of the second-party model.
[0229] The iterative optimization module is used to iteratively optimize the training residual boosting model based on the residual loss generated by the prediction loss of the first-party model and the prediction loss of the second-party model, so as to obtain the longitudinal federated residual boosting model.
[0230] Optionally, the longitudinal federated learning modeling optimization device is further used for:
[0231] Obtain the number of correctly classified samples and the number of incorrectly classified samples corresponding to the longitudinal federated residual boosting model;
[0232] The second-party model weights are generated by calculating the ratio of the number of correctly classified samples to the number of incorrectly classified samples.
[0233] Optionally, the longitudinal federated learning modeling optimization device is further used for:
[0234] Find ID matching samples, and perform model prediction on the ID matching samples based on the longitudinal federated residual boosting model to obtain the second-party model prediction results;
[0235] The second-party model prediction result and the second-party model weights corresponding to the longitudinal federated residual enhancement model are sent to the first device, so that the first device can generate a target federated prediction result based on the first-party model prediction result generated by the target prediction model for the sample to be predicted corresponding to the training ID matching sample, the first-party model weights corresponding to the target prediction model, the second-party model prediction result and the second-party model weights, wherein the target prediction model is obtained by the first device through local iterative training.
[0236] The specific implementation of the vertical federated learning modeling optimization device in this application is basically the same as the embodiments of the above-mentioned vertical federated learning modeling optimization method, and will not be repeated here.
[0237] This application provides a medium that is a readable storage medium, and the readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the vertical federated prediction optimization method described in any of the above claims.
[0238] The specific implementation of the readable storage medium in this application is basically the same as the embodiments of the above-described vertical federated prediction optimization method, and will not be repeated here.
[0239] This application provides a medium that is a readable storage medium, and the readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the longitudinal federated learning modeling optimization method described in any of the above claims.
[0240] The specific implementation of the readable storage medium in this application is basically the same as the embodiments of the above-described vertical federated learning modeling optimization method, and will not be repeated here.
[0241] This application provides a computer program product, which includes one or more computer programs. The one or more computer programs can be executed by one or more processors to implement the steps of the vertical federated prediction optimization method described in any of the above claims.
[0242] The specific implementation of the computer program product in this application is basically the same as the embodiments of the above-described vertical federated prediction optimization method, and will not be repeated here.
[0243] This application provides a computer program product, which includes one or more computer programs. The one or more computer programs can be executed by one or more processors to implement the steps of the longitudinal federated learning modeling optimization method described in any of the above claims.
[0244] The specific implementation of the computer program product in this application is basically the same as the embodiments of the above-described vertical federated learning modeling and optimization method, and will not be repeated here.
[0245] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.
Claims
1. A vertical federated prediction optimization method, characterized in that, Applied to the first device, the longitudinal federated prediction optimization method includes: A sample to be predicted is obtained, and a model prediction is performed on the sample to be predicted based on the target prediction model to obtain a first-party model prediction result, wherein the target prediction model is obtained by local iterative training of the first device; The system receives the second-party model prediction result generated by the second device based on the vertical federated residual boosting model for the ID matching sample corresponding to the sample to be predicted, and the second-party model weights corresponding to the vertical federated residual boosting model. The vertical federated residual boosting model is obtained by the second device based on the vertical federated common samples, combined with the sample labels in the first device and the model prediction loss of the target prediction model on the vertical federated common samples, and by performing residual learning based on vertical federated learning with the first device. Obtain the weights of the first-party model corresponding to the target prediction model, and based on the weights of the first-party model and the weights of the second-party model, perform weighted aggregation on the prediction results of the first-party model and the prediction results of the second-party model to obtain the target federated prediction result; Before the step of performing model prediction on the sample to be predicted based on the target prediction model to obtain the first-party model prediction result, the vertical federated prediction optimization method further includes: Extract the initial weights of the first-party model and obtain the training samples and the corresponding training sample labels; Based on the training samples, the training sample labels, and the first-party initial model weights, the target prediction model is obtained by iteratively training and optimizing the target prediction model by calculating the first-party model prediction loss corresponding to the target prediction model to be trained; The training sample labels and the first-party model prediction loss are sent to the second device, so that the second device can calculate the second-party model prediction loss based on the residual boosting model to be trained, the training ID matching sample corresponding to the training sample, the sample label, and the obtained second-party initial model weights, and optimize the residual boosting model to be trained based on the residual loss calculated by the second-party model prediction loss and the first-party model prediction loss to obtain the vertical federated residual boosting model.
2. The vertical federated prediction optimization method as described in claim 1, characterized in that, Before the step of receiving the second-party model prediction result generated by the second device performing model prediction on the sample to be predicted based on the vertical federated residual boosting model and the second-party model weights corresponding to the vertical federated residual boosting model, the vertical federated prediction optimization method further includes: The ID of the sample to be predicted corresponding to the sample to be predicted is sent to the second device so that the second device can find the ID matching sample corresponding to the sample ID to be predicted; If a search failure message is received from the second device, the prediction result of the first-party model is used as the target prediction result. If no lookup failure message is received from the second device, the following steps are performed: receive the second-party model prediction result generated by the second device based on the longitudinal federated residual boosting model for the sample to be predicted, and the second-party model weights corresponding to the longitudinal federated residual boosting model.
3. A vertical federated prediction optimization method, characterized in that, Applied to the second device, the longitudinal federated prediction optimization method includes: Find ID matching samples and perform model prediction on the ID matching samples based on the vertical federated residual boosting model to obtain the second-party model prediction result. The vertical federated residual boosting model is obtained by the second device based on the vertical federated public samples, combined with the sample labels and target prediction model in the first device on the vertical federated public samples, and performing residual learning based on vertical federated learning with the first device. Obtain the second-party model weights corresponding to the longitudinal federated residual enhancement model, and send the second-party model prediction results and the second-party model weights to the first device, so that the first device can generate a target federated prediction result based on the first-party model prediction results generated by the target prediction model for the samples to be predicted corresponding to the training ID matching samples, the first-party model weights corresponding to the target prediction model, the second-party model prediction results and the second-party model weights, wherein the target prediction model is obtained by the first device through local iterative training; Before the step of performing model prediction on the ID-matching samples based on the vertical federated residual boosting model to obtain the second-party model prediction results, the vertical federated prediction optimization method further includes: The system obtains the initial weights of the second-party model and receives the training sample labels and the prediction loss of the first-party model sent by the first device. The prediction loss of the first-party model is calculated by the first device based on the prediction result of the training model of the target prediction model on the training samples and the training sample labels. Obtain training ID matching samples, and improve the model based on the residual to be trained, perform model prediction on the training ID matching samples to obtain the prediction results of the second-party training model; Based on the training sample labels, the prediction results of the second-party training model, and the initial weights of the second-party model, calculate the prediction loss of the second-party model. Based on the residual loss generated by the prediction loss of the first-party model and the prediction loss of the second-party model, the residual boosting model to be trained is iteratively optimized to obtain the longitudinal federated residual boosting model.
4. The vertical federated prediction optimization method as described in claim 3, characterized in that, Following the step of finding ID-matching samples, the vertical federated prediction optimization method further includes: If the search is successful, proceed to the following steps: Based on the longitudinal federated residual boosting model, perform model prediction on the ID matching sample to obtain the second-party model prediction result; If the search fails, a search failure message is sent to the first device, so that the first device can use the first-party model prediction result generated by the target prediction model for the sample to be predicted as the target prediction result after receiving the search failure message.
5. A longitudinal federated learning modeling optimization method, characterized in that, Applied to the first device, the longitudinal federated learning modeling optimization method includes: Extract the initial weights of the first-party model and obtain the training samples and the corresponding training sample labels; Based on the training samples, the training sample labels, and the first-party initial model weights, the target prediction model is obtained by iteratively training and optimizing the target prediction model to be trained by calculating the first-party model prediction loss corresponding to the target prediction model to be trained. The training sample labels and the first-party model prediction loss are sent to the second device so that the second device can calculate the second-party model prediction loss. Based on the residual loss calculated by the second-party model prediction loss and the first-party model prediction loss, the training residual enhancement model is optimized to obtain the vertical federated residual enhancement model. The second-party model prediction loss is calculated based on the training residual enhancement model to be trained, the training ID matching sample corresponding to the training sample, the sample label, and the obtained second-party initial model weight. The vertical federated residual enhancement model is obtained by the second device based on the vertical federated common sample, combined with the sample label in the first device and the model prediction loss of the target prediction model on the vertical federated common sample, and by performing residual learning based on vertical federated learning with the first device. Obtain the sample to be predicted, and perform model prediction on the sample to be predicted based on the target prediction model to obtain the first-party model prediction result; Receive the second-party model prediction result and the second-party model weights generated by the second device based on the longitudinal federated residual improvement model for the ID matching sample corresponding to the sample to be predicted; Based on the first-party model weights and the second-party model weights corresponding to the target prediction model, the prediction results of the first-party model and the prediction results of the second-party model are weighted and aggregated to obtain the target federated prediction result.
6. The vertical federated learning modeling optimization method as described in claim 5, characterized in that, The step of obtaining a target prediction model by iteratively training and optimizing the target prediction model based on the training samples, the training sample labels, and the first-party initial model weights includes: Based on the target prediction model to be trained, perform model prediction on the training samples to obtain the training model prediction results; Based on the training sample labels, the training model prediction results, and the first-party initial model weights, calculate the first-party model prediction loss; Based on the prediction results of the training model and the labels of the training samples, update the weights of the first-party initial model; Based on the prediction loss of the first-party model and the updated weights of the first-party initial model, the target prediction model to be trained is iteratively optimized to obtain the target prediction model.
7. The vertical federated learning modeling optimization method as described in claim 5, characterized in that, After the step of iteratively training and optimizing the target prediction model based on the training samples, the training sample labels, and the first-party initial model weights to obtain the target prediction model, the method further includes: Obtain the number of correctly classified first-party samples and the number of incorrectly classified first-party samples corresponding to the target prediction model; The first-party model weights are generated by calculating the ratio of the number of correctly classified samples to the number of incorrectly classified samples.
8. A longitudinal federated learning modeling optimization method, characterized in that, Applied to a second device, the longitudinal federated learning modeling optimization method includes: The system obtains the initial weights of the second-party model and receives the training sample labels and the prediction loss of the first-party model sent by the first device. The prediction loss of the first-party model is calculated by the first device based on the prediction result of the first-party model on the training sample corresponding to the training ID matching sample of the target prediction model and the training sample labels. Obtain training ID matching samples, and improve the model based on the residual to be trained, perform model prediction on the training ID matching samples to obtain the prediction results of the second-party training model; Based on the training sample labels, the prediction results of the second-party training model, and the initial weights of the second-party model, calculate the prediction loss of the second-party model. Based on the residual loss generated by the first-party model prediction loss and the second-party model prediction loss, the training residual enhancement model is iteratively optimized to obtain a vertical federated residual enhancement model. The vertical federated residual enhancement model is obtained by the second device based on the vertical federated common samples, combined with the sample labels in the first device and the model prediction loss of the target prediction model on the vertical federated common samples, and by performing residual learning based on vertical federated learning with the first device. Find ID matching samples, and perform model prediction on the ID matching samples based on the longitudinal federated residual boosting model to obtain the second-party model prediction results; The second-party model prediction result and the second-party model weights corresponding to the longitudinal federated residual enhancement model are sent to the first device so that the first device can generate a target federated prediction result based on the first-party model prediction result generated by the target prediction model for the sample to be predicted corresponding to the training ID matching sample, the first-party model weights corresponding to the target prediction model, the second-party model prediction result, and the second-party model weights. The target prediction model is obtained by the first device through local iterative training.
9. The longitudinal federated learning modeling optimization method as described in claim 8, characterized in that, After the step of iteratively optimizing the trainable residual boosting model based on the residual loss generated by the first-party model prediction loss and the second-party model prediction loss to obtain the vertical federated residual boosting model, the vertical federated learning modeling optimization method further includes: Obtain the number of correctly classified samples and the number of incorrectly classified samples corresponding to the longitudinal federated residual boosting model; The second-party model weights are generated by calculating the ratio of the number of correctly classified samples to the number of incorrectly classified samples.
10. A vertical federated prediction optimization device, characterized in that, The vertical federated prediction optimization device includes: a memory, a processor, and a program stored in the memory for implementing the vertical federated prediction optimization method. The memory is used to store programs that implement the vertical federated prediction optimization method; The processor is configured to execute a program that implements the vertical federated prediction optimization method to implement the steps of the vertical federated prediction optimization method as described in any one of claims 1 to 4.
11. A longitudinal federated learning modeling optimization device, characterized in that, The vertical federated learning modeling optimization device includes: a memory, a processor, and a program stored in the memory for implementing the vertical federated learning modeling optimization method. The memory is used to store programs that implement the longitudinal federated learning modeling optimization method; The processor is configured to execute a program that implements the longitudinal federated learning modeling optimization method, thereby implementing the steps of the longitudinal federated learning modeling optimization method as described in any one of claims 5 to 9.
12. A medium, said medium being a readable storage medium, characterized in that, The readable storage medium stores a program implementing the vertical federated prediction optimization method, which is executed by a processor to implement the steps of the vertical federated prediction optimization method as described in any one of claims 1 to 4.
13. A medium, said medium being a readable storage medium, characterized in that, The readable storage medium stores a program that implements the longitudinal federated learning modeling optimization method, the program being executed by a processor to implement the steps of the longitudinal federated learning modeling optimization method as described in any one of claims 5 to 9.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the longitudinal federated prediction optimization method as described in any one of claims 1 to 4, or implements the longitudinal federated learning modeling optimization method as described in any one of claims 5 to 9.