Why is categorical bias important for AI ethics AND quality? with Theresa Willem

This episode is about data, categories, artificial intelligence, and the role ethics can play in the day-to-day development of technologies that are ever more widely used to support medical diagnosis.

Show notes

  • Munich Embedded Ethics and Social Science Hub (MESH): https://www.pm.mh.tum.de/en/ethics/research/embedded-ethics/ 

Built Better was developed by Paola Buedo, Alena Buyx, Jonas Fischer, Paula Hepp, Natalia Gomez, Susanne Kern, Theresa Willem and Bettina Zimmermann from the Institute of Ethics in Medicine and Technology at the Technical University Munich: www.pm.mh.tum.de/ethics  

Production: Kugel und Niere GmbH 

Funding: Bayer Foundation

Show transcript

00:00:02: Hello and welcome to Build Better, the science podcast where you learn about practical ethics for emerging tech.

00:00:10: I'm your

00:00:10: host

00:00:11: Bettina Zimmermann.

00:00:12: I am a researcher specialized in analyzing the ethical implications of emerging health tech.

00:00:18: In this show i discuss real-life examples with my colleagues at The Technical University Of Munich To Show You How Our Latest Ethics Research Enriches What You Build.

00:00:29: Today's podcast is about data biases.

00:00:32: When researchers develop machine learning tools for healthcare, they often rely on health data to train and test their AI models.

00:00:40: but these data are often biased in various ways.

00:00:44: For example

00:00:45: They

00:00:45: reflect existing social biases and stereotypes related to gender or ethnicity.

00:00:51: We will ask how we can identify and address such biases from categorical data used in Machine Learning.

00:01:04: With me is my dear colleague and AI ethicist Theresa Willem.

00:01:08: We have been working together for six years now, And she just last year defended her PhD on the topic.

00:01:14: Welcome Teresa!

00:01:16: Hello thanks for having me Bettina.

00:01:17: So Teresa what fascinates you about this topic?

00:01:20: Why did you work in that during your PhD?

00:01:23: Well, that started actually when I was working in industry.

00:01:25: So I thought it was done with my education and university education but then I worked at an incubator for digital health products.

00:01:36: And AI is still quite early back then.

00:01:41: so I saw people starting to incorporate more and more into the product they were developing.

00:01:49: A lot of the social science knowledge we already had about biases at that time was not really included in development after products.

00:01:58: So, I asked myself why did it is and somehow found a way back to academia to investigate this more when i was trying find ways with my academic work also bridge this gap.

00:02:10: so how like have certain knowledge social science an ethics knowledge about certain bias?

00:02:15: these are data.

00:02:17: How can we bring that closer to technological developments such as that happening in incubators and digital health products?

00:02:25: So I remember, your PhD thesis.

00:02:27: you worked on the projects with dermatologists.

00:02:29: And they wanted to develop an AI tool to classify skin lesions like skin cancer for example.

00:02:35: To train their models they relied on health data that was partly organized in categories like gender or a skin type of age And the quality of these categories also determine.

00:02:48: sort off that quality after AI model output right?

00:02:52: Yes, exactly.

00:02:53: So first it's a completely natural thing to talk about categories.

00:02:58: when we are classify certain kind of attributes have personal attributes We use categories to organize our communication, we used categories and two structure hour day-to-day life basically.

00:03:12: so categories like gender are relevant.

00:03:16: And often they also do have predictive power for certain machine learning models.

00:03:21: but we need to pay attention to the context these data has been collected in because that influences how this category is shaped.

00:03:31: And in that way, what has been a very useful data category.

00:03:36: In data collection and for the purpose of data was collected can turn into what we then refer to low quality data or like garbage-in if you will If We use it in different scenario.

00:03:49: Okay but not all Data that is used to train AI models Is categorical right?

00:03:54: No so For example in Dematology The main data category That we work with is images.

00:04:00: So image data usually is a photograph of skin lesion, and then you have maybe also some numerical data that refers to certain attributes or like for example timestamps when the dislesion arise first.

00:04:16: Or was it developed?

00:04:18: But then you'll also have these categorical data Like for example patient's gender or patients' skin type that are used to give more information than the image cannot capture alone.

00:04:31: And your thesis, or also paper we will link in show notes it specialized on this categorical data and social construction of these categories?

00:04:43: Can you explain what do mean by this social construction?

00:04:46: So basically all categories have been defined by someone because throw something into a box to make our lives easier.

00:04:59: so when we use categorical data let's stick with gender or skin type.

00:05:05: Then we do this because we assume that there is predictive power behind the category, They have enough similarity for us to be able to tell something about, for example their skin lesions if they are cancerous or malignant.

