On Natural Language Processing (NLP), hate speech and good intentions

Today I was banned from Facebook for 24 hours.

I am the kind of user who enjoys the Facebook platform on a daily basis. So waking up to this news of getting a ban, surprised me and even slightly upset me. Still, it wasn’t too dramatic and clearly, I am not the only person who got banned from Facebook lately. I assume that this morning, just like me, hundreds or thousands of people received the same generic message from Facebook that goes something like this:
You can’t post or comment for 24 hours. This is because you previously posted something that didn’t follow our community standards. This post goes against our standards on hate speech

For me this was the first time getting banned and it felt pretty ironic, for a few reasons.

The first reason is that I am basically a good person. I know that you are not supposed to compliment yourself, but that is the truth. In life I tend to choose to express myself using positive and respectful communication. I try to follow the cliché that says: “If you don’t have something nice to say, don’t say anything at all”.

Well, I partially follow it. I don’t believe that you have to be nice all the time. You can, and should criticize people’s actions sometimes, but even when doing so, I believe you should apply that basic kindness and empathy which you would like to receive back.

The second reason I find this ironic is that when using social media, I tend to be even more positive than in real life. I never discuss politics, I never make nasty remarks, I never post harmful or potentially triggering photos. I’m a strong believer that social media is part of the foot print that we leave on this planet. Anything that I post on social media would be forever visible to the whole world including my current and future employers, my children and the court of law. Personally, I have no intention of getting into trouble with either of these entities due to inappropriate content.

But the third reason I find this whole thing ironic has to do with my profession.

In the last few years, I have been working, researching and leading teams in the field of Natural Language Processing (NLP).
NLP is a computer science specialty that aims to deal with the long-standing question of how computers can understand the human written (which is referred to as natural) language.

This has been an open question since the 1950’s when computers became more and more involved in solving problems and automating processes.

A good example for the major progress in the field of NLP is the internet search capabilities driven by Google in the last 20 years. In the past, before Google, when users wanted to search for bits of information on the internet, they had to write their search questions in very specific order and format in order to get meaningful results. Back then, there was significantly less content on the internet, yet most of the search results were hardly meaningful or relevant.

Understanding what the users are looking for is a genuinely hard task. It requires understanding the actual meaning of the words that were used as well as the intentions of the users who wrote them. When Google showed up, one of its many innovative strategies was to develop and apply new NLP algorithms on the users’ search questions. The effect was immediate and stunning. The search capabilities that Google provided were significantly better than any of its competitors in measures of accuracy and relevancy.

Today, I can write a simple phrase such as “weather turkey” and get hundreds of accurate results. I can also write more complicated questions such as: “where can you buy the green plastic straws used at Starbucks in Chicago” and get the exact options for online as well as offline purchase options for these green straws. Other than these beneficial search results I will probably also receive targeted advertisements that rely on the content of my questions as well as on the endless amount of information that Google is continuously collecting about me. But this is a whole different story for a different post.

Facebook is using NLP in the attempt to monitor the content created by its users. This effort involves a delicate balance between enabling freedom of speech for the users and making sure that the platform is free of offensive, abusive and racist content. To add a level of complexity, Facebook has to apply its content monitoring algorithms on all languages, including Hebrew — my native language.

The task of identifying harmful content using NLP is fairly familiar to me. During my career I have led the development of algorithms that aimed at the exact same challenge. From an enormous amount of written text, our algorithms attempted to identify “the needle in the haystack” that may contain problematic language or intents. For that reason, the ban that I received from Facebook today was quite funny and ironic to me as I am completely aware of how hard this task actually is.

So why did Facebook decide to ban me today of all days?

The explanation lies with two comments I have recently posted on Facebook. The first comment was posted by me a few months ago in a closed group, and resulted in Facebook deleting that comment and sending me a warning. Apparently, my comment was interpreted by Facebook’s algorithms as containing nudity or sexual activity.

To be honest I am unable to understand that decision as the content of my comment (freely translated from Hebrew) went something like: “you’re gorgeous. You’re a great hero”. The comment was originally written in Hebrew and addressed to a friend of mine who is truly both gorgeous and a real hero.

I pointed out to Facebook’s support that this comment has nothing to do with sexual content or nudity, however I never got any reply about the matter, and honestly, I just forgot about it. That is until this morning, when I received the ban notice. Today’s notice mentioned the fact that I was already warned by Facebook about my content in the past, and that I am now banned as a new comment I have recently posted contains hate speech.

Hate speech? That doesn’t really sound like me. I’m a good person, remember? So, I looked into the content of my comment. Again, it was originally written in Hebrew and addressed to a friend in a closed group. The comment contained the following text: “You Polish monster”. Hmmmm, looking at this text that I wrote, and taking it completely out of context, yes, this is actually quite a nasty comment. I can understand how an algorithm would flag this text as offensive or racist.

But I’m a good person, remember? I never meant to write offensive racist content, so what happened here?

As I mentioned before, computer processing of natural language is a complex job. It requires the understanding of both the actual meaning of the words that were used as well as the intentions of the user who wrote them.

In my case, Facebook’s algorithm was able to decipher the content of the words quite accurately, but the intent was totally missed. In Hebrew, the cultural meaning of calling someone ”Polish” is that this person just worries too much, like a “Jewish Mother” type of worry. Looking back at the text, the choice of words seems poor as it was completely lost in translation. However, there was never any malicious intent in this comment, and the friend that it referred to liked the comment using a laughing emoji to show that it was genuinely funny to her.

As a user, the decision to ban me from Facebook is annoying and feels unfair. I didn’t have any bad intentions. How come there are so many horrible racist comments that are left untouched while my innocent joke got me punished and banned?

At the same time, as a data scientist I have a decent understanding and respect for the massive challenge Facebook and the other companies are faced with, and I am very proud to be part of that fascinating voyage of natural language processing.

So, am I going to change my writing style from now on, after this harsh reminder of being constantly monitored? Is Facebook going to become better at understanding local slang and cultural references? The only sure thing is that I would need to find something better to do in the next 24 hours. Any suggestions?

Written by

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store