PDFM: A Primal-Dual Fairness-Aware Framework for Meta-learning

The problem of learning to generalize to unseen classes during training, known as few-shot classification, has attracted considerable attention. Initialization based methods, such as the gradient-based model agnostic meta-learning (MAML), tackle the few-shot learning problem by"learning to fine-tune". The goal of these approaches is to learn proper model initialization, so that the classifiers for new classes can be learned from a few labeled examples with a small number of gradient update steps. Few shot meta-learning is well-known with its fast-adapted capability and accuracy generalization onto unseen tasks. Learning fairly with unbiased outcomes is another significant hallmark of human intelligence, which is rarely touched in few-shot meta-learning. In this work, we propose a Primal-Dual Fair Meta-learning framework, namely PDFM, which learns to train fair machine learning models using only a few examples based on data from related tasks. The key idea is to learn a good initialization of a fair model's primal and dual parameters so that it can adapt to a new fair learning task via a few gradient update steps. Instead of manually tuning the dual parameters as hyperparameters via a grid search, PDFM optimizes the initialization of the primal and dual parameters jointly for fair meta-learning via a subgradient primal-dual approach. We further instantiate examples of bias controlling using mean difference and decision boundary covariance as fairness constraints to each task for supervised regression and classification, respectively. We demonstrate the versatility of our proposed approach by applying our approach to various real-world datasets. Our experiments show substantial improvements over the best prior work for this setting.


INTRODUCTION
In contrast to the conventional machine learning systems, the ability to learn from a handful of examples is one of the critical characteristics of human intelligence. Learning quickly yet remains a daunting challenge for artificial intelligence, which receives significant attention from the machine learning community, especially when it needs to transfer knowledge from a given distribution of tasks onto unseen ones. Overcoming this limitation can have a broad impact on artificial intelligence, as it can save the expensive preparation of large training samples, often humanly annotated, needed by current machine learning methods [3]. To address the challenge of fast adaptation, meta-learning (a.k.a learning to learn) leverages the transferable knowledge learned from previous tasks, then adapts to new environments rapidly with a few training examples. The goal of a few-shot metalearning problem is to minimize generalization error across a distribution of tasks with few training examples (i.e. fewshot). This technique has demonstrated success in both supervised learning, such as few-shot regression [1], [4] and classification [5], [6], and reinforcement learning [7] settings.
There are several lines of meta-learning algorithms for base learners, nearest neighbors based methods [5], [6] which address the problem by "learning to compare"; recurrent network based methods [8] that instantiate the transferable knowledge as latent representations, and gradient-based methods [1], [9], [10], [11], [12] that aim to learn proper model initialization for all tasks, such that the summation query errors are minimized and further the meta-parameter is adapted to novel tasks using a few optimization steps.
Despite their early success in the few-shot application, to the best of our knowledge, most of the existing meta-learning algorithms ignore to mitigate the notion of fairness in tasks and thus lack the capability of fairness generalization on new tasks.
Learning with fairness can be defined as follows: (1) people that are similar in terms of non-sensitive characteristics should receive similar predictions, and (2) differences in predictions across groups of people can only be as large as justified by non-sensitive characteristics [13]. The first condition is related to direct discrimination and the second ensures that there is no indirect discrimination. The Equality Act [14] calls the sensitive characters as protected characteristics.
Machine learning models trained to output prediction based on historical data will naturally inherit the past biases. With the biased input, the main goal of training an unbiased model is to make the output fair. In other words, the predictions are statistically independent of protected variables (e.g. race and gender) [13]. These models may be enhanced by attempting to mask some attributes to the decision-maker, however, as many attributes may be correlated with the protected one [15]. Moreover, techniques in the area of fairness learning are incapable of adapting deep learning models on fairness to new tasks. The motivation of this paper is: can we develop meta-learning methods that adapt deep learning models on both generalization accuracy and fairness to unseen tasks?
In this paper, we bridge areas of few-shot meta-learning and unfairness prevention, and formulate this problem by enhancing the meta-learning model with fairness constraints. More concretely, for each task during the training stage, it is constrained with a task-specific fair inequality, which arXiv:2009.12675v2 [cs.LG] 5 Oct 2020 The global meta-parameters (θ, µ) are sent to each task and each task optimizes in parallel to find a good task-specific primaldual pair, e.g. (θ 1 , µ 1 ), that is approximated by an averaging scheme dual subgradient algorithm presented on the right. Query losses and fairness are gathered and utilized to update the meta-initialization pair. (Right) A few-shot unfairness prevention approach is shown. In the meta-training stage, in each task, support loss is optimized under a fairness constraint which performs a trade-off between losses and fairness.
ensures the independent effect of the protected variable on task predictions. In the support set during the training process, the overall proportion of members in a protected group would receive predictions, which are identical to the proportion of the population as a whole. To this end, we resort to a dual subgradient algorithm with an averaging scheme for each task. It approximately optimizes a pair of task-specific primal and dual parameters, which minimizes the summation of query losses and fairness constraints are satisfied simultaneously. In contrast to the grid search technique, we consider Lagrange multipliers as dual variables that they are optimized to minimize the duality gap between the primal and dual functions.
Furthermore, instead of updating the meta-parameter from the outer loop (such as MAML [1]), in our work, inspired by the concept of resource allocation from economics, we propose a pair of primal-dual meta-parameters, which could be optimized iteratively through a dual decomposition [16], [17] and divided into broadcast and gather steps. We apply such decomposition to leverage the observation that problems can be decomposed into some sub-problems, and then introduce fairness constraints to enforce the notion of agreement between solutions to the different issues. The agreement constraints are incorporated using Lagrange multipliers, and an iterative algorithm is used to minimize the resulting dual. As shown in Figure 1, the interplay between the inner-algorithm (task-level) and the metaalgorithm (meta-level) plays a key role in our work. The former one is used to compute a good approximation of the meta-subgradient, and supplied to the latter. Finally, another key merit of this paper is that we derive an efficient and theoretically grounded analysis for the proposed metalearning approach. Besides, we instantiate examples of mean difference (MD) and decision boundary covariance (DBC) [2] as fairness constraints for justification of supervised regression and classification tasks, respectively. We demonstrate the versatility of our proposed approach on a variety of real-world datasets and extensive experiments to show substantial improvements over the best prior work.
In summary, the main contributions of this paper is threefold: • We propose a novel fair meta-learning framework, in which a good pair of meta-parameters is approximately optimized. Our framework efficiently controls biases for each task, and ensures the generalization capability of both accuracy and fairness onto unseen tasks.
• We further implement optimized strategies for inner loop and meta-subgradient update. Specific and theoretically grounded analysis for the proposed strategies justifies the efficiency and effectiveness of them.
• Finally, we validate the performance of our approach with state-of-the-art techniques on real-world datasets. Our results demonstrate the proposed approach is capable of mitigating biases, generalizing accuracy and fairness to unseen tasks with the minimized input training data. This paper is organized as follows. In Section 2, some related works are referred. Section 3 provides details of our proposed PDFM framework. In Section 4, we discuss the theoretically grounded analysis for the learning approach. In Section 5, we instantiate two examples to justify our approach on few-shot fair regression and classification problems, respectively. Section 6 describes the evaluation settings. In Section 7, we conduct experiments on real-world benchmarks compared with cutting-edge techniques. Finally, the paper is concluded in Section 8.

