Longitudinal federal learning model optimization method based on semi-aligned data

Through the vertical federated learning framework of semi-aligned data, the vertical federated learning model is optimized using feature extraction and pseudo-label generation technology, which solves the problems of low sample alignment and missing labels, and realizes efficient use of unaligned data, improving the training efficiency and accuracy of the model.

CN120338056AActive Publication Date: 2025-07-18DONGHUA UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510789293.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-07-18
Estimated Expiration
2045-06-13

AI Technical Summary

Technical Problem

In vertical federated learning, low sample alignment rate leads to a large amount of unaligned data being underutilized, and there are problems with missing tags, which affects model performance and privacy protection.

Method used

By introducing a vertical federated learning framework for semi-aligned data, the feature extractor is used to obtain intermediate features, the server trains the feature transformer to learn association relationships, generates global feature representations, and optimizes the inter-class distinction through supervised comparison learning, combines semi-supervised clustering to generate pseudo-labels, selects high-quality semi-aligned samples to supplement the training data set, eliminates low confidence samples, and iterates the model.

Benefits of technology

It significantly improves the training efficiency and accuracy of the model under data privacy protection, effectively solves the problem of waste of misaligned samples, and improves the performance of the model in a small sample scenario.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120338056A_ABST
    Figure CN120338056A_ABST
Patent Text Reader

Abstract

The invention discloses a longitudinal federated learning model optimization method based on semi-aligned data, and the method remarkably improves the training efficiency and accuracy of a model on the premise of data privacy protection through introducing a longitudinal federated learning framework of a semi-aligned sample. The problem that a large amount of unaligned data is wasted due to the low sample alignment rate in traditional longitudinal federated learning is effectively solved. According to the method, on the premise that data privacy and security are guaranteed, efficient utilization of unaligned samples is achieved, and the problem that the model performance is limited in a few-sample scene is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of vertical federated learning, and particularly to an optimization method for vertical federated learning models based on semi-aligned data. Background Art

[0002] Federated learning is a new type of machine learning method proposed by Google, aiming to enable multiple different clients to jointly build a machine learning model without sharing data. Under this framework, clients can train models locally, and sensitive data always remains local. By uploading the trained models or parameters, model training can be carried out without revealing privacy. Federated learning effectively solves the "data silo" problem.

[0003] Although federated learning can integrate data from multiple different parties for model training, it still faces some challenges in the vertical federated learning framework.

[0004] In vertical federated learning, the key prerequisite for model training is to find shared training sample individuals. However, as the number of participating clients continues to increase, the number of identical client individuals that can be shared significantly decreases. The result of this phenomenon is that although the number of participating parties has increased, the actual number of available samples has decreased instead.

[0005] In addition, since the attributes held by each participating party are different, and before the start of training, the model trainer cannot obtain the specific information of the participating parties, it is extremely difficult to balance the sample size and the number of features of the training data in vertical model training. Therefore, there are a large number of unutilized samples in the vertical federated learning framework.

[0006] In vertical federated learning, due to fewer aligned samples, there is a problem of a large number of unaligned samples that are not fully utilized. When combining vertical federated learning with other few-shot learning methods, the problem becomes more prominent. The local models of each participating party usually have fewer sample features, and most participating parties also face the problem of serious label loss. At the same time, in the process of vertical federated learning, special attention must be paid to user privacy protection. It is necessary to enhance the model's ability to utilize unused samples without violating the original privacy protection budget to improve the accuracy of the global model, which has become an important challenge in current research. Summary of the Invention

[0007] By providing an optimization method for vertical federated learning models based on semi-aligned data in the embodiments of this application, it is possible to expand the sample data set for vertical federated learning models, thereby improving the accuracy of model training.

[0008] To achieve the above object, the technical solution of the embodiments of the present invention is:

[0009] An embodiment of the present invention provides a method for optimizing a vertical federated learning model based on semi-aligned data, including: based on the aligned samples among the participating parties, using the local feature extractors of the participating parties to obtain the intermediate features of the aligned samples; uploading the intermediate features to a server, and the server jointly trains a feature transformer based on the intermediate features to learn the correlation relationship between the intermediate features of different participating parties; the server fuses the intermediate features of all participating parties to generate a global feature representation, and optimizes the inter-class discrimination through supervised contrast learning to jointly update the local models of each participating party; extracting the intermediate features of unaligned samples through the feature extractor, and based on the feature similarity between the unaligned samples and the aligned samples, iteratively generating pseudo-labels for the unaligned samples through a semi-supervised clustering method; obtaining the proxy features of the participating parties with labels through the feature transformer, calculating the feature similarity between the proxy features and the unaligned samples, and selecting the unaligned sample with the highest similarity as a semi-aligned supplementary sample; setting a distance threshold based on the quartile method, removing low-confidence samples, and retaining high-quality semi-aligned samples; adding the filtered high-quality semi-aligned samples to the training data set, and iteratively optimizing the vertical federated learning model.

