Ако двама човешки анотатори не са съгласни, не очаквайте моделът ви да ги надмине
Дайте едно и също изображение на гума на двама човешки анотатори и те не винаги ще се съгласят дали е повредена. Според Filipa Castro, data scientist в Continental, тази разлика определя тавана за всеки модел, обучен на техните етикети, и е само един от многото начини, по които продуктите с машинно обучение разбиват навиците за планиране от традиционния софтуер. Как тогава екипите да поставят реалистични цели и да проектират около грешки, които не могат да елиминират?
Научете се да задавате очаквания за ML въз основа на данните си и да проектирате приложения, в които грешките на модела са поправими
Filipa Castro, data scientist в Continental, обяснява защо продуктите с машинно обучение (софтуер 2.0) се планират по-трудно от традиционния софтуер: те се учат от данни и се държат вероятностно. Чрез казус за инспекция на гуми и приложение за разпознаване на активности тя показва как задълбоченото изследване на данните, базовите нива от човешки етикети и проектирането, толериращо грешки, помагат на екипите да поставят реалистични очаквания и да опазят потребителското изживяване.
“Така че докато в софтуер 1.0 поведението на продукта е детерминистично, тук то е вероятностно, защото модел е този, който отговаря или извежда нещо.”
“В обобщение бих казала, че е много важно да се потопим дълбоко в разбирането на данните и да покажем кое е възможно и кое не според данните, с които разполагаме.”
What you will learn
Обяснете на заинтересованите страни разликата между детерминистичния софтуер 1.0 и вероятностния софтуер 2.0, обучен на данни.
Планирайте ML жизнен цикъл, който се връща назад между бизнес разбирането, подготовката на данни, моделирането и внедряването.
Използвайте разпределенията на данните, за да покажете на заинтересованите страни кои случаи моделът може и кои не може да обработва.
Поставяйте реалистични цели за представяне, като измервате съгласието между човешките анотатори.
Проектирайте ML функционалности така, че грешките да са обратими и потвърждавани от потребителите, а корекциите да се връщат обратно в модела.
Details
Level
Intermediate
Format
Talk
Technical depth
Introductory technical
For
Mid-career, Senior individual contributor, People manager
Length
19:33
Published
July 2022
Questions this talk answers
Защо софтуерът с машинно обучение се планира по-трудно от традиционния софтуер?
Традиционният софтуер следва изрични инструкции и се държи детерминистично, докато ML софтуерът се учи от примери и дава вероятностни резултати. Цикълът му на разработка включва и много стъпки, които често се връщат към предишни етапи.
Как един екип може да постави реалистични очаквания за ML модел?
Изследвайте разпределението на данните, за да покажете кои дефекти или случаи липсват, разделете широкия проблем на по-малки приоритети и използвайте съгласието между човешките анотатори като базово ниво за представянето.
Как трябва да се проектира приложение, когато моделът му понякога ще греши?
Предпочитайте решения, при които грешките са прозрачни и обратими, например разпознаване на събития след записа и молба към потребителя да ги потвърди, вместо необратими действия в реално време. Потвържденията на потребителите могат по-късно да подобрят модела.
Как корпоративен екип по data science работи с бизнес звената по AI проекти?
В Continental екипът действа като пул от експерти по данни: може да консултира, да изследва данните за потенциал, да изгради MVP прототип с методи като Scrum или да достави цялостен продукт до продукционна среда.
Колко данни са необходими на модел за разпознаване на изображения или активности?
Обикновено от порядъка на хиляди примери, около 1000 до 3000; около 1000 е добър ориентир за бинарен проблем, а проблемите с много класове изискват повече.
Човешкото несъгласие ограничава представянето на модела (56 s)
Проектирайте ML приложения с обратими грешки (70 s)
Good morning or good afternoon. I'm not sure everyone. My name is Filipa. I work as a data scientist at Continental. I currently sit in Portugal, more specifically in Porto. And basically, I think most of you may already know Continental. It is mainly known by its production of tires, but the business is much broader than that. So specifically in the field of building smarts and new digital products, we are building a lot of expertise there.
We build products for different fields, such as agriculture, sports, of course, automotive also. So today I would like to share my view, my experience in building this kind of products. I will mainly focus on the big challenges that arise when we are building machine learning based software instead of traditional software. And I also want to come with some solutions or at least present the solutions that we are pushing forward at Continental.
So let me start by explaining what is the main difference between building traditional mobile apps or web apps that we all know in contrast to building smart products that are based on what we call artificial intelligence. So if you see here in this comic that I really like, if we have a common or normal traditional software mobile app, if you give the designer and the developers, the designer gives the developers a wireframe explaining what is the expected behavior of a certain button of a certain layer, then it's quite easy outside to understand what are the steps and to plan for it.
So, while for an AI product, this can be really different. So let's say you want to build a self-driving car, you know what the self-driving car is supposed to do, but it's difficult to plan right and to see to foresee the steps that are needed to build this kind of features. Why is that? Basically, because in traditional software, the developers use what we call the software 1.0.
This means that the developer will give explicit instructions to the computer. So if you hit this button, this is the behavior. If you take a picture, this is the behavior. While for building machine learning based products, we are in the era of software 2.0. This means that normally the developer, which can be like a data scientist like me, we won't give explicit instructions to this computer or to this mobile app.
Instead, we will give a lot of data, a lot of examples and the computer will learn with this example. To make it simpler, if you are trying to teach a kid the difference, for instance, between a dog and a cat, you will show this kid a lot of examples. You can show pictures, you can go to the street and show how a dog looks like, how a cat looks like, and then the brain of the kid starts to learn.
And for software 2.0, it's exactly the same. You give a lot of data examples, you build a model that is based on mathematics, and because of this, it's a probabilistic model. So while in software 1.0, it's a deterministic behavior of the product here, it's a probabilistic behavior because it's a model that is answering or outputting something. And how does this affect the development cycle or when you are an owner or a manager of the product, why is it so challenging to base the products on this software 2.0?
So if we look at the traditional software cycle, I would say that if you follow the good practices that have been studied for years now, if you plan well, you do a good analysis of requirements, a good design, then this cycle runs quite smoothly. So for machine learning software, it is also a cycle, but with a lot of forwards and backs.
So we start by understanding the business like we do here, but then we also need to understand the data to prepare the data to create the model. So there are a lot of additional steps, and at each one of these steps, you might need to go back to the previous ones. So regarding our experience at Continental, what we see is when we are in this region, so this gray area of understanding the business and the data, we find a lot of different scenarios within the same company.
So sometimes we have some teams, they don't have any kind of data, they don't have the knowledge, they don't know what they want to do, but they know they want to do something that is intelligent. Sometimes they already have the data, but they don't have the knowledge, so we need to help them do this. And sometimes they have the data, they know exactly what they want, but they don't have the know how yet.
So this is quite difficult because you have such different scenarios. And also when you go to each of these steps, you can also find different obstacles. So for instance, if you go to the data preparation section, sometimes you need to collect data. So you need to set up a new project, which is data collection. You need to give recommendations to give them the best practices for collecting this data.
Sometimes they have the data, but there's no quality in this data. So you need to set up maybe a data engineering project before the actual data science project. And sometimes it's really difficult to handle the data if it's like stored in a very weird unknown database, for instance. So when we move to this part of the modeling also, it will depend a lot if it's a research based project.
If it's something that needs to go live and then you have speed requirements, for instance, sometimes you need to come up with new metrics because it's not all about accuracy and reliability. It's also about efficiency of these models, how fast they can run. And when you go to the deployment, you can also find different scenarios. So sometimes they want to build a web app or mobile app.
Sometimes it's only a dashboard. Sometimes it's only an end point. So an end point is something that you can call a model and ask for a prediction. So every day I want to predict how many tires the company will sell. This is what we call an end point. And with such uncertainty, such diversity of scenarios, how are we dealing with this in our company?
Basically, the team of data science or the data scientists, we don't see ourselves as a team that is only focused on delivering AI products. We see us as a pool of data experts that want to help the company foster data science, to improve the data literacy, to give support to any team that wants to develop AI based solutions.
So sometimes we might be acting as consultants. If some team just wants to evaluate potential use cases, we can advise them to follow our standards, our processes, our good practices. So they are the owners of the project. We just go there to give some support. Sometimes we can move forward and it makes sense to move forward and explore some of the data to see the actual potential.
When there is a clear goal, a clear business problem, we want to check if AI can solve this. If yes, if there's value, we can move to a prototyping phase where we build the MVP and we can start using more resources, maybe some methodologies such as Scrum. And if finally there's like the interest to invest more in this kind of solution, we can implement an end to end product and be the responsible ones to bring it into production.
So this is our main approach, I think the strategy, let's say. And now I would like to give you a concrete example of a project where we faced some challenges, how we solved them and how we dealt with this kind of problem. So let's say someone asks, of course, that we design a tire inspection system. This is something like a self-driving car for inspecting tires and we are not very sure about how to start.
So in this case, it was a real use case where the team already had images of tires. They already had the labels, so the labels mean that they already know this tire as a problem. This tire doesn't have a problem. They add some knowledge. They were using traditional methods, not deep learning or machine learning yet. And they had a very target solution already defined.
So for each image of a tire, a picture, they wanted to detect if it was in a good state or if it was damaged somehow. If there was some kind of anomaly, the metric, they also knew they wanted to reduce the false positive rate. So with these traditional methods, they were detecting a lot of false anomalies and they wanted to reduce this.
So after understanding the business, we went forward to understand the data and you will see how important this is. So the classes we already know. We have tires that are okay, tires that are not okay. So this is a binary problem. Then it's also important to dive in the data and understand that we have several tires, but for each tire, we might have several images.
So then how can we decide if for one image we have okay and for three image we have not okay. And also for each image we have, we had in this case several patches. So several regions of the image that we wanted to focus our attention and detect if there's an anomaly or not. So in terms of categories, this is still, I would say data, but also business understanding.
So for among all the images, we could have different tires, small tires, big tires. We could have different mold types. This means that the way the process, the tire was created was different. And then we can also have different types of defects. It's only not only one type of defect. There are many, as you can imagine. And also they might have different types of severities.
So why is this important? One of the first steps we did was to visualize this distribution. So let's look at the data and let's look at, for instance, how many defects of each type we have there. Why this is important? Mainly, I would say to set expectations to the stakeholder, to this team or clients. Here you can see that there are some defects that are really common.
But then you also have some defects that are not even represented in the data set. So you don't get to see any kind of example of this defect. And this is important because then you can go back to the stakeholder and explain them. Okay, we are building this model, but once you are starting to test it, if you test it in a new defect that we didn't have access before to any example, then we cannot expect the model to accurately detect these kind of defects that were not represented in the training set.
So as I said with the kid, if the kid didn't saw any examples of these defects, then it doesn't know what it is. The same applies to the article distribution. If there's some article that is not represented, then you cannot accurately detect defects on these articles. And for the severity, I think what is more important and more interesting here is you can try to convince the stakeholder to break the broad problem, which is very complex, into some problems.
So here you could say, let's focus on level one severities because they are the most common ones. And if you solve this problem, it's already a very good progress. Or maybe let's focus on the level four because they are less cases, but they are the most critical ones. So if you solve these ones, if you find these ones with a high reliability, then it's already a good, good progress.
Apart from that, if you have human labels, so in this case, we have humans labeling images and these humans are the ones who decide this is a not okay tire. This is a tire that is okay. And what we saw is for very similar images that there's no, if there's not no agreement between two labelers. So if you give the same image to two humans, they will disagree.
And this is important because if you are able to show that the labels are not always consistent, then you can set the expectations and and tell. Okay, if the humans cannot agree in a in a label for more than 80% of the times, then we shouldn't expect our model to perform more than 80%. So to sum up, I would say that it's very important to dive deep into the data understanding and show what is feasible, what is not according to the data we have.
Try to break the problems and choose the most relevant and critical ones. And if you have human labels, try to use this as a guideline for for like a baseline for performance. Lastly, and very quickly, I would like to give another small example. So let's say we want to build an app that is able to detect activities of humans and we have a video and we want, for instance, our user is jumping and we want to detect this jump.
So let's say our model detected two jumps. This is a example I want to give regarding how to design machine learning apps. So in this case, let's say this jump is a false positive. So the model detected a wrong jump. It's not a jump, but the model says it is a jump and here it detects a real jump.
So this is an error. And how can we design the app better so that this error is more transparent and doesn't give a bad user experience? We have one option, which is the streaming mode. So let's say we are recording and on the fly we want to detect the jump. If it's a jump, we crop the video.
The problem with this is if we have a false positive like this one here, then we will crop the video. The user cannot understand why the video was stopped and cropped. And these kind of mistakes from the model are not reversible. So this is a dangerous, I would say, mistake. It gives a bad user experience. But if somehow we manage to deliver a product where we do this in a post-processing mode.
So let's say the user records an entire video. And after this video is stopped, when the user wants, we will detect the jumps within this video. We ask for the confirmation of the user. So if it says, no, this is not a jump. It just clicks on delete or not confirm. And then we can kind of revert the decision of the model.
And we can even use later this feedback of the user to improve the model. So to sum up in terms of design, I would say it's really important to plan for the real scenario to choose. In this case, streaming mode, post-processing mode to make the errors transparent. So if the model fails, give it to the user and the user is required to verify it.
For instance, this way, I think you can try to design the app so that the impact of the errors, they are still there, the errors, but they don't have such an impact in the user experience. So now I would like to have some time for questions. If you have questions are also, if you deal with this kind of challenges in your daily jobs, I would like to hear about this.
If we don't have time here today, you can reach me in LinkedIn. And I would like to, of course, thanks to Human Tech Global Conference for the opportunity to be here. And thank you for your attention during this session. If there are no questions, maybe I would ask, for instance, and if people are still here, if you have some kind of background in machine learning or if you also deal with this kind of problems, or if you just came out of curiosity, if you are interested in this kind of session and topic.
If you have any questions, or if you are interested in here, if you are interested in this kind of video, or if you are interested in the chat, if you are interested in the chat, if you are interested in the chat. If you are interested in the chat, if you are interested in the chat, if you are interested in the chat.
If you are interested in the chat, if you are interested in the chat. most common number. For activity recognition, for instance, one of the projects I've been part of, it's more around 2,000 to 3,000 images, but also if you have a video and if you use all the frames from these videos, then for each video, you already have a lot of examples. But I would say it's definitely in the region of thousands, 1,000 to 3,000 normally. Of course, if it's a very complex project, for instance, the tires, if you have 100 different effects, then you need maybe 200 examples of each defect, then you need to multiply. It depends. Here we saw a binary classification problem.
If you have multi-class problems, so instead of just detecting okay or not okay, you want to detect what kind of defect is there, then you need more data. But if you want a reference, I would say 1,000 for this kind of problems is a good reference. Okay. Thanks a lot. And I wish everyone a good conference after all. See you.
We'll see you next time.
Transcribed automatically; names checked against the speaker record. Select a time to jump there.
Article based on this talk
Защо продуктите с машинно обучение не могат да се планират като обикновен софтуер
Filipa Castro, data scientist в Continental, показва как изследването на данните, базовите нива от човешки етикети и внимателният дизайн правят несигурните ML продукти управляеми.
Накратко
Filipa Castro, data scientist в Continental, твърди, че продуктите, изградени с машинно обучение, не могат да се планират като обикновени уеб или мобилни приложения, защото поведението им е научено от данни и е вероятностно, а не детерминистично. Въз основа на реален проект за инспекция на гуми и приложение за разпознаване на активности тя показва, че решението е данните да определят очакванията, човешкото представяне да служи като базово ниво, а продуктите да се проектират така, че неизбежните грешки на модела да не съсипват потребителското изживяване.
Основни изводи
Научете се да идентифицирате и разпознавате основните предизвикателства при изграждането на ML софтуер в сравнение с традиционния софтуер.
Научете как да се справяте с несигурността при изграждането на ML софтуер, особено как да управлявате очакванията и да поставяте реалистични цели за проекта.
Открийте какви подходи могат да следват големите компании за управление на ML проекти, от консултиране до прототипиране и внедряване на реални решения.
Научете основните разлики между проектирането на ML продукт и на традиционен софтуерен продукт и разберете въздействието върху потребителското изживяване.
Запознайте се с въпросите за защитата на данните и пристрастията на моделите, които трябва да се обсъждат задълбочено и да се вземат предвид при изграждането на ML софтуер.
От изрични инструкции към научено поведение
Castro започва с контраст, познат на всеки, който е пускал традиционно приложение. Когато дизайнер предаде на разработчиците wireframe, описващ какво трябва да прави даден бутон, стъпките са лесни за разбиране и планиране. При AI продукт като самоуправляващ се автомобил всички знаят какво трябва да прави крайният резултат, но предвиждането на стъпките дотам е много по-трудно.
Тя обяснява разликата чрез идеята за софтуер 1.0 и софтуер 2.0. В софтуер 1.0 разработчиците дават на компютъра изрични инструкции. В софтуер 2.0 data scientists вместо това предоставят голям брой примери и оставят модела да се учи, подобно на дете, което се научава да различава куче от котка, като види много от двете. Последствието, казва тя, е фундаментално: „Така че докато в софтуер 1.0 поведението на продукта е детерминистично, тук то е вероятностно, защото модел е този, който отговаря или извежда нещо.“ (3:28)
Защо ML жизненият цикъл постоянно се връща назад
Добре организираният цикъл на традиционния софтуер, отбелязва Castro, обикновено протича гладко, когато изискванията и дизайнът са направени добре. Цикълът на машинното обучение е различен: бизнес разбиране, разбиране на данните, подготовка на данните, моделиране и внедряване, с чести връщания към предишни стъпки.
В Continental тя вижда много различни отправни точки дори в рамките на една компания. Някои екипи нямат нито данни, нито ясна цел, а само желание да създадат нещо интелигентно. Други имат данни, но им липсват знания, или имат и данни, и ясна цел, но не и ноу-хау. Всеки етап може да донесе свои пречки: може първо да се наложи събиране на данни, лошото качество на данните може да изисква проект по data engineering преди каквато и да е data science работа, а внедряванията в реално време могат да добавят изисквания за скорост, така че ефективността да е важна наред с точността. Резултатите също варират, от мобилни приложения и табла до обикновен endpoint за прогнози.
Пул от експерти по данни, а не просто екип за доставка
За да се справи с това разнообразие, Castro описва как екипът ѝ се позиционира в компанията: „Виждаме себе си като пул от експерти по данни, които искат да помогнат на компанията да развива data science, да подобри грамотността за данните и да подкрепя всеки екип, който иска да разработва решения, базирани на AI.“ (7:08)
На практика това означава поетапно ангажиране. Екипът може да действа като консултант, докато друг екип притежава проекта, след това да изследва данните, за да провери потенциала, когато има ясен бизнес проблем. Ако AI покаже стойност, преминават към прототип или MVP, евентуално чрез Scrum, а ако бизнесът иска да инвестира допълнително, изграждат цялостен продукт и поемат отговорност за пускането му в продукция.
Казусът с инспекцията на гуми: данните определят очакванията
Ядрото на лекцията е реален проект: автоматизирана система за инспекция на изображения на гуми. Екипът заявител вече разполагал с етикетирани изображения, дефинирана цел (класифициране на всяко изображение като изправно или повредено) и ясна метрика: намаляване на процента фалшиво положителни резултати от традиционните им методи.
Екипът на Castro започнал с визуализиране на данните. Някои типове дефекти били често срещани, а други изобщо не били представени. Това откритие се превърнало в инструмент за управление на заинтересованите страни: не може да се очаква модел да открива дефекти, които никога не е виждал, точно както дете не може да разпознае животно, което никога не му е било показвано. Същото важало и за артикулите гуми, липсващи в данните. Нивата на сериозност предложили начин широкият и сложен проблем да се раздели на по-малки, например като първо се фокусират върху най-честото ниво на сериозност или върху най-рядкото, но най-критично.
Човешките етикети дали още един лост. Екипът установил, че двама човешки анотатори не са съгласни при много сходни изображения, което задава естествен таван за представянето на модела. „В обобщение бих казала, че е много важно да се потопим дълбоко в разбирането на данните и да покажем кое е възможно и кое не според данните, с които разполагаме.“ (13:40)
Проектиране на приложения, които прощават грешките на модела
Castro завършва с пример за дизайн: приложение, което разпознава скоковете на потребителя във видео. Ако моделът отбележи фалшив скок в режим на стрийминг на живо и веднага изреже видеото, потребителят остава объркан. „И този вид грешки на модела не са обратими. Така че това е, бих казала, опасна грешка.“ (15:26)
Дизайнът с последваща обработка променя изживяването. Потребителят записва цялото видео, след това приложението предлага разпознатите скокове и иска потвърждение, а потребителят може да отхвърли грешен. Тази обратна връзка по-късно може да подобри модела. Нейният принцип е да се планира за реалния сценарий и грешките да са прозрачни: „Например по този начин мисля, че можете да опитате да проектирате приложението така, че въздействието на грешките, те все още са там, грешките, но да нямат такова въздействие върху потребителското изживяване.“ (16:40)
В кратък отговор на въпрос от публиката тя добавя, че подобни проекти обикновено изискват хиляди примери, като около 1000 е добър ориентир за бинарен проблем, а за проблеми с много класове са нужни повече.
Гледайте лекцията
Traditional Software vs Machine Learning Software, Filipa Castro, около 20 минути: https://www.womentech.net/video/traditional-software-vs-machine-learning-software-filipa-castro
За лектора
Filipa Castro е Data Scientist в Continental в Порто, Португалия, и работи като data scientist от началото на кариерата си, като започва с автономни решения за подводна среда, преди да премине в автомобилната индустрия. Тя е също част от ръководния екип на Data Science for Social Good Portugal (DSSG PT).
Въпроси, на които отговаря лекцията
Защо софтуерът с машинно обучение се планира по-трудно от традиционния софтуер?
Как един екип може да постави реалистични очаквания за ML модел?
Как трябва да се проектира приложение, когато моделът му понякога ще греши?
Как корпоративен екип по data science работи с бизнес звената по AI проекти?
Колко данни са необходими на модел за разпознаване на изображения или активности?
Изготвено с AI от транскрипта на лекцията. Предстои редакторски преглед.