Step 5: Postprocess stereotypical autocompleted expressions

100 %

* Another way to mitigate algorithmic bias is to remove bias from the predictions. For example, we can prepare two dictionaries of stereotypical words, one for men, and one for women. Gender swapping can be done in a random manner. One example is to replace a stereotypically perceived feminine word (e.g., "nurse") with a stereotypically perceived masculine word (e.g., "doctor").

* In this case, we swap genders in the original dataset (see below). Any differences noted?

Dataset

* Now run Google Colab below again to see the newly predicted next word given the prompt of either "man" or "woman". After you go to Google Colab, select "Runtime->Run all". Under the section "Gender Swapping", type either "man" or "woman" as the prompt and observe the next word. Repeat the process 10 times, 5 times with the prompt "man", and 5 times with "woman". Any differences noted?

Colab

BackGo back to the homepage