Paper commentary
Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddings
Word embeddings can be debiased while keeping their useful structure
- Problem Word embeddings trained on Google News absorb gender stereotypes, such as tying computer programmer to man and homemaker to woman. Downstream systems reuse these vectors, so the bias spreads into search and other applications.
- Method Hard debiasing finds a gender direction from ten gender word pairs. It then removes that direction from gender-neutral words and equalizes the pairs that should differ only in gender.
- Results Hard debiasing lowered the stereotyped share of the top 150 she-he analogies from 19% to 6% by crowd majority judgement.
Why gender bias in embeddings matters
A word embedding gives each word a vector, and those vectors are reused as features in many applications, such as search ranking. Because the same vectors serve many systems, a bias stored in them reaches every system that reads them, which can amplify the bias rather than only reflect it.
The analogy arithmetic that makes embeddings useful also exposes bias: with computer programmer as the seed, the same arithmetic returns homemaker as the female counterpart. The Google News embedding likewise maps a father to a doctor in the way a mother maps to a nurse.
In a search setting, pages that differ only in a student's name may be ranked differently when the embedding places computer science terms closer to male names.
The study concentrates on gender in English embeddings, with the w2vNEWS embedding as its main object, and asks whether the bias can be located geometrically and then reduced.
Finding a gender direction
The method starts from gender pairs, word pairs that differ mainly in gender, such as she and he. If every pair had the same vector difference, that difference would define gender, but the differences vary: pairs carry different biases, some words have other senses, and finite word counts add noise.
To check that the pairs reflect the crowd notion of gender, crowd workers listed definitional and stereotypical gendered words. Using the most frequent 50 female and 50 male suggestions in each list, the she-he pair classifies definitional female words with 92% accuracy and stereotypical female words with 89% accuracy.
The ten pair difference vectors were normalized to unit length and analyzed with principal component analysis. The first component explains much more variance than the others, while random unit vectors in 300 dimensions, averaged over 1,000 draws of ten vectors, lose variance much more gradually. The top component is taken as the gender direction g, while the gender subspace may need more dimensions in general.
Measuring direct and indirect bias
Direct bias is defined over a set N of gender-neutral words as the average of the absolute cosine between each word vector and g, raised to the power c. \( \mathrm{DirectBias}_c = \frac{1}{|N|} \sum_{w \in N} |\cos(\vec w, g)|^c \) The exponent c sets how strict the measure is: with c = 0 a word contributes 1 unless its cosine with g is zero, and with c = 1 each word contributes in proportion to its cosine.
Direct bias alone misses indirect bias: removing gender-pair words and words such as beard or uterus still leaves receptionist closer to softball than to football. Indirect bias is therefore measured on neutral words themselves.
The gender component β between two vectors w and v splits their similarity into a part explained by the gender subspace. Each vector is split into its gender part and an orthogonal remainder, and β compares the inner product of the two vectors with the inner product of the remainders after renormalizing, relative to the original inner product.
β(w, w) is 0, β is 0 when neither vector has a gender part, and β is 1 when both remainders are zero.
Checking the direction against crowd stereotypes
Occupation words were projected onto the she-he direction and compared with crowd ratings, where each word received a 0 to 10 stereotypicality score from ten workers. The projections correlate with these ratings at Spearman ρ = 0.51. Occupations were used because they are easy for people to judge and often carry common stereotypes, and she and he were chosen because they are frequent and have fewer competing senses than woman or man.
The same occupation projections were computed for a GloVe embedding trained on web-crawl text. The two embeddings agree closely, at Spearman ρ = 0.81. The authors read this as evidence that the stereotype is not an artifact of the Google News corpus or of word2vec training.
The analogy generator takes a seed pair a, b and scores candidate pairs x, y by the cosine between a - b and x - y, provided the two words are within the distance threshold. \( S_{(a,b)}(x,y) = \cos(\vec a - \vec b, \vec x - \vec y) \) if \( \lVert \vec x - \vec y \rVert \le \delta \), otherwise 0. The threshold δ is 1 in all experiments, which corresponds to an angle of π/3 between unit vectors, and the top-scoring pairs are output with each x used only once.
For each generated analogy, ten U.S.-based crowd workers answered two yes/no questions: whether the pair makes sense as an analogy and whether it reflects a gender stereotype. Of 150 analogies from w2vNEWS, 72 were rated gender-appropriate and 29 were rated as stereotyped by five or more workers.
What hard debiasing changes
Hard debiasing first identifies a subspace B of k orthogonal unit vectors from defining sets D_i, using the mean of each set and a matrix C of within-set deviations. B is the first k rows of the SVD of C, and the projection of a vector v onto B is the sum of (v · b_j) b_j.
Neutralize takes each gender-neutral word, removes its component in B, and rescales the rest to unit length. \( \vec w := (\vec w - \vec w_B)/\lVert \vec w - \vec w_B \rVert \) Neutralize makes the neutral word zero in the gender subspace.
Equalize works on each equality set E: it takes the mean of the set, splits off its component inside B, and keeps the shared part ν = µ - µ_B outside B. Each word of E is then rebuilt as ν plus the unit vector along w_B - µ_B, scaled by √(1 - ‖ν‖²). \( \vec w := \nu + \sqrt{1-\lVert \nu \rVert^2}\,(\vec w_B - \mu_B)/\lVert \vec w_B - \mu_B \rVert \)
Inside B the words are centered before scaling, which keeps a pair such as male and female symmetric about the origin. Without centering, the two words would receive the same embedding and analogies that depend on their difference would be lost.
After steps 1 and 2a, a gender-neutral word has the same inner product and the same distance to every word in an equality set, and PairBias is zero. The argument uses that the difference of two equalized words lies entirely in B, where the neutral word has no component.
Equalize removes distinctions that some applications need, such as the regulation sense of grandfather that grandmother lacks. Soften is the alternative that reduces the differences between equality sets while staying close to the original embedding, governed by a trade-off parameter.
Soft bias correction as a trade-off
Soft bias correction learns a linear transformation T that preserves pairwise inner products among all word vectors while penalizing the projection of gender-neutral vectors onto B. \( \min_T \lVert (TW)^T(TW) - W^T W \rVert_F^2 + \lambda \lVert (TN)^T (TB) \rVert_F^2 \) The output embedding is normalized to unit length, and the optimization is a semi-definite program.
The parameter λ balances the two goals; as λ grows, T removes the projection onto B from the neutral vectors, which matches the hard step. The experiments use λ = 0.2.
Choosing which words to neutralize
Because gender-specific words are fewer, the method lists them and treats the complement as the gender-neutral set N. A base list S0 of 218 words was derived from dictionary definitions within the 26,377 words of w2vNEWS. A linear Support Vector Machine with default regularization C = 1.0 was trained on that list and applied to the remaining words of the full 3 million word embedding, giving a gender-specific set S of 6,449 words.
The classifier was checked with stratified 10-fold cross-validation, with the regularization parameter tuned by nested cross-validation. The plain binary accuracy is well over 99%, which reflects the imbalance between the two classes.
Effects of debiasing on analogies and benchmarks
Under the same crowd protocol, hard debiasing lowers the stereotyped share of the top 150 she-he analogies from 19% to 6% by majority judgement. The analogy he to doctor, which returned nurse for she before debiasing, returns physician after it.
Gender-appropriate analogies are kept: she to ovarian cancer still maps to he to prostate cancer, and the number of appropriate analogies stays similar to the original embedding.
On RG, WS and MSR-analogy, the hard-debiased embedding scores 62.4, 54.1 and 57.0, against 62.3, 54.5 and 57.0 before debiasing. The soft-debiased scores are 62.4, 54.2 and 56.8. These benchmarks were run on a subset of the vocabulary, so the scores are lower than previously published values.
Soft debiasing was less effective than hard debiasing at removing gender bias.
Along the softball-football direction, receptionist has a gender component of 67% relative to softball, waitress 35% and homemaker 38%. Relative to football, businessman has 31% and maestro 42%. After hard debiasing, the most extreme words toward softball are pitcher, infielder and major leaguer, and receptionist and waitress are no longer among the top five.
Pitcher and footballer are essentially unchanged, since their similarities come from their functions rather than gender. The indirect-bias gain is shown qualitatively, because no ground truth for indirect bias is available.
Limitations
The analysis covers English embeddings only, and applicability to languages with grammatical gender, where most nouns carry a gender marker, is left for future work.
The same embedding also shows strong racial stereotypes, and this study does not remove them; the authors call racial, ethnic and cultural bias a subtle issue for future work.
Crowd judgements come from U.S.-based workers chosen for homogeneity, and they rate stereotypes rather than personal bias.
Benchmarks were run on a subset of the vocabulary, soft debiasing was less effective, and indirect bias was checked only qualitatively.
Paper info
- Authors
- Tolga Bolukbasi, Kai-Wei Chang, James Zou, Venkatesh Saligrama, Adam Kalai
- Venue
- arXiv · Preprint
- First published
- 2016-7-21
- Added
- 2026-11-12
- Updated
- 2016-7-21
- Version
- v1
- arXiv
- 1607.06520
- Category
- cs.CL · cs.AI · cs.LG · stat.ML
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Tolga Bolukbasi, Kai-Wei Chang, James Zou, Venkatesh Saligrama, Adam Kalai (2016). Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddings. arXiv:1607.06520v1. https://arxiv.org/abs/1607.06520v1
BibTeX
@misc{bolukbasi2016computer,
title = {{Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddings}},
author = {Tolga Bolukbasi and Kai-Wei Chang and James Zou and Venkatesh Saligrama and Adam Kalai},
year = {2016},
eprint = {1607.06520},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1607.06520v1}
}