RELATED WORK
Meta-Learning based on few-shot studies that trained models and make them able to quickly adapt to new tasks under a few labeled samples, several recent approaches have made significant progress in meta-learning [18], [19], [20], [21], which could be broadly classified into three categories: metric-based, network-based, and gradient-based. The goal of metric-based approaches aim to learn an embedding space between the query and support examples, where similar instances are closer and different ones are further apart [5], [6], [22], [23]. For example, the Matching-Net [5] employed ideas from k-nearest neighbors and metric learning based on a feature encoder to extract embedding in the context of the support set, and Prototypical networks [6] learn a metric space in which classification is able to be performed by computing Euclidean distances to prototype representations of each class. The network-based approaches execute fast adaptation into network architecture by generating inputconditioned weights [24], or adding an external memory [25], [26].
In this work, we focus on the third type, the gradient descent based algorithms [1], [9], [12], [27], [28], which aim to meta-learn an initial set of weights for neural networks, and quickly adapted to new task with just a few steps Model primal and dual parameters of task t L inner , ft(·) Loss function of inner task gt(·) Fairness condition of inner task Alg(·) Base learner θ t Learned model primal parameter of task t L meta Meta loss of training tasks L(·), q(·) Lagrangian and dual function f * , q * Optimal primal and dual valuẽ θ k Average of the previous vectors through θ 0 to θ k−1 N Number of classes per task K Number of samples per class in a task α, γ, η, β Learning rates k Duality iterates of inner task q Gradient steps updating model primal parameter of inner task of gradient descent. Such approach could achieve good generalization over new tasks by encoding prior knowledge, existing work such as Franceschi et al. [29] also provides convergence guarantees for gradient-based meta-learning with strongly-convex functions. Despite methods in this area that have been shown effective for adaption of deep learning models on generalization accuracy to new tasks, our experiments show such state-of-the-arts have difficulties in adapting to fairness. Fairness researchers develop machine learning algorithms that would produce predictive models, ensuring that those models are free from biases. Standard predictive models, induced by machine learning and data mining algorithms, may discriminate groups of entities because (1) data bias comes from data being collected from different sources, or (2) dependence on sensitive attributes was identified in the data mining community [30]. Based on the taxonomy by tasks, fairness learning can be typically categorized to classification [2], [31], [32], regression [30], [33], [34], clustering [35], and recommendation [36] works. Even though techniques for unfairness prevention on classification were well developed, to the best of our knowledge, the majority of existing fairness-aware machine learning algorithms are under the assumption of giving abundant training examples. Learning quickly, however, is another significant hallmark of human intelligence.
Several recent approaches have been developed in fair meta-learning [37], [38], [39]. These methods focus on studies of fairness generalization onto unseen tasks by adding an uniformed fairness regularizer to each task. Concretely, Lagrange multipliers were consider as hyperparameters and they were manually tuned by grid search. However, such prior studies suffer from limitations that (1) the trade-off parameter is valued the same for each task, and (2) hence there is a big room for improvement on the generalization of both accuracy and fairness onto new tasks. In this paper, to overcome such limitations, we develop a novel fair metalearning framework. Each task is underwent a task-specific soft fairness constraint. More notably, we consider Lagrange multipliers as dual variables and hence, instead of grid search, they are optimized to minimize the duality gap between the primal and dual functions.

