Medical data risk level classification system and method based on membership inference attack
Through a medical data risk level classification system based on member inference attacks and using nested ensemble learning methods to train multiple attack models, the problem of being unable to effectively assess the risk of medical data privacy leakage in the existing technology is solved, and the risk level of medical data is achieved. Precise quantification of partitioning and conservation strategies.
Patent Information
- Application Number
- CN202410947396.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-16
AI Technical Summary
Existing technology cannot effectively quantitatively assess the risk of privacy leakage of medical data, and cannot classify risk levels for different medical data, resulting in an overly unified defense mechanism and low efficiency.
A medical data risk level classification system based on member inference attacks is adopted. Through data preprocessing and segmentation, target model training, shadow model training, attack model training, model fusion assessment and risk level classification modules, the nested ensemble learning method is used to train multiple The attack model repeats the member inference attack process, counts the number of successful and unsuccessful identifications, and uses a clustering method to classify risk levels.
It achieves precise quantification of the risk of medical data privacy leakage, provides a clearer risk level classification, provides a basis for subsequent protection strategy formulation, and significantly improves the effect of simulated attacks on medical data.
Smart Images

Figure CN118484723B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical risk identification, and in particular to a medical data risk level classification system and method based on member reasoning attack. Background Art
[0002] Massive amounts of medical data contain enormous value. Its analysis and mining can not only be used for disease prediction, medical diagnosis assistance, and clinical decision support, but also have important significance for the optimization and innovation of the medical system. However, in the current era of big data, the use of medical data is also accompanied by huge risks of patient privacy leakage. Especially when using machine learning and deep learning models, simply protecting patient data itself may still lead to the exposure of patient privacy. For example, a membership inference attack can infer the patients in the training data set used to train the prediction model. This method is particularly effective for complex models such as LSTM and Transformer, because these models may absorb a lot of data details during training, allowing attackers to perform membership inference more accurately. Therefore, how to make full use of these valuable medical data while protecting patient privacy to the greatest extent has become a difficult problem that needs to be solved urgently.
[0003] The contradiction between security and data availability is the core challenge of information security. Improving security often means taking more stringent measures, which may affect the accuracy and computing efficiency of the data, thereby reducing availability. On the contrary, in order to improve the availability of data, it may be necessary to relax certain security measures, which may increase the risk of data leakage. For example, in order to combat member reasoning attacks, differential privacy encryption and other methods are often used on the data, which greatly reduces the efficiency and predictive ability of model training. Therefore, it is crucial to identify the security risk level of medical data in advance and choose appropriate security computing methods based on the sensitivity and security risks of the data to ensure that the data can be protected without hindering its normal use. By classifying the risks of medical data and quantifying the privacy risks of different data, it will help medical institutions and researchers to formulate privacy protection strategies more targetedly, adopt corresponding technical means such as data desensitization, encryption and permission management, and maximize the "security-utility" trade-off.
[0004] Member reasoning attack, as a common prediction model attack technology, has great potential in the field of medical data risk level classification. Compared with traditional risk classification methods, this type of technology can analyze the security of medical data more deeply and personalized for specific data sets and specific prediction models. In recent years, researchers have recognized the importance of model attack technology for medical data security risk assessment. Among them, the two most relevant technical studies to this patent technology are:
[0005] ① Evaluation of inference attack models for deep learning on medical data. The article Evaluation of inference attack models for deep learning on medical data by Maoqiang Wu et al. evaluated two types of inference attacks on medical data: attribute inference attack and model inversion attack. Attribute inference attack can infer sensitive health data of patients through public information of patients and model prediction results. Model inversion attack can restore the input medical image through the intermediate output of the model in collaborative learning. Experiments show that both attacks can reconstruct medical images and clinical reports, posing a serious threat to patient privacy. However, this technical solution cannot give a quantitative assessment result of the risk of privacy leakage of medical data, and cannot classify different medical data into risk levels, resulting in an overly unified defense mechanism, and cannot take differentiated protection measures according to different risk levels, which is inefficient.
[0006] ② Holistic risk assessment of inference attacks against machine learning models. The article {ML-Doctor}: Holistic Risk Assessment of Inference Attacks Against Machine Learning Models by Yugeng Liu et al. systematically modeled the threat of four inference attacks faced by machine learning models: member inference attacks, model inversion attacks, attribute inference attacks, and model stealing attacks. Experiments have shown that the complexity of the training dataset has a significant impact on the effects of different attacks. The more complex the dataset, the better the member inference attack effect, and the worse the model stealing attack effect. They developed a software framework called ML-DOCTOR based on modular design, which can evaluate the effects of various inference attacks and defense mechanisms. However, the datasets used in this technical solution are four general image datasets, and no security risk assessment is performed on medical data, so the personalized needs of the medical field are not taken into account, nor the particularity and sensitivity of medical data. Summary of the invention
[0007] The purpose of the present invention is to provide a medical data risk level classification system and method based on member reasoning attack in view of the deficiencies of the prior art.
[0008] The objective of the present invention is achieved through the following technical solutions:
[0009] According to a first aspect of the present specification, a medical data risk level classification system based on membership inference attack is provided, the system comprising:
[0010] A data preprocessing and segmentation module is used to preprocess the medical data set and randomly segment it to obtain the training and validation data sets of the target model, the training and validation data sets of the shadow model, and the non-member data set;
[0011] The training and validation data sets of the shadow model are generated by using a bootstrap sampling method to generate S sample sets with a constant data volume;
[0012] The non-member data set is used to generate a label that identifies that the data is not used to train the attacked model when training / testing the attack model. It is divided into two parts. The first part uses a self-service sampling method to generate S sample sets with a constant data volume, which are used to generate attack model training data, and the second part is used to generate attack model test data;
[0013] A target model training module, used to train the target model using the training and validation data sets of the target model, and generate attack model test data in combination with the second part of the non-member data set;
[0014] A shadow model training module, used to train S shadow models that imitate the target model using S sample sets sampled from the training and validation data sets of the shadow model, and generate S attack model training sets in combination with the S sample sets sampled from the first part of the non-member data set;
[0015] An attack model training module is used to train S attack models using the S attack model training sets, thereby performing member inference attacks and inferring training set members of the target model. When training the attack model, a nested ensemble method is used, an adaptive boosting ensemble learning inner loop is nested in a bagging ensemble learning outer framework, and an adaptive boosting method is used on each attack model training set to train the corresponding attack model.
[0016] A model fusion evaluation module is used to fuse the trained S attack models, and use the attack model test data to evaluate the member reasoning attack success rate of the fused attack model, and record the medical data that has been successfully identified and unsuccessfully identified;
[0017] The risk level classification module is used to repeat the member reasoning attack process Z times, count the number of times the medical data is successfully identified and unsuccessfully identified, and classify the risk level of the medical data. According to the different risk levels of medical data, we can better understand the exposure risk of medical data samples in member reasoning attacks. This result can provide a basis for subsequent defense strategies, take more stringent protection measures for high-risk medical data, and reduce the risk of privacy leakage.
[0018] Furthermore, in the target model training module, after the training and verification data sets of the target model are input into the trained target model, the output data label is set to 1, and after the second part of the non-member data set is input into the trained target model, the output data label is set to 0.
[0019] Furthermore, in the shadow model training module, after the sample set sampled from the training and validation data sets of the shadow model is input into the trained shadow model, the output data label is set to 1; after the sample set sampled from the first part of the non-member data set is input into the trained shadow model, the output data label is set to 0.
[0020] Furthermore, in the shadow model training module, for white-box attacks, the shadow model is trained using the same structure as the target model; for black-box attacks, multiple shadow model structures with similar functions are constructed and trained based on the input and output of the target model.
[0021] Furthermore, in the attack model training module, the confidence score features of the target model and the shadow model are input as additional information of the attack model.
[0022] Furthermore, in the attack model training module, each attack model is trained using an adaptive boosting method, specifically:
[0023] The training set of each attack model is a binary classification data set, denoted as , where N is the sum of the data size of the training and validation datasets of the shadow model and the data size of the first part of the non-member dataset, is the input feature vector, is a label that identifies whether the data is used for model training. Indicates that it has been used in training. Indicates that it has not been used in training; Convert to Labels in the form ;
[0024] Initialize all data sample weights 1 / N; iterate the weak classifier, for each round of iteration , first use the current weight Train the data in the training set after label conversion to obtain a weak classifier ; Then calculate the weighted error rate , the weighted error rate is the proportion of misclassification of the weak classifier on the weighted training data; the current weak classifier weight is calculated based on the weak classifier performance , and update the weight of each data sample, the formula is , normalize the updated data sample weights, and after T rounds of iterations, combine all weak classifiers to obtain a strong classifier ,in is a symbolic function used to transform the model output into Labels of the form; strong classifiers The output labels are converted into In this way, the attack model training is completed.
[0025] Furthermore, the attack model fusion method in the model fusion evaluation module is as follows: for new input data, each attack model will generate a category prediction result, and the prediction results are aggregated using a voting method, and the category with the most occurrences is selected as the final prediction result.
[0026] Furthermore, in the risk level classification module, a clustering method is used to classify the risk levels of medical data, specifically: the successful recognition rate is calculated based on the number of times each piece of medical data is successfully recognized and unsuccessfully recognized, the Z-score standardization method is used to convert the successful recognition rate into a standard normal distribution, and the standardized data is used as input for K-means clustering; the number of clusters is specified, and a cluster label for each piece of medical data is obtained through clustering, and the label indicates the risk level to which it belongs; and the risk level corresponding to each cluster is determined by analyzing the cluster center value.
[0027] Furthermore, in the Z-th member reasoning attack process, some attacks are white-box attacks and some attacks are black-box attacks, and the shadow model structure used in each round of attack varies according to the attack type.
[0028] According to a second aspect of this specification, a medical data risk level classification method based on member reasoning attack is provided, the method comprising:
[0029] Preprocess the medical data set and randomly divide it into training and validation data sets of the target model, training and validation data sets of the shadow model, and non-member data sets;
[0030] The training and validation data sets of the shadow model are generated by using a bootstrap sampling method to generate S sample sets with a constant data volume;
[0031] The non-member data set is used to generate a label that identifies that the data is not used to train the attacked model when training / testing the attack model. It is divided into two parts. The first part uses a self-service sampling method to generate S sample sets with a constant data volume, which are used to generate attack model training data, and the second part is used to generate attack model test data;
[0032] Training the target model using the training and validation data sets of the target model, and generating attack model test data in combination with the second part of the non-member data set;
[0033] Using the S sample sets sampled from the training and validation data sets of the shadow model to train S shadow models that imitate the target model, and combining the S sample sets sampled from the first part of the non-member data set to generate S attack model training sets;
[0034] Using the S attack model training sets to train S attack models, a nested ensemble method is used when training the attack models, an adaptive boosting ensemble learning inner loop is nested in a bagging ensemble learning outer framework, and an adaptive boosting method is used on each attack model training set to train the corresponding attack model;
[0035] Fuse the trained S attack models, and use the attack model test data to evaluate the member reasoning attack success rate of the fused attack model, and record the medical data that are successfully identified and those that are not successfully identified;
[0036] Repeat the member reasoning attack process Z times, count the number of times the medical data is successfully identified and unsuccessfully identified, and classify the risk level of the medical data.
[0037] The beneficial effects of the present invention are as follows: by introducing member reasoning attack technology, the present invention can quantify the risk of privacy leakage of medical data and achieve more accurate quantification of risks. By designing an iterative process to statistically analyze the results of multiple rounds of member reasoning attacks, the present invention can obtain a clearer classification of medical data risk levels, providing a basis for the hierarchical formulation of subsequent protection strategies. The present invention innovatively adopts a nested integration method, nests the adaptive boosting ensemble learning internal loop in the bagging ensemble learning external framework, trains multiple attack models, and fully utilizes the advantages of the two ensemble learning methods, significantly improving the effect of simulated attacks on medical data, and achieving more accurate and comprehensive medical data risk assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] 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 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 these drawings without paying creative work.
[0039] Figure 1 A structural diagram of a medical data risk level classification system based on membership inference attack provided by an embodiment of the present invention;
[0040] Figure 2An overall flow chart of medical data risk level classification based on member reasoning attack provided by an embodiment of the present invention;
[0041] Figure 3 A schematic diagram of medical data set segmentation and sampling provided by an embodiment of the present invention;
[0042] Figure 4 A schematic diagram of attack model training and fusion provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0044] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0045] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0046] The present invention provides a medical data risk level classification system based on membership inference attack, such as Figure 1 As shown, the system includes six modules, namely: data preprocessing and segmentation module, target model training module, shadow model training module, attack model training module, model fusion evaluation module and risk level classification module. Figure 2 The overall flow chart of medical data risk level classification based on membership inference attack. Specifically:
[0047] A data preprocessing and segmentation module is used to preprocess the medical data set and randomly segment it to obtain the training and validation data sets of the target model, the training and validation data sets of the shadow model, and the non-member data set;
[0048] The training and validation data sets of the shadow model are generated by using a bootstrap sampling method to generate S sample sets with a constant data volume;
[0049] The non-member data set is used to generate a label that identifies that the data is not used to train the attacked model when training / testing the attack model. It is divided into two parts. The first part uses a self-service sampling method to generate S sample sets with a constant data volume, which are used to generate attack model training data, and the second part is used to generate attack model test data;
[0050] A target model training module, used to train the target model using the training and validation data sets of the target model, and generate attack model test data in combination with the second part of the non-member data set;
[0051] A shadow model training module, used to train S shadow models that imitate the target model using S sample sets sampled from the training and validation data sets of the shadow model, and generate S attack model training sets in combination with the S sample sets sampled from the first part of the non-member data set;
[0052] An attack model training module is used to train S attack models using the S attack model training sets, thereby performing member inference attacks and inferring training set members of the target model. When training the attack model, a nested ensemble method is used, an adaptive boosting ensemble learning inner loop is nested in a bagging ensemble learning outer framework, and an adaptive boosting method is used on each attack model training set to train the corresponding attack model.
[0053] A model fusion evaluation module is used to fuse the trained S attack models, and use the attack model test data to evaluate the member reasoning attack success rate of the fused attack model, and record the medical data that has been successfully identified and unsuccessfully identified;
[0054] The risk level classification module is used to repeat the member reasoning attack process Z times, count the number of times the medical data is successfully identified and unsuccessfully identified, and classify the risk level of the medical data.
[0055] In the following embodiments, the implementation process of each module is described in detail.
[0056] 1. Data Preprocessing and Segmentation Module
[0057] In the data preprocessing and segmentation modules, such as Figure 3 As shown, first load and preprocess the medical data set. The formatted electronic medical record data can be directly used by the machine learning model and can be used as a medical data set. Next, randomly split the medical data set to prepare the required data set for subsequent model training. It is mainly divided into three parts, namely: a. training and verification data set of the target model, b. training and verification data set of the shadow model, and c. non-member data set. Among the three, a. the training and verification data set of the target model is the largest part. The data in c. the non-member data set is neither used to train the target model nor to train the shadow model. The existence of the non-member data set is mainly to generate data with a label of 0 when training and testing the attack model, that is, to indicate that this part of the data is not used for the training of the attacked model (target model and shadow model). The non-member data set is divided into two parts. The first part is used to generate attack model training data, and the second part is used to generate attack model test data.
[0058] The bagging (bootstrap aggregating) method of ensemble learning is used when training the attack model. Bootstrap sampling in ensemble learning is used in the training and validation data sets of b. shadow model to generate S sub-data sets, i.e., S sample sets, which are used to train S shadow models that imitate the target model. This random selection allows repetition, so some samples may be selected multiple times, while other samples may not be selected at all. The size of each sub-data set is the same as the original data set, i.e., the training and validation data sets of b. shadow model, which are all B.
[0059] 2. Target Model Training Module
[0060] The target model is the model attacked in a membership inference attack. The target model is trained based on medical data and is used to implement specific functions, including machine learning models and deep learning models. The attacker's goal is to infer the training set members of the target model, which is extremely risky in the field of medical data. If the attacker has access to some medical data, they can use this data to perform membership inference attacks. For example, the attacker already knows that someone has undergone a specific medical examination, but does not know the results. Through a membership inference attack, the attacker is likely to infer whether the person's examination results were used to train a certain model, thereby indirectly obtaining information about the person's health status. Once the attacker successfully determines that a patient's data is a training member of the model, they may further explore other privacy of the patient or use this information to perform other types of attacks.
[0061] In the target model training module, a. the training and validation data sets of the target model are used to train the target model. Then, the attack model test data is generated in combination with c. the second part of the non-member data set. After the training and validation data sets of the target model are input into the trained target model, the output data label is set to 1, indicating the training member of the target model. After the second part of the non-member data set is input into the trained target model, the output data label is set to 0. That is, for the output corresponding to the medical data used in the target model training, the label is set to 1, and for the output corresponding to the medical data not used in the target model training, the label is set to 0.
[0062] 3. Shadow Model Training Module
[0063] The shadow model is used to imitate the target model. In the case of a white-box attack, the attacker knows the structure of the target model, so the shadow model can be trained using the same structure as the target model. In contrast, in the case of a black-box attack, the attacker does not know the specific structure of the target model, so it is necessary to build a shadow model structure with similar functions based on the input and output of the target model, and then train multiple such shadow models.
[0064] In the present invention, the number of times the medical data is successfully identified is counted through Z rounds of repeated membership reasoning attacks. Assuming that some attacks are white box attacks and some attacks are black box attacks, the specific structure of the shadow model used in each round of attack will vary depending on the type of attack. In this embodiment, 10 rounds of repeated membership reasoning attacks are performed, with 5 white box attacks and 5 black box attacks.
[0065] In the shadow model training module, S shadow models are trained using S sub-datasets sampled from b. the training and validation data sets of the shadow model. In this embodiment, S is set to 6. Then, attack model training data is generated in combination with the first part of c. the non-member data set. Specifically, a self-service sampling method is used to sample S parts from the first part of c. the non-member data set, and they are respectively input into S trained shadow models to obtain corresponding outputs. After the sub-dataset sampled from the training and validation data sets of the shadow model is input into the trained shadow model, the output data label is set to 1. After the sub-dataset sampled from the first part of the non-member data set is input into the trained shadow model, the output data label is set to 0. That is, for the output corresponding to the medical data used in the shadow model training, the label is set to 1, and for the output corresponding to the medical data that has not been used in the shadow model training, the label is set to 0.
[0066] 4. Attack Model Training Module
[0067] After training S shadow models and processing them in combination with non-member data sets to obtain S attack model training data, the S attack models are trained in the attack model training module. Member reasoning attacks need to extract useful features from the outputs of the target model and the shadow model to identify whether the input data is the training data of the target model and the shadow model. Therefore, in addition to the original outputs of the target model and the shadow model, other informative features can also be used as inputs to the attack model, such as the confidence scores of the target model and the shadow model. These additional information inputs can be used to improve the attack performance of the attack model, and the selection of appropriate features needs to be adjusted according to the specific application scenario and data set. The training of the attack model requires a lot of computing resources because it needs to process a large amount of data from the S shadow models, that is, the S attack model training data.
[0068] In the training of attack models, the present invention innovatively adopts a nested integration method, such as Figure 4 As shown in the figure, in an ensemble learning method Bagging, another ensemble learning method Boosting is used. The Boosting method used is the Adaptive Boosting (AdaBoost) method. Specifically, the AdaBoost method is used for training on each Boosting sample set. This strategy combines the advantages of the AdaBoost method (continuously correcting errors and improving model accuracy) and the Bagging method (reducing overfitting and improving stability through the integration of multiple models). Each attack model is trained using the AdaBoost method, as shown in the figure. Figure 4 As shown, the specific steps are as follows:
[0069] (1) For each attack model, its training set is the previously generated binary classification dataset, denoted as , where N=B+C, C is the amount of data in the first part of the non-member data set, is the input feature vector, is a label. Simply perform a transformation to make it In the form of, and then using the AdaBoost method, the conversion formula is as follows:
[0070]
[0071] For such a conversion, hour, ;when hour, .
[0072] (2) Initialize the weights of all samples. The formula is as follows:
[0073]
[0074] in, is the initial weight of the i-th sample, and all samples have equal weights initially.
[0075] (3) Iterate the weak classifier, for each round of iteration In this embodiment , perform the following steps:
[0076] ① Use weights to train weak classifiers: Use current weights Train the data in the binary classification dataset D after label conversion to obtain a weak classifier .
[0077] ② Calculate the weighted error rate: The weighted error rate is the proportion of misclassifications of the weak classifier on the weighted training data. The formula is:
[0078]
[0079] in, is an indicator function, when (the true label after transformation) and When (the prediction results of the weak classifier) are not equal, the indicator function is 1, otherwise it is 0; is the weighted error rate of the tth iteration.
[0080] ③Calculate the weight of the weak classifier: assign a weight to the current weak classifier , this weight is calculated based on the performance of the weak classifier, and the specific formula is:
[0081]
[0082] The logarithm here is the natural logarithm.
[0083] ④ Update the weight of the data sample: For the i-th sample, the weight is updated as:
[0084]
[0085] This update rule means that if a sample is correctly classified, its weight will decrease; conversely, if a sample is misclassified, its weight will increase.
[0086] ⑤Normalize sample weights: To ensure It is still a probability distribution and needs to be normalized. The formula is as follows:
[0087]
[0088] (4) Obtaining a strong classifier: After T rounds of iterations, the AdaBoost method combines all weak classifiers to make the final decision:
[0089]
[0090] Here, the decision of each weak classifier is determined by its weight Weighted. is a symbolic function used to transform the model output into Label. is the final strong classifier.
[0091] (5) Label conversion: converting strong classifiers Output label, making it In the form of:
[0092]
[0093] For such a conversion, hour, ;when hour, .
[0094] 5. Model Fusion Evaluation Module
[0095] The model fusion evaluation module first implements the fusion of the S AdaBoost attack models trained by the attack model training module. By combining the prediction results of multiple attack models, the bagging method can significantly reduce the variance of the entire model, and because each AdaBoost attack model is trained on a different sample set, their predictions may be biased in some aspects. But when these predictions are combined, these deviations may offset each other, thereby reducing the risk of overfitting.
[0096] The specific fusion method is: there are S AdaBoost attack models from S attack model training sets, and for new input data, each attack model will generate a category prediction result (0 or 1). Figure 4 As shown, a voting method is used to aggregate these prediction results, that is, the prediction results of all attack models are counted, and the category (0 or 1) with the most occurrences is selected as the final prediction result.
[0097] After the model is fused, the model fusion evaluation module will use the previously generated attack model test data to evaluate the attack effect of the fused overall attack model, which is specifically expressed as the attack success rate. During the evaluation process, it will record in detail which medical data was successfully identified in the member reasoning attack and which was not successfully identified. This information is of great value for the subsequent classification of medical data risk levels.
[0098] 6. Risk level classification module
[0099] In order to better assess the risk of medical data being identified in a membership inference attack, the present invention designs an iterative process, i.e., performing membership inference attacks multiple times. Each attack process starts with randomly splitting the medical data set, then performing the attack and recording the medical data that are successfully identified and those that are not successfully identified. This process will be repeated Z times to collect a large amount of statistical data.
[0100] After executing Z attacks, the number of times each piece of medical data was successfully identified and unsuccessfully identified is counted. Then, the automatic clustering method is used to classify the risk level of medical data to more accurately classify the risk level of medical data samples.
[0101] Assume there are k medical data samples, and the number of times the i-th sample is successfully identified is , the number of times that were not successfully identified is . Then the successful recognition rate of the i-th sample is: Next, the K-means clustering algorithm is used to automatically classify risk levels.
[0102] Before performing clustering, the data needs to be standardized so that the success rate of recognition is The distribution of is more suitable for the K-means clustering algorithm, which effectively improves the clustering effect. In this embodiment, the Z-score standardization method is used to convert the data into a standard normal distribution with a mean of 0 and a variance of 1 to reduce the impact of different eigenvalue ranges on the clustering results. Make the following conversions:
[0103]
[0104] in, yes The mean of yes The standard deviation of .
[0105] The data obtained after standardization As input, K-means clustering is performed, and the number of clusters q is specified. Through clustering, cluster labels can be obtained for each sample, which represent the risk level to which it belongs. Then, by analyzing the cluster center value, the risk level corresponding to each cluster can be determined. The larger the cluster center value, the higher the successful recognition rate and the corresponding risk level. For example, setting When the clustering method is used, the cluster labels are mapped to three risk levels: high, medium, and low, and finally the risk level classification of each medical data sample is obtained. Compared with the simple threshold method, this method has stronger adaptability and accuracy. It does not need to set the threshold manually, and automatically classifies according to data characteristics. The clustering method can more accurately divide the risk level and better consider the actual distribution of the data, so that the exposure risk of medical data can be analyzed more intelligently, and the accuracy and reliability of risk assessment can be improved.
[0106] Compared with the solution of ① Maoqiang Wu et al., the present invention can quantitatively evaluate the privacy leakage risk of different medical data samples and realize the accurate quantification of risks. The present invention can also clearly divide different medical data into corresponding risk levels, while the solution of Maoqiang Wu et al. cannot give quantitative results of medical data risks and clear risk level division. Compared with the general image data set used by ② Yugeng Liu et al., the present invention is specially designed for medical data, taking into account the particularity and sensitivity of medical data, and more in line with the personalized needs of medical scenarios. The present invention provides a data risk assessment solution for the medical field. In addition, the present invention also innovatively adopts a nested ensemble learning framework, gives play to the advantages of two ensemble learning methods, and integrates numerous attack models, so as to achieve better simulated attack effects and conduct more comprehensive and accurate medical data risk assessment. And the present invention adopts a modular design, which can easily expand the functions of each module, reflecting good extensibility.
[0107] The embodiment of the present invention also provides a medical data risk level classification method based on membership inference attack, the method comprising:
[0108] Preprocess the medical data set and randomly divide it into training and validation data sets of the target model, training and validation data sets of the shadow model, and non-member data sets;
[0109] The training and validation data sets of the shadow model are generated by using a bootstrap sampling method to generate S sample sets with a constant data volume;
[0110] The non-member data set is used to generate a label that identifies that the data is not used to train the attacked model when training / testing the attack model. It is divided into two parts. The first part uses a self-service sampling method to generate S sample sets with a constant data volume, which are used to generate attack model training data, and the second part is used to generate attack model test data;
[0111] Training the target model using the training and validation data sets of the target model, and generating attack model test data in combination with the second part of the non-member data set;
[0112] Using the S sample sets sampled from the training and validation data sets of the shadow model to train S shadow models that imitate the target model, and combining the S sample sets sampled from the first part of the non-member data set to generate S attack model training sets;
[0113] Using the S attack model training sets to train S attack models, a nested ensemble method is used when training the attack models, an adaptive boosting ensemble learning inner loop is nested in a bagging ensemble learning outer framework, and an adaptive boosting method is used on each attack model training set to train the corresponding attack model;
[0114] Fuse the trained S attack models, and use the attack model test data to evaluate the member reasoning attack success rate of the fused attack model, and record the medical data that are successfully identified and those that are not successfully identified;
[0115] Repeat the member reasoning attack process Z times, count the number of times the medical data is successfully identified and unsuccessfully identified, and classify the risk level of the medical data.
[0116] The specific implementation process can refer to the various modules in the aforementioned medical data risk level classification system based on member reasoning attack.
[0117] The above is only a preferred embodiment of the present invention. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Any technician familiar with the art can make many possible changes and modifications to the technical solution of the present invention by using the above disclosed methods and technical contents without departing from the scope of the technical solution of the present invention, or modify it into an equivalent embodiment of equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of protection of the technical solution of the present invention.
Claims
1. A medical data risk level classification system based on membership inference attack, characterized in that: include: A data preprocessing and segmentation module is used to preprocess the medical data set and randomly segment it to obtain the training and validation data sets of the target model, the training and validation data sets of the shadow model, and the non-member data set; The training and validation data sets of the shadow model are generated by using a bootstrap sampling method to generate S sample sets with a constant data volume; The non-member data set is used to generate a label that identifies that the data is not used to train the attacked model when training / testing the attack model. It is divided into two parts. The first part uses a self-service sampling method to generate S sample sets with a constant data volume, which are used to generate attack model training data, and the second part is used to generate attack model test data; A target model training module, used to train the target model using the training and validation data sets of the target model, and generate attack model test data in combination with the second part of the non-member data set; A shadow model training module, used to train S shadow models that imitate the target model using S sample sets sampled from the training and validation data sets of the shadow model, and generate S attack model training sets in combination with the S sample sets sampled from the first part of the non-member data set; An attack model training module is used to train S attack models using the S attack model training sets, thereby performing member inference attacks and inferring training set members of the target model. When training the attack model, a nested ensemble method is used, an adaptive boosting ensemble learning inner loop is nested in a bagging ensemble learning outer framework, and an adaptive boosting method is used on each attack model training set to train the corresponding attack model. A model fusion evaluation module is used to fuse the trained S attack models, and use the attack model test data to evaluate the member reasoning attack success rate of the fused attack model, and record the medical data that has been successfully identified and unsuccessfully identified; The risk level classification module is used to repeat the member reasoning attack process Z times, count the number of times the medical data is successfully identified and unsuccessfully identified, and classify the risk level of the medical data.
2. The medical data risk level classification system based on membership inference attack according to claim 1 is characterized in that: In the target model training module, after the training and verification data sets of the target model are input into the trained target model, the output data label is set to 1, and after the second part of the non-member data set is input into the trained target model, the output data label is set to 0.
3. The medical data risk level classification system based on membership inference attack according to claim 1 is characterized in that: In the shadow model training module, after the sample set sampled from the training and validation data sets of the shadow model is input into the trained shadow model, the output data label is set to 1; after the sample set sampled from the first part of the non-member data set is input into the trained shadow model, the output data label is set to 0.
4. The medical data risk level classification system based on membership inference attack according to claim 1 is characterized in that: In the shadow model training module, for white-box attacks, the shadow model is trained using the same structure as the target model; for black-box attacks, multiple shadow model structures with similar functions are constructed and trained based on the input and output of the target model.
5. The medical data risk level classification system based on membership inference attack according to claim 1 is characterized in that: In the attack model training module, the confidence score features of the target model and the shadow model are input as additional information of the attack model.
6. The medical data risk level classification system based on membership inference attack according to claim 1 is characterized in that: In the attack model training module, each attack model is trained using an adaptive boosting method, specifically: The training set of each attack model is a binary classification data set, denoted as , where N is the sum of the data size of the training and validation datasets of the shadow model and the data size of the first part of the non-member dataset, is the input feature vector, is a label that identifies whether the data is used for model training. Indicates that it has been used in training. Indicates that it has not been used in training; Convert to Labels of the form ; Initialize all data sample weights 1 / N; iterate the weak classifier, for each round of iteration , first use the current weight Train the data in the training set after label conversion to obtain a weak classifier ; Then calculate the weighted error rate , the weighted error rate is the misclassification ratio of the weak classifier on the weighted training data; Calculate the current weak classifier weight based on the weak classifier performance , and update the weight of each data sample, the formula is , normalize the updated data sample weights, and after T rounds of iterations, combine all weak classifiers to obtain a strong classifier ,in is a symbolic function used to transform the model output into Labels of the form; strong classifiers The output labels are converted into In this way, the attack model training is completed.
7. The medical data risk level classification system based on membership inference attack according to claim 1 is characterized in that: The attack model fusion method in the model fusion evaluation module is as follows: for new input data, each attack model will generate a category prediction result, and the prediction results are aggregated using the voting method, and the category with the most occurrences is selected as the final prediction result.
8. The medical data risk level classification system based on membership inference attack according to claim 1 is characterized in that: In the risk level classification module, a clustering method is used to classify the risk levels of medical data, specifically: The successful recognition rate is calculated according to the number of times each piece of medical data is successfully recognized and unsuccessfully recognized, the successful recognition rate is converted into a standard normal distribution using a Z-score standardization method, and the standardized data is used as input for K-means clustering; the number of clusters is specified, and a cluster label of each piece of medical data is obtained through clustering, wherein the label indicates the risk level to which it belongs; By analyzing the cluster center values, the risk level corresponding to each cluster is determined.
9. The medical data risk level classification system based on membership inference attack according to claim 8 is characterized in that: During the Z-th member reasoning attack process, some attacks are white-box attacks and some attacks are black-box attacks. The shadow model structure used in each round of attack varies depending on the type of attack.
10. A medical data risk level classification method based on membership inference attack, characterized in that: include: Preprocess the medical data set and randomly divide it into training and validation data sets of the target model, training and validation data sets of the shadow model, and non-member data sets; The training and validation data sets of the shadow model are generated by using a bootstrap sampling method to generate S sample sets with a constant data volume; The non-member data set is used to generate a label that identifies that the data is not used to train the attacked model when training / testing the attack model. It is divided into two parts. The first part uses a self-service sampling method to generate S sample sets with a constant data volume, which are used to generate attack model training data, and the second part is used to generate attack model test data; Training the target model using the training and validation data sets of the target model, and generating attack model test data in combination with the second part of the non-member data set; Using the S sample sets sampled from the training and validation data sets of the shadow model to train S shadow models that imitate the target model, and combining the S sample sets sampled from the first part of the non-member data set to generate S attack model training sets; Using the S attack model training sets to train S attack models, a nested ensemble method is used when training the attack models, an adaptive boosting ensemble learning inner loop is nested in a bagging ensemble learning outer framework, and an adaptive boosting method is used on each attack model training set to train the corresponding attack model; Fuse the trained S attack models, and use the attack model test data to evaluate the member reasoning attack success rate of the fused attack model, and record the medical data that are successfully identified and those that are not successfully identified; Repeat the member reasoning attack process Z times, count the number of times the medical data is successfully identified and unsuccessfully identified, and classify the risk level of the medical data.
