Feature Selection Method, Electronic Device, Medium and Program Product
Generating feature selection result counters through homomorphic encryption technology, solving the data privacy problem during feature selection in vertical federated learning, and realizing the data security feature selection process.
Patent Information
- Application Number
- CN202211730552.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-12-30
AI Technical Summary
In vertical federated learning scenarios, the existing technology cannot effectively protect data privacy. Direct feature selection based on the correlation coefficient is likely to expose the feature correlations of different participants, resulting in data privacy leakage.
Homomorphic encryption technology is used to generate feature counters and selectively update them to generate homomorphic encryption feature selection result counters. The data during the interaction process is encrypted to ensure that the participants cannot understand the correlation of each other's characteristics.
Data privacy protection is achieved in vertical federated learning, preventing the direct exposure of characteristic correlations of different participants and ensuring data security.
Smart Images

Figure CN115964746B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of artificial intelligence in financial technology (Fintech), and particularly relates to a feature selection method, an electronic device, a medium, and a program product. Background Art
[0002] With the continuous development of financial technology, especially Internet technology finance, more and more technologies (such as distributed, artificial intelligence, etc.) are applied in the financial field. However, the financial industry also puts forward higher requirements for technologies, such as higher requirements for the distribution of to-do items corresponding to the financial industry.
[0003] Feature selection based on the correlation coefficient has wide application value. By filtering out highly correlated features, the features included in the model can be reduced. In the vertical federated learning scenario, features are usually distributed among different participants, and the correlation coefficients between the features of different participants are usually kept confidential, that is, data privacy. However, if feature selection is directly performed based on the correlation coefficient in the vertical federated learning scenario, it is easy to expose the correlation between the respective features of different participants to each other, resulting in the leakage of data privacy. Summary of the Invention
[0004] The main purpose of the present application is to provide a feature selection method, an electronic device, a medium, and a program product, aiming to solve the technical problem of being unable to protect data privacy when performing feature selection in the vertical federated learning scenario in the prior art.
[0005] To achieve the above object, the present application provides a feature selection method, which is applied to the first participant in vertical federated learning. The feature selection method includes:
[0006] Obtain first correlation information, where the first correlation information is used to characterize the correlation between each pair of first participant features and the correlation between each first participant feature and each second participant feature in pairs;
[0007] Receive the homomorphically encrypted second correlation information sent by the second participant, where the second correlation information is used to characterize the correlation between each pair of second participant features;
[0008] Generate a feature counter jointly corresponding to each first participant feature and each second participant feature;
[0009] Selectively update the feature counter according to the first correlation information and the homomorphically encrypted second correlation information to generate a homomorphically encrypted feature selection result counter;
[0010] Send the counter of the homomorphically encrypted feature selection result to the second party for the second party to decrypt the counter of the homomorphically encrypted feature selection result into a feature selection result counter, where the feature selection result counter is used to record whether each of the first party's features and each of the second party's features is selected;
[0011] Perform feature selection among each of the first party's features and each of the second party's features according to the feature selection result counter fed back by the second party.
[0012] This application provides a feature selection method applied to the second party in vertical federated learning. The feature selection method includes:
[0013] Obtain second correlation information, and perform homomorphic encryption on the second correlation information to obtain homomorphically encrypted second correlation information;
[0014] Send the homomorphically encrypted second correlation information to the first party for the first party to selectively update the feature counter according to the local first correlation information and the homomorphically encrypted second correlation information, and generate a homomorphically encrypted feature selection result counter, where the feature selection result counter is used to record whether each of the first party's features and each of the second party's features is selected;
[0015] Receive the homomorphically encrypted feature selection result counter sent by the first party, and decrypt the homomorphically encrypted feature selection result counter into a feature selection result counter;
[0016] Feed back the feature selection result counter to the first party for the first party to perform feature selection among each of the first party's features and each of the second party's features according to the feature selection result counter fed back by the second party.
[0017] This application also provides a feature selection device. The device is a virtual device applied to the first party in vertical federated learning. The feature selection device includes:
[0018] An acquisition module, configured to acquire first correlation information, where the first correlation information is used to characterize the correlation between each pair of first party's features and the correlation between each pair of the first party's features and each second party's features;
[0019] A receiving module, configured to receive the homomorphically encrypted second correlation information sent by the second party, where the second correlation information is used to characterize the correlation between each pair of second party's features;
[0020] A generation module, configured to generate a feature counter corresponding to each of the first participant features and each of the second participant features;
[0021] A selective update module, configured to selectively update the feature counter according to the first correlation information and the homomorphically encrypted second correlation information, and generate a homomorphically encrypted feature selection result counter;
[0022] A sending module, configured to send the homomorphically encrypted feature selection result counter to a second participant, so that the second participant decrypts the homomorphically encrypted feature selection result counter into a feature selection result counter, where the feature selection result counter is used to record whether each of the first participant features and each of the second participant features is selected;
[0023] A feature selection module, configured to perform feature selection among each of the first participant features and each of the second participant features according to the feature selection result counter fed back by the second participant.
[0024] This application further provides a feature selection device, which is a virtual device and is applied to a second participant in vertical federated learning. The feature selection device includes:
[0025] A homomorphic encryption module, configured to obtain second correlation information, perform homomorphic encryption on the second correlation information, and obtain homomorphically encrypted second correlation information;
[0026] A sending module, configured to send the homomorphically encrypted second correlation information to a first participant, so that the first participant selectively updates a feature counter according to local first correlation information and the homomorphically encrypted second correlation information, and generates a homomorphically encrypted feature selection result counter, where the feature selection result counter is used to record whether each of the first participant features and each of the second participant features is selected;
[0027] A decryption module, configured to receive the homomorphically encrypted feature selection result counter sent by the first participant, and decrypt the homomorphically encrypted feature selection result counter into a feature selection result counter;
[0028] A feedback module, configured to feed back the feature selection result counter to the first participant, so that the first participant performs feature selection among each of the first participant features and each of the second participant features according to the feature selection result counter fed back by the second participant.
[0029] The present application also provides an electronic device, which includes: a memory, a processor, and a program of the feature selection method stored on the memory and executable on the processor. When the program of the feature selection method is executed by the processor, the steps of the feature selection method as described above can be implemented.
[0030] The present application also provides a computer-readable storage medium, on which a program for implementing the feature selection method is stored. When the program of the feature selection method is executed by the processor, the steps of the feature selection method as described above are implemented.
[0031] The present application also provides a computer program product, including a computer program. When the computer program is executed by the processor, the steps of the feature selection method as described above are implemented.
[0032] The present application provides a feature selection method, an electronic device, a medium, and a program product, which are applied to a first participant in vertical federated learning. Specifically, first correlation information is obtained, where the first correlation information is used to characterize the correlation between each pair of first participant features and the correlation between each pair of first participant features and each second participant feature; the second participant is received to send homomorphically encrypted second correlation information, where the second correlation information is used to characterize the correlation between each pair of second participant features; a feature counter jointly corresponding to each first participant feature and each second participant feature is generated; the feature counter is selectively updated according to the first correlation information and the homomorphically encrypted second correlation information to generate a homomorphically encrypted feature selection result counter; the homomorphically encrypted feature selection result counter is sent to the second participant for the second participant to decrypt the homomorphically encrypted feature selection result counter into a feature selection result counter, where the feature selection result counter is used to record whether each first participant feature and each second participant feature are selected; feature selection is performed among each first participant feature and each second participant feature according to the feature selection result counter fed back by the second participant. In this way, in the feature selection process implemented in the vertical federated learning scenario of the present application, the correlation data interacted between the first participant and the second participant is the homomorphically encrypted second correlation information. Therefore, the first participant cannot know the feature correlation between each second participant feature, which protects the data privacy of the second participant. In addition, the plaintext data that the second participant can obtain is only the feature selection result counter, which is used to record whether each first participant feature and each second participant feature are selected and does not directly expose the feature correlation between each first participant feature. Therefore, it also protects the data privacy of the first participant. Therefore, it overcomes the technical defect that if feature selection is directly performed in the vertical federated learning scenario based on the correlation coefficient, it is easy to mutually expose the correlation between the respective features of different participants, resulting in the leakage of data privacy, and solves the problem that data privacy cannot be protected when performing feature selection in the vertical federated learning scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application and used together with the specification to explain the principles of the present application.
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0035] Figure 1 Schematic flow chart of the first embodiment of the feature selection method of the present application;
[0036] Figure 2 Schematic flow chart of the second embodiment of the feature selection method of the present application;
[0037] Figure 3 Schematic diagram of the device of the third embodiment of the feature selection method of the present application;
[0038] Figure 4 Interaction schematic diagram between the first participant and the second participant in an embodiment of the feature selection method of the present application;
[0039] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the feature selection method in the embodiment of the present application.
[0040] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0041] To make the above objects, features and advantages of the present application more obvious and understandable, 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. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0042] Embodiment 1
[0043] The embodiment of the present application provides a feature selection method, which is applied to the first participant in vertical federated learning. In the first embodiment of the feature selection method of the present application, refer to Figure 1 , the feature selection method includes:
[0044] Step S10, obtaining first correlation information, where the first correlation information is used to characterize the correlation between each pair of first participant features and the correlation between each pair of first participant features and each second participant feature;
[0045] Step S20, receiving the second correlation information encrypted homomorphically sent by the second participant, where the second correlation information is used to characterize the correlation between each pair of second participant features;
[0046] Step S30, generating a feature counter jointly corresponding to each of the first participant features and each of the second participant features;
[0047] Step S40: Selectively update the feature counter according to the first correlation information and the homomorphically encrypted second correlation information to generate a homomorphically encrypted feature selection result counter;
[0048] Step S50: Send the homomorphically encrypted feature selection result counter to a second participating party, so that the second participating party decrypts the homomorphically encrypted feature selection result counter into a feature selection result counter, where the feature selection result counter is used to record whether each of the first participating party features and each of the second participating party features is selected;
[0049] Step S60: Perform feature selection among each of the first participating party features and each of the second participating party features according to the feature selection result counter fed back by the second participating party.
[0050] In this embodiment, it should be noted that in the vertical federated learning scenario, since features are distributed among different federated learning participating parties respectively, it is inevitable to expose the correlation between the respective features of each federated learning participating party during feature selection. For each federated learning participating party, the correlation between the respective features of the federated learning participating party locally is usually its own data privacy. Therefore, how to protect data privacy during feature selection in the vertical federated learning scenario has become an urgent problem to be solved.
[0051] As an example, both the first participating party and the second participating party are federated learning participating parties in vertical federated learning. The first participating party can be the initiating party of vertical federated learning. The first participating party has each first participating party feature and sample labels, and the second participating party has each second participating party feature.
[0052] As an example, the first correlation information is used to characterize the correlation between each pair of the first participating party features and the correlation between each of the first participating party features and each of the second participating party features. The first correlation information includes at least one first correlation characterization value, where the first correlation characterization value is used to characterize whether the correlation between two first participating party features is significant or to characterize whether the correlation between a first participating party feature and a second participating party feature is significant. For example, if the correlation coefficient between first participating party feature A and first participating party feature B is greater than a preset correlation coefficient threshold, it is considered that the correlation between first participating party feature A and first participating party feature B is significant. At this time, the corresponding first correlation characterization value can be set to 1. If the correlation coefficient between first participating party feature A and first participating party feature B is not greater than the preset correlation coefficient threshold, it is considered that the correlation between first participating party feature A and first participating party feature B is not significant. At this time, the first correlation characterization value is set to 0.
[0053] As an example, the second correlation information is used to characterize the correlation between each pair of second participant features, and the second correlation information includes at least one second correlation characterization value. Among them, the second correlation characterization value is used to characterize whether the correlation between two second participant features is significant. For example, if the correlation coefficient between the second participant feature C and the second participant feature D is greater than the preset correlation coefficient threshold, it is considered that the correlation between the second participant feature C and the second participant feature D is significant. At this time, the corresponding second correlation characterization value can be set to 1. If the correlation coefficient between the second participant feature C and the second participant feature D is not greater than the preset correlation coefficient threshold, it is considered that the correlation between the second participant feature C and the second participant feature D is not significant. At this time, the second correlation characterization value is set to 0.
[0054] As an example, it can be set that when the correlation coefficient is greater than the preset correlation coefficient threshold, the feature correlation is considered significant; when the correlation coefficient is not greater than the preset correlation coefficient threshold, the feature correlation is considered not significant.
[0055] As an example, steps S10 to S60 include: obtaining first correlation coefficients between every two of the first participant features and second correlation coefficients between every two of the first participant features and the second participant features; generating first correlation information according to the first correlation coefficients and the second correlation coefficients, where the first correlation information is used to characterize whether the correlation between every two of the first participant features is significant and whether the correlation between every two of the first participant features and the second participant features is significant; receiving the second correlation information encrypted homomorphically sent by the second participant, where the second correlation information is used to characterize whether the correlation between every two of the second participant features is significant; generating corresponding feature counters according to the number of features of each first participant feature and the number of features of each second participant feature, where the feature counters include bit values corresponding to each first participant feature or second participant feature, and the bit values are used to characterize whether to select the corresponding feature, that is, whether to retain the feature as an input feature for the model; selectively updating each bit value in the feature counters according to the first correlation information and the homomorphically encrypted second correlation information to generate a homomorphically encrypted feature selection result counter; sending the homomorphically encrypted feature selection result counter to the second participant for the second participant to decrypt the homomorphically encrypted feature selection result counter into a feature selection result counter, where the feature selection result counter is used to record whether to select each of the first participant features and the second participant features, that is, to record which first participant features and which second participant features are retained as input features for the model; performing feature selection among the first participant features and the second participant features according to the bit values in the feature selection result counter fed back by the second participant, that is, selecting input features among the first participant features and the second participant features.
[0056] As an example, it can be set that if the bit value in the feature selection result counter is a preset first value, the feature corresponding to the bit can be selected to be discarded, and if the bit value in the feature selection result counter is a preset second value, the feature corresponding to the bit can be selected to be retained. For example, the preset first value can be set to a non-zero value, and the preset second value can be set to 0.
[0057] As an example, the generating corresponding feature counters according to the number of features of each first participant feature and the number of features of each second participant feature includes:
[0058] Counting the total number of features of each of the first participant features and the second participant features, and generating a preset vector of the same length as the total number of features as the feature counter.
[0059] As an example, assume that the total number of features is 100, then a zero vector of length 100 can be generated as the feature counter.
[0060] Among them, the step of selectively updating the feature counter according to the first correlation information and the second correlation information of the homomorphic encryption to generate a homomorphic encrypted feature selection result counter includes:
[0061] Step S41, extract target features from each of the first party features and each of the second party features, and use the remaining first party features and second party features as features to be screened;
[0062] Step S42, if neither the target feature nor the feature to be screened is a second party feature, then selectively update the bit value corresponding to the feature to be screened in the feature counter according to the first correlation information;
[0063] Step S43, if both the target feature and the corresponding feature to be screened are second party features, then update the bit value corresponding to the feature to be screened in the feature counter according to the second correlation information of the homomorphic encryption;
[0064] Step S44, return to execute the step: extract target features from each of the first party features and each of the second party features until no more target features can be extracted, and generate a homomorphic encrypted feature selection result counter according to the updated feature counter.
[0065] As an example, steps S41 to S44 include: extracting target features from each of the first participant features and each of the second participant features, and using each of the first participant features and each of the second participant features other than the target features as features to be screened; for each feature to be screened, the following steps are performed: if neither the target feature nor the feature to be screened is a second participant feature, query the first correlation representation value jointly corresponding to the target feature and the feature to be screened in the first correlation information, and selectively update the bit value corresponding to the feature to be screened in the feature counter according to the value of the first correlation representation value; if both the target feature and the corresponding feature to be screened are second participant features, query the homomorphically encrypted second correlation representation value jointly corresponding to the target feature and the feature to be screened in the homomorphically encrypted second correlation information, and update the bit value corresponding to the feature to be screened in the feature counter according to the homomorphically encrypted second correlation representation value; return to execute the steps: extracting target features from each of the first participant features and each of the second participant features until no more target features can be extracted, and generating a homomorphically encrypted feature selection result counter according to the updated feature counter.
[0066] Among them, the selectively updating the bit value corresponding to the feature to be screened in the feature counter according to the first correlation information includes:
[0067] Step S421, query the first correlation representation value jointly corresponding to the target feature and the feature to be screened in the first correlation information;
[0068] Step S422, if the first correlation representation value is a preset first representation value, update the bit value corresponding to the feature to be screened in the feature counter according to the bit value corresponding to the target feature in the feature counter, where the bit value is used to indicate whether to select the corresponding feature;
[0069] Step S423, if the first correlation representation value is a preset second representation value, do not update the bit value corresponding to the feature to be screened in the feature counter.
[0070] As an example, steps S421 to S422 include: querying a first correlation characterization value jointly corresponding to the target feature and the to-be-screened feature in the first correlation information; if the first correlation characterization value is a preset first characterization value, then according to the bit value corresponding to the target feature in the feature counter, performing a bit operation on the bit value corresponding to the to-be-screened feature in the feature counter to update the bit value corresponding to the to-be-screened feature, where the bit value is used to indicate whether to select the corresponding feature, that is, to indicate whether to retain the corresponding feature, and the preset first characterization value is used to characterize that the correlation between the target feature and the to-be-screened feature is significant; if the first correlation characterization value is a preset second characterization value, then the bit value corresponding to the to-be-screened feature in the feature counter is not updated, where the preset second characterization value is used to characterize that the correlation between the target feature and the to-be-screened feature is not significant.
[0071] As an example, the process of performing a bit operation on the bit value corresponding to the to-be-screened feature in the feature counter according to the bit value corresponding to the target feature in the feature counter can be specifically represented by the following formula:
[0072] counter[y] = counter[y] | (1 ^ counter[x])
[0073] The above bit operation process is converted into a calculation process as follows:
[0074] counter[y] = counter[y] + ((1 + counter[x]) - 2 * counter[x])
[0075] -(counter[y] * ((1 + counter[x]) - 2 * counter[x]))
[0076] Where counter[y] is the bit value corresponding to the to-be-screened feature in the feature counter, and counter[x] is the bit value corresponding to the target feature in the feature counter.
[0077] Where generating a homomorphic encryption feature selection result counter according to the updated feature counter includes:
[0078] Step A10, encrypting the updated feature counter into a homomorphic encryption feature selection result counter;
[0079] In this embodiment, it should be noted that the homomorphic encryption method can be fully homomorphic encryption.
[0080] Step B10: Obtain the encrypted bit values corresponding to the second correlation information of homomorphic encryption in the updated feature counter, and combine the encrypted bit values into a feature selection result counter of homomorphic encryption;
[0081] In this embodiment, it should be noted that in the updated feature counter, since some bit values are updated based on the second correlation characterization value of homomorphic encryption, this will cause these bit values to be encrypted bit values, that is, bit values of homomorphic encryption. These bit values of homomorphic encryption need to be sent to the second participant to be decrypted into plaintext data.
[0082] As an example, step B10 includes: obtaining the encrypted bit values corresponding to the second correlation information of homomorphic encryption in the updated feature counter, where the encrypted bit values are ciphertext bit values updated based on the second correlation information of homomorphic encryption; concatenating the encrypted bit values into a vector in a preset order to obtain a feature selection result counter of homomorphic encryption, where the preset order can be the arrangement order of the encrypted bit values in the feature counter. In this way, in the embodiments of the present application, it is not necessary to send all the bit values in the feature counter to the second participant, but only to send the encrypted bit values corresponding to the second correlation information of homomorphic encryption in the updated feature counter to the second participant for decryption. This can reduce the amount of interaction data between the first participant and the second participant, improve the interaction communication efficiency, and the first participant can keep confidential the significant correlation situation between the first participant's features and the first participant's features and the significant correlation situation between the first participant's features and the second participant's features, which protects the data privacy of the first participant.
[0083] Step C10: Mix corresponding random numbers on each bit value of the updated feature counter to obtain a feature counter after mixing random numbers, and encrypt the feature counter after mixing random numbers into a feature selection result counter of homomorphic encryption.
[0084] As an example, step C10 includes: mixing corresponding random numbers with the bit values of the updated feature counter to obtain a feature counter after mixing random numbers, where the mixing method can be addition, subtraction, multiplication, etc.; encrypting the feature counter after mixing random numbers into a homomorphic encrypted feature selection result counter, where the homomorphic encryption method can be fully homomorphic encryption. In this way, since random numbers are mixed with the bit values of the updated feature counter, even if the second party decrypts the homomorphic encrypted feature selection result counter to obtain the corresponding plaintext, it is impossible to know the significant correlation situation between the first party's features and the first party's features, and the significant correlation situation between the first party's features and the second party's features, which protects the data privacy of the first party.
[0085] Among them, the extraction of target features from each of the first party's features and each of the second party's features includes:
[0086] Step S411, obtaining the first feature importance index value of each of the first party's features and the second feature importance index value of each of the second party's features;
[0087] Step S412, sorting each of the first party's features and each of the second party's features according to each of the first feature importance index values and each of the second feature importance index values to obtain a feature sorting sequence;
[0088] Step S413, selecting the features with higher rankings in the feature sorting sequence as target features.
[0089] In this embodiment, it should be noted that the first feature importance index value is used to measure the feature importance level of the first party's features, the second feature importance index value is used to measure the feature importance level of the second party's features, and the first feature importance index value and the second feature importance index value can be iv values or WOE values, etc. Among them, the higher the feature importance, the more it proves that the feature should be retained.
[0090] As an example, steps S411 to S413 include: obtaining the first feature importance index values of each of the first participant features and the second feature importance index values of each of the second participant features; according to each of the first feature importance index values and each of the second feature importance index values, sorting each of the first participant features and each of the second participant features from high to low according to the feature importance index values to obtain a feature sorting sequence; and selecting the feature ranked first in the feature sorting sequence as the target feature. In this way, when performing feature selection, the feature importance of the feature to be screened is lower than that of the target feature. Therefore, when the correlation between the target feature and the feature to be screened is significant, the bit value corresponding to the feature to be screened in the feature counter will be affected. Thus, the feature finally discarded during feature selection is the feature to be screened, rather than the target feature. Therefore, the purpose of preferentially retaining features with higher feature importance during feature selection can be achieved.
[0091] Wherein, the first correlation information includes at least one first correlation representation value, and obtaining the first correlation information includes:
[0092] Step S11, obtaining the first correlation coefficients between every two of the first participant features and the second correlation coefficients between every two of the first participant features and the second participant features;
[0093] Step S12, generating the first correlation representation values between every two of the first participant features according to the first correlation coefficients and a preset correlation coefficient threshold;
[0094] Step S13, generating the first correlation representation values between every two of the first participant features and the second participant features according to the second correlation coefficients and a preset correlation coefficient threshold.
[0095] As an example, steps S11 to S13 include: obtaining first correlation coefficients between every two of the first participant features and second correlation coefficients between every two of the first participant features and the second participant features; if the first correlation coefficient is greater than a preset correlation coefficient threshold, taking a preset first representation value as the first correlation representation value between the two first participant features corresponding to the first correlation coefficient, and if the first correlation coefficient is not greater than the preset correlation coefficient threshold, taking a preset second representation value as the first correlation representation value between the two first participant features corresponding to the first correlation coefficient; if the second correlation coefficient is greater than the preset correlation coefficient threshold, taking the preset first representation value as the first correlation representation value between the first participant feature and the second participant feature corresponding to the first correlation coefficient, and if the second correlation coefficient is not greater than the preset correlation coefficient threshold, taking the preset second representation value as the first correlation representation value between the first participant feature and the second participant feature corresponding to the first correlation coefficient.
[0096] An embodiment of the present application provides a feature selection method, which is applied to a first participant in vertical federated learning. Specifically, first correlation information is obtained, where the first correlation information is used to characterize the correlation between each pair of first participant features and the correlation between each first participant feature and each second participant feature; receive the homomorphically encrypted second correlation information sent by the second participant, where the second correlation information is used to characterize the correlation between each pair of second participant features; generate a feature counter jointly corresponding to each first participant feature and each second participant feature; selectively update the feature counter according to the first correlation information and the homomorphically encrypted second correlation information to generate a homomorphically encrypted feature selection result counter; send the homomorphically encrypted feature selection result counter to the second participant for the second participant to decrypt the homomorphically encrypted feature selection result counter into a feature selection result counter, where the feature selection result counter is used to record whether to select each first participant feature and each second participant feature; perform feature selection among each first participant feature and each second participant feature according to the feature selection result counter fed back by the second participant. In this way, in the feature selection process implemented in the vertical federated learning scenario of the embodiment of the present application, the correlation data interacted between the first participant and the second participant is the homomorphically encrypted second correlation information. Therefore, the first participant cannot obtain the feature correlation between each second participant feature, which protects the data privacy of the second participant. In addition, the plaintext data that the second participant can obtain is only the feature selection result counter, which is used to record whether to select each first participant feature and each second participant feature and does not directly expose the feature correlation between each first participant feature. Therefore, it also protects the data privacy of the first participant. Therefore, it overcomes the technical defect that if feature selection is directly performed in the vertical federated learning scenario based on the correlation coefficient, it is easy to mutually expose the correlation between the respective features of different participants, resulting in the leakage of data privacy, and solves the problem of being unable to protect data privacy when performing feature selection in the vertical federated learning scenario.
[0097] Embodiment 2
[0098] Further, referring to Figure 3 , based on the above embodiment, in another embodiment of the feature selection method of the present application, the updating of the bit value corresponding to the feature to be screened in the feature counter according to the homomorphically encrypted second correlation information includes:
[0099] Step D10, query the homomorphically encrypted second correlation representation value jointly corresponding to the target feature and the feature to be screened in the homomorphically encrypted second correlation information;
[0100] Step D20: Update the bit value corresponding to the feature to be filtered in the feature counter according to the bit value corresponding to the target feature in the feature counter and the second correlation characterization value of the homomorphic encryption, where the bit value is used to indicate whether to select the corresponding feature.
[0101] As an example, steps D10 to D20 include: querying the second correlation characterization value of the homomorphic encryption jointly corresponding to the target feature and the feature to be filtered in the second correlation information of the homomorphic encryption; performing a bit operation on the bit value corresponding to the feature to be filtered in the feature counter according to the bit value corresponding to the target feature in the feature counter, and mixing the second correlation characterization value of the homomorphic encryption during the bit operation to update the bit value corresponding to the feature to be filtered in the feature counter, where the bit value is used to indicate whether to select the corresponding feature.
[0102] Among them, the step of updating the bit value corresponding to the feature to be filtered in the feature counter according to the bit value corresponding to the target feature in the feature counter and the second correlation characterization value of the homomorphic encryption includes:
[0103] Step D21: Generate a first update parameter according to the bit value corresponding to the target feature in the feature counter;
[0104] Step D22: Mix the second correlation characterization value of the homomorphic encryption in the first update parameter to obtain a first homomorphic encryption update parameter;
[0105] Step D23: Generate a second update parameter according to the bit value corresponding to the target feature in the feature counter and the bit value corresponding to the feature to be filtered in the feature counter;
[0106] Step D24: Mix the second correlation characterization value of the homomorphic encryption in the second update parameter to obtain a second homomorphic encryption update parameter;
[0107] Step D25: Update the bit value corresponding to the feature to be filtered in the feature counter according to the first homomorphic encryption update parameter and the second homomorphic encryption update parameter.
[0108] As an example, steps D21 to D25 include: generating a first update parameter according to the bit value corresponding to the target feature in the feature counter, calculating the product of the first update parameter and the second correlation characterization value of the homomorphic encryption to obtain a first homomorphic encryption update parameter; generating a second update parameter according to the bit value corresponding to the target feature in the feature counter and the bit value corresponding to the feature to be screened in the feature counter; calculating the product of the second update parameter and the second correlation characterization value of the homomorphic encryption to obtain a second homomorphic encryption update parameter; and updating the bit value corresponding to the feature to be screened in the feature counter by adding the first update parameter and the second update parameter to the bit value corresponding to the feature to be screened in the feature counter.
[0109] As an example, according to the bit value corresponding to the target feature in the feature counter, bit operations are performed on the bit value corresponding to the feature to be screened in the feature counter, and the specific calculation process of mixing the second correlation characterization value of the homomorphic encryption during the bit operation is as follows:
[0110] counter[y] = counter[y] + EM[x, z] * ((1 + counter[x]) - 2 * counter[x])
[0111] - (counter[y] * EM[x, z] * ((1 + counter[x]) - 2 * counter[x]))
[0112] where counter[z] is the bit value corresponding to the feature to be screened in the feature counter, counter[x] is the bit value corresponding to the target feature in the feature counter, EM[x, z] is the second correlation characterization value of the homomorphic encryption, ((1 + counter[x]) - 2 * counter[x]) is the first update parameter, and counter[z] * ((1 + counter[x]) - 2 * counter[x]) is the second update parameter.
[0113] The embodiments of the present application provide a method for updating the bit value in a feature counter, that is, querying the homomorphically encrypted second correlation representation value jointly corresponding to the target feature and the feature to be screened in the second correlation information of the homomorphic encryption; generating a first update parameter according to the bit value corresponding to the target feature in the feature counter; mixing the homomorphically encrypted second correlation representation value in the first update parameter to obtain a first homomorphically encrypted update parameter; generating a second update parameter according to the bit value corresponding to the target feature in the feature counter and the bit value corresponding to the feature to be screened in the feature counter; mixing the homomorphically encrypted second correlation representation value in the second update parameter to obtain a second homomorphically encrypted update parameter; and updating the bit value corresponding to the feature to be screened in the feature counter according to the first homomorphically encrypted update parameter and the second homomorphically encrypted update parameter. In this way, based on the computational characteristics of homomorphic encryption in the embodiments of the present application, the process of writing the homomorphically encrypted second correlation representation value into the update of the bit value in the feature counter is realized. In this way, the first party can update the bit value corresponding to the feature to be screened in the feature counter without directly obtaining the second correlation representation value as plaintext, and the updated bit value corresponding to the feature to be screened is also in a homomorphically encrypted state. At this time, after sending the updated bit value corresponding to the homomorphically encrypted feature to be screened to the second party for decryption, the first party can know the updated bit value corresponding to the feature to be screened as plaintext. Based on the updated bit value corresponding to the feature to be screened, the first party can select whether to retain the corresponding feature. In the above process, the second correlation representation value is in a ciphertext state throughout, so the correlation between the local features of the second party will not be leaked to the first party, ensuring the data privacy of the second party. And the homomorphically encrypted feature selection result counter sent by the first party to the second party only records the result of feature selection, that is, which features to retain and which features to discard. The second party cannot obtain the correlation between the local features of the first party, ensuring the data privacy of the first party. Therefore, the purpose of protecting data privacy when performing feature selection in the vertical federated learning scenario is achieved.
[0114] Embodiment III
[0115] The embodiments of the present application further provide a feature selection method, which is applied to the second party in vertical federated learning. In the first embodiment of the feature selection method of the present application, refer to Figure 4 , the feature selection method includes:
[0116] Step E10, obtaining second correlation information, performing homomorphic encryption on the second correlation information to obtain homomorphically encrypted second correlation information;
[0117] Step E20: Send the homomorphically encrypted second correlation information to the first party, so that the first party selectively updates the feature counter according to the local first correlation information and the homomorphically encrypted second correlation information, and generates a homomorphically encrypted feature selection result counter, where the feature selection result counter is used to record whether each of the first party features and each of the second party features is selected;
[0118] Step E30: Receive the homomorphically encrypted feature selection result counter sent by the first party, and decrypt the homomorphically encrypted feature selection result counter into a feature selection result counter;
[0119] Step E40: Feed back the feature selection result counter to the first party, so that the first party performs feature selection among each of the first party features and each of the second party features according to the feature selection result counter fed back by the second party.
[0120] In this embodiment, it should be noted that both the first party and the second party are parties participating in vertical federated learning, and the first party can be communicatively connected to the second party. As an example, refer to Figure 4 , Figure 4 which is the interaction schematic diagram between the first party and the second party in the embodiment of the present application.
[0121] As an example, steps E10 to E40 include: obtaining the correlation coefficients between pairs of second participant features; generating second correlation information according to the correlation coefficients, where the second correlation information is used to characterize whether the correlation between pairs of second participant features is significant; performing homomorphic encryption on the second correlation information to obtain homomorphic encrypted second correlation information; sending the homomorphic encrypted second correlation information to the first participant for the first participant to selectively update the feature counter according to the local first correlation information and the homomorphic encrypted second correlation information, and generate a homomorphic encrypted feature selection result counter, where the feature selection result counter is used to record whether each of the first participant features and each of the second participant features is selected; receiving the homomorphic encrypted feature selection result counter sent by the first participant, and decrypting the homomorphic encrypted feature selection result counter into a feature selection result counter; feeding back the feature selection result counter to the first participant for the first participant to perform feature selection among each of the first participant features and each of the second participant features according to the feature selection result counter fed back by the second participant. Among them, the specific implementation process of the first participant selectively updating the feature counter according to the local first correlation information and the homomorphic encrypted second correlation information to generate a homomorphic encrypted feature selection result counter, where the feature selection result counter is used to record whether each of the first participant features and each of the second participant features is selected can refer to the implementation content in the above steps S10 to S60 and their refinement steps, and will not be elaborated here; the specific implementation process of the first participant performing feature selection among each of the first participant features and each of the second participant features according to the feature selection result counter fed back by the second participant can refer to the implementation content in the above steps S10 to S60 and their refinement steps, and will not be elaborated here.
[0122] Among them, the second correlation information includes at least one second correlation characterization value, and obtaining the second correlation information includes:
[0123] Step E11, obtaining the correlation coefficients between pairs of second participant features;
[0124] Step E12, generating second correlation characterization values between pairs of the second participant features according to the correlation coefficients and a preset correlation coefficient threshold.
[0125] As an example, steps E11 to E12 include: obtaining the correlation coefficients between every two of the second participant features; if the correlation coefficient is greater than a preset correlation coefficient threshold, using the preset first representation value as the second correlation representation value between the two second participant features corresponding to the correlation coefficient; if the correlation coefficient is not greater than the preset correlation coefficient threshold, using the preset second representation value as the second correlation representation value between the two second participant features corresponding to the correlation coefficient.
[0126] An embodiment of the present application provides a feature selection method, which is applied to a second participant in vertical federated learning. Specifically, it obtains second correlation information, performs homomorphic encryption on the second correlation information to obtain homomorphically encrypted second correlation information; sends the homomorphically encrypted second correlation information to a first participant for the first participant to selectively update a feature counter according to local first correlation information and the homomorphically encrypted second correlation information, and generate a homomorphically encrypted feature selection result counter, where the feature selection result counter is used to record whether to select each of the first participant features and each of the second participant features; receives the homomorphically encrypted feature selection result counter sent by the first participant, and decrypts the homomorphically encrypted feature selection result counter into a feature selection result counter; feeds back the feature selection result counter to the first participant for the first participant to perform feature selection among each of the first participant features and each of the second participant features according to the feature selection result counter fed back by the second participant. In this way, in the feature selection process implemented in the vertical federated learning scenario of the present application, the correlation data exchanged between the first participant and the second participant is the homomorphically encrypted second correlation information. Therefore, the first participant cannot know the feature correlations between the second participant features, which protects the data privacy of the second participant. In addition, the plaintext data that the second participant can obtain is only the feature selection result counter, which is used to record whether to select each of the first participant features and each of the second participant features, and does not directly expose the feature correlations between the first participant features. Therefore, it also protects the data privacy of the first participant. So it overcomes the technical defect that if feature selection is directly performed in the vertical federated learning scenario based on the correlation coefficient, it is easy to expose the correlations between the respective features of different participants to each other, resulting in data privacy leakage, and solves the problem of inability to protect data privacy when performing feature selection in the vertical federated learning scenario.
[0127] Embodiment Five
[0128] An embodiment of the present application further provides a feature selection device, which is applied to a first participant in vertical federated learning. The feature selection device includes:
[0129] An acquisition module, configured to acquire first correlation information, where the first correlation information is used to characterize the correlation between pairwise first participating party features and the correlation between pairwise first participating party features and second participating party features;
[0130] A receiving module, configured to receive homomorphically encrypted second correlation information sent by a second participating party, where the second correlation information is used to characterize the correlation between pairwise second participating party features;
[0131] A generation module, configured to generate a feature counter jointly corresponding to each of the first participating party features and each of the second participating party features;
[0132] A selective update module, configured to selectively update the feature counter according to the first correlation information and the homomorphically encrypted second correlation information to generate a homomorphically encrypted feature selection result counter;
[0133] A sending module, configured to send the homomorphically encrypted feature selection result counter to the second participating party for the second participating party to decrypt the homomorphically encrypted feature selection result counter into a feature selection result counter, where the feature selection result counter is used to record whether to select each of the first participating party features and each of the second participating party features;
[0134] A feature selection module, configured to perform feature selection among each of the first participating party features and each of the second participating party features according to the feature selection result counter fed back by the second participating party.
[0135] Optionally, the selective update module is further configured to:
[0136] Extract target features from each of the first participating party features and each of the second participating party features, and use the remaining first participating party features and second participating party features as features to be screened;
[0137] If neither the target feature nor the feature to be screened is a second participating party feature, selectively update the bit value corresponding to the feature to be screened in the feature counter according to the first correlation information;
[0138] If both the target feature and the corresponding feature to be screened are second participating party features, update the bit value corresponding to the feature to be screened in the feature counter according to the homomorphically encrypted second correlation information;
[0139] Return to execute the steps: Extract target features from each of the first participating party features and each of the second participating party features until no target features can be extracted anymore, and generate a homomorphically encrypted feature selection result counter according to the updated feature counter.
[0140] Optionally, the selective update module is further configured to:
[0141] Query the second correlation representation value of the homomorphic encryption jointly corresponding to the target feature and the feature to be screened in the second correlation information of the homomorphic encryption;
[0142] Update the bit value corresponding to the feature to be screened in the feature counter according to the bit value corresponding to the target feature in the feature counter and the second correlation representation value of the homomorphic encryption, where the bit value is used to indicate whether to select the corresponding feature.
[0143] Optionally, the selective update module is further configured to:
[0144] Generate a first update parameter according to the bit value corresponding to the target feature in the feature counter;
[0145] Mix the second correlation representation value of the homomorphic encryption in the first update parameter to obtain a first homomorphic encryption update parameter;
[0146] Generate a second update parameter according to the bit value corresponding to the target feature in the feature counter and the bit value corresponding to the feature to be screened in the feature counter;
[0147] Mix the second correlation representation value of the homomorphic encryption in the second update parameter to obtain a second homomorphic encryption update parameter;
[0148] Update the bit value corresponding to the feature to be screened in the feature counter according to the first homomorphic encryption update parameter and the second homomorphic encryption update parameter.
[0149] Optionally, the selective update module is further configured to:
[0150] Query the first correlation representation value jointly corresponding to the target feature and the feature to be screened in the first correlation information;
[0151] If the first correlation representation value is a preset first representation value, update the bit value corresponding to the feature to be screened in the feature counter according to the bit value corresponding to the target feature in the feature counter, where the bit value is used to indicate whether to select the corresponding feature;
[0152] If the first correlation representation value is a preset second representation value, do not update the bit value corresponding to the feature to be screened in the feature counter.
[0153] Optionally, the selective update module is further configured to:
[0154] Encrypt the updated feature counter into a homomorphically encrypted feature selection result counter; and / or
[0155] Obtain the encrypted bit value corresponding to the second correlation information in the homomorphically encrypted updated feature counter, and combine the encrypted bit values into a homomorphically encrypted feature selection result counter; and / or
[0156] Mix corresponding random numbers on each bit value of the updated feature counter to obtain a feature counter after mixing random numbers, and encrypt the feature counter after mixing random numbers into a homomorphically encrypted feature selection result counter.
[0157] Optionally, the selective update module is further configured to:
[0158] Obtain the first feature importance index value of each first party feature and the second feature importance index value of each second party feature;
[0159] Sort each first party feature and each second party feature according to each first feature importance index value and each second feature importance index value to obtain a feature sorting sequence;
[0160] Select the features with higher rankings in the feature sorting sequence as target features.
[0161] Optionally, the first correlation information includes at least one first correlation representation value, and the acquisition module is further configured to:
[0162] Obtain the first correlation coefficient between every two first party features and the second correlation coefficient between every two first party features and every two second party features;
[0163] Generate the first correlation representation value between every two first party features according to the first correlation coefficient and a preset correlation coefficient threshold;
[0164] Generate the first correlation representation value between every two first party features and every two second party features according to the second correlation coefficient and a preset correlation coefficient threshold.
[0165] The feature selection device provided in this application adopts the feature selection method in the above embodiment, and solves the technical problem of being unable to protect data privacy when performing feature selection in the vertical federated learning scenario. Compared with the prior art, the beneficial effects of the feature selection device provided in the embodiments of this application are the same as those of the feature selection method provided in the above embodiment, and other technical features in the feature selection device are the same as those disclosed in the method of the above embodiment, and will not be elaborated here.
[0166] Example 6
[0167] The embodiment of the present application further provides a feature selection device, which is applied to the second participant in vertical federated learning. The feature selection device includes:
[0168] A homomorphic encryption module, configured to obtain second correlation information, perform homomorphic encryption on the second correlation information, and obtain homomorphically encrypted second correlation information;
[0169] A sending module, configured to send the homomorphically encrypted second correlation information to the first participant, so that the first participant selectively updates a feature counter according to local first correlation information and the homomorphically encrypted second correlation information, and generates a homomorphically encrypted feature selection result counter, where the feature selection result counter is used to record whether each of the first participant features and each of the second participant features is selected;
[0170] A decryption module, configured to receive the homomorphically encrypted feature selection result counter sent by the first participant, and decrypt the homomorphically encrypted feature selection result counter into a feature selection result counter;
[0171] A feedback module, configured to feedback the feature selection result counter to the first participant, so that the first participant performs feature selection among each of the first participant features and each of the second participant features according to the feature selection result counter fed back by the second participant.
[0172] Optionally, the second correlation information includes at least one second correlation characterization value, and the homomorphic encryption module is further configured to:
[0173] Obtain the correlation coefficients between every two of the second participant features;
[0174] Generate second correlation characterization values between every two of the second participant features according to the correlation coefficients and a preset correlation coefficient threshold.
[0175] The feature selection device provided by the present application adopts the feature selection method in the above embodiment, and solves the technical problem of being unable to protect data privacy when performing feature selection in the vertical federated learning scenario. Compared with the prior art, the beneficial effects of the feature selection device provided by the embodiment of the present application are the same as those of the feature selection method provided by the above embodiment, and other technical features in the feature selection device are the same as those disclosed in the method of the above embodiment, and will not be elaborated here.
[0176] Example 7
[0177] An embodiment of the present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the feature selection method in the above embodiment.
[0178] Reference is made below to Figure 5 , which shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.
[0179] As Figure 5 shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, the ROM, and the RAM are trained with each other through a bus. An input / output (I / O) interface is also connected to the bus.
[0180] Generally, the following systems may be connected to the I / O interface: input devices including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices including, for example, magnetic tapes, hard disks, etc.; and communication devices. The communication device may allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or provided alternatively.
[0181] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-described functions defined in the methods of the embodiments of the present disclosure are performed.
[0182] The electronic device provided in this application adopts the feature selection method in the above embodiment, and solves the technical problem of being unable to protect data privacy when performing feature selection in the vertical federated learning scenario. Compared with the prior art, the beneficial effects of the electronic device provided in the embodiments of this application are the same as those of the feature selection method provided in the above embodiment, and other technical features in this electronic device are the same as those disclosed in the above embodiment method, which will not be elaborated here.
[0183] It should be understood that each part of the present disclosure can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0184] As described above, the above are only specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0185] Embodiment VIII
[0186] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon for performing the feature selection method in the above embodiment.
[0187] The computer-readable storage medium provided by the embodiments of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0188] The above computer-readable storage medium may be included in an electronic device; or may exist separately without being assembled into the electronic device.
[0189] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device is caused to: obtain first correlation information, where the first correlation information is used to characterize the correlation between each pair of first participant features and the correlation between each first participant feature and each second participant feature; receive homomorphically encrypted second correlation information sent by a second participant, where the second correlation information is used to characterize the correlation between each pair of second participant features; generate a feature counter jointly corresponding to each first participant feature and each second participant feature; selectively update the feature counter according to the first correlation information and the homomorphically encrypted second correlation information to generate a homomorphically encrypted feature selection result counter; send the homomorphically encrypted feature selection result counter to the second participant for the second participant to decrypt the homomorphically encrypted feature selection result counter into a feature selection result counter, where the feature selection result counter is used to record whether to select each first participant feature and each second participant feature; perform feature selection among each first participant feature and each second participant feature according to the feature selection result counter fed back by the second participant.
[0190] Alternatively, obtain the second correlation information, perform homomorphic encryption on the second correlation information to obtain the homomorphically encrypted second correlation information; send the homomorphically encrypted second correlation information to the first participant, so that the first participant selectively updates the feature counter according to the local first correlation information and the homomorphically encrypted second correlation information, and generates a homomorphically encrypted feature selection result counter, where the feature selection result counter is used to record whether each of the first participant features and each of the second participant features is selected; receive the homomorphically encrypted feature selection result counter sent by the first participant, and decrypt the homomorphically encrypted feature selection result counter into a feature selection result counter; feedback the feature selection result counter to the first participant, so that the first participant performs feature selection among each of the first participant features and each of the second participant features according to the feature selection result counter fed back by the second participant.
[0191] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The foregoing programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0192] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0193] The modules involved in the embodiments described in this disclosure can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation on the unit itself in some cases.
[0194] The computer-readable storage medium provided in this application stores computer-readable program instructions for executing the above feature selection method, and solves the technical problem of being unable to protect data privacy when performing feature selection in the vertical federated learning scenario. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the embodiments of this application are the same as those of the feature selection method provided in the above embodiments, and will not be elaborated here.
[0195] Embodiment Nine
[0196] This application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the steps of the feature selection method as described above.
[0197] The computer program product provided in this application solves the technical problem of being unable to protect data privacy when performing feature selection in the vertical federated learning scenario. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as those of the feature selection method provided in the above embodiments, and will not be elaborated here.
[0198] The above are only the preferred embodiments of this application, and do not limit the patent scope of this application accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of this application, or directly or indirectly applied in other related technical fields, shall be included in the patent scope of this application by the same token.
Claims
1. A feature selection method, characterized in that, The first participant applied to vertical federated learning, and the feature selection method includes: Obtain first correlation information, where the first correlation information is used to characterize the correlation between each pair of first participant features and the correlation between each pair of first participant features and each second participant feature; Receive the second correlation information encrypted homomorphically sent by the second participant, where the second correlation information is used to characterize the correlation between each pair of second participant features; Generate a feature counter jointly corresponding to each of the first participant features and each of the second participant features; Selectively update the feature counter according to the first correlation information and the homomorphically encrypted second correlation information to generate a homomorphically encrypted feature selection result counter; Send the homomorphically encrypted feature selection result counter to the second participant for the second participant to decrypt the homomorphically encrypted feature selection result counter into a feature selection result counter, where the feature selection result counter is used to record whether to select each of the first participant features and each of the second participant features; Perform feature selection among each of the first participant features and each of the second participant features according to the feature selection result counter fed back by the second participant; The selectively updating the feature counter according to the first correlation information and the homomorphically encrypted second correlation information to generate a homomorphically encrypted feature selection result counter includes: Extract target features from each of the first participant features and each of the second participant features, and use the remaining first participant features and second participant features as features to be screened; If neither the target feature nor the feature to be screened is a second participant feature, selectively update the bit value corresponding to the feature to be screened in the feature counter according to the first correlation information; If both the target feature and the corresponding feature to be screened are second participant features, update the bit value corresponding to the feature to be screened in the feature counter according to the homomorphically encrypted second correlation information; Return to execute the steps: extract target features from each of the first participant features and each of the second participant features until no more target features can be extracted, and generate a homomorphically encrypted feature selection result counter according to the updated feature counter.
2. The feature selection method according to claim 1, wherein The updating the bit value corresponding to the feature to be screened in the feature counter according to the homomorphically encrypted second correlation information includes: Query the homomorphically encrypted second correlation representation value jointly corresponding to the target feature and the feature to be screened in the homomorphically encrypted second correlation information; Update the bit value corresponding to the feature to be screened in the feature counter according to the bit value corresponding to the target feature in the feature counter and the homomorphically encrypted second correlation representation value, where the bit value is used to indicate whether to select the corresponding feature.
3. The feature selection method according to claim 2, wherein The updating, in the feature counter, of the bit value corresponding to the feature to be screened according to the bit value corresponding to the target feature in the feature counter and the second correlation representation value of the homomorphically encrypted feature includes: Generate a first update parameter according to a bit value corresponding to the target feature in the feature counter; Mixing the homomorphically encrypted second correlation representation value with the first update parameter to obtain a first homomorphically encrypted update parameter; Generate a second update parameter according to the bit value corresponding to the target feature in the feature counter and the bit value corresponding to the feature to be screened in the feature counter; Mixing the homomorphically encrypted second correlation representation value with the second update parameter to obtain a second homomorphically encrypted update parameter; According to the first homomorphic encryption update parameter and the second homomorphic encryption update parameter, the bit value corresponding to the feature to be screened is updated in the feature counter.
4. The feature selection method according to claim 1, wherein The selectively updating the bit value corresponding to the feature to be screened in the feature counter according to the first correlation information includes: Querying the first correlation information for a first correlation representation value corresponding to the target feature and the feature to be screened; If the first correlation characterization value is a preset first characterization value, then according to the bit value corresponding to the target feature in the feature counter, the bit value corresponding to the feature to be screened is updated in the feature counter, wherein the bit value is used to indicate whether to select the corresponding feature; If the first correlation characterization value is the preset second characterization value, the bit value corresponding to the feature to be screened in the feature counter is not updated.
5. The feature selection method according to claim 1, wherein The step of generating a homomorphically encrypted feature selection result counter according to the updated feature counter includes: Encrypting the updated feature counter into a homomorphically encrypted feature selection result counter; and / or Obtaining the encrypted bit value corresponding to the homomorphically encrypted second correlation information in the updated feature counter, and combining the encrypted bit values into a homomorphically encrypted feature selection result counter; and / or A corresponding random number is mixed with each bit value of the updated feature counter to obtain a feature counter after the mixed random number, and the feature counter after the mixed random number is encrypted into a homomorphically encrypted feature selection result counter.
6. The feature selection method according to claim 1, wherein The extracting target features from the features of each of the first participants and the features of each of the second participants includes: Obtaining a first feature importance index value of each of the first participant's features and a second feature importance index value of each of the second participant's features; According to the importance index values of the first features and the importance index values of the second features, the first participant features and the second participant features are sorted to obtain a feature sorting sequence; A feature with a higher ranking in the feature ranking sequence is selected as a target feature.
7. The feature selection method according to claim 1, wherein The first correlation information includes at least one first correlation characterization value, and the obtaining of the first correlation information includes: Obtain the first correlation coefficients between every two of the first participating party features and the second correlation coefficients between every two of the first participating party features and the second participating party features; Generate the first correlation representation values between every two of the first participating party features according to the first correlation coefficients and a preset correlation coefficient threshold; Generate the first correlation representation values between every two of the first participating party features and the second participating party features according to the second correlation coefficients and a preset correlation coefficient threshold.
8. A feature selection method, characterized in that, Applied to the second participating party in vertical federated learning, the feature selection method includes: Obtain second correlation information, perform homomorphic encryption on the second correlation information to obtain homomorphic encrypted second correlation information; Send the homomorphic encrypted second correlation information to the first participating party for the first participating party to extract target features from the first participating party features and the second participating party features, and use the remaining first participating party features and second participating party features as features to be screened; if the target feature and the feature to be screened are not both second participating party features, selectively update the bit value corresponding to the feature to be screened in the feature counter according to the first correlation information; if the target feature and the corresponding feature to be screened are both second participating party features, update the bit value corresponding to the feature to be screened in the feature counter according to the homomorphic encrypted second correlation information; return to execute the step: extract target features from the first participating party features and the second participating party features until no more target features can be extracted, and generate a homomorphic encrypted feature selection result counter according to the updated feature counter, where the feature selection result counter is used to record whether to select the first participating party features and the second participating party features; Receive the homomorphic encrypted feature selection result counter sent by the first participating party and decrypt the homomorphic encrypted feature selection result counter into a feature selection result counter; Feed back the feature selection result counter to the first participating party for the first participating party to perform feature selection among the first participating party features and the second participating party features according to the feature selection result counter fed back by the second participating party.
9. The feature selection method according to claim 8, wherein The second correlation information includes at least one second correlation representation value, and obtaining the second correlation information includes: Obtain the correlation coefficients between every two of the second participating party features; Generate the second correlation representation values between every two of the second participating party features according to the correlation coefficients and a preset correlation coefficient threshold.
10. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the feature selection method according to any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that, A program for implementing the feature selection method is stored on the computer-readable storage medium, and the program for implementing the feature selection method is executed by a processor to implement the steps of the feature selection method according to any one of claims 1 to 9.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the feature selection method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Feature selection method and device, readable storage medium and computer program product
CN112861939A
Encrypted data statistical analysis method based on authenticated encryption counter
CN113849840A