A Debiasing Method and Device for Deep Learning Models Based on Mask Masking

The image dataset is enhanced and trained through the mask masking method, and the mask mask shading framework model and deep learning model are constructed, which solves the bias problem of deep learning models on the image dataset and achieves a more fair and efficient debias effect.

CN115131816BActive Publication Date: 2025-07-18ZHEJIANG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210176362.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2025-07-18
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

The existing deep learning models have biases on image datasets, resulting in inaccurate classification results and lack of effective debiasing methods.

Method used

The mask masking method is used to enhance the image data set, and the mask mask masking framework model and deep learning model are constructed. The bias index function is defined through differential impact, demographic equality and equal opportunity indicators, and the model is trained to reduce bias.

Benefits of technology

It improves the fairness of the model, reduces labor costs, overcomes the problem of the existing methods' difficulty in modifying image data sets, and provides a more general bias index function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115131816B_ABST
    Figure CN115131816B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for debiasing a deep learning model based on mask masking. First, an original data set is selected and data preprocessing is performed; then, a bias metric function is defined based on differential impact, demographic parity, and equality of opportunity; then, a mask masking framework model is constructed and trained; then, the constructed mask masking framework model is used to perform data augmentation on the preprocessed original data set; finally, a deep learning model is constructed, and the deep learning model is trained using the data-augmented data set according to the defined bias metric function to complete debiasing. And the bias degree of the deep learning model can be detected using the bias metric function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of bias removal of deep learning models, and particularly to a method and device for removing bias of a deep learning model based on mask shielding. Background Art

[0002] Deep learning models have the powerful ability to learn the internal function rules of sample data sets and analyze abstract features. In recent years, they have assisted people in making decisions in many fields and provided solutions to many complex recognition and classification problems. Deep learning has achieved good results in fields such as bioinformatics, graphic image recognition, speech recognition, driverless cars, art creation, emotion recognition, natural language processing, banking, prisons, career assessment, and criminal justice sentencing. And with the continuous efforts of relevant scientific research staff, the efficiency of deep learning models has been continuously improved, and the application scope has become more extensive, having a more important impact on people's current daily lives.

[0003] The wide application of deep learning models has greatly improved the work efficiency and development speed in related fields. However, if the analysis results are biased, it will bring strong negative impacts to related fields, related individuals, and groups. Therefore, one of the research focuses of deep learning models is to improve the fairness of the model while ensuring the performance of the deep learning model and avoid generating related hazards. The reason for the bias of deep learning models is that in general deep learning, the model learns past experience to guide future tasks, that is, to make the prediction results as consistent with past experience as possible. However, the imperfection of the data set may cause the model to continuously accept the bias in the data set during the training process, resulting in the continuous accumulation of the bias of past experience in the model through training. Eventually, the trained model is affected by sensitive attributes, resulting in changes in the prediction results, and ultimately leading to the unfairness of the model. This unfairness may show discriminatory behavior towards specific groups, thus having an adverse impact on the application of deep learning in related fields.

[0004] The existing bias removal methods mainly target image and language data sets. In view of the problems caused by the bias of deep learning models and the lack of bias removal methods for image data sets in related fields, it is of extremely important theoretical and practical significance to study an unbiased model training method based on retraining the model to alleviate the bias degree of the model. Summary of the Invention

[0005] Aiming at the deficiencies of the prior art, the present invention proposes a method and device for removing bias of a deep learning model based on mask shielding.

[0006] To achieve the above object, the technical solution of the present invention is as follows:

[0007] The first aspect of the embodiment of the present invention provides a method for removing bias from a deep learning model based on mask masking, which specifically includes the following steps:

[0008] (1) Select the original data set and perform data preprocessing;

[0009] (2) Define a bias metric function based on the disparate impact, demographic parity, and equality of opportunity metrics;

[0010] (3) Construct and train a mask masking framework model:

[0011] (4) Use the mask masking framework model constructed in step (3) to perform data augmentation on the preprocessed original data set;

[0012] (5) Construct a deep learning model, use the data set augmented in step (4), and train the deep learning model according to the bias metric function defined in step (2) to complete bias removal.

[0013] Further, the original data set is the CelebFaces Attribute celebrity face attribute data set; the data preprocessing is specifically: perform size normalization on the images of the original data set, and bind each image with its gender label, whether curly hair label, and bounding box label, where gender is the sensitive attribute, whether curly hair is the label, and the bounding box label is used for data augmentation.

