A good prompt to quantify name-gender association needs two qualities:
- The prompt has to strongly suggest a single pair of gendered pronouns. A sentence like "[MASK] name is Emily" will prompt mostly "my" as a prediction, which makes our results less stable.
- The prompt should not overtly bias the results one way or another. Every prompt will give slightly different results, so the difference between 61% and 63% will never be very meaningful. But a sentence like "Morgan loved [MASK] job as a nurse" will result in "Morgan" being associated with female pronouns more than it would otherwise.
After a lot of testing, the prompt I settled on was
I heard [MASK] name was Morgan.
The "I heard" at the start ensures that "my" and "your" are less likely than they would otherwise be. Completion for "I heard [MASK] name" is biased towards "his", but that's true of almost any neutral prompt and reflects underlying biases in the model.
To compute the gender split of a name, I insert a name into the spot where Morgan is in the above prompt. I then prompt RoBERTa to fill in the blank, take the answers for "her" and "his", and see what proportion of that probability is assigned to "her".
A good prompt to quantify name-gender association needs two qualities:
- The prompt has to strongly suggest a single pair of gendered pronouns. A sentence like "[MASK] name is Emily" will prompt mostly "my" as a prediction, which makes our results less stable.
- The prompt should not overtly bias the results one way or another. Every prompt will give slightly different results, so the difference between 61% and 63% will never be very meaningful. But a sentence like "Morgan loved [MASK] job as a nurse" will result in "Morgan" being associated with female pronouns more than it would otherwise.
After a lot of testing, the prompt I settled on was
I heard [MASK] name was Morgan.
The "I heard" at the start ensures that "my" and "your" are less likely than they would otherwise be. Completion for "I heard [MASK] name" is biased towards "his", but that's true of almost any neutral prompt and reflects underlying biases in the model.
To compute the gender split of a name, I insert a name into the spot where Morgan is in the above prompt. I then prompt RoBERTa to fill in the blank, take the answers for "her" and "his", and see what proportion of that probability is assigned to "her".