Prompt Tuning Pushes Farther, Contrastive Learning Pulls Closer: A Two-Stage Approach to Mitigate Social Biases (2023)

Abstract: As the representation capability of Pre-trained Language Models (PLMs) improve, there is growing concern that they will inherit social biases from unprocessed corpora. Most previous debiasing techniques used Counterfactual Data Augmentation (CDA) to balance the training corpus. However, CDA slightly modifies the original corpus, limiting the representation distance between different demographic groups to a narrow range. As a result, the debiasing model easily fits the differences between counterfactual pairs, which affects its debiasing performance with limited text resources. In this paper, we propose an adversarial training-inspired two-stage debiasing model using Contrastive learning with Continuous Prompt Augmentation (named CCPA) to mitigate social biases in PLMs’ encoding. In the first stage, we propose a data augmentation method based on continuous prompt tuning to push farther the representation distance between sample pairs along different demographic groups. In the second stage, we utilize contrastive learning to pull closer the representation distance between the augmented sample pairs and then fine-tune PLMs’ parameters to get debiased encoding. Our approach guides the model to achieve stronger debiasing performance by adding difficulty to the training process. Extensive experiments show that CCPA outperforms baselines in terms of debiasing performance. Meanwhile, experimental results on the GLUE benchmark show that CCPA retains the language modeling capability of PLMs.

## introduction pre-trained language models (plms) have demonstrated outstanding performance in recent years and have been widely used in natural language understanding tasks @xcite . however, the powerful language modeling capability enables plms to learn good representations from large-scale training corpora while capturing human-like social biases. recent studies have demonstrated that the representations encoded by plms learn social biases specific to demographic groups (e.g., gender, race, religion) and can be amplified to downstream tasks, leading to unfair outcomes and adverse social effects @xcite . as a result, mitigating social biases in plms' encoding can improve the fairness of nlp systems significantly @xcite . most existing debiasing techniques first need to construct sample pairs using counterfactual data augmentation (cda) @xcite to balance the training corpora. the general approach of cda is to replace the original corpus with attribute words (e.g., he/she, man/woman) specific to different demographic groups. for example, rcda @xcite uses a generator to generate a large number of antisense sentences and then uses a discriminator to evaluate the quality of the original and antisense samples jointly. fairfil @xcite obtains a pair of positive sample sentences by replacing the attribute words in the training corpora with the antonyms and then uses contrastive learning to train a filter for debiasing. auto-debias @xcite uses pairs of attribute words as training corpora, amplifies the bias between sample pairs by searching biased prompt texts in the wikipedia vocabulary, and then performs semantic alignment using jensen-shannon divergence. these methods aim to mitigate social biases between different demographic groups by narrowing the representation distance between sample pairs. however, cda slightly modifies the original corpus, limiting the representation distance between different demographic groups to a narrow range. as a result, the debiasing model is easy to overfit the difference between counterfactual pairs, which affects its learning ability with limited text resources. as shown in figure 1 , it is difficult for plms to achieve the ideal debiasing performance for newly input samples with greater difficulty. in this work, we propose a two-stage debiasing method using contrastive learning with continuous prompt augmentation (named ccpa) to mitigate social biases in plms' encoding. inspired by adversarial training, our approach improves the debiasing ability of plms by first amplifying and then attenuating the bias between different demographic groups. specifically, we first use cda to replace attribute words in the original training corpus to construct counterfactual pairs corresponding to different demographic groups. in the first stage, we augment the positive sample pairs with continuous prompt tuning to increase the distance between them to amplify the biases between different demographic groups. in the second stage, we utilize contrastive learning to pull the distance between the positive sample pairs to attenuate the biases between different demographic groups. ccpa increases the difficulty of model fitting by expanding the representation space between sample pairs. we believe that difficult learning experiences make the model more powerful, thus improving the debiasing ability of plms training in corpora with limited resources. our main contributions are as follows: ## methodology in this section, we propose the contrastive learning with continuous prompt augmentation (ccpa) framework to mitigate the social bias in the encoding of plms specific to the most common gender bias. our proposed ccpa consists of two stages: 1) continuous prompt tuning and 2) fine-tuning with contrastive learning. the framework of ccpa is shown in figure 2 . ## experiments in this section, we conduct experiments to evaluate the performance of ccpa, in order to answer the following three research questions. q1. how effective is ccpa in mitigating social biases in plms' encoding? q2. how does each component affect ccpa? q3. will ccpa preserve the language modeling capability of plms? ## related work we divide debiasing methods into two categories based on the debiasing strategy: task-specific methods and task-agnostic methods. ## conclusions inspired by adversarial training, we propose ccpa, a two-stage debiasing model that combines contrastive learning with continuous prompts. in the continuous prompt tuning stage, we train a generator encoding continuous prompt embeddings to increase the representative distance between counterfactual pairs. in the fine-tuning stage, we use contrastive learning to reduce the representation distance between the augmented sample pairs. by increasing the difficulty of the training process, ccpa enables plms to learn a stronger debiasing ability. extensive experiments on bert and distilbert show that ccpa effectively reduces social bias in plm representation while retaining language modeling capability.