METHODOLOGY
In this section, the problem of controlling unfairness is formulated, which underlies the training of a constrained Model-Agnostic Meta-Learning (MAML [1]). Different from [1], in the proposed framework, each task is fed with a task-specific fairness constraint. The vector of Lagrangian multipliers are considered as dual variables. We then introduce a tasklevel dual subgradient algorithm using an averaging scheme which provides an approximate solution to the inner problem. In the outer loop, the dual decomposition strategy is therefore applied to update the pair of primal-dual meta-parameters.

Problem Setting
Let Z = X × Y be the data space, where X ⊂ R n is the input space, Y means the output space, and N is the number of classes. Meta-learning for few-shot learning aims to train a meta-learner which is able to learn on a large number of various tasks from a small amount of data. Gradient based meta-learning frameworks, such as Model-Agnostic Meta-Learning (MAML) [1], lead to state-of-the-art performance and fast adaptation to unseen tasks. More precisely, the goal of MAML is to estimate a good meta-parameter θ ∈ Θ such that the summation of empirical risks for each task is minimized. Throughout this work, the Θ will be a closed, convex, non-empty subset of an Euclidean space.
In this work, we consider a collection of supervised learning tasks T = {(D S t , D Q t )} T t=1 which distributions over Z and T is denoted as the number of tasks. T is often referred to as a meta-training set as well as an episode (D S t , D Q t ) explicitly contains a pair of a support (i.e. D S t ) and a query (i.e. D Q t ) data sets. For each task t ∈ {1, 2, ..., T }, we let {x t,i , y t,i } m i=1 ∈ (X × Y) be the corresponding task data, and m is the number of datapoints in the support set. For example, standard few-shot learning benchmarks evaluate model in N -way K-shot classification tasks and thus m = N × K indicates, in the support set of the t-th task, it contains N categories and each consists of K datapoints. We emphasize that we need to sample without replacement, i.e., D S t ∩ D Q t = ∅. To study fairness generalization problem under metalearning frameworks, a fairness constraint, g t (θ t ) ≤ 0, is considered in each task, where t indicates task index. In researches of bias prevention, convexity of the constraint receives increasing attention in the machine learning fields [33], [40], [41]. For this purpose, in this paper, we assume that convexity of task constraints always holds.

Model-Agnostic Meta-Learning with constraints
Meta-learning approaches for few-shot learning aim to minimize the generalization error across a distribution of tasks sampled from a task distribution. It is often assume that the support and query sets of a task are sampled from the same distribution. In our work, for each single task, the objective is to minimize the predictive error L inner such that it is constrained by g t : where L inner : R n → R is a loss function, such as crossentropy loss for classification problems and θ t is the model parameter at task t, which is initialized with θ. Alg(D, θ) corresponds to one or multiple steps of gradient descent initialized at θ. g : R n → R is an appropriate complexity function ensuring the existence and the uniqueness of the above minimizer. A point θ t in the domain of the problem is feasible if it satisfies the constraint g t (θ t ) ≤ 0.

Assumption 1. (Task Loss and Constraint
). Let f t (θ t ) be a convex real-valued function for any θ t ∈ Θ. Let Γ(Θ) be a set of proper, closed and convex function over Θ and g t ∈ Γ(Θ) be such that, for any θ t ∈ Θ, g t (θ t ) is convex over R n , inf θt∈Θ g t (θ t ) = 0 and, for any The optimal value of the Eq. (1) is denoted as f * t , which is assume to be finite and is achieved at an optimal and feasible solution The goal of training a single task is to output local parameter θ t given the meta-parameter θ such that it minimizes the task loss f t (θ t ) subject to the task constraint g t (θ t ) ≤ 0. Next, to update the meta-parameter, we minimize the generalization error L meta using query sets across every tasks in the batch such that query constraints for all tasks are satisfied. Formally, the learning objective across all tasks is where θ t = arg min θt∈Θ,gt(θt)≤0 f t (θ t ) is a local optimum of each task t. Here, for the purpose of optimization with simplicity, the constraint of Eq.(2) is approximated, which originally takes the form of a sequence g t (D Q t , Alg(D S t , θ)) ≤ 0, where t = 1, ..., T . In this setting, the meta-objectives and the consequently their subgradients used by the meta-algorithm are dependent on the properties of the inner algorithm. We will show the algorithm details and analysis in the following sections.

Primal and Dual Formulation
Our approach aims to optimize a pair of meta-parameters (i.e. primal and dual variables) as model initialization, instead of using the conventional grid search technique [37], [38], [39]. It consists of two nested primal-dual algorithms, one operating within each task and another across all tasks. In this section, we briefly recall from the primal-dual interpretation of the algorithm framework and such interpretation will be used in the subsequent analysis for both inner and meta problems.

