Measuring Gender Bias in West Slavic Language Models

Sandra Martinková, Karolina Stanczak, Isabelle Augenstein

Abstract

Pre-trained language models have been known to perpetuate biases from the underlying datasets to downstream tasks. However, these findings are predominantly based on monolingual language models for English, whereas there are few investigative studies of biases encoded in language models for languages beyond English. In this paper, we fill this gap by analysing gender bias in West Slavic language models. We introduce the first template-based dataset in Czech, Polish, and Slovak for measuring gender bias towards male, female and non-binary subjects. We complete the sentences using both mono- and multilingual language models and assess their suitability for the masked language modelling objective. Next, we measure gender bias encoded in West Slavic language models by quantifying the toxicity and genderness of the generated words. We find that these language models produce hurtful completions that depend on the subject's gender. Perhaps surprisingly, Czech, Slovak, and Polish language models produce more hurtful completions with men as subjects, which, upon inspection, we find is due to completions being related to violence, death, and sickness.

Introduction

Algorithmic bias research has historically focused on high-resource, non-gendered languages like English. However, West Slavic languages—Czech, Polish, and Slovak—present unique challenges due to their "gendered" grammar, where nouns, adjectives, and verbs change based on the subject's gender. This study investigates whether Large Language Models (LLMs) perpetuate harmful stereotypes in these languages and evaluates the fluency of multilingual models in this context.

Methodology and Datasets

The researchers employed a template-filling task using Masked Language Modeling (MLM). Models were tasked with filling a "mask" in sentences like "The [gendered subject] is a [MASK]". To quantify bias, two primary metrics were used:

  1. HONEST Score: Measures toxicity by comparing completions against HurtLex, a multilingual lexicon of hurtful words.
  2. VAD Lexicon: Measures affective dimensions: Valence (pleasantness), Arousal (intensity), and Dominance (control).

The study introduced a new dataset of 923 sentence templates per language, including masculine, feminine, neutral, and non-binary categories. These templates were either manually created by native speakers or translated from existing Scandinavian benchmarks.

Examples of gendered templates in Czech with English translations and gender labels.

Key Results

Fluency and Toxicity

A significant finding was that multilingual models like m-BERT and XLM-R often failed the "fluency test," producing grammatically nonsensical or hallucinated completions. In contrast, monolingual models (Czert, SlovakBERT, PolBERT) were fluent but exhibited clear biases.

Toxicity levels, measured via HONEST scores, were notably higher than those reported in similar studies for Scandinavian languages. Interestingly, Czech and Slovak models showed higher toxicity for male subjects, often associating them with violence and death. In contrast, the Polish model (PolBERT) exhibited higher toxicity toward female subjects.

Heatmap of HONEST scores for SlovakBERT, Czert, and PolBERT across different gender categories and template types.

Affective Dimensions (VAD)

The VAD analysis revealed no substantial differences in Valence, Arousal, or Dominance across genders. This suggests that the bias in West Slavic models is primarily found in the specific content (toxicity) rather than the emotional tone of the generated words. For instance, non-binary subjects often received lower toxicity scores, likely because models default to neutral terms like "person" due to a lack of specific training data on non-binary identities.

Conclusion

This research highlights the regional variance of gender bias and the limitations of multilingual models in West Slavic contexts. While monolingual models are more fluent, they encode significant regional stereotypes. Future work will address the quality of automated lexicons like HurtLex and expand to intersectional bias analysis, such as the interaction of gender with race or age.

Summary updated

Abstract

Pre-trained language models have been known to perpetuate biases from the underlying datasets to downstream tasks. However, these findings are predominantly based on monolingual language models for English, whereas there are few investigative studies of biases encoded in language models for languages beyond English. In this paper, we fill this gap by analysing gender bias in West Slavic language models. We introduce the first template-based dataset in Czech, Polish, and Slovak for measuring gender bias towards male, female and non-binary subjects. We complete the sentences using both mono- and multilingual language models and assess their suitability for the masked language modelling objective. Next, we measure gender bias encoded in West Slavic language models by quantifying the toxicity and genderness of the generated words. We find that these language models produce hurtful completions that depend on the subject's gender. Perhaps surprisingly, Czech, Slovak, and Polish language models produce more hurtful completions with men as subjects, which, upon inspection, we find is due to completions being related to violence, death, and sickness.
BibTeX
@misc{martinkova2023measuring,
  author = {Sandra Martinková and Karolina Stanczak and Isabelle Augenstein},
  title = {{Measuring Gender Bias in West Slavic Language Models}},
  year = {2023},
  eprint = {2304.05783},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.05783},
}
Figure