Facebook published an article that explains how the Facebook News Feed algorithm works. Compared with Facebook’s news feed algorithm patent, both documents explain much about how Facebook ranks posts in the news feed.
Machine Learning and Ranking
Facebook’s news feed algorithm is a machine learning ranking system. It’s not just one algorithm though. It’s a combination of multiple algorithms that work together in different phases.
Parts of the algorithm do different things, like selecting “candidate” posts to show in a person’s news feed, eliminating posts with misinformation or clickbait, creating lists of friends that a person interacts with, topics that the person tends to engage with and then using all of these factors to rank (or not rank) posts in a Facebook news feed.
All of those different layers are applied in order to predict what a Facebook member is going to find relevant to them.
The goal of the algorithms is to to rank which posts show up in the news feed, the order they are in and to select the posts that a Facebook member is likely to be interested in and to interact with.
It’s not just a few signals either that are considered. Facebook states that they use thousands of signals.
According to Facebook:
“For each person on Facebook, there are thousands of signals that we need to evaluate to determine what that person might find most relevant… to predict what each of those people wants to see in their feed…”
Facebook News Feed Ranking Signals
Characteristics of a Facebook Post
One of the ranking signals that Facebook discusses is the “characteristics” of a post.
Facebook is using a feature or quality of a post and determining whether this is the kind of thing that a user tends to interact with more.
For example, if a post is accompanied with a colorful image and a member has a history of interacting with posts with colorful images, then that’s going to be ranked higher.
If a post is accompanied by a video and that’s what a Facebook member likes to interact with, then that’s going to be ranked higher for that member.
Whether the post has an image, a video, if friends of a user are tagged in the post, those and other characteristics of a post are used as a ranking factors for determining whether a post is going to be shown to a user and how high it’s going to be ranked in the news feed.
Facebook used the example of a fictional user called Juan (the name “John” in Spanish) to illustrate the characteristics ranking factor.
This is what Facebook said about the characteristics ranking factor:
“We can use the characteristics of a post, such as who is tagged in a photo and when it was posted, to predict whether Juan might like it.
For example, if Juan tends to interact with Saanvi’s posts (e.g., sharing or commenting) often and her running video is very recent, there is a high probability that Juan will like her post.
If Juan has engaged with more video content than photos in the past, the like prediction for Wei’s photo of his cocker spaniel might be fairly low.
In this case, our ranking algorithm would rank Saanvi’s running video higher than Wei’s dog photo because it predicts a higher probability that Juan would like it.”
Time is a Facebook Ranking Factor
Facebook’s example that was noted above also illustrate how time, in the form of how recently something was posted, can also be used as a ranking factor.
What’s interesting about the example of the fictional “Juan” is that Facebook mentioned that when a post was made is a ranking factor.
“We can use the characteristics of a post, such as who is tagged in a photo and when it was posted, to predict whether Juan might like it.”
That aspect of time as a ranking factor coincides with a relatively recent Facebook patent that states that how recently something was posted can be used as a ranking factor.
The Facebook news feed patent is called, Selection and Presentation of News Stories Identifying External Content to Social Networking System Users.
This is what the Facebook News Feed patent says:
“…news stories may be ranked based on chronological data associated with interactions with the news stories, so that the most recently shared news stories have a higher ranking.”
That seems to confirm the value in posting the same post more than once during the course of a day. It may reach different people across time periods and those who interact with the post may help it to be shown to their friends, etc.
Engagement and Interest
Another ranking factor involves predicting whether a user will be likely to be interested in or engage with a post. Facebook uses a number of signals to make that prediction.
The article is clear on that point:
“…the system determines which posts show up in your News Feed, and in what order, by predicting what you’re most likely to be interested in or engage with.”
And some of those factors that Facebook uses are signals from past posts and people that the user has interacted with. Facebook uses these past interactions to help it predict what a user will interact with in the future.
According to Facebook:
“These predictions are based on a variety of factors, including what and whom you’ve followed, liked, or engaged with recently.”
Facebook uses machine learning models to predict each of these different things. There’s a model that predicts what content a user will like, another model that predicts which post the user will comment on.
Each of these forms of engagement receive a ranking score and are subsequently ranked.
To summarize, the ranking process begins by identifying candidate posts to rank, from a pool of posts that were made since the user’s last login.
The next step is to assign ranking scores to each post.
This is how Facebook explains it by using an example of a fictional user named Juan:
“Next, the system needs to score each post for a variety of factors, such as the type of post, similarity to other items, and how much the post matches what Juan tends to interact with.
To calculate this for more than 1,000 posts, for each of the billions of users — all in real time — we run these models for all candidate stories in parallel on multiple machines, called predictors.”
Ranking Signals are Personalized to the User
An interesting insight into ranking factors is that they are weighted differently from one user to the next. Weighted means for when a ranking signal is more important than another ranking signal.
What Facebook revealed is that for one person, the prediction that they would “like” a post could have a stronger influence on whether that post is ranked.
For another user, the prediction that the user will comment on a post is given a stronger ranking weight.
Facebook shared:
“Next is the main scoring pass, where most of the personalization happens.
Here, a score for each story is calculated independently, and then all 500 posts are put in order by score.
For some, the score may be higher for likes than for commenting, as some people like to express themselves more through liking than commenting.
Any action a person rarely engages in (for instance, a like prediction that’s very close to zero) automatically gets a minimal role in ranking, as the predicted value is very low.”
What that means is that in order for a post to be successful, the post must inspire different forms of engagement from every user.
Contextual Features for Diversity of News Feed
The last step in the ranking process is to ensure diversity of the type of content that is shown in the news feed. That way the user’s feed doesn’t become repetitive.
Multiple Personalized Facebook Ranking Factors
Facebook didn’t list every ranking factor used to rank posts in a news feed. But they did give an idea, an overview of how the ranking process happens and what kinds of behavior are prioritized. We also learned that ranking signals are dynamic and can be weighted differently depending on the person.
Citations
How Does News Feed Predict What You Want to See?
How Machine Learning Powers Facebook’s News Feed Ranking Algorithm
Sentiment Polarity for Users of a Social Networking System (PDF)
Re-Ranking Story Content (PDF)
Resolving Entities from Multiple Data Sources for Assistant Systems (PDF)