Update Task-Specific Model-Parameters via Dual Subgradient
In order to find a good pair of meta-parameters (θ, µ) ∈ Θ × R m + , such that constraints of all tasks can be satisfied and generalization error is minimized. To this end, in this section, we provide an approximate solution to the inner task of Eq.(1) by proposing a task-level dual subgradient algorithm. This method takes in the meta-parameter pair from the previous outer (or meta) loop and the task-specific (or local) primal and dual parameters are then iterative updated using the support data of the single task.
In the subsequent development, to solve the dual problem of Eq.(1) for a single task, we consider a subgradient algorithm with a constant step size α 0 to update the dual solution iteratively: where [u] + denotes the projection of [u] on the nonnegative orthant in R m + , namely [u] + = (max{0, u 1 }), ..., max{0, u m }), k = 1, 2, ... is the index of iterations, subscript t is the task index number, and µ 0 where the corresponding primal feasible iterate θ k is given by any solution of the set.
As the subgradient method can usually generate a reasonable estimation of the dual optimal solutions within several iterations, approximate primal solutions are obtained accordingly. The constant stepsize α is a simple hyperparameter for controlling, then through choosing an appropriate value of α, the proposed Algorithm 1 is able to approach the optimal value arbitrarily close within a small finite number of steps.
Moreover, the dual subgradient schemes can be applied efficiently to approximate a solution to Eq.(1). Specifically, it returns a good pair of task-level primal and dual parameters (θ t , µ t ). In the following section, due to the decomposable structure of the meta-learning framework for few-shot learning, meta-parameters (θ, µ) are updated by minimizing the summation of query losses across all training tasks.

Update Meta-parameters via Dual Decomposition
Dual decomposition has been used since [42], and has been applied in engineering, such as in rate control for communication networks [43], in networking problems for simultaneous routing and resource allocation [16]. The dual decomposition method was also used to solve large computationally intractable problems with multiple cooperative agents, which resulted in an easily implemented algorithm, in a decentralized manner [17].
In this work, inspired by the concept of resource allocation from economics [16], [17], our model's goal is to estimate a good pair of primal-dual weight initialization
Update Meta-parameters. 11: end while (θ, µ), such that both the meta-loss across tasks is minimum and constraints of all tasks are also satisfied. To this end, we update the pair of primal-dual initialization iteratively using a dual decomposition method that is normally considered as a special case of Lagrangian relaxation [44]. This method is typically simple and efficient, which can be divided into two steps for each iterate, i.e. broadcast and gather. In the broadcast step, the meta-dual parameter µ is sent to each of tasks T t . Through Algorithm 1, local primal, and dual parameters θ t and µ t of a single task are iteratively optimized using few-shot support data. Query loss f t (D Q t , θ t ) and fairness estimate g t (D Q t , θ t ), therefore, are evaluated using query data set. In the gather step, both query losses and fairness estimates collected across all tasks are applied to update primal and dual meta-parameters, where s = 1, 2, ... is the index of the outer iteration and β 0 is the stepsize. The full algorithm of the proposed approach is outlined in Algorithm 2.

THEORETICAL ANALYSIS
Recall that the proposed averaging scheme used to approximate the task-specific primal-dual parameter pair is built upon the dual subgradient method with a constant stepsize. We denote the dual feasible set as M = {µ t |µ t 0, −∞ < q t (µ t ) < ∞}, and for every fixed µ t ∈ M , we have the solution set C ⊂ Θ for q t (µ t ).
When f * t is finite, the Slater condition is sufficient for the existence of a dual optimal solution, and therefore the proposed task adaptation approach efficiently reduces the amount of feasibility violation at the approximate primal solutions. Furthermore, intuitively, bounded subgradients in Assumption 2 is satisfied when L = maxθ t∈Θ ||g t (θ t )||. Lemma 1. If Assumption 1 and the continuity of f t (θ t ) and g t (θ t ) hold, there exists at least one optimal solution θ µ ∈ C. Furthermore, θ µ is unique if f t (θ t ) is strictly convex, otherwise there may be multiple solutions.
Lemma 1 is easily proved using the Weierstrass Theorem proposed in [45]. Next, for the averaged primal sequence {θ k t }, we show that it always converges when Θ is compact. Proposition 1. Under Assumption 2, when the convex set Θ is compact, let the approximate primal sequence {θ k t } be the running averages of the primal iterates given in Eq. (5). Then {θ k t } can converge to its limitθ * t . The proof of Proposition 1 is in Appendix A. The following proposition [46] provides bounds on the feasibility violation and the primal cost of the running averages f (θ k t ), where the bounds are given per iteration k. Its proof is given in Appendix B.