[0010] In some possible implementation manners, the aligned samples among the participating parties are obtained through a private intersection method.

[0011] In some possible implementation manners, the feature transformer is expressed as:

[0012] ;

[0013] Wherein, represents the feature change loss, represents assignment, represents the task party, represents the loss function, represents the th sample, represents the assisting party, represents the th sample of the assisting party, represents the result of the task party sample after local feature extraction, represents the result of the assisting party sample after local feature extraction.

[0014] In some possible implementation manners, the server fuses the intermediate features of all participating parties to generate a global feature representation, and optimizes the inter-class discrimination through supervised contrast learning to jointly update the local models of each participating party, including:

[0015] The server concatenates the intermediate features of each participating party, expressed as:

[0016] ;

[0017] Among them, represents the concatenated feature, represents the task party, represents the aligned sample, represents the assisting party, represents the result of local feature extraction of the task party's aligned sample, represents the result of local feature extraction of the assisting party's aligned sample;

[0018] Map the concatenated overall feature, expressed as:

[0019] ;

[0020] Among them, represents the mapping function, represents the mapped feature;

[0021] Use the mapped feature as the input of supervised contrast learning to enhance the discrimination boundary between classes, expressed as:

[0022] ;

[0023] Among them, represents all positive samples in the same class, represents the negative samples in different classes, represents the temperature coefficient, represents the total number of all positive samples, represents the contrast loss, represents the positive sample, represents the index set of the samples;

[0024] Combine the feature transformer and the loss function in supervised contrast learning, expressed as:

[0025] ;

[0026] Among them, represents the hyperparameter, represents the overall loss;

[0027] Calculate the gradient of each client according to the loss and return it to the corresponding participating party, expressed as:

[0028] ;

[0029] Among them, represents the gradient of the assisting party, represents the gradient calculation, represents the assisting party embedding;

[0030] Each participating party updates the local model weights with the obtained gradients, expressed as:

[0031] ;

[0032] where, represents the model parameters of the i-th participating party, represents the learning rate.

[0033] In some possible implementation manners, intermediate features of unaligned samples are extracted by the feature transformer, and based on the feature similarity between the unaligned samples and the aligned samples, pseudo-labels are iteratively generated for the unaligned samples by a semi-supervised clustering method, including:

[0034] The intermediate features of the unaligned samples of all the participating parties without labels are extracted by the feature extractor, expressed as:

[0035] ;

[0036] where, represents the intermediate embedding of the unaligned sample, represents the unaligned sample, represents unaligned;

[0037] According to the distance from the features of the unaligned samples to the existing aligned samples, the nearest distance is iteratively calculated to generate pseudo-labels for them; among them, during the iteration process, the labels of the existing aligned samples remain unchanged, and the samples with missing labels are continuously iteratively transformed according to the distance to the class center, expressed as:

[0038] ;

[0039] where, represents the sample to the class center the distance of, represents the th eigenvalue of the embedding, represents the th class center, represents the eigenvalue.

[0040] In some possible implementation manners, proxy features of the participating parties with labels are obtained by the feature transformer, the feature similarity between the proxy features and the unaligned samples is calculated, and the unaligned sample with the highest similarity is selected as the semi-aligned supplementary sample, including:

[0041] The samples with labels to be supplemented are passed through the transformer to obtain the proxy features of the participating parties with labels, expressed as:

[0042] ;

[0043] Among them, represents the proxy embedding obtained by transforming the th sample, represents the transformer parameters, represents the sample that the task party needs to supplement;

[0044] Compare the features of the unaligned samples with the proxy features to obtain a set of supplementary sample indices, and calculate the distance to obtain the unaligned sample with the highest similarity as the semi-aligned supplementary sample, which is expressed as:

[0045] ;

[0046] Among them, represents the transformer.

[0047] In some possible implementation manners, a distance threshold is set based on the quartile method to eliminate low-confidence samples and retain high-quality semi-aligned samples, which is expressed as:

