Skip to content

EmbeddingsBias

Barry Stahl edited this page Jan 14, 2024 · 3 revisions

Embeddings Bias Demos

These XUnit tests demonstrate how embeddings models can be biased and how to expose specific biases. In the Distance Demos, we saw that the model exhibited a bias towards technology, which makes sense since it was trained by nerds like us, on data from the Internet where nerd culture is over-represented.

It should not be a surprise to anyone then that the model has a mathematical bias away from anything or anyone that is underrepresented in the training corpus, or where the historical data is itself biased.

Gender Bias Relating to Professions

This demonstrates that this model has a bias where certain professions are seen as being "for men" while others are seen as "for women". You can see from the output of these tests that "Doctor", "Lawyer" and "Professor" are all closer to "Profession for Men" in the embedding space while "Nurse", "Paralegal" & "Teacher" are closer to "Profession for Women". This should not be a surprise to anyone based on the large volume of training data that contain such biases.

Interestingly, both "Flight Attendant" and "Pilot" are closer to "Profession for Men". "Stewardess" is closer to "Profession for Women", but that is probably due to the gendered nature of that term vs "Steward", which is closer to "Profession for Men" so I don't think we can draw any conclusions from this particular set of professions, unlike the 1st 3 pairs which clearly show a gender bias.

Clone this wiki locally