[0014] Further, the bias metric function defined in step (2) based on the disparate impact, demographic parity, and equality of opportunity metrics is specifically;

[0015] The mathematical calculation formula of the disparate impact metric is as follows:

[0016]

[0017] where S represents the protected attribute, S = 1 is the privileged group, and S ≠ 1 is the non-privileged group, represents a positive prediction;

[0018] The demographic parity is calculated through statistical parity, and the formula is as follows:

[0019]

[0020] The formula for the equality of opportunity metric is as follows:

[0021]

[0022] When a predictor satisfies the following formula, it is considered to satisfy equality of opportunity:

[0023] P{H(xi ) = 1 | y i = 1, x i ∈ S} = P{H(x j ) = 1 | y j = 1, x j ∈ X \ S}

[0024] Let X represent a set of individuals and S represent a group;

[0025] Fuse the above three bias indicators to synthesize the bias indicator function F(d). The specific expression is as follows:

[0026]

[0027] If the bias indicator of the model is measured by F(d), then change y to the output of the model The formula is as follows:

[0028]

[0029] That is, use the predicted value of the model as the classification for fairness analysis.

[0030] Furthermore, the smaller the bias indicator function F(d), the better the fairness of the data; the bias indicator function F(d) is used as an indicator to measure the bias degree of the data set.

[0031] Furthermore, the mask occlusion framework model is a self-supervised model, including an encoder and a decoder; among them, the feature extractor in the encoder uses 5 convolutional layers, the decoder uses a network composed of 2 deconvolutional layers, the activation function uses the Relu function, and the loss function uses the peak signal-to-noise ratio; the deep learning model is a supervised model; including a feature extractor and a classifier, among which the feature extractor uses 5 convolutional layers, and the classifier uses a network composed of 3 fully connected layers, and the activation function uses the Relu function.

[0032] Furthermore, the training of the mask occlusion framework model is specifically as follows:

[0033] Determine the position of the face in each picture according to the bounding box label in each picture of the original data set D. Divide the image of the face position in each picture into n * n grids, randomly select 40% - 60% of these grids for occlusion processing, and change all pixel values to 0; the processed data set is denoted as D’, and the order of each picture in the data set D’ is the same as that of D;

[0034] Use each picture in the data set D’ as the input, and the label of each picture in the data set D as the label, set the training batch, use Adam for optimization, use the peak signal-to-noise ratio as the loss function, and use the warm-up learning rate strategy to train the mask occlusion framework model.

[0035] Further, step (4) specifically includes the following sub-steps:

[0036] (4.1) Use the bounding box to mask the facial features of the picture;

[0037] Determine the position of the human face in each picture according to the bounding box label in each picture of the original dataset D. Divide the image at the position of the human face in each picture into b*b grids, randomly select 40-80% of these grids for masking processing, and change all pixel values to 0; to destroy the gender features of its face; Denote the processed dataset as D”.

[0038] (4.2) Use the mask masking framework model to reconstruct and enhance the masked image;

[0039] Input the images in the dataset D” into the mask masking framework model and save all outputs. Denote all the output pictures as the dataset ED_D, and retain the gender and whether curly hair labels corresponding to each picture in D.

[0040] Further, the training of the deep learning model is specifically as follows:

[0041] Set the size of the training batch, adopt the warm-up learning rate strategy for training, and use Adam as the optimizer for optimization. Use the data-augmented dataset ED_D to train the deep learning model; where cross-entropy is used as the loss function; the formula is as follows:

[0042] L1 = -[y·log(p)+(1 - y)·log(1 - p)]

[0043] Where y represents the label of the sample, 1 for curly hair and 0 for non-curly hair; P represents the probability that the sample is predicted to be curly hair;

[0044] Statistically calculate the output accuracy of the deep learning model; use the bias metric function F(d) defined in step (3) to judge the degree of model bias until the bias metric function F(d) reaches the preset degree of bias; when the accuracy and the degree of bias reach the preset values, the training of the deep learning model is completed and the debiasing is completed.

[0045] The second aspect of the embodiments of the present invention proposes a deep learning model debiasing device based on mask masking, including one or more processors for implementing the above-mentioned deep learning model debiasing method based on mask masking.

[0046] The third aspect of the embodiments of the present invention proposes a computer-readable storage medium, on which a program is stored. The program is characterized in that when it is executed by a processor, it is used to implement the above-mentioned deep learning model debiasing method based on mask masking.

