Building The Future of Freelance Software / slashdev.io
Twitter’s “The Algorithm” Recommendation Engine Finally Unveiled And It Is Incredible/
After much anticipation, Twitter has finally unveiled its Recommendation Algorithm, known as “The Algorithm.” The platform’s cutting-edge engine is responsible for suggesting tweets and users to follow, ensuring a tailored experience for every user. In this article, we will explore the primary components of this incredible algorithm, breaking down the various elements and their roles in providing personalized content.
The Main Components of Twitter’s Recommendation Algorithm is
- Feature: simclusters-ann
The simclusters-ann component is responsible for community detection and sparse embeddings into those communities. It helps identify groups of users with similar interests, allowing Twitter to recommend tweets and users that fit within a user’s preferences.
TwHIN, or Dense Knowledge Graph Embeddings, creates dense representations of users and tweets, enabling the algorithm to understand relationships and connections better.
- Trust and Safety Models
These models are designed to detect and filter out NSFW or abusive content, ensuring a safer and more enjoyable experience for users.
The real-graph component predicts the likelihood of a user interacting with another user, helping the algorithm to understand potential connections and recommend relevant content.
Tweepcred is a Page-Rank algorithm that calculates the reputation of Twitter users. The algorithm considers this reputation score when recommending users and content.
The recos-injector is a streaming event processor responsible for building input streams for GraphJet-based services, which play a significant role in Twitter’s recommendation engine.
- Graph Feature Service
This service provides graph features for a directed pair of users, such as how many of User A’s followers liked tweets from User B.
- Candidate Source: search-index
The search-index component is responsible for finding and ranking in-network tweets, making up approximately 50% of tweets in the recommendation engine.
The CR-mixer acts as a coordination layer for fetching out-of-network tweet candidates from underlying compute services.
- User-Tweet-Entity-Graph (UTEG)
UTEG maintains an in-memory user-to-tweet interaction graph, finding candidates based on graph traversals. This component is built on the GraphJet framework, which includes other features and candidate sources.
- Follow Recommendation Service (FRS)
FRS offers users recommendations for accounts to follow and tweets from those accounts, ensuring a personalized experience.
Twitter’s recommendation algorithm uses two ranking models, light-ranker and heavy-ranker. The light-ranker model is used by the search index to rank tweets, while the heavy-ranker is a neural network responsible for ranking candidate tweets after candidate sourcing.
- Tweet Mixing and Filtering
The home-mixer, built on product-mixer, is the main service used to construct and serve the Home Timeline. Visibility-filters ensure legal compliance, product quality, user trust, and revenue protection through hard-filtering, visible product treatments, and coarse-grained downranking.
- Software Framework
Twitter’s recommendation algorithm is built on various software frameworks, including Navi (a high-performance machine learning model serving written in Rust), product-mixer, and the legacy machine learning framework, TWML, built on TensorFlow v1.
Check out https://github.com/twitter/the-algorithm for more information and to clone or fork the source code.
If you are interested in building your own algorithm for your company please check out slashdev.io with an excellent selection of high quality, english speaking engineers for as low as $28/h.