What comes first to mind when you think about social networking? It’s Facebook of course! There is even a movie called The Social Network that proves this statement! And with 2.41 Billion Monthly Active Users in the second quarter of 2019, it’s safe to say that Facebook is actually not even a social network but a global phenomenon. And obviously, Machine Learning is a vital aspect of Facebook. It would not even be possible to handle 2.4 billion users while providing them the best service without using Machine Learning!
Let’s take an example. It is mind-boggling how Facebook can guess the people you might be familiar with in real life using “People You May Know”. And they are right most of the time!!! Well, this magical effect is achieved by using Machine Learning algorithms that analyze your profile, your interests, your current friends and also their friends and various other factors to calculate the people you might potentially know. And that’s only one aspect in which Facebook uses Machine Learning! Other aspects are the Facebook News Feed, Facial Recognition system, Targeted Advertising on your page, etc.
So it is obvious that Facebook uses Machine Learning in the working of all its aspects with plans on enhancing it even further. But that futuristic world is still a little far away! For now, let’s see some of the ways in which Facebook currently uses Machine Learning so that we can understand the full scope of its applications in the future.
1. Facial Recognition
Facial Recognition is among the many wonders of Machine Learning on Facebook. It might be trivial for you to recognize your friends on social media (even under that thick layer of makeup!!!) but how does Facebook manage it? Well, if you have your “tag suggestions” or “face recognition” turned on in Facebook (this means you have provided permission for Facial Recognition), then the Machine Learning System analyses the pixels of the face in the image and creates a template which is basically a string of numbers. But this template is unique for every face (sort of a facial fingerprint!) and can be used to detect that face again in another face and suggest a tag.
So now the question is, What is the use of enabling Facial Recognition on Facebook? Well, in case any newly uploaded photo or video on Facebook includes your face but you haven’t been tagged, the Facial Recognition algorithm can recognize your template and send you a notification. Also, if another user tries to upload your picture as their Facebook profile picture (maybe to get more popular!), then you can be notified immediately. Facial Recognition in conjugation with other accessibility options can also inform people with visual impairments if they are in a photo or video.
2. Textual Analysis
While you may believe photos are the most important on Facebook (especially your photos!), the text is equally as important. And there is a lot of text on Facebook!!! To understand and manage this text in the correct manner, Facebook uses DeepText which is a text engine based on deep learning that can understand thousands of posts in a second in more than 20 languages with as much accuracy as you can!
But understanding a language-based text is not that easy as you think! In order to truly understand the text, DeepText has to understand many things like grammar, idioms, slang words, context, etc. For example: If there is a sentence “I love Apple” in a post, then does the writer mean the fruit or the company? Most probably it is the company (Except for Android users!) but it really depends on the context and DeepText has to learn this. Because of these complexities, and that too in multiple languages, DeepText uses Deep Learning and therefore it handles labeled data much more efficiently than traditional Natural Language Processing models.
3. Targeted Advertising
Did you just shop for some great clothes at Myntra and then saw their ads on your Facebook page? Or did you just like a post by Lakme and then magically see their ad also? Well, this magic is done using deep neural networks that analyze your age, gender, location, page likes, interests, and even your mobile data to profile you into select categories and then show you ads specifically targeted towards these categories. Facebook also partners with different data collection companies like Epsilon, Acxiom, Datalogix, BlueKai, etc. and also uses their data about you to accurately profile you.
For Example, Suppose that the data collected from your online interests, field of study, shopping history, restaurant choices, etc. profiles you in the category of young fashionista according to the Facebook deep neural networks algorithm. Then the ads you are shown will likely cater to this category so that you get the most relevant and useful ads that you are most likely to click. (So that Facebook generates more revenue of course!) In this way, Facebook hopes to maintain a competitive edge against other high-tech companies like Google who is also fighting to obtain our short attention spans!!!
4. Language Translation
Facebook is less a social networking site and more a worldwide obsession! There are people all over the world that use Facebook but many of them also don’t know English. So what should you do if you want to use Facebook but you only know Hindi? Never fear! Facebook has an in-house translator that simply converts the text from one language to another by clicking the “See Translation” button. And in case you wonder how it translates more or less accurately, well Facebook Translator uses Machine Learning of course!
The first click on the “See Translation” button for some text (Suppose it’s Beyonce’s posts) sends a translation request to the server and then that translation is cached by the server for other users (Who also require translation for Beyonce’s posts in this example). The Facebook translator accomplishes this by analyzing millions of documents that are already translated from one language to another and then looking for the common patterns and basic vocabulary of the language. After that, it picks the most accurate translation possible based on educated guesses that mostly turn out to be correct. For now, all languages are updated monthly so that the ML system is up to date on new slangs and sayings!
5. News Feed
The Facebook News Feed was one addition that everybody hated initially but now everybody loves!!! And if you are wondering why some stories show up higher in your Facebook News Feed and some are not even displayed, well here is how it works! Different photos, videos, articles, links or updates from your friends, family or businesses you like show up in your personal Facebook News Feed according to a complex system of ranking that is managed by a Machine Learning algorithm.
The rank of anything that appears in your News Feed is decided on three factors. Your friends, family, public figures or businesses that you interact with a lot are given top priority. Your feed is also customized according to the type of content you like (Movies, Books, Fashion, Video games, etc.) Also, posts that are quite popular on Facebook with lots of likes, comments and shares have a higher chance of appearing on your Facebook News Feed.
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the “Improve Article” button below.
Please write to us at email@example.com to report any issue with the above content.