[0048] ;

[0049] ;

[0050] ;

[0051] ;

[0052] Among them, represents the upper quartile, represents the percentage, represents the set of shortest distances, represents the lower quartile, represents the interquartile range, represents the threshold, represents the hyperparameter.

[0053] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:

[0054] In the embodiments of the present invention, by introducing a vertical federated learning framework for semi-aligned samples, the training efficiency and accuracy of the model are significantly improved under the premise of data privacy protection, and the problem of waste of a large amount of unaligned data caused by low sample alignment rate in traditional vertical federated learning is effectively solved. This method realizes the efficient utilization of unaligned samples under the premise of ensuring data privacy and security, and solves the problem of limited model performance in the few-shot scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] To more clearly illustrate the embodiments of the present invention, the accompanying drawings required for the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0056] Figure 1 Schematic flowchart of an embodiment of a method for optimizing a vertical federated learning model based on semi-aligned data provided for the implementation of the present invention;

[0057] Figure 2 Comparison chart of the accuracy of the present invention and other methods below the MNIST dataset;

[0058] Figure 3 Comparison chart of the accuracy of the present invention and other methods below the NUS-WIDE dataset;

[0059] Figure 4 Comparison chart of the accuracy of the present invention and other methods below the CIFAR10 dataset;

[0060] Figure 5 Comparison chart of the accuracy of the present invention and other methods below the MNIST dataset and at different imbalance ratios;

[0061] Figure 6 Comparison chart of the accuracy of the present invention and other methods below the NUS-WIDE dataset and at different imbalance ratios;

[0062] Figure 7 Comparison chart of the accuracy of the present invention and other methods below the CIFAR10 dataset and at different imbalance ratios;

[0063] Figure 8 Accuracy chart of the present invention under different datasets and different thresholds;

[0064] Figure 9 Accuracy chart of the present invention under different datasets and different proportions of unaligned sample numbers;

[0065] Figure 10 Accuracy chart of the present invention under different datasets and different proportions of unaligned sample numbers. Detailed implementation manners

[0066] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0067] In the relevant descriptions of this embodiment, terms such as "include, contain, have" are all open terms, generally preferably understood as including but not limited to; the term "at least one" is generally preferably understood as one or more, where "multiple" means two or more; the term "at least one (item) of the following" or its similar expressions refer to any combination of these items, including any combination of single item (s) or plural item (s). For example, "at least one (item) of a, b or c", or, "at least one (item) of a, b and c" can all represent: a, b, c, a - b (i.e., a and b), a - c, b - c, or a - b - c, where a, b, c can be single or multiple respectively; the symbol "A / B" is used to describe the selection relationship of associated objects, generally indicating an "or" relationship before and after.

[0068] In the following descriptions of this embodiment, the terms used in the embodiments of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms "a" and "the" used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0069] Those skilled in the art should understand that in the following descriptions of the embodiments of this application, the sequence numbers do not mean the sequence of execution. Some or all steps can be executed in parallel or sequentially. The execution sequence of each process should be determined by its function and internal logic and should not constitute any limitation to the implementation process of the embodiments of this application.

[0070] Those skilled in the art should understand that the numerical ranges in the embodiments of this application should be understood as specifically disclosing each intermediate value between the upper and lower limits of the range. Each intermediate value within any stated value or stated range and each smaller range between any other stated value or intermediate value within the range are also included in the present invention. The upper and lower limits of these smaller ranges can be independently included or excluded from the range.

[0071] Unless otherwise specified, the technical / scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the art to which this application belongs. Although this application only describes preferred methods and materials, any methods and materials similar or equivalent to those described herein can also be used in the implementation or testing of this application. All documents mentioned in this specification are incorporated by reference to disclose and describe the methods and / or materials related to the documents. In case of conflict with any incorporated document, the content of this specification shall prevail.

[0072] In order to illustrate the technical solutions of the present invention, specific embodiments are used for illustration below.

[0073] Federated learning is a new type of machine learning method proposed by Google, aiming to enable multiple different clients to jointly build a machine learning model without sharing data. Under this framework, clients can perform model training locally, and sensitive data always remains local. By uploading the trained models or parameters, model training can be carried out without revealing privacy. Federated learning effectively solves the "data silo" problem.

[0074] Although federated learning can integrate data from multiple different parties for model training, there are still some challenges in the vertical federated learning framework.

