Measuring and Mitigating Gender Bias in Legal Contextualized Language Models

Mustafa Bozdag,Nurullah Sevim,Aykut Koç
DOI: https://doi.org/10.1145/3628602
IF: 4.157
2023-10-18
ACM Transactions on Knowledge Discovery from Data
Abstract:Transformer-based contextualized language models constitute the state-of-the-art in several natural language processing (NLP) tasks and applications. Despite their utility, contextualized models can contain human-like social biases as their training corpora generally consist of human-generated text. Evaluating and removing social biases in NLP models has been a major research endeavor. In parallel, NLP approaches in the legal domain, namely legal NLP or computational law, have also been increasing. Eliminating unwanted bias in legal NLP is crucial since the law has the utmost importance and effect on people. In this work, we focus on the gender bias encoded in BERT-based models. We propose a new template-based bias measurement method with a new bias evaluation corpus using crime words from the FBI database. This method quantifies the gender bias present in BERT-based models for legal applications. Furthermore, we propose a new fine-tuning-based debiasing method using the European Court of Human Rights (ECtHR) corpus to debias legal pre-trained models. We test the debiased models’ language understanding performance on the LexGLUE benchmark to confirm that the underlying semantic vector space is not perturbed during the debiasing process. Finally, we propose a bias penalty for the performance scores to emphasize the effect of gender bias on model performance.
computer science, information systems, software engineering
What problem does this paper attempt to address?