detecting and reducing social discrimination in machine
play

Detecting and Reducing Social Discrimination in Machine Learning - PowerPoint PPT Presentation

Detecting and Reducing Social Discrimination in Machine Learning Models New York Open Stats Meetup Niels Bantilan 12/14/2017 What is bias? What is discrimination? Inmate recidivism risk model Source:


  1. Detecting and Reducing Social Discrimination in Machine Learning Models New York Open Stats Meetup Niels Bantilan 12/14/2017

  2. What is bias?

  3. What is discrimination? Inmate recidivism risk model Source: https://www.propublica.org/article/machine-bias-risk-assessments-in-criminal-sentencing

  4. Bias is an amoral concept “The preference for or against something” Discrimination is a moral, socially contextual concept “When an action is based on biases that lead to the systematic disenfranchisement of people based on arbitrary group membership” Fairness is the “opposite” of discrimination (according to a specific definition of discrimination)

  5. Biased Biased Decisions Data Biased Biased Predictions Algorithm

  6. Problem Machine learning models optimized only for accuracy reflect and amplify real-world social biases.

  7. Themis-ml (thee-mus em-el) An open source library that implements a fairness-aware machine learning interface ( FMLI ) to measure and reduce social bias in machine learning algorithms. Available on github! https://github.com/cosmicBboy/themis-ml

  8. FMLI Design Principles Model flexibility Users have varying degrees of control over the model training process. Fairness as performance Build tooling that enable users to optimize for both accuracy and fairness. Transparency of fairness-utility tradeoff Enable the user to assess the impact of fairness-aware methods on predictive power.

  9. Discrimination Discovery Objective Given a set of decision records {(X, y)} ∈ D , a measure of social bias b , and a protected class s , identify a subset of potentially discriminated decision records. ?

  10. Discrimination Discovery Disparate Treatment only accept men’s resumes Hiring decision process Disparate Impact ? accept all resumes Hiring decision process

  11. Discrimination Discovery Individual-level Group-level (individual consistency) (statistical parity)

  12. Fairness-aware Machine Learning Objective Given a set of decision records {(X, y)} ∈ D , a measure of social bias b , a protected class s , and a measure of performance p , train a machine learning model that makes fair predictions while preserving the accuracy of decisions. Utility Fairness

  13. Fairness-aware Machine Learning Assumptions Prediction target y is a binary variable where y + = 1 is a beneficial 1. outcome (e.g. “good credit risk”) and y - = 0 is an adverse outcome (e.g. “bad credit risk”) 2. Protected class {d, a} ∈ s is a binary variable where d = 1 is the disadvantaged group (e.g. “immigrant”) and a = 0 is the advantaged group (e.g. “citizen”).

  14. Machine Learning Pipeline Raw Data Preprocessing Model Specifications Training Instantiated Models Evaluation Deployed Model Prediction Predictions on New Data

  15. Machine Learning Pipeline Raw Data Evaluation Scorer API Mean difference Model Specifications Compute p(a ⋃ y + ) – p(d ⋃ y + ). ● ● Values range from -1 to 1 ○ 1 is the maximum discrimination case. Instantiated Models ○ 0 is the statistical parity case. ○ -1 is the maximum reverse-discrimination case. Deployed Model Predictions on New Data

  16. Mean Difference Loan Granted Loan Denied Woman mean difference = 0.5 - 0.5 = 0 Man mean difference = 0.67 - 0.25 = 0.42

  17. Machine Learning Pipeline Raw Data Evaluation Scorer API Consistency Model Specifications ● For each observation x i , find its k-nearest neighbors x j ∈ knn(x i ). ● Sum the differences between the label y i and all of its Instantiated Models neighbors y j . ● Normalize the sum of these differences by the total number of observations N × k number of neighbors. ● Subtract this normalized value from 1. Deployed Model ● Values range from 0 to 1 ○ 0 indicates no discrimination ○ 1 indicates maximum discrimination Predictions on New Data

  18. Consistency k neighbors = 5 Loan Granted Loan Denied Woman consistency = 1 - [ ( 0 + 0 ) / ( 2 × 5 ) ] = 1 Man Home-owner Not home-owner consistency = 1 - [ ( 5 + 5 ) / ( 2 × 5 ) ] = 0

  19. Machine Learning Pipeline Raw Data Preprocessing Transformer API Relabelling Model Specifications ● Train a ranker model R on the dataset D . ● Modify D to create D new such that we achieve statistical parity: Instantiated Models Top-ranked X d, y- are “promoted” to X d, y+ ○ Bottom-ranked X a, y+ are “demoted” to X a, y- ○ ● Training a model on D new should yield fairer Deployed Model predictions compared to a model trained on D . Predictions on New Data

  20. Relabeling Original Data Relabeled Data Good Credit Risk Bad Credit Risk Woman income Man is homeowner Assumption: Labels are incorrect, and we should directly change them in favor of the disadvantaged group.

  21. Machine Learning Pipeline Raw Data Prediction Predictor API Reject Option Classification (ROC) Model Specifications ● Train an initial classifier K ● Generate predicted probabilities ŷ on the test set. ● Compute the proximity of each prediction ŷ to the Instantiated Models decision boundary learned by the classifier. ● Modify labels within the critical region threshold � around the decision boundary (where 0.5 < � < 1 ): ○ predicted labels of X d are assigned as y + . Deployed Model predicted labels X a are assigned as y – . ○ Predictions on New Data

  22. Reject Option Classification Original Prediction Relabeled Data Good Credit Risk Bad Credit Risk Woman income Man is homeowner Assumption: Observations close to the decision boundary were labelled incorrectly based on their sex, so we should offset this by flipping the prediction for those observations.

  23. Machine Learning Pipeline Raw Data Training Estimator API Additive Counterfactually Fair Model Model Specifications ● Train linear models to predict each feature in X using s attribute(s) as input. Compute residuals � ij between the predicted ● Instantiated Models feature values and true feature values for each observation i and each feature j . ● The final model is trained on � ij as features to predict y . Deployed Model Predictions on New Data

  24. Additive Counterfactually Fair Model predicted features ˆ protected residual s X y labels classes model � ˆ X y ˆ model X - X features residual features

  25. Machine Learning Pipeline Raw Data Training Estimator API Prejudice Remover Regularization Model Specifications ● Define “prejudice index” (PI) as the degree to which a prediction ŷ depends on a sensitive attribute s (otherwise known as mutual Instantiated Models information). ● Add PI as a term to your objective function ● Minimize (or maximize) with gradient descent or other optimization method of your choice. Deployed Model Predictions on New Data

  26. Prejudice Remover Regularization Minimize objective function L2 Regularization “Don’t weight a particular feature too much” Logistic Regression Cost “Don’t make mistakes on predictions with respect to ‘true labels’” Prejudice Index Regularization “Don’t depend on sensitive features too much to make predictions”

  27. Prejudice Remover Regularization Cost Fairness-unaware Objective Fairness-aware Model Objective Fairness-utility tradeoff Value of weight Θ

  28. Case Study: German Credit Data 1000 loan application records 1 binary target variable y : 700 “good” credit_risk 300 “bad” credit_risk ~20 input variables X : housing credit_history purpose foreign_worker personal_status_and_sex age_in_years 3 binary protected classes s : is_foreign is_female age_below_25 Source: https://archive.ics.uci.edu/ml/datasets/statlog+(german+credit+data)

  29. Case Study: German Credit Data Measure potential discrimination in the raw data

  30. Case Study: German Credit Data Does the algorithm make socially biased predictions? Mean difference score of logistic regression test predictions Mean difference in raw data 6.4 9.5 12.6 24.3 29.4 34.5 29.2 32.3 35.4

  31. Case Study: German Credit Data Assess Fairness-utility Trade-off Mean difference and AUC scores generated by a logistic regression model for each experimental condition, by protected attributes. Baseline Remove protected attributes Relabel target variable Counterfactually fair model Reject-option classification

  32. Live Demo: Fatal Encounters Dataset www.fatalencounters.org

  33. So now what?

  34. MEASURE AND MITIGATE ALL THE THINGS

  35. FML-as-a-service “FMLAAS” Use Case: Organizations “As a law-enforcement (private, nonprofit, govt) agency, I need to identify individuals who are most likely to be connected to gang X.” Data Predictions Models Third-party Predictive Service

  36. FML-as-a-service “FMLAAS” FMLI Use Case 1: Organizations “As a law-enforcement (private, nonprofit, govt) agency, I want to Metrics measure the degree to which my data contains discriminatory patterns” Data measure FMLI fit Web Predictions Service predict Models Third-party Predictive Service

Recommend


More recommend