[0075] In vertical federated learning, the key prerequisite for model training is to find shared training sample individuals. However, as the number of participating clients continues to increase, the number of identical client individuals that can be shared significantly decreases. The result of this phenomenon is that although the number of participating parties increases, the actual available number of samples decreases instead.

[0076] In addition, since the attributes held by each participating party are different, and before the start of training, the model trainer cannot obtain the specific information of the participating parties, it is extremely difficult to balance the sample size and the number of features of the training data in vertical model training. Therefore, there are a large number of unutilized samples in the vertical federated learning framework.

[0077] In vertical federated learning, due to fewer aligned samples, there is a problem of a large number of unaligned samples that are not fully utilized. When combining vertical federated learning with other few-shot learning methods, the problem becomes more prominent. The local models of each participating party usually have fewer sample features, and most participating parties also face the problem of serious label loss. At the same time, during the process of vertical federated learning, special attention must be paid to user privacy protection. It is necessary to enhance the model's ability to utilize unused samples without violating the original privacy protection budget to improve the accuracy of the global model, which has become an important challenge in current research.

[0078] Based on this, the embodiments of the present invention provide an optimization method for a vertical federated learning model based on semi-aligned data, which can expand the sample data set for the vertical federated learning model to improve the accuracy of model training.

[0079] Figure 1 For the schematic flowchart of the embodiments of an optimization method for a vertical federated learning model based on semi-aligned data provided by the embodiments of the present invention, see Figure 1 As shown, the above method may include:

[0080] S101, based on the aligned samples among the participating parties, use the feature extractors of each participating party locally to obtain the intermediate features of the aligned samples;

[0081] It should be noted that the embodiments of the present invention are mainly used in the vertical federated learning framework. Specifically, in this case, there are clients, and each client holds a local dataset , where represents each specific participant . Among them, the labeled participant is identified as , and the remaining participants are identified as . In the vertical federated learning framework, there is an aligned sample dataset , an unaligned sample dataset , and a total of r rounds of iterations.

[0082] In some embodiments, the aligned samples among the participants are obtained through the private intersection method. Each participant locally trains a feature extractor to obtain the local model for each round, denoted as . The intermediate features of the corresponding aligned samples are obtained through the local model of each participant.

[0083] S102, Upload the intermediate features to the server, and the server jointly trains a feature transformer based on the intermediate features to learn the correlation between the intermediate features of different participants;

[0084] After receiving the intermediate features of each participant, the server jointly trains a feature transformer among the intermediate feature results of different participants. Exemplarily, the feature transformer is denoted as:

[0085] ;

[0086] Among them, represents the feature change loss, represents assignment, represents the task party, represents the loss function, represents the th sample, represents the auxiliary party, represents the th sample of the auxiliary party, represents the result of the task party sample after local feature extraction, represents the result of the auxiliary party sample after local feature extraction.

[0087] S103, The server fuses the intermediate features of all participants, generates a global feature representation, and optimizes the inter-class discrimination through supervised contrast learning to jointly update the local models of each participant;

[0088] In some embodiments, the above step S103 specifically includes:

[0089] S1031, the server splices the intermediate features of each participant, expressed as:

[0090] ;

[0091] Among them, represents the spliced feature, represents the task party, represents the alignment sample, represents the auxiliary party, represents the result of local feature extraction of the task party alignment sample, represents the result of local feature extraction of the auxiliary party alignment sample;

[0092] S1032, map the spliced overall feature, expressed as:

[0093] ;

[0094] Among them, represents the mapping function, represents the mapped feature;

[0095] S1033, use the mapped feature as the input of supervised contrast learning to enhance the discrimination boundary between classes, expressed as:

[0096] ;

[0097] Among them, represents all positive samples in the same class, represents the negative samples in different classes, represents the temperature coefficient, represents the total number of all positive samples, represents the contrast loss, represents the positive sample, represents the index set of the samples;

[0098] S1034, combine the feature transformer and the loss function in supervised contrast learning, expressed as:

[0099] ;

[0100] Among them, represents the hyperparameter, represents the overall loss;

[0101] S1035, calculate the gradient of each client according to the loss and return it to the corresponding participant, expressed as:

[0102] ;

[0103] Among them, Represents the gradient of the assisting party, Represents the gradient calculation, Represents the assisting party embedding;

[0104] S1036, Each participating party updates the local model weights with the obtained gradient, expressed as:

[0105] ;

