As promised by Twitter chief Elon Musk earlier this month, at present, Twitter has printed its recommendation algorithm code on GitHub for everybody to see, whereas it’s additionally posted a brand new overview of how its tweet advice algorithm works, offering new insights into what dictates the order wherein tweets are displayed.
As defined by Twitter:
“On GitHub, you’ll find two new repositories (main repo, ml repo) containing the source code for many parts of Twitter, including our recommendations algorithm, which controls the Tweets you see on the For You timeline. For this release, we aimed for the highest possible degree of transparency, while excluding any code that would compromise user safety and privacy or the ability to protect our platform from bad actors, including undermining our efforts at combating child sexual exploitation and manipulation.”
Additionally essential to notice that Twitter hasn’t the weighting information linked to every aspect – i.e. how a lot emphasis every issue will get in driving the ultimate output outcomes.
So it’s not each element, however it does present high-level perception into how Twitter’s algorithms work, whereas Twitter’s additionally supplied a more layman’s explanation of the system, to be able to assist individuals perceive the way it decides what you’ll see in your timeline each time you open the app.
As per Twitter:
“The foundation of Twitter’s recommendations is a set of core models and features that extract latent information from Tweet, user, and engagement data. These models aim to answer important questions about the Twitter network, such as, “What is the probability you will interact with another user in the future?” or, “What are the communities on Twitter and what are trending Tweets within them?” Answering these questions precisely allows Twitter to ship extra related suggestions.”
That final aspect is essential, and aligns with what Garbage Day’s Ryan Broderick had present in his experiments in testing what now good points traction by way of tweet.
As summarized by Broderick:
“Twitter is using invisible subreddits via Topics to algorithmically organize tweets. Because the For You page isn’t chronological anymore, viral tweets can’t be as timely as they used to be. They have to be kind of evergreen. It helps if they’re commenting on something that’s already going viral. And it really helps if you post a thread, reply to yourself, or create some kind of discussion in the replies. There also seems to be a bigger emphasis on video now.”
Seems, Ryan was right – Twitter is now trying to promote extra tweets within the ‘For You’ feed based mostly on topical engagement, which Twitter defines at account stage, by filtering sure accounts into subject classes, then utilizing that as a information to categorize the probably subject of every of their tweets.

As per Twitter:
“One of Twitter’s most useful embedding spaces is SimClusters. SimClusters discover communities anchored by a cluster of influential users using a custom matrix factorization algorithm. There are 145k communities, which are updated every three weeks. Communities range in size from a few thousand users for individual friend groups, to hundreds of millions of users for news or pop culture. The more that users from a community like a Tweet, the more that Tweet will be associated with that community.”
The above picture exhibits a number of the largest Twitter ‘communities’, or topical collections based mostly on Twitter’s algorithmic filtering.
Twitter says that this method has grow to be a key consider deciding which of ‘out-of-network’ tweets to insert into your ‘For You’ feed, or which tweets to point out you from accounts that you simply don’t comply with. And with increasingly of those suggestions being inserted into person feeds, it’s grow to be an even bigger driver of tweet publicity – although that’ll change once more quickly, when Twitter further restricts ‘For You’ recommendations to only tweets from paying subscriber accounts.
How that impacts the Twitter expertise is anybody’s guess at this level, however it is going to essentially remodel the ‘For You’ feed, in any case, by limiting the pool of supply tweets that Twitter can pull from.
And if celebrities, particularly, don’t pay up, or cease tweeting in consequence, that influence may very well be important.
That is probably the most important revelation of Twitter’s algorithmic overview, although there are a number of different fascinating notes and factors included within the documentation:
- For every person session, Twitter extracts round 1500 tweets that it believes will probably be of curiosity to every particular person, earlier than rating them within the ‘For You’ feed
- The For You timeline presently consists of fifty% In-Community Tweets (individuals you comply with) and 50% Out-of-Community Tweets, on common
- Twitter additionally predicts the chance of engagement between two customers. ‘The higher the Real Graph score between you and the author of the Tweet, the more of their tweets we’ll include’
- One other issue is the tweets that individuals you comply with are participating with – which isn’t a revelation, only a level of notice
- Tweet rating is performed by way of a ‘~48M parameter neural network which is continuously trained on Tweet interactions to optimize for positive engagement (e.g. Likes, Retweets, and Replies)’. There’s no notice, nonetheless, on how Twitter determines optimistic versus adverse engagement on this context
That gives some fascinating context as to how Twitter appears to be like to rank tweets, and maximize publicity inside the primary ‘For You’ feed – although once more, it will change on April fifteenth, when Twitter goes to modify to solely displaying tweets from paying customers in its ‘For You’ suggestions.
Which, in some methods, makes a variety of this perception redundant – although I assume, if the working idea is that, finally, most customers pays, then it might stay indicative for a while but.
Besides, they gained’t.
Lower than 1% of Twitter customers are presently paying for Twitter Blue, and whereas the choice to remove ‘legacy’ blue ticks, and revert the ‘For You’ rating course of will drive some extra take-up, it appears unlikely to make Twitter Blue a big consideration for the overwhelming majority of Twitter customers.
I assume, the opposite aspect to consider, on this respect is that the overwhelming majority of tweets come from very few users, with most Twitter profiles hardly ever tweeting themselves. Perhaps, then, Twitter solely wants a smaller assortment of customers to enroll in Blue to be able to make it a extra important aspect in tweet rating. However it nonetheless appears unlikely to supply higher ends in highlighting probably the most related content material from throughout the app.
Regardless, plainly Twitter is pushing forward, and now, exterior builders have extra perception into how Twitter’s algorithm works, which can result in a brand new flood of insights and tips about how one can recreation the system.
Twitter’s hope is that it additionally helps it enhance its algorithms rapidly. Perhaps that occurs as effectively. We’ll have to attend and see.