Proposition 2.
Let the dual sequence {µ k t } is generated through Eq.(3) and the vectorsθ k t for k ≥ 1 be the averages in Eq. (5). Under the assumptions that f t (θ t ) and g t (θ t ) are convex, Θ is a convex compact set. For all k ≥ 1, we have and a lower bound f t (θ k Furthermore, since the proposed Algorithm 2 is considered as an extended and modified version of [1], convergence of Algorithm 2 is guaranteed and detailed analysis is stated in [47]. Accessing to sufficient samples, the running time of the proposed approach is O(s · k · q) , where s, k are respectively the number of outer and inner iterations, and q is gradient steps of inner loop. For a N -way-K-shot learning, the best accuracy is achieved when , l T is the query loss of task T , σ is a bound on the standard deviation of ∇L t (θ t , µ t ) from its mean ∇L(θ, µ), andσ is a bound on the standard deviation of estimating ∇L t (θ t , µ t ) using a single data point.

SUPERVISED EXAMPLES IN UNFAIRNESS PRE-VENTION
In the previous section, we derived a theoretically principled algorithm under the assumption that the convexity always holds for both f t (·) and g t (·). However, many problems of interest in machine learning and deep learning have a non-convex landscape due to the non-linearity of neural networks, where theoretical analysis is challenging. Nevertheless, algorithms originally developed for convex optimization problems like gradient descent and Adam [48] have shown promising results in practical non-convex settings. Taking inspiration from these successes, in this section, we respectively describe practical instantiations of our unfairness prevention for both regression and classification problems, and empirically evaluate the performance in Section 7.
Intuitively, an attribute affects the target variable if one depends on the other. Strong dependency indicates strong effects. Currently, most fairness criteria used for evaluating and designing machine learning models focus on the relationships between the protected attribute and the system output. For simplicity, we consider one binary protected attribute (e.g. white and black) in this work. However, our ideas can be easily extended to many protected attributes with multiple levels. We thus modify the introduced setting by letting Z = X × Y be the data space, where X = E ∪ S. Here E ⊂ R n is an input space, S = {0, 1} is a protected space, and Y ⊆ R is an output space for regression and Y = {0, 1} for binary classification. For each task t ∈ {1, 2, ..., T }, we let be the corresponding task data and m is the number of datapoints in the support set.

Regression Example
Since the protected attribute is binary valued while target variable is continuous, it is not possible to use typical sametype measures of dependency like correlation coefficient and point-wise mutual information to quantify the statistical dependency between them [30]. To quantify the effect of protected attribute s on its predicted targetŷ for D, we apply Mean Difference (MD) for evaluating biases in regression problems, where such constraint is wildly used in studies [30], [34], [49] of fairness learning. To formalize in the context of meta-learning in the form of the inner problem of Eq.(1), a mean-squared error is used to describe the adapted loss over a support set for each task. Let the task-specific constraint g t (θ) satisfies c-M D fairness. The regression problem of a single task takes the form: where (e i , y i ) are an input/output pair sampled from task T t andŷ is a predicted outcome.

Classification Example
In a N -way-K-shot classification problem, since we assume all the tasks to be binary labeled, in this example, all of our tasks are 2-way (i.e. N = 2). In this classification where E[s −s]d θ (e) is cancels out since E[s −s] = 0 and h = N × K is the sample size of a support set of a single task. In a linear model for classification, such as logistic regression, the decision boundary is simply the hyperplane defined by θ T e = 0. A point θ t in the domain of a task is feasible if it satisfies the constraint DBC(s, d θt (e))−c ≤ 0. Similar to the regression example, c is a user-defined fairness relaxation, and for discrete classification tasks with a cross-entropy loss, the problem of a single task takes the form: The goal of a single task optimization is to approximate a good parameter pair (θ t , µ t ) by applying the proposed dual subgradient method and further pass the pair to evaluate accuracy and fairness (i.e. DBC) over the query data. As the original meta-learning problem in Eq.(2) is decomposed into a batch of single tasks, meta-parameters (θ, µ) are iteratively updated using the proposed dual decomposition approach outlined in Algorithm 2.

EVALUATION SETTINGS
To evaluate the effectiveness of the proposed Duality-MAML, we conduct experiments of few-shot learning in the domain of supervised tasks. Formulation of the regression and classification problems are introduced in Section 5. In this section, for both supervised settings, the datasets, evaluation metrics, the comparison methods, and tuning of hyperparameters are introduced in turn.

Regression Datasets
The Chicago Crime dataset [34] includes information relevant to crime (e.g. household, unemployment) as well as demographic information (such as race and gender) in different communities across the Chicago city in 2015. These information were separately collected from American FactFinder (AFF) 1 which is an online and self-service database provided by the U.S. Census Bureau and then aggregated various sources to the final data prepared for experiments. The Chicago Crime dataset is divided into 801 sub-tasks according to different communities in the Chicago city. All tasks were further split into 501 for training, 100 for validation and 200 for testing. Each task contains 52 crime records. Since the feature in the original data that described the percentage of African American population is numeric, in this experiment, we convert it into binary values based on the majority (> 70%) population of Black and non-Black. Thus, each record represents a weekly information including 13 numeric explanatory variables and one binary protected variable. In this data set, crime count is the target attribute that we need to detect discrimination from.
The Law School Admissions Council (LSAC) dataset 2 is a survey among law students taking the bar exam and attending law schools in the U.S. in 1991, which is widely applied in cutting-edge fair regression techniques [33], [49], [50]. The goal is to predict the score of each student based on features such as LSAT score and undergraduate GPA. The protected attribute is race. This dataset consists of 20,798 instances with 14 features and each group is considered as a task.
The COMPAS recidivism dataset [51] consists of a collection of data from over 10,000 criminal defendants from Broward County, Florida during 2013-2014. It includes attributes such as the sex, age, race, and priors for the defendants. We create a binary sensitive column for whether the defendant is African American. We predict the ProPublica collected label of whether the defendant was rearrested within two years. The COMPAS dataset contains 60,843 records and is split to 50 tasks according to defendants' dates of birth. Since the original dataset has a small mean rating difference between the protected groups, for our experiments, we randomly select instances of African Americans and increase the target values of 25%.

Classification Datasets
The Adult income dataset [52] contains a total of 34 tasks according to different countries and regions, totally 48,842 instances with 14 features (e.g., age, educational level) and a binary label, which indicates whether a subject's incomes is above or below 50K dollars. We consider gender, i.e. male and female, as the protected attribute.
The Communities and Crime dataset [53] includes information relevant to crime (e.g., police per population, income) as well as demographic information (such as race and sex) in different communities across the U.S. We convert this dataset to a few-shot fairness setting by using each state as a different task. Following the same setting in [37], since the violent crime rate is a continuous value, we convert it into a binary label based on whether the community is in the top 50% violent crime rate within a state. Additionally, we add a binary sensitive column that receives a protected label if African-Americans are the highest or second highest population in a community in terms of percentage racial makeup.
The Bank Marketing dataset [54] contains a total 41,188 subjects, each with 20 attributes (e.g. loan, housing, etc.) and a binary label, which indicates whether the client has subscribed or not to a term deposit. In this case, we consider the marital status as the binary protected attribute, which is discretized to indicate whether the client is married or not. Since the dataset contains information of different months (i.e. January to December) and dates (i.e. Monday to Friday), we combine them as task labels and thus the Bank Marketing data contains 50 tasks.

Evaluation Metrics
To evaluate the proposed techniques for fairness learning, we introduced classic evaluation metrics, two for each supervised setting, to measure data biases. These measurements came into play that allows quantifying the extent of bias taking into account the protected attribute and were designed for indicating indirect discrimination.

Metrics for Regression
The area under the ROC curve (AUC) [30] point-wisely quantifies the statistical dependency between the protected variable and predictions.
where I(·) is an indicator function which returns 1 if its argument is true, 0 otherwise. AU C = 0.5 represents random predictability, thus S is independent onŶ . Impact Ratio (IR) [55] is defined as the ratio of mean over the protected and unprotected group in data D.
The decisions are deemed to be discriminatory if the ratio of positive outcomes for the protected attribute is below 80% [56]. IR = 1 indicates that there is no bias of data D.

Metrics for Classification
Discrimination [15] measures the bias with respect to the protected attribute S in the classification: This is a form of statistical parity that is applied to the binary classification decisions. It measures the difference in the proportion of positive classifications of individuals in the protected and unprotected groups. Disc = 0 indicates there is no discrimination. Consistency [15] compares a model's classification prediction of a given data item to its k-nearest neighbors: where |D| is the sample size, v is the number of nearest neighbors, and a nearest neighbor is defined based on a similarity measure (i.e. euclidean distance) of unprotected attributes e. As demonstrated in [15], we applied the kNN function to the full set of examples to obtain the most accurate estimate of each point's nearest neighbors. The consistency is a real number with a value of one signifying a fair prediction.

Competing Methods
We evaluate all datasets -the proposed approach against various baselines -by comparing the results of generalization on both loss/accuracy and fairness applied to: 1) MAML: The model-agnostic meta-learning model with no fairness constraints proposed by Finn et al., [1]. 2) Masked MAML: Similar to MAML, this approach is applied to modified datasets by simply removing the protected attributes. 3) pretrain: In computer vision, models pre-trained on large-scale image classification have been shown to learn effective features [57]. In this paper, the pretrain baseline trains a single network on all tasks and in each task an unified fairness constraint is added to ensure the fairness condition is satisfied.

