Mitigate Extrinsic Social Bias in Pre-trained Language Models via Continuous Prompts Adjustment (2024)

Abstract: Although pre-trained language models (PLMs) have been widely used in natural language understandings (NLU), they are still exposed to fairness issues. Most existing extrinsic debiasing methods rely on manually curated word lists for each sensitive groups to modify training data or to add regular constraints. However, these word lists are often limited by length and scope, resulting in the degradation performance of extrinsic bias mitigation. To address the aforementioned issues, we propose a **C**ontinuous **P**rompts **A**djustment **D**ebiasing method (CPAD), which generates continuous token lists from the entire vocabulary space and uses them to bridge the gap between outputs and targets in fairness learning process. Specifically, CPAD encapsulates fine-tuning objective and debiasing objectives into several independent prompts. To avoid the limitation of manual word lists, in fairness learning phase, we extract outputs from the entire vocabulary space via fine-tuned PLM. Then, we aggregate the outputs from the same sensitive group as continuous token lists to map the outputs into protected attribute labels. Finally, after we learn the debiasing prompts in the perspective of adversarial learning, we improve fairness by adjusting continuous prompts at model inference time. Through extensive experiments on three NLU tasks, we evaluate the debiasing performance from the perspectives of group fairness and fairness through unawareness. The experimental results show that CPAD outperforms all baselines in term of single and two-attributes debiasing performance.

## introduction pre-trained language models (plms), such as bert @xcite , roberta @xcite and albert @xcite , have been widely adopted in natural language understandings (nlu) due to their outstanding capacities of learning linguistic and factual information. however, recent studies @xcite have demonstrated that plms often encode undesirable social biases and harmful stereotypes, which may lead to an unfair allocation of social resources. prior methods of intrinsic bias mitigation @xcite focus on removing demographic information in representations of plms. however, existing work @xcite has shown that even removing certain stereotypes in plms before they are applied into downstream tasks, unwanted bias will re-enter in the fine-tuned language models. therefore, we are interested in removing extrinsic social bias, which improves fairness in a task-specific way. existing extrinsic debiasing methods rely on manually curated word lists (e.g., "he" or "she" for gender). for example, causal-debias @xcite replaces sensitive tokens in manually word lists to construct environments and removes spurious correlation via causal invariant learning. clp @xcite substitutes sensitive tokens in word list and uses counterfactual logit pairing to satisfy counterfactual token fairness. gender-tuning @xcite generates gender-perturbed examples using manually word lists and integrates masked language modeling (mlm) training objectives into the fine-tuning process. however, word lists are often limited by length and scope. for some protective attributes like race, it is difficult to design representative vocabularies intuitively due to the semantic constaints of words. prior word lists @xcite often use name as proxy of race, which tend to occur less frequently in downstream tasks. therefore, the diversity of sensitive groups covered by these word lists may be insufficient, resulting in the degradation performance of extrinsic bias mitigation. in this works, we propose a continuous prompts adjustment debiasing method (cpad), which gen-erates continuous token lists from the entire vocabulary space and uses them as the mapping of targets in fairness learning process. the proposed cpad can be deemed a form of prompt-tuning, where we encapsulate nlu tasks into prompt templates to lead plms in generating outputs at mask positions, and then use verbalizers to bridge the gap between the outputs and the target labels. specifically, we employ various prompts as additional inputs to steer the plm towards generating outputs related to downstream tasks or outputs that can remove demographic information. given that discrete prompts are insufficient for fairness learning, following p-tuning @xcite , we learn continuous prompts to circumvent the limitations of them. to avoid the use of manual word list in verbalizers, we first extract outputs from the entire vocabulary space via fine-tuned plm. then, we aggregate the outputs of the same sensitive group based on protected attribute labels as a continuous token list for that group. third, we employ adversarial optimization objectives to update the continuous debiasing prompts. finally, to improve generation abilities to meet different social groups, we incorporate several prompts to make a trade-off between fairness and modeling ability at the inference time. our contributions can be summarized as follows: ## problem statement let d be a training dataset composed of texts {x 0 , x 1 , ..., x n } and task labels {y 0 , y 1 , ..., y n }. we denote @xmath0, a 1 , .., a m } as the categories of protected attributes. plms might mistakenly capture the stereotypical associations between protected attributes and labels, leading to biased predictions. we focus on the scenario where a protected attribute a j involves only two sensitive groups {g 0 j , g 1 j }. each text x i is also associated with a series of protected attribute labels {z 0 i , z 1 i , ..., z m i }, where z j @xmath1, 1} denotes a sensitive group g k @xmath2, g 1 j } of text x i related to protected attribute a j . the purpose of bias mitigation is to make plms exhibit no preference for any sensitive group, while preventing them from leaking demographic information in the outputs. in order to fit downstream tasks, we adjust continuous prompts to the original text x i linearly as the input of pre-trained language models (plms) m θ . in this work, we first obtain continuous prompts through pseudo tokens and prompt encoders, as explained in p-tuning @xcite . next, we update several continuous prompts using gradient descent to achieve different objectives. specifically, in task-specific learning phase, we learn the task-specific prompts [h t 0:u ], where u denotes the length of the continuous prompts. then, in debiasing learning phases, we train a set of debiasing learning prompts @xmath3:u ], [h 1 0:u ], ..., [h m 0:u ]}, where [h j 0:u ] is the continuous prompt of protected attribute a j . finally, we encapsulate debiasing concept into several continuous prompts, and apply them with the taskspecific prompt at inference time. for simplicity, we define a classifier f as a plm m θ with all continuous prompts. our goal is to train the classifier f that accurately predicts the task labels y i for a text x i without the leakage of protected attributes a. that is, ## methodology in this section, we aim to present cpad to mitigate social bias in a task-specific way, which can be divided into three phases: 1) the task-specific learning phase, aiming to learn a task-specific prompt and fine-tune the plm to enhance the performance on downstream task; 2) the debiasing learning phase, which generating continuous token lists as verbalizers and encoding the protected attribute debiasing learning prompt encoder task-specific prompt encoder debiasing learning prompt encoder debiasing learning prompt encoder task-specific prompt encoder plm ℳ task-specific learning phase (protected attribute 0) ℒ plm ℳ plm ℳ ## conclusion in this work, we introduce cpad, which generates continuous token lists from the entire vocabulary space and uses them as the mapping of targets in fairness learning process. we also present a new fairness metric in term of fairness through unawareness. notably, our proposed method and metric are compatible with many prompt-based methods. results across three nlu tasks show that cpad is effective on multiple categories of bias mitigation.