Transferring Fairness using Multi-Task Learning with Limited Demographic Information (2024)

Abstract: Training supervised machine learning systems with a fairness loss can improve prediction fairness across different demographic groups. However, doing so requires demographic annotations for training data, without which we cannot produce debiased classifiers for most tasks. Drawing inspiration from transfer learning methods, we investigate whether we can utilize demographic data from a related task to improve the fairness of a target task. We adapt a single-task fairness loss to a multi-task setting to exploit demographic labels from a related task in debiasing a target task, and demonstrate that demographic fairness objectives transfer fairness within a multi-task framework. Additionally, we show that this approach enables intersectional fairness by transferring between two datasets with different single-axis demographics. We explore different data domains to show how our loss can improve fairness domains and tasks.

## introduction machine learning models can have disparate performance on specific subpopulations even when they have relatively high performance overall, which can mask poor performance for smaller subpopulations. to alleviate disparate performance and biased model behavior, a variety of techniques can make for fairer ai systems, such as additional training objectives to debias models @xcite @xcite @xcite @xcite . these training objectives require example metadata, such as author demographics, to influence the loss toward fairer model behavior. unfortunately, training set demographic metadata is often unavailable, thus creating a barrier to training fair systems. transfer learning is a general strategy for learning with limited or no training labels, where annotations from one task are used to train a model in a related task. multi-task learning (mtl) utilizes transfer learning to jointly train a model over several related tasks. we draw inspiration from mtl methods and ask, can mtl transfer demographic fairness between related tasks? suppose we have target labels for two tasks a and b, but demographic labels only for task a; can we transfer fairness learned from task a to task b? we adapt existing mtl and fairness loss methods to achieve the goal of demographic fairness transfer. figure 1 shows a representation of our method to achieve model fairness given demographic annotations for only one task. the success of this approach can be adapted to address a limitation in current demographic fairness methods: intersectional fairness. intersectional fairness means that fairness conditions hold across cross-products of orthogonal attributes and not just within a single attribute. @xcite introduced the term intersectionality in the legal field foot_0 to describe how anti-discrimination laws failed to protect black women workers, as employers avoided charges of discrimination by hiring enough black men and white women to satisfy the single-identity clauses. similarly, early work in machine learning found biases in vision models at the intersection of gender and skin color @xcite , where facial recognition models performed worse for black women. current methods cannot enforce intersectional fairness unless we have annotations for both attributes on the same instances. this high bar for training data further exacerbates data scarcity since most datasets with demographic attributes only consider single-axis attributes (e.g. race or gender alone.) therefore, we use our mtl approach to produce an intersectionally fair model for two tasks (gender and race) from a dataset from different single-axis demographic annotations for each task (i.e. gender or race). finally, we explore how the relationship between tasks enables fairness transfer by conducting experiments with different tasks in two domains (clinical and social media) and evaluate the fairness transfer between tasks within and across domains. we summarize our contributions as follows: ## related work achieving fairness without demographics is a task that has been studied by prior work, e.g. @xcite @xcite . prior methods that transfer fairness using mtl to leverage external datasets to ensure fairness @xcite rely on strong assumptions of distribution shifts, limiting their impact with real-world applications or nlp tasks @xcite . other work leverage domain-shift transfer methods @xcite @xcite , adversarial learning @xcite , sample re-weighting @xcite , or frame the problem under privacy concerns @xcite . another solution to debias models is to use proxy variables or inferred demographics in settings where we lack demographic data. however, these methods are dependent on the accuracy of the demographic inference model @xcite @xcite or the availability of proxy variables, e.g. names @xcite . mtl has become the standard training setting for large language models (llm) @xcite @xcite . unfortunately, studies have found that fine-tuning llms often results in unfair models, even when starting from a debiased pre-trained encoder @xcite . instead, they conclude that fairness requires applying debiasing methods in fine-tuning for the task of interest, requiring demographic information for each task. in our work we use a separation-based groupwise definition of fairness, equalized odds @xcite , that was adapted to be differentiable and applied to training procedures inspired by the ϵ-differential fairness from foulds et al. ( 2020 ). however, many other group-wise definitions of fairness may be adapted for other tasks, e.g. equalized opportunity @xcite , and our methods can be easily used with any of these demographic losses in the procedure. ## methods we begin by describing the learning setting shown in figure 1 . let us assume we desire an unbiased model for task a for which we have input text (x) and associated labels (y), but no demographic attributes. instead, we have demographic data for task b, a task related to but distinct from a. since there exist similarities between tasks a and b, we wish to utilize the demographic attributes (z) available for task b to obtain a fair classifier for task a. specifically, by using multi-task training to jointly train a model with both tasks a and b, with an added fairness loss supported by task b alone, we hope to produce a fair model for task a. employing a similar idea, we generalize our approach to intersectional fairness. we want to train classifiers for both tasks a and b, which consist of text data and target labels. we have demographic attributes for both a and b, but they are different attributes for each task, e.g. task a has gender attributes and task b has race attributes. since neither task has both attributes, we are unable to utilize an intersectional fairness loss to the tasks individually. therefore, we propose a multi-task objective to combine attributes from both tasks to obtain intersectional fairness. this section introduces our fairness definitions and losses, provides formal definitions of our training objectives and describes our training procedure. ## data while our method can transfer demographic fairness from one task to another when only one has demographic information, we need a dataset with multiple demographic attributes and attributes for each task to test intersectional fairness. we select datasets in varied domains: clinical text records, online reviews, and social media ( ## experiments this section describes baselines and model training. ## results & analysis multi-task fairness generalizes to tasks without demographics. we expected the stl-fair models to be an upper bound for fairness, and stl-base an upper bound for performance compared to the mtl-fair models. however, for 3/4 tasks, the mtl-fair models are fairer than the stl-fair counterparts! in these cases, the performance of the mtl-fair models is slightly worse than stl-fair models but still comparable to stl-base, obtaining models that are fairer while maintaining model performance. this suggests that just as multi-task learning finds representations that are useful for training multiple tasks, multi-task fairness learning corrects model representations to be fairer for both tasks -sometimes finding a fairness minimum that is fairer than it would with access to target task demographic attributes. this technique may be yielding more generalizable and fair representations. comparing to blind, we observe that blind yields fairer models than stl-base but less fair than stl-fair and our method mtl-fair. this suggests that when we have no demographic attributes, blind is better than not attempting fairness, but effectively using demographics, whether internally or in another task, increases the fairness of the models. in all settings, the multi-task fairness loss produced a model that is fairer than the single-task baseline without demographic attributes and with comparable performance. multi-task enables intersectional fairness. multi-task fairness generalizes across domains and tasks. so far we have assumed access to a task with demographic attributes available within the same domain, exploiting text similarities between the tasks to generalize the fairness across tasks. however, given the scarcity of datasets with demographic attributes, we may wonder whether domain similarity is necessary to transfer fairness. in why does the multi-task fairness loss work? the results in this section suggest that the multitask fairness loss produces more generalizable and fairer representations. we hypothesize that the combination of (a) the regularizing effect of the fairness loss, as suggested by prior work @xcite , (b) shared parameters across tasks and (c) the simultaneous learning of both tasks allows for positive fairness transfer. first, we note that multitask learning alone (b & c, mtl-base) or a fairness loss (a, stl-fair) may suffer in performance or fairness (or sometimes both) compared to our method. further, one could have shared parameters, b, but not train simultaneously by finetuning on individual tasks consecutively rather than simultaneously, a multi-task method also known as stilt @xcite . in appendix b we show that when the fairness loss is applied consecutively, rather than simultaneously, the fairness transfer effect is no longer observed. thus, the mtl objective plus the shared parameters are instrumental in enabling the positive transfer of the fairness loss from one task to another. ## conclusion we explored whether mtl methods for nlp tasks can transfer demographic fairness from one task to another. to achieve this, we adapted singletask fairness losses to multi-task settings to transfer fairness across tasks. we tested our method in multiple nlp datasets in different domains: clinical notes @xcite , online reviews @xcite and social media @xcite . we found that while mtl alone and other consecutive variations of mtl (e.g. stilts) do not help in fairness and may hurt performance, mtl methods with our fairness loss are able to debias models using the demographic attributes from a secondary task, opening up the possibility for producing fair models for a wide range of tasks that lack demographic data. this finding also informs future work on mtl, suggesting adding regularizers, e.g. fairness losses, can help in performance deficits found in prior work @xcite . additionally, we showed that mtl methods can debias models for intersectional fairness by leveraging two tasks, each with different demographic attributes, to learn a model that achieves intersectional fairness on both tasks. this finding opens up the integration of intersectional fairness losses to new applications and settings that were previously restricted by limited access to demographic attributes. finally, we test the ability of the mtl fairness loss to generalize fairness across domains and tasks, we find that the transfer of fairness is not dependent on domain or task similarity, but rather related to the performance of the secondary task. our methods increase the range of tasks that fairness methods can be applied to in the machine learning and nlp community, by allowing the use of external tasks that have demographic attributes to obtain fairer models.