Twitter’s recommendation algorithm is now available on GitHub

Twitter publishes the code of their recommendation algorithm on GitHub, but there are still some gray areas.

Nearly a year after Elon Musk proposed making Twitter’s recommendation algorithm public, the company has released the source code of said algorithm on GitHub. On Twitter Space discussing this, the boss says he hopes users will find “glitches”in the code to help make it even better.

Twitter publishes the code of its recommendation algorithm on GitHub

“Our publication of this algorithm should be somewhat embarrassing, and people will find many errors, but we will fix them very quickly,” the American billionaire wrote, in particular.

For example, the posted code only handles how tweets appear in the For You Twitter feed. The company hasn’t released the code for its search algorithm or how content is selected from other places on Twitter, but Musk said the company will make the search algorithm public as well.

In a blog post detailing how Twitter recommendations work, the company explained the various steps of the algorithm, including ranking and filtering. But Twitter users have already discovered a number of very interesting details in the code. For example, Jane Manchun Wong noted that “Twitter’s algorithm explicitly indicates whether a tweeter is Elon Musk.”This could be an additional explanation for why the CEO’s tweets appear so frequently on the platform. Jane Manchun Wong also clarified that the algorithm has labels indicating whether the tweeter is a “power user”, a Republican or a Democrat.

But there are still gray areas

When asked about this aspect of the algorithm on Twitter Space, Elon Musk simply said, “I agree that this shouldn’t be… There shouldn’t be a distinction between Republicans and Democrats, there shouldn’t be. meaning.”A Twitter engineer later clarified that these categories are for “statistical purposes only and have nothing to do with the algorithm.”He also explained that the labels are used to “ensure that we don’t lean more towards one group than another,”though he didn’t elaborate on why Elon Musk had his own category.

“But isn’t it strange that you have four categories and one of them is Elon?” the commentator replied. “I find it strange,” Elon Musk himself said at the time. “This is the first time I hear about it.”The Twitter engineer didn’t respond, and within a minute, Twitter Space was shut down.

The Twitter algorithm specifically flags whether the author of the tweet is Elon Musk.

“author_is_elon”

beyond labels Democrats, Republicans and power users https://t.co/fhpBjdfifX pic.twitter.com/orCPvfMTb9

— Jane Manchun Wong (@wongmjane) March 31, 2023

CDN CTB