[0106] Wherein, Represents the model parameters of the i-th participating party, Represents the learning rate.

[0107] S104, Extract the intermediate features of the unaligned samples through the feature extractor, and based on the feature similarity between the unaligned samples and the aligned samples, iteratively generate pseudo-labels for the unaligned samples through the semi-supervised clustering method;

[0108] Since the data samples of the participating parties lack labels, pseudo-labels are assigned to the unaligned samples of the participating parties through semi-supervised clustering. In some embodiments, the above step S104 includes:

[0109] S1041, Extract the intermediate features of the unaligned samples of all participating parties without labels through the feature extractor, expressed as:

[0110] ;

[0111] Wherein, Represents the intermediate embedding of the unaligned samples, Represents the unaligned samples, Represents unaligned;

[0112] S1042, Iteratively calculate the nearest distance according to the distance from the features of the unaligned samples to the existing aligned samples, and generate pseudo-labels for them; wherein, during the iteration process, the labels of the existing aligned samples remain unchanged, and the samples with missing labels are continuously iteratively transformed according to the distance to the class center, expressed as:

[0113] ;

[0114] Wherein, Represents the sample To the class center The distance of, Represents the first The eigenvalue of the embedded feature of, Represents the first The class center of, Represents the eigenvalue.

[0115] S105. Obtain the proxy features of the participating parties with labels through the feature transformer, calculate the feature similarity between the proxy features and the unaligned samples, and select the unaligned sample with the highest similarity as the semi-aligned supplementary sample;

[0116] In some embodiments, the above step S105 includes:

[0117] S1051. Pass the labeled samples to be supplemented through the transformer to obtain the proxy features of the participating parties with labels, expressed as:

[0118] ;

[0119] Wherein, represents the proxy embedding transformed from the th sample, represents the transformer parameters, represents the sample to be supplemented by the task party;

[0120] S1052. Compare the features of the unaligned samples with the proxy features to obtain a set of supplementary sample indices, calculate the distance to obtain the unaligned sample with the highest similarity as the semi-aligned supplementary sample, expressed as:

[0121] ;

[0122] Wherein, represents the transformer.

[0123] S106. Set a distance threshold based on the quartile method, eliminate low-confidence samples, and retain high-quality semi-aligned samples;

[0124] It can be understood that since the supplementation of semi-aligned samples is based on pseudo-labels, it is necessary to screen out incorrect paired samples through screening to further improve the performance of the model. In some embodiments, a distance threshold is set based on the quartile method, low-confidence samples are eliminated, and high-quality semi-aligned samples are retained, expressed as:

[0125] ;

[0126] ;

[0127] ;

[0128] ;

[0129] Wherein, represents the upper quartile, represents the percentage, represents the set of shortest distances, represents the lower quartile, represents the interquartile range, denotes a threshold value, denotes a hyperparameter.

[0130] In the embodiments of the present invention, the upper and lower quartiles are found through the distance between the features of the unaligned samples obtained above and the proxy features, and then the supplementary sample indexes outside the distance threshold are excluded, so as to obtain high-quality semi-aligned samples.

[0131] S107, Add the screened high-quality semi-aligned samples to the training data set, and iteratively optimize the vertical federated learning model.

[0132] In the embodiments of the present invention, the screened high-quality semi-aligned samples are dynamically integrated into the training data set through the vertical federated learning framework. Each participating party generates intermediate features based on the locally updated feature extractor and uploads them to the server. The server optimizes the inter-class discriminability through global feature fusion and supervised contrast learning. At the same time, combined with the proxy feature comparison and the high-confidence semi-aligned samples selected by the IQR quartile method, the diversity and coverage of the training data are gradually expanded; through multiple rounds of iterative optimization, the model continuously adjusts the feature representation and classification boundary, and significantly improves the classification accuracy and generalization ability on the premise of protecting data privacy, effectively solving the pain points of low utilization rate of unaligned samples and limited model performance in traditional vertical federated learning, and providing an efficient and secure model optimization path for cross-institutional data collaboration scenarios.

[0133] The following uses specific embodiments to verify the effect of the present invention:

