Twitter has made parts of its computer code public in a move that allows users and programmers to understand how the social media site recommends content. The source code for many parts of Twitter, including the recommendations algorithm which controls the tweets that users see on their timeline, was uploaded to two repositories on the code-sharing platform GitHub. The move was prompted by Twitter’s billionaire owner Elon Musk, who believes that code transparency will lead to higher trust among users and rapid improvements to the product.
Twitter’s code transparency also addresses concerns from users and lawmakers who are scrutinizing social media platforms over how algorithms select the content that users see. Musk tweeted that third parties should be able to analyze the open-sourced code and “determine, with reasonable accuracy, what will probably be shown to users”. He added that Twitter will update its recommendation algorithm based on user suggestions every 24 to 48 hours.
On Friday, Musk and some Twitter employees held a session on Spaces, Twitter’s audio chat feature, to ask users to bring recommendations and questions about how the platform’s code works. One person questioned why Twitter’s code appeared to classify users as Republicans or Democrats. A Twitter employee responded that it was an old feature that was not important to the platform’s recommendation system, and the company was looking to remove it.
Twitter has excluded code that would compromise user safety or privacy, as well as details that would undermine efforts to prevent child sexual abuse material on the platform. The repositories on Github do not include the code that powers Twitter’s ad recommendations, the company said. The announcement comes after parts of Twitter’s source code were leaked on Github, which took down the code last week at Twitter’s request. Twitter asked the U.S. District Court for the Northern District of California to order Github to produce “all identifying information” associated with the GitHub account that had posted the leaked code, according to a legal filing.
In a tweet on Saturday, Musk stated that in the coming weeks, the entirety of the code that contributes to showing a tweet will be open-sourced, giving users and programmers full transparency into how Twitter operates. This move could have significant implications for the future of social media platforms, as it could prompt other companies to follow suit and increase transparency to improve user trust.