SlideShare una empresa de Scribd logo
1 de 21
Descargar para leer sin conexión
NEUTRALISING BIAS ON WORD
EMBEDDINGS
–Wilder Rodrigues
Wilder Rodrigues
• Machine Learning Engineer at Quby;
• Coursera Mentor;
• City.AI Ambassador;
• School of AI Dean [Utrecht]
• IBM Watson AI XPRIZE contestant;
• Kaggler;
• Public speaker;
• Family man and father of 3.
@wilderrodrigues
https://medium.com/@wilder.rodrigues
How do you see racism?
• Before you proceed, please watch this video: https://www.youtube.com/watch?v=5F_atkP3pqs
• The audio is in Portuguese, but in the next slide you will find translations for what people said in the
interviews.
Source: Canal deTV da FAP (Astrojildo Pereira Foundation)
Translations
• Group 1
• He is late;
• She is a fashion designer;
• Holds an executive position in either the HR
or Finance area;
• Taking care of his garden. Doesn’t look like a
gardener;
• She is cleaning her own house; the countertop;
• Graffiti artist; it’s an art, it’s not vandalism.
• Group II
• Vandalising the wall; she is a spitter;
• She is a housekeeper; cleaning the house;
• He is a gardener;
• He looks like a security guard or a
chauffeur;
• Seamstress; saleswoman;
• He is running away; he is a thief.
Unconscious bias
• Blue is for boys, pink for girls.
• Boys are better at maths and science.
• Tall people make better leaders.
• New mothers are more absent from work
than new fathers.
• People with tattoos are rebellious.
• Younger people are better with technology
than older people.
–Joanna Bryson, University of Bath and Princeton University
"AI is just an extension of our existing culture.”
Racialized code & Unregulated algorithms
Source: https://www.theguardian.com/technology/2017/dec/04/racist-facial-recognition-white-coders-black-people-police
Joy Buolamwini, Code4Rights and MIT Media Lab Researcher.
How white engineers built racist code – and
why it's dangerous for black people
Source: https://www.theguardian.com/technology/2017/dec/04/racist-facial-recognition-white-coders-black-people-police
Implicit AssociationTest
Both black and white Americans, for
example, are faster at associating names
like “Brad” and “Courtney” with words
like “happy” and “sunrise,” and names like
“Leroy” and “Latisha” with words like
“hatred” and “vomit” than vice versa.
Source: http://www.sciencemag.org/news/2017/04/even-artificial-intelligence-can-acquire-biases-against-race-and-gender
W.E.A.T
Names like “Brett” and “Allison” were
more similar to those for positive words
including love and laughter, and those for
names like “Alonzo” and “Shaniqua” were
more similar to negative words like
“cancer” and “failure.” 
Source: http://www.sciencemag.org/news/2017/04/even-artificial-intelligence-can-acquire-biases-against-race-and-gender
W.E.F.A.T
How closely related the embeddings for
words like “hygienist” and “librarian” were
to those of words like “female” and
“woman.” It then compared this
computer-generated gender association
measure to the actual percentage of
women in that occupation.
Source: http://www.sciencemag.org/news/2017/04/even-artificial-intelligence-can-acquire-biases-against-race-and-gender
Word Embeddings
A ⋅ B
∥A∥∥B∥
=
∑
n
i=1
AiBi
∑
n
i=1
A2
i ∑
n
i=1
B2
i
Source: https://medium.com/cityai/deep-learning-for-natural-language-processing-part-i-8369895ffb98
Father (L2 norm): 5.31
Mother (L2 norm): 5.63
d: 26.67
p: 29.89
Similarity: d / p = 0.89
Car (L2 norm): 5.73
Bird (L2 norm): 4.83
d: 5.96
p: 27.67
Similarity: d / p = 0.21
Identifying gender
[woman] - [man] = [female]
What about other words?
Neutralising bias from non-gender specific
words
ebias_comp
=
e ⋅ g
∥g∥2
2
g
edebiased
= e − ebias
Source: Bolukbasi et al., 2016, https://arxiv.org/pdf/1607.06520.pdf
Does it work?
• Cosine similarity between receptionist
and gender, before neutralising:
• 0.3307794175059373
• Cosine similarity between receptionist
and gender, after neutralising:
• 5.2021694209043796e-17
Equalising gender-specific words
Tricky
parts!
Equalising gender-specific words
• Cosine similarity between actor and gender, before
equalising:
• -0.08387555382505694
• Cosine similarity between actress and gender, before
equalising::
• 0.33422494897899785
• Cosine similarity between actor and gender, after
equalising:
• -0.8796563888581831
• Cosine similarity between actress and gender, after
equalising:
• 0.879656388858183
How far is actor from babysitter?
• Cosine similarity between actor and babysitter, before
neutralising:
• 0.2766562472128601
• Cosine similarity between actress and babysitter, before
neutralising::
• 0.3378475317457311
• Cosine similarity between actor and babysitter, after
neutralising:
• 0.1408988327631711
• Cosine similarity between actress and babysitter, after
neutralising:
• 0.14089883276317122
References
• https://www.youtube.com/watch?v=5F_atkP3pqs
• https://www.theguardian.com/technology/2017/dec/04/racist-facial-recognition-white-coders-black-people-police
• http://www.sciencemag.org/news/2017/04/even-artificial-intelligence-can-acquire-biases-against-race-and-gender
• https://medium.com/cityai/deep-learning-for-natural-language-processing-part-i-8369895ffb98
• Bolukbasi et al., 2016, https://arxiv.org/pdf/1607.06520.pdf
• Jeffrey Pennington, Richard Socher, and Christopher D. Manning, https://nlp.stanford.edu/projects/glove/
• https://github.com/ekholabs/DLinK/blob/master/notebooks/nlp/neutralising-equalising-word-embeddings.ipynb
Neutralising bias on word embeddings