4) UP-MAML (regression only): Unfairness Preven-
tion MAML [38] efficiently mitigates the dependency effect between the binary protected attribute and the numeric predictions by reducing the mean difference of sub-groups. Statistical parity in each task is balanced by setting a fixed trade-off parameter. 5) fair-MAML (classification only): [39] controls unfairness for each task and tunes a shared Lagrangian multiplier across tasks by simply applying grid search. 6) F-MAML dp (classification only): is a fair metalearning approach proposed in [37]. In this baseline, Slack et al., proposed a simple regularization term aimed at achieving demographic parity for each task. All tasks share an unified regularization term in which the fairness hyperparameter is tuned through grid search, where the demographic parity regularizer R dp = 1 − p(ŷ = 1|s = 0). 7) F-MAML eop (classification only): is another fair meta-learning approach proposed in [37], in which the demographic parity regularizer is replaced with the one aimed at improving equal opportunity, where R eop = 1 − p(ŷ = 1|s = 0, y = 1). 8) LAFTR [58]: is a transferring fair machine learning approach across domains that uses an adversarial approach to create an encoder that can be used to generate fair representations of datasets and demonstrate the utility of the encoder for fair transfer learning.

Experiment Setup and Parameter Tuning
Our neural network trained follows the same architecture used by [1], which contains 2 hidden layers of size of 40 with ReLU activation functions. When training, we use only one step gradient update (i.e. q = 1) and k = 10 inner primal-dual updates with 2N K samples of query set (N = 1 for regression setting and N = 2 for classification), and a fixed primal and dual learning rate of γ = 0.01 and α = 0.01. We use Adam as the meta-optimizer. Similarly, we set meta-learning rates of η = 0.001 and β = 0.01 used to update the meta-loss in the outer loop. For all datasets, all the unprotected attributes are standardized to zero mean and unit variance and prepared for experiments. Besides, taking few-shot learning into account, we set a meta batch-size of 8 tasks and 4000 meta-iterations for all datasets. Some key characteristics for all real data are listed in Table 2.
All baseline models used to compare with our proposed approach share the same neural network architecture and parameter settings. Hyperparameters are selected by a heldout validation procedure. All experiments are repeated 10 times with the same settings. Results shown with these

