Elon Musk publishes part of the Twitter source code on GitHub


Twitter has just released a snippet of its source code. The company has uploaded to GitHub part of its recommendation algorithm, that is, the system that decides which messages end up reaching sections like 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 said that “many embarrassing problems” will be discovered, but he has promised to solve 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 can guide us 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. The obtaining of the best Tweets based on different sources of recommendation, the classification of Tweets using an automatic 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 total transparency ” of how their systems work. They also explain that they are already working on several that will arrive later.

Image source: twitter

Leave a Reply