Quick Question A doctor is walking down the street with a boy. The - - PowerPoint PPT Presentation

quick question
SMART_READER_LITE
LIVE PREVIEW

Quick Question A doctor is walking down the street with a boy. The - - PowerPoint PPT Presentation

Quick Question A doctor is walking down the street with a boy. The boy is the doctors son, but the doctor is not the boys father. How is that possible? GENDER BIAS IN WORD EMBEDDINGS 1 Simple Answer The doctor is the boys


slide-1
SLIDE 1

GENDER BIAS IN WORD EMBEDDINGS

Quick Question

  • A doctor is walking down the street with a boy.

The boy is the doctor’s son, but the doctor is not the boy’s father. How is that possible?

1

slide-2
SLIDE 2

GENDER BIAS IN WORD EMBEDDINGS

Simple Answer

  • The doctor is the boy’s mother…

2

slide-3
SLIDE 3

Gender Bias in Word Embeddings

HILA GONEN AND YOAV GOLDBERG BAR ILAN UNIVERSITY WIDS TLV 5/3/19

ACCEPTED TO NAACL 2019

slide-4
SLIDE 4

GENDER BIAS IN WORD EMBEDDINGS

Outline

  • Background
  • Gender Bias
  • Word embeddings
  • Current debiasing methods
  • Post-processing (Bolukbasi et al.)
  • During training (Zhao et al.)
  • Analyzing debiased embeddings
  • Conclusion

4

slide-5
SLIDE 5

GENDER BIAS IN WORD EMBEDDINGS

What do we mean by gender bias?

5

slide-6
SLIDE 6

GENDER BIAS IN WORD EMBEDDINGS

What do we mean by gender bias?

5

slide-7
SLIDE 7

GENDER BIAS IN WORD EMBEDDINGS

What do we mean by gender bias?

6

slide-8
SLIDE 8

GENDER BIAS IN WORD EMBEDDINGS

What do we mean by gender bias?

6

slide-9
SLIDE 9

GENDER BIAS IN WORD EMBEDDINGS

What do we mean by gender bias?

(Zhao et al.,NAACL, 2018)

7

slide-10
SLIDE 10

GENDER BIAS IN WORD EMBEDDINGS

What do we mean by gender bias?

(Hendricks et al., 2018)

8

slide-11
SLIDE 11

GENDER BIAS IN WORD EMBEDDINGS

Word Embeddings

  • We will focus on gender bias in word embeddings

9

slide-12
SLIDE 12

GENDER BIAS IN WORD EMBEDDINGS

Word Embeddings

  • We will focus on gender bias in word embeddings

9

What are word embeddings?

slide-13
SLIDE 13

GENDER BIAS IN WORD EMBEDDINGS

Word Embeddings

  • Each word in the vocabulary is represented by a low

dimensional vector (~ )

  • All words are embedded into the same space
  • Similar words have similar vectors
  • (= their vectors are close to each other in the vector space)
  • Word embeddings are successfully used for various NLP

applications

10

slide-14
SLIDE 14

GENDER BIAS IN WORD EMBEDDINGS

Training Word Embeddings

  • Learned from raw data
  • The Distributional Hypothesis:
  • words that occur in the same contexts tend to have similar

meanings (Harris, 1954)

  • “You shall know a word by the company it keeps” (Firth, 1957)

11

slide-15
SLIDE 15

15 LANGUAGE MODELING FOR CODE SWITCHING 12

slide-16
SLIDE 16

16 LANGUAGE MODELING FOR CODE SWITCHING 12

slide-17
SLIDE 17

GENDER BIAS IN WORD EMBEDDINGS

Word Embeddings

  • TopK lists:

(Mikolov et al. 2013)

13

dog

slide-18
SLIDE 18

GENDER BIAS IN WORD EMBEDDINGS

Word Embeddings

  • TopK lists:

(Mikolov et al. 2013)

13

food

slide-19
SLIDE 19

GENDER BIAS IN WORD EMBEDDINGS

Word Embeddings

  • TopK lists:

(Mikolov et al. 2013)

13

nurse

slide-20
SLIDE 20

GENDER BIAS IN WORD EMBEDDINGS

Word Embeddings

  • TopK lists:

(Mikolov et al. 2013)

13

nurse

slide-21
SLIDE 21

GENDER BIAS IN WORD EMBEDDINGS

Bias in Word Embeddings

14

slide-22
SLIDE 22

GENDER BIAS IN WORD EMBEDDINGS

Bias in Word Embeddings

15

  • Caliskan et al. replicate a spectrum of known biases from the literature using

word embeddings

  • Show that text corpora contain several types of biases:
  • morally neutral as toward insects or flowers
  • problematic as toward race or gender
  • veridical, reflecting the distribution of gender with respect to careers or first names
  • Introduce methods for identifying these biases
slide-23
SLIDE 23

GENDER BIAS IN WORD EMBEDDINGS

Bias in Word Embeddings

16

slide-24
SLIDE 24

GENDER BIAS IN WORD EMBEDDINGS

Bias in Word Embeddings

17

Concepts 1 Concepts 2 Attributes 1 Attributes 2 Flowers: buttercup, daisy, lily Insects: ant, caterpillar, flea Pleasant: freedom, health, love Unpleasant: abuse, crash, filth European American names: Brad, Brendan African American names: Darnell, Lakisha Pleasant: joy, love, peace Unpleasant: agony, terrible Male attributes: male, man, boy Female attributes: female, woman, girl Math words: math, algebra, geometry Arts Words: poetry, art, dance

slide-25
SLIDE 25

GENDER BIAS IN WORD EMBEDDINGS

Definition of Gender Bias in Word Embeddings

