On the Interpretability and Significance of Bias Metrics in Texts: a PMI-based Approach

Francisco Valentini, Germán Rosati, Damián E. Blasi, Diego Fernández Slezak, Edgar AltszylerACL 2023 · DOI

Measuring bias in text has become a cornerstone of computational social science and AI ethics. For years, researchers have relied on word embeddings—complex mathematical representations of words—to uncover hidden stereotypes. However, these methods often feel like "black boxes": they tell us bias exists, but they don't clearly explain why or how certain we should be about the result.

In this paper, presented at ACL 2023, Francisco Valentini and colleagues propose a return to basics. By using Pointwise Mutual Information (PMI), they offer a metric that is not only as effective as word embeddings but is also significantly more interpretable and statistically robust.

The Problem: Transparency and Cost

Most current methods for measuring bias, such as the Word Embedding Association Test (WEAT), rely on the cosine similarity between word vectors. While effective, these methods suffer from two major drawbacks:

  1. Lack of Transparency: It is difficult to trace a bias score back to the raw text. If a model says "doctor" is biased toward "man," is it because they appear together often, or because they both appear near "hospital"?
  2. Computational Cost: Determining if a bias score is "statistically significant" usually requires permutation tests—shuffling the data thousands of times and recalculating—which is slow and computationally expensive.

The authors aim to provide a metric that is "intrinsically" interpretable (grounded in simple probabilities) and allows for standard, inexpensive statistical inference.

Methodology: $Bias_{PMI}$ and the Log Odds Ratio

The authors propose a new metric, $Bias_{PMI}$. Instead of comparing vector distances, they look at the difference in PMI between a target word (e.g., "nurse") and two context sets (e.g., female-associated words vs. male-associated words).

A key mathematical insight of the paper is that $Bias_{PMI}$ can be approximated by a log odds ratio. Because it follows an odds-ratio distribution, researchers can use a standard Z-test to calculate p-values and confidence intervals. This replaces the need for thousands of random permutations with a single, simple formula.

Comparison of p-value distributions for SGNS (top) and PMI (bottom) bias metrics.

This approach distinguishes between "first-order" associations (words appearing together) and "second-order" associations (words sharing similar contexts). While embeddings capture the latter, PMI captures the former, providing a more direct link to the source text.

Empirical Evaluation

The authors evaluated their metric on two massive text corpora: the 2014 English Wikipedia (1.2 billion tokens) and OpenSubtitles (2.4 billion tokens). To validate the bias measurements, they compared them against three "ground truth" datasets:

  • Occupations-gender: U.S. Bureau of Labor Statistics data on the percentage of women in various jobs.
  • Names-gender: U.S. Census data on the gender distribution of androgynous names.
  • Glasgow Norms: A dataset of 5,500 words rated by humans on a gendered scale.

Key Results

Despite its simplicity, the PMI-based metric produced results comparable to state-of-the-art embedding models like GloVe and Skip-gram with Negative Sampling (SGNS).

Pearson correlation (r) and weighted correlation between text-based bias metrics and ground truth datasets.

Across all experiments, $Bias_{PMI}$ showed strong Pearson correlation coefficients (ranging from roughly 0.50 to 0.84). Notably, when the authors used a "weighted" correlation—giving more weight to words with lower standard error—the performance of all models improved. This suggests that the statistical significance tools provided by the PMI method are highly effective at filtering out "noisy" bias estimates.

Conclusion

Interpretability is the standout feature of this approach. With $Bias_{PMI}$, researchers can make concrete statements; for instance, the authors found that in Wikipedia, it is 273% more likely to find the word "nurse" in the context of female words than male words. While embedding-based metrics are better at handling rare words through synonymy, the authors argue that PMI's requirement for direct co-occurrence actually prevents the metric from capturing obscure or misleading associations, leading to more reliable social science insights.

Summary updated

BibTeX
@inproceedings{valentini2023interpretability,
  author = {Francisco Valentini and Germán Rosati and Damián E. Blasi and Diego Fernández Slezak and Edgar Altszyler},
  title = {{On the Interpretability and Significance of Bias Metrics in Texts: a PMI-based Approach}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-short.44},
}
Figure