[0047] The beneficial effects of the present invention are as follows: In view of the fact that there are few debiasing methods for existing image classification models, the present invention proposes a debiasing method and device for deep learning models based on mask masking; the method of the present invention proposes a more general bias metric function, overcoming the defect that existing evaluation metrics are not generally applicable to different data sets; the present invention enhances image data at the pixel scale, overcoming the problem that existing methods are difficult to modify image data sets; the method of the present invention performs data augmentation through a self-supervised model, reducing the labor cost in the data processing stage. Description of the Drawings

[0048] Figure 1 It is a flowchart of the method of the present invention;

[0049] Figure 2 It is a flowchart of data augmentation;

[0050] Figure 3 It is a schematic diagram of the device of the present invention. Detailed Embodiments

[0051] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0052] The terms used in the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "the" and "said" used in the present invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0053] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0054] The following will describe in detail the method and device for debiasing a deep learning model based on mask masking of the present invention. Without conflict, the features in the following embodiments and implementation manners can be combined with each other.

[0055] To solve the problem of inaccurate classification results caused by the bias problem in the deep learning model. This embodiment provides a method for debiasing a deep learning model based on data sample augmentation, as Figure 1 shown, the method for debiasing a deep learning model based on data sample augmentation includes the following steps:

[0056] The definition of the bias of the deep learning model is specifically: for a classification task, the phenomenon that the classification model is affected by irrelevant but sensitive features when making a decision, and its decision may rely on this incorrect feature association is defined as the bias behavior of the model. The embodiments of the present invention mainly focus on gender bias. Among them, the sensitive feature is the bias feature. Therefore, the present invention reduces the bias of the model by alleviating the influence of sensitive features.

[0057] (1) Dataset preparation and preprocessing.

[0058] (1.1) In the embodiments of the present invention, the celeb dataset is used as the initial sample set:

[0059] In this embodiment, a dataset with sensitive features is selected as the initial sample set, and one of the bias labels B is used as the bias feature, such as the gender feature. The embodiments of the present invention use the celeb dataset as the target domain dataset for the debiasing method based on mask masking. CelebA is the abbreviation of CelebFaces Attribute, which means the Celebrity Faces Attribute dataset. It contains 202,599 face images of 10,177 celebrity identities. Each image is marked with features, including a face bounding box annotation box, the coordinates of 5 face feature points, and 40 attribute markings. In this example, the gender attribute in the dataset is mainly used as the sensitive attribute, and whether the hair is curly is used as the prediction target of the main task.

[0060] However, through investigation and research, it is found that there is a bias in the celeb dataset for the sensitive attribute of gender. Among them, men are more likely to be classified as non-curly hair compared to women.

[0061] (1.2) Dataset preprocessing:

[0062] The CelebA dataset is a dataset of face images crawled from the Internet without any cropping or scaling operations. To ensure that the model can fully extract the features of the data while retaining as much information as possible to ensure the accuracy of the model's prediction of the main task, the images in the dataset are size-normalized. In the embodiments of the present invention, the size of all images is changed to 128*128 through a scaling method, and the pixel values of each scaled image are normalized to exclude the influence of shooting brightness and darkness on the model prediction. Each image is bound to its gender label, whether curly hair label, and bounding box label (coordinates of the face bounding box), where gender is a sensitive attribute, whether curly hair is a label, and the bounding box label is used for subsequent data augmentation processes. In this example, the processed dataset is denoted as D. D is divided into a training set and a test set according to a custom ratio.

[0063] (2) Define the bias metric function

[0064] In the present invention, a bias metric is used to evaluate the bias degree of the model and samples. A new bias metric function F(d) is designed according to three commonly used bias metric functions in related fields, where the dataset d is used as the independent variable of the function. F(d) has the advantage of being useful for different datasets, overcoming the defect that existing evaluation metrics are not generally applicable to different datasets, that is, the measurement results of using a single bias metric for multiple different datasets may not be judgmental. The existing commonly used bias metrics are as follows:

[0065] (2.1) Disparate impact

[0066] This definition represents the legal concept of different impacts mathematically. This requires a high ratio between the positive prediction rates of two groups. This ensures that the ratios of positive predictions in each group are similar. For example, if a positive prediction represents a higher income, this condition requires that the ratios of accepted applicants are similar among different groups. Its mathematical calculation formula is as follows:

[0067]

