Twitter Algorithm Revealed

Twitter Algorithm Revealed

Great news, Twitter has released the source code for their algorithm on GitHub! This is exciting news for anyone who has been curious about how Twitter decides what to recommend on the homepage. The algorithm has three main steps, each playing an important role in determining what you see on your feed. Step one, sourcing relevant tweets. Step two, rate the sourced tweets. Step three, filter out unwanted tweets and then serve up those tweets to the user based on rank. Let's go over the steps in detail.

Step one is all about sourcing relevant tweets. Twitter pulls in a certain number of tweets from various sources before ranking them. These sources are split into two groups: in-network (50%) and out-of-network (50%). In-network sources are the people you follow and interact with on Twitter, regardless of how many followers they have or how often you interact with them. Out-of-network sources come from the the use of an algorithm to find tweets from people you are not following but may have overlap in likes and interactions with. For example, a friend of a friend. Additionally, the embedding space asks users about their interests and suggests accounts to follow, expanding the groups you interact with on the platform. Factors like regency of the tweets also play a role in which tweets are shown to you.

Step two is where the algorithm rates the sourced tweets. Twitter uses an algorithm to rank potentially interesting tweets by asking questions like "Does this user interact with the author a lot?" and "Is this tweet about something they like?" and "Is this person a twitter blue subscriber?" - twitter blue subscribers are given a higher score, increasing the likelihood of their tweets being shown to you - and so on. Each question is a multiplier that increases the likelihood of seeing the tweet. The algorithm produces a score for each tweet, which is used to rank them based on your interests.

Step three is all about filtering the rated tweets. The algorithm goes through each tweet and checks if it should be shown to you based on factors like word muting, tweet balance, and user engagement.  The algorithm reorganizes the rankings based on whether a tweet has been seen too much, is about a muted topic, has been engaged with before, or is from a blocked user. The algorithm produces a feed for you based on the filtered rankings.

Overall, this process is similar to how most social networks work. The algorithm is not designed to suppress specific topics or ideas, and it is not evil. It collects tweets from sources you both follow and do not follow, ranks them based on your interest in them, and filters them based on specific preferences such as muted words, blocked users, or overexposure to a user's tweets. For those who are not familiar with how these systems work, this breakdown may be helpful. However, for those who have worked on social networks or ranking systems before, nothing here should be super surprising.

In conclusion, the Twitter algorithm is not something to be afraid of or worried about. It's designed to help you see the tweets you're most likely to be interested in and is constantly evolving to better serve its users. If you're interested in learning more about the Twitter algorithm, be sure to check out their source code on GitHub!

This blog was produced with the help of chat-GPT and Theo - t3.gg on YouTube.