Twitter Reveals Source Code
Twitter has opened access to parts of its source code. The published code is related to its recommendation engine, which powers the For You feed.
On March 31, Twitter announced that it opened two directories of its source code on GitHub. The source code primarily relates to the algorithm that defines what will appear for users on their timeline. Twitter also clearly outlined what would not be available for viewing, which includes advertising and “training data or model weights” algorithms.
Although Twitter has shared this information as part of its efforts to increase transparency, it is also holding back many parts of its code that would “compromise user safety and privacy or the ability to protect our platform from bad actors, including undermining our efforts at combating child sexual exploitation and manipulation.”
Twitter is encouraging those that look through the code to highlight bugs and possible improvements. The social media company is hoping to use the “collective intelligence and expertise of the global community” to improve the platform and its analytics.
Shortly after the publication of its source code, CEO Elon Musk held a Twitter Spaces session to give more details. Twitter also published a specific blog post from its Engineering division that provides more functional and technical details on the algorithm itself.
Since becoming visible, users have identified a few surprises in the code. For example, it appears that depending on the source, Tweets are treated differently. There are also labels in the source code that identify if the user is a Democrat or Republican, Elon Musk, or a “power user.” Musk claims he was unaware of these labels and that they shouldn’t be there, and this part of the source code has since been removed.
While Twitter is open to bring a new level of transparency, it is not looking to give away their intellectual property. Twitter has opened these two directories the same week it officially requested Github to take down parts of its code that had been leaked from an unauthorized source.
It is unknown how long that code had been available, but it is assumed it was visible for several months. Twitter is also seeking legal support to require Github to reveal the details of the person who published the code and anyone who has seen or downloaded it.