EXPERIMENTAL RESULTS
This section evaluates the effectiveness of the proposed approach and its competitors on a regression and classification task, respectively. We first focus on generalization of statistical parity on unseen tasks evaluated using fairness metrics. Moreover, taking the classification setting as an example, ablation studies reveal the trade-off relationship between validation loss and fairness that the proposed dual subgradient method alleviates when used to train classifiers, as well as demonstrate the contributions of the proposed model components. For all baseline methods, wherever applicable, hyper-parameters were tuned via grid search. Specifically, we chose the models that were Pareto-optimal with regard to MD or DBC and all other evaluation metrics.

Performance on Regression
Consolidated and detailed performance of the different techniques over real-world data are listed in Table 1 of the supplemental materials. We evaluate performance for regression examples by fine-tuning the model learned by all methods on K-shot of {5, 10, 15, 20} datapoints of each task for each dataset. Best performance of the tables in each experimental unit are labeled in bold. We first observe that there is a considerable amount of unfairness in the original datasets, which are reflected in the results of Data in the table. Experiment results shown in Table 1 demonstrate our proposed approach outperforms than other baseline methods in terms of controlling biases. It efficiently reduces MDfrom the original dataset. Decreasing values of MD limited to close zero signify a fair prediction. In addition, fairness results based on evaluation metrics are visualized in Figure 2. Each trail was repeated 10 times and results shown in the figure are mean of experimental outputs followed by error bars representing one standard deviation of uncertainty.
MAML became a famous meta-learning algorithm because of its fast adaptation and good generalization performance on losses [1]. However, our results shows it fails to control biases nor performs success in fairness generalization in a few-shot meta-learning, although MAML is stably able to produce high generalization accuracy. Masked MAML shows an improvement in fairness; however, there is still substantial unfairness hidden in the data in the form of correlated attributes. In contrast to MAML, a simple pre-trained model is to find a meta-parameter θ such that the summation of losses over all tasks is minimum. In other words, it lacks gradient steps within each task. In our experiments, each task in the pretrain model undergoes a fairness constraint which is uniformly regulated and optimized by grid search. Although the pretrain method controls unfairness in a little bit, since the fairness controller is shared over all tasks and it is not updated either within a task nor in the outer loop, there is a lot of room for improvement in the performance of using the pretrain technique. To this end, UP-MAML [38] is designed for regression to boost generalization accuracy in few-shot fairness learning. Our results, which is consistent with [38], demonstrate that by simply setting a fixed parameter to control fairness for all meta-learning tasks is able to mitigate fairness onto new tasks, but the key to improve capability of fairness generalization is to separately learn such an optimal parameter for each task. Furthermore, though LAFTR offers a way to transfer machine learning models between tasks, consistent with [37], we observe it is unsuccessful in very data light situations.
The proposed method, PDFM, circumvents the shortcomings of the competing methods mentioned above and outperforms such state-of-the-art in bias controlling with better results. Its effectiveness on unfairness prevention is performed and displayed by applying evaluated metrics, such as AUC and IR in regression. Specifically, AUC, which relates to rank tests, point-wisely quantifies the statistical dependency between the protected variable and predictions and hence is used for measuring discrimination between two groups. The more its value is close to 0.5, the less dependency of the outcome on the protected attributes and therefore the fairer the model we train. Results shown in Figure 2 (d)-(f) are evaluated using AUC metric, which reflects the performance of fairness generalization on unseen tasks based on regression datasets. In contrast to baseline methods, PDFM efficiently mitigates AUC approaching to a fair level. Moreover, Impact Ratio (IR), also know as slift, is used for quantifying discrimination, where the decisions are deemed to be discriminatory if the ratio of positive outcomes for the protected group is below 80%. Results in Figure 2 (g)-(i) demonstrate that IR performed via our method is not only above 80% level, but also higher than those using other techniques.

Performance on Classification
Similar to the Regression experiments, detailed performance of the different methods over datasets are listed in Table 2 of the supplemental materials. Specifically in classification experiments, different from the regression setting, K-shot tasks use K input/output pairs from each class, for a total of N × K datapoints for N -way classification.
Besides, another two state-of-the-art techniques designed for classification, F-MAML dp and F-MAML eop , proposed by Slack et al.,in [37] intuitively control unfairness by taking advantage of demographic parity and equal opportunity, respectively. Our results in Figure 3 demonstrate that these two baseline methods fail to show fairness generalization onto unseen tasks in contrast to the proposed approach, in terms of reducing Disc and promoting Cons.
Our results indicate, for both supervised settings, by training a batch of tasks where each contains a handful biased data, our method is able to generalize not only accuracy but also, more importantly, fairness onto unseen data, and hence mitigates bias more effectively by alleviating the dependency effect of the protected variable on predictions. Besides, when K = 5, results of both validation loss and fairness are repeated with larger standard deviations; but such instability tends to level off as the number of samples considered in each task increases. Furthermore, it is notable that the more instances of a task used for training, the better fairness generalization onto new tasks.