Más contenido relacionado

Similar a Neutralising bias on word embeddings

Plagiarism
PlagiarismPlagiarism
Plagiarism
aislater
 

Similar a Neutralising bias on word embeddings (8)

Harvard Essay Examples.pdf
Harvard Essay Examples.pdfHarvard Essay Examples.pdf
Harvard Essay Examples.pdf
 
Rodriguez irizarry
Rodriguez  irizarryRodriguez  irizarry
Rodriguez irizarry
 
Plagiarism
PlagiarismPlagiarism
Plagiarism
 
Essay Body Paragraph Generator
Essay Body Paragraph GeneratorEssay Body Paragraph Generator
Essay Body Paragraph Generator
 
Printable Elementary Lined Paper - Printable World Ho
Printable Elementary Lined Paper - Printable World HoPrintable Elementary Lined Paper - Printable World Ho
Printable Elementary Lined Paper - Printable World Ho
 
Outline To An Essay.pdf
Outline To An Essay.pdfOutline To An Essay.pdf
Outline To An Essay.pdf
 
Essay For Teachers.pdf
Essay For Teachers.pdfEssay For Teachers.pdf
Essay For Teachers.pdf
 
Cause And Effect Paragraph Ppt. How To Write A Caus
Cause And Effect Paragraph Ppt. How To Write A CausCause And Effect Paragraph Ppt. How To Write A Caus
Cause And Effect Paragraph Ppt. How To Write A Caus
 

Más de Wilder Rodrigues

Más de Wilder Rodrigues (7)

Improving Machine Learning
 Workflows: Training, Packaging and Serving.
Improving  Machine Learning
 Workflows: Training, Packaging and Serving.Improving  Machine Learning
 Workflows: Training, Packaging and Serving.
Improving Machine Learning
 Workflows: Training, Packaging and Serving.
 
Deep Learning for Natural Language Processing
Deep Learning for Natural Language ProcessingDeep Learning for Natural Language Processing
Deep Learning for Natural Language Processing
 
Ai - A Practical Approach
Ai - A Practical ApproachAi - A Practical Approach
Ai - A Practical Approach
 
Java 9: Jigsaw Project
Java 9: Jigsaw ProjectJava 9: Jigsaw Project
Java 9: Jigsaw Project
 
Microservices with Spring Cloud
Microservices with Spring CloudMicroservices with Spring Cloud
Microservices with Spring Cloud
 
