Data generation method and system for member privacy risk detection of credit investigation model
By estimating the predictive confidence of member data and non-member data in the credit reporting model, and combining sample feature space search and sampling technology to generate detection samples, the problem of the inability to effectively detect the privacy risks of the credit reporting model in the existing technology in actual scenarios is solved, and fast and efficient privacy risk detection is achieved.
Patent Information
- Application Number
- CN202411504808.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-27
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-10-27
AI Technical Summary
The existing credit reporting model member privacy risk detection methods are difficult to effectively detect in actual financial scenarios because detectors cannot obtain real member and non-member data.
By estimating the average predictive confidence of member data and non-member data on each credit reporting category of the credit reporting model, a data generation method combining sample feature space search and sampling is designed to generate detection samples that can replace real data.
It realizes the rapid and efficient generation of detection data for privacy risk detection of credit reporting models in actual scenarios, and supports accurate privacy risk assessment.
Smart Images

Figure CN119558955A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of privacy security technology in the application process of a credit investigation model. More specifically, the present invention relates to a data generation method and system for member privacy risk detection of a credit investigation model. Background Art
[0002] In the financial field, the credit reporting system is a key tool for assessing the credit risk of individuals or enterprises. Traditional credit reporting models rely on historical data and statistical analysis to help financial institutions make decisions in the process of issuing loans and granting credit. However, with the surge in data volume and the increase in data dimensions, traditional methods have gradually shown their limitations. The introduction of machine learning technology has brought new development opportunities to the credit reporting system. Machine learning models can process large amounts of complex multidimensional data and discover hidden patterns and associations to improve the accuracy and efficiency of credit assessment. For example, a model based on a classification algorithm can classify and predict the credit risk of a borrower based on his or her behavioral data, financial records, and other external information. Although machine learning technology provides significant advantages for the credit reporting system, it still faces many challenges in its application, especially in the detection of privacy risks in the credit reporting system. In this invention, we mainly focus on the problem of detecting the risk of privacy leakage of members of the credit reporting model, that is, the degree of risk of the credit reporting model leaking its training data sample information. It is worth noting that existing member privacy risk detection methods are usually carried out under relatively ideal conditions. They assume that risk detection personnel can obtain real credit model training data (i.e., member data) and non-training data (i.e., non-member data) as detection data, so as to evaluate the risk level of the model with the help of existing member privacy detection technology. However, in real financial credit scenarios, due to privacy and security considerations, detection personnel usually cannot obtain real member and non-member data related to the credit model. Therefore, member privacy risk detection of the credit model requires a detection data generation device to generate detection data that can replace real member and non-member data, thereby completing the model risk detection task in the actual scenario. Summary of the invention
[0003] An object of the present invention is to solve at least the above problems and to provide at least the advantages which will be described hereinafter.
[0004] In order to achieve these purposes and other advantages according to the present invention, a method for generating data for member privacy risk detection of a credit reporting model is provided, comprising the following steps:
[0005] S1. Estimate the average prediction confidence of member data in each credit category of the target credit model M to be tested And estimate the average prediction confidence of non-member data in each credit category of the target credit model to be tested Where n means that the target credit model M has n credit categories, i means the i-th credit category, represents the average prediction confidence of the member data of the i-th credit category of the target credit model M to be tested, It represents the average prediction confidence of non-member data on the i-th credit category of the target credit model M to be tested;
[0006] S2. A sample is randomly sampled from the sample space of the target credit model M to be tested, and for each feature dimension of the sample, a new feature value is randomly sampled from the feature value space of the feature dimension to replace the current feature value, thereby generating a seed sample, wherein the sample space includes member data and non-member data;
[0007] S3. Input the seed sample into the target credit model M to obtain the posterior probability prediction output and set the judgment threshold of the member data. Judgment threshold for non-member data in, represents the judgment threshold of member data in the i-th credit category, represents the judgment threshold of non-member data in the i-th credit category;
[0008] S4. The target label of the fixed credit category is c. When the target credit model M predicts the probability y of the seed sample in the target label c c Higher than the judgment threshold of member data and is greater than the predicted probability of any other credit category label, then the seed sample is saved as the generated member detection sample, where c is one of the labels of the n credit categories, Indicates the judgment threshold of member data on the credit category corresponding to the target label c;
[0009] When the target credit model M predicts the probability y of the seed sample in the target label c c Below the judgment threshold of non-member data And it is greater than the predicted probability of any other credit category label, then save the seed sample as the generated non-member detection sample, where, Indicates the judgment threshold of non-member data in the credit category corresponding to the target label c;
[0010] S5. Repeat steps S2 to S4 to generate member detection samples and non-member detection samples that meet the sample quantity.
[0011] Preferably, when the seed sample does not meet the condition of step S4, the following steps are continued:
[0012] S6.1. Setting parameter k max , kmin and k, where [k min , k max ] represent the value range of k, and k max Not greater than the characteristic dimension of the seed sample, the first k takes the maximum value k max , and then adjusted to 1 / 2 of the current value;
[0013] S6.2, randomly selecting k feature dimensions from the feature dimensions of the sample, and randomly sampling a new feature value from the feature value space of the k feature dimensions to replace the current feature value, to generate a sample, and repeat the judgment of step S4;
[0014] When the number of times the condition of step S4 is not met reaches the preset number of times, max When , execute step S6.3;
[0015] S6.3. Adjust the value of k by 1 / 2 of the current value, and repeat step S6.2 until the condition of step S4 is met or k completes all possible values.
[0016] Preferably, the step S1 of "respectively estimating the average prediction confidence of the member data in each credit category of the target credit model M to be tested" And estimate the average prediction confidence of non-member data on each credit category of the target credit model M to be tested The specific methods include:
[0017] When the member data and non-member data of several target credit models M to be tested can be obtained, then,
[0018] Input the member data of the labels belonging to each credit category into the target credit model M to be tested, and calculate the average prediction confidence of each credit category
[0019]
[0020] in, Represents the sub-dataset whose true label is i in the member data;
[0021] Input the non-member data of the labels belonging to each credit category into the target credit model M to be tested, and calculate the average prediction confidence of each credit category
[0022]
[0023] in, Represents the sub-dataset whose true label is i in the non-member data.
[0024] Preferably, the method further includes: when data samples of a plurality of target credit models M to be tested can be obtained, but whether the data samples are member data or non-member data is unknown, then,
[0025] The acquired data samples are randomly divided into two parts, one data sample is used as a training sample, and the other data sample is used as a test sample;
[0026] Use the training samples to train the target credit model M to obtain the "shadow" collection model M shadow ;
[0027] Input the training samples of labels belonging to each credit category into the “shadow” collection model M shadow , calculate the average prediction confidence of each credit category
[0028]
[0029] in, Represents the "shadow" collection model M shadow The sub-dataset with the true label i in the training samples;
[0030] Input the test samples with labels belonging to each credit category into the “shadow” collection model M shadow , calculate the average prediction confidence of each credit category
[0031]
[0032] in, Represents the "shadow" collection model M shadow The sub-dataset whose true label is i in the test sample of .
[0033] Preferably, the method further includes: when the number of member data and non-member data of the target credit model M to be tested is less than a certain number, then,
[0034] The average prediction confidence and the average prediction confidence Assignment, where
[0035] The present invention also provides a system for generating data based on the member privacy risk detection method of the credit reporting model, comprising:
[0036] The judgment threshold estimation module is used to estimate the average prediction confidence of member data in each credit category of the target credit model M to be tested. And estimate the average prediction confidence of non-member data in each credit category of the target credit model to be tested Set the judgment threshold of member data Judgment threshold for non-member data
[0037] Where n means that the target credit model M has n credit categories, i means the i-th credit category, represents the average prediction confidence of the member data of the i-th credit category of the target credit model M to be tested, represents the average prediction confidence of non-member data on the i-th credit category of the target credit model M to be tested, represents the judgment threshold of member data in the i-th credit category, represents the judgment threshold of non-member data in the i-th credit category;
[0038] A sample generation module is used to randomly sample a sample from the sample space of the target credit model M to be tested, and for each feature dimension of the sample, randomly sample a new feature value from the feature value space of the feature dimension to replace the current feature value, so as to generate a seed sample, wherein the sample space includes member data and non-member data;
[0039] The sample data judgment module is used to input the seed sample into the target credit model M to obtain the posterior probability prediction output;
[0040] And the target label for the fixed credit category is c. When the target credit model M predicts the probability y of the seed sample in the target label c c Higher than the judgment threshold of member data and is greater than the predicted probability of any other credit category label, then the seed sample is saved as the generated member detection sample, where c is one of the labels of the n credit categories, Indicates the judgment threshold of member data on the credit category corresponding to the target label c;
[0041] When the target credit model M predicts the probability y of the seed sample in the target label c c Below the judgment threshold of non-member data And it is greater than the predicted probability of any other credit category label, then save the seed sample as the generated non-member detection sample, where, Indicates the judgment threshold of non-member data in the credit category corresponding to the target label c;
[0042] Generate member detection samples and non-member detection samples that meet the sample quantity.
[0043] Preferably, the sample generation module is used to continue to perform the following steps when the seed sample does not meet the condition of step S4:
[0044] S6.1. Setting parameter k max , k min and k, where [k min , k max ] represent the value range of k, and k max Not greater than the characteristic dimension of the seed sample, the first k takes the maximum value k max , and then adjusted to 1 / 2 of the current value;
[0045] S6.2, randomly selecting k feature dimensions from the feature dimensions of the sample, and randomly sampling a new feature value from the feature value space of the k feature dimensions to replace the current feature value, to generate a sample, and repeat the judgment of step S4;
[0046] When the number of times the condition of step S4 is not met reaches the preset number of times, max When , execute step S6.3;
[0047] S6.3. Adjust the value of k by 1 / 2 of the current value, and repeat step S6.2 until the condition of step S4 is met or k completes all possible values.
[0048] An electronic device is provided, comprising:
[0049] one or more processors;
[0050] 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 to enable the at least one processor to perform the described method.
[0051] A computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described above is implemented.
[0052] The present invention includes at least the following beneficial effects: The present invention constructs a method for generating privacy risk detection data for a credit model. First, by analyzing the differences in the output behaviors of the credit model for member data samples and non-member data samples, a threshold judgment method based on prediction confidence is proposed. Then, by designing a data generation technology that combines a sample feature space search method with a sampling method, the purpose of fast and efficient detection data generation is achieved. The present invention generates detection data for privacy risk detection of credit models through the above method, thereby supporting privacy risk detection tasks in actual scenarios and providing accurate privacy risk assessment of the credit model to be detected.
[0053] Other advantages, objectives and features of the present invention will be embodied in part through the following description, and in part will be understood by those skilled in the art through study and practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 The figure is a schematic diagram of the process framework of one of the technical solutions of the present invention. DETAILED DESCRIPTION
[0055] The present invention is further described in detail below in conjunction with the accompanying drawings so that those skilled in the art can implement the invention with reference to the description.
[0056] It should be noted that the experimental methods described in the following embodiments are conventional methods unless otherwise specified, and the reagents and materials are commercially available unless otherwise specified; in the description of the present invention, the orientation or positional relationship indicated by the terms is based on the orientation or positional relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0057] like Figure 1 As shown, the present invention provides a data generation method for member privacy risk detection of a credit reporting model, comprising the following steps:
[0058] S1. Estimate the average prediction confidence of member data in each credit category of the target credit model M to be tested And estimate the average prediction confidence of non-member data in each credit category of the target credit model to be tested Where n means that the target credit model M has n credit categories, i means the i-th credit category, represents the average prediction confidence of the member data of the i-th credit category of the target credit model M to be tested, It represents the average prediction confidence of non-member data on the i-th credit category of the target credit model M to be tested. According to different detection scenarios that may exist in reality, we have designed different methods, which will be described in detail in the following technical solutions.
[0059] S2. A sample is randomly sampled from the sample space of the target credit model M to be tested, and for each feature dimension of the sample, a new feature value is randomly sampled from the feature value space of the feature dimension to replace the current feature value, so as to generate a seed sample, wherein the sample space includes member data and non-member data; this method can generate new samples quickly and efficiently.
[0060] S3. Input the seed sample into the target credit model M to obtain the posterior probability prediction output and set the judgment threshold of the member data. Judgment threshold for non-member data in, represents the judgment threshold of member data in the i-th credit category, represents the judgment threshold of non-member data in the i-th credit category;
[0061] S4. The target label of the fixed credit category is c. When the target credit model M predicts the probability y of the seed sample in the target label c c Higher than the judgment threshold of member data and is greater than the predicted probability of any other credit category label, then the seed sample is saved as the generated member detection sample, where c is one of the labels of the n credit categories, Indicates the judgment threshold of member data on the credit category corresponding to the target label c;
[0062] When the target credit model M predicts the probability y of the seed sample in the target label c c Below the judgment threshold of non-member data And it is greater than the predicted probability of any other credit category label, then save the seed sample as the generated non-member detection sample, where, It represents the judgment threshold of non-member data in the credit category corresponding to the target label c; combining steps S1, S3 and S4 can more accurately capture the performance differences of the credit model on two different types of data, thereby clarifying the generation standard of privacy risk detection data and ensuring the validity of the generated detection data.
[0063] S5. Repeat steps S2 to S4 to generate member detection samples and non-member detection samples that meet the sample quantity.
[0064] In the above technical solution, firstly, by analyzing the predicted output behavior of the credit model for member data and non-member data, the present invention can more accurately capture the performance differences of the credit model on two different types of data, thereby clarifying the generation standard of privacy risk detection data and ensuring the effectiveness of the generated detection data. Secondly, by using feature space search technology, the generation efficiency of detection data can be effectively improved. Finally, the generation method of the present invention is highly versatile and flexible, and is suitable for credit classification prediction models constructed by different machine learning algorithms.
[0065] In another technical solution, when the seed sample does not meet the condition of step S4, the following steps are continued:
[0066] S6.1. Setting parameter k max , k minand k, where [k min , k max ] represent the value range of k, and k max Not greater than the characteristic dimension of the seed sample, the first k takes the maximum value k max , and then adjusted to 1 / 2 of the current value;
[0067] S6.2, randomly selecting k feature dimensions from the feature dimensions of the sample, and randomly sampling a new feature value from the feature value space of the k feature dimensions to replace the current feature value, to generate a sample, and repeat the judgment of step S4;
[0068] When the number of times the condition of step S4 is not met reaches the preset number of times, max When , execute step S6.3;
[0069] S6.3. Adjust the value of k by 1 / 2 of the current value, and repeat step S6.2 until the condition of step S4 is met or k completes all possible values.
[0070] In the above technical solution, the value of k represents the maximum number of feature dimensions randomly selected and reassigned in each perturbation operation. Initially, the maximum value k is taken. max , which means that at the beginning, the maximum number of feature dimensions will be selected for perturbation, and the randomly selected k feature dimensions are the targets of reassignment. For the selected features, different operations are performed according to their types:
[0071] Binary features: If it is a binary feature (that is, the feature value can only be 0 or 1), a flip operation is used. That is, if the current feature value is 0, it is changed to 1; if the current feature value is 1, it is changed to 0.
[0072] Other types of features: For non-binary features, a new feature value is randomly sampled from the feature value space of the feature to replace the current feature value. The feature value space refers to the set of all possible values of the feature.
[0073] The purpose of this perturbation operation is to simulate the natural variation of the data by introducing randomness, thereby obtaining more diverse samples and more data that the model has not previously anticipated.
[0074] In another technical solution, the step S1 of "respectively estimating the average prediction confidence of the member data on each credit category of the target credit model M to be tested" And estimate the average prediction confidence of non-member data on each credit category of the target credit model M to be tested The specific methods include:
[0075] When the member data and non-member data of several target credit models M to be tested can be obtained, then,
[0076] Input the member data of the labels belonging to each credit category into the target credit model M to be tested, and calculate the average prediction confidence of each credit category
[0077]
[0078] in, Represents the sub-dataset whose true label is i in the member data;
[0079] Input the non-member data of the labels belonging to each credit category into the target credit model M to be tested, and calculate the average prediction confidence of each credit category
[0080]
[0081] in, Represents the sub-dataset whose true label is i in the non-member data.
[0082] In the above technical solution, a detection scenario is provided. In this detection scenario, we can obtain a lot of member data and non-member data of the target credit model M to be tested. Therefore, the average prediction confidence of the two types of data is obtained by direct generation and calculation methods, which is used to evaluate the generated sample data.
[0083] In another technical solution, the step S1 of "respectively estimating the average prediction confidence of the member data on each credit category of the target credit model M to be tested" And estimate the average prediction confidence of non-member data on each credit category of the target credit model M to be tested The specific methods include:
[0084] When several data samples of the target credit model M to be tested can be obtained, but whether the data samples are member data or non-member data is unknown, then,
[0085] The acquired data samples are randomly divided into two parts, one data sample is used as a training sample, and the other data sample is used as a test sample;
[0086] Use the training samples to train the target credit model M to obtain the "shadow" collection model M shadow ;
[0087] Input the training samples of labels belonging to each credit category into the “shadow” collection model M shadow , calculate the average prediction confidence of each credit category
[0088]
[0089] in, Represents the "shadow" collection model M shadow The sub-dataset with the true label i in the training samples;
[0090] Input the test samples with labels belonging to each credit category into the “shadow” collection model M shadow , calculate the average prediction confidence of each credit category
[0091]
[0092] in, Represents the "shadow" collection model M shadow The sub-dataset whose true label is i in the test sample of .
[0093] In the above technical solution, a detection scenario is provided. Although the detection scenario can also obtain sample data of the target credit model M to be tested, it is unable to distinguish whether it belongs to member data or non-member data. Therefore, a "shadow" collection model is trained based on the target credit model M to be tested by obtaining the sample data. The internal parameters and weights of the "shadow" collection model may be changed relative to those of the target credit model to be tested. Then, the average prediction confidence of the two types of data is generated and calculated based on the "shadow" collection model for the evaluation of the generated sample data.
[0094] In another technical solution, the step S1 of "respectively estimating the average prediction confidence of the member data on each credit category of the target credit model M to be tested" And estimate the average prediction confidence of non-member data on each credit category of the target credit model M The specific methods include:
[0095] When the number of member data and non-member data of the target credit model M to be tested is less than a certain number, then,
[0096] The average prediction confidence and the average prediction confidence Assignment, where
[0097] In the above technical solution, a detection scenario is provided, in which the member data and non-member data of the target credit model M to be tested are very little or even zero. Therefore, based on the principles and consensus of machine learning, the average prediction confidence of the two types of data is directly assigned for the evaluation of the generated sample data.
[0098] Based on the same inventive concept, the present invention also provides a system for generating data for member privacy risk detection based on the credit reporting model, comprising:
[0099] The judgment threshold estimation module is used to estimate the average prediction confidence of member data in each credit category of the target credit model M to be tested. And estimate the average prediction confidence of non-member data in each credit category of the target credit model to be tested Set the judgment threshold of member data Judgment threshold for non-member data
[0100] Where n means that the target credit model M has n credit categories, i means the i-th credit category, represents the average prediction confidence of the member data of the i-th credit category of the target credit model M to be tested, represents the average prediction confidence of non-member data on the i-th credit category of the target credit model M to be tested, represents the judgment threshold of member data in the i-th credit category, represents the judgment threshold of non-member data in the i-th credit category;
[0101] The sample generation module is used to randomly sample a sample from the sample space of the target credit model M to be tested, and for each feature dimension of the sample, randomly sample a new feature value from the feature value space of the feature dimension to replace the current feature value, so as to generate a seed sample, wherein the sample space includes member data and non-member data; new samples can be generated quickly and efficiently.
[0102] The sample data judgment module is used to input the seed sample into the target credit model M to obtain the posterior probability prediction output;
[0103] And the target label for the fixed credit category is c. When the target credit model M predicts the probability y of the seed sample in the target label c c Higher than the judgment threshold of member data and is greater than the predicted probability of any other credit category label, then the seed sample is saved as the generated member detection sample, where c is one of the labels of the n credit categories, Indicates the judgment threshold of member data on the credit category corresponding to the target label c;
[0104] When the target credit model M predicts the probability y of the seed sample in the target label c c Below the judgment threshold of non-member data And it is greater than the predicted probability of any other credit category label, then save the seed sample as the generated non-member detection sample, where, Indicates the judgment threshold of non-member data in the credit category corresponding to the target label c;
[0105] Generate member detection samples and non-member detection samples that meet the sample quantity.
[0106] In the above technical solution, firstly, by analyzing the predicted output behavior of the credit model for member data and non-member data, the present invention can more accurately capture the performance differences of the credit model on two different types of data, thereby clarifying the generation standard of privacy risk detection data and ensuring the effectiveness of the generated detection data. Secondly, by using feature space search technology, the generation efficiency of detection data can be effectively improved. Finally, the system of the present invention is highly versatile and flexible, and is suitable for credit classification prediction models constructed by different machine learning algorithms.
[0107] In another technical solution, the sample generation module is used to continue to perform the following steps when the seed sample does not meet the conditions of step S4:
[0108] S6.1. Setting parameter k max , k min and k, where [k min , k max ] represent the value range of k, and k max Not greater than the characteristic dimension of the seed sample, the first k takes the maximum value k max , and then adjusted to 1 / 2 of the current value;
[0109] S6.2, randomly selecting k feature dimensions from the feature dimensions of the sample, and randomly sampling a new feature value from the feature value space of the k feature dimensions to replace the current feature value, to generate a sample, and repeat the judgment of step S4;
[0110] When the number of times the condition of step S4 is not met reaches the preset number of times, max When , execute step S6.3;
[0111] S6.3. Adjust the value of k by 1 / 2 of the current value, and repeat step S6.2 until the condition of step S4 is met or k completes all possible values.
[0112] In the above technical solution, the sample generation module simulates the natural variation of data by introducing randomness, thereby obtaining more diverse samples and more data that have not been predicted by the model before.
[0113] The present invention also provides an electronic device, comprising:
[0114] one or more processors;
[0115] and a memory in communication with 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 executes the data generation method. The electronic device may be any terminal device including a mobile phone, a laptop computer, a desktop computer, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, etc.
[0116] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the data generating method is implemented.
[0117] Through the description of the above implementation mode, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present invention, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0118] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and the implementation modes, and they can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and the illustrations shown and described herein.
Claims
1. A data generation method for member privacy risk detection of a credit reporting model, characterized in that: The following steps are involved: S1. Estimate the average prediction confidence of member data in each credit category of the target credit model M to be tested And estimate the average prediction confidence of non-member data in each credit category of the target credit model to be tested Where n means that the target credit model M has n credit categories, i means the i-th credit category, represents the average prediction confidence of the member data of the i-th credit category of the target credit model M to be tested, It represents the average prediction confidence of non-member data on the i-th credit category of the target credit model M to be tested; S2. A sample is randomly sampled from the sample space of the target credit model M to be tested, and for each feature dimension of the sample, a new feature value is randomly sampled from the feature value space of the feature dimension to replace the current feature value, thereby generating a seed sample, wherein the sample space includes member data and non-member data; S3. Input the seed sample into the target credit model M to obtain the posterior probability prediction output and set the judgment threshold of the member data. Judgment threshold for non-member data in, represents the judgment threshold of member data in the i-th credit category, represents the judgment threshold of non-member data in the i-th credit category; S4. The target label of the fixed credit category is c. When the target credit model M predicts the probability y of the seed sample in the target label c c Higher than the judgment threshold of member data and is greater than the predicted probability of any other credit category label, then the seed sample is saved as the generated member detection sample, where c is one of the labels of the n credit categories, Indicates the judgment threshold of member data on the credit category corresponding to the target label c; When the target credit model M predicts the probability y of the seed sample in the target label c c Below the judgment threshold of non-member data And it is greater than the predicted probability of any other credit category label, then save the seed sample as the generated non-member detection sample, where, Indicates the judgment threshold of non-member data in the credit category corresponding to the target label c; S5. Repeat steps S2 to S4 to generate member detection samples and non-member detection samples that meet the sample quantity.
2. The method for generating data for member privacy risk detection of a credit reporting model according to claim 1, characterized in that: When the seed sample does not meet the condition of step S4, the following steps are continued: S6.
1. Setting parameter k max , k min and k, where [k min , k max ] represent the value range of k, and k max Not greater than the characteristic dimension of the seed sample, the first k takes the maximum value k max , and then adjusted to 1 / 2 of the current value; S6.2, randomly selecting k feature dimensions from the feature dimensions of the sample, and randomly sampling a new feature value from the feature value space of the k feature dimensions to replace the current feature value, to generate a sample, and repeat the judgment of step S4; When the number of times the condition of step S4 is not met reaches the preset number of times, max When , execute step S6.3; S6.
3. Adjust the value of k by 1 / 2 of the current value, and repeat step S6.2 until the condition of step S4 is met or k completes all possible values.
3. The method for generating data for member privacy risk detection of a credit reporting model according to claim 1, characterized in that: In step S1, the average prediction confidence of member data in each credit category of the target credit model M to be tested is estimated respectively. And estimate the average prediction confidence of non-member data on each credit category of the target credit model M to be tested The methods specifically include: When the member data and non-member data of several target credit models M to be tested can be obtained, then, Input the member data of the labels belonging to each credit category into the target credit model M to be tested, and calculate the average prediction confidence of each credit category in, Represents the sub-dataset whose true label is i in the member data; Input the non-member data of the labels belonging to each credit category into the target credit model M to be tested, and calculate the average prediction confidence of each credit category in, Represents the sub-dataset whose true label is i in the non-member data.
4. The method for generating data for member privacy risk detection of a credit reporting model according to claim 3, characterized in that: Also includes: When several data samples of the target credit model M to be tested can be obtained, but whether the data samples are member data or non-member data is unknown, then, The acquired data samples are randomly divided into two parts, one data sample is used as a training sample, and the other data sample is used as a test sample; Use the training samples to train the target credit model M to obtain the "shadow" collection model M shadow ; Input the training samples of labels belonging to each credit category into the "shadow" collection model M shadow , calculate the average prediction confidence of each credit category in, Indicates the "shadow" collection model M shadow The sub-dataset with the true label i in the training samples; Input the test samples of labels belonging to each credit category into the "shadow" collection model M shadow , calculate the average prediction confidence of each credit category in, Indicates the "shadow" collection model M shadow The sub-dataset whose true label is i in the test sample of .
5. The method for generating data for member privacy risk detection of a credit reporting model according to claim 3, characterized in that: Also includes: When the number of member data and non-member data of the target credit model M to be tested is less than a certain number, then, The average prediction confidence and the average prediction confidence Assignment, where 6. A system for generating data for member privacy risk detection based on the credit reporting model according to any one of claims 1 to 5, characterized in that: include: The judgment threshold estimation module is used to estimate the average prediction confidence of member data in each credit category of the target credit model M to be tested. And estimate the average prediction confidence of non-member data in each credit category of the target credit model to be tested Set the judgment threshold of member data Judgment threshold for non-member data Where n means that the target credit model M has n credit categories, i means the i-th credit category, represents the average prediction confidence of the member data of the i-th credit category of the target credit model M to be tested, represents the average prediction confidence of non-member data on the i-th credit category of the target credit model M to be tested, represents the judgment threshold of member data in the i-th credit category, represents the judgment threshold of non-member data in the i-th credit category; A sample generation module is used to randomly sample a sample from the sample space of the target credit model M to be tested, and for each feature dimension of the sample, randomly sample a new feature value from the feature value space of the feature dimension to replace the current feature value, so as to generate a seed sample, wherein the sample space includes member data and non-member data; The sample data judgment module is used to input the seed sample into the target credit model M to obtain the posterior probability prediction output; And the target label for the fixed credit category is c. When the target credit model M predicts the probability y of the seed sample in the target label c c Higher than the judgment threshold of member data and is greater than the predicted probability of any other credit category label, then the seed sample is saved as the generated member detection sample, where c is one of the labels of the n credit categories, Indicates the judgment threshold of member data on the credit category corresponding to the target label c; When the target credit model M predicts the probability y of the seed sample in the target label c c Below the judgment threshold of non-member data And it is greater than the predicted probability of any other credit category label, then save the seed sample as the generated non-member detection sample, where, Indicates the judgment threshold of non-member data in the credit category corresponding to the target label c; Generate member detection samples and non-member detection samples that meet the sample quantity.
7. The system according to claim 6, characterized in that The sample generation module is used to continue to perform the following steps when the seed sample does not meet the conditions of step S4: S6.
1. Setting parameter k max , k min and k, where [k min , k max ] represent the value range of k, and k max Not greater than the characteristic dimension of the seed sample, the first k takes the maximum value k max , and then adjusted to 1 / 2 of the current value; S6.2, randomly selecting k feature dimensions from the feature dimensions of the sample, and randomly sampling a new feature value from the feature value space of the k feature dimensions to replace the current feature value, to generate a sample, and repeat the judgment of step S4; When the number of times the condition of step S4 is not met reaches the preset number of times, max When , execute step S6.3; S6.
3. Adjust the value of k by 1 / 2 of the current value, and repeat step S6.2 until the condition of step S4 is met or k completes all possible values.
8. An electronic device, characterized in that include: one or more processors; 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 executes the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Federal learning member inference method based on prediction confidence sequence
CN113850399A
Model performance and privacy security detection method and system for differential privacy deep learning algorithm
CN116821675A
Federal distillation member reasoning attack defense technology based on data generation
CN117709407A
Abnormal gang identification method and device, equipment and storage medium
CN118797465A
Method and apparatus for generating training samples, device, and storage medium
WO2024021526A1