As Twitter CEO Elon Musk has repeatedly promised, Twitter will Open Portions of our source code, including the algorithms we use to recommend Tweets on users’ timelines, are subject to public inspection.
On GitHub, Twitter has published two repositories that contain code for much of the social network’s power, including the mechanisms Twitter uses to control which tweets users see in their For You timelines. In a blog post, Twitter characterized the move as follows:[ing] more transparent” and at the same time “[preventing] Risk to Twitter itself and people on the platform.”
Second, the open source release does not contain the code that powers Twitter’s ad recommendations or the data used to train Twitter’s recommendation algorithms. Additionally, it contains very little instruction on how to examine the code or actually use it, reinforcing the idea that the release is strictly developer-focused.
“[We excluded] Any code that jeopardizes the safety and privacy of our users, or our ability to protect our platform from malicious actors, includes undermining our efforts to combat child sexual exploitation and manipulation,” Twitter wrote. I’m here. “we [also took] Measures taken to ensure that user safety and privacy are protected. ”
Twitter says it is working on a tool to manage code suggestions from the community and sync changes to an internal repository. Perhaps they will be available in the future – there is currently no indication of them.
At first glance, the algorithm is rather complex, which is not necessarily surprising from a technical point of view. It consists of multiple models, a model to detect “unsafe at work” or abusive content, a model to calculate the likelihood of a Twitter user interacting with another user, and a model to calculate a Twitter user’s “reputation”. And so on. (It’s unclear what exactly “reputation” refers to; the high-level documentation isn’t clear.) Several neural networks are responsible for ranking tweets, recommending accounts to follow, and filtering Component hides tweets — excuse the jargon — “supports regulatory compliance, improves product quality, increases user trust, hard filtering, visible product processing, coarse-grained down-ranking to protect your earnings.”
in engineering blog postTwitter reveals more about its recommendation pipeline, which it claims runs about 5 billion times a day.
“We are trying to extract the best 1,500 tweets from a pool of hundreds of millions…Today, the For You timeline is composed of 50%. [tweets from people you don’t follow] and 50% [tweets from people you follow] On average, this can vary from user to user,” Twitter wrote. “Ranking is achieved with a neural network of up to 48 million parameters that is continuously trained on tweet interactions to optimize positive engagement (likes, retweets, replies, etc.). , and output 10 labels to score each tweet, where each label represents the probability of engagement.”