Measuring Societal Biases from Text Corpora with Smoothed First-Order Co-occurrence

Navid Rekabsaz, Robert West, James Henderson, Allan Hanbury

TL;DR

This paper introduces a novel "first-order" approach to measuring societal bias in text corpora by focusing on direct, smoothed co-occurrence relations between words. By reconstructing explicit co-occurrence estimates from word embeddings, the authors demonstrate that their method correlates more strongly with real-world U.S. job market statistics and avoids the "noise" of irrelevant context words that often plague standard vector-similarity measures.

What Problem Does This Paper Address?

Measuring bias in AI models often relies on word embeddings—dense vector representations where words with similar meanings are close together. The standard approach (like the Word Embedding Association Test, or WEAT) uses high-order measures, typically cosine similarity, to quantify bias. For example, to see if "nurse" is biased toward "female," researchers look at how similar the vector for nurse is to the vector for she.

However, the authors point out a significant flaw: high-order similarity captures not just direct associations, but also shared contexts. As shown in Figure 1, the similarity between nurse and she might be inflated by words like midwife or matron. While these words are related to nursing, they aren't necessarily pure representatives of the "female" concept. This "contextual noise" can introduce irrelevant concepts into bias measurements, potentially masking or distorting the true societal bias present in the text.

Figure 1: Word vectors with explicit dimensions. Estimating bias with similarity between the vectors also counts some (arguably) irrelevant context-words to the female concept (red dashed lines). The example is based on the results in

Methods

The authors propose a first-order bias measurement called AVERAGEFIRST. Instead of using cosine similarity between dense vectors, it calculates the average direct association between a target word and a set of concept-representative words (e.g., she, her, woman).

To make this work without running into the "sparsity" problem (where many words never appear together in the same sentence), they introduce Smoothed Explicit Representations:

  • eSG (explicit Skip-Gram): Reconstructs co-occurrence probabilities directly from the internal dot products of word2vec Skip-Gram vectors.
  • eGloVe (explicit GloVe): Reconstructs the original co-occurrence matrix that GloVe was trained to factorize.

These smoothed representations provide the benefits of direct co-occurrence counting while leveraging the generalization power of low-dimensional embeddings.

Datasets

  • Training Corpus: English Wikipedia (August 2017 dump), processed to ~197k unique words.
  • Evaluation Benchmarks:
    • Labor Data: Gender statistics for 40 occupations from the U.S. Department of Labor.
  • Census Data: Gender statistics for 96 occupations from the 2015 U.S. Census.
  • Occupational Word List: A broader set of 496 occupations used for qualitative analysis.

Key Insights and Ideas

  • High-Order vs. First-Order: High-order methods (like standard embeddings) are "second-order" or higher—they consider words similar if they share neighbors. First-order methods look at direct neighbors. For bias detection, direct neighbors are often more reliable.
  • Smoothing is Essential: Raw count-based metrics (like PMI) are too sparse for many applications. Reconstructing explicit vectors from embeddings acts as a powerful smoothing technique.
  • Sensitivity to Change: The first-order method is more sensitive to changes in the underlying corpus. When the authors used Counterfactual Data Augmentation (CDA) to balance the gender representation in the text, the AVERAGEFIRST metric reacted more quickly and clearly than high-order metrics.

Key Results

The authors found that their first-order approach consistently outperformed standard methods across multiple embedding models (PMI, GloVe, Skip-Gram).

  • Higher Correlation: The eSG model combined with AVERAGEFIRST achieved a Spearman correlation of 0.67 with Census Data, significantly higher than the 0.59 achieved by standard high-order Skip-Gram similarity (see Table 1).
  • Revealing Hidden Bias: The first-order method suggested a more severe female bias in occupations like nurse and housekeeper than previously detected. Figure 2 shows how these occupations move further toward the "female" association axis when measured with the first-order approach.
Figure 2: The associations of the occupations to the female and male concepts, indicating their inclinations towards the genders. The ones in the gray area are considered as unbiased. The occupations, inclined towards female and male are shown in purple and orange, respectively, where among them the gender-neutral ones, namely the occupations with stereotyped biases, have darker colors.
  • Distributional Shift: Histograms in Figure 3 confirm that the first-order measurement captures a wider and more severe range of female-associated biases in occupations that high-order methods tend to cluster closer to the "unbiased" center.
Figure 3: Histograms of the gender bias of the occupations, measured using AVERAGEHIGH and AVERAGEFIRST.

Limitations and Future Work

  • Binary Gender: The study treats gender as a binary construct (male/female), which the authors acknowledge is a simplification for practical measurement.
  • Language Scope: The experiments were limited to English.
  • Contextual Nuance: While first-order is better for occupational bias, the authors note that high-order methods might still be useful for other types of bias, such as stereotypical associations between colors (e.g., pink) and genders, which might rely more on shared cultural contexts.
  • Future Directions: Developing an "optimal" bias measurement that can selectively use higher-order information without introducing noise remains an open research question.

Summary updated

Abstract

Text corpora are widely used resources for measuring societal biases and stereotypes. The common approach to measuring such biases using a corpus is by calculating the similarities between the embedding vector of a word (like nurse) and the vectors of the representative words of the concepts of interest (such as genders). In this study, we show that, depending on what one aims to quantify as bias, this commonly-used approach can introduce non-relevant concepts into bias measurement. We propose an alternative approach to bias measurement utilizing the smoothed first-order co-occurrence relations between the word and the representative concept words, which we derive by reconstructing the co-occurrence estimates inherent in word embedding models. We compare these approaches by conducting several experiments on the scenario of measuring gender bias of occupational words, according to an English Wikipedia corpus. Our experiments show higher correlations of the measured gender bias with the actual gender bias statistics of the U.S. job market - on two collections and with a variety of word embedding models - using the first-order approach in comparison with the vector similarity-based approaches. The first-order approach also suggests a more severe bias towards female in a few specific occupations than the other approaches.
BibTeX
@inproceedings{rekabsaz2021measuring,
  author = {Navid Rekabsaz and Robert West and James Henderson and Allan Hanbury},
  title = {{Measuring Societal Biases from Text Corpora with Smoothed First-Order Co-occurrence}},
  booktitle = {ICWSM},
  year = {2021},
}
Figure