Abstract
Gender bias in Natural Language Processing (NLP) models often stems from skewed training data. While Counterfactual Data Augmentation (CDA)—swapping gendered terms to balance datasets—is effective in English, it fails in morphologically rich languages where gender agreement affects multiple parts of speech. This paper presents a novel CDA approach using Markov Random Fields (MRF) to propagate gender changes across dependency trees. Evaluated on Spanish, French, Hebrew, and Italian, the method reduces gender bias by approximately 2.5x while preserving grammatical integrity.
Introduction
Most research into mitigating gender bias focuses on English, where gender is primarily reflected in pronouns. However, in many languages, gender is a pervasive grammatical feature. For instance, in the Spanish phrase El ingeniero experto (The [masc] engineer [masc] skilled [masc]), changing the noun to the feminine ingeniera requires corresponding changes to the article (La) and adjective (experta). Naive swapping leads to ungrammatical "gibberish" that degrades model performance. This work introduces a structured framework to generate grammatical counterfactual sentences, enabling effective debiasing in languages with complex morphology.
Methodology
The proposed system follows a four-stage pipeline to transform sentences while maintaining grammatical agreement:
- Analysis: Sentences are parsed into dependency trees with morpho-syntactic tags (e.g., NOUN, MSC, SG) using Universal Dependencies standards.
- Intervention: The gender tag of a target animate noun is flipped (e.g., Masculine to Feminine).
- Inference: A Markov Random Field (MRF) is applied over the dependency tree. The MRF treats grammatical tags as latent variables, ensuring that the intervention at the root noun propagates correctly to dependent articles, adjectives, and verbs.
- Reinflection: A neural model generates the final surface forms based on the updated tags and original word lemmata.
The researchers utilized Universal Dependencies treebanks for training and Wikipedia dumps to evaluate the extrinsic impact on neural language models. Animacy gazetteers derived from WordNet helped identify human-referent nouns for intervention.
Results and Discussion
The MRF-based approach demonstrated high technical proficiency, achieving tag-level F1 scores of 83% for Spanish and 72% for Hebrew. Crucially, the augmented data significantly reduced gender stereotyping in trained models.
As shown in the results, the MRF approach consistently reduces gender bias compared to the original data while maintaining much higher grammaticality than naive swapping. In Spanish, for example, naive swapping drastically reduces grammaticality, whereas the MRF method preserves it near original levels. This suggests that grammatical agreement rules are regular enough that structured probabilistic models can effectively capture them without requiring massive neural architectures.
Conclusion
This research demonstrates that treating grammatical agreement as a structured constraint allows for effective data augmentation in non-English languages. While the model currently struggles with document-level co-reference and complex conjunctions, it provides a robust foundation for building fairer NLP systems globally. Future work will focus on extending these constraints across sentence boundaries to ensure document-wide gender consistency.
Summary updated