As promised earlier, Elon Musk-led Twitter has published the source code of the algorithm today โ thatโs used to determine how the platform shows tweets in For You feed.
As per it, the company considers certain aspects like the people you follow (and some from their network), ranking, and filtering โ before showing up their tweets in your timeline. While this code is officially out, Twitter held back the ad recommendations code and a few other parts to maintain user and advertiser safety.
Opening the Source Code
Ever since Elon Musk took over Twitter, heโs been trying to increase transparency for the good. In this pursuit, weโve seen Musk himself answering and admitting some of the key questions posted by the community, while also vouching to open source the platform code soon.
Most of the recommendation algorithm will be made open source today. The rest will follow.
Acid test is that independent third parties should be able to determine, with reasonable accuracy, what will probably be shown to users.
No doubt, many embarrassing issues will beโฆ https://t.co/41U4oexIev
— Elon Musk (@elonmusk) March 31, 2023
And he stood by his word โ by publishing (1,2) Twitterโs โFor Youโ recommendation algorithmโs source code to everyone! This is as per a poll he made last week, and now implementing it. Doing so, the Twitter engineering team said the tweets on your For You tab are chosen by a service called the Home Mixer, which follows the below rules:
- Fetch the best Tweets from different recommendation sources in a process called candidate sourcing.
- Rank each Tweet using a machine learning model.
- Apply heuristics and filters, such as filtering out Tweets from users youโve blocked, NSFW content, and Tweets youโve already seen.
The final goal of the above process is to show 59% of relevant and recent tweets from their followers, and the rest from people whom they donโt follow, but may find interesting.
While itโs good that weโre seeing this algorithm going public, Twitter held back the code of advertising recommendations, or other parts that endanger usersโ safety or may dent the platformโs security.
โWe also took additional steps to ensure that user safety and privacy would be protected, including our decision not to release training data or model weights associated with the Twitter algorithm at this point.โ