[0134] In the embodiments of the present invention, a real learning scenario in federated learning is simulated on the distributed library of PyTorch. The experiments use the MNIST, NUS-WIDE, and CIFAR-10 data sets. In each data set, the data is divided into two parts: the task party and the auxiliary party. The task party holds the data and its true labels, while the auxiliary party only holds the data itself and does not contain label information. Specifically, each participating party only holds a part of the attributes of the data. For the MNIST data set, a CNN model architecture is adopted, for the NUS-WIDE data set, an MLP model is adopted, and for the CIFAR-10 data set, a ResNet18 model architecture is adopted. And the unaligned sample data set of each party is divided into twice the size of the aligned sample data set. The optimizer uses the adam method, the batch size is set to 128, and the learning rate is set to 1e-4.

[0135] Figure 2 、 Figure 3 、 Figure 4 Shows the schematic diagram of the model accuracy under different numbers of aligned samples, and is compared with the existing methods and traditional methods at the same time. Figure 2 Is the comparison chart of the accuracy of the present invention and other methods under the MNIST data set, Figure 3It is a comparison chart of the accuracy of the present invention and other methods under the NUS-WIDE dataset. Figure 4 It is a comparison chart of the accuracy of the present invention and other methods under the CIFAR10 dataset. The abscissa represents the number of aligned samples, and the ordinate represents the accuracy. SplitNN, FedHSSL-SimSiam, FedHSSL-Moco, and Nun-S are all existing methods, and Nun represents the method of the present invention. At the same time, a simplified version of the present invention is also proposed (generating pseudo-labels for unaligned samples only through aligned samples, that is, using the aligned true labels without using the generated pseudo-labels). As the number of aligned samples increases, the accuracy of traditional vertical federated learning gradually improves, and the present invention also shows a similar trend. However, compared with traditional unoptimized vertical federated learning, the performance of all methods has been significantly improved. The orange and cyan curves in the accuracy chart represent the two methods proposed by the present invention, the blue and green curves represent the accuracy of the comparative FedHSSL method, and the gray curve represents traditional vertical federated learning. From the experimental results, the two methods proposed by the present invention have higher accuracy than traditional vertical federated learning under all numbers of aligned samples and always maintain the optimal performance. These experimental results fully demonstrate that under different numbers of aligned samples, this method can always significantly improve the model performance, verifying its effectiveness in vertical federated learning.

[0136] It can be understood that in the case of vertical federated learning in reality, the data distribution is often heterogeneous. Therefore, the present invention further studies the performance of data under different long-tail distributions. The definition of the imbalance ratio is:

[0137] ;

[0138] where represents the number of samples in the class with the most samples, represents the number of samples in the class with the fewest samples. Figure 5 , Figure 6 , Figure 7 shows the results. The present invention evaluates the performance of the method under different values, specifically setting multiple imbalance ratios such as 1 / 2, 1 / 4, 1 / 6, 1 / 8, and 1 / 10, and setting from more to less to meet different data distribution situations. Among them, the abscissa represents the parameter size represents the imbalance ratio, and the ordinate represents the accuracy; Figure 5 It is a comparison chart of the accuracy of the present invention and other methods under the MNIST dataset and different imbalance ratios. Figure 6 It is a comparison chart of the accuracy of the present invention and other methods under the NUS-WIDE dataset and different imbalance ratios. Figure 7This is a comparison chart of the accuracy of the present invention and other methods under the CIFAR10 dataset and different imbalance ratios. In these experiments, the aligned samples accounted for 0.1%, 0.1%, and 1% of the total sample numbers of the MNIST, NUS-WIDE, and CIFAR-10 datasets, respectively. At the same time, the accuracy achieved by the proposed baseline method under data imbalance conditions is also shown in the figure for comparison.

[0139] Although the accuracy of the present invention shows a similar trend to other baseline methods, that is, it gradually decreases as the imbalance ratio decreases, the decline in its accuracy is significantly smaller than that of other baseline methods. This indicates that the method proposed by the present invention can always find suitable supplementary samples for the model. These experimental results fully demonstrate that under adverse data distribution conditions, this method still has good robustness, can effectively utilize unaligned data, and improve the overall model performance.

[0140] In the present invention, the value range of the hyperparameter (i.e., the size of the distance threshold set by the quartile method) can also be adjusted through experiments to deeply explore its impact on the overall performance of the model. Specifically, when the value of the hyperparameter is small, the model will be more strict in matching supplementary samples, select a smaller pairing range, and only pick supplementary samples that are highly similar to the target samples, so as to ensure the accuracy of the matching.