00:05:26: But the important fact that you already said is these categories often socially constructed so gender.

00:05:34: by now we all know that gender is a spectrum.

00:05:36: it's not either male of female but there is lot in middle and just majority people gravitate being either male.

00:05:47: In fact, there is a lot in between.

00:05:49: So we still use these categories male and female And during day-to-day use of this category also ignore to the large extent that There's A Lot in Between because it makes communication easy Because for a lot of scenarios This Is fine grained enough For us To be able work with These Terms.

00:06:10: But when It comes to Health Predictions this way of working with categories can introduce inexactitudes and these exacted use can then translate to inaccuracy in the model.

00:06:24: training.

00:06:25: And a social construction.

00:06:26: part of it is precisely that we build these categories for our day-to-day communication force certain purpose, which these categories make sense?

00:06:36: We used them without thinking about basically but they're not super exact.

00:06:42: And in some categories, there's more individuals than others and the combination of these like social construction of this category is taking them out of context.

00:06:53: they were initially intended to be used then can create problems with machine learning.

00:06:59: What kind of problem came up regarding your project?

00:07:04: So it was a very specific case so that we're developing Skin Legion classifier.

00:07:11: So we were using a publicly available data set that held two thousand three hundred patient entries, and they had very unique combination of patient metadata.

00:07:22: That part of them where categorical data.

00:07:26: so the history of this dataset was that the dataset was collected in Brazil And Brazil has large immigrant community from Central Europe And this immigrant community has a very interesting combination of data features that are interesting if you want to train machine learning model on skin lesions and identify skin cancer, because people from Central Europe are historically rather white and phenotype.

00:07:58: The immigrant population came to Brazil where the state was collected.

00:08:03: they were often not in a very good socioeconomic status.

00:08:07: That means they often had jobs where there were exposed to sun a lot and the Brazilian Sun for very light phenotypes is incredibly damaging, so a lot of this population develops skin cancer at later

00:08:21: ages.".

00:08:22: For people who collected these data set it was incredibly helpful because obviously wanted have huge variety of skin cancers.

00:08:33: But when we are now training, as it was the case in our project.

00:08:38: Training a skin lesion classifier that were intending to use and central Europe this data collection context under categorization into social construction of these categories can then create issues In The Skin Legion classifiers.

00:08:53: so we notice That there where these first of all this data Collection Context And then they will also be super interesting metadata categories the data set, that kind of were proxies for this immigration history.

00:09:08: Of The majority of the population in the dataset.

00:09:11: so For example there was one metadata category There was migration history off the father and it wasn't another meta-data Category.

00:09:20: That Was Migration History Off The Mother.

00:09:23: Then There Was Metadata Categories Like For Example has piped water or has a sewage system?

00:09:29: that clearly were proxies for the socioeconomic status of these people.

00:09:33: And when we were working with this data set, because it was publicly available and obviously in medical sciences data is often super scarce.

00:09:41: so we often work with publicly-available data to train machine learning models... We noticed let's say weird combination of metadata.

00:09:52: metadata will have any harmful, maybe influence on the machine learning model that we train.

00:09:58: So we wanted to investigate specifically if this meta data would be harmful or may even useful for the machine-learning model that were intending to train?

00:10:09: The context in which health data is collected matters a lot and for Machine Learning We tend to use data that's already available but we tend to disregard where it's actually coming from, right?

00:10:22: Exactly.

00:10:23: Yeah.

00:10:23: So if we want to move this to other contexts If other developers wanna use such categorical data To train their AI models in a different context What should they look out for?

00:10:35: When we were investigating This dataset more closely?

00:10:38: and also We're looking into the performance differences these Categorical Data made For the machine learning model?

00:10:45: we trained really some of the categories such as for example, The Migration History Of The Father or The Mother that have an impact on model.

00:10:57: That actually decreased at performance off the model.

00:10:59: meaning when we use these data categories to train a model and performance decreases it would've been better if left out right?

00:11:10: And I think for other training context, it's a similar question that you need to pose if you want to prevent this from happening.

00:11:18: Basically You need to understand what is the specific context That i'm training this machine learning model?

00:11:23: For and you need To ask yourself What kind of factors From The data could impair the quality Of the performance of the model.

00:11:34: then i'm Training.

00:11:36: Basically what you want to do is, come down to causation versus correlation.

00:11:42: Because all these examples that I already mentioned so for example they were collecting data because of the migration history.

00:11:49: obviously in populations with lighter skin tones and skin cancer are higher if you've been exposed to sun.

