Twitter publishes ‘large part’ of its source code on GitHub

Spread the love

Twitter made “a large portion” of its source code publicly available on GitHub on Friday. The public code includes Twitter’s recommendation algorithm for the For You timeline. The code for the ad recommendations is missing.

Twitter writes in a blog post that it has published two repositories on GitHub. The main repo and ml repo contain the source code for “many parts of Twitter.” This includes, for example, the recommendation algorithm for Twitter’s For You page, which the company also discussed on Friday a technical blog post published. That timeline shows recommended tweets for users, which aren’t necessarily published by accounts the user follows.

That algorithm works by pulling “the best tweets from different recommendation sources,” Twitter reports. These are then ranked using a machine learning model. Finally, heuristics and filters are applied, so that tweets from blocked users or with nsfw content, for example, do not appear in the For You page if desired. The exact code of the algorithm can now be found on GitHub.

Twitter has not published all the code behind the platform. The company says it has excluded certain parts to protect the privacy and security of users. For example, no details have been shared about how the platform combats child abuse and manipulation. The code behind the ad recommendation algorithm has also not been published. Twitter also says it is not currently releasing any training data or model weights related to the Twitter algorithm. Owner Elon Musk reports this on Twitter ‘the rest [van de broncode] follows’. It is not known exactly when those parts will be made public.

Musk promised last year that the source code of Twitter would be made public after he completed the acquisition of the platform. He did after he held a poll on Twitter, asking users if he should make the platform’s source code public. About 83 percent of the respondents answered ‘yes’. Musk said at the end of February that the code would appear within a week, but later postponed that to the end of March. The CEO says Twitter will fix any issues if they are discovered.

The structure of the algorithm behind a Twitter timeline. Source: Twitter

You might also like