T HROUGH A FAIR L OOKING -G LASS : M ITIGATING B IAS IN I MAGE DATASETS
Amirarsalan Rajabi†, Mehdi Yazdani-Jahromi†, Ozlem Ozmen Garibay†, Gita Sukthankar††Department of Computer Science, University of Central Florida

An Important Problem

Results

Interpretation and Conclusion

Bias in computer vision is a major problem, often stemming from the training
datasets used for computer vision models [6]. This work addresses the issue ofa decision-making process being dependent on protected attributes, where thisdependence should ideally be avoided. We propose a model to reconstruct an image dataset to reduce statistical dependency between a protected attribute andtarget attribute. We modify a U-net [5] to reconstruct the image dataset and apply
the Hilbert-Schmidt norm of the cross-covariance operator [2] between reproducing kernel Hilbert spaces of the target attribute and the protected attribute, as ameasure of statistical dependence.

After removing the attributes with less than 5% positive images, the remaining 26 attributes
are categorized into three groups. inconsistently-labeled, gender-dependent, and genderindependent attributes. For attribute classifiers, we use ResNet-18 pre-trained on ImageNet, in which the last layer is replaced with a layer of size one, along with a Sigmoid activation for binary classification. We compare our results with Ramaswamy et al.’s method,
described in their paper ‘Fair Attribute Classification through Latent Space De-biasing’ [4],and ‘explicit removal of biases from neural network embeddings’, presented in [1].

For each attribute, we record two values, namely HSIC value between that attribute and the Attractive attribute, and the change in demographic parity. Tocalculate the change in demographic parity, we first calculate the demographic
parity of the classifier for that specific attribute, when the classifier classifies theoriginal testing set images. We then calculate the demographic parity of the classifier for that specific attribute, when the classifier receives the modified training
images Ours(5,0.07). We then subtract the two values, to get the change indemographic parity for that specific attribute. The results show that the absolutechange in demographic parity is positively correlated with that attribute’s statistical dependence with the attribute Attractive, with a Pearson correlation coefficient of 0.757. For instance, we observe large changes in demographic parity for attributes such as Young, Big_Nose, Pointy_Nose, Oval_Face, andArched_Eyebrows, as they are typically associated with being attractive, andtherefore reflected in the CelebA dataset labels.

Methodology
Consider a dataset D = (X , S, Y), where X is the set of images, Y = {+1, −1} isthe target attribute such as attractiveness, and S = {A, B, C, ...} is the protected
attribute such as gender. Assume there exists a classifier f : (X ) → Y , such thatthe classifier’s prediction for target attribute is not independent from the protected
attribute, i.e. f (X ) ̸⊥ S . Our objective is to design a transformation g : X →Xe, such that 1) f (Xe) ⊥ S , i.e. the classifier’s predictions for target attribute isindependent of the protected attribute , and 2) f (Xe) ≈ f (X ), i.e. the classifier
still achieves high accuracy.
We seek to modify a set of images, such that 1) the produced images are close
to the original images, and 2) the predicted target attribute is independent fromthe predicted protected attribute. In the optimization problem, image quality (1)is measured by pixel-wise MSE loss. For independence (2), consider our U-net
network as a mapping from original image to the transformed image, i.e. Uw (x) =e. Consider also a function h : X → [0, 1]×[0, 1], where h(xi) = (h1(xi), h2(xi)) =x(P(yi = 1|xi), P(si = 1|xi)). Our objective is to train the parameters of Uw suchthat h1(Uw (x))h2(Uw (x)), i.e. h1(Uw (x)) is independent of h2(Uw (x)) .
e representing the transGiven X representing a batch of N training images and X
formed batch, our formal optimization problem is as follows:

Fig. 1: Model consists of an encoder-decoder (U-net) and a double-output pre-trained ResNet classifier. First, the output batch of
the U-net (reconstructed images) is compared with the original batch of images by calculating MSE loss. Then, the output batch of
the U-net passes through the ResNet and statistical dependency of the two vectors is calculated by HSIC. Detailed architecture ofthe U-net is described in the supplementary material.