00:11:54: These are all correlations but there not causal factors for skin cancer.

00:11:59: So when we think about categories include for training What are really the causal factors here?

00:12:08: so maybe you don't even want to think about it's Patrick skin type which is a widely used skin scale in which he classified skin types, but rather you wanna thing about how much melanin does someone have and their skin.

00:12:23: Additionally, it might make sense to see that they've been working in fields.

00:12:28: But socioeconomic status is a proxy versus what.

00:12:31: was the real sun exposure?

00:12:33: And do you have the sun exposure as a category?

00:12:36: and I think another project can't do very similar things.

00:12:38: You want to Think through the context of The data.

00:12:42: did he wanna use for training and thing.

00:12:44: What does the real causal factors and what his pure correlation and what our study showed at.

00:12:49: In most cases where we had categories that were more correlative, it made sense to exclude these for training.

00:12:57: Thanks!

00:12:58: So do you think your findings would also be applicable in a commercial context?

00:13:04: I think of start-up for example... Would this be meaningful for them too?

00:13:08: consider the aspects?

00:13:10: Yes and i'm not saying because as an AI ethicist always think considerations make sense but actually insights into your data and did the kind of quality increase off your final product.

00:13:27: Be it a machine learning model that you train for scientific purposes or commercial products are actually a machine-learning model at.

00:13:33: you want to translate clinical practice later, always make sense too.

00:13:38: think what increases their performance.

00:13:42: increasing the performance on the model to be more equitable in two work better form.

00:13:48: all people I think always has a certain ethic to it and is ethically relevant, definitely.

00:13:55: But also useful from business strategy perspective right?

00:13:59: A model or product that performs better also sells better in the way!

00:14:03: To put it very simple yeah.

00:14:05: so i think definitely makes sense through these things about specifically who's target audience of the model you're creating And for whom is it supposed to work?

00:14:20: In medicine, for example.

00:14:21: It's supposed to be worked on by everyone!

00:14:23: We cannot choose in a public sector like healthcare who our model works and doesn't.

00:14:30: So we need to think very carefully before developing what kind of factors could impair the performance of our models... ...and so which categories do you use for training...?

00:14:41: What do they say about Whom & Who is actually captured in this categorical

00:14:45: box?!

00:14:46: that we're thinking with.

00:14:47: So yeah, I think it definitely makes sense for all kinds of different purposes to think through these correlations and causations.

00:14:55: Okay so coming back to your project with the dermatologists you will sort of entering this project as an ethicist.

00:15:02: but are not yourself a AI developer?

00:15:04: You aren't a dermatologist

00:15:06: right?!

00:15:07: Could you paint me picture how your collaboration?

00:15:13: So the project itself was a collaboration between different universities.

00:15:17: We had a dermatological group, so few dermatologists on the project.

00:15:22: we have engineers specifically bioengineers specialized in machine learning and myself as an AI ethicist.

00:15:31: it's highly interdisciplinary way of working also kind experiments that did to come up with the results that we discussed earlier, they were highly interdisciplinary.

00:15:43: So I worked together with The Machine Learning Engineers and was observing their day-to-day practices as discussing ethical implications of models and methods thinking about applying or developing.

00:15:58: when i saw certain things develop in the project, then I was looking more into the ethical implications of that.

00:16:06: So for example when they told me they would choose this specific publicly available data set to work with took the data set and analyzed it very deeply, looked into specifically what kind of data features are available.

00:16:21: Where was this data collected?

00:16:23: And then I brought this analysis that a bias analysis with also like general dataset analysis back to the project.

00:16:30: so we met regularly to discuss these kinds of findings but also worked along a lot often shared lab space sitting next them discussing just on day-to-day basis.

00:16:41: We were going lunch together certain things over lunch.

00:16:46: So the general approach that we were working with is something that we call embedded ethics, and then means this very highly collaborative way of working.

00:16:55: so We do not only like collaborate on a project And then meet let's say once per month But it's really a very immersed way Of working.

00:17:05: Like we share lab space we work together Very closely.

00:17:09: I was included in all The communication of the dermatologists and computer scientists, for example.

00:17:16: So I was in their Slack channels.

00:17:18: I was attending there meetings without saying much myself but just observing what kind decisions are they making?

00:17:25: What things were thinking about or discussing?

00:17:28: And then taking knowledge from these kinds of meetings out and doing an ethical analysis and a lot of desk research like what are the ethical implications that we already know things that they are considering applying in the project, and then collaboratively discussing that.

00:17:45: And bringing it back to their projects together with them deciding how should maybe decisions be tweaked a little bit even like super small decisions?

