using visual analytic workflow to discover bias in gender prediction models
By: Jun Yuan
Tags: Final Report, Project

using visual analytic workflow to discover bias in gender prediction models

Machine learning techniques are widely used to make crucial predictions and discover patterns from massive data collected from social media data. More concerns have been raised about potential biases that have been introduced in the machine learning models in recent years. High-performance prediction models may produce discriminative predictions. For example, Amazon’s recruiting algorithms have been reported to discriminate against resumes from female applicants. Such discriminative behaviors are often hard to detect due to the complicity of the state of art machine learning techniques. The issue becomes more severe when non-technical users apply the models without examining the model themselves. To improve the transparency, trust, and implication of machine learning models in social media research and other industries, one potential approach is using visual analytic techniques to interpret the black-box nature of machine learning models to the human-understandable interactive interface. In this case, non-technical or seasoned machine learning model users can leverage the power of visual pattern recognization to discover potential bias in the prediction models.

workflow and expectations

Our work consists of the following steps:

data collection of tweet gender prediction and descriptive data analysis tweet data tokenization and preparation for classification model training classification model training using three different algorithm model explanation generation for classification models visual analytics design and implementation bias discovery usage demonstration using the interactive visual interface

For step 1, we want to overview the frequencies of the words in the datasets between the male and female groups to understand the ground-truth. For step 2, we want to combine useful text information and convert the text into vectors as standard input for classification models. We also want to prepare the training and testing set for model performance evaluation. For step 3, we want to train and evaluate three different classification algorithms with different complicity levels. We want to measure their accuracy and F1 performance in this stage. For step 4, we will use LIME (a model-agnostic ML explainer) to derive explanations from each prediction from each classification model. The goal is to see whether if the explanations for the same input varies across models. For step 5, we want to export all the explanation data and design visualizations to systematically discover classification bias patterns on keywords between male and female groups. For step 6, we want to demonstrate our interface by exploring a list of keywords and analyze the potential biases. The details for each step are explained in the following sections.

1. data collection of tweet gender prediction and descriptive data analysis

The data is download from Kaggle: https://www.kaggle.com/crowdflower/twitter-user-gender-classification. The data features include user names, random tweets, and description texts of the Twitter accounts. The author of the data used the crowdsourcing approach to generate the ground truth gender labels (male, female, brand, unknown) for Twitter accounts. Participants judged the gender based on the profile of the account. The data's confidence feature indicates the percentage of the participants who gave the same gender prediction on the Twitter account. Since we want to first train machine learning classification models to best mimic human predicting behavior, we only select the records with 100% confidence in the gender labels (which means all the participants agree on the gender labels). To focus on the potential model bias inherited from the data, we select the records with prediction labels, either male or female, as the ground truth for model training. A total of 53,849 records are selected in the following steps.