NXX1enijk )2
minimize(xnijk − xN CW HUw
n=1 i,j,k|{z}image accuracy(1)e h2(X))
e+ λ × HSIC(h(X),1|{z}independence

where N is the number of samples, C is the number of channels of an image, W
is the width of an image, H is the height of an image, and λ is the parameter thatcontrols the trade-off between accuracy of the transformed images and independence (fairness). In practice, the mapping function Uw that we use is a U-net, thefunction h(·) is a pre-trained classifier with two outputs h1 and h2, each being theoutput of a Sigmoid function within the range of [0, 1], where h1 = P(Y = 1|X) (avector of size N ), and h2 = P(S = 1|X) (also a vector of size N ), and HSIC(·, ·)denotes Hilbert-Schmidt Independence Criteria.

In evaluating the results of our model with the baseline models, three metrics are used. To
capture the accuracy of the classifiers, we measure the average precision (AP). To measurefairness, we use demographic parity (DP). This metric captures the disparity of receiving apositive decision among different protected groups (|P (Ŷ = 1|S = 0) − P (Ŷ = 1|S = 1)|),and difference in equality of opportunity (DEO), i.e. the absolute difference between thetrue positive rates for both gender expressions (|T P R(S = 0) − T P R(S = 1)|).

References
Fig. 2: Comparing the results of our model with Baseline, GAN debiasing (GanDeb), and Adversarial debiasing (AdvDb). Showing
AP (Average Precision, higher the better), DP (Demographic Parity, lower the better), and DEO (Difference in Equality ofExperiments

Opportunity, lower the better) values for each attribute category. Each number is the average over all attributes within that specificattribute category.

we test the methodology described in Section Methodology on CelebA dataset[3]. CelebA is a popular dataset that is widely used for training and testing models
for face detection, particularly recognising facial attributes. It consists of 202,599
face images of celebrities, with 10,177 identities. Each image is annotated with 40
different binary attributes describing the image. The CelebA dataset is reported
to be biased. In this experiment, we consider Male attribute as the protectedattribute (with Male = 0 showing the image does not belong to a man and Male =1 showing the image belongs to a man), and Attractive to be the target attribute.

The proposed model showed promising results in mitigating bias while maintaining high precision for classifiers. An interesting aspect of the results is that
although we only explicitly train the U-net to remove dependence between thetarget attribute (Attractive) and the protected attribute (Male), classifiers related to many other attributes, most of which have a statistical dependency withthe target attribute, become ‘fairer’. An advantage of the proposed model is thatit does not rely on modifying downstream classifiers, and rather includes only
modifying the input data, hence making it suitable to be deployed in an automated machine learning pipeline more easily and with lower cost.

The results show that Ours (our model) is close to GanDeb in terms of maintaining high average precision scores, which means higher accuracy of prediction, while beating GanDebin terms of fairness metrics. Also, while AdvDb performance in terms of fairness enforcement is better than ours in 3 out of 6 cases, it falls behind significantly in terms of average
precision.

[1] Mohsan Alvi, Andrew Zisserman, and Christoffer Nellåker. “Turning a blind eye: Explicit
removal of biases and variation from deep neural network embeddings”. In: Proceedings ofthe European Conference on Computer Vision (ECCV) Workshops. 2018, pp. 0–0.
[2] Arthur Gretton et al. “Measuring statistical dependence with Hilbert-Schmidt norms”. In:International conference on algorithmic learning theory. Springer. 2005, pp. 63–77.
[3] Ziwei Liu et al. “Deep Learning Face Attributes in the Wild”. In: Proceedings of International
Conference on Computer Vision (ICCV). Dec. 2015.
[4] Vikram V Ramaswamy, Sunnie SY Kim, and Olga Russakovsky. “Fair attribute classification
through latent space de-biasing”. In: Proceedings of the IEEE/CVF Conference on Computer
Vision and Pattern Recognition. 2021, pp. 9301–9310.
[5] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. “U-net: Convolutional networks forbiomedical image segmentation”. In: International Conference on Medical image computing
and computer-assisted intervention. Springer. 2015, pp. 234–241.
[6] Tatiana Tommasi et al. “A deeper look at dataset bias”. In: Domain adaptation in computer
vision applications. Springer, 2017, pp. 37–55.