Resolving Gendered Ambiguous Pronouns with BERT

Matei Ionita, Yury Kashnitsky, Ken Krige, Vladimir Larin, Denis Logvinenko, Atanas Atanasov2019 · DOI

Abstract Pronoun resolution is part of coreference resolution, the task of pairing an expression to its referring entity. This is an important task for natural language understanding and a necessary component of machine translation systems, chat bots and assistants. Neural machine learning systems perform far from ideally in this task, reaching as low as 73% F1 scores on modern benchmark datasets. Moreover, they tend to perform better for masculine pronouns than for feminine ones. Thus, the problem is both challenging and important for NLP researchers and practitioners. In this project, we describe our BERT-based approach to solving the problem of gender-balanced pronoun resolution. We are able to reach 92% F1 score and a much lower gender bias on the benchmark dataset shared by Google AI Language team.

Introduction

Coreference resolution—the task of determining which entity a pronoun refers to—is a cornerstone of Natural Language Understanding (NLU). However, traditional models have historically exhibited a "gender gap," consistently performing better on masculine pronouns than feminine ones. This bias often stems from imbalances in training data, such as Wikipedia or news corpora, where male entities are more frequently mentioned.

To address this, Google AI released the GAP (Gendered Ambiguous Pronouns) dataset, a balanced benchmark designed to measure how well systems handle both genders. This paper describes a high-performing system developed for a Kaggle competition centered on this dataset, aiming for both high accuracy and "gender-agnostic" resolution.

The Coreference Resolution Task

The primary challenge involves resolving ambiguous pronouns in context. For example, in the sentence "John entered the room and saw Julia. She was talking with Mary Hendriks...", the system must determine if "She" refers to "Julia" or "Mary Hendriks".

Visualization of coreference resolution scores for a sample sentence, showing the model's confidence in linking pronouns to specific entities.

Methods

The proposed system is a sophisticated ensemble that combines two main strategies:

  1. Fine-tuned BERT Classifiers: Six BERT models were independently trained and modified to handle multiclass classification (choosing between Entity A, Entity B, or "Neither").
  2. Frozen Embedding MLPs: Embeddings were extracted from the intermediate layers of "frozen" (non-fine-tuned) BERT models. Research indicated that layers -4 to -6 (near the end but not the final layer) provided the most useful information for coreference.
  3. Hand-crafted Features: To supplement BERT, 69 additional features were included, such as syntactic roles (subject vs. direct object) extracted via SpaCy, positional distances between pronouns and entities, and predictions from external models like Stanford CoreNLP.

The final "Blend" model uses a weighted average of these components, leveraging fine-tuned BERT predictions while using frozen-embedding MLPs to smooth probability distributions.

Key Insights

  • The Power of Intermediate Layers: The authors confirmed that the "coreference signal" in Transformer models is localized in specific heads within deeper layers. Using embeddings from layers -4 to -6 outperformed the final layer.
  • Data Quality as a Bias Source: A striking finding was that the original GAP test set contained mislabeled instances biased against feminine pronouns. By correcting just 66 labels, the model became almost entirely gender-neutral.

Key Results

Performance was measured using Logarithmic Loss and F1 Score. A "Bias" metric ($B = F/M$) was also tracked, where 1.0 represents perfect parity between feminine and masculine performance.

Detailed performance metrics across different model configurations, showing Log-loss, Accuracy, and F1 scores broken down by gender (M/F) and the resulting bias score (B).

The "Blend" model achieved an overall F1 score of 0.911 (rising to 0.926 after label correction), significantly outperforming previous state-of-the-art models that struggled to break 0.73. Crucially, the system achieved a bias score ($B$) of 0.973 to 0.992, indicating near-identical performance regardless of gender.

Conclusion

While highly effective, the current ensemble is computationally intensive. Future work will investigate the specific semantic and syntactic information carried by different BERT layers to streamline the architecture. Additionally, the system will be benchmarked on other datasets like OntoNotes to ensure gender-neutral performance holds across diverse linguistic domains.

Summary updated

Abstract

Pronoun resolution is part of coreference resolution, the task of pairing an expression to its referring entity.This is an important task for natural language understanding and a necessary component of machine translation systems, chat bots and assistants.Neural machine learning systems perform far from ideally in this task, reaching as low as 73% F1 scores on modern benchmark datasets.Moreover, they tend to perform better for masculine pronouns than for feminine ones.Thus, the problem is both challenging and important for NLP researchers and practitioners.In this project, we describe our BERT-based approach to solving the problem of gender-balanced pronoun resolution.We are able to reach 92% F1 score and a much lower gender bias on the benchmark dataset shared by Google AI Language team.
BibTeX
@misc{ionita2019resolving,
  author = {Matei Ionita and Yury Kashnitsky and Ken Krige and Vladimir Larin and Denis Logvinenko and Atanas Atanasov},
  title = {{Resolving Gendered Ambiguous Pronouns with BERT}},
  year = {2019},
  doi = {10.18653/v1/w19-3817},
}
Figure