00:17:56: Like what kind of data category we're using to train machine learning model now these kinds very small decisions.

00:18:03: That sounds like an interesting approach.

00:18:05: I can imagine you also learn alot from this other domains.

00:18:09: But what was challenging about this setup?

00:18:11: I mean embedded ethics is a challenging approach because it's very time-consuming, i would say.

00:18:18: Because this interdisciplinary way of working takes a lot of time as you said... You learn alot but also need to spend the time learning alot.

00:18:26: so in the beginning we really needed to find a shared vocabulary of the machine learning engineers that dematologists and ethicists all three parties kind speak a little bit different languages.

00:18:40: so we kinda needed to find some common ground work on.

00:18:44: And then obviously attending all the meetings is very time consuming approach, spending much time together be super immersed in project.

00:18:54: generally i would say All projects I've been applying this approach to have been warmly welcomed and i've had very good collaborations with the people in a project, but it's not that everybody thinks that ethics is placed.

00:19:07: In the right point in development.

00:19:09: as early us we applied with embedded ethic.

00:19:11: so you really start in this very early research project right when people still think about what kind of data set are using?

00:19:18: And there is people who believe that ethics should be place more downstream when a product has been a bit further developed in a way.

00:19:27: But also there's the certain pressure from big funders, for example who incentivize people to apply for projects and actually work with integrated ethics approaches such as embedded ethics very early on.

00:19:42: so these kind of situations it felt that some people were using.

00:19:48: my presence is an ethical washing if you will.

00:19:53: Again, this does not apply to a lot of people.

00:19:56: But in some instances I realized in the project that People liked my existence In the grant application but Not so much in The project itself when they realize how Much time it actually takes To keep me in the loop?

00:20:18: Persistence, I guess.

00:20:19: So just trying to reiterate over the necessity of discussing ethical implication particularly in early research.

00:20:26: as i said this only was applied to very few people but then also overtime had a feeling it's mellowed out and longer wasn't project them into more merit peoplesaw But than other thing that we did.

00:20:38: so there is quite some AI ethicists that apply embedded ethics or similar approaches.

00:20:45: two projects When I realized that there were these challenges in the project, then we started a little... Well.

00:20:53: It's a scientific group but it also kind of to us feels like a bit of self-help group called The Mesh, Munich Embedded Ethics and Social Science Hub And this is working group where regularly meet to discuss the challenge on projects.

00:21:07: This for me as was still very early scholar when facing those kinds of challenges That was instrumental because i met with people who also apply these approaches, face very similar challenges and we were able to discuss them.

00:21:22: And help each other... That lab still exists.

00:21:24: so once per month and discuss what's on our mind developed together the approach further.

00:21:31: that really helped.

00:21:32: Do you have any tips for developers?

00:21:35: To make such a collaboration with ethicists fruitful?

00:21:40: Yeah I mean it is difficult or tricky question because The project context, they vary a lot obviously and embedded ethics is not very standard approach.

00:21:50: It's an intentionally so flexible approach but I think generally what you need to be aware of if want do this kind collaboration that you need factor in certain amount time these moments of interdisciplinary collaboration where it sometimes takes time to find shared vocabulary and whereas, you go one or two iterations that would not have done.

00:22:19: But if you believe this really improves the outcome your project be in terms of ethics but also in terms performance its pure performance metrics then I think this approach comes more naturally.

00:22:34: I learned also that over the time of projects, people who really were interested in the approach itself and ethics results brought to this project.

00:22:48: They started reading ethics papers themselves as well as learning how to include knowledge into their day-to-day work Almost without me, of course we were still discussing more and more but I think they also benefited a lot.

00:23:04: And that was also fruitful.

00:23:05: so being open-minded Being not afraid one very important thing is to really not perceive the ethicist on team as like moral authority or something.

00:23:19: that's just another job, there is a role in the team.

00:23:23: As long as you perceive it as such and aren't afraid that ethics police are now here to tell what exactly your supposed do or not to do then you can take feedback and together interdisciplinarily think through how we improve our building.

00:23:41: It isn't one against other but working towards shared goal of improving the product or the output of research project.

00:23:50: Exactly, yeah!

00:23:52: So you also said that in your projects there were funders requiring ethics to be involved with development.

00:24:01: so embedding ethics like this requires time and funding.

00:24:07: now if I think about my friends from a startup scene they would often say well we don't have any money for it.

00:24:16: these people should approach collaboration with ethicists.

00:24:21: That is super tricky, often.

00:24:23: I think this can also be done in terms of research projects.

