{'fraction_non_alphanumeric': 0.026955801520969807, 'fraction_numerical': 0.008131917777275807, 'mean_word_length': 5.136059136059136, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Joint Adversarial Learning for Cross-domain Fair Classification

Modern machine learning (ML) models are becoming increasingly popular and are widely used in decision-making systems. However, studies have shown critical issues of ML discrimination and unfairness, which hinder their adoption on high-stake applications. Recent research on fair classifiers has drawn significant attention to develop effective algorithms to achieve fairness and good classification performance. Despite the great success of these fairness-aware machine learning models, most of the existing models require sensitive attributes to preprocess the data, regularize the model learning or postprocess the prediction to have fair predictions. However, sensitive attributes are often incomplete or even unavailable due to privacy, legal or regulation restrictions. Though we lack the sensitive attribute for training a fair model in the target domain, there might exist a similar domain that has sensitive attributes. Thus, it is important to exploit auxiliary information from the similar domain to help improve fair classification in the target domain. Therefore, in this paper, we study a novel problem of exploring domain adaptation for fair classification. We propose a new framework that can simultaneously estimate the sensitive attributes while learning a fair classifier in the target domain. Extensive experiments on real-world datasets illustrate the effectiveness of the proposed model for fair classification, even when no sensitive attributes are available in the target domain.


Introduction
The recent development of machine learning models has been increasingly used for high-stake decision making such as filtering loan applicants [15], deploying police officers [27], etc. However, a prominent concern is when a learned model has bias against some specific demographic group such as race or gender. For example, a recent report shows that softwares used by schools to filter student applications may be biased to specific race group 3 ; and COMPAS [29], a tool for crime prediction, is shown to be more likely to assign a higher risk score to African-American offenders than to Caucasians with the same profile. Bias in algorithms can emanate from unrepresentative or incomplete training data, or the flawed information that reflects historical inequalities [8], which can lead to unfair decisions that have a collective and disparate impact on certain groups of people. Therefore, it is important to ensure fairness in machine learning models.
Recent research on fairness machine learning has drawn significant attention to develop effective algorithms to achieve fairness and maintain good prediction performance [3]. However, the majority of these models require sensitive attributes to preprocess the data, regularize the model learning or postprocess the prediction to have fair predictions. For example, Kamiran et al. propose to assign the weights of each training sample differently by reweighting to ensure fairness before model training [18]. In addition, Madras et al. utilize adversarial training on sensitive attributes and prediction labels for debiasing classification results [25]. However, sensitive attributes are often incomplete or even unavailable due to privacy, legal, or regulation restrictions. For example, by the law of the US Consumer Financial Protection Bureau (CFPB), creditors may not request or collect information about an applicant's race, color, sex, etc 4 .
Although we lack the sensitive attribute for training a fair model in the target domain, there might exist a similar domain that has sensitive attributes, which paves us a way to transfer the knowledge from the source domain to ensure the fairness in the target domain. For example, as shown in Fig. 1, when historical features and labels are available for credit risk assessment, while user demographics (e.g., gender) are unknown when expanding into new markets, the provider may learn models from its existing market data in the source domain to transfer the information of sensitive attributes to the new market in the target domain. Though there are extensive work on domain adaptation, they are overwhelmingly on classification or knowledge transfer [40,32]; while the work on fairness classification through domain adaptation is rather limited. Recent advancement of unsupervised domain adaptation [10,34] have shown promising results for adapting a classifier on source domain to the unlabeled data of the target domain. Although promising, unsupervised domain adaptation is not explored for fair classifiers.
Therefore, we propose to investigate an unsupervised domain adaptation framework to transfer the fairness without sensitive attributes in the target domain. In essence, we investigate the following challenges: (1) how to estimate the sensitive attributes in the target domain by transferring knowledge from the source domain; and (2) how to predict the labels accurately and satisfy fairness criteria. It is non-trivial to estimate the sensitive attributes in the target domain since there are domain discrepancies across domains and no anchor linkages are explicitly available for knowledge transferring. Our solutions to these challenges result in a novel framework called FairDA for fairness classification via domain adaptation. Our main contributions are summarized as follows: -We study a novel problem of fair classification via domain adaptation.
-We provide a new framework FairDA that simultaneously transfers knowledge to estimate sensitive attributes and learns a fair classifier in the target domain with a dual adversarial learning approach. -We conduct theoretic analysis demonstrating the fairness in the target domain can be achieved with estimated sensitive attributes derived from the source domain. -We perform extensive experiments on real-world datasets to demonstrate the effectiveness of the proposed method for fair classification without sensitive attributes.

Problem Statement
We first introduce the notations of this paper, and then give the formal problem definition. Let D 1 = {X 1 , A 1 , Y 1 } denote the data in the source domain, where X 1 , A 1 , and Y 1 represent the set of data samples, sensitive attributes, and corresponding labels. Let D 2 = {X 2 , Y 2 } be the target domain, where the sensitive attributes of the target domain are unknown. The data distributions in the source and target domains are similar but different with the domain discrepancy. Following existing work on fair classification [3,26], we evaluated fairness performance using metrics such as equal opportunity and demographic parity. Without loss of generality, we consider binary classification. Equal opportunity requires that the probability of positive instances with arbitrary sensitive attributes A being assigned to a positive outcome are equal: , whereŶ is predicted label. Demographic parity requires the behavior of prediction model to be fair on different sensitive groups. Concretely, it requires that the positive rate across sensitive attributes are equal:  3 FairDA: Fair Classification with Domain Adaptation In this section, we present the details of the proposed framework for fair classification with domain adaptation. As shown in Figure 2, our framework consists of two major modules: (1) an adversarial domain adaptation module that estimates sensitive attributes for the target domain; and (2) an adversarial debiasing module to learn a fair classifier in the target domain. Specifically, first, the adversarial domain adaptation module contains a sensitive attribute predictor f θ A that describes the modeling of predicting sensitive attributes and a domain classifier f θ d that illustrates the process of transferring knowledge to the target domain for estimating sensitive attributes. In addition, the adversarial debiasing module consists of a label predictor f θ Y that models the label classification in the target domain, and a bias predictor f θa to illustrate the process of differentiating the estimated sensitive attributes from the target domain data.

Estimating Target Sensitive Attributes
Since the sensitive attributes in the target domain are unknown, it is necessary to estimate the target sensitive attributes to build fair classifiers. Recent advancement of unsupervised domain adaptation has shown promising results to adapt a classifier on a source domain to the unlabeled data to the target domain [10]. Therefore, we propose to investigate an unsupervised domain adaptation framework to infer the sensitive attributes in the target domain. Specifically, to minimize the prediction error of sensitive attributes in the source domain, we aim to optimize the following objective function: where f θ A is used to predict sensitive attributes, denotes the loss function to minimize prediction error, such as cross-entropy loss, and the embedding function h 1 (·) is to learn the representation for predicting sensitive attributes.
To ensure that f θ A trained on D 1 can well estimate the sensitive attributes of D 2 . We further introduce a domain classifier f θ d to make the representation of source and target domains in the same feature space. Specifically, f θ d aims to differentiate if a representation is from the source or the target; while h 1 (·) aim to learn a domain-invariant representation that can fool f θ d , i.e., where θ d are the parameters of the domain classifier. The overall objective function for this module is a minmax game between the sensitive attributes predictor f θ A and the domain classifier f θ d as follows: where α control the importance of the adversarial learning of the domain classifier. To estimate the sensitive attributes in the target domain, we will utilize the following function:

Adversarial Debiasing for Fair Classification
To learn a fair classifier for the target domain, we will leverage the derived sensitive attributesÂ 2 and the labels Y 2 in the target domain. Specifically, we aim to learn representation that can predict the labels accurately, while being irrelevant to sensitive attributes. To this end, we propose to feed the representation into a label predictor and a bias predictor. Specifically, the label predictor is to minimize the predict errors of the labels with the following objective function: where f θ Y is to predict the labels, h 2 (·) is an embedding layer to encode the features into a latent representation space, and is a cross-entropy loss. Furthermore, to learn fair representations and make fair predictions in the target domain, we incorporate a bias predictor to predict the sensitive attributes; while h 2 (·) trying to learn the representation that can fool f θ Y : where θ a are the parameters for the adversary to predict sensitive attributes. Finally, the overall objective function of adversarial debiasing for fair classification is a minmax function: where β control the importance of the bias predictor.

The Proposed Framework: FairDA
We have introduced how we can estimate sensitive attributes by adversarial domain adaptation, and how to ensure fair classification with adversarial debiasing. We integrate the components together and the overall objective function of the dual adversarial learning is as follows: The parameters in the objective are learned through RMSprop, which is an adaptive learning rate method that divides the learning rate by an exponentially decaying average of squared gradients. We choose RMSprop as the optimizer because it is a popular and effective method to determine the learning rate abortively, which is widely used for training neural networks. We will also prioritize the training of f θ A to ensure a good estimation ofÂ 2 . Next, we will conduct a theoretic analysis on the dual adversarial learning for fairness guarantee.

A Theoretic Analysis on Fairness Guarantee
In this section, we perform a theoretic analysis of the fairness guarantee under the proposed framework FairDA with key assumptions. The model essentially contains two modules: (1) the adversarial domain adaptation for estimating sensitive attributes (L 1 in Eqn. 3); and (2) the adversarial debiasing for learning a fair classifier (L 2 in Eqn. 6). The performance of the second module is relying on the output (i.e.,Â 2 ) of the first module.
To understand the theoretic guarantee for the first module, we follow the recent work on analyzing the conventional unsupervised domain adaptation [24,37].
The majority of them consider the model effectiveness under different types of domain shifts such as label shift, convariate shift, conditional shift, etc [24,21]. We assume that there exists a sensitive attribute shift across two domains, i.e., the prior distribution changes as p(A 1 ) = p(A 2 ). In addition, in our empirical application (see Table 1 in Section 5), we can assume that the condition probability holds, i.e., p(X 1 |A 1 ) = p(X 2 |A 2 ). For example, in the COMPAS data, the distribution of sensitive attributes may be different for different age groups, while the inherent relationship between the individual features and the sensitive attribute may remain the same. Under the assumption of the sensitive attribute shift, we can derive the risk in the target domain as [21]: where the ratio p(A 2 )/p(A 1 ) represents the change in the proportions in the sensitive attribute. Since we do not have samples with sensitive attributes from the target domain, we can use the samples drawn from the source distribution to estimate the target sensitive attributes distribution with mean matching [13] by minimizing the following function . µ 2 is the encoded feature means for the target. We will incorporate the above strategy for estimating the target sensitive attribute proportions with gradient descent during the adversarial training [23].

Experiments
In this section, we present the experiments to evaluate the effectiveness of FairDA.
We aim to answer the following research questions (RQs): -RQ1: Can FairDA obtain fair predictions without accessing sensitive attributes in the target domain? -RQ2: How can we transfer fairness knowledge from the source domain while effectively using it to regularize the target's prediction? -RQ3: How would different choices of the weights of the two adversarial components impact the performance of FairDA?

Datasets
We conduct experiments on two publicly available benchmark datasets for fair classification: COMPAS [17] and Adult [2].
-COMPAS 5 : This dataset describes the task of predicting the recidivism of individuals in the U.S. -ADULT 6 : This dataset contains records of personal yearly income, and the label is whether the income of a specific individual exceed 50k or not.
For each of the original datasets, we first define a proper filter to group the dataset into the source domain and the target domain. For example, in the COMPAS data, we assume that the individuals whose ages less than 24 are not allowed to collect the sensitive attributes (e.g., sex and race). Similarly, for the ADULT data, we consider the sex of each individual is the sensitive attribute, and define two filters based on the working class and country to derive the source and target domains. The evaluation of all models are measured by the performance on target dataset. The statistics of the datasets are shown in Table 1.

Experimental Settings
Baselines Since there is no existing work on cross-domain fair classification, we compare our proposed FairDA with the following representative methods in fair classification without sensitive attributes. We also compare the vanilla model as the lower bound of fairness performance.
-Vanilla: This method directly train a base classifier without explicitly regularizing on the sensitive attributes. Configurations For KSMOTE 7 and FairRF 8 , we directly use the code provided by the authors. For all other approaches, we adopt a three-layer multi-layerperceptron (MLP) as the base classifier. We set the two hidden dimensions of MLP as 64 and 32, and use Adam optimizer with 0.001 as initial learning rate.
Evaluation Metrics Following existing work on fair models, we measure the classification performance with Accuracy (ACC) and F1, and the fairness performance based on Demographic Parity and Equal Opportunity [26]. We consider the scenario when the sensitive attributes and labels are binary, which can be naturally extended to more general cases.
-Demographic Parity: A classifier is considered to be fair if the predictionŶ is independent from the sensitive attribute A. In other words, demographic parity requires each demographic group has the same chance for a positive outcome: E(Ŷ |A = 1) = E(Ŷ |A = 0). We will report the difference of each sensitive group's demographic parity (∆ DP ): -Equal Opportunity: Equal opportunity considers one more condition than demographic parity. A classifier is said to be fair if the predictionŶ of positive instances is independent from the sensitive attributes. Concretely, it requires the true positive rate of different sensitive groups are equal: Similarly, in the experiments, we report the difference of each sensitive group's equal opportunity (∆ EO ): Note that demographic parity and equal opportunity measure the fairness performance in different ways, and the smaller the values are, the better the performance of fairness.

Fairness Performances (RQ1)
To answer RQ1, we compare the proposed framework with the aforementioned baselines in terms of prediction and fairness. The parameters for the baselines are tuned through grid search, and for the setting of FairRF, we follow the original paper [38]. All experiments are conducted 3 times and the average performances (standard deviations results are shown in Appendix due to space limitation) are reported in Table 2 and Table 3 in terms of accuracy, ∆ EO , ∆ DP . We have the following observations: -In general, the proposed framework FairDA can achieve a better performance of fairness, while not causing a significant drop of the prediction performance comparing with the Vanilla model. For example, in Exp. 4, the performance of ∆ DP of FairDA increases 20.6% compared to Vanilla, and the performance of accuracy only drops 1.7%. -Comparing with all other fairness-aware baselines that are not utilizing sensitive attributes in the target domain, overall FairDA performs better in terms of fairness metrics ∆ DP and ∆ EO . This is because by transferring sensitive information from the source domain, FairDA may make adversarial debiasing with the transferred sensitive information. -We conduct experiments on various source and target datasets. No matter it is transferred from the source that has less or more samples than target, our proposed FairDA outperforms baselines on the target domain, which suggests the generality of our model.

Ablation Study (RQ2)
In this section, we aim to analyse the effectiveness of each component in our proposed FairDA framework. As shown in Section 3, our model contains two adversarial components. The first one is designed for making better prediction on target domain's sensitive attribute with the knowledge learned from source domain. The second one is designed for debiasing with the sensitive attribute predicted by the domain adaptive classifier. In order to answer RQ2, we investigate the effects of these components by defining two variants of FairDA: After obtaining target's sensitive attribute, this variant just treats it as an additional normal feature to predict the label without fairness constraints. Table 4 reports the average performances with standard deviations for each method. We make the following observations: (1) When we eliminate the domain adversary for learning a sensitive attribute predictor, the performances are reduced. It suggests the importance of capturing the domain invariant sensitive

Parameter Analysis (RQ3)
To answer RQ3, we explore the parameter sensitivity of the two important hyperparameters of our model. α controls the impact of the adversary to the sensitive attribute predictor, while β controls the influence of the adversary to the debiasing. We vary both α and β from [0.0001, 0.001, 0.01, 0.1, 1], and other settings are the same as Exp.1. The results are shown in Fig. 3. It is worth noting that, for Fig. 3(a) and Fig. 3(b), lower values are better fairness performances, while for Fig. 3(c) and Fig. 3(d), higher values indicate better prediction performance. From Fig. 3(a) and Fig. 3(b) we could observe that: (1) Generally, larger α and β will achieve fairer predictions, while smaller α and β result in worse fairness; (2) When we increase the value of α, both ∆ DP and ∆ EO will first decrease and then increase when the value of α is too large. This may be because the estimated target sensitive attributes are still noisy and strengthening the adversarial debiasing that optimizes the noisy sensitive attributes may not necessarily lead to better fairness performances; (3) For β, the fairness performance is consistently better with a higher value. From Fig. 3(c), we observe that the classification performance is better when α and β are balanced. Overall, we could make a conclusion that when α and β are in the range of [0.001, 0.1], FairDA can achieve relatively good performances of fairness and classification.

Related Work
In this section, we briefly review the related works on fairness machine learning and deep domain adaptation. Fairness Machine Learning Recent research on fairness in machine learning has drawn significant attention to developing effective algorithms to achieve fairness and maintain good prediction performance. which generally focus on individual fairness [19] or group fairness [16,36]. Individual fairness requires the model to give similar predictions to similar individuals [6,5]. In group fairness, similar predictions are desired among multiple groups categorized by a specific sensitive attribute (e.g., gender). Other niche notions of fairness includes subgroup fairness [20] and Max-Min fairness [22], which aims to maximize the minimum expected utility across groups. In this work, we focus on group fairness. To improve group fairness, debiasing techniques have been applied at different stages of a machine learning model: (1) Pre-processing approaches [18] apply dedicated transformations on the original dataset to remove intrinsic discrimination and obtain unbiased training data prior modeling; (2) In-processing approaches [1,4] tackle this issue by incorporating fairness constraints or fairness-related objective functions to the design of machine learning models; and (3) Post-processing approaches [9] revise the biased prediction labels by debiasing mechanisms.
Although the aforementioned methods can improve group fairness, they generally require the access of sensitive attributes, which is often infeasible. Very few recent work study fairness with limited sensitive attributes. For example, [38] and [14] explore and use the related features as proxies of the sensitive attribute to achieve better fairness results. [22] proposes an adversarial reweighted method to achieve the Rawlsian Max-Min fairness objective which aims at improving the accuracy for the worst-case protected group. However, these methods may require domain knowledge to approximate sensitive attributes or not suitable for ensuring group fairness.
In this paper, we study the novel problem of cross-domain fairness classification which aims to estimate the sensitive attributes of the target domain to achieve the group fairness. Deep Domain Adaption: Domain adaptation [28] aims at mitigating the generalization bottleneck introduced from domain shift. With the rapid growth of deep neural networks, deep domain adaptation has drawn much attention lately. In general, deep domain adaptation methods aim to learn a domaininvariant feature space that can reduce the discrepancy between the source and target domains. This goal is accomplished either by transforming the features from one domain to be closer to the other domain, or projecting both domains into a domain-invariant latent space [31]. For instance, TLDA [39] is a deep autoencoder-based model for learning domain-invariant representations for classification. Inspired by the idea of Generative Adversarial Network (GAN) [12], researchers also propose to perform domain adaptation in an adversarial training paradigm [11,33,31]. By exploiting a domain discriminator to distinguish the domain labels while learning deep features to confuse the discriminator, DANN [11] achieves superior domain adaptation performance. ADDA [33] learns a discriminative representation using labeled source data and then map the target data to the same space through an adversarial loss. Recently, very few work apply transfer learning techniques for fair classification [30,7]. Although sensitive attributes are not available in the target domain, there may exist some publicly available datasets which can be used as auxiliary sources. However, these methods mostly consider a shallow scenario of transfer between different sensitive attributes in the same dataset.
In this paper, we propose a new domain adaptive approach based on dual adversarial learning to achieve fair classification in the target domain.

Conclusion and Future Work
In this paper, we study a novel and challenging problem of exploiting domain adaptation for fair and accurate classification for a target domain without the availability of sensitive attributes. We propose a new framework FairDA using a dual adversarial learning approach to achieve a fair and accurate classification. We provide a theoretic analysis to demonstrate that we can learn a fair model prediction under mild assumptions. Experiments on real-world datasets show that the proposed approach can achieve a more fair performance compared to existing approaches by exploiting the information from a source domain, even without knowing the sensitive attributes in the target domain. For future work, first, we can consider multiple source domains available and explore how to exploit domain discrepancies across multiple domains to enhance the performance of fair classifier in the target domain. Second, we will explore the fairness transfer under different types of domain shifts, such as the conditional shift of sensitive attributes. Third, we will explore other domain adaption approach such as meta transfer learning to achieve cross-domain fair classification. Table 5 show the standard deviations of performances to Table 2 and Table 3.