Federated Learning Feature Selection Method, Device, System, and Electronic Device
By calculating and filtering the target evaluation parameter values in the federated learning system and determining the target user characteristics, the problem of unreasonable feature selection in federated learning is solved, and the distinction ability and accuracy of the model are improved.
Patent Information
- Application Number
- CN202210031191.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-12
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-01-12
AI Technical Summary
In the prior art, the rationality of feature selection during the federated learning process is not high, resulting in poor model training results. Most of the existing methods are to randomly select user features offline.
The participants and the initiators respectively obtain local preset user characteristics, calculate the target evaluation parameter values, determine the target evaluation scores of each feature, and select the characteristics that meet the conditions as the target user characteristics based on the scores, including the calculation of the target sample difference, information value and stability indicators and the correlation matrix analysis.
It improves the rationality of feature selection during federated learning modeling, avoids unreasonable situations caused by random selection, and improves the distinction ability and accuracy of the model.
Smart Images

Figure CN114492605B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine learning, and in particular, to a federated learning feature selection method, device, system, and electronic device. Background Art
[0002] With the continuous development of artificial intelligence technology, more and more fields have started to carry out various businesses based on related models of artificial intelligence. Exemplarily, due to the simplicity of its model and the interpretability of variables, the scoring card has become a commonly used means in the financial industry for identifying user qualifications and can be used in pre-loan, during-loan, and post-loan processes.
[0003] Meanwhile, in the current situation of data islands, due to the increasing demand for joint modeling by customers, the demand for modeling of federated scoring cards is also growing rapidly. In the existing federated learning methods, the participating parties only select user features based on offline communication and other methods. This selection method often randomly selects user features by each participating party for subsequent model training. The selection process of such feature selection methods is random and easily affects the rationality of feature selection. Summary of the Invention
[0004] Embodiments of the present invention provide a federated learning feature selection method, device, system, and electronic device to solve the problem of low rationality of feature selection in the existing federated learning process.
[0005] To solve the above problems, the embodiments of the present invention are implemented as follows:
[0006] In a first aspect, an embodiment of the present invention discloses a federated learning feature selection method applied to a federated learning system. The federated learning system includes an initiator and participating parties. The method includes:
[0007] Obtaining preset user features locally through the participating parties and the initiator respectively;
[0008] Calculating a target evaluation parameter value corresponding to the preset user feature according to the preset user feature;
[0009] Determining a target evaluation score corresponding to each preset user feature based on the target evaluation parameter value;
[0010] Selecting features whose target evaluation scores meet a preset condition as target user features according to the target evaluation scores.
[0011] Optionally, the target evaluation parameter value includes a target sample difference;
[0012] The calculating the target evaluation parameter value corresponding to the preset user feature includes:
[0013] Determine the characteristic values and label data of the local preset user characteristics;
[0014] Based on the characteristic values and the label data, determine the positive and negative sample statistics;
[0015] The initiator calculates the ratio difference between the positive and negative samples based on the positive and negative sample statistics to obtain an alternative sample difference;
[0016] Based on the alternative sample difference, determine the target sample difference.
[0017] Optionally, the target evaluation parameter value includes a target information value;
[0018] Calculating the target evaluation parameter value corresponding to the preset user characteristics includes:
[0019] Perform binning processing on the preset user characteristics based on a preset binning method to determine each bin and the bin points corresponding to each bin;
[0020] The participant calculates the number of positive and negative samples in each bin and sends the number of positive and negative samples to the initiator;
[0021] The initiator calculates the target information value based on the number of positive and negative samples corresponding to each bin.
[0022] Optionally, the target evaluation parameter value includes a target stability index value;
[0023] Calculating the target evaluation parameter value corresponding to the preset user characteristics includes:
[0024] Divide the local preset user characteristics into a training set and a validation set;
[0025] Based on a preset stability calculation method, calculate the target stability index values corresponding to each preset user characteristic in the training set and the validation set.
[0026] Optionally, when the target evaluation parameter value includes a target sample difference, a target information value, and a target stability index value, based on the target evaluation parameter value, determining the target evaluation score corresponding to each preset user characteristic includes:
[0027] Calculate the product of the target sample difference and the target information value, and use the ratio of the product to the target stability index value as the target evaluation score.
[0028] Optionally, after the participant and the initiator respectively obtain the local preset user characteristics, the method further includes:
[0029] The initiator obtains the correlation matrix corresponding to the local preset user features and the correlation matrices corresponding to the preset user features of each of the participating parties;
[0030] Based on the correlation matrix, the initiator determines the target correlation coefficients between the preset user features pairwise;
[0031] When the target correlation coefficient between two preset user features is greater than the preset correlation coefficient threshold, one of the preset user features is deleted according to the preset deletion rule.
[0032] In a second aspect, an embodiment of the present invention discloses a federated learning feature selection device, which is applied to a federated learning system. The federated learning system includes an initiator and participating parties. The device includes:
[0033] An acquisition module, configured to respectively obtain local preset user features through the participating parties and the initiator;
[0034] A calculation module, configured to calculate a target evaluation parameter value corresponding to the preset user features according to the preset user features;
[0035] A determination module, configured to determine a target evaluation score corresponding to each type of preset user feature based on the target evaluation parameter value;
[0036] A selection module, configured to select, according to the target evaluation score, features whose target evaluation score meets a preset condition as target user features.
[0037] Optionally, the target evaluation parameter value includes a target sample difference; the calculation module is specifically configured to:
[0038] Determine the feature value and label data of the local preset user features;
[0039] Based on the feature value and the label data, determine the positive and negative sample statistics;
[0040] Through the initiator, calculate the ratio difference between the positive and negative samples based on the positive and negative sample statistics to obtain an alternative sample difference;
[0041] Based on the alternative sample difference, determine the target sample difference.
[0042] Optionally, the target evaluation parameter value includes a target information value;
[0043] The calculation module is specifically configured to:
[0044] Perform binning processing on the preset user features based on a preset binning method to determine each bin and the bin points corresponding to each bin;
[0045] Each participating party calculates the number of positive and negative samples in each bin and sends the number of positive and negative samples to the initiating party;
[0046] The initiating party calculates the target information value based on the number of positive and negative samples corresponding to each bin.
[0047] Optionally, the target evaluation parameter value includes a target stability index value;
[0048] The calculation module is specifically configured to:
[0049] Divide the local preset user features into a training set and a validation set;
[0050] Based on a preset stability calculation method, calculate the target stability index value corresponding to each preset user feature in the training set and the validation set.
[0051] Optionally, when the target evaluation parameter value includes a target sample difference, a target information value, and a target stability index value, the first determination module is specifically configured to:
[0052] Calculate the product of the target sample difference and the target information value, and use the ratio of the product to the target stability index value as the target evaluation score.
[0053] Optionally, the device further includes:
[0054] A second acquisition module, configured to acquire, through the initiating party, the correlation matrix corresponding to the local preset user features and the correlation matrices corresponding to the preset user features of each participating party;
[0055] A second determination module, configured to determine, through the initiating party, the target correlation coefficient between any two preset user features based on the correlation matrix;
[0056] A deletion module, configured to delete one of the preset user features according to a preset deletion rule when the target correlation coefficient between two preset user features is greater than a preset correlation coefficient threshold.
[0057] In a third aspect, an embodiment of the present invention discloses a federated learning feature selection system, which is applied to a federated learning system. The federated learning system includes an initiating party and participating parties, where:
[0058] The participating parties and the initiating party respectively acquire local preset user features;
[0059] According to the preset user features, the federated learning system calculates the target evaluation parameter value corresponding to the preset user features;
[0060] Based on the target evaluation parameter value, the federated learning system determines the target evaluation score corresponding to each preset user feature;
[0061] According to the target evaluation score, the federated learning system selects the features whose target evaluation scores meet the preset conditions as the target user features.
[0062] In a fourth aspect, an embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, the steps of the federated learning feature selection method described in the first aspect are implemented.
[0063] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the federated learning feature selection method described in the first aspect are implemented.
[0064] In the embodiment of the present invention, the participating parties and the initiating party respectively obtain the local preset user features; according to the preset user features, the target evaluation parameter values corresponding to the preset user features are obtained; based on the target evaluation parameter values, the target evaluation scores corresponding to each preset user feature are determined; according to the target evaluation scores, the features whose target evaluation scores meet the preset conditions are selected as the target user features. In the embodiment of the present invention, the target evaluation scores corresponding to each preset user feature are calculated based on the target evaluation parameter values, and then the target user features are selected according to the target evaluation scores for model training. In this way, the rationality of feature selection in federated learning modeling is improved, and the unreasonable situation of feature selection caused by offline communication and random selection of user features in the prior art is avoided. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 The flowchart showing the steps of a federated learning feature selection method according to an embodiment of the present invention;
[0066] Figure 2 The flowchart showing the calculation of the target sample difference between continuous and categorical variables according to an embodiment of the present invention;
[0067] Figure 3 The flowchart showing the calculation of the target sample difference of discrete variables according to an embodiment of the present invention;
[0068] Figure 4 The schematic flowchart showing the process of chi-square binning according to an embodiment of the invention;
[0069] Figure 5 The schematic flowchart showing the process of decision tree binning according to an embodiment of the present invention;
[0070] Figure 6 shows a flowchart for calculating the value of target information according to an embodiment of the present invention;
[0071] Figure 7 shows a structural block diagram of a federated learning feature selection device according to the present invention. Detailed implementation manners
[0072] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention. It should be noted that the user information (including but not limited to the device information of the user, personal information of the user, etc.), relevant data, etc. involved in the embodiments of the present invention are all information authorized by the user or authorized by all parties.
[0073] Refer to Figure 1 , which shows a step flowchart of a federated learning feature selection method according to the present invention. The federated learning feature selection method can be applied to a federated learning system, and the federated learning system includes an initiator and participants.
[0074] In the embodiments of the present invention, the federated learning system may refer to a system for federated learning and joint modeling. Federated Learning is a basic artificial intelligence technology, and its basic design goal is to carry out efficient machine learning among multiple participants or multiple computing nodes while ensuring information security during big data exchange, protecting terminal data and personal data privacy, and ensuring legal compliance. Exemplarily, assume that enterprise A and enterprise B need to jointly train a machine learning model. The business systems of enterprise A and enterprise B respectively have relevant data of their own users, and enterprise B also has label data that the model needs to predict. Due to data privacy protection and security considerations, enterprise A and enterprise B cannot directly exchange data, and a federated learning system can be used to establish a joint model. In this way, it can be ensured that each participant can perform encrypted exchange of information and model parameters while maintaining independence, and at the same time improve the quality of the model.
[0075] The initiator (guest) can refer to the party that initiates federated learning and has labeled data in federated learning. The participant (host) can refer to the party that provides user data for joint modeling. The number of participants can be one or more, and the embodiments of the present invention do not limit this. Exemplarily, if a bank needs to use the data of each other's insurance companies to rate the qualifications of its own business customers, that is, to create a federated scorecard, then the bank can be the initiator guest of the federated modeling, and the insurance company can be other participants host. This other participant of the insurance company can be extended to multiple parties, so that the bank can indirectly use the data of more participants to give a more accurate score to the loan qualifications of customers, and further improve the accuracy of the model.
[0076] The federated learning feature selection method may specifically include:
[0077] Step 101: Obtain the preset user features locally through the participant and the initiator respectively.
[0078] In the embodiments of the present invention, the preset user features can refer to the features extracted by all parties in the federated learning system based on the local user data. In the scenario of joint modeling of federated scorecards in the financial industry, the preset user features can refer to the identity features, health features, income and expenditure flow features, work features, credit features, asset features, etc. of users. Since multiple parties can participate in each federated learning, the specific preset user features can be obtained based on the user data actually stored by all parties, and the embodiments of the present invention do not limit this.
[0079] In this step, all parties of the federated learning system can obtain the preset user features based on the user data collected during the process of their respective local operations, and then the preset user features can be selected later to determine the target user features for the final user model training.
[0080] Step 102: Calculate the target evaluation parameter values corresponding to the preset user features according to the preset user features.
[0081] In the embodiments of the present invention, the target evaluation parameter value may refer to the target evaluation parameter value calculated based on a preset evaluation parameter for preset user characteristics. Specifically, the target evaluation parameter value may refer to the target sample difference, target information value, Pearson correlation coefficient, Spearman coefficient, target stability index value, etc. The specific types can be selected based on actual requirements, and the embodiments of the present invention do not limit this. Among them, the target sample difference (Kolmogorov-Smirnov, KS), that is, the KS evaluation index, can evaluate the risk discrimination ability of features by measuring the difference between the cumulative distributions of positive and negative samples, and can be used to distinguish the quality of user qualifications in the financial industry. The judgment criteria for sample positive and negative, that is, sample good and bad, can be defined based on different business scenarios or different preset user characteristics. Exemplarily, if the target user characteristics screened based on the preset user characteristics are ultimately used to train the federal scoring card, the positive sample, that is, the good sample, may refer to various characteristic data corresponding to users with better qualifications, such as no overdue behavior, stable personal account flow, etc., and the negative sample, that is, the bad sample, may refer to various characteristic data corresponding to users with worse qualifications, such as overdue behavior. The target information value (InformationValue, IV) can be used to measure the discrimination ability of preset user characteristics for good and bad samples. The Pearson correlation coefficient can be used to measure the correlation between two features. The Spearman coefficient can be used to describe the correlation and dependence between features. The target stability index value (PopulationStability Index, PSI), that is, the population stability index, can be used to measure the stability of features. Of course, the federated learning system can also adopt other target evaluation parameter values, such as median, mean, standard deviation, skewness, etc., which can be determined specifically based on the actual model training requirements, and the embodiments of the present invention do not limit this.
[0082] Specifically, in this step, after each party in the federated learning system obtains the local preset user characteristics, based on the data interaction between the initiator and the participants and the calculation logic of each target evaluation parameter value, the target evaluation parameter values corresponding to various preset user characteristics can be calculated, which can comprehensively and accurately describe each index of each preset user characteristic and facilitate the subsequent selection of target user characteristics for model training.
[0083] Step 103: Determine the target evaluation score corresponding to each of the preset user characteristics based on the target evaluation parameter value.
[0084] In an embodiment of the present invention, the target evaluation score may refer to a value calculated based on the target evaluation parameter value, which can be used to describe the quality of the preset user characteristics or the degree of relevance to the training of the federal scoring card model. Specifically, after obtaining the target evaluation parameter value corresponding to each preset user characteristic, the target evaluation score corresponding to each preset user characteristic can be calculated and determined based on a preset calculation method, which may refer to a preset calculation formula or weighted processing, etc. The embodiments of the present invention do not limit this.
[0085] Step 104: According to the target evaluation score, select the characteristics whose target evaluation scores meet the preset conditions as the target user characteristics.
[0086] In an embodiment of the present invention, the target user characteristics may refer to the data obtained by screening based on the preset user characteristics and used for model training. The preset conditions may refer to the preset characteristic screening conditions based on the target evaluation score, specifically, whether the target evaluation score is greater than the preset target evaluation score threshold or whether the target evaluation score ranks among the top preset number of positions, etc. The embodiments of the present invention do not limit the specific types of the preset conditions.
[0087] In this step, after determining the target evaluation scores corresponding to various preset user characteristics, it can be further determined whether the target evaluation scores of each preset user characteristic meet the preset conditions, and then the preset user characteristics that meet the preset conditions are selected as the target user characteristics. Subsequently, the federated learning system can perform subsequent model training based on the selected target user characteristics with better quality to obtain the federated scoring card model, which can improve the discrimination ability of the federated scoring card for different users and improve the accuracy of the model.
[0088] In summary, a federated learning feature selection method provided by the embodiments of the present invention includes: the participating party and the initiating party respectively obtain the local preset user characteristics; according to the preset user characteristics, obtain the target evaluation parameter values corresponding to the preset user characteristics; based on the target evaluation parameter value, determine the target evaluation score corresponding to each preset user characteristic; according to the target evaluation score, select the characteristics whose target evaluation scores meet the preset conditions as the target user characteristics. In the embodiments of the present invention, by calculating the target evaluation score corresponding to each preset user characteristic based on the target evaluation parameter value, and then selecting the target user characteristics according to the target evaluation score for model training. In this way, the rationality of feature selection in federated learning modeling is improved, and the unreasonable situation of feature selection caused by offline communication and random selection of user characteristics in the prior art is avoided.
[0089] Optionally, in an embodiment of the present invention, the target evaluation parameter value includes a target sample difference. Correspondingly, step 102 can be specifically implemented through the following steps S21 to S24:
[0090] Step S21: Determine the feature values of the locally preset user features and the label data.
[0091] In the embodiments of the present invention, the target sample difference, i.e., the KS value, can be used to measure the gap between the cumulative parts of good and bad samples. The larger the KS value, the greater the ability of the preset user feature to distinguish between good and bad user qualifications. The feature value can refer to the feature value corresponding to the preset user feature. Each feature value corresponding to the preset user feature includes all statistical data of the feature, i.e., positive and negative samples. The label data can refer to the labels owned by the initiator.
[0092] In this step, when calculating the KS value, the initiator in the federated learning system can encrypt the label data it owns and send it to the participants. At the same time, both the initiator and the participants determine the feature values corresponding to the locally preset user features, and subsequently, the statistics of good and bad samples, i.e., positive and negative samples, can be determined based on the feature values and the label data.
[0093] Step S22: Determine the positive and negative sample statistics based on the feature values and the label data.
[0094] In the embodiments of the present invention, the positive and negative sample statistics can refer to the statistics of positive and negative samples under each feature value corresponding to the preset user feature.
[0095] Step S23: Calculate the ratio difference of the positive and negative samples by the initiator based on the positive and negative sample statistics to obtain the alternative sample difference.
[0096] In the embodiments of the present invention, the alternative sample difference can refer to the difference column (gap column) composed of the ratio differences of the positive and negative samples. The ratio difference can refer to the difference between the ratio of the number of positive samples and the ratio of the number of negative samples.
[0097] In this step, after the initiator guest determines the positive and negative sample statistics, it can directly calculate the ratio difference based on the positive and negative sample statistics to obtain the alternative sample difference corresponding to the preset user feature of the initiator. After the participant determines the positive and negative sample statistics, it can encrypt the positive and negative sample statistics and send them to the initiator, and the initiator calculates the alternative sample difference.
[0098] Step S24: Determine the target sample difference index based on the alternative sample difference.
[0099] In the embodiments of the present invention, after determining the alternative sample difference, the largest alternative sample difference can be selected from the alternative sample differences as the target sample difference KS value corresponding to the preset user feature.
[0100] In the embodiments of the present invention, the characteristic values and label data of the locally preset user characteristics are determined; based on the characteristic values and the label data, the positive and negative sample statistics are determined; the initiator calculates the proportion difference between the positive and negative samples based on the positive and negative sample statistics to obtain the alternative sample difference; and based on the alternative sample difference, the target sample difference is determined. In this way, by calculating the target sample difference corresponding to the preset user characteristics, the discrimination ability of various preset user characteristics for different users can be accurately described, providing an accurate data basis for subsequent feature selection and making the feature selection more reasonable.
[0101] Exemplarily, Figure 2 FIG. shows a flowchart for calculating the target sample difference of a continuous variable and a categorical variable in the embodiments of the present invention. The continuous variable may be a preset user characteristic with continuously changing numerical values, such as the expenditure amount, etc. The categorical variable may be a preset user characteristic divided based on categories, such as the gender of the user being divided into male, female, etc. As Figure 2 shown, for continuous and categorical variables, the calculation process of the target sample difference may include the following calculation steps:
[0102] 1) The initiator guest generates a private key priv_key and a public key pub_key for subsequent encryption and decryption.
[0103] 2) The guest encrypts its own label data y into [y] and sends it to the participant host; the guest sorts the characteristic values from small to large and removes the undefined or non-representable values (NaN values) among them; then the guest counts the statistics of the positive and negative samples corresponding to each value, then accumulates and sums them, and calculates the proportions of the positive and negative samples respectively. The absolute value of the difference between the proportions of the positive and negative samples is taken to obtain a difference column (gap column), and the largest difference gap in the difference column is the target sample difference KS corresponding to the preset user characteristic of the initiator guest.
[0104] 3) The host receives the encrypted label data [y], sorts its own characteristic values from small to large and removes the undefined or non-representable values (NaN values) among them, calculates the statistics of the positive samples (good_num) and the statistics of the negative samples (bad_num) of its own according to the method in step 2), encrypts them to obtain an encrypted [bad_num, good_num] column, and then sends it to the guest.
[0105] 4) The initiating party guest receives [bad_num, good_num] and decrypts it, calculates the negative sample ratio bad_rate and the positive sample ratio good_rate, and then performs cumulative summation to obtain the new bad_rate_cum and good_rate_cum. After that, calculate the difference between the two columns to obtain the difference column, i.e., the gap column, and then take the largest difference in the difference column as the target sample difference KS corresponding to the preset user feature of the participating party, and return the target sample difference KS to the host.
[0106] 5) The host receives the KS value; the guest and the host output their respective KS values and the result of whether KS is greater than the given preset KS threshold. The preset KS threshold may refer to the critical value of the target sample difference set in advance. Generally speaking, KS greater than 0.01 indicates that the feature has a certain degree of discrimination for good and bad samples. The specific value of the preset KS threshold in the embodiments of the present invention is not limited.
[0107] Exemplarily, Figure 3 shows a flowchart for calculating the target sample difference of a discrete variable in an embodiment of the present invention. A discrete variable may refer to a preset user feature that usually takes integer values, such as the number of properties, etc. As Figure 3 shown, the calculation process of the target sample difference for discrete variables is only different from the calculation processes for continuous and categorical variables in the specific calculation method of the difference column (gap column), that is, the calculation process in step 4) above, and the rest of the interaction processes are the same as those in steps 1), 2), 4), and 5) above. Only the calculation process 4') of the target sample difference for discrete variables is introduced below, and the rest of the steps can refer to the above steps.
[0108] Step 4'): The guest receives [bad_num, good_num] and decrypts and calculates to obtain the negative sample ratio bad_rate and the positive sample ratio good_rate, sorts them in ascending order according to bad_rate, and then performs cumulative summation to obtain the new bad_rate_cum and good_rate_cum, and then takes the difference to obtain the difference column gap column, and then takes the largest difference in the difference column as the target sample difference KS corresponding to the preset user feature of the participating party, and returns the target sample difference KS to the host.
[0109] Optionally, in the embodiments of the present invention, the at least one target evaluation parameter value includes target information value. Correspondingly, step 102 may specifically include the following steps S31 to S33:
[0110] Step S31: Perform binning processing on the preset user feature based on a preset binning method to determine each bin and the bin points corresponding to each bin.
[0111] In the embodiments of the present invention, the target information value IV can be used to describe the ability of a preset user feature to distinguish between good and bad samples. The higher the IV value, the higher the ability of the preset user feature to distinguish between good and bad samples or the ability to distinguish between good and bad user qualifications. Generally, when the IV value is greater than 0.02, it indicates that the preset user feature has a certain ability to distinguish and can be used for subsequent model training. Of course, it is also possible to try to select preset user features with higher IV values to further improve the ability of the finally selected target user features to distinguish between good and bad user qualifications. The IV value can be calculated based on the Weight Of Evidence (WOE). When calculating the evidence weight value WOE and the target information value IV, it is necessary to first perform binning processing on the preset user features. The preset binning method can refer to the grouping processing method for preset user features set in advance. The binning point can refer to the cut-off point of binning.
[0112] Specifically, in the process of federated learning, the binning operation can be to perform binning operation (i.e., discretization) on continuous-valued attributes, and binning operation can also be performed on discrete variables with more values. The binned features have better robustness to abnormal data and avoid the negative interference of abnormal data on model training. At the same time, the binning operation can also convert variables to a similar scale, facilitating data processing. The preset binning method can refer to chi-square binning, decision tree binning, etc., and can be specifically selected based on actual needs. The embodiments of the present invention do not limit this.
[0113] Step S32: Each participating party calculates the number of positive and negative samples in each bin and sends the number of positive and negative samples to the initiating party.
[0114] In the embodiments of the present invention, the number of positive and negative samples can refer to the total number of positive samples and the total number of negative samples in each bin.
[0115] In this step, after binning the preset user features to obtain each bin, the participating party can determine the total number of positive and negative samples in each bin based on the label data, and then encrypt the number of positive and negative samples and send it to the initiating party so that the initiating party can calculate the target information value based on the number of positive and negative samples.
[0116] Step S33: The initiating party calculates the target information value based on the number of positive and negative samples corresponding to each bin.
[0117] In the embodiments of the present invention, after receiving the number of positive and negative samples sent by each participating party, the initiating party can calculate the target information value based on a pre-designed calculation formula. The specific pre-designed calculation formula can be flexibly set according to the actual scenario and requirements. The embodiments of the present invention do not make specific limitations on this.
[0118] In an embodiment of the present invention, binning processing is performed on preset user features based on a preset binning method to determine each bin and the bin points corresponding to each bin; the participating party calculates the number of positive and negative samples in each bin and sends the number of positive and negative samples to the initiating party; the initiating party calculates the target information value based on the number of positive and negative samples corresponding to each bin. In this way, by calculating the target information value corresponding to the feature column of the preset user features, the discrimination ability of the preset user features can be accurately reflected, providing an accurate basis for subsequent feature selection.
[0119] Exemplarily, Figure 4 Fig. shows a flow diagram of a chi-square binning in an embodiment of the invention. Chi-square binning can be a binning method based on chi-square test, and the chi-square statistic is selected for discrimination in statistical indicators. The basic idea of binning is to judge whether there is a distribution difference between two adjacent intervals, and merge them from bottom to top based on the result of the chi-square statistic until the binning limit conditions are met. Specifically, the chi-square binning may specifically include the following steps (1) to (5):
[0120] Step (1), the initiating party Guest generates a private key priv_key and a public key pub_key, and shares the public key pub_key with the participating party host; then the initiating party first performs equal-frequency binning on its own side, and then performs chi-square binning, continuously merging the two adjacent bins with the smallest chi-square value until the number of bins is less than or equal to the preset minimum number of bins, to obtain the binning result of its own side; the participating party host accepts pub_key and performs equal-frequency binning.
[0121] Step (2), the initiating party Guest encrypts the label column [label] corresponding to its own label data and transmits it to host, and host receives [label], calculates the total number of samples and the number of bad samples bin_count and [bin_bad_count] corresponding to each equal-frequency bin, and transmits them back to guest.
[0122] Step (3), the initiating party Guest decrypts [bin_bad_count] to obtain bin_bad_count, continuously merges the two adjacent bin numbers with the smallest chi-square value until the number of bins is less than or equal to the preset minimum number of bins, then stops binning and transmits the index sequence corresponding to the bin nodes to host.
[0123] Step (4), the participating party host accepts the index sequence and calculates the final chi-square bin points according to the index.
[0124] Step (5), the initiating party guest and the participating party host each output the binning result.
[0125] Exemplarily, Figure 5The figure shows a schematic flowchart of a decision tree binning according to an embodiment of the present invention. Decision tree binning can be a binning method that uses discretized variables to fit the target variable through a tree model. For example, directly use the CART decision tree, and then use the threshold of the internal node as the binning cut point. The CART decision tree is a binary tree that only performs binary classification each time. For continuous variables, the method is to calculate the median of adjacent two element values in turn, divide the data set into two, calculate the degree of decrease in the Gini value when this point is used as the cut point compared with the Gini value before the division. Each time of splitting, select the point with the largest degree of decrease in Gini as the optimal cut point, and then split the divided data set according to the same principle until the termination condition is reached.
[0126] Specifically, the decision tree binning process may specifically include the following steps (6) to (10):
[0127] Step (6), the initiator Guest generates private_key and pub_key, and shares pub_key with the host; first perform equal-frequency binning on its own side, calculate the median_list of the points to be divided according to the binning points, and then calculate the gini_gain of each point to be divided to select the best division point until the termination condition is reached, and output the binning result; the participating party host accepts pub_key and performs equal-frequency binning and calculates the points to be divided.
[0128] Step (7), Guest encrypts its own label data to obtain the label column [label] and transmits it to the host. The participating party host accepts [label] and calculates the information corresponding to the points to be divided, that is:
[0129] split_info = split_index: [left_bin_count, right_bin_count, [left_bin_bad_count, right_bin_bad_count]], and then transmits the information corresponding to the point to be divided back to the initiator guest.
[0130] Step (8), the initiator guest accepts the information split_info of all points to be divided, decrypts [left_bin_bad_count] and [right_bin_bad_count] to obtain left_bin_bad_count and right_bin_bad_count, and then calculates the Gini gain gini_gain of each division point, and selects the division point with the largest degree of decrease in the Gini value as the optimal division point split_index and transmits it to the host.
[0131] Step (9), the host calculates the split value corresponding to the split index split_index, and performs data partitioning according to the split value. If the number of samples in the left and right leaf nodes is less than the threshold, the iteration stops; otherwise, the node to be partitioned is recalculated for calculation.
[0132] Step (10), when the calculation by the host party ends, the binning result is output.
[0133] It should be noted that the serial numbers of the above steps are only used to distinguish different steps, and do not limit the sequence of steps. The specific execution sequence can be flexibly adjusted based on actual needs. As two binning methods with different principles, chi-square binning and decision tree binning can both be used based on actual needs when calculating the target information value. Of course, other binning methods can also be used, and the embodiments of the present invention do not limit this.
[0134] Exemplarily, Figure 6 shows a calculation flow chart of a target information value according to an embodiment of the present invention. As Figure 6 shown, the specific calculation process of the target information value, that is, the IV value, may include the following steps (11) to step (13):
[0135] Step (11), the initiating party guest encrypts the label to obtain en_label, that is, [label], and sends it to the participating party host; the participating party host first performs binning to obtain the binning points corresponding to each bin, and according to en_label, calculates the good and bad sample values en_good_num and en_bad_num in each bin, and returns the comprehensive results en_good_array and en_bad_arrray to the guest.
[0136] Step (12), the initiating party guest receives en_good_array and en_bad_arrray of the binning by the participating party host and decrypts them to obtain good_array and bad_array; then according to
[0137] woe = ln((bad_num / bad_all) / (good_num / good_all))
[0138] iv = ((bad_num / bad_all) - (good_num / good_all)) * woe
[0139] calculates the woe value and iv value of each bin; the target information value of the preset user feature, that is, the total IV value, is the sum of the iv values of all bins, IV = Σiv; the initiating party returns the woe value of each bin and the total feature IV value to the host.
[0140] Step (13), the host receives the woe and IV values and outputs the split points [split_points, woe] of binning and the total IV value; the guest can output the number of good and bad samples [good_num, bad_num, woe] corresponding to the host's binning and the total IV value.
[0141] Optionally, in the embodiments of the present invention, the target evaluation parameter value includes a target stability index value. Correspondingly, step 102 may specifically include the following steps S41 to S42:
[0142] Step S41, divide the local preset user features into a training set and a validation set.
[0143] In the embodiments of the present invention, the target stability index PSI value can be used to measure the stability of the preset user features. Generally, the smaller the PSI value, the more stable the preset user features. The training set can refer to a set of preset user features used for model training. The validation set can refer to a set of preset user features used for model validation, and can also be called a test set.
[0144] In this step, when calculating the target stability index value, the participating party and the initiating party can directly calculate locally without federation. Specifically, each party in the federated learning system can divide the local preset user features into a training set and a validation set, and then calculate the target stability index value corresponding to each preset user feature based on a pre-designed calculation method.
[0145] Step S42, calculate the target stability index value corresponding to each preset user feature in the training set and the validation set based on a preset stability calculation method.
[0146] In the embodiments of the present invention, the preset stability calculation method can refer to a pre-set calculation formula for stability. For example, the preset stability calculation method can be:
[0147] PSI = Σ(train_bin_rate - test_bin_rate) * log(train_bin_rate / test_bin_rate)
[0148] Among them, bin_rate is the binning ratio, which can specifically refer to the ratio of samples in each bin counted for the actual distribution according to the same binning interval. train_bin_rate is the binning ratio of the training set, and test_bin_rate is the binning ratio of the validation set. Specifically, in this step, after dividing the validation set and the training set, based on the preset binning ratio, the ratio of samples in the training set and the ratio of samples in the validation set in each bin can be determined, and then the PSI value corresponding to each preset user feature can be obtained by substituting into the above formula.
[0149] It should be noted that other formulas can also be used for the preset stability calculation method, which can be specifically determined according to actual needs, and the embodiments of the present invention do not limit this.
[0150] In the embodiments of the present invention, the local preset user features are divided into a training set and a validation set; based on the preset stability calculation method, the target stability index values corresponding to each preset user feature in the training set and the validation set are calculated. In this way, the stability of the feature can be measured based on the target stability index value, and thus an accurate basis can be provided for feature selection.
[0151] Optionally, in the embodiments of the present invention, when the target evaluation parameter value includes the target sample difference, the target information value, and the target stability index value, step 103 may include the following step 1031:
[0152] Step 1031: Calculate the product of the target sample difference and the target information value, and use the ratio of the product to the target stability index value as the target evaluation score.
[0153] In the embodiments of the present invention, both the target sample difference KS value and the target information value IV value are positively correlated with the discrimination ability of the preset user feature for the quality of user qualifications, and the target stability index value PSI is negatively correlated with the stability of the preset user feature. Combining these three parameters, the target evaluation score Score can be calculated based on the following formula:
[0154] Score = (KS * IV) / PSI
[0155] In this way, when performing feature selection based on the target evaluation score subsequently, the top N preset user features with the highest target evaluation scores or the preset user features with target evaluation scores greater than the preset target evaluation score threshold can be selected as the target user features. In this way, the higher the target evaluation score, the higher the discrimination ability and stability of the preset user features for distinguishing the quality of user qualifications, and they can be selected as the target user features finally participating in model training. In the embodiment of the present invention, the screening of features is realized by calculating the target evaluation score, which realizes the reasonable screening of user features, improves the accuracy of subsequent model training, and further improves the discrimination ability of the finally trained federated scoring card for customers.
[0156] Optionally, in the embodiment of the present invention, the federated learning feature selection method may further include the following steps S51 to S53:
[0157] Step S51: Obtain the correlation matrix corresponding to the local preset user features through the initiator and the correlation matrices corresponding to the preset user features of each participant.
[0158] In the embodiment of the present invention, the correlation matrix may refer to a matrix expressing the correlation between each feature column corresponding to the preset user features. Based on the correlation matrix, the target correlation coefficient between any two preset user features can be calculated.
[0159] Step S52: Based on the correlation matrices of the initiator and the participants, determine the target correlation coefficient between every two of the preset user features through the initiator.
[0160] In the embodiment of the present invention, the target correlation coefficient can be used to measure the correlation between two preset user features. The higher the target correlation coefficient between two preset user features, the higher the correlation between the two preset user features, and the closer the two preset user features are.
[0161] In this step, after the initiator obtains the correlation matrices corresponding to the local and each participant's preset user features, it can calculate the target correlation coefficient between every two features, and subsequently, the preset user features can be screened based on the target correlation coefficient.
[0162] Step S53: When the target correlation coefficient between two preset user features is greater than the preset correlation coefficient threshold, delete one of the preset user features according to the preset deletion rule.
[0163] In an embodiment of the present invention, the preset correlation coefficient threshold may refer to a critical value of the correlation coefficient set in advance. When the target correlation coefficient between two preset user features is greater than the preset correlation coefficient threshold, it indicates that the two preset user features have a high correlation and are relatively similar. The specific value of the preset correlation coefficient threshold may be 0.7, 0.8, etc., and can be set based on actual needs. The embodiment of the present invention does not limit this.
[0164] The preset deletion rule may refer to a screening rule set in advance for two preset user features with a high correlation. The preset deletion rule may refer to screening based on the IV value, that is, deleting the preset user feature with a low IV value among the two preset user features with a high correlation and retaining the preset user feature with a high IV value. In this way, while avoiding feature redundancy, it can ensure that the selected preset user features have a certain discrimination ability.
[0165] It should be noted that the screening process of user features based on the target correlation coefficient can be carried out after obtaining the preset user features and before selecting the target user features based on the target evaluation score, as a pre-screening process to avoid feature redundancy and can reduce the calculation amount of the target evaluation parameter value to a certain extent; the screening process of user features based on the target correlation coefficient can also be carried out after selecting the target user features based on the target evaluation score, as a secondary screening process to further improve the rationality of feature extraction. The specific screening node can be determined based on actual needs. The embodiment of the present invention does not limit this.
[0166] In an embodiment of the present invention, the initiator obtains the correlation matrix corresponding to the local preset user features and the correlation matrices corresponding to the preset user features of each participating party; based on the correlation matrix, the initiator determines the target correlation coefficient between each pair of preset user features; in the case where the target correlation coefficient corresponding to two preset user features is greater than the preset correlation coefficient threshold, one of the preset user features is deleted according to the preset deletion rule. In this way, the target correlation coefficient is calculated through the correlation matrix, and the preset user features are preliminarily screened based on the target correlation coefficient, avoiding feature redundancy and ensuring the discrimination ability of the selected preset user features, and further improving the rationality and scientificity of user feature selection.
[0167] Exemplarily, the federated learning system can calculate the target correlation coefficient based on the following steps (14) to (18) and perform feature filtering based on the target correlation coefficient: Assume an intermediate party C, and participating parties A (guest) and B (host)
[0168] Step (14): Using the calculation method of Secure Multi-party Computation (MPC), the initiator obtains the correlation matrix of the preset user features of all participating parties.
[0169] In this step, the multi-party secure computation MPC can refer to the situation where, without a trusted third party, multiple participating parties collaborate to compute a predefined function, and ensure that each party only obtains its own computation result, and cannot infer the input and output data of any other party through the interaction data during the computation process. Based on the MPC calculation method, the sharing of private data can be achieved.
[0170] Step (15): Each participating party transmits the IV value of its own preset user feature to the initiator, and the initiator receives the IV values of all participating parties and starts screening.
[0171] Step (16): The initiator calculates the target correlation coefficient of pairwise features according to the correlation matrix. If the target correlation coefficient is higher than the preset correlation coefficient threshold, the preset user feature with a lower IV value is deleted, and the preset user feature with a higher IV value is retained until all features are screened.
[0172] Step (17): The initiator returns the features of each participating party after screening to each participating party, and each participating party obtains the new preset user features after screening.
[0173] Step (18): The initiator and each participating party respectively output the preset user features after screening on their own sides.
[0174] In this way, through the above steps (14) to (18), when the target correlation coefficient between pairwise preset user features is relatively high, that is, the correlation is relatively high, the preset user features with lower discrimination ability can be deleted, and the preset user features with higher discrimination ability can be retained, making the selected user features have stronger discrimination ability on the premise of avoiding feature redundancy, improving the rationality of feature selection, and then being able to improve the accuracy of subsequent model training and the discrimination ability of the finally generated federated scoring card model.
[0175] It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0176] Refer to Figure 7, showing a structural block diagram of a federated learning feature selection device according to an embodiment of the present invention. Specifically, the federated learning feature selection device 70 may include the following modules:
[0177] The first acquisition module 701 is configured to respectively acquire local preset user features through the participating party and the initiating party;
[0178] The calculation module 702 is configured to calculate a target evaluation parameter value corresponding to the preset user feature according to the preset user feature;
[0179] The first determination module 703 is configured to determine a target evaluation score corresponding to each preset user feature based on the target evaluation parameter value;
[0180] The selection module 704 is configured to select, as target user features, features whose target evaluation scores meet a preset condition according to the target evaluation scores.
[0181] In summary, a federated learning feature selection device provided by an embodiment of the present invention acquires local preset user features through a participating party and an initiating party respectively; calculates a target evaluation parameter value corresponding to the preset user feature according to the preset user feature; determines a target evaluation score corresponding to each preset user feature based on the target evaluation parameter value; and selects, as target user features, features whose target evaluation scores meet a preset condition according to the target evaluation scores. In the embodiment of the present invention, by calculating the target evaluation score corresponding to each preset user feature based on the target evaluation parameter value, and then selecting target user features according to the target evaluation score for model training. In this way, the rationality of feature selection in federated learning modeling is improved, and the unreasonable situation of feature selection caused by offline communication and random selection of user features in the prior art is avoided.
[0182] Optionally, the target evaluation parameter value includes a target sample difference; the calculation module 702 is specifically configured to:
[0183] Determine the feature value and label data of the local preset user feature;
[0184] Determine positive and negative sample statistics based on the feature value and the label data;
[0185] Calculate, by the initiating party, the ratio difference between the positive and negative samples based on the positive and negative sample statistics to obtain an alternative sample difference;
[0186] Determine the target sample difference based on the alternative sample difference.
[0187] Optionally, the target evaluation parameter value includes a target information value;
[0188] The calculation module 702 is specifically configured to:
[0189] Perform binning processing on the preset user features based on a preset binning method to determine each bin and the bin points corresponding to each bin;
[0190] The participating party calculates the number of positive and negative samples in each bin and sends the number of positive and negative samples to the initiating party;
[0191] The initiating party calculates the target information value based on the number of positive and negative samples corresponding to each bin.
[0192] Optionally, the target evaluation parameter value includes a target stability index value;
[0193] The calculation module 702 is specifically configured to:
[0194] Divide the local preset user features into a training set and a validation set;
[0195] Based on a preset stability calculation method, calculate the target stability index values corresponding to each preset user feature in the training set and the validation set.
[0196] Optionally, when the target evaluation parameter value includes a target sample difference, a target information value, and a target stability index value, the first determination module 703 is specifically configured to:
[0197] Calculate the product of the target sample difference and the target information value, and use the ratio of the product to the target stability index value as the target evaluation score.
[0198] Optionally, the device 70 further includes:
[0199] A second acquisition module, configured to acquire, by the initiating party, the correlation matrix corresponding to the local preset user features and the correlation matrices corresponding to the preset user features of each participating party;
[0200] A second determination module, configured to determine, by the initiating party, the target correlation coefficients between every two of the preset user features based on the correlation matrix;
[0201] A deletion module, configured to delete one of the preset user features according to a preset deletion rule when the target correlation coefficient corresponding to two preset user features is greater than a preset correlation coefficient threshold.
[0202] Optionally, an embodiment of the present invention discloses a federated learning feature selection system, which is applied to a federated learning system. The federated learning system includes an initiating party and participating parties, where:
[0203] The participating parties and the initiating party respectively acquire local preset user features;
[0204] According to the preset user characteristics, the federated learning system calculates a target evaluation parameter value corresponding to the preset user characteristics;
[0205] Based on the target evaluation parameter value, the federated learning system determines a target evaluation score corresponding to each of the preset user characteristics;
[0206] According to the target evaluation score, the federated learning system selects the characteristics whose target evaluation scores meet the preset conditions as the target user characteristics.
[0207] When the federated learning feature selection system executes, it can implement each process of the above-mentioned embodiment of the federated learning feature selection method, and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0208] Optionally, an embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, it implements each process of the above-mentioned embodiment of the federated learning feature selection method, and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0209] Optionally, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements each process of the above-mentioned embodiment of the federated learning feature selection method, and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0210] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other.
[0211] It is easy for those skilled in the art to think that any combination application of the above-mentioned various embodiments is feasible. Therefore, any combination among the above-mentioned various embodiments is an implementation scheme of the present invention. However, due to space limitations, this specification will not elaborate on them one by one here.
[0212] In the specification provided here, a large number of specific details are described. However, it can be understood that the embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and technologies are not shown in detail so as not to obscure the understanding of this specification.
[0213] Similarly, it should be understood that, for the purpose of streamlining the present invention and facilitating the understanding of one or more of the various inventive aspects, in the foregoing description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the claims, the inventive aspects lie in less than all the features of the single foregoing disclosed embodiment. Thus, the claims following the detailed description hereby expressly incorporate the detailed description, wherein each claim itself serves as a separate embodiment of the present invention.
[0214] Those skilled in the art can understand that the modules in the devices in the embodiments can be adaptively changed and disposed in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that provides the same, equivalent, or similar purpose.
[0215] In addition, those skilled in the art can understand that although some of the embodiments described herein include certain features included in other embodiments rather than other features, the combination of the features of different embodiments means that it is within the scope of the present invention and forms different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.
[0216] It should be noted that the above embodiments illustrate the present invention rather than limit the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims listing several devices, several of these devices can be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names.
Claims
1. A federated learning feature selection method, characterized in that, Applied to a federated learning system, the federated learning system includes an initiator and participants, and the method includes: Respectively obtain local preset user features through the participants and the initiator; Calculate the target evaluation parameter value corresponding to the preset user feature according to the preset user feature; Based on the target evaluation parameter value, determine the target evaluation score corresponding to each preset user feature; According to the target evaluation score, select the features whose target evaluation scores meet the preset conditions as target user features; The target evaluation parameter value includes a target sample difference; The calculating the target evaluation parameter value corresponding to the preset user feature includes: The initiator sends label data to the participants, and at the same time, both the initiator and the participants determine the feature values of the local preset user features; The initiator determines the positive and negative sample statistics of the initiator based on the feature value of the initiator and the label data of the initiator; The participant determines the positive and negative sample statistics of the participant based on the feature value of the participant and the label data; The participant sends the positive and negative sample statistics of the participant to the initiator, and the initiator calculates the ratio difference of the positive and negative samples of the participant based on the positive and negative sample statistics of the participant to obtain the alternative sample difference of the participant; The initiator calculates the ratio difference of the positive and negative samples of the initiator based on the positive and negative sample statistics of the initiator to obtain the alternative sample difference of the initiator; Based on the alternative sample difference of the participant and the alternative sample difference of the initiator, determine the target sample difference.
2. The method according to claim 1, wherein The target evaluation parameter value includes a target information value; The calculating the target evaluation parameter value corresponding to the preset user feature includes: Perform binning processing on the preset user feature based on a preset binning method to determine each bin and the bin points corresponding to each bin; The participant calculates the number of positive and negative samples in each bin and sends the number of positive and negative samples to the initiator; The initiator calculates the target information value based on the number of positive and negative samples corresponding to each bin.
3. The method according to claim 1, characterized in that The target evaluation parameter value includes a target stability index value; The calculating the target evaluation parameter value corresponding to the preset user feature includes: Divide the local preset user feature into a training set and a validation set; Based on a preset stability calculation method, calculate the target stability index value corresponding to each preset user feature in the training set and the validation set.
4. The method according to any one of claims 1 to 3, characterized in that, When the target evaluation parameter value includes a target sample difference, a target information value, and a target stability index value, the determining the target evaluation score corresponding to each preset user feature based on the target evaluation parameter value includes: Calculate the product of the target sample difference and the target information value, and use the ratio of the product to the target stability index value as the target evaluation score.
5. The method according to claim 1, wherein After respectively obtaining the local preset user features through the participants and the initiator, the method further includes: The initiator obtains the correlation matrix corresponding to the local preset user features and the correlation matrices corresponding to the preset user features of each of the participating parties; Based on the correlation matrix, the initiator determines the target correlation coefficients between the preset user features pairwise; When the target correlation coefficient between two preset user features is greater than the preset correlation coefficient threshold, one of the preset user features is deleted according to the preset deletion rule.
6. A federated learning feature selection device, characterized in that, Applied to a federated learning system, the federated learning system includes an initiator and participating parties, and the device includes: A first acquisition module, configured to respectively acquire local preset user features through the participating parties and the initiator; A calculation module, configured to calculate a target evaluation parameter value corresponding to the preset user features according to the preset user features; A first determination module, configured to determine a target evaluation score corresponding to each type of preset user feature based on the target evaluation parameter value; A selection module, configured to select, according to the target evaluation score, the features whose target evaluation scores meet the preset conditions as target user features; The target evaluation parameter value includes a target sample difference; The calculation of the target evaluation parameter value corresponding to the preset user features includes: The initiator sends label data to the participating parties, and at the same time, both the initiator and the participating parties determine the feature values of the local preset user features; The initiator determines the positive and negative sample statistics of the initiator based on the feature values of the initiator and the label data of the initiator; The participating party determines the positive and negative sample statistics of the participating party based on the feature values of the participating party and the label data; The participating party sends the positive and negative sample statistics of the participating party to the initiator, and the initiator calculates the ratio difference between the positive and negative samples of the participating party based on the positive and negative sample statistics of the participating party to obtain the alternative sample difference of the participating party; The initiator calculates the ratio difference between the positive and negative samples of the initiator based on the positive and negative sample statistics of the initiator to obtain the alternative sample difference of the initiator; Based on the alternative sample difference of the participating party and the alternative sample difference of the initiator, the target sample difference is determined.
7. A federated learning feature selection system, characterized in that, Applied to a federated learning system, the federated learning system includes an initiator and participating parties, wherein: The participating parties and the initiator respectively acquire local preset user features; According to the preset user features, the federated learning system calculates the target evaluation parameter value corresponding to the preset user features; Based on the target evaluation parameter value, the federated learning system determines the target evaluation score corresponding to each type of preset user feature; According to the target evaluation score, the federated learning system selects the features whose target evaluation scores meet the preset conditions as target user features; The target evaluation parameter value includes a target sample difference; The calculation of the target evaluation parameter value corresponding to the preset user features includes: The initiator sends label data to the participating parties, and at the same time, both the initiator and the participating parties determine the feature values of the local preset user features; The initiator determines the positive and negative sample statistics of the initiator based on the feature values of the initiator and the label data of the initiator; The participant determines the positive and negative sample statistics of the participant based on the feature values of the participant and the label data; The participant sends the positive and negative sample statistics of the participant to the initiator, and the initiator calculates the ratio difference between the positive and negative samples of the participant based on the positive and negative sample statistics of the participant to obtain the alternative sample difference of the participant; The initiator calculates the ratio difference between the positive and negative samples of the initiator based on the positive and negative sample statistics of the initiator to obtain the alternative sample difference of the initiator; Based on the alternative sample difference of the participant and the alternative sample difference of the initiator, the target sample difference is determined.
8. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, it implements the federated learning feature selection method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, it implements the federated learning feature selection method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Data quality evaluation method, computer equipment and storage medium
CN113807736A