Loss-Fairness Tradeoffs
Although our proposed approach returns a bit smaller predictive accuracies (see Table 2 in the supplemental material), this is due to the trade-off between losses and fairness. To this end, we train each method and sweep over a range of seven dual initial values: [0.001, 0.01, 0.1, 1, 10, 100, 1000]. Taking 10-shot as an example, results presented in Figure 4 is the mean across 10 runs on each set of dual variable using randomly selected hold out validation tasks. The fairness, i.e. DBC, presented is the ratio between the protected and unprotected groups. Smaller validation loss and fairness values closer to zero (i.e. bottom left in each sub-figure) indicate more successful outcomes. Here, as MAML does not have hyper-parameters to control the loss/fairness tradeoff, its outcomes across three datasets are presented with very low validation losses but high fairness values. In the proposed problem setting, the pretrain neural network shows some ability to learn the new task using little data and  fine-tuning epochs and as the dual variable increases, its validation losses decrease and thus DBC increases. Moreover, LAFTR is not successful at learning with minimal data and a small number of fine-tuning epochs for the new task. At low values, fair-MAML, F-MAML dp , and F-MAML eop are able to achieve lower validation losses than the pretrain and LAFTR baselines. Crucially, the results stated in Figure 4 confirm and further illustrate the findings that our proposed approach is able to learn more accurate representations that are also fairer for the swept range than all baseline techniques.

Parameter Sensitivity Study
In this subsection, we perform detailed ablation studies on classification tasks to understand the contributions of the proposed model components to fair meta-learning. For simplicity, all experiments are conducted using 10-shot for each class.
A key step of PDFM improving the fairness generalization is to iteratively elevate the dual function to obtain a lower bound of f * t within each task. The number of iteration k therefore is a hyperparameter to tune and ideally it is chosen when the duality gap is minimum. Intuitively, the larger k is applied, the more expensive the training is. We hence compare the performance of the proposed method with multiple k values (i.e. 1, 2, 5, 10 and 20). As shown in Table 3, we observe that increasing k leads to consistent and significant improvement in bias controlling. However, due to the drawback of longer training time, we adopt k = 10 via summation in the previous experiments.
Furthermore, since MAML based algorithms use one (i.e. q = 1) or a small number of gradient steps (i.e. q > 1) to update the primal model parameter (θ t ) in each task, this corresponds to early stopping. Taking too many gradient steps, however, may pose two challenges that (1) long optimization path of the base learner leads to a considerable computation and memory burden; (2) the dependency of the model parameters on the meta parameters shrinks and vanishes [59]. Besides these, in our setting, task-specific dual variables µ t are depended on primal approximation and hence are determined based on inner gradient steps of q. As displayed in Table 4, we explore various numbers (i.e. 1, 5, 10 and 20) of q for a 10-shot classification experiments. It is remarkable that results shown stand for the generalization outcome on new tasks that are different from prior ones in training. Although more gradient steps increase the capability of generalization on accuracy, it significantly slows down the computation of the algorithm and reduce fairness generalization on new tasks.

CONCLUSION AND FUTURE WORK
Techniques in meta-learning have been shown effectiveness for adaption of deep learning models on accuracy generalization to new tasks. These methods, however, are unable to ensure fairness adaption. In this paper, for the first time a novel fair meta-learning framework is proposed, in which a good pair of primal-dual meta-parameters is optimally learned. To be specific, the meta-parameter pair is trained over a variety of learning tasks with a small amount of training samples. To produce the best performance, we implement two optimization strategies for both inner and meta subgradient update. Theoretical analysis justifies the efficiency and effectiveness of the proposed algorithms to support existence of solutions and algorithmic convergence guarantee. Results from extensive experiments demonstrate substantial improvements over the best prior work and our proposed framework is capable of generalization both accuracy and fairness onto new tasks. Further research in this area can make multitask parameters a standard ingredient in explainable fairness transfer learning.
Since is arbitrarily small, we proof that the sequence {θ k } converges to its limit L =θ * asymptotically.

Proof of Proposition 2
Proof: Similar to the proof of Proposition 1, for simplicity, the subscript t is hidden.
(2) From Eq.(3) and Eq. (6), we have f (θ k )+(µ k ) T g(θ k ) = q(µ k ) ≤ q * . Under the assumption of convexity and Slater condition, q * = f * . Together with the condition that f (θ) is convex and θ ∈ Θ, we have By plugging in −(µ i ) T g(θ i ), we thus obtain an upper bound for f (θ k ) that (3) By definition, for any θ ∈ Θ, we have f (θ) + (µ * ) T g(θ) ≥ f (θ * ) + (µ * ) T g(θ * ) = q(µ * ) Asθ ∈ Θ and for all k ≥ 1, we obtain an lower bound for f (θ k ) that f (θ k ) = f (θ k ) + (µ * ) T g(θ k ) − (µ * ) T g(θ k ) ≥ q(µ * ) − (µ * ) T g(θ k ) ≥ q(µ * ) − (µ * ) T g(θ k ) + ≥ f * − ||(µ * )||||g(θ k ) + || Chen Zhao is a PhD student in Computer Science at the University of Texas at Dallas. Before that, he received his Master's degree from the State University of New York at Albany. His work focuses on studying fairness in machine learning. He is interested in applying computational and statistical methods to reduce predictive bias and in building fairer and more interpretable algorithms in Multi-task learning (MTL), metric learning, and meta learning. Khan's research focuses on big data management and analytics, data mining and its application on cyber security, complex data management including geo-spatial data and multimedia data. His research has been supported by grants from NSF, the Air Force Office of Scientific Research (AFOSR), DOE, NSA, IBM and HPE.