[0141] As Figure 8 shown, the present invention studies the influence of four different parameter values on the model accuracy to comprehensively evaluate the influence of semi-aligned samples on the model effect. Figure 8 The top parameter represents the threshold size, the vertical coordinate represents the accuracy, and the horizontal coordinate is the MNIST, NUS-WIDE, and CIFAR10 datasets.

[0142] In the experiment, the accuracy of the model was evaluated under the conditions of parameter values of -1, -0.5, 0.5, and 1.5 on three datasets respectively. Among them, negative numbers indicate that the number of semi-aligned samples is less than the third quartile. The three datasets were trained under the conditions of about 2%, 2%, and 10% aligned samples respectively, and the accuracy of the model was calculated. Therefore, a reasonable selection of this parameter can further improve the accuracy of the model.

[0143] As Figure 9 and Figure 10 shown, in-depth research was conducted under different unaligned sample conditions and the influence of the ratio of the total sample number to the aligned sample number was compared. Among them, Figure 9 the horizontal coordinate in the figure represents the ratio of different unaligned sample numbers, the vertical coordinate represents the accuracy, and the three curves correspond to the three datasets of MNIST, NUS-WIDE, and CIFAR10 respectively; Figure 10The horizontal coordinate represents the ratio of the number of aligned samples, and the vertical coordinate represents the accuracy. The three curves respectively correspond to three datasets: MNIST, NUS-WIDE, and CIFAR10.

[0144] Figure 10 The difference between the ratio and Figure 9 is that this ratio is different from the ratio of unaligned samples discussed previously. Here, the ratio represents the proportion of unaligned samples of a single party to the aligned samples, while the previous ratio refers to the ratio of the number of unaligned samples between different parties.

[0145] Figure 9 shows the experimental results under different proportions of unaligned samples on three datasets. The three experimental results in the figure are the results obtained under the conditions of 0.1%, 1%, and 1% aligned samples on the corresponding datasets. By analyzing the experimental data in the figure, it can be clearly seen that all the changing curves are relatively smooth and stable, indicating that the method of the present invention can still exhibit good performance when the number of unaligned samples is insufficient. At the same time, as the proportion of unaligned samples of the assisting party slowly increases, the model performance shows a gradually increasing trend.

[0146] As Figure 10 shown, in the experimental configuration, the three experimental results in the figure are the results obtained under the conditions of 0.1%, 0.1%, and 1% aligned samples on the corresponding datasets. By analyzing the experimental data in the figure, it can be clearly seen that the method proposed by the present invention is always superior to the baseline method, and shows better performance regardless of how the number of unaligned samples changes.

[0147] In the embodiments of the present invention, the effectiveness of semi-aligned samples is verified through experiments, demonstrating their potential to improve performance in vertical federated learning. On this basis, the present invention proposes two versions of the method to improve the model performance by effectively utilizing aligned samples and unaligned samples. In addition, supervised contrast learning and semi-supervised clustering methods are also used to generate pseudo-labels for unlabeled data. By adopting these technologies, the present invention provides a novel, efficient, and powerful high-performance vertical federated learning solution while ensuring data privacy, solving the problem of insufficient utilization of unaligned samples in traditional vertical federated learning frameworks. And a comprehensive evaluation is carried out on three public datasets (MNIST, NUS-WIDE, CIFAR10) to verify the effectiveness of the algorithm. The experimental results show that the present invention is significantly superior to three state-of-the-art baseline methods. Specifically, the model accuracy of the present invention is improved by 1.68% to 13.51% under different numbers of aligned samples. It shows strong robustness under various data distributions, and still achieves a performance improvement of 8.99% even in highly imbalanced data scenarios.

[0148] The various embodiments in this specification are described in a progressive manner. For the same or similar parts among the various embodiments, reference can be made to each other, and the key points of each embodiment are the differences from other embodiments.

[0149] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the present application.

Claims

1. A method for optimizing a vertical federated learning model based on semi-aligned data, characterized in that, Including: Based on the aligned samples among the participating parties, use the local feature extractors of each participating party to obtain the intermediate features of the aligned samples; Upload the intermediate features to the server, and the server jointly trains a feature transformer based on the intermediate features to learn the correlation relationships between the intermediate features of different participating parties; The server fuses the intermediate features of all participating parties to generate a global feature representation, optimizes the inter-class discrimination through supervised contrast learning, and jointly updates the local models of each participating party; Extract the intermediate features of unaligned samples through the feature extractor, and iteratively generate pseudo-labels for the unaligned samples through a semi-supervised clustering method based on the feature similarity between the unaligned samples and the aligned samples; Obtain the proxy features of the participating parties with labels through the feature transformer, calculate the feature similarity between the proxy features and the unaligned samples, and select the unaligned sample with the highest similarity as the semi-aligned supplementary sample; Set a distance threshold based on the quartile method, eliminate low-confidence samples, and retain high-quality semi-aligned samples; Add the filtered high-quality semi-aligned samples to the training dataset and iteratively optimize the vertical federated learning model.

