
Twitter reveals some of its source code, including its recommendation algorithm
- by TechCrunch
- Mar 31, 2023
- 0 Comments
- 0 Likes Flag 0 Of 5

REGISTER NOW
“We’re going to look for suggestions, not just on bugs but also on how the algorithm should work,” Musk said on the Spaces session. “It’s going to be an evolving process. I wouldn’t expect it to be a nonstop upward movement… but we’re very open to what would improve the user experience.”
At first glance, the algorithm is fairly complex — but not necessarily surprising in any way from a technical standpoint. It’s made up of multiple models, including a model for detecting “not safe for work” or abusive content, determining the likelihood of a Twitter user interacting with another user and calculating a Twitter user’s “reputation.” (It’s unclear what “reputation” refers to, exactly; the high-level documentation isn’t clear on that.) Several neural networks are responsible for ranking the tweets and recommending accounts to follow, while a filtering component hides tweets to — forgive the jargon — “support legal compliance, improve product quality, increase user trust, protect revenue through the use of hard-filtering, visible product treatments and coarse-grained downranking.”
Twitter’s For You timeline, powered by a recommendation algorithm. Image Credits: Twitter
In an engineering blog post, Twitter reveals more about the recommendation pipeline, which it claims runs approximately five billion times per day:
“We attempt to extract the best 1,500 tweets from a pool of hundreds of millions … Today, the For You timeline consists of 50% [tweets from people you don’t follow] and 50% [tweets from people you follow] on average, though this may vary from user to user,” Twitter wrote. “Ranking [tweets] is achieved with a ~48-million-parameter neural network that is continuously trained on tweet interactions to optimize for positive engagement (e.g. likes, retweets and replies).”
Twitter users don’t see the full 1,500 tweets, of course. They’re filtered according to content restrictions and other criteria and factors considered by the models, like if tweets have “negative feedback” and if they’re mainly from the same Twitter user, or from users who’ve been blocked or muted.
Gizmodo notes that one thing that doesn’t appear to have been made public is the list of VIPs that Twitter pushes to users. This week, Platformer reported that Twitter has a rotating list of noteworthy users, including YouTuber Mr. Beast and Daily Wire founder Ben Shapiro, that it uses to monitor changes to the recommendation algorithm by increasing the visibility of these “power users” seemingly at will.
There’s more evidence that the algorithm may treat tweets differently depending on the source. Researcher Jane Manchun Wong noted that Twitter’s algorithm specifically labels whether the tweet author is Elon Musk and has others labels indicating whether the author is a “power user” as well as whether they’re a Republican or Democrat.
During the Spaces session this afternoon, a Twitter engineer said that the labels were used only for metrics. But Musk — who said he wasn’t aware of the labels prior to today — said that they shouldn’t be there.
Twitter’s algorithm specifically labels whether the Tweet author is Elon Musk
“author_is_elon”
Please first to comment
Related Post
Stay Connected
Tweets by elonmuskTo get the latest tweets please make sure you are logged in on X on this browser.