Analyzing Gender Representation in Multilingual Models

Hila Gonen, Shauli Ravfogel, Yoav Goldberg

Abstract

Multilingual language models were shown to allow for nontrivial transfer across scripts and languages. In this work, we study the structure of the internal representations that enable this transfer. We focus on the representation of gender distinctions as a practical case study, and examine the extent to which the gender concept is encoded in shared subspaces across different languages. Our analysis shows that gender representations consist of several prominent components that are shared across languages, alongside language-specific components. The existence of language-independent and language-specific components provides an explanation for an intriguing empirical observation we make: while gender classification transfers well across languages, interventions for gender removal, trained on a single language, do not transfer easily to others.

Introduction

Multilingual models like mBERT have become the "Swiss Army knives" of Natural Language Processing (NLP). Trained on over a hundred languages simultaneously, these models exhibit a remarkable ability for "zero-shot transfer," where a task learned in one language (e.g., English) can be performed in another (e.g., French) without additional training. However, as these models are deployed in sensitive contexts, understanding how they represent social concepts like gender is critical. A central question remains: if we develop techniques to "debias" or remove gender information in one language, does that fix carry over to others?

Methodology

To investigate the geometry of gender representations, researchers employed three primary technical approaches:

  1. Linear Probing: Training simple logistic regression classifiers to predict gender from profession-based biographies (BiosBias and Multilingual BiosBias datasets). This measures the transferability of the gender signal.
  2. Iterative Nullspace Projection (INLP): An "amnesic" technique that identifies and removes directions in the vector space encoding gender, effectively attempting to make the model "blind" to gender.
  3. Principal Component Analysis (PCA): Used to analyze the structure of the "gender subspace" and compare the importance of specific directions across English, French, and Spanish.

The Transfer Paradox

The study uncovers a striking paradox: gender identification transfers almost perfectly across languages, but gender removal does not. An English-trained gender classifier achieves over 97% accuracy on French and Spanish data. However, when INLP is used to scrub gender from English representations (dropping English accuracy to near-random 53.7%), the same intervention has virtually no effect on French representations, where accuracy remains at 97.6%.

Cosine similarity and accuracy for English and French classifiers. While initial classifiers are similar, similarity drops quickly while target language accuracy remains high.

As shown in the figure above, while the first few gender directions are highly similar across languages (high cosine similarity), the similarity drops drastically for subsequent directions. Crucially, even as the directions become language-specific, they still provide enough signal for high-accuracy gender classification in the target language.

Partial Sharing of Gender Subspaces

This paradox is explained by the concept of "partial sharing." Gender is not represented by a single direction but by a subspace spanned by many directions. The most prominent directions are "universal" and shared across languages, allowing classifiers to transfer easily. However, there are dozens of "residual" directions that also encode gender but are unique to each language.

Explained variance across components for different language pairs. Removing shared gender components (e.g., EnGender) leaves significant language-specific variance intact.

PCA analysis confirms that while the dominant components of the gender subspace are shared, a significant portion of the variance is language-dependent. To successfully predict gender, a model only needs to find one shared direction. But to remove gender, every direction carrying the signal must be neutralized. Because many of these directions are language-specific, an intervention in English leaves the French "gender signals" largely intact.

Conclusion

The findings suggest that gender representation in multilingual models is a complex, multi-dimensional phenomenon. The existence of language-specific gender directions implies that debiasing efforts cannot rely solely on high-resource languages like English. For truly fair multilingual AI, researchers must develop intervention strategies that account for both the universal and the language-specific components of social concepts.

Summary updated

BibTeX
@inproceedings{gonen2022analyzing,
  author = {Hila Gonen and Shauli Ravfogel and Yoav Goldberg},
  title = {{Analyzing Gender Representation in Multilingual Models}},
  booktitle = {RepL4NLP @ ACL},
  year = {2022},
  doi = {10.18653/v1/2022.repl4nlp-1.8},
}
Figure