Twitter has just released a snippet of its source code. The company has uploaded to github part of his recommendation algorithmthat is, the system that decides which messages end up reaching sections such as For you, Search and Explore, and that also feeds a large part of the social network’s ad platform.
The news has been released by Elon Musk, who since before buying the social network was in favor of Twitter becoming an “open source social network.” This Friday after the announcement, the businessman has said that “many embarrassing problems” will be discovered, but has promised to fix them quickly.
A part of Twitter’s code is now public
As we say, we are not facing all the code of the social network, but only a fragment (“most”, according to Musk) of the recommendation algorithm. This, as you may imagine, places Twitter far from the idea of being an open source social network, but the company assures that they will release the rest of the code in the future.
Browsing through the GitHub folders, we come across code that is difficult to understand, even for Twitter employees themselves. “Our ‘algorithm’ is too complex and not fully understood internally, Musk said in the middle of this month. However, an official blog post It can serve as a guide in some aspects.
The Twitter team has explained how the For You section works. As they explain, the models of the social network try to answer questions such as “What is the probability that you will interact with another user in the future?” or “What are the communities on Twitter and what are the trending Tweets within them?” to give relevant recommendations.
From a technical point of view, the aforementioned is carried out in three main stages. Obtaining the best Tweets based on different sources of recommendation, the classification of Tweets using a machine learning model and the application of filters to eliminate blocked accounts, Tweets already seen and insecure.
If we focus on the first of the three stages, Twitter says that for each request it extracts the top 1,500 Tweets from its sources. Once the process is complete and they go through the machine learning model, the For You section presents 50% of messages “in network” from the user and another 50% “out of network”, that is, accounts that are not followed.
Both the blog post and the GitHub page provide many other technical details that are now accessible to anyone. In relation to this movement, from the social network they affirm that it will serve to “provide full transparency” of how their systems work. They also explain that they are already working on several that will arrive later.
Cover: Screenshot + Twitter logo | Images: Twitter
In Xataka: Either you pay or you disappear: Musk confirms that the Twitter feed will change from April