[0068] Where S represents the protected attribute (such as gender), S = 1 is the privileged group, and S ≠ 1 is the non-privileged group. represents a positive prediction. Note that, If represents acceptance (for example, for a job), then this condition requires that the acceptance rates of different groups are similar. The higher the value of this metric, the more similar the ratios of different groups are, and thus the fairer it is.

[0069] (2.2) Demographic parity

[0070] The measurement method of demographic parity is similar to the disparate impact method, but this method uses differences instead of ratios. This method is usually also called statistical parity. Its mathematical calculation formula is as follows:

[0071]

[0072] The lower this metric value, the more similar the acceptance rates are, and thus the better the fairness.

[0073] (2.3) Equal opportunity

[0074] Equal opportunity requires that the true positive rates (TPRs) be similar across different groups (meaning that an individual with a positive outcome is likely to correspond to a positive prediction). This method is similar to equal odds but only focuses on the true positive rate. Its mathematical calculation formula is as follows:

[0075]

[0076] A predictor is considered to satisfy equal opportunity when the following holds:

[0077] P{H(x i ) = 1|y i = 1, x i ∈S} = P{H(x j ) = 1|y j = 1, x j ∈X\S}

[0078] Let X represent a group of individuals, and S represent a subgroup. For an individual x i ∈X, let it be the true outcome (or label) to be predicted. A predictor can be represented by a mapping H: X → Y from the population X to the set of outcomes Y, such that H(x i ) is the predicted outcome of individual x i . i and j represent two individuals.

[0079] (2.4) Define the bias function F(d)

[0080] Improve and fuse the above 3 bias indicators to synthesize the bias indicator function F(d). The specific expression is:

[0081]

[0082] The smaller F(d) is, the better the fairness of the data. In the present invention, F(d) will be used as an indicator to measure the bias degree of the data set.

[0083] If F(d) is used to measure the bias indicator of the model, then change y to the output of the model

[0084]

[0085] Use the predicted value of the ready-to-use model as the classification for fairness analysis.

[0086] (3) Train the mask occlusion framework model:

[0087] (3.1) Construct the mask occlusion framework model

[0088] The mask occlusion framework model is a self-supervised model, and both the input and output of the model are images with a size of 128*128. In this embodiment, the constructed mask occlusion framework model includes two parts: an encoder and a decoder (Encoder-Decoder). Among them, the feature extractor in the encoder uses 5 convolutional layers, and the decoder uses a network composed of 2 transposed convolutional layers. The activation function uses the Relu function. Use the training set of the original dataset D to train the deep learning model. Among them, the peak signal-to-noise ratio is used as the loss function.

[0089] (3.2) Train the mask occlusion framework model constructed in step (3.1)

[0090] (3.2.1) Divide the face into grids

[0091] Determine the position of the face in each picture according to the bounding box label in each picture of the dataset D. Divide the image of the face position in each picture into a*a (a is a custom value, which is taken as 6*6 in the embodiment of the present invention) grids, and randomly select 40% - 60% (which is taken as 18 in the embodiment of the present invention) of these grids for occlusion processing, and change all the pixel values to 0. The processed dataset is denoted as D'. During the process, ensure that the order of each picture in D' is the same as that in D.

[0092] (3.2.2) Randomly occlude the image according to the grid and input it into the model

[0093] Use each picture in D' as the input, and each picture in D as the label. Set the size of the training batch to 100. Adopt the warm-up learning rate strategy in the training stage, and use Adam as the optimizer for optimization. The loss function adopts the form of peak signal-to-noise ratio (PSNR), and the formula is as follows:

[0094]

[0095] Among them, K(i,j) is the pixel value corresponding to the output result of the model, I(i,j) is the pixel value corresponding to the label, MAXI is the maximum value representing the color of the image point, m and n are the width and height of the image respectively. In this example, both the width and height of the image are 128. Use the validation set for validation, and stop when the accuracy of the model reaches the preset standard.

[0096] (4) Perform data augmentation:

[0097] (4.1) Use the bounding box to mask the facial features of the picture

[0098] Determine the position of the human face in each picture according to the bounding box label in each picture of the dataset D. Divide the image of the human face position in each picture into b*b (b is a custom value, 6*6 is taken in the embodiment of the present invention) grids, and randomly select 40-80% (26 is taken in the embodiment of the present invention) of these grids for masking processing, and change all pixel values to 0. To destroy the gender characteristics of its face. Denote the processed dataset as D”.

[0099] (4.2) Use the mask masking framework model to reconstruct and enhance the masked image