Machine intelligence
Machine intelligenceMachine intelligence
Machine intelligence
 
Embracing Reactive Streams with Java 9 and Spring 5
Embracing Reactive Streams with Java 9 and Spring 5Embracing Reactive Streams with Java 9 and Spring 5
Embracing Reactive Streams with Java 9 and Spring 5
 

Último

(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
Scintica Instrumentation
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
1301aanya
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
NazaninKarimi6
 
POGONATUM : morphology, anatomy, reproduction etc.
POGONATUM : morphology, anatomy, reproduction etc.POGONATUM : morphology, anatomy, reproduction etc.
POGONATUM : morphology, anatomy, reproduction etc.
Silpa
 
Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.
Silpa
 

Último (20)

Molecular markers- RFLP, RAPD, AFLP, SNP etc.
Molecular markers- RFLP, RAPD, AFLP, SNP etc.Molecular markers- RFLP, RAPD, AFLP, SNP etc.
Molecular markers- RFLP, RAPD, AFLP, SNP etc.
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
 
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate ProfessorThyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
 
An introduction on sequence tagged site mapping
An introduction on sequence tagged site mappingAn introduction on sequence tagged site mapping
An introduction on sequence tagged site mapping
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
Introduction of DNA analysis in Forensic's .pptx
Introduction of DNA analysis in Forensic's .pptxIntroduction of DNA analysis in Forensic's .pptx
Introduction of DNA analysis in Forensic's .pptx
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.
 
module for grade 9 for distance learning
module for grade 9 for distance learningmodule for grade 9 for distance learning
module for grade 9 for distance learning
 
Stages in the normal growth curve
Stages in the normal growth curveStages in the normal growth curve
Stages in the normal growth curve
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
 
POGONATUM : morphology, anatomy, reproduction etc.
POGONATUM : morphology, anatomy, reproduction etc.POGONATUM : morphology, anatomy, reproduction etc.
POGONATUM : morphology, anatomy, reproduction etc.
 
GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)GBSN - Microbiology (Unit 3)
GBSN - Microbiology (Unit 3)
 
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
 
COMPUTING ANTI-DERIVATIVES (Integration by SUBSTITUTION)
COMPUTING ANTI-DERIVATIVES(Integration by SUBSTITUTION)COMPUTING ANTI-DERIVATIVES(Integration by SUBSTITUTION)
COMPUTING ANTI-DERIVATIVES (Integration by SUBSTITUTION)
 
Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
 
Zoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdfZoology 5th semester notes( Sumit_yadav).pdf
Zoology 5th semester notes( Sumit_yadav).pdf
 