18

(NIPS, 2016)

slide-26
SLIDE 26

GENDER BIAS IN WORD EMBEDDINGS

Definition of Gender Bias in Word Embeddings

19

  • We check how similar a word is to “he” and “she” (cosine similarity)
  • Note that we care about the difference between the two
  • This is the projection on the direction of “he – she”*

* This is the gender direction, can be computed using several pairs together (e.g. man-woman, brother-sister)

slide-27
SLIDE 27

GENDER BIAS IN WORD EMBEDDINGS

Definition of Gender Bias in Word Embeddings

20

Zhao et al.

  • bias(consultant) = -0.0023
  • bias(nurse) = -0.2471
  • bias(captain) = 0.1521
  • bias(table) = -0.0003
slide-28
SLIDE 28

GENDER BIAS IN WORD EMBEDDINGS

Reduce Bias after Training

  • Bolukbasi et al. suggest to remove bias after training:
  • Define a gender direction
  • Define inherently neutral words (nurse as opposed to mother)
  • Zero the projection of all neutral words on the gender direction:
  • The bias of all neutral words is now zero by definition
  • We will address these embeddings as HARD-DEBIASED

21

Projection of on gender direction 𝑥

slide-29
SLIDE 29

GENDER BIAS IN WORD EMBEDDINGS

Reduce bias during training

(EMNLP, 2018)

22

slide-30
SLIDE 30

GENDER BIAS IN WORD EMBEDDINGS

Reduce bias during training

  • Zhao et al. suggest to reduce bias during training:
  • Train word embeddings using GloVe (Pennington et al., 2014)
  • Alter the loss to encourage the gender information to concentrate in the last

coordinate

  • To ignore gender information – simply remove the last coordinate

23

slide-31
SLIDE 31

GENDER BIAS IN WORD EMBEDDINGS

Reduce bias during training

  • Details:
  • Use two groups of male/female seed words, and encourage words from

different groups to differ in their last coordinate

  • Encourage the representation of neutral-gender words (excluding the last

coordinate) to be orthogonal to the gender direction

  • We will address these embeddings as GN-GLOVE

24

slide-32
SLIDE 32

GENDER BIAS IN WORD EMBEDDINGS

Some Results

25

  • Bolukbasi et al.:
  • Bias of all inherently-neutral words is zero by definition
  • Generated analogies are less stereotyped
  • Zhao et al.:
  • Decrease bias in co-reference resolution
slide-33
SLIDE 33

GENDER BIAS IN WORD EMBEDDINGS

Problem solved?

26

slide-34
SLIDE 34

GENDER BIAS IN WORD EMBEDDINGS

Problem solved?

26

  • Not so fast…
slide-35
SLIDE 35

GENDER BIAS IN WORD EMBEDDINGS

Clustering male- and female- biased words

27

  • We take the most biased words in the vocabulary according to the
  • riginal bias (500 male-biased and 500 female-biased)
  • We cluster them into two clusters using K-means
  • The clusters align with gender with accuracy of:
  • 92.5% compared to 99.99% (HARD-DEBIASED)
  • 85.6% compared to 100% (GN-GLOVE)
slide-36
SLIDE 36

GENDER BIAS IN WORD EMBEDDINGS

Clustering male- and female- biased words

28

HARD-DEBIASED GN-GLOVE

slide-37
SLIDE 37

GENDER BIAS IN WORD EMBEDDINGS

Bias-by-neighbors

  • Bias is still manifested by the word being close to socially-marked

feminine words

  • A new mechanism for measuring bias:
  • The percentage of male/female socially-biased words among the k

nearest neighbors of the target word

  • Pearson correlation with bias-by-projection:
  • 0.686 compared to 0.741 (HARD-DEBIASED)
  • 0.736 compared to 0.773 (GN-GLOVE)

29

slide-38
SLIDE 38

GENDER BIAS IN WORD EMBEDDINGS

Professions

  • We take a predefined list of professions
  • We show correlation between the bias-by-projection and bias-by-

neighbors, before and after debiasing

30

slide-39
SLIDE 39

GENDER BIAS IN WORD EMBEDDINGS

Professions

31

HARD-DEBIASED GN-GLOVE

slide-40
SLIDE 40

GENDER BIAS IN WORD EMBEDDINGS

Association with stereotyped words

32

  • We evaluate the association between female/male names and

female/male stereotyped words (experiments taken from Caliskan et al.)

  • All the associations have very small p-values

Female-associated Male-associated names Amy, Joan, Lisa John, Paul, Mike family vs. carrer home, parents, children executive, management, professional arts vs. math poetry, art, dance math, algebra, geometry arts vs. science dance, literature, novel science, technology, physics

slide-41
SLIDE 41

GENDER BIAS IN WORD EMBEDDINGS

Classifying to gender

33

  • Can a classifier learn to generalize from some gendered words to
  • thers based only on their representations?

5000 most biased words 1000 4000

test train SVM

slide-42
SLIDE 42

GENDER BIAS IN WORD EMBEDDINGS

Classifying to gender

34

  • Results:
slide-43
SLIDE 43

GENDER BIAS IN WORD EMBEDDINGS

Conclusion

35

  • Word embeddings exhibit gender bias
  • Debiasing is hard!
  • Social gender bias is picked up from the data by the models
  • A lot of the bias information is still recoverable

(even when the bias is low/zero according to the definition usually used)

  • The way we define the bias is important, and needs to be

reconsidered when trying to solve the problem

slide-44
SLIDE 44

GENDER BIAS IN WORD EMBEDDINGS

Questions?

36

slide-45
SLIDE 45

GENDER BIAS IN WORD EMBEDDINGS

Thank you!

37