Hi everyone. Thanks for coming to my talk. Today I'll be talking about how we can uncover bias in different machine learning models and what the implications might be. And I'm Eileen as John introduced me and I just became an assistant professor and today is my second talk as an assistant professor. Yesterday was my first one. And yes, let's see, is this working? Nope. Yesterday I talked about supervised machine learning being used on language of individuals so that we can identify these individuals based on their linguistic style, and this is a serious privacy concern. But when we look at language at the aggregate level, language of society, we see that there are some fairness problems there, because this linguistic data that is coming from society also brings the biases of society, humans with it. And now we are going to be looking at this. And yesterday what I talked about was about coming up with a model of language that is very similar to the one we use today. And up with a method to identify a style of individuals, or these can also be programmers, so that we can do attribution. And this has security enhancing properties, but at the same time we see that it's very privacy infringing in some real world cases. And today I'll be talking about a method for quantifying and detecting bias in linguistic data or linguistic machine learning models. And for this I basically adapt the implicit association test for humans to machines. And given that there's the language universal that in every language semantics happens in the same context window, the method that I came up with can be used in any language basically. Okay, so in AI, under the umbrella of AI, today we'll be looking at natural language processing and machine learning, and in particular, deep learning and unsupervised learning. In the past there has been some work on looking at supervised machine learning to see where the bias might be happening, how it can be removed, but it's slightly more difficult to understand these in unsupervised machine learning models since they don't have direct classification outputs and so on. And again, talking about, for example, individual language versus society's language, when we look at this model, we can see that there are multiple languages. So we can look at individual's language, the syntax that they use in language is the most identifying thing, even in source code. But today we'll be focusing on semantics, the meaning in language, at the societal level. And just a brief summary of this work on security privacy and machine learning, where I'm using stylometry, which is the study of linguistic style. And since this is linguistic style, we can be looking at natural language, or we can also look at language processing. So we can look at language processing as well as language processing. So we can look at artificial languages such as programming languages. And some examples are identifying the authors of English text, English as a second language so that we can identify their native language, or translated text and identifying the native language or translator, as well as underground forum texts where underground forum users engage in business transactions. And even though these are very noisy data sets, we can still identify these authors. And sometimes these are suspect sets for, uh, uh, intelligence agencies. And because of that, uh, this work, the tools that we developed and that are open source on GitHub, any one of you can download and use, they are currently being used by the FBI or expert witnesses to be used as scientific evidence in court, or European high tech crime units so that they can identify suspects online based on their language. But again, I'm reminding you, this is about individual's language and the privacy implications that it has. And in artificial languages, focusing on programming languages, in particular Python, C, and C++, source code, as well as binaries, uh, this work is being used by DARPA and being part of the Department of Defense, you might imagine why they would be interested in attribution problems, uh, for example, to find the authors of, uh, malicious software, or in oppressed regimes, authors of, uh, for example, censorship circumvention software. And expert witnesses, again, can now use this information as scientific evidence in court. And I've been collaborating with the U.S. Army Research Laboratory. They are still working on, um, programmer de-anonymization, programmer attribution. Okay, but today I want to talk more about fairness and language at the, uh, societal level. And I'll start with an example. So, uh, the, do any one of you know this author, Robert Galbraith? Okay. So, there was this, uh, novel, uh, crime novel called The Cougar. And it was Cougar's Calling by Robert Galbraith. But some people suspected that it might not be written by Robert Galbraith, but instead J.K. Rowling. And after performing stylometric analysis, it was shown that it was actually written by the famous J.K. Rowling of the Harry Potter series. And, uh, after that, J.K. Rowling said that, okay, uh, yes, she is the author of this book, but she wanted to use a man's name because it's a crime novel. And the publisher also thought that it would sell better. If it was published under the name of a man. And at the same time, they wouldn't know that it was written by J.K. Rowling, so she would get a more realistic evaluation of her work. So, we can see even at high profile people how biases affect in society, even for such an important product that they are publishing. And here, uh, this reminds me of the interplay between privacy and fairness. Uh, big data is evil to twins. This is why I'm saying that. I don't match them with自i are like. I don't match them with this uncertainty. So, I don't win, but if there is dignity, uh, you prefer the big data, then I give the small I have a quote here, uh, this is a quote, uh, from Um, at this detailed reference, pops into the So, you see here that privacy isLaughing but that doesn't imply value theory. So, that, that is the 1950s. What I want to do now is reduce, uh, uh, prohibition of privacy, um, threatening brains, um, migrants. Ah, so you see, that the national, the national, that is, that the national neighborhood, you see how much privacy is trading in a country, in a country. recently Google had this Cloud Natural Language API. Amazon, Google, many companies, researchers are making these tools available or for commercial purposes as well. And such tools are being used by developers, researchers, just random folks, citizens, and so on. And we can also see that whenever we are dealing with a smart or digital application, if there is any text included in it, then usually these linguistic machine learning models are also being used. For example, web search, when you're trying to type something and you can see some suggestions to fill that sentence, which is sequence prediction or text generation. At the context level, they are also looking at linguistic semantic spaces. Or machine translation, sentiment analysis, especially for market predictions to see how a commercial product is, for example, perceived. Is it negative, positive? And, of course, it's using linguistic data and tokens, words as tokens that are in certain context windows. Or named entity recognition and text generation. When you're receiving an automated call on the phone, usually that text is automatically generated. Okay, why would this be a problem? Let's look at this example. So, one of my native languages is Turkish, and Turkish is a genderless language. There are no gendered pronouns. There is one pronoun, and it means he, she, or it. Okay, so I'm translating from English to Turkish. She's a doctor, translated as he, she, or it is a doctor. Taking the Turkish sentence, translating it back to English, it's translating as he's a doctor. It's not even asking if it should be a he, she, or it. Okay, let's say that it's smart enough to understand that this is a human, so it shouldn't be an it. It's still saying, not saying he or she, but just choosing he as the most accurate answer. And another example, to see if this is just one rare exception, or is this happening at the larger scale. He's a nurse, translated to Turkish. He or she is a nurse. Translated back to English, she's a nurse. Okay. You can maybe also see the difference. Doctor versus nurse. The prestige, or the salaries of these people. And we see a pattern here. He or she, it is a professor. He is a professor. Teacher, he is a professor. And the other teacher, she is a teacher. Okay, is this only happening in English? German is also a gendered language. Not only pronouns, but other things are also gendered. It's more gendered than English, and of course, from Turkish. But again, we see that a doctor is translated as a male, and a nurse is translated as a female. And then we have Bulgarian, and in Bulgarian, almost everything is gendered. Verbs are gendered, adjectives are gendered. And again, we see that doctor is a male, whereas a nurse is a male. And again, we see that a nurse is a female. Okay. So, it has been 62 years since they came up with the term, I believe it's still 62 years. They came up with the term artificial intelligence, and what they, what can be done with it. Old doomsday stories about when there is super intelligence, or when machines are going to take over, and so on. But they haven't been really thinking about immediate problems we might have with artificial intelligence. Okay. We know that when garbage goes into machine learning models, what comes out is usually garbage as well, because if that's the quality of your training data, then the output would reflect the same quality. And one example here for how text is collected for generating semantic spaces and linguistic models is, for example, there was the Microsoft Tweetbot, Tay, and it was taken down the same day it was introduced, because it very quickly turned into a very offensive, racist, biased bot. And Microsoft wasn't ready to account for such cases in the linguistic model. And this was done by 4chan. It was basically model poisoning. It was adversarial machine learning. And it worked very quickly. And these were some of the examples that the Tweetbot started tweeting. And, of course, it was taken down, but we can see how easily the bias can be embedded with a strong affective, violent exercise in this example within a few hours. And how is this getting into these models? Let's take a step-by-step look at this. We know that humans are biased. This is not necessarily a bad thing, because there are neutral biases as well, and sometimes biases are helpful in some conditions, and I'm going to give some examples of those as well. But when we're biased and when we're speaking, we reflect that bias in our semantics. We have valence, for example. Okay, this snake is ugly, or this butterfly is beautiful, for example, and these are neutral biases, but they are there. And as we are speaking, forming languages, we tend to have similar patterns in same context windows. Let's say that we have a negative context window, and snake tends to appear in that context window as a neutral bias, but it's still a negative bias for snakes. And that's called, then, distributional meaning. So, when we're talking about distributional meaning, we see in the statistics that certain words end up in negative context, for example, and context windows. And after that, machine learning models, especially semantic spaces, look at this distributional meaning and co-occurring statistics, and after that, it learns the co-occurring statistics of certain terms or certain people's names and what they are associated with, and this is reflected in machine learning models. Basically, the bias is propagated through this entire process. Sometimes, it is even increased and augmented. It's not just perpetuated. How can we measure it, though? Because especially when we look at unsupervised learning, we don't really have something to directly control for and measure these things unless we look at the model at the construct level, like the intelligence of this model, let's say, the understanding of the world that this model has. And for humans, the implicit association test has been used as a way to measure the implicit biases that we might have. Greenwald from University of Washington came up with the implicit association test in 1998, and there's a lot of criticism about this method as well, but at the same time, it's revealing some patterns about the world and humans, and it's revealing subconscious biases that we might have and we might not be even aware of. And this test is basically asking you to associate certain societal groups, members, or terms with certain stereotypical words. And how fast do you associate, for example, a butterfly with being negative or positive versus how fast do you associate a snake being positive or negative? And then when you're doing these associations on a computer, you're asked to click right or left to classify a positive term with butterfly or snake. And after that, there is a difference in reaction time, and this differential reaction time in associating congruent stereotypes and incongruent stereotypes gives you the effect size for implicit bias that we might have. And this example is from a girl taking the implicit association test for males versus females about science versus arts. And the bias in general is that males are associated with science, whereas women are associated with arts. And you can go and take this test online at the Harvard's website, implicit.harvard.edu, implicit. And I'm showing this because we see a few implicit association tests here that are listed. And in the experiments that I did, I took these previous experiments that have been generated by experts in societal psychology, because I'm not an expert in that area at all. And I wanted to show you that we can replicate these biases versus what happens when I try random things or things that are not biases, so that I'm not just cherry-picking the biases that I want to show you. You see that these are the main categories that were there, and I'm using the same ones to see if they are reflected. Because the other thing is this test is taken by millions of people over decades. And another example is you can also take it in Germany if you are from Germany, let's say, because the same tests, since they are based on context and words, they can exist in any language basically. And we can generate linguistic models in any language as well, so we can apply these tests in other languages for other cultures or countries. Okay, let's start looking into the details of generating language models. Another example here of where text is taken to generate these models. Basically, we can crawl the web, take all kinds of text, structured, unstructured, tweets here. We see some tweets from Donald Trump before he became the president, but we see a certain pattern in the text about maybe certain biases and so on. And this is blindly fed into, in this case, neural networks. And the neural networks looks at the co-occurring statistics and all the data, point-wise material information it has. And after that, it produces a semantic space. In this semantic space, we have, the common example is with 300 dimensions. We basically have a dictionary of a language, and then this dictionary, each word contains, each word in a language with, in a vector form, numeric vector form, with 300 dimensions where each dimension is a combination of certain context. But when we have each of these words, we see that similar words are projected to the same points in that space. For example, things about positiveness, things about feelings, things about feelings. And so on. And based on their vicinity, we can understand or answer many questions. And the types of semantic spaces that I focused on in my study were Word2Vec, the algorithm, and GloVe from Stanford researchers. Word2Vec, when it was introduced, it was extremely popular, and the models that was produced by Word2Vec, which is from Google Research, it's being used by many developers, researchers, or app developers. And so on. So a lot of people use these for their applications, and GloVe is similar to that as well. It's produced by Stanford researchers around the same time, and these two semantic spaces have about the same accuracy after evaluation, even though it's not very clear how to evaluate these methods. It's like an approximation of an evaluation for these semantic spaces. And Word2Vec is based on Google News data, and we would expect Google News data to be more neutral and objective, because it's news data. But we see that that is not the case based on co-occurrence statistics. And other type of data that GloVe uses is Common Crawl. It's about 800 billion tokens from the Internet. It's basically the crawl of the World Wide Web, basically the language of Internet users, I would say, in this case. Not in particular society in general, but the Internet-using population. Okay, what can we do with this word, with these word embeddings? First of all, we can understand syntax. We can understand the meaning of a word better. We can perform analogies and get the answers. Or we can look for semantic similarity. Let me see if I have this example. No, but we can ask questions such as, okay, Rome is to Italy, as Paris is to what? And it will be able to answer that it's France. So it has some understanding of language. It has understanding of semantics. And it has some understanding of language. But there is also knowledge and maybe even statistics embedded here. And by statistics, I don't mean the co-occurrence statistics. I mean statistics about the world. And looking into the details of these vectors, we have each word listed by frequency. And the first word is usually A or D or just a comma and so on. And there are 300 features that represent this word in the semantic space. And in GloVe, we have about 2 million tokens. And we have a lot of data. And we have a lot of data. We have a lot of tokens. 2 million words in this dictionary. And in a dictionary, you would expect much less words. But given that this is taking all the words above a certain frequency on the Internet, we have words such as Obama or Michael Jackson and so on. Okay, what can we do with vector arithmetic? So when we project these vectors to 2D space, we see that, for example, I hope at least the laser is working. No, because I didn't turn it on. Okay, now it's working. Okay, here we see that on the lower side, there is brother, which is a male. And here we see sister. And now we see the direction of gender here. Once we see the direction of gender, maybe we can look at kink and find what corresponds to the female version of kink, which is queen here. So basically, we can perform vector arithmetics with cosine similarity most of the time or taking the principal components of these vectors and try to answer the questions that we have in syntactic order. Syntactic form, analogy form, or semantic form, and so on. How can I use this information to measure bias in machine learning models? So the first thing I came up with was the word embedding association test instead of the implicit association test. And for this, what I do is I try to quantify the implicit, or in this case, it's actually explicit and deterministic associations between societal categories and evaluative attributes, which are stereotypes in this case. And what I do is I take the distance between the stereotypes and societal groups for the two groups and look at the difference in standard deviation between the means of these associations. And that gives me the effect size of a certain bias and we can also measure the statistical significance by generating a null hypothesis and then see if the result that we are getting from the effect size is significant or not. For this, the first thing I wanted to start with was looking at neutral stereotypes that are universally accepted, or they are called so. For example, flowers being considered pleasant and insects being considered unpleasant. For some reason, apparently most of the population just naturally, intuitively have this stereotype. Or musical instruments being considered pleasant, whereas weapons are being considered unpleasant. And since this is not dangerous for society or harmful to society, it's considered neutral. And in this case, we see that the effect size is 1.5, around 1.5 for both of them, and this is a large effect size if it's above 0.8. And the highest the effect size can get is 2 because it's bounded by the standard deviation here. And we see that these are both statistically significant and high effect sizes. And for the upcoming examples, it will be the same case. They are all statistically significant with high effect sizes. Okay, let's start looking at other major implicit association test categories, such as white people's names versus black people's names, and trying to understand if they are considered pleasant or unpleasant. And we get the congruent stereotype that white people are considered pleasant in this case. And when we look at the differences between genders, we see that males are associated with career, and females are associated with family. And again, I'm using the same words that the implicit association test is using to ask you to perform the classification association test here, the exact same words. And when we look at science versus arts, again, we see that males are associated with science, and females are associated with arts. I'm not going to talk about stereo threat here, but at least we can see that bias is certainly perpetuated with these linguistic models. And two examples that I have with models here are from 2014. We are in 2018, and these are still the state-of-the-art models that are being used by many people, and they are not really updated on a frequent basis because they are quite large files, and they require a lot of data, and so on. Okay, let's look at some other health-related stereotypes, for example. Young people being considered pleasant, whereas old people are being considered unpleasant. Or physical diseases considered controllable, whereas mental diseases being considered uncontrollable. And we see the stigma being reflected in these models. Or when we look at, for example, heterosexual versus homosexual individuals, we see the attitude towards them, or straight versus transgender, and so on. And we can also perform these in German. When we look at the main categories, after generating the linguistic model, and you can also generate your linguistic models, for example, you can download corporate online or use Google Ngrams data from different years, decades, countries, languages, and so on to analyze what might be going on in these years. And when we look at the most recent version of Google Ngrams for German, we see that we can also replicate the stereotype or the prejudice for Turkish people. Turkish people went to Germany decades ago, millions of them as immigrants, and there isn't a very positive attitude towards them, and we are able to replicate that from Google Ngrams data as well by performing the V-test. Okay, we saw that semantics and bias is embedded in these models. What about empirical information that doesn't depend on a context or a feeling, but it's more about the statistics in the world. Can we replicate those as well? Or can those be a reason for these biases? For example, let's say that I would like to know how a certain name is associated with being male or female. Taylor, for example. It's an androgynous name, and it's almost 50-50 male and female. And based on this, I can perform a similar computation to see how much a word is associated with a certain stereotypical group. And based on this, I went to U.S. I collected data from the U.S. Census Bureau's 1990, I believe, data where they included the gender of people with certain names and how many of them were out there. So I took all of these names, the most frequent ones, and tried to calculate their association with genders being female or male. And we see that these androgynous names had 0.84 correlation coefficients. So it's almost about 84% similarity in the statistics of the world versus the association that I'm getting only from a semantic model, which is very interesting to me. And this is an illustration of that. We see here that, for example, Taylor is in the middle, almost white, 50% male, 50% female from the effect size that I'm getting, which is almost 0 in this case. And we see that Carmen is almost 100% female, whereas Chris is 100% male. Okay, what about if you look at employment statistics, occupation statistics based on gender. And the Bureau of Labor Statistics publishes this information every year. And based on this, I took the data from, I'm trying to see which year this was, it might be 2017. And I took the occupation names, and then tried to see their association with certain genders. And the correlation coefficient was 0.9, which is amazing. And after that, when we look at the results, we see that a programmer is, oops, where is my, it's being reflected from the mirror. I don't want to blind anyone, so I'm not going to use it. But on the upper left side, we see that programmer is almost 100% male, whereas a nurse is almost 100% female. And when you look at, for example, Google Ngrams, searching for, she's a programmer, usually the result you get is 0, because things that are below a certain frequency are just cut from the Ngrams, and until recently, she's a programmer was 0. And we can see that here, reflected here as well. Okay, now we can understand that there are different types of bias that are embedded in semantic spaces. And there might be different reasons why these are getting in these models, but we can come up with three main categories for types of bias that we are dealing with. The first one is the vertical information, gender and occupations was one example. And this is not exactly bias, it's basically the statistic that we have in the world. And these might be caused by the injustices in the past, or biases in the past, but we don't know any information about that, we just have the statistics here. And the models are learning from these statistics. But we also see that the universal biases are embedded in these models, as well as things that can be really prejudiced, such as black versus white names being considered pleasant versus unpleasant. But I would like to remind that in some cases you want certain types of biases to be in your machine learning models, because they can be very useful. It depends on what kind of task you are dealing with. And some people have suggested fairness through blindness. Basically, just remove protected attributes or debias the system by completely taking the bias component from the vector space from all words. But this cannot be the right solution to this, like just turning a blind eye to this. Because, first of all, once we remove this information, we see that we are also removing statistical information about the world. And the other thing would be we would end up with redundant encodings, which wouldn't have the same quality as the previous ones, and we don't know what exactly we are losing here. And another very important example is having proxies. Even if you remove protected attributes, there are still proxies for bias to take place. For example, when automated systems are deciding to give loans to certain people, the zip code is a proxy to the address. So even if you remove all protected attributes, the zip code, since it's a proxy to having a certain financial status, it would give you the redlining example where certain people are just denied loans because of their zip code. And by the way, in law, the main discrimination criteria is using protected attributes for discrimination. And if those protected attributes are removed, and if you are proxying from the zip code, it's completely okay to be using the system like that right now. And I'm suggesting instead, fairness through awareness. First of all, we need to understand cultural bias. And then, based on this bias, we need to understand the protected attributes that come with them. And we also need to understand the machine learning test. For example, in bioinformatics or health informatics, we need to make sure that there's a certain bias. The bias for genders or certain ethnicities or racial backgrounds are taken into account. Because one example is for cardiac disease. Symptoms of men and women are different. Treatment should be different as well. And we have to make sure that we are taking this into account in whatever model we are building. And I'm saying that fairness is task-specific for this purpose. And this work was published last year at Science. And there were a lot of news about it in media. And one of them said, after this random screenshot that I took, which I really like because it says, in 2017, society started taking AI bias seriously. So in 2017, people really understood that there was a serious problem caused by these automated systems and the bias that they are perpetuating in society that's already a huge problem to deal with. And this is now happening at the large scale. Okay. What am I going to be working on next? So this kind of covers the project that I was working on. And I'm trying to wrap up quickly so that you can also ask questions. And also, I was going to mention in the beginning that this can be interactive, but I think it's too late now. Okay. I'm not going to be focusing on the singularity or transhumance or when machines are going to gain cognition because we have much more immediate problems right now. I'm, for example, focusing on computer vision and joint semantic visual spaces. And these are being currently used, for example, for automated surveillance. And computer vision systems are known to have bias as well, but it's much harder to quantify those if you are not dealing with supervised machine learning. And imagine a system being biased for certain skin colors or ethnicities and how much of a problem this might become because a lot of these automated systems are being used to identify targets or they are even used in war zones or they are used all over the streets to identify, for example, anomalies for anomaly detection and so on. And we don't exactly know how these systems are working yet. And they might very well be biased because all the analyzable ones are showing bias. What about algorithmic transparency and interpretable machine learning? So, for example, with driverless cars, we know that they have vision systems as well. And let's say that this is the classical trolley problem in the current sense where we have the driverless cars is going to crash into someone. There will be an accident. It cannot avoid that. And it has to decide, is it going to crash into the white male executive right across the car or is it going to choose to run into the old black lady on the other side? And we don't know the answer to this yet. And because of that, we have to be very careful about what kind of products that we are building because we don't want to be building the digital analogs of Robert Mooses' racially motivated love overpasses. So, Robert Mooses is considered one of the best urban planners. He is the planner of New York City. But the overpasses that he built all around the parkways were quite low. So, buses were people with lower financial status had to use public transportation. Buses couldn't pass through those low overpasses, so people had to have their own cars so that they can go to the beaches in Long Island or the parks that he built. And with these low overpasses, people were basically just separated and this led to decades of segregation. And we have to make sure that we are not only in the middle of the street, but we have to make sure that we are not causing the same problems again with the digital products that we are putting out there blindly and for this I would like to keep working on a fairness framework to uncover bias in artificial intelligence and come up with ways to mitigate it while preserving the utility of systems and come up with fairness algorithms but there are a lot of privacy and security implications here as well for example when we have these machine learning models going from our phones to the cloud or from our fitness trackers to the cloud can we guarantee fairness in a secure and at the same time private way how can we avoid adversarial poisoning for these systems and so on and there are many unanswered questions in this area and it's a very exciting area and I would like to thank all of my collaborators as well none of this work would have been possible without them and I'm really grateful to them and now I think we have a few minutes for questions as well sorry I would be happy to take questions, comments, questions, anything.