Twitter made public some portions of its source code on Friday. This code governs the algorithm responsible for recommending content on the social media platform. This release allows both users and programmers to gain visibility into the inner workings of the algorithm and suggest potential modifications.
In a blog post, Twitter announced that it had shared the code in two GitHub repositories. The repositories contain source code for several aspects of Twitter, such as the recommendations algorithm that governs which tweets appear on users’ timelines.
According to reports, this decision was made after Twitter’s owner, billionaire Elon Musk, advocated for code transparency, arguing that it would increase user trust and accelerate product development.
Moreover, this move is aimed at addressing the growing apprehensions among users and policymakers who are examining social media platforms for how algorithms curate the content that users see.
In a tweet on Friday, Musk stated 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, “No doubt, many embarrassing issues will be discovered, but we will fix them fast!”
Additionally, Musk stated that Twitter would upgrade its recommendation algorithm every 24 to 48 hours based on user feedback.
On Friday, he, along with some Twitter employees, hosted a Spaces session, an audio chat feature, to invite suggestions and queries regarding how the platform’s code works.
During the Spaces session, a user raised concerns about Twitter’s code, which seemed to categorize users into Republicans or Democrats. In response, a Twitter employee clarified that this was an outdated feature irrelevant to the recommendation system and that the company was working to remove it.
Twitter has confirmed that the repositories on GitHub do not include the code that operates Twitter’s ad recommendations.
Additionally, Twitter stated that it had excluded code that could endanger user safety or privacy and information that might hamper efforts to prevent the spread of child sexual abuse material on the platform.
This development follows the recent incident where certain portions of Twitter’s source code were leaked on GitHub. As per Twitter’s request, GitHub removed the code last week.
In a legal filing, Twitter requested the US District Court for the Northern District of California to direct Github to provide “all identifying information” connected to the GitHub account that had shared the leaked code.