Skip to content

Facebook feed algorithm

December 17, 2011

Most of us regularly use Social Networking tools like Facebook, Twitter, Google+ etc. Twitter and Google+ don’t order the feeds based on relevance or popularity, there are separate tools like “trending tweets” and “what’s hot” for that purpose. Facebook seems to have an algorithm which the other two popular sites don’t have, feed ranking aimed to reduce the amount of noise on your stream. In this post I have tried to reverse engineer this algorithm in order to understand why it fails in a few cases and how to break through and exploit its weaknesses. Please note that these are strictly my opinions of how the system works, however any criticism of any idea presented is welcome.

The feed ranking seems to be based on two concepts – Importance of a post, Relevance to the person.

Importance of a post is measured using the reaction it gets in the form of likes, comments and shares. Given 4 people like a post with 10 impressions, it is expected to have a lesser impact that a post that has 8 likes in 10 impressions. We can expect the comments and shares to further boost the score, although multiple comments from the same person doesn’t add much. Also these signals decay with time. A like yesterday you got for your post yesterday doesn’t probably count much today and so the post goes down in the ranking.
ImportanceScore = (∑i Ci * e-k(tnow-ti)) / NumImpressions
where k is some decaying constant which is multiplied to how long back the post was shared.  Cis are different constants for likes/comments/shares. NumImpressions is the number of times the post has been shown on screen.

Relevance to a person is important in deciding the probability a given person might like your post. I have observed that I see more posts from people who have interacted with me in the past. People whose posts I like/comment on see my posts higher up in their list. The relevance/friendship score can be determined by going through all the interactions between person X and person Y and summing them up with decaying time and weighted based on the type of interactions. This ensures that the recent interactions are more important.

Relevance/Friendship (X, Y) = ∑i Ci * e-k(tnow-ti)
where k is again a constant and is multiplied to the ‘how long back the interaction happened’. Cis are different constants of interaction (chat/message/comment/like/share/tag/share image/appear in same post/appear in same image)

In addition ‘relevance’ can also take into account the number of your friends who liked my post to predict the probability of you liking it.

Other factors that could be considered.
Social Status of the people who like/share/comment on your posts:-
People who like everything are expected to contribute less to the importance scores as opposed to people who like selectively. People with more number of friends interacting with him (note the direction of interaction), who has a higher social rank is expected to contribute more importance to your post than a guy with just one friend. The calculation of Social Rank is far more complex and I will omit the formulae and the confusion in this blog.

I have also ignored concept recognition as of now, the feature that allows FB to find out what you are talking about. For example “Indian National Cricket Team” or “Kolaveri”. Essentially I have considered only posts that talk about things that other people are not talking about. To adapt the model to include this signal, we would have to cluster all these posts together like Facebook does and use the scores of other posts in the cluster to score a new post.

So, how can we beat the system? Here is where I present some stuff that shameless people can try

  • If the first few people who see your post like it, it gets a high rank immediately and lots of people end up seeing it improving the chances of getting more ‘likes’.
  • If you get the popular social centres to get to like your posts, your posts are likely to get a higher scores.
  • Interacting (chatting with, commenting…) with more people on Facebook from different friend clusters (school, high school, college, university, work, home, relatives) could help.
  • Sharing obviously funny/likable things that are bound to get a lot of likes once in a while to improve friendship_score. (“Go Sachin Tendulkar”/ Kitten pictures / stolen jokes etc)

Other things that could likely help

  • Replacing the words Google-Plus in your posts with G_o_o-g_l_e + may be? And Sonia Gandhi with 50|\|i@ G@|\|_|) |-|i.
  • Using Images with text in them rather than using plain text as it increases that chances of being noticed.

I have just given my opinions in this post with a language which is as less geeky/mathematical as possible, you can share your opinions/other things you have observed about the algorithm in comments. Please also share if you found this interesting or funny. Nothing can please the author of an ad-free blog more than likes and comments.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: