A data debiasing method and device based on biased neurons
By screening biased neurons in deep learning models, reversely generating training samples, and amplifying the data set, the decision bias problem caused by the deep learning model's use of biased data during training is solved, and the fairness of model decisions is improved, providing a simple method suitable for non-technical users.
Patent Information
- Application Number
- CN202210685939.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-16
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2042-06-16
AI Technical Summary
The biases in the raw sample data used by deep learning models during training lead to biased decisions, and existing methods for eliminating biases are complex, unstable, or difficult to understand, especially for non-technical users.
By obtaining the original data, marking category attributes, flipping the sensitive attributes to form the dataset X′, filtering biased neurons in the deep learning model, building a reverse dataset, and amplifying the training samples until the classification accuracy of the model is greater than 80% to remove bias.
It realizes the reverse generation of training samples through biased neurons, expands the data set, eliminates bias, and improves the fairness of deep learning model decisions, providing a simple and controllable method suitable for non-technical users.
Smart Images

Figure CN115034371B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence, and in particular relates to a data debiasing method and device based on biased neurons. Background Art
[0002] With the rapid development of artificial intelligence, artificial intelligence technologies represented by deep learning have flourished like mushrooms after a spring rain, gradually penetrating into typical application scenarios such as telemedicine, speech recognition, target detection, natural language processing, etc., and have played a very good role, bringing huge economic and social benefits. In the application process, deep learning technology has demonstrated its powerful ability to learn the inherent laws of sample data sets and highly abstract features, helping people solve many complex pattern recognition and classification prediction problems encountered in life. Therefore, deep learning technology has gradually penetrated into people's production and daily life, freeing people from heavy and repetitive labor.
[0003] Although deep learning technology can help people obtain more accurate classification and prediction results to help policymakers make decisions, help people improve work efficiency and generate more social benefits. However, new studies continue to show that deep learning models are prone to make biased decisions due to bias in the original sample data used in model training. If relevant organizations and decision makers give up using deep learning technology to conduct their business, they may lose their advantages in fierce business competition and decline, because artificial intelligence is an irreversible trend in the development of human science and technology. It can also be seen that biased decisions made by deep learning models will have many negative impacts on society, and as deep learning widely penetrates into all aspects of people's production and life, it is particularly important to improve the fairness of deep learning models.
[0004] The main reason why the decision recommendations provided by deep learning models are biased or even discriminatory is that there is bias in the original sample data set used for training the model, and the deep learning model cannot autonomously identify whether there is bias in the current data set during the learning process. Therefore, the current research work on improving the fairness of deep learning models mainly focuses on preprocessing the original sample data set used for deep learning model training to eliminate bias in order to improve the fairness of deep learning models. Existing preprocessing methods for bias elimination mainly include sampling or reweighting training samples to modify their data sets, changing single data records, using t-closeness functions, optimizing using multi-objective functions, and adversarial optimization. However, especially for policymakers and technology users who do not have rich research experience, many of the existing methods are either complicated to apply, making it difficult for users to operate, or are not stable enough, or are not easy to understand.
[0005] Given the fact that deep learning models are prone to make biased decisions and the limitations of existing methods for eliminating bias, it is of great theoretical and practical significance to study a data debiasing method based on biased neurons to create a fairer data set for deep learning model training to facilitate the application of artificial intelligence technology in people's production and life. Summary of the invention
[0006] The purpose of the present invention is to address the deficiencies of the prior art and provide a data debiasing method and device based on biased neurons.
[0007] The object of the present invention is achieved through the following technical solution: A data debiasing method based on biased neurons, comprising the following steps:
[0008] (1) Obtaining original data and marking the category attributes in the original data to obtain a marked data set, which is denoted as data set X; the original data is a text data set with sensitive attributes;
[0009] (2) Flip the sensitive attributes in dataset X to form dataset X′, and use dataset X and dataset X′ to filter biased neurons in the deep learning model;
[0010] (3) Construct reverse data set;
[0011] (4) Taking samples from the k-th reverse data set and expanding them into the data set X to synthesize an enhanced data set, the enhanced data set is then input into the deep model θ, and the deep model θ is trained until the classification accuracy of the deep model θ is greater than 80%, thus completing the debiasing; the deep model θ is a five-layer fully connected model, and the value of k is 30% to 50%.
[0012] Furthermore, the step (2) specifically includes the following sub-steps:
[0013] (2.1) The sensitive attributes in the dataset X are flipped to form a dataset X′, so that the sensitive attribute value of each sample in the dataset X′ is different from the sensitive attribute value of the corresponding sample in the dataset X, but all other attribute values are the same; the dataset X is {x 1 ,x 2 ,...x i ,...x N}, the data set X′ is {x′ 1 ,x′ 2 ,...x′ i ,...x′ N}, N means there are N samples in the data set X, x i represents the i-th sample in the data set X, i = 1, 2, ...i, ...N, x i and x′ i The sensitive attributes between them are opposite but all other attribute values are the same; for each sample x in the dataset X i And each sample x′ in the dataset X′ i The sample instance pair (x i ,x′ i ), all sample instance pairs constitute a new data set X * ;
[0014] (2.2) The dataset X * Input to the deep model θ, wherein the deep model θ is a five-layer fully connected model;
[0015] (2.3) Measure the activation values of the neurons at each corresponding position in the depth model θ twice, and normalize the two activation values; then select the neurons whose absolute value difference between the two activation values after normalization is greater than 0.3 as bias neurons.
[0016] Furthermore, the step (3) specifically includes the following sub-steps:
[0017] (3.1) The loss function of the biased neuron selected in step (2.3) in the deep model θ training is recorded as loss;
[0018] (3.2) In the output layer of the deep model θ, for the input data x i Take the derivative and get the loss function loss for the data x i The gradient of , and multiply the gradient by the step size ε, plus the data x i , get the reverse data x″ i ; x″ i The calculation process is as follows:
[0019]
[0020] where x i is the i-th sample in the data set X, ε = 0.001;
[0021] (3.3) Repeat step (4.3) until the loss function of the deep model θ converges, thereby generating a new reverse data set X″ based on the reverse generation of the bias neuron, where the reverse data set X″ is {x″ 1 ,x″ 2 ,...x″ i ,...x″ N}.
[0022] The present invention also provides a data debiasing device based on bias neurons, comprising one or more processors for implementing the above-mentioned data debiasing method based on bias neurons.
[0023] The present invention also provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, is used to implement the above-mentioned data debiasing method based on biased neurons.
[0024] The beneficial effect of the present invention is that the method provided by the present invention utilizes the biased neurons in the deep learning model to reversely generate training samples, expands and enhances the original sample data set, and obtains a fairer data set for training the deep learning model, thereby achieving the purpose of eliminating bias and improving the fairness of deep learning model decision-making. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A flowchart of a data debiasing method based on bias neurons;
[0026] Figure 2 Schematic diagram of a data debiasing device based on bias neurons. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical scheme and advantages of the present invention more clear, the present invention is further described in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0028] The present invention uses the bias neurons found in the deep learning model to modify the sensitive attribute values of each data sample in the original training data, so that among all the attributes of the sample, except for the sensitive attribute values that are opposite to the original sample, the other attributes and labels are the same as the original sample. The new and fairer synthetic data set is used to train the deep learning model to achieve the purpose of eliminating bias, thereby improving the fairness of the deep learning model decision.
[0029] The present invention defines the phenomenon that when a deep learning model performs reasoning, the classification results output by the model are affected by specific attributes, resulting in completely different classification results as the bias of the deep learning model. Definition of deep model bias: For classification tasks, the phenomenon that the classification model is overly affected by sensitive characteristics when making decisions, and its decision may rely on such erroneous feature associations is defined as the biased behavior of the model.
[0030] Definition of deep model bias: For classification tasks, the phenomenon that the classification model is overly influenced by sensitive features when making decisions and its decisions may rely on such incorrect feature associations is defined as the biased behavior of the model.
[0031] Example 1
[0032] like Figure 1 As shown, the present invention provides a data debiasing method based on bias neurons, comprising the following steps:
[0033] (1) Obtaining original data and marking the category attributes in the original data to obtain a marked data set, which is denoted as data set X; the original data is a text data set with sensitive attributes;
[0034] In this embodiment, the Adult dataset is selected as the original dataset. There are 14 sample attributes in the Adult dataset. The category attributes in the Adult dataset are marked, and the task attributes and sensitive attributes are marked. The gender attribute is marked as a sensitive attribute, and the male in the gender attribute is replaced by the number 1, and the female is replaced by 0. The annual income classification is marked as a task attribute, and the annual income classification of more than 50K is replaced by the number 0, and less than 50K is replaced by the number 1. The marked dataset is obtained, which is recorded as dataset X;
[0035] Without performing data debiasing processing based on biased neurons, the data of dataset X is directly input into the deep model θ for training. The trained deep model has a high degree of bias and poor fairness performance.
[0036] The depth model θ is a five-layer fully connected model;
[0037] (2) Flip the sensitive attributes in dataset X to form dataset X′, and use dataset X and dataset X′ to filter biased neurons in the deep learning model;
[0038] (2.1) The sensitive attributes in the dataset X are flipped to form a dataset X′, so that the sensitive attribute value of each sample in the dataset X′ is different from the sensitive attribute value of the corresponding sample in the dataset X, but all other attribute values are the same; the dataset X is {x 1 ,x 2 ,...x i ,...x N}, the data set X′ is {x′ 1 ,x′ 2 ,...x′ i ,...x′ N}, N means there are N samples in the data set X, x i represents the i-th sample in the data set X, i = 1, 2, ...i, ...N, x i and x′ i The sensitive attributes between them are opposite but all other attribute values are the same; for each sample x in the dataset X i And each sample x′ in the dataset X′ i The sample instance pair (x i ,x′ i ), all sample instance pairs constitute a new data set X * ;
[0039] (2.2) The dataset X * Input to the deep model θ, where the deep model θ is a five-layer fully connected model or a deep model θ with high accuracy obtained by training with the dataset X;
[0040] (2.3) Measure the activation values of the neurons at each corresponding position in the depth model θ twice, and normalize the two activation values; then select the neurons whose absolute value difference between the two activation values after normalization is greater than 0.3 as bias neurons.
[0041] (3) Construct reverse data set;
[0042] (3.1) The loss function of the biased neuron selected in step (2.3) in the deep model θ training is recorded as loss;
[0043] (3.2) In the output layer of the deep model θ, for the input data x i Take the derivative and get the loss function loss for the data x i The gradient of , and multiply the gradient by the step size ε, plus the data x i , get the reverse data x″i ; x″ i The calculation process is as follows:
[0044]
[0045] where x i is the i-th sample in the data set X, ε = 0.001;
[0046] (3.3) Repeat step (4.3) until the loss function of the deep model θ converges, thereby generating a new reverse data set X″ based on the reverse generation of the bias neuron, where the reverse data set X″ is {x″ 1 ,x″ 2 ,...x″ i ,...x″ N}.
[0047] (4) Taking samples from the k-th reverse data set and expanding them into the data set X to synthesize an enhanced data set, the enhanced data set is then input into the deep model θ, and the deep model θ is trained until the classification accuracy of the deep model θ is greater than 80%, thus completing the debiasing; the deep model θ is a five-layer fully connected model, and the value of k is 30% to 50%.
[0048] Inputting the enhanced dataset into the deep model θ will improve the fairness performance of the deep model θ without significantly decreasing the classification performance of the deep model θ.
[0049] When the classification accuracy of the deep model θ is greater than 80%, it means that the training of the deep model θ tends to be stable; when the classification accuracy of the deep model θ is not greater than 80%, it means that further training is needed and the number of training rounds should be increased.
[0050] Classification accuracy:
[0051] Classification accuracy, also known as "correctness", refers to the proportion of correctly classified samples to the total number of samples. For data set X, the formula is as follows:
[0052]
[0053] Where n represents the total number of samples in the dataset X, f represents the deep model θ, and y i is the sample x i 's true mark.
[0054] The data debiasing method based on biased neurons provided above proposes a new data augmentation-based debiasing method. By searching for biased neurons in a deep learning model to reverse generate training samples, the augmented sample data is obtained for deep learning training. The proposed data debiasing method based on biased neurons solves the instability in existing similar research work and provides a controllable and relatively simple option for decision-makers, further ensuring that while the accuracy of the main task does not significantly decrease, the fairness of the classification results of the deep learning model is improved, facilitating the application of the deep learning model in people's production and life, and providing new ideas and guidance for researching more fair and responsible artificial intelligence technologies.
[0055] Corresponding to the embodiment of the data debiasing method based on biased neurons described above, the present invention also provides an embodiment of a data debiasing device based on biased neurons.
[0056] See Figure 2 , a data debiasing device based on biased neurons provided by an embodiment of the present invention includes one or more processors for implementing the data debiasing method based on biased neurons in the above embodiment.
[0057] The embodiment of the data debiasing device based on biased neurons of the present invention can be applied to any device with data processing capabilities, and the any device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a logically meaningful device, it is formed by the processor of any device with data processing capabilities where it is located reading the corresponding computer program instructions in the non-volatile memory into the memory for operation. From the hardware level, as Figure 2 shown, it is a hardware structure diagram of any device with data processing capabilities where the data debiasing device based on biased neurons of the present invention is located. In addition to the processor, memory, network interface, and non-volatile memory shown in FIG. 2, the any device with data processing capabilities where the device in the embodiment is located usually includes other hardware according to the actual functions of the any device with data processing capabilities, which will not be elaborated here.
[0058] The specific implementation process of the functions and roles of each unit in the above device is detailed in the implementation process of the corresponding steps in the above method, which will not be elaborated here.
[0059] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.
[0060] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the data debiasing method based on biased neurons in the above embodiment is implemented.
[0061] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capability and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.
[0062] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A data debiasing method based on bias neurons, It is characterized in that The following steps are involved: (1) obtaining original data and marking the category attributes in the original data to obtain a marked data set, which is recorded as data set X; the original data is a text data set with sensitive attributes; (2) Flip the sensitive attributes in dataset X to form dataset X′, and use dataset X and dataset X′ to filter biased neurons in the deep learning model; The step (2) specifically includes the following sub-steps: (2.1) The sensitive attributes in the dataset X are flipped to form a dataset X′, so that the sensitive attribute value of each sample in the dataset X′ is different from the sensitive attribute value of the corresponding sample in the dataset X, but all other attribute values are the same; the dataset X is {x 1 ,x 2 ,...x i ,...x N }, the data set X′ is {x 1 ′,x 2 ′,...x i ′,...x N ′}, N means there are N samples in the dataset X, x i represents the i-th sample in the data set X, i = 1, 2, ...i, ...N, x i and x i ′ have opposite sensitive attributes but the values of all other attributes are the same; for each sample x in the dataset X i And each sample x in the dataset X′ i ′ constitutes a sample instance pair (x i ,x i ′), all sample instance pairs constitute a new data set X * ; (2.2) The dataset X * Input to the deep model θ, wherein the deep model θ is a five-layer fully connected model; (2.3) Measure the activation values of the neurons at each corresponding position in the depth model θ twice, and normalize the two activation values; then select the neurons whose absolute value difference between the two activation values after normalization is greater than 0.3 as bias neurons; (3) Construct reverse data set; The step (3) specifically includes the following sub-steps: (3.1) The loss function of the biased neuron selected in step (2.3) in the deep model θ training is recorded as loss; (3.2) In the output layer of the deep model θ, for the input data x i Take the derivative and get the loss function loss for the data x i The gradient of , and multiply the gradient by the step size ε, plus the data x i , get the reverse data x i ″;x i The calculation process of ″ is as follows: where x i is the i-th sample in the data set X, ε = 0.001; (3.3) Repeat step (4.3) until the loss function of the deep model θ converges, thereby generating a new reverse data set X″ based on the reverse generation of the bias neuron, where the reverse data set X″ is {x 1 ″,x 2 ′′,...x i ″,...x N ''}; (4) Taking samples from the k-th reverse data set and expanding them into the data set X to synthesize an enhanced data set, the enhanced data set is then input into the deep model θ, and the deep model θ is trained until the classification accuracy of the deep model θ is greater than 80%, thus completing the debiasing; the deep model θ is a five-layer fully connected model, and the value of k is 30% to 50%.
2. Data debiasing device based on bias neurons, It is characterized in that It includes one or more processors for implementing the data debiasing method based on bias neurons as described in claim 1.
3. A computer-readable storage medium having a program stored thereon, It is characterized in that When the program is executed by a processor, it is used to implement the data debiasing method based on bias neurons as described in claim 1.
Citation Information
Patent Citations
Deep learning-oriented data depolarization method
CN114462466A
Depolarization method and device for generated deep learning model based on individual discrimination instance pair
CN114492830A