00:24:29: so if you work on a startup and feel that you would like to get an opinion from ethicist's on the project they're working on i'd always recommend just reach out Ethicists integrated ethicist.

00:24:44: oftentimes maybe they cannot do a full embedded ethics approach and accompany your product development from step one, but often.

00:24:52: They will be willing to help into give you an assessment or I mean, we do.

00:24:59: So you can reach out to the mesh if you want and people in a match who have research interest is something similar that your working on often very quick an also very happy too.

00:25:10: help given assessment but then there's all.

00:25:12: so tools are dead at.

00:25:14: you can use yourself like it don't have funding for embedded ethics or if few don't of any context embedded ethicists this very lightweight walls such as for example the ethics canvas.

00:25:26: it's an open source canvass that you can fill in, then asks you specific questions about a product under development and through answering these questions.

00:25:38: In canvas style?

00:25:40: You derive certain ethical implications of the product underdevelopment.

00:25:45: We also use these tools and we have workshop formats in which we apply this, you know, workshop format with developers.

00:25:53: And we fill in these canvases together with them and then afterwards we do an ethical assessment and bring that back.

00:25:59: so this is something to reach out to Mesh for but You could also use the tools alone.

00:26:04: I think it's always better than not using anything or thinking about the ethical implications of data at all.

00:26:12: There are other ways like After you've trained a machine learning model, if you really have no chance to assess the ethical implications beforehand then at least what can be done is after training do some post hoc analysis.

00:26:27: There are cool frameworks out there for this.

00:26:29: For example, the Model Cards framework which also basically gives us set of questions that we answer about the Machine Learning Model and think through About relevant factors that might impair the performance of your machine learning model or factors.

00:26:45: That might impaired equality off your product whatever and then you with that get some homework basically to do some intersectional subgroup testing for, And then you can report that back in this model card framework.

00:27:09: So, that would also be something... ...that you could do on your own?

00:27:12: I mean.. You always ask for advice from ethicists and often as i said we'd be happy to help!

00:27:17: There's a lot of colleagues-I'm sure they're super happy if someone reaches out to them and asks an ethical analysis about their product.

00:27:24: But alot is really accessible right now.

00:27:27: there are templates out there Hugging face template for example great model cards and other really lightweight formats.

00:27:35: Sounds like a lot of the ethical work is also about making things visible and transparent?

00:27:41: Yeah, absolutely!

00:27:43: I mean when we think about certain technical product specifically if you want to market it then You can as developer maximize the performance of the tool that you're using for this target audience, but in order to prevent harm.

00:28:03: For people outside.

00:28:04: is target audience?

00:28:19: unquote ethical, a product is and how we see it.

00:28:23: And I think transparency is a big factor in.

00:28:26: there's also A lot of explainability tools for example that increase transparency off your machine learning model Off-your-product.

00:28:34: That also increased Ethicality.

00:28:37: if you will off your product For example, SHAP gives You a feature selection In Your data set that you want to train your Machine Learning Model with and prioritizes these features as per relevance against the intended use of the model that you want to train.

00:28:53: And this is an explainability feature, but retrain your model with the most useful data features and see if you get a performance jump.

00:29:08: an often, you do.

00:29:10: So this is also one thing that he can just do.

00:29:12: it's a python package that you can't just apply and then they didn't do without any embedded ethics involvement whatsoever.

00:29:19: so yeah i think transparency and being transparent about intended use being transparent out of ways your model work about.

00:29:27: to date I've been using his super useful

00:29:31: All right, thank you so much Teresa for your time and explanations.

00:29:35: So we heard that the construction of categorical data is highly context-sensitive And it helps improving quality in your final product.

00:29:45: if you consider them during model development.

00:29:48: You can work with an embedded ethicist to do this but using open source tools that Teresa mentioned are also helpful.

00:30:00: All the sources and research that Theresa has mentioned is published in scientific articles.

00:30:06: The links to these studies are on the show notes.

00:30:09: Please visit our website for more information about our team at the Institute of Ethics in Medicine & Technology, at the Technical University of Munich And if you like our podcast please subscribe and spread a word.

00:30:22: share it with your friends and colleagues.

00:30:25: This podcast has been developed by Paola Hepp, Paola Buedo, Alina Buchs our guest today Teresa Willem Natalia Gomez and me Bettina Zimmermann from the Technical University of Munich.

00:30:41: It was produced with help of the podcast company Kugel und Niere in Munich Germany.

New comment

Your name or nickname, will be shown publicly
At least 10 characters long
By submitting your comment you agree that the content of the field "Name or nickname" will be stored and shown publicly next to your comment. Using your real name is optional.