A privacy-preserving feature engineering method and system based on secret sharing
Through the privacy protection feature engineering method based on secret sharing, feature engineering is carried out in a distributed environment, and the problems of data privacy leakage and single algorithm are solved, and efficient and secure feature engineering and linear regression are achieved.
Patent Information
- Application Number
- CN202411570482.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The prior art can easily lead to data privacy leakage when performing feature engineering in a distributed environment, and the algorithm is single, which cannot meet the computing needs of privacy protection feature engineering.
Using a privacy protection feature engineering method based on secret sharing, data features and tags are distributed in the secret distribution stage of the data set through addition arithmetic secret sharing, and then secure two-party distributed operations are carried out in a dense environment, including feature standardization, selection and linear regression. , and finally restore the secret in the calculation result recovery stage to obtain the plaintext result.
It realizes feature engineering and linear regression of the entire process in a fully dense environment, ensuring data privacy and security, taking into account security and computing efficiency, and having higher scalability and a complete system.
Smart Images

Figure CN119094128B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of feature engineering, and in particular to a privacy protection feature engineering method and system based on secret sharing. Background Art
[0002] Secret sharing is a basic technical module used in secure multi-party computing, which mainly includes two stages: secret distribution and secret reconstruction. There are secret managers responsible for secret distribution and reconstruction and secret participants who save secret shares.
[0003] Privacy-preserving feature engineering refers to feature extraction, selection, and transformation while ensuring data privacy. Feature engineering is a key step in machine learning, which aims to extract features from raw data that can improve model performance.
[0004] In the application scenario of feature engineering, the original data set needs to be processed into model training data, and the data set needs to be distributed in a ciphertext format on multiple computing servers for computation. At this time, distributed privacy-preserving feature engineering is required to ensure the privacy of the input data and output results of the participants. Currently, vertical federated learning and semi-homomorphic encryption are mainly used in privacy-preserving feature engineering to implement a certain link in feature engineering:
[0005] (1) Vertical federated learning technology: Vertical federated learning is a specific type of federated learning that is suitable for scenarios where the participants have different characteristics but contain the same users. Vertical federated learning allows all parties to perform feature engineering and model training without directly sharing data, thereby protecting user privacy.
[0006] (2) Semi-homomorphic encryption technology: Semi-homomorphic encryption technology is an encryption method that allows a limited number of arithmetic operations to be performed on encrypted data, and can implement specific privacy-preserving feature engineering algorithms.
[0007] The above prior art has the following disadvantages:
[0008] (1) Vertical federated learning technology: Vertical federated learning is mainly aimed at scenarios with data sets with the same users and different characteristics, and does not support privacy-preserving operations on data sets of any form.
[0009] (2) Semi-homomorphic encryption method: Semi-homomorphic encryption method has a large amount of computation, because when the data is represented in ciphertext, the amount of data is larger than that in plaintext. When the calculation is performed directly on the ciphertext data, the amount of computation is very large. At the same time, since semi-homomorphic encryption only supports a limited number of arithmetic operations, it cannot meet the computational requirements of privacy-preserving feature engineering algorithms. Summary of the invention
[0010] The main purpose of the present invention is to propose a privacy-preserving feature engineering method and system based on secret sharing, aiming to solve the existing security problems that feature engineering in a distributed environment is prone to data privacy leakage and the technical problems of a single algorithm.
[0011] To achieve the above purpose, the privacy protection feature engineering method based on secret sharing proposed in the present invention comprises the following steps:
[0012] S100: In the secret distribution phase of the data set, n data providers The privacy data features and labels of each The secret shares of the data features and the data labels are obtained by distributing the secret shares to the first server S1 and the second server S2 through addition arithmetic secret sharing;
[0013] S200, in the two-party distributed computing stage, the first server S1 and the second server S2 respectively perform secure two-party distributed computing in a secret environment based on the obtained secret shares of the data features and the secret shares of the data tags, and the first server S1 and the second server S2 do not collude; in the two-party distributed computing process, the specific process is as follows:
[0014] S201. The server determines whether to perform data feature standardization according to the instruction. If feature standardization is performed, the server obtains the secret share of the standardized data feature by using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm, and then executes the next step. Otherwise, the server directly executes the next step.
[0015] S202, the server performs feature selection according to the instruction, obtains the score of each feature by using the privacy-preserving feature selection algorithm, compares the scores from large to small, selects the data features, and then executes the next step;
[0016] S203, taking the secret share as input to perform privacy-preserving linear regression;
[0017] S204, obtaining the secret share of the model parameters;
[0018] S300, the operation result recovery phase, i.e., recovering the secret, the first server S1 and the second server S2 respectively send the secret shares R1 and R of their respective model parameters to the data user, and then the data user recovers the secret locally to obtain the plaintext result R=R1+R2 of the model parameters.
[0019] in Represents data characteristics, Representing data characteristics The corresponding label, , for data provider C i For example, C iSelect random number , , then Send to S1, Sent to S2, where It is called data feature x i The secret share, Called label y i The secret share is expressed as s 1i and 2i To represent the secret shares of S1 and S2 respectively, so there is .
[0020] Optionally, in step S201, feature standardization is performed, and the secret share of the standardized feature is obtained by using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm for calculation, specifically: the server Each holds private data The secret share First, the server uses the privacy-preserving mean algorithm and the privacy-preserving standard deviation algorithm to calculate the mean and standard deviation of the data set based on their respective secret shares, and then calculates , you can get the secret share of the standardized features.
[0021] Optionally, secret addition for secret data can realize secure joint average calculation, support more than two parties, and can be calculated locally without multi-party interaction and communication, while secret addition and secret multiplication for secret data can realize secure joint variance calculation of two parties. The privacy-preserving standard deviation algorithm can be implemented on the basis of the privacy-preserving variance algorithm by secretly reconstructing the result obtained by the privacy-preserving variance algorithm and performing a secret square root operation on the reconstructed result.
[0022] Optionally, in step S202, feature selection is performed, and the score of each feature is obtained by using a privacy-preserving feature selection algorithm, and the features are compared and selected according to the scores from large to small, specifically: the server Each holds private data The secret share First, the secret share m of the average of each feature is calculated using the secret share, and then the feature in the dataset is calculated using the secure comparison protocol based on function secret sharing. The number P greater than m and the number q less than or equal to m, then calculate the label In Features Greater than m and features The proportion of less than or equal to m , using the formula Get the score of each feature, compare and select the features according to the score from large to small.
[0023] Optionally, in step S203, the specific process of privacy-preserving linear regression based on feature engineering is as follows: the server Each holds private data The secret share , and the initial parameters Shared as a secret to the server , then The process of linear regression is used to calculate the Gradient And update the parameters. In this process, the input of linear regression is the confidential result obtained by privacy protection feature engineering. , that is, the calculation is performed in the form of secret shares.
[0024] Optionally, the The size of is adjusted according to the training situation.
[0025] The privacy protection feature engineering system based on secret sharing includes a secret distribution module, a two-party distributed computing module and a result recovery module; the secret distribution module is used for the data provider to The privacy data features and labels of each The secret is shared and distributed to the first server S1 and the second server S2 through statistical operation, so as to obtain the secret share of the data feature and the secret share of the data label; the two-party distributed operation module is used for the first server S1 and the second server S2 to perform a secure two-party distributed operation in a secret environment based on the obtained secret share of the data feature and the secret share of the data label during the two-party distributed operation stage, and there is no collusion between the first server S1 and the second server S2; the result recovery module is used for the operation result recovery stage, i.e., recovering the secret, the first server S1 and the second server S2 respectively send the secret shares R1 and R2 of the model parameters obtained by calculating their respective secret shares to the data user, and then the data user recovers the secret locally to obtain the plaintext results of the model parameters.
[0026] An electronic device comprises: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can perform the privacy-preserving feature engineering method based on secret sharing.
[0027] A computer-readable storage medium stores a program, which, when executed by a processor, implements the privacy-preserving feature engineering method based on secret sharing.
[0028] The technical scheme of the present invention has the following beneficial effects: the technical scheme of the present invention is mainly based on arithmetic secret sharing and function secret sharing, and realizes different feature engineering algorithms and linear regression operations by designing multiple basic operators of secure two-party calculations. It has higher scalability than traditional schemes, and can realize feature engineering and linear regression of the whole process of data sets in a fully confidential environment, and can ensure the privacy security of data at any link; it takes into account both security and computational efficiency, and has stronger scalability and a complete system; based on the basic operators of secure two-party calculations, the security proof of the basic operators is used as a guarantee of system security; it does not involve complex key encryption and decryption operations, and uses a smaller secret share for calculations than traditional encryption operations, and can outsource the calculation amount to a semi-honest two-party server while ensuring the privacy security of data on the server; the implemented privacy protection feature engineering system has a simple and easy-to-use framework structure, and can more flexibly implement more privacy protection algorithms based on the basic security operators, and has good scalability. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0030] Figure 1 A system framework diagram of a privacy protection feature engineering method based on secret sharing according to an embodiment of the present invention;
[0031] Figure 2 A phase flow chart of a privacy protection feature engineering method based on secret sharing according to an embodiment of the present invention;
[0032] Figure 3 A flowchart of a two-party distributed computing phase of a privacy protection feature engineering method based on secret sharing according to an embodiment of the present invention;
[0033] Figure 4 A privacy protection feature engineering flow chart of a privacy protection feature engineering method based on secret sharing according to an embodiment of the present invention;
[0034] Figure 5 A schematic diagram of the structure of a privacy protection feature engineering system based on secret sharing according to an embodiment of the present invention;
[0035] Figure 6 FIG. 4 is a structural diagram of an electronic device according to an embodiment of the present invention.
[0036] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0039] In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0040] The present invention proposes a privacy protection feature engineering method and system based on secret sharing.
[0041] Arithmetic Secret Sharing:
[0042] Secret sharing is a basic technical module used in secure multi-party computing, which mainly includes two stages: secret distribution and secret reconstruction. There are secret managers responsible for secret distribution and reconstruction and secret participants who save secret shares. The present invention considers a secret manager and n secret participants (set as ). In the secret sharing scheme, it is defined on a ring, that is, the secret value is an element on the ring, and modular arithmetic addition and modular arithmetic multiplication operations are performed on the ring. Suppose the ring , secret value , whose length is bits. The secret distribution and reconstruction operations of the secret sharing scheme are:
[0043] (1) Secret distribution: Secret administrators are randomly selected , then Send to , Send to , Send to , and Send to ,in called The secret share of satisfaction ;
[0044] (2) Secret reconstruction: Share the secret Sent to the secret keeper, who calculates , reconstruct the secret x.
[0045] In particular, the present invention requires arithmetic operations such as addition and multiplication to be performed on the secret shares. Assume that secret values a and b have been distributed to ,at this time have For addition, Need to calculate The secret share ; For multiplication, Need to calculate The secret share .
[0046] (1) For addition operation, Compute locally , which can be verified .
[0047] (2) For multiplication operations, the commonly used method is to use multiplication triples for calculation. Suppose have The secret value has been obtained The secret share ,in is A random value uniformly distributed on .Then calculate , and broadcast it to other participants, who then secretly reconstruct Finally, have calculate . It can be verified .
[0048] Privacy-preserving average algorithm:
[0049] (1) Privacy-preserving multi-party joint average algorithm:
[0050] Input: Party Secret share held , Participants Secret share held , Participants Secret share held .
[0051] Output: Get the secret share of the secret state average result , Get the secret share of the secret state average result Get the secret share of the secret state average result ,satisfy .
[0052] Online stage: dense average operation:
[0053] Compute locally Compute locally , Compute locally .
[0054] Privacy Preserving Standard Deviation Algorithm:
[0055] The privacy-preserving standard deviation algorithm can be implemented on the basis of the privacy-preserving variance algorithm by secretly reconstructing the result obtained by the privacy-preserving variance algorithm and performing a secret square root operation on the reconstructed result.
[0056] (1) Privacy-preserving variance algorithm:
[0057] Input: Party Secret share held , Participants Secret share held ,satisfy .
[0058] Output: Get the secret share of the secret variance result , Get the secret share of the secret variance result ,satisfy .
[0059] Offline stage: Multiplication triplet generation:
[0060] In the offline phase, and Call the function to generate multiplication triples based on oblivious transfer or homomorphic encryption , generating multiplication triplets ,in .
[0061] get , get .
[0062] Online stage: dense variance operation:
[0063] First, the participants Call the secure two-party joint average algorithm to calculate the average , Participants Call the secure two-party joint average algorithm to calculate the average .
[0064] Then, Compute locally , Compute locally .
[0065] Secondly, Use dense multiplication to calculate , Use dense multiplication to calculate .
[0066] at last, Compute locally , Compute locally .
[0067] In the process of secret square root operation, the idea of Newton iteration method is used to realize the secret , after 6 iterations, we can calculate , and then use the dense state multiplication to calculate The secret addition and secret multiplication for secret data can realize the joint square root calculation of two parties.
[0068] Privacy-preserving feature selection algorithm:
[0069] Two-way joint feature selection algorithm :
[0070] Input a vector of all sample values of a feature , the classification type matrix of the sample ;
[0071] Output the GINI coefficient of this feature ;
[0072] . ; ;
[0073] The algorithm uses the average value of each feature as the classification standard and divides the data set into two categories: one category is that the value of the feature is greater than the average value, and the other category is the opposite. The number of these two categories is Then calculate the proportion of samples of each category i in the two categories , and finally calculate the feature GINI coefficient:
[0074] ;
[0075] Thus, the GINI coefficient of each feature is calculated , select features according to the size of the coefficient.
[0076] Privacy Preserving Linear Regression:
[0077] In terms of machine learning, this paper uses the security basic operator to implement single variable linear regression and multivariate linear regression. For single variable linear regression, assuming that the input sample is , a linear function needs to be fitted , define the loss function:
[0078] ;
[0079] The iterative formula is obtained using the gradient descent method:
[0080] ;
[0081] in ;
[0082] Based on the above formula, the simple linear regression algorithm in a secret sharing environment is implemented as follows:
[0083] Privacy-preserving linear regression algorithm in secret sharing environment:
[0084] Input sample feature x, true value y, participant , output parameter share ;
[0085] ;
[0086] Based on the secret sharing method, the present invention realizes privacy protection feature engineering by designing an outsourced computing framework from multiple users to two servers. The system architecture of the present invention is as follows: Figure 1 As shown, n data providers Hold private data separately ,in Indicates the data provider Data features, usually vectors, Represents a data label, usually a scalar. S1 The privacy-preserving feature engineering method based on secret sharing includes the following steps:
[0087] S100: In the secret distribution phase of the data set, n data providers The privacy data features and labels of each The secret shares of the data features and the data labels are obtained by distributing the secret shares to the first server S1 and the second server S2 through addition arithmetic secret sharing;
[0088] S200, in the two-party distributed computing stage, the first server S1 and the second server S2 respectively perform secure two-party distributed computing in a secret environment based on the obtained secret shares of the data features and the secret shares of the data tags, and the first server S1 and the second server S2 do not collude; in the two-party distributed computing process, the specific process is as follows:
[0089] S201. The server determines whether to perform data feature standardization according to the instruction. If feature standardization is performed, the server obtains the secret share of the standardized data feature by using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm, and then executes the next step. Otherwise, the server directly executes the next step.
[0090] S202, the server performs feature selection according to the instruction, obtains the score of each feature by using the privacy-preserving feature selection algorithm, compares the scores from large to small, selects the data features, and then executes the next step;
[0091] S203, taking the secret share as input to perform privacy-preserving linear regression;
[0092] S204, obtaining the secret share of the model parameters;
[0093] S300, calculation result recovery phase, i.e., recovery of secrets. The first server S1 and the second server S2 send their respective secret shares R1 and R2 of the model parameters to the data user, and then the data user recovers the secret locally to obtain the plaintext result R=R1+R2 of the model parameters;
[0094] in Represents data characteristics, Representing data characteristics The corresponding label, , for data provider C i For example, C i Select random number , then Send to S1, Sent to S2, where It is called data feature x i The secret share, Called label y i The secret share is expressed as s 1i and 2i To represent the secret shares of S1 and S2 respectively, so there is .
[0095] Specifically, in step S201, feature standardization is performed, and the secret share of the standardized feature is obtained by using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm to calculate: Each holds private data The secret share First, the server uses the privacy-preserving mean algorithm and the privacy-preserving standard deviation algorithm to calculate the mean and standard deviation of the data set based on their respective secret shares, and then calculates , you can get the secret share of the standardized features.
[0096] Specifically, secret addition for secret data can realize secure joint average calculation, support more than two participants, and can be calculated locally without the need for multi-party interaction and communication. Secret addition and secret multiplication for secret data can realize secure joint variance calculation of two parties. The privacy-preserving standard deviation algorithm can be implemented on the basis of the privacy-preserving variance algorithm by secretly reconstructing the result obtained by the privacy-preserving variance algorithm and performing a secret square root operation on the reconstructed result.
[0097] Specifically, in step S202, feature selection is performed. The score of each feature is obtained by using a privacy-preserving feature selection algorithm. The features are compared from large to small according to the scores and selected. Specifically, the server Each holds private data The secret share First, the secret share m of the average of each feature is calculated using the secret share, and then the feature in the dataset is calculated using the secure comparison protocol based on function secret sharing. The number p greater than m and the number q less than or equal to m, then calculate the label In Features Greater than m and features The proportion of less than or equal to m , using the formula Get the score of each feature, compare and select the features according to the score from large to small.
[0098] Specifically, in step S203, the specific process of privacy-preserving linear regression based on feature engineering is as follows: Each holds private data The secret share , and the initial parameters Shared as a secret to the server , then The process of linear regression is used to calculate the Gradient And update the parameters. In this process, the input of linear regression is the confidential result obtained by privacy protection feature engineering. , that is, the calculation is performed in the form of secret shares.
[0099] Specifically, the The size can be adjusted according to the training situation.
[0100] like Figure 5 As shown, in another embodiment of the present invention, a privacy protection feature engineering system 600 based on secret sharing is provided, including a secret distribution module 610, a two-party distributed computing module 620 and a result recovery module 630. The secret distribution module 610 is used for the data provider to The privacy data features and labels of each The secret is shared and distributed to the first server S1 and the second server S2 through statistical operation, so as to obtain the secret share of the data feature and the secret share of the data label; the two-party distributed operation module 620 is used for the first server S1 and the second server S2 to perform a secure two-party distributed operation in a secret environment based on the obtained secret share of the data feature and the secret share of the data label during the two-party distributed operation stage, and there is no collusion between the first server S1 and the second server S2; the result recovery module 630 is used for the operation result recovery stage, i.e., recovering the secret, the first server S1 and the second server S2 respectively send the secret shares R1 and R2 of the model parameters obtained by calculating their respective secret shares to the data user, and then the data user recovers the secret locally to obtain the plaintext results of the model parameters.
[0101] like Figure 6As shown, in another embodiment of the present invention, an electronic device for implementing a privacy protection feature engineering method based on secret sharing is provided, wherein the electronic device 700 includes a first processor 710, a first memory 720, and a computer program stored in the first memory 720 and executable on the first processor 710, wherein the first memory 720 includes at least one type of readable storage medium, including a mobile hard disk, an optical disk, etc. In some embodiments, the first memory 720 can be used as both an internal storage unit of the electronic device 700 and an external storage device of the electronic device 700, and can be used not only to store application software and various types of data installed in the electronic device 700, but also to temporarily store output or to-be-output data. In some embodiments, the first processor 710 can be composed of an integrated circuit, including a single packaged integrated circuit or multiple packaged integrated circuits with the same or different functions, including a combination of one or more central processing units CPU, microprocessors, digital processing chips, graphics processors, and various control chips. The first processor 710 is the control core of the electronic device 700. It connects the various components of the electronic device using various lines and interfaces, and executes various functions of the electronic device 700 and processes data by running or executing computer programs or modules stored in the first memory 720, such as the privacy protection feature engineering program 730 based on secret sharing, and calling the data stored in the first memory 720.
[0102] Specifically, Figure 6 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 6 The structure shown does not constitute a limitation on the electronic device 700 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0103] Specifically, the privacy protection feature engineering program 730 based on secret sharing stored in the first memory 720 of the electronic device 700 is a combination of multiple instructions. When running in the first processor 710, it can achieve: in the stage of secret distribution of data sets, the data provider The privacy data features and labels of each The secret shares of the data features and the secret shares of the data labels are distributed to the first server S1 and the second server S2 through additive arithmetic secret sharing, and the secret shares of the data features and the secret shares of the data labels are obtained; in the two-party distributed operation stage, the first server S1 and the second server S2 respectively perform secure two-party distributed operations in a secret environment based on the obtained secret shares of the data features and the secret shares of the data labels, and there is no collusion between the first server S1 and the second server S2. The secure two-party distributed operation includes: the server determines whether to perform data feature standardization according to the instruction, and if feature standardization is performed, the standardized data is obtained by calculating using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm. The next step is executed after the secret share of the data feature is obtained, otherwise the next step is executed directly; the server performs feature selection according to the instruction, obtains the score of each feature by using the privacy-preserving feature selection algorithm, compares the scores from large to small and selects the data features before executing the next step; the secret share is used as input for privacy-preserving linear regression; the secret share of the model parameters is obtained; in the operation result recovery stage, that is, recovering the secret, the first server S1 and the second server S2 respectively send the secret shares R1 and R2 of their respective model parameters to the data user, and then the data user recovers the secret locally to obtain the plaintext result R=R1+R2 of the model parameters.
[0104] Specific inventive principles in the embodiments of the present invention:
[0105] 1. Feature Engineering:
[0106] Feature engineering refers to processing raw data to extract features that are useful for the problem in order to facilitate the training of machine learning algorithms. In the field of machine learning, feature engineering is one of the key factors in model performance. Good feature engineering can improve the accuracy and robustness of the model.
[0107] 2. Feature engineering methods include:
[0108] 1) Feature selection: select features that are useful to the model, remove useless features, and avoid the curse of dimensionality.
[0109] 2) Feature extraction: Extract useful features from raw data, such as extracting words, word frequency and other features in text classification tasks.
[0110] 3) Feature construction: New features are constructed by calculating, combining, converting, and other operations on the original data to improve model performance. For example, in time series prediction tasks, features such as lag and moving average can be constructed.
[0111] 3. Feature engineering needs to be designed according to specific problems and requires in-depth understanding and analysis of data. Good feature engineering can improve the accuracy and robustness of the model, thereby increasing business value. At the same time, feature engineering is closely related to the model and is a very important part of machine learning. The purpose of feature engineering is to extract useful features from raw data to facilitate model learning and prediction. Good feature engineering can improve the accuracy and robustness of the model, thereby increasing business value.
[0112] 4. Feature engineering has the following impacts on the model:
[0113] 1) Model input features: Feature engineering determines the input features of the model and directly affects the performance of the model. Feature engineering can improve the distinguishability of features, reduce noise and redundancy, and thus improve the accuracy and robustness of the model.
[0114] 2) Model complexity: Feature engineering can reduce the complexity of the model and avoid overfitting. By selecting features that are useful to the model, removing useless features, and reducing dimensionality, the number of model parameters can be reduced and the generalization ability of the model can be improved.
[0115] 3) Model training speed: Feature engineering can reduce the model training time. The model training process can be accelerated by selecting low-dimensional features, scaling features, etc.
[0116] 5. Feature engineering is inseparable from models. Good feature engineering can optimize the input features of the model, reduce the complexity of the model, and accelerate the training process of the model, thereby improving the performance and efficiency of the model.
[0117] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A privacy-preserving feature engineering method based on secret sharing, characterized in that: The following steps are involved: S100, in the stage of secret distribution of data sets, Data providers The privacy data features and labels of each Distribute to the first server through addition arithmetic secret sharing and the second server , get the secret share of data features and the secret share of data labels; S200, in the two-party distributed computing stage, the first server and the second server Based on the secret share of the obtained data features and the secret share of the data label, secure two-party distributed computing is performed in a secret environment. The first server With the second server There is no collusion between the two parties; during the distributed computing process between the two parties, the specific process is as follows: S201. The server determines whether to perform data feature standardization according to the instruction. If feature standardization is performed, the server obtains the secret share of the standardized data feature by using the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm, and then executes the next step. Otherwise, the server directly executes the next step. S202, the server performs feature selection according to the instruction, obtains the score of each feature by using the privacy-preserving feature selection algorithm, compares the scores from large to small, selects the data features, and then executes the next step; S203, taking the secret share as input to perform privacy-preserving linear regression; S204, obtaining the secret share of the model parameters; S300, operation result recovery phase, i.e., recovery of secret, first server and the second server The secret shares of their respective model parameters are and Sent to the data user, who then recovers the secret locally to obtain the plaintext result of the model parameters ; in Represents data characteristics, Representing data characteristics The corresponding label, , for data providers For example, Select random number , , then Send to ,Will Send to ,in and Data Features The secret share, and Label The secret share is and To express respectively and The secret share in hand, therefore .
2. The privacy protection feature engineering method based on secret sharing according to claim 1 is characterized in that: In step S201, feature standardization is performed by using the privacy-preserving mean algorithm and the privacy-preserving standard deviation algorithm for calculation, specifically: the server Each holds private data The secret share First, the server uses the privacy-preserving average algorithm and the privacy-preserving standard deviation algorithm to calculate the average of the data set based on their respective secret shares. and standard deviation , then calculate , you can get the secret share of the standardized features.
3. The privacy protection feature engineering method based on secret sharing according to claim 2 is characterized in that: Secret addition for secret data can realize secure joint average calculation, support more than two participants, and can be calculated locally without multi-party interaction and communication. Secret addition and secret multiplication for secret data can realize secure joint variance calculation of two parties. The privacy-preserving standard deviation algorithm can be implemented on the basis of the privacy-preserving variance algorithm. The result obtained by the privacy-preserving variance algorithm is secretly reconstructed, and the reconstructed result is secretly squared. Each party holds a secret share of the private data, and the initial parameters are shared with the server as a secret. Then, in the process of the secondary loop iteration, the gradient and parameter are calculated according to the linear regression process and updated. In this process, the input of the linear regression is the secret result obtained by the privacy-preserving feature engineering, that is, it is calculated in the form of a secret share.
4. The system for the privacy protection feature engineering method based on secret sharing according to any one of claims 1 to 3, characterized in that: It includes a secret distribution module, a two-party distributed computing module and a result recovery module; the secret distribution module is used for the data provider to The privacy data features and labels of each Distribute to the first server through statistical operation secret sharing and the second server , obtain the secret share of the data feature and the secret share of the data label; the two-party distributed computing module is used to, in the two-party distributed computing stage, the first server and the second server Based on the secret share of the obtained data features and the secret share of the data label, a secure two-party distributed operation is performed in a secret environment. The first server With the second server There is no collusion between them; the result recovery module is used to recover the secret in the operation result recovery phase, that is, the first server and the second server The secret shares of the model parameters obtained by calculating their respective secret shares are and It is sent to the data user, and then the data user recovers the secret locally to obtain the plaintext result of the model parameters.
5. 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 computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the privacy-preserving feature engineering method based on secret sharing as described in any one of claims 1 to 3.
6. A computer-readable storage medium storing a program, characterized in that: When the program is executed by a processor, the privacy protection feature engineering method based on secret sharing described in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Federal learning privacy protection method based on homomorphic encryption and secret sharing
CN113037460A
Multi-user distributed privacy protection regression method and device based on secret sharing
CN115632761A