[0100] Input the images in the dataset D” into the mask masking framework model and retain all outputs. Denote all the output pictures as the dataset ED_D, and retain the gender and whether curly hair labels corresponding to each picture in D. Divide the dataset ED_D into a training set and a test set.

[0101] (5) Construct a deep learning model, use the dataset ED_D after data augmentation in step (4), and train the deep learning model according to the bias metric function F(d) defined in step (2) until the preset accuracy and bias degree are obtained, and the debiasing is completed.

[0102] The deep learning model is a supervised model. The input of the model is a picture with a size of 128*128, and whether it has curly hair is used as the label. In this embodiment, the constructed deep learning model includes two parts: a feature extractor and a classifier. Among them, the feature extractor uses 5 convolutional layers, and the classifier uses a network composed of 3 fully connected layers, and the activation function uses the Relu function.

[0103] The size of the training batch is set to 100. In the training stage, the warm-up learning rate strategy is adopted, and the optimizer is optimized by Adam. Use the training set of the dataset ED_D to train the deep learning model. Among them, cross-entropy is used as the loss function. The formula is as follows:

[0104] L1 = -[y·log(p)+(1 - y)·log(1 - p)]

[0105] Where y represents the label of the sample (lable), 1 for curly hair and 0 for non-curly hair. P represents the probability that the sample is predicted to have curly hair. Use the validation set to evaluate the model until the accuracy of the validation set reaches the requirement of more than 95%.

[0106] Select 100 males from the sample set D, among which 50 have curly hair and 50 do not have curly hair, and 100 females, among which 50 have curly hair and 50 do not have curly hair. Construct the validation set V_D, input the validation set V_D into the model, and use the bias index function F(d) defined in step (3) to judge the degree of model bias until the bias index function F(d) reaches the preset degree of bias. In the embodiment of the present invention, the degree of bias is set to 0.1 to 0.01.

[0107] When the accuracy and the degree of bias reach the preset values, the training of the deep learning model is completed and the debiasing is completed.

[0108] Corresponding to the foregoing embodiment of the deep learning model debiasing method based on mask masking, the present invention also provides an embodiment of a deep learning model debiasing device based on mask masking.

[0109] See Figure 3 , an embodiment of a deep learning model debiasing device based on mask masking provided by the embodiment of the present invention includes one or more processors for implementing the deep learning model debiasing method based on mask masking in the foregoing embodiment.

[0110] The embodiment of the deep learning model debiasing device based on mask masking 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 by software, or by 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 reading the corresponding computer program instructions in the non-volatile memory into the memory for operation. From the hardware level, as Figure 3 shown, it is a hardware structure diagram of any device with data processing capabilities where the deep learning model debiasing device based on mask masking of the present invention is located. In addition to Figure 3 the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities where the device in the embodiment is located usually also includes other hardware according to the actual functions of the any device with data processing capabilities, which will not be elaborated here.

[0111] The implementation processes of the functions and roles of each unit in the above device are specifically detailed in the implementation processes of the corresponding steps in the above method, which will not be elaborated here.

[0112] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the descriptions of the method embodiments. The device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the present invention. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0113] An embodiment of the present invention also provides a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, the method for debiasing a deep learning model based on mask masking in the above embodiments is implemented.

[0114] The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium may also be any device with data processing capabilities, such as a plug-in hard disk, a Smart Media Card (SMC), an SD card, a Flash Card, etc. equipped on the device. Further, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capabilities 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 capabilities, and can also be used to temporarily store the data that has been output or will be output.

[0115] The above embodiments are only used to illustrate the design concept and features of the present invention, and the purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, all equivalent changes or modifications made according to the principles and design concepts disclosed in the present invention are within the protection scope of the present invention.

Claims

