Latest / Agentic Conversations (formally mlops.community) / Detecting Harmful Content at Scale // Matar Haller // #246
Transcript
- 0:00My name is Mattar Haller Matara is with guitar.
- 0:02I'm the VP DNA I here at active Fence and although I don't I
- 0:07have three kids, I don't drink caffeine.
- 0:08I drink decaf black tea with milk.
- 0:13What is up MLA's community? You are back for another podcast
- 0:16with your host AKA me Dimitrios. I'm gonna be real with you
- 0:22before you go any further. If you are one of those people
- 0:24that does not like hearing about the dark shit in the world, do
- 0:27not listen to this episode. If you get triggered easily, we
- 0:30go into some depths and the Thrones of the Internet, that
- 0:38horribleness out there and how AI plays its part in helping to
- 0:44make sure that there is not as much horribleness on the
- 0:48Internet. But our walked us through these
- 0:51very high stakes AI use cases on keeping hate speech and all
- 0:56kinds of nasty stuff off the Internet and how her company,
- 1:02Active Fence is playing its part.
- 1:05I'm going to leave it at that. I'll let you decide if you want
- 1:08to go forward or not. Let's get into it.
- 1:12If you enjoy this episode, you know what to do.
- 1:15Share it with a friend who has the ability to listen to this
- 1:21type of stuff or give us some feedback.
- 1:25Spotify's got a cool thing where you can give us a few stars.
- 1:29We'd love that. Alright, let's get into it.
- 1:39I'm going to start it with this. We met because you were
- 1:43presenting at the Tectonically conference, the virtual
- 1:45conference, and there was a tonne of amazing talks.
- 1:49But by far the one talk that stood out to me just because of
- 1:53the novelty and the good that you are doing was your talk.
- 1:58And so I want to explain, I thought, well, first I have to
- 2:03have you on here and I want to explain a bit of what I remember
- 2:06of that talk. And then you can maybe fill in
- 2:07the blanks of what it is that you're doing.
- 2:10And so you are using AI to make sure to, I think it's you, you
- 2:17called it AI safety tech. And so you are making sure that
- 2:22when there is hate speech, when there is stuff that we just
- 2:25don't want online, you can detect that and make sure that
- 2:31it is cleaned up. So that's like first part.
- 2:36Can we start there? I know I just gave a
- 2:38gigantically broad overview of it, but now I'll let you fill in
- 2:41the details. So I don't know what talk you're
- 2:42talking about. My talk was about dinosaurs.
- 2:44You're like. I was way off.
- 2:47Wait a minute. So yeah, that's right.
- 2:51So my talk was about using AI for trust and safety and how an
- 2:59active fence we are an AI trust and safety company and what that
- 3:05means and how it's done and why it's a super hard problem, but
- 3:10one that is also incredibly impactful and touches us, all of
- 3:15us every day. I think one thing that you did
- 3:19go into pretty in detail in that talk, and we'll leave the link
- 3:23to that talk in the description for anybody that just wants to
- 3:26go directly to that before they come and listen to this.
- 3:29But you mentioned why it is so hard.
- 3:33And you kind of went over all these different use cases on
- 3:36whoa, wouldn't you think that this should be OK or not OK?
- 3:41And there's a lot of ethics involved.
- 3:43There's a lot of times where I was saying to myself, like,
- 3:46yeah, I think that's OK. And then it's like, ohh, you do,
- 3:50well, maybe you want to think twice about that And so.
- 3:55Yeah, it's so first of all, I think it's like, besides the
- 3:58fact that it's hard, it's also really, really important, right?
- 4:01So like, who cares? Like, why even trust in safety?
- 4:04Why is this even an issue? And I think trust and safety
- 4:08isn't a new concept, right? Like, if you think about what
- 4:12happens online, so online harm can lead to offline harm, right?
- 4:15I think like for me, the most like visceral and jarring
- 4:20example of that was what happened to January 6th with
- 4:23like all of this, like, you know, this misinformation we
- 4:26were tracking prior to elections and that and that we were
- 4:29notifying platforms about to take down and what that led to
- 4:32with the capital rights and so forth.
- 4:34So there's many, many examples that we think about where online
- 4:37online harm can sort of leak offline.
- 4:39And so much of our lives are online.
- 4:41And also, I mean, as a mom, it's something that I like care about
- 4:45deeply. I told my daughter like she's
- 4:48she's 9 and all she's asking about all the times the cell
- 4:50phone and I'm like, maybe when you're 35.
- 4:54But at the end of the day, like the this is something that's
- 4:57like it touches all of us, right?
- 4:58Whether it's comments on, on posts or chats or videos that we
- 5:04see or images that we share. It's like our lives are online.
- 5:08And although trust and safety isn't new, it's now, I think
- 5:11after sort of these sort of big events that we've seen, like I
- 5:14said, January 6th and also some really well known trusted safety
- 5:18fiascos that we, that if you think back, they'll, they'll,
- 5:22they'll come to mind. It's now it's finally something
- 5:24like really, really being discussed, right?
- 5:26Like we'll see in the media and even like regulators and
- 5:28legislation and the Digital Safety Act and, and even users
- 5:33now care about this, right? It used to be that like, it
- 5:35wasn't even something that us as users would think about when we
- 5:39went online for a platform. But now like we're exposed in a
- 5:43lot of ways to a lot more hate speech or a lot more bullying
- 5:47or, you know, just really vile content.
- 5:50And it could be just because oftentimes content moderation
- 5:53just isn't good enough and also because it's an extremely,
- 5:57extremely adversarial space. And so we can talk about why
- 6:02it's important to companies and to users, You know, it gives a
- 6:06competitive advantage. You don't you don't want to be
- 6:08exposed to that. But like you said, it's also
- 6:12really, really hard. It's, well, can you break down a
- 6:16few of the use cases because I know we're, we're talking a
- 6:18little bit high level, but exactly what is it that some of
- 6:22the things that you're doing so we can get a better sense of why
- 6:27this can be so hard? Yeah.
- 6:29So actions, we are in the content moderation space.
- 6:33We don't do the moderation right.
- 6:35We we flag it for the platforms. We give every item we have an
- 6:38API, customers can platforms can send their content to us and
- 6:43then it gets a probability of risk.
- 6:44And what do we mean when we say content?
- 6:46This content can be audio, video, images, text.
- 6:51The text can be comments, they can be chats, they can be
- 6:53usernames, they can be descriptions, they can be
- 6:55titles. It can be podcasts.
- 6:57It can be short. The space of online stuff is
- 7:00huge. And we deal with all of that.
- 7:02And not only do we deal with that, but also the text can be
- 7:05in many, many different languages.
- 7:07And there's many, many, many different cultural contexts,
- 7:10right? Calling someone a dog in one
- 7:13language versus another language has very, very different things.
- 7:17And if we're gonna, if we're gonna be trying to keep users
- 7:20safe, we need to be aware of that and how slang changes and
- 7:23so forth. So it's difficult because it's
- 7:27a, it requires sort of subject matter expertise, right?
- 7:30You need to know the language, you know, the slang, you need to
- 7:33know in images, you need to know, is this logo of a hate
- 7:36speech group? Is this logo benign?
- 7:39Is this just like, you know, it needs it's, you know, it's
- 7:43constantly changing. So unfortunately there's new
- 7:47child abuse content every day. There's new hate speech groups
- 7:49every day. And, and also the bad actors,
- 7:53like they're, they're not stupid, right?
- 7:55They're bad, but they're not. And so they're trying to evade
- 7:57detection. And so they'll use phrases,
- 8:00they'll use lead speech, they'll try to obscure stuff.
- 8:05So that's, I mean, it's a very outfit.
- 8:08I brought it down a bit from the high level.
- 8:09It's like very concrete in terms of like the media types and the
- 8:12challenges. Yeah, exactly.
- 8:14And so you're getting all kinds of input data that is basically
- 8:21coming through the API and you're saying, yes, this looks
- 8:25good. Or ooh, maybe like, do you give
- 8:28a scale of how potentially harmful this could be and then
- 8:32you send it back to the people that sent it to you?
- 8:35Yeah. So what we have is basically we
- 8:37have something that we call a policy management.
- 8:40And so it's sort of this UI where clients can come in and
- 8:42they could basically decide what for them is a violation of
- 8:47policy. So when a child plot and the
- 8:49platform for children, I don't want any nudity, I don't want
- 8:52any swearing, I don't want any bullying.
- 8:55And so I can go in here, I could say, OK, here's a model for
- 8:57bullying, here's a model for swearing, here's a model for
- 9:00nudity. This is what my policy violation
- 9:01looks like. And then I send in my content
- 9:03very API. And then we basically fan it
- 9:05out. We have our models that run and
- 9:08then we can provide a risk score.
- 9:09Like what is the probability that this item is risky?
- 9:13It's not severity, it's probability of risk.
- 9:15And then basically clients can come in and they have a UI and
- 9:19they have moderators and they can say, ohh, like I any item
- 9:22that's like, you know, more than 80% probability of risk, I want
- 9:25to automatically remove it. So they have these codeless
- 9:27workflows. They can just set it U any item
- 9:29that's like less than 50, I don't even want to look at it.
- 9:31And then there's this sort of sliver of window where I say,
- 9:33OK, these are things that require an expert to look at.
- 9:37And the idea, the idea being is that we care about not only the
- 9:41users well-being, but also the moderators well-being, right?
- 9:44And we don't want to expose them unnecessarily to harms, right?
- 9:49So we can catch the things that are highly probable being risky
- 9:52and just remove them. Then we've spared them from
- 9:55like, this gory, awful stuff. Yeah, that's, I actually heard
- 10:00about that back in the day on how people that were doing
- 10:03content moderation for Facebook. It was like menial things 80 or
- 10:0890% of the time and then they would be clicking through and
- 10:12like whatever, boring, boring, boring, and then bam, just
- 10:16getting something that would rock your socks off and give you
- 10:20nightmares for the next two weeks.
- 10:22And so it feels like if you can remove that completely, that's
- 10:26very valuable. And now going back to the idea
- 10:30of the models that you have, you're allowing someone to
- 10:35choose which models. And I'm assuming when we say
- 10:38models here, it's like policy models or is it machine learning
- 10:41models or AI models there? A little bit of all of the
- 10:46above. It depends on these cases,
- 10:49right? So our system needs to be able
- 10:51to handle thousands of requests per second at very, very low
- 10:55latency. If you think about it, things
- 10:58are coming online all the time. The only way to deal with this
- 11:02massive amount of content at scale is with models that are
- 11:06able to do the work faster and more efficient and with less
- 11:09like mental harm than humans. And so we do what we have to
- 11:15transform our models. We have ensemble models, we have
- 11:20every everything under the sun we use where our big focus is on
- 11:26ensuring that it's also very cost effective and very
- 11:28accurate. And as much as we can, we want
- 11:31to like win on both. And usually we do OK.
- 11:35So the idea is, is fascinating to me when it comes to all the
- 11:40different models that you're using, making sure that they are
- 11:43fast and they're accurate. Because usually, especially
- 11:45these days with Transformers, it's like you kind of sacrifice
- 11:48one for the other, right? You've sacrificed speed at the
- 11:52maybe it's not the most accurate, or you want accurate
- 11:55and it's not super fast. How do you think about that
- 11:59tradeoff? We don't always use like, you
- 12:02know, the most accurate model that's like the slowest and
- 12:05heaviest, but sometimes that's what's necessary and we need, we
- 12:10also try to sort of enable our customers to be part of that
- 12:14conversation. Like what's more important to
- 12:16you, right? So for example, in for some use
- 12:18cases, keywords are fine, like they're totally good.
- 12:23And we have a keyword matching tool that's completely
- 12:26self-service. You can like put in the keywords
- 12:28that you want, put in the even the emojis that you want,
- 12:30because in a lot of cases, like for example, in drug trafficking
- 12:34and emojis are super important in child pornography also emojis
- 12:40are very, very important. If you think about it, this is
- 12:41like a very evasive field, right?
- 12:43And so we have a tool that basically enables clients and
- 12:47also our subject matter experts to sort of put in the emojis or
- 12:51the keywords or whatever in the languages that are, that are
- 12:53relevant and then run, run with that.
- 12:56And so, and that's super fast, super cheap, super effective.
- 13:00We can do different workflows. And so we could do something
- 13:03like, you know, if this triggered this, then let's run
- 13:07that and let's see what, you know, something heavier picks it
- 13:10up. So we have different ways of,
- 13:12of, of handling that. But at the end of the day, also
- 13:15for some models, like a video model, then there needs to also
- 13:19be an expectation of like this isn't going to be instantaneous,
- 13:21right? Or an image model that's taking
- 13:23an image apart and breaking it up into components and looking
- 13:26for, for logos and known bad actors and victims and all these
- 13:30things. It's, you know, let's set an
- 13:32expectation of how long something that can reasonably
- 13:34take and at what price. One thing that I do remember
- 13:38from your talk was how hard the cultural references are.
- 13:43And so how are you making sure not only from like the subject
- 13:48experts? So I guess you have to have
- 13:49somebody that understands the cultural references and can then
- 13:54translate that into the models. How does that happen?
- 13:58Yes, so attack defence, we have, we're very, very fortunate to
- 14:02have a very large team of experts of subject matter
- 14:08experts, of intelligence analysts.
- 14:09And they're experts in child safety, in hate speech, in, you
- 14:13know, they know about like a vegan neo-Nazi group in
- 14:16Argentina. Like they're like, they know all
- 14:19these sort of like edge cases. They know the newest groups, the
- 14:21news. And we work really closely with
- 14:23them. And so when we're developing a
- 14:25new model, the first thing that we have to do is we have to say,
- 14:27OK, what is the policy, right? What is in and what is out?
- 14:31Because until, if you don't have a very, very clear policy, then
- 14:34that's going to influence everything downstream, that's
- 14:36going to influence your data labelling, it's going to
- 14:38influence your valuation and it's going to influence you when
- 14:41you reach production. And so we work very, very
- 14:43closely with the policy manager manager and also with these
- 14:47experts to define what's in and what's out.
- 14:50And then, you know, we go out, we, we have the data OPS
- 14:53operation here that can collect the data, whether it's from like
- 14:57real traffic or from forums or even generate the data, right.
- 15:02So we can in some cases just. Going to ask.
- 15:04Yes. So when so one thing that we do
- 15:09is we, we generate data either manually or with the help of an
- 15:15LLM friend. And the reason that we do that
- 15:20is to combat bias exactly from the things that you're talking
- 15:23about. And but in order to identify
- 15:26that we even have bias, it's not enough to sort of just look at
- 15:30precision recall just now. We had a model that we were
- 15:32working on. I think it was sex solicitation,
- 15:37but it might have been something else.
- 15:38I can't remember where we looked.
- 15:42And we're like great precision recall, amazing.
- 15:45And then we ran our functional test.
- 15:47And functional tests is something that I highly, highly
- 15:51recommend for anyone that's building a model.
- 15:54And what are these? What are functional so?
- 15:57A functional test. What this does is it basically
- 16:00enables targeted identification of model weak spots.
- 16:04What that means is that you basically take subsets of your
- 16:08policy, or subsets of your target definition if you will,
- 16:11and you write tests specifically for those things.
- 16:16So for example, for hate speech, um, you can have reclaimed
- 16:22slurs, you can have hate speech expressed using a slur, right?
- 16:25These are sort of two sides of a coin.
- 16:28And you want to have a test that basically ensures that it's, you
- 16:31know, if I say I'm proud to be a member or I'm the freshest in
- 16:38town, these should always be negative, right?
- 16:41This is like a set of, you know, a bunch of examples of reclaimed
- 16:45slurs that I need to make sure that my model doesn't mess it
- 16:48up, right? Because I, that's like one
- 16:51subset of my target definition. If I say you are just umm, to me
- 16:55or I hate or dirty, right? These are slurs.
- 16:59And I'm going to have a bunch of those examples.
- 17:01And I want to make sure that my model is consistently performing
- 17:04and flagging those as negative. And I have a huge Bank of
- 17:08functional tests. And then, you know, precision
- 17:10recall is important, but I want to look at how I perform on
- 17:13these because then I can say, oh, great, my model is amazing,
- 17:15except I'm always, I'm always failing, for example, and
- 17:18harassment, bullying, they're always failing on like wishing
- 17:20someone cancer, like we just couldn't get that.
- 17:24And you need to catch that, right?
- 17:25And so sorry. My, my threshold for like things
- 17:29that like make me uncomfortable is like not normal after working
- 17:32here. So like go, sorry.
- 17:34Really fine. It's just I was just thinking
- 17:36like, I would never want to get into an argument with you
- 17:39because you probably have the best disses in the world.
- 17:43You've seen all of the worst kind of did.
- 17:47I come work here because of that or did I?
- 17:51Ohh, I didn't think about that part.
- 17:52Yeah, so sorry. I I digress.
- 17:55Where were you that wasn't? Saying so, so those are the
- 17:57functional tests, right? And so, and so then what?
- 18:00So, and also with this helps you is like looking at over time,
- 18:04right? So like you have a new model or
- 18:06we're in an adversarial space, the world changes and suddenly
- 18:08we're like falling apart on a specific type of functionality.
- 18:13And then what we can do is, OK, so we've, we've discovered, you
- 18:16know, a functionality that we're bad at.
- 18:18So what do we do? So we can go out if we're like
- 18:21bad on many functionalities and we can just go out and get more
- 18:24data, fine. But if it's a specific
- 18:26functionality, then we can generate more data to address
- 18:29that particular bias that we have, right?
- 18:32And so and that can be done manually or like I said with
- 18:36with like Gen AI techniques. So, so many questions from this
- 18:41and I love what you're doing and how much depth you're going into
- 18:45your LM friend. It's not your run-of-the-mill
- 18:48Luma 3I imagine because those have been handicapped, they're
- 18:52not going to spit out all kinds of generated data that is going
- 18:55to help you in your use case, I would imagine.
- 18:57Or or are you creating your own model?
- 19:00That is highly toxic we could say.
- 19:04So, so, so two things. One is a lot of times it's
- 19:08really, really helpful to use the LM actually to generate the
- 19:12benign side of things, right? So a lot of times bias is
- 19:16actually like, if your negative examples are all like slurs
- 19:19about a particular ethnicity, then you want to add data that's
- 19:25like shows that ethnicity in a positive light.
- 19:28And so that is easy to do with any element.
- 19:30Like give me some examples of, you know, of texts about
- 19:34whatever, about, you know, some religion or whatever, and it'll
- 19:37just give you and, and those, those are good and, and those
- 19:40are reasonable. And I'll say that one advantage
- 19:44of having subject matter experts working with us and having teams
- 19:49that part of what we do is we do red teaming for big foundational
- 19:55models is that we also know how to cause even the best of models
- 19:59to behave breakdown. Nice.
- 20:03Yeah, very cool. That's always fun trying to
- 20:05trick them, and getting to do that as a job I find very
- 20:09interesting. Yeah, the other piece.
- 20:12That I wanted to go down is OK. So you've got all of this data
- 20:17or you've created this model. I can see various scenarios on
- 20:24how this can become not that useful very quickly.
- 20:29Whether it is new terms that are coming into vogue, we could say,
- 20:34or you have a lot of data that was generated or the model was
- 20:39created and it's almost like this snapshot in time for up
- 20:43until a certain date and then it has the cutoff.
- 20:45So the new terms come in and then you can't use it and so you
- 20:50have blind spots there. Are you continuously retraining
- 20:53to make sure that OK? And how does that process look?
- 20:58So one thing that we do is first of all, like before we deploy to
- 21:01production, I think we do a lot of back testing.
- 21:02We look at it on, you know, you know, productivity that we had
- 21:06and we do. And we sort of look at the even
- 21:08even on unlabeled data, we'll look at distribution of scores,
- 21:11right? You want to see and you want to
- 21:12look at things. If you have things that are
- 21:14labelled, then we look at things that flipped, right?
- 21:16And then we say, OK, does it make sensitive flipped?
- 21:18Are we better and with our flip or worse with our flip?
- 21:21And then also just look at for on unlabeled data, like what's
- 21:24my distribution, right? If I have a new model, we're now
- 21:26things are like much, much, much more positive.
- 21:28Unlikely, right? We're much, much, much more
- 21:30negative, also unlikely. So that's like before we even
- 21:32head out into the world. But obviously your model hits
- 21:36production and sometimes you fall apart right away and
- 21:40sometimes you fall apart later. But at the end of the day, like
- 21:42you're not the world is tough and are not forever.
- 21:45And So what we do is we actually have an auditing process.
- 21:49And so we have trained analysts that will sort of do audits of
- 21:54our models in production based on real production data.
- 21:58And also some clients also share with us, you know, enable us to
- 22:02to sort of see their their moderator decisions.
- 22:04And so we have like real labels from how our model is
- 22:08performing. And then we have sort of our
- 22:09policy managers and analysts look and say, you know what,
- 22:11there's a trend I'm seeing here now, like somehow you're always
- 22:15missing that when they're talking about like food, it's
- 22:19actually not hate speech. And this actually happened to
- 22:22us. Like we had a food delivery
- 22:24company and we had a hate speech model because they didn't want
- 22:26people. It was like a chat or review
- 22:28system or whatever on their, on their website and our model went
- 22:33to production and suddenly we were flagging like, I hate
- 22:36Indian food or like Chinese suck or all these things.
- 22:38It's like people are talking about food, like they're not
- 22:40talking about about the people. And then so these sort and then
- 22:45and then we're like, OK, now we need to go into like a targeted
- 22:48like model improvement session, retraining and so forth.
- 22:51And then and then bring it out and we this constant.
- 22:55So we're sort of at the same time that we're developing new
- 22:57models and sort of coming up with new sort of policy areas
- 23:01cover. We're also like retraining our
- 23:04models and ensuring that we're U to date based on sort of looking
- 23:07at how the model is actually performing in the real world.
- 23:10And again, we'll also look at the distribution of scores in
- 23:12the real world, right? We don't need labels to be like,
- 23:14hmm, there's drift here, like something is going on, Yeah.
- 23:18And so so basically it's me choosing as a customer when I'm
- 23:23hitting your API. How many different models and
- 23:28protocols I want to be looking at my data from?
- 23:33And so for each one of these, I'm assuming that it's not just
- 23:37like one model each. Maybe you have an ensemble of
- 23:39models for certain types of use cases.
- 23:43Yeah. Can you break that down?
- 23:44Absolutely. So one example is like I was
- 23:47saying for hate speech or for terror, terror, terror, these
- 23:52examples. So we know how to look for
- 23:54specific components of like different objects or different
- 23:58markers within the image. And then basically those go into
- 24:02a train ensemble model that's able to give what is the
- 24:03probability. So for example, we have logos so
- 24:06you know, ISIS and, and, and so on his bad ends.
- 24:09So and you know, otherwise we have faces there, so known bad
- 24:14actors. And this, you know, this is
- 24:16relevant not only for for terror, like did you know that
- 24:20there's also logos for child pornography studios?
- 24:23Like that's those are other logos that we can look for.
- 24:25And so in many different situations, we basically can
- 24:31break apart the image, look for known victims, look for nudity,
- 24:34look for, you know, things that are indicative of child
- 24:38pornography, hate speech, terror and so forth.
- 24:41So the the experts here are involved in the curation of
- 24:48data, making sure that you have robust data when you're training
- 24:52these models. But then there are also getting
- 24:54involved in that like 50 to 70% that gets flagged as a maybe or
- 24:59is that just getting thrown back to the your clients as like you
- 25:04might want to check this out we do content.
- 25:05Moderation in terms of like showing what like what is the
- 25:09probability of risk, but we don't have moderators, right?
- 25:13That's that's the client. But what we do is we do internal
- 25:16audits for ourselves to ensure that our model are still
- 25:19performing like how how they should be.
- 25:23So that like 50 to 70% that that's not that's out of my
- 25:28game, right? That's like goes to the client.
- 25:29They can do what they want. I can recommend to them, right?
- 25:31Like I can recommend, I can say, look, there's a 90% probability
- 25:35that this child pornography. But if they don't, if they look
- 25:37at it and they say not by me or they don't want to that that's
- 25:40them. But I do have on my end, I'm
- 25:43going to be auditing that and and using it to improve my
- 25:46abilities to detect. I was going to say, I was going
- 25:48to sort of say that like all this we're talking about just
- 25:50like regular content that we see online or whatever.
- 25:53But right now with Jenna, I like the the space has changed,
- 25:57right? And so if it used to be that
- 26:00like making high quality bad content or like malicious
- 26:06content, you could do it at a low scale to make it high
- 26:09quality, or you could do it at a very high scale and make it
- 26:12really low quality. Like now you can do really,
- 26:17really high scale and really high quality malicious content,
- 26:21which just means that the need for AI is that much stronger
- 26:25because the only way to do it at scale is with AI.
- 26:28And The thing is, is that for us, like, like, just like we've
- 26:33been the experts and we've built a lot of expertise in pundit
- 26:37moderation like we can now we're sort of transferring that to AI
- 26:40safety. And how much of this also is
- 26:43just trying to detect if it is a I generated or do you not care
- 26:49about that at all O? That's for our space.
- 26:52That's less of an issue, right? Because child pornography is
- 26:56bad. Whether it's real or Jenny, I
- 26:59like, I don't want that on my platform.
- 27:01I don't want to be exposed to that.
- 27:02Same thing with terror. Same thing with, you know,
- 27:04misinformation. Same thing with hate speech.
- 27:05It doesn't matter. It's bad and so that means that
- 27:09at the end of the day, like regular UGC, like user generated
- 27:12content and AI generated content are pretty similar in a lot of
- 27:15in the space that we're at, which means that we can leverage
- 27:18our experience and be the experts here as well.
- 27:22Basically taking everything that we know from the trust and
- 27:24safety space and just transfer learning it.
- 27:29And so for both of them, you need the sort of like multilayer
- 27:32detection and you want to mitigate in different places in
- 27:34in the life cycle. And and so there's also accept
- 27:40that there's sort of A twist here, I guess where with AI
- 27:45generated content we can enter sort of the the chain, the food
- 27:50chain earlier on. How's.
- 27:52That so. If for user generated content,
- 27:57we can catch it on the platform side, right?
- 27:59Like once it's come to the social media platform or the
- 28:02gaming platform or the dating platform, that's where we're at
- 28:05and we can help them find it. But with with sort of with, with
- 28:10AI generated content, we can actually be at the source right
- 28:14where the where these Jenna models are being trained.
- 28:18And actually we have partnerships with Cohere and
- 28:21with NVIDIA specifically for that to sort of help improve the
- 28:27models and red team and so forth.
- 28:28And already at the source. It's not it's obviously not
- 28:32enough because besides the big foundational models, there's
- 28:35also open source models and even our nation models can, you know,
- 28:39make mistakes and so forth. And so we need to be at both
- 28:42places. But we're moving U sort of in
- 28:45the food chain with with Gen AI, with NVIDIA actually, what we
- 28:51don't know if you've heard of guardrails.
- 28:53Yeah, yeah, yeah. Nemo.
- 28:55Yep. Nemo guardrails.
- 28:56Yeah. Nice.
- 28:57So you can actually through any more guardrails, you can hook up
- 29:00to our API with an API key and have our model sort of on your
- 29:07prompts and on your outputs to ensure that they're safe.
- 29:10Ohh, that's cool. So then it's like that added
- 29:15confidence that you're going to not be having anything that you
- 29:20don't want coming through. You know.
- 29:24One thing that I was thinking about on this was like, are you
- 29:28just using Cohere models off the shelf or is everything that
- 29:32you're doing super fine-tuned for these different use cases,
- 29:36so? Cohere is actually we're not
- 29:40there are there are client of ours.
- 29:42So we're helping them make their models safer.
- 29:45So, and a lot of the things that we learn with our work with them
- 29:49are useful for us to understand sort of how to, you know, how to
- 29:53make safer, safer models. And so that's, that's like a
- 29:59different kind of partnership with NVIDIA.
- 30:02They're using our our models. Our predictive models are in
- 30:06order to provide risk scores on input and outputs and Nemo
- 30:08guardrails and and then in house, we use a wide range of of
- 30:14solutions of general solutions if we need to generate data and
- 30:18so. The the solutions are on like,
- 30:22or let me take a step back. It's like one part of the
- 30:26pipeline is generating the data and then another part is having
- 30:30that machine learning or AI model or a lot of them.
- 30:34You maybe have the computer vision model that will give you
- 30:37the text that's in the meme that is potentially harmful.
- 30:40And you've also got the model that's going to tell you if that
- 30:45text is good or bad and give it that score.
- 30:47And you've probably got a few other models in there.
- 30:50None of these are like you being able to send a send any of that
- 30:57information to like an off the shelf model, I would imagine
- 31:00because it has to be very, very specific to each one of these
- 31:04use cases and like built from the ground up.
- 31:07If I'm understanding it correctly, yes.
- 31:10Correct yes, that is exactly right.
- 31:13You oftentimes you'll see like open source models for like
- 31:18finding hate speech or finding this or whatever and what we
- 31:21found is they can't they can't work at scale right They're
- 31:24going to fall apart at the skills that we're running out.
- 31:26There's no way they are inconsistent.
- 31:29If we'd like to take it back, revise that policies important.
- 31:31They're inconsistent in their policy.
- 31:33They don't get the nuances right.
- 31:34Like if we look at all of our functionalities, they fall apart
- 31:38where we take the integrity of our data and then negative or
- 31:42labels and then, and then you know, as a like a, as the
- 31:46integrity of our models, like extremely, extremely seriously.
- 31:49These are important decisions. These are important things that
- 31:51you know, that we're that we're doing.
- 31:53And so the quality, the data quality and then the model
- 31:57quality and the performance at scale and production is saying
- 32:01that we take very seriously. And for the performance side, I
- 32:07often wonder about this, like if you're using transformer models
- 32:11or looms, how are you making sure that there's not
- 32:15hallucinations happening? And because it seems like you
- 32:19have to be very confident of the accuracy and sometimes with
- 32:25transformer models, they can just say whatever they want,
- 32:28especially if they don't know or they've never seen this
- 32:31particular type of hate speech. So is there is that where you're
- 32:37talking about like you're constantly monitoring for the
- 32:40drift to make sure that whatever you've labelled, you're double
- 32:45checking and seeing if it is true.
- 32:48If it's not, how does that breakdown?
- 32:51Yes. So, um, so with any model, we
- 32:55want to look at the functionalities.
- 32:56And so like if there's a new type of hate speech that we
- 32:59didn't know before, then the policy manager, you know, we'll,
- 33:01we'll say, hey, there's this new functionality that we have to
- 33:04make sure that we cover and we can catch it proactively.
- 33:06If we don't catch it practically because something there's like a
- 33:08new slang term or a new, you know, a new style or everything
- 33:14is the same in the hate speech, But the data is a type of data
- 33:16that we've never seen before, right?
- 33:17Like food reviews or book reviews or whatever.
- 33:20And for whatever reason, we didn't test on that data and
- 33:22suddenly we fall apart. And so that's why we're
- 33:25constantly auditing and, and like looking at improving and
- 33:28we're retraining a lot to ensure that we're sort of non drifting
- 33:33and that, you know, our performance stays stays high in
- 33:36terms of LM's. We're not using currently LM for
- 33:40inference because at the scale and at the cost that we need to
- 33:44perform at, it just doesn't make sense.
- 33:46We need to make sure that our clients and us, we all lose an
- 33:50arm and a leg in terms of like being able to predict and to
- 33:53give value at such a high scale. And so we use LMS intensively
- 34:02beforehand, but at prediction time we need much more robust
- 34:05solutions. Yeah, that makes sense.
- 34:07And it's totally like it's what you would expect almost, right?
- 34:14You don't mean because the LM's are a much slower and be a
- 34:20little bit less trustworthy on the output, They can hallucinate
- 34:24or do whatever. I would hope that either you
- 34:28knew some kind of trick and you had some special magic pill or
- 34:33silver, silver bullet or you're doing that, which totally makes
- 34:38sense. Now the auditing process for me
- 34:41feels like something that is very rigorous.
- 34:44Can you go into that a little bit more?
- 34:46And what the whole audit looks like and how then you make sure
- 34:53to like continuously stay at a very high accuracy.
- 34:57Yeah. So in addition, so even before
- 35:00the auditing, that in addition to the functional test they
- 35:02talked about, which I think are like really, really critical, we
- 35:05also do other types of tests. So we have a go, no go test,
- 35:10which basically what we say is this is like a set of data that
- 35:13we can't afford to mess up on, right?
- 35:15Like these terms are always positive and these terms are
- 35:20always negative. And if we fail on them, then
- 35:23that's a no go for the model, right?
- 35:25This is like a data set that basically is like go, no go.
- 35:27Can this model go to production based on these?
- 35:29Because I can never say have like hello world or I love you
- 35:34be hate speech like that won't work or high, right?
- 35:36There's things that are, and so there's that, Um, and we also
- 35:41have a false positive rate test. So what we do is we'll take our
- 35:44model and we'll run it on data that is supposed to be
- 35:47completely benign and also on data that's like borderline.
- 35:51And then we can see like what is our false positive rate?
- 35:54So for example, for hate speech, we can run it on like on Harry
- 35:58Potter on some book for hate speech text, and there shouldn't
- 36:01be any hate speech in there. And if there is, then we can
- 36:04analyse the situations where it did get flagged, like what are
- 36:07these false positives? And then understand our model a
- 36:09bit better and understand, OK, like why is it flagging this and
- 36:11what can I do? And sort of retrain again for
- 36:15child pornography or child abuse, we can run it, you know,
- 36:18for, for the benign data, we can just run it on like Google open,
- 36:21set, open image, like, you know, it's just like a dump of images
- 36:24or whatever. And then like make sure that
- 36:27like you don't get, you know, a positive score on like a picture
- 36:29of a keyboard or whatever. And then but we can also run it
- 36:33on images that are like, maybe that are like a little trickier
- 36:36for the model, like Sports Illustrated, imminent swimsuits
- 36:39on mother's kissing babies, breastfeeding people on the
- 36:43beach, toddlers and diapers, things that are like not season,
- 36:46but they they do have, you know, like bare body and children and
- 36:51you know, children on a playground, things like that.
- 36:53And then you want to make sure that like none of those are
- 36:55flagged either. And sort of and they're sort of
- 36:57more towards the border and like more difficult for the model.
- 37:00And so these are things that we do, you know, production or out
- 37:04or like before, you know, after retraining to ensure that we're
- 37:07like still like at keeping our quality height in terms of like
- 37:12once we're in production, then like I said, we can do a couple
- 37:17of things. We can, or a few things we can
- 37:19just look at our distribution of scores, right?
- 37:20And sort of start to notice, like, are we drifting?
- 37:23Like are our scores suddenly like much, much lower or much,
- 37:26much higher? Because probably like at the
- 37:28scales that we're talking about, the world isn't suddenly
- 37:30becoming really friendly, right? Like people are still being
- 37:33mean. People think so that's just
- 37:35where they're changing. There's something going on as
- 37:37much as. We would like the world to be
- 37:39becoming more friendly. That's usually not the answer.
- 37:43And also. We have like we'll do audit
- 37:45specifically targeted for customers.
- 37:47Like let's look at like really, really high scores.
- 37:50Let's look a little bit of scores in the middle.
- 37:51Let's sort of look at, you know, the hardest is defined false
- 37:54negatives. But we can also sample within
- 37:56the din and be like, OK, things, you know, with this keyword or
- 37:59this sort of things like let's look at all of them and see what
- 38:02the distribution of scores were. And are these negative ones like
- 38:05really negative. Like for example, you know, we
- 38:08have, we used to have something like.
- 38:10One thing that we look at is like token overfitting.
- 38:12So, um, I like black coffee or I hate black coffee or I love
- 38:19Chinese food or I hate Chinese food.
- 38:21We want to make sure that like those aren't being flagged.
- 38:24And if they are, then we need to find ways to sort of combat
- 38:28that. And we can look for that also in
- 38:29production data to make sure that you know our functional
- 38:32tests are still valid in production.
- 38:37OK. So and then you have the audits
- 38:40that you'll go through and there's the false positive,
- 38:43there's the go, no go, there's the functional test.
- 38:46And then once it's out in the wild, you're just looking at it
- 38:49and you're seeing, did we overfit for some things?
- 38:52Let's look at this distribution score, let's see where we're at.
- 38:56Do you also have integration tests and like unit tests and
- 38:59these kind of? Things, Yes, yes, sorry, that
- 39:01goes without saying. That's like the four Yes, of
- 39:03course, yes, we do all that get into a test We have we also
- 39:08before our model hits production, we do load tests.
- 39:11We want to make sure that we're still able to like that we
- 39:13haven't changed anything so that you know, we can still meet the
- 39:15load. We look at the price like what
- 39:18instances it's on. So we have a lot of heavy
- 39:20engineering work that we do before a model like ever sees
- 39:25the light of day. And also the functional tests
- 39:27and can and the guano does test. They're also run on production
- 39:31data, right? Like while the model is out in
- 39:33the wild, like just, you know, it's not, they're not only done
- 39:36like when we've been trained, they should be done constantly.
- 39:40And also the audits is that we have our policy managers and we
- 39:42have analysts that are going in and sampling data and looking at
- 39:45and looking at the data and saying like, is this a false
- 39:47positive? They'll look at the high scores
- 39:49and say, OK, this is a mistake. This is a mistake.
- 39:51And then they go and they sort of summarise it for us and say,
- 39:54hey, guess what? Every time someone talks about
- 39:56food, you're flagging it. I keep bringing up food because
- 39:58like, it was like the first, like big.
- 40:00Fiasco that we had. So the, the process that I would
- 40:06love for you to walk me through is how does it look like when
- 40:13the data scientist has whatever hate speech model, one that
- 40:20they're going to be using very specific, whatever it may be,
- 40:24and they're like, this is good. I'm ready to bring this to
- 40:29production. I'm ready to are you throwing it
- 40:33over the fence, giving it to somebody?
- 40:35Do they run with it? How does that look to like take
- 40:38it from the potentially Jupiter notebook if they're playing in
- 40:42that and then now being served as an API at very low latency?
- 40:47So what we have is we are, we serve our models, we use
- 40:52Kubernetes, we are on, we're, we're on a WS and our, but
- 41:01basically our inference pipeline is our inference infrastructure
- 41:05is like is we, we, we built it ourselves.
- 41:08We were looking at all kinds of different vendors and we decided
- 41:10that in order to really keep costs low and at this with at
- 41:13this scale, we didn't want to sort of pin overhead for every,
- 41:16for every inference. It just didn't make sense.
- 41:18And so we were also able basically to write at least for
- 41:23a text models right now. And this thing that we're still
- 41:25working on, on this infrastructure basically to have
- 41:27sort of like a no code deployment workflow for our data
- 41:31scientists. So once they've for like
- 41:34architectures that were like that we know and have been low
- 41:37tested and we're very comfortable with, there's like a
- 41:38very easy path for them to basically just deploy to
- 41:41production. And the data scientists, they do
- 41:44that. I strongly believe that people
- 41:47should write code for production, including data
- 41:49scientists. And I think that sort of like if
- 41:52your output is a Python notebook, then you lose a bit of
- 41:56the ownership. And even though the data
- 42:00scientists are not the ones usually waking up at night phone
- 42:02calls, right? That's like the engineers.
- 42:04But it's theirs. They own it.
- 42:06They know it. They're familiar with it.
- 42:08It's part of their ownership. And so it's not that they sort
- 42:12of like just do the research and then kind of like kick it over
- 42:14and say, hey, someone else needs to take this.
- 42:18Yeah, you're preaching to the choir.
- 42:20The production code, we actually have a channel in our Milos
- 42:25community, Slack, that is called Production Code.
- 42:28And it is 100% that just like talking about how we can make
- 42:32sure that we're writing more and better code, production code,
- 42:38especially those who are data science scientists or have data
- 42:42science backgrounds and understanding the benefits of
- 42:45that will take you so far. Absolutely.
- 42:49And so the the OPS team is like very focused on writing the
- 42:54infrastructure so that that can happen seamlessly, but the
- 42:58ownership and put in pushing it there and it needs to be needs
- 43:01to lie also with the data scientists.
- 43:03Yeah, it's fascinating too to think about.
- 43:05OK, you created almost like this no code solution so that it
- 43:11eliminates the friction that the data scientists have once
- 43:16they've once they have the confidence that like, alright,
- 43:19this model is going to be better.
- 43:21And if passed all the cheques that I needed to pass, then they
- 43:26can push it and say, alright, cool, now let's go.
- 43:29And they have that ownership. They can take it across the
- 43:32finish line. I will.
- 43:33Say that it's not completely seamless, it's not completely
- 43:36smooth. We're constantly learning.
- 43:37Like we're still building, we're a startup.
- 43:41But yes, that part works. Yeah.
- 43:44There's other parts, yeah, that are fun and that you're probably
- 43:46digging into and I can imagine, I, I can imagine a tonne.
- 43:51So there there is so much good stuff that we talked about here.
- 43:57I think the thing for me that is one of the hardest problems that
- 44:03you're dealing with is a tonne of languages, a tonne of
- 44:08cultural references, trying to make sure that you are not just
- 44:14like taking all the fun out of the Internet.
- 44:19Because there I, I, as you mentioned, you could overfit and
- 44:24now somebody says hello world and boom, that's flagged.
- 44:27Yeah. And so how can you find that
- 44:30proper medium that is not taking the fun out of it, but and just
- 44:36like flagging everything, but also not being too lenient and
- 44:40not flagging the things that definitely should be flagged.
- 44:43Yeah. So I mean.
- 44:44This is a well known business problem, right, where you have
- 44:46sort of this balance between precision recall and a lot of
- 44:50times it's also if it's a client question, right, like how
- 44:53sensitive, how sensitive are you?
- 44:55So if you're a child, a child's platform, then you probably want
- 44:58to err on the side of like high recall, right?
- 45:01And even at the cost of precision and you'd want to like
- 45:03over flag and yeah, take some of the fun out because at the end
- 45:06of the day, I don't care if they're limited to like 12
- 45:08words, they can type like that's fine.
- 45:10At least there's yeah. Versus if you're a dating
- 45:14platform, you're gonna be a little bit more tolerant of
- 45:16like, you know, some a little bit more exciting talk.
- 45:19And so it's a business question. We have our policy.
- 45:24And like when we're building them, like I said, we're like
- 45:26very, very clear about our policy.
- 45:27The policy manager is like, works very closely with our data
- 45:30scientists. He's at all of their dailies.
- 45:33And anytime there's a question, there's like, it's, it's, it's
- 45:37an ongoing conversation because sometimes the policy will say
- 45:40something and then we'll be like, yeah, what about this
- 45:42simple? Like, is this, is this not in
- 45:43the labelers are always asking and we're always asking.
- 45:45So it's sort of this like constant conversation to make
- 45:49sure that at least in terms of our policy, our data and our
- 45:51data quality, our labelling is like very, very high quality.
- 45:54And that's also that we can that we, you know, communicate to the
- 45:57client like this is our policy. If you're more sensitive than
- 46:01you can add a keyword, right? So if, for example, our hate
- 46:04speech policy, reclaimed slurs are not hate speech.
- 46:08So if I'm saying like I'm proud to be a, then that's not hate
- 46:14speech, it's reclaiming, right? Or don't call me a that's not
- 46:18his speech. That's like victim, like, you
- 46:19know, asserting themselves. But for some platforms, any slur
- 46:23is not OK, like I don't want you to use that word at all.
- 46:27And so that's that has nothing like my model will not is not
- 46:32going to be like tuned to that particular, you know, sensitive
- 46:35level. And so for that we have our
- 46:37keyword tool. Feel free add the keyword and
- 46:39describe how it is and then just add it to your model and then
- 46:42like that, that'll be the race zoo level.
- 46:44And then if you want, you can take all the fun out that way I
- 46:47have some level of fun. And so it's again.
- 46:50And then also clients can set their own threshold, right?
- 46:52So I give the probability of risk and then if you're like
- 46:56very, very, very sensitive and you don't want anything, you'll
- 46:59set that threshold really, really low.
- 47:01And then you'll make sure that anything that's like a even a
- 47:04little bit probable of risk will get flagged.
- 47:07And if you're not sensitive then just set your threshold really
- 47:10high and go have all the fun you.
- 47:13Yeah. Well, it does feel like the main
- 47:17thing that you're probably doing continuously is labelling data.
- 47:21Is that safe to say? Like you are you or the teams?
- 47:26I would imagine like it feels like 90% of this happens at the
- 47:30data labelling phase to make sure that whatever goes through
- 47:33the pipeline and is then on the output gets flagged or is is
- 47:40caught. So yeah.
- 47:41So I think there's two things that make our solution our
- 47:43models are three things that make our solutions, our models
- 47:45so powerful. The 1st is really the subject
- 47:49matter experts and the intelligence analysts and the
- 47:51fact that we, we really know this world, right?
- 47:53Like we know how to build a policy.
- 47:56We know what it means to be a speech, what it means to be
- 47:58harassing building, what it means to be suicide, self harm.
- 48:00Like we know this really well and.
- 48:02In different languages, right? And different cultures, yes.
- 48:04Many and we also have cultural context.
- 48:06So someone calling someone a dog in one language is not the same
- 48:09as calling them a dog in a different language.
- 48:11And so we're sensitive to that and we know we know how to do
- 48:14that. And what that means is that our
- 48:17data labelling quality is our data quality is very, very, very
- 48:20high because it's so linked to our intelligence analysts and to
- 48:24our policies. And we're also very aware that
- 48:27like that's what gives us an edge, right?
- 48:28Like our data is our gold, right?
- 48:30Like this is what like we, we've invested a lot of this and this
- 48:34is what it's, you know, it's what our models are built on.
- 48:37And then the other part of that is that we just killer engineers
- 48:40and killer data scientists that are able to take this, you know,
- 48:44this data and turn it into something that's able to make a
- 48:47real impact in the world at scale.
- 48:49There's it's two parts of the puzzle, because you can have all
- 48:53the data in the world that is very high quality data, but if
- 48:56you can't operationalize that with a machine learning model,
- 48:59then it's as good as nothing, right?
- 49:03Right. So that's like the raw
- 49:05materials. We need to know what to do with
- 49:06raw materials. That's why I said that there's
- 49:07like a lot of open source models out there and oftentimes they
- 49:10fall apart of the data, right? Like they can throw like a
- 49:11really big cool model at something and then it will run
- 49:14at scale with all in production. And also, it's based on poorly
- 49:18labelled data or inconsistent data and it doesn't matter, like
- 49:21how amazing the algorithm is. It makes sense, yeah.
- 49:24Well, yeah. And it seems like the other
- 49:27piece, for better or worse. Like I can imagine it is hard
- 49:32being some of these subject matter experts because you have
- 49:34to go into the depths of like the worst parts of the Internet.
- 49:39Yes, so where we take the well-being of our labelers and
- 49:45of our experts very, very seriously.
- 49:48We have a psychologist on staff. We have like well-being
- 49:52programmes. This is something that's not
- 49:55taken lightly. Like I said, we care a lot about
- 49:57this. This is another reason like
- 49:59putting AI in the loop here. It's not only because it's like
- 50:03really it's the only way to combat this, right.
- 50:05Like there's, there's the sheer scale of things like you can't
- 50:08do it manually. But it's also because we want to
- 50:11offload and sort of focus human energy only on where it's like
- 50:16going to be most important and most effective.
- 50:18Uh-huh. Yeah, the questions and that
- 50:20burden, it makes a lot of sense. So incredible.
- 50:27But thank you so much for coming on here and talking to me about
- 50:30this. I've, I am thoroughly fascinated
- 50:33by it and I think you're doing so much great work.
- 50:37And as a father of two daughters, I know I told you
- 50:40this before, but I'll tell you that now that we're recording, I
- 50:42am so grateful that people like you and Active Fence exist
- 50:47because it is just the I know the Internet isn't going to
- 50:53always be like 100% safe, but it does feel like at least you're
- 50:59trying to do something to make it a little bit safer.
- 51:02Thank you. It was great being here.
- 51:04I was really excited to get to speak to you and thank you for
- 51:07inviting me and I hope I get to keep doing great work.
- 51:12Important. Excellent.