2. The method according to claim 1, wherein The aligned samples among the participating parties are obtained through the private intersection method.

3. The method according to claim 2, wherein The feature transformer is expressed as: ; Among them, represents the feature change loss, represents assignment, represents the task party, represents the loss function, represents the th sample, represents the auxiliary party, represents the th sample of the auxiliary party, represents the result of local feature extraction of the task party samples, represents the result of local feature extraction of the auxiliary party samples.

4. The method according to claim 3, wherein The server fuses the intermediate features of all participating parties to generate a global feature representation, optimizes the inter-class discrimination through supervised contrast learning, and jointly updates the local models of each participating party, including: The server concatenates the intermediate features of each participating party, expressed as: ; Among them, represents the concatenated feature, represents the task party, represents the aligned sample, represents the auxiliary party, represents the result of local feature extraction of the task party's aligned sample, represents the result of local feature extraction of the auxiliary party's aligned sample; Map the concatenated overall features, expressed as: ; Among them, represents the mapping function, represents the feature after mapping; Use the mapped features as the input of supervised contrast learning to enhance the discrimination boundary between classes, expressed as: ; Among them, represents all positive samples in the same category, represents negative samples in different categories, represents the temperature coefficient, represents the total number of all positive samples, represents the contrastive loss, represents a positive sample, represents the index set of the samples; Combine the loss functions in the feature transformer and supervised contrast learning, expressed as: ; Among them, represents a hyperparameter, represents the overall loss; Calculate the gradient of each client according to the loss and return it to the corresponding participating party, expressed as: ; Among them, represents the gradient of the auxiliary party, represents gradient calculation, represents auxiliary party embedding; Each participating party updates the local model weights with the obtained gradient, expressed as: ; Among them, represents the model parameters of the i-th participant, represents the learning rate.

5. The method according to claim 4, wherein The process of extracting the intermediate features of unaligned samples through the feature extractor and iteratively generating pseudo-labels for the unaligned samples through a semi-supervised clustering method based on the feature similarity between the unaligned samples and the aligned samples includes: Extract the intermediate features of the unaligned samples of all participating parties without labels through the feature extractor, expressed as: ; Among them, represents the intermediate embedding of unaligned samples, represents unaligned samples, represents misalignment; Iteratively calculate the nearest distance according to the distance from the features of the unaligned samples to the existing aligned samples and generate pseudo-labels for them; among them, during the iteration process, keep the labels of the existing aligned samples unchanged, and continuously perform iterative transformation on the samples with missing labels according to the distance to the class center, expressed as: ; Among them, represents the distance from the sample to the class center , represents the th eigenvalue of the embedding, represents the th class center, represents the eigenvalue.

6. The method according to claim 5, characterized in that The process of obtaining the proxy features of the participating parties with labels through the feature transformer, calculating the feature similarity between the proxy features and the unaligned samples, and selecting the unaligned sample with the highest similarity as the semi-aligned supplementary sample includes: Pass the labeled samples to be supplemented through the transformer to obtain the proxy features of the participating parties with labels, expressed as: ; Among them, represents the proxy embedding obtained by transforming the th sample, represents the transformer parameters, represents the samples that need to be supplemented by the task party; Compare the features of the unaligned samples with the proxy features to obtain a supplementary sample index set, calculate their distances, and select the unaligned sample with the highest similarity as the semi-aligned supplementary sample, expressed as: ; Among them, represents a converter.

7. The method according to claim 6, wherein The distance threshold is set based on the quartile method to eliminate low-confidence samples and retain high-quality semi-aligned samples, which is expressed as: ; ; ; ; Among them, represents the upper quartile, represents the percentage, represents the set of shortest distances, represents the lower quartile, represents the interquartile range, represents the threshold, represents the hyperparameter.

Citation Information

Patent Citations

  • Accurate and safe longitudinal federated learning method, system and product based on feature conversion

    CN119918693A

  • Federated learning-based user service strategy determination method and apparatus

    WO2023216494A1