Answers.Body: <p>Those suggestions are actually not in contradiction with each other.</p>
  <p>Having data for testing and using them for training are two completely different things. Let's take the infamous example of <a href="https://www.reuters.com/article/us-amazon-com-jobs-automation-insight/amazon-scraps-secret-ai-recruiting-tool-that-showed-bias-against-women-idUSKCN1MK08G" rel="nofollow noreferrer">Amazon automatic recruiting algorithm</a>. The model was trained on real people curricula tp rank them and suggest this way the best candidates to hire. After deploying it  it became clear pretty soon that the model was gender biased, cause it was not ranking female curricula high even when all other requirements were met.</p>
  <p>Why was the model biased? Because humans are also biased and we are those who labelled the data from which the model learn. So if a human recruiter compare the same curricula with a male name and a female name chances are it will select the curriculum with a male name.</p>
  <p>So far so good, we spotted a potential cause for the bias, so we can just retrain the model without the gender variable and it should be fine. But can we trust the model will not be gender biased anymore? Well not 100%, there are many correlations between gender and other variables, and the model might still learn a biased behavior by &quot;learning&quot; the gender variable from other variables.</p>
  <p>So that's why we want to keep the gender variable in our data, but only to use it in test phase, not as an extra feature to feed to the model (this time it was trained without) but as a variable to use to compute statistics out of the model predictions, i.e. how many males and females does the model choose after being trained without information about gender?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-24T17:13:19.757Z
Answers.Text: This is a great answer. Thank you! Good teachers make answers seem obvious.
Answers.UserDisplayName: NaiveBae
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-23T19:16:03.350Z
Answers.LastActivityDate: 2022-03-23T19:16:03.350Z
Answers.UserDisplayName: Edoardo Guerriero
Body: <p>I'm a little confused on best practices regarding ethical ML. Specifically, I've seen in some courses that when building a model that affects people, it's helpful to have sensitive personal information related to sex, race, etc., to help ensure that the model distributes its error evenly across populations and avoids disparities.</p>
  <p>I've also seen (in practice on the job and in recommendations) that this kind of information should be entirely omitted from your data to ensure the &quot;blindness&quot; of the model to protected and sensitive classes.</p>
  <p>These directives seem at odds with each other. Has any kind of rubric been developed to help modelers determine when it is and is not appropriate to use this kind of information in a model?</p>
  
Tags: <machine-learning><features><ethics>
Title: When is it appropriate to use information like sex or race in ethical machine learning?
UserDisplayName: NaiveBae
ThreadText: # When is it appropriate to use information like sex or race in ethical machine learning?
  
  (Asked by: username_0 on 2022-03-23)
  
  I'm a little confused on best practices regarding ethical ML. Specifically, I've seen in some courses that when building a model that affects people, it's helpful to have sensitive personal information related to sex, race, etc., to help ensure that the model distributes its error evenly across populations and avoids disparities.
  
  I've also seen (in practice on the job and in recommendations) that this kind of information should be entirely omitted from your data to ensure the "blindness" of the model to protected and sensitive classes.
  
  These directives seem at odds with each other. Has any kind of rubric been developed to help modelers determine when it is and is not appropriate to use this kind of information in a model?
  
  **Tags:** machine-learning, features, ethics
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-03-23. Score: 1 | Accepted answer
  
  Those suggestions are actually not in contradiction with each other.
  
  Having data for testing and using them for training are two completely different things. Let's take the infamous example of [Amazon automatic recruiting algorithm](https://www.reuters.com/article/us-amazon-com-jobs-automation-insight/amazon-scraps-secret-ai-recruiting-tool-that-showed-bias-against-women-idUSKCN1MK08G). The model was trained on real people curricula tp rank them and suggest this way the best candidates to hire. After deploying it it became clear pretty soon that the model was gender biased, cause it was not ranking female curricula high even when all other requirements were met.
  
  Why was the model biased? Because humans are also biased and we are those who labelled the data from which the model learn. So if a human recruiter compare the same curricula with a male name and a female name chances are it will select the curriculum with a male name.
  
  So far so good, we spotted a potential cause for the bias, so we can just retrain the model without the gender variable and it should be fine. But can we trust the model will not be gender biased anymore? Well not 100%, there are many correlations between gender and other variables, and the model might still learn a biased behavior by "learning" the gender variable from other variables.
  
  So that's why we want to keep the gender variable in our data, but only to use it in test phase, not as an extra feature to feed to the model (this time it was trained without) but as a variable to use to compute statistics out of the model predictions, i.e. how many males and females does the model choose after being trained without information about gender?
  
  > **Comments:**
  > **username_0**: This is a great answer. Thank you! Good teachers make answers seem obvious.  
  
  ---
  
  