1. A method for debiasing a deep learning model based on mask masking, characterized in that Specifically, it includes the following steps: (1) Select the original dataset and perform data preprocessing; (2) Define the bias metric function based on the disparate impact, demographic parity, and equality of opportunity metrics, specifically; The mathematical calculation formula of the disparate impact metric is as follows: Where S represents the protected attribute, S = 1 for the privileged group, and S ≠ 1 for the non - privileged group. Indicates a positive prediction. The demographic parity is calculated through statistical parity, and the formula is as follows: The formula for the equality of opportunity metric is as follows: A predictor is considered to satisfy equality of opportunity when it satisfies the following formula: P{H(x i ) = 1|y i = 1, x i ∈S} = P{H(x j ) = 1|y j = 1, x j ∈X\S} Let X represent a group of individuals and S represent a group; Fuse the above three bias metrics to synthesize the bias metric function F(d), and the specific expression is: If the bias index of the model is measured by F(d), then change y to the output of the model The formula is as follows: That is, use the predicted value of the model as the classification for fairness analysis; (3) Construct and train the masked framework model: The masked framework model is a self-supervised model, including an encoder and a decoder; among them, the feature extractor in the encoder uses 5 convolutional layers, the decoder uses a network composed of 2 deconvolutional layers, the activation function uses the Relu function, and the loss function uses the peak signal-to-noise ratio; the deep learning model is a supervised model; It includes a feature extractor and a classifier, among which the feature extractor uses 5 convolutional layers, and the classifier uses a network composed of 3 fully connected layers, and the activation function uses the Relu function; (4) Use the masked framework model constructed in step (3) to perform data augmentation on the preprocessed original dataset; (5) Construct a deep learning model, use the dataset augmented in step (4), and train the deep learning model according to the bias metric function defined in step (2) to complete debiasing.

2. The method for debiasing a deep learning model based on mask shielding according to claim 1, wherein The original dataset is the CelebFaces Attribute face attribute dataset; the data preprocessing is specifically: perform size normalization on the images of the original dataset, bind each image with its gender label, whether it has curly hair label, and bounding box label, where gender is the sensitive attribute, whether it has curly hair is the label, and the bounding box label is used for data augmentation.

3. The method for debiasing a deep learning model based on mask shielding according to claim 1, wherein The smaller the bias metric function F(d), the better the fairness of the data; the bias metric function F(d) is used as an indicator to measure the degree of bias of the dataset.

4. The method for debiasing a deep learning model based on mask occlusion according to claim 1, wherein The training of the masked framework model is specifically: Determine the position of the face in each picture according to the bounding box label in each picture of the original dataset D, divide the image at the face position in each picture into n*n grids, randomly select 40% - 60% of these grids for masking processing, and change all pixel values to 0; the processed dataset is denoted as D', and the order of each picture in the dataset D' is the same as that of D; Use each picture in the dataset D' as the input, and the label of each picture in the dataset D as the label, set the training batch, use Adam for optimization, use the peak signal-to-noise ratio as the loss function, and use the warm-up learning rate strategy to train the masked framework model.

5. The method for debiasing a deep learning model based on mask shielding according to claim 2, wherein Step (4) specifically includes the following sub-steps: (4.1) Use the bounding box to mask the facial features of the picture; Determine the position of the face in each image according to the bounding box label in each image of the original dataset D, divide the image of the face position in each image into b*b grids, randomly select 40-80% of these grids for masking processing, and change all pixel values to 0 to destroy the gender characteristics of the face; denote the processed dataset as D”; (4.2) Use the mask masking framework model to reconstruct and enhance the masked image; Input the images in the dataset D” into the mask masking framework model and save all outputs. Denote all the output images as the dataset ED_D, and retain the gender and whether curly hair labels corresponding to each image in D.

6. The method for debiasing a deep learning model based on mask shielding according to claim 1, wherein The training of the deep learning model is specifically as follows: Set the size of the training batch, adopt the warm-up learning rate strategy for training, and use Adam as the optimizer for optimization; use the dataset ED_D after data augmentation to train the deep learning model; where cross-entropy is used as the loss function; the formula is as follows: L1 = -[y·log(p)+(1-y)·log(1-p)] where y represents the label of the sample, 1 for curly hair and 0 for non-curly hair; P represents the probability that the sample is predicted to be curly hair; Statistically calculate the output accuracy of the deep learning model; use the bias metric function F(d) defined in step (3) to judge the degree of model bias until the bias metric function F(d) reaches the preset degree of bias; when the accuracy and the degree of bias reach the preset values, the training of the deep learning model is completed and the debiasing is completed.

7. A deep learning model debiasing device based on mask shielding, characterized in that, Comprising one or more processors for implementing the debiasing method of the deep learning model based on mask masking according to any one of claims 1-6.

8. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it is used to implement the debiasing method of the deep learning model based on mask masking according to any one of claims 1-6.

Citation Information

Patent Citations

  • Pedestrian re-identification method and device based on semi-supervised training mode and medium

    CN110555390A

  • Deep learning model depolarization method and device based on data sample enhancement

    CN113361653A