Neutralising bias on word embeddings

  • 1. NEUTRALISING BIAS ON WORD EMBEDDINGS –Wilder Rodrigues
  • 2. Wilder Rodrigues • Machine Learning Engineer at Quby; • Coursera Mentor; • City.AI Ambassador; • School of AI Dean [Utrecht] • IBM Watson AI XPRIZE contestant; • Kaggler; • Public speaker; • Family man and father of 3. @wilderrodrigues https://medium.com/@wilder.rodrigues
  • 3. How do you see racism? • Before you proceed, please watch this video: https://www.youtube.com/watch?v=5F_atkP3pqs • The audio is in Portuguese, but in the next slide you will find translations for what people said in the interviews. Source: Canal deTV da FAP (Astrojildo Pereira Foundation)
  • 4. Translations • Group 1 • He is late; • She is a fashion designer; • Holds an executive position in either the HR or Finance area; • Taking care of his garden. Doesn’t look like a gardener; • She is cleaning her own house; the countertop; • Graffiti artist; it’s an art, it’s not vandalism. • Group II • Vandalising the wall; she is a spitter; • She is a housekeeper; cleaning the house; • He is a gardener; • He looks like a security guard or a chauffeur; • Seamstress; saleswoman; • He is running away; he is a thief.
  • 5. Unconscious bias • Blue is for boys, pink for girls. • Boys are better at maths and science. • Tall people make better leaders. • New mothers are more absent from work than new fathers. • People with tattoos are rebellious. • Younger people are better with technology than older people.
  • 6. –Joanna Bryson, University of Bath and Princeton University "AI is just an extension of our existing culture.”
  • 7. Racialized code & Unregulated algorithms Source: https://www.theguardian.com/technology/2017/dec/04/racist-facial-recognition-white-coders-black-people-police Joy Buolamwini, Code4Rights and MIT Media Lab Researcher.
  • 8. How white engineers built racist code – and why it's dangerous for black people Source: https://www.theguardian.com/technology/2017/dec/04/racist-facial-recognition-white-coders-black-people-police
  • 9. Implicit AssociationTest Both black and white Americans, for example, are faster at associating names like “Brad” and “Courtney” with words like “happy” and “sunrise,” and names like “Leroy” and “Latisha” with words like “hatred” and “vomit” than vice versa. Source: http://www.sciencemag.org/news/2017/04/even-artificial-intelligence-can-acquire-biases-against-race-and-gender
  • 10. W.E.A.T Names like “Brett” and “Allison” were more similar to those for positive words including love and laughter, and those for names like “Alonzo” and “Shaniqua” were more similar to negative words like “cancer” and “failure.”  Source: http://www.sciencemag.org/news/2017/04/even-artificial-intelligence-can-acquire-biases-against-race-and-gender
  • 11. W.E.F.A.T How closely related the embeddings for words like “hygienist” and “librarian” were to those of words like “female” and “woman.” It then compared this computer-generated gender association measure to the actual percentage of women in that occupation. Source: http://www.sciencemag.org/news/2017/04/even-artificial-intelligence-can-acquire-biases-against-race-and-gender
  • 12. Word Embeddings A ⋅ B ∥A∥∥B∥ = ∑ n i=1 AiBi ∑ n i=1 A2 i ∑ n i=1 B2 i Source: https://medium.com/cityai/deep-learning-for-natural-language-processing-part-i-8369895ffb98 Father (L2 norm): 5.31 Mother (L2 norm): 5.63 d: 26.67 p: 29.89 Similarity: d / p = 0.89 Car (L2 norm): 5.73 Bird (L2 norm): 4.83 d: 5.96 p: 27.67 Similarity: d / p = 0.21
  • 13. Identifying gender [woman] - [man] = [female]
  • 15. Neutralising bias from non-gender specific words ebias_comp = e ⋅ g ∥g∥2 2 g edebiased = e − ebias Source: Bolukbasi et al., 2016, https://arxiv.org/pdf/1607.06520.pdf
  • 16. Does it work? • Cosine similarity between receptionist and gender, before neutralising: • 0.3307794175059373 • Cosine similarity between receptionist and gender, after neutralising: • 5.2021694209043796e-17
  • 18. Equalising gender-specific words • Cosine similarity between actor and gender, before equalising: • -0.08387555382505694 • Cosine similarity between actress and gender, before equalising:: • 0.33422494897899785 • Cosine similarity between actor and gender, after equalising: • -0.8796563888581831 • Cosine similarity between actress and gender, after equalising: • 0.879656388858183
  • 19. How far is actor from babysitter? • Cosine similarity between actor and babysitter, before neutralising: • 0.2766562472128601 • Cosine similarity between actress and babysitter, before neutralising:: • 0.3378475317457311 • Cosine similarity between actor and babysitter, after neutralising: • 0.1408988327631711 • Cosine similarity between actress and babysitter, after neutralising: • 0.14089883276317122
  • 20. References • https://www.youtube.com/watch?v=5F_atkP3pqs • https://www.theguardian.com/technology/2017/dec/04/racist-facial-recognition-white-coders-black-people-police • http://www.sciencemag.org/news/2017/04/even-artificial-intelligence-can-acquire-biases-against-race-and-gender • https://medium.com/cityai/deep-learning-for-natural-language-processing-part-i-8369895ffb98 • Bolukbasi et al., 2016, https://arxiv.org/pdf/1607.06520.pdf • Jeffrey Pennington, Richard Socher, and Christopher D. Manning, https://nlp.stanford.edu/projects/glove/ • https://github.com/ekholabs/DLinK/blob/master/notebooks/nlp/neutralising-equalising-word-embeddings.ipynb