Contrastive Learning as a Polarizer: Mitigating Gender Bias by Fair and Biased sentences (2024)

Abstract: Recently, language models have accelerated the improvement in natural language processing. However, recent studies have highlighted a significant issue: social biases inherent in training data can lead models to learn and propagate these biases. In this study, we propose a contrastive learning method for bias mitigation, utilizing anchor points to push further negatives and pull closer positives within the representation space. This approach employs stereotypical data as negatives and stereotype-free data as positives, enhancing debiasing performance. Our model attained state-of-the-art performance in the ICAT score on the StereoSet, a benchmark for measuring bias in models. In addition, we observed that effective debiasing is achieved through an awareness of biases, as evidenced by improved hate speech detection scores. The implementation code and trained models are available at https://github.com/HUFS-NLP/CL_Polarizer.git.

## introduction social bias is a present and critical issue in natural language processing, thus resolving those gender, racial, and other demographic biases encoded in resources and models has been a matter of substantial concern @xcite @xcite . many of previous works to mitigate such bias relied on pre-defined target word lists, mainly used to obtain gender-swapped corpora @xcite or to adjust embedding associations of sentences with opposite target words @xcite . however, those methods based on curated word lists are said to lack extensibility for diverse * * corresponding author figure 1 : overview of the proposed method demographic groups other than binary gender @xcite and can inadvertently dilute information. furthermore, it has been particularly pointed out that conducting gender-swapping based on the word lists limits the representation space @xcite and generates nonsensical sentences such as 'he gave birth' @xcite . this result in a potential trade-off between language modeling ability and debiasing performance @xcite . unlike previous studies, we suggest a debiasing method focusing on social stereotypes themselves rather than nominal expressions referring to certain demographic groups (e.g. 'man','woman') in sentences. to avoid the aforementioned problems of simply swapping gendered subjects, we take an alternative approach by reversing the predication of gender bias, while leaving the subjects unchanged. with the assistance of chatgpt api foot_0 , we obtain the fairer counter-narratives, referred to as stereotypefree sentences, from gender stereotype samples. these sentences are used for the model's bias mitigation through contrastive learning steps for training pre-trained language models (plms). figure 1 shows an overview of proposed method. we assume that, by locating stereotypical sentences and stereotype-free sentences distant within representation space, one can make the model truly know what stereotypical associations are, eventually leading to the model's better performance at detecting or refraining from biased remarks. for this, we adopt contrastive learning @xcite , through which one can guide the model which data points' representation to be apart from, in this case gender bias, and which to be closer to. with a redesigned training objective, we perform contrastive learning on plms to make the model apart from the unfair social bias. the expriment was conducted over stereoset @xcite , a benchmark for measuring stereotypical and biased associations, where our debiased model yielded better idealized context association test (icat) score, outperforming other previous social bias mitigation frameworks. ## conclusion in this study, we introduced a novel approach via contrastive learning to mitigate social bias by adjusting the distances between anchor-positives and anchor-negatives. we directly used implicit stereotypes as negatives and trained the model to distance itself from these biases. our experiments demonstrated that our approach outperforms other methods in icat scores which is a evaluation metric for debiasing in language models. additionally, the improved performance of our proposed method on the hate speech detection task indicates that our method enables plms to better comprehend implicit biases.