You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Twitter's Recommendation Algorithm is a set of services and jobs that are responsible for serving feeds of Tweets and other content across all Twitter product surfaces (e.g. For You Timeline, Search, Explore, Notifications). For an introduction to how the algorithm works, please refer to our [engineering blog](https://blog.twitter.com/engineering/en_us/topics/open-source/2023/twitter-recommendation-algorithm).
3
+
X's Recommendation Algorithm is a set of services and jobs that are responsible for serving feeds of posts and other content across all X product surfaces (e.g. For You Timeline, Search, Explore, Notifications). For an introduction to how the algorithm works, please refer to our [engineering blog](https://blog.x.com/engineering/en_us/topics/open-source/2023/twitter-recommendation-algorithm).
4
4
5
5
## Architecture
6
6
7
-
Product surfaces at Twitter are built on a shared set of data, models, and software frameworks. The shared components included in this repository are listed below:
7
+
Product surfaces at X are built on a shared set of data, models, and software frameworks. The shared components included in this repository are listed below:
8
8
9
9
| Type | Component | Description |
10
10
|------------|------------|------------|
11
-
| Data |[tweetypie](tweetypie/server/README.md)| Core Tweet service that handles the reading and writing of Tweet data. |
12
-
||[unified-user-actions](unified_user_actions/README.md)| Real-time stream of user actions on Twitter. |
11
+
| Data |[tweetypie](tweetypie/server/README.md)| Core service that handles the reading and writing of post data. |
12
+
||[unified-user-actions](unified_user_actions/README.md)| Real-time stream of user actions on X. |
13
13
||[user-signal-service](user-signal-service/README.md)| Centralized platform to retrieve explicit (e.g. likes, replies) and implicit (e.g. profile visits, tweet clicks) user signals. |
14
14
| Model |[SimClusters](src/scala/com/twitter/simclusters_v2/README.md)| Community detection and sparse embeddings into those communities. |
15
-
||[TwHIN](https://github.com/twitter/the-algorithm-ml/blob/main/projects/twhin/README.md)| Dense knowledge graph embeddings for Users and Tweets. |
15
+
||[TwHIN](https://github.com/twitter/the-algorithm-ml/blob/main/projects/twhin/README.md)| Dense knowledge graph embeddings for Users and Posts. |
16
16
||[trust-and-safety-models](trust_and_safety_models/README.md)| Models for detecting NSFW or abusive content. |
17
-
||[real-graph](src/scala/com/twitter/interaction_graph/README.md)| Model to predict the likelihood of a Twitter User interacting with another User. |
18
-
||[tweepcred](src/scala/com/twitter/graph/batch/job/tweepcred/README)| Page-Rank algorithm for calculating Twitter User reputation. |
17
+
||[real-graph](src/scala/com/twitter/interaction_graph/README.md)| Model to predict the likelihood of an X User interacting with another User. |
18
+
||[tweepcred](src/scala/com/twitter/graph/batch/job/tweepcred/README)| Page-Rank algorithm for calculating X User reputation. |
19
19
||[recos-injector](recos-injector/README.md)| Streaming event processor for building input streams for [GraphJet](https://github.com/twitter/GraphJet) based services. |
20
-
||[graph-feature-service](graph-feature-service/README.md)| Serves graph features for a directed pair of Users (e.g. how many of User A's following liked Tweets from User B). |
21
-
||[topic-social-proof](topic-social-proof/README.md)| Identifies topics related to individual Tweets. |
22
-
||[representation-scorer](representation-scorer/README.md)| Compute scores between pairs of entities (Users, Tweets, etc.) using embedding similarity. |
20
+
||[graph-feature-service](graph-feature-service/README.md)| Serves graph features for a directed pair of users (e.g. how many of User A's following liked posts from User B). |
21
+
||[topic-social-proof](topic-social-proof/README.md)| Identifies topics related to individual posts. |
22
+
||[representation-scorer](representation-scorer/README.md)| Compute scores between pairs of entities (Users, Posts, etc.) using embedding similarity. |
23
23
| Software framework |[navi](navi/README.md)| High performance, machine learning model serving written in Rust. |
24
24
||[product-mixer](product-mixer/README.md)| Software framework for building feeds of content. |
25
25
||[timelines-aggregation-framework](timelines/data_processing/ml_util/aggregation_framework/README.md)| Framework for generating aggregate features in batch or real time. |
@@ -38,24 +38,24 @@ The core components of the For You Timeline included in this repository are list
38
38
39
39
| Type | Component | Description |
40
40
|------------|------------|------------|
41
-
| Candidate Source |[search-index](src/java/com/twitter/search/README.md)| Find and rank In-Network Tweets. ~50% of Tweets come from this candidate source. |
42
-
||[cr-mixer](cr-mixer/README.md)| Coordination layer for fetching Out-of-Network tweet candidates from underlying compute services. |
43
-
||[user-tweet-entity-graph](src/scala/com/twitter/recos/user_tweet_entity_graph/README.md) (UTEG)| Maintains an in memory User to Tweet interaction graph, and finds candidates based on traversals of this graph. This is built on the [GraphJet](https://github.com/twitter/GraphJet) framework. Several other GraphJet based features and candidate sources are located [here](src/scala/com/twitter/recos). |
44
-
||[follow-recommendation-service](follow-recommendations-service/README.md) (FRS)| Provides Users with recommendations for accounts to follow, and Tweets from those accounts. |
45
-
| Ranking |[light-ranker](src/python/twitter/deepbird/projects/timelines/scripts/models/earlybird/README.md)| Light Ranker model used by search index (Earlybird) to rank Tweets. |
46
-
||[heavy-ranker](https://github.com/twitter/the-algorithm-ml/blob/main/projects/home/recap/README.md)| Neural network for ranking candidate tweets. One of the main signals used to select timeline Tweets post candidate sourcing. |
47
-
|Tweet mixing & filtering |[home-mixer](home-mixer/README.md)| Main service used to construct and serve the Home Timeline. Built on [product-mixer](product-mixer/README.md). |
48
-
||[visibility-filters](visibilitylib/README.md)| Responsible for filtering Twitter content to support legal compliance, improve product quality, increase user trust, protect revenue through the use of hard-filtering, visible product treatments, and coarse-grained downranking. |
49
-
||[timelineranker](timelineranker/README.md)| Legacy service which provides relevance-scored tweets from the Earlybird Search Index and UTEG service. |
41
+
| Candidate Source |[search-index](src/java/com/twitter/search/README.md)| Find and rank In-Network posts. ~50% of posts come from this candidate source. |
42
+
||[tweet-mixer](tweet-mixer)| Coordination layer for fetching Out-of-Network tweet candidates from underlying compute services. |
43
+
||[user-tweet-entity-graph](src/scala/com/twitter/recos/user_tweet_entity_graph/README.md) (UTEG)| Maintains an in memory User to Post interaction graph, and finds candidates based on traversals of this graph. This is built on the [GraphJet](https://github.com/twitter/GraphJet) framework. Several other GraphJet based features and candidate sources are located [here](src/scala/com/twitter/recos). |
44
+
||[follow-recommendation-service](follow-recommendations-service/README.md) (FRS)| Provides Users with recommendations for accounts to follow, and posts from those accounts. |
45
+
| Ranking |[light-ranker](src/python/twitter/deepbird/projects/timelines/scripts/models/earlybird/README.md)| Light Ranker model used by search index (Earlybird) to rank posts. |
46
+
||[heavy-ranker](https://github.com/twitter/the-algorithm-ml/blob/main/projects/home/recap/README.md)| Neural network for ranking candidate posts. One of the main signals used to select timeline posts post candidate sourcing. |
47
+
|Post mixing & filtering |[home-mixer](home-mixer/README.md)| Main service used to construct and serve the Home Timeline. Built on [product-mixer](product-mixer/README.md). |
48
+
||[visibility-filters](visibilitylib/README.md)| Responsible for filtering X content to support legal compliance, improve product quality, increase user trust, protect revenue through the use of hard-filtering, visible product treatments, and coarse-grained downranking. |
49
+
||[timelineranker](timelineranker/README.md)| Legacy service which provides relevance-scored posts from the Earlybird Search Index and UTEG service. |
50
50
51
51
### Recommended Notifications
52
52
53
53
The core components of Recommended Notifications included in this repository are listed below:
54
54
55
55
| Type | Component | Description |
56
56
|------------|------------|------------|
57
-
| Service | [pushservice](pushservice/README.md) | Main recommendation service at Twitter used to surface recommendations to our users via notifications.
58
-
| Ranking |[pushservice-light-ranker](pushservice/src/main/python/models/light_ranking/README.md)| Light Ranker model used by pushservice to rank Tweets. Bridges candidate generation and heavy ranking by pre-selecting highly-relevant candidates from the initial huge candidate pool. |
57
+
| Service | [pushservice](pushservice/README.md) | Main recommendation service at X used to surface recommendations to our users via notifications.
58
+
| Ranking |[pushservice-light-ranker](pushservice/src/main/python/models/light_ranking/README.md)| Light Ranker model used by pushservice to rank posts. Bridges candidate generation and heavy ranking by pre-selecting highly-relevant candidates from the initial huge candidate pool. |
59
59
||[pushservice-heavy-ranker](pushservice/src/main/python/models/heavy_ranking/README.md)| Multi-task learning model to predict the probabilities that the target users will open and engage with the sent notifications. |
60
60
61
61
## Build and test code
@@ -64,6 +64,6 @@ We include Bazel BUILD files for most components, but not a top-level BUILD or W
64
64
65
65
## Contributing
66
66
67
-
We invite the community to submit GitHub issues and pull requests for suggestions on improving the recommendation algorithm. We are working on tools to manage these suggestions and sync changes to our internal repository. Any security concerns or issues should be routed to our official [bug bounty program](https://hackerone.com/twitter) through HackerOne. We hope to benefit from the collective intelligence and expertise of the global community in helping us identify issues and suggest improvements, ultimately leading to a better Twitter.
67
+
We invite the community to submit GitHub issues and pull requests for suggestions on improving the recommendation algorithm. We are working on tools to manage these suggestions and sync changes to our internal repository. Any security concerns or issues should be routed to our official [bug bounty program](https://hackerone.com/x) through HackerOne. We hope to benefit from the collective intelligence and expertise of the global community in helping us identify issues and suggest improvements, ultimately leading to a better X.
68
68
69
-
Read our blog on the open source initiative [here](https://blog.twitter.com/en_us/topics/company/2023/a-new-era-of-transparency-for-twitter).
69
+
Read our blog on the open source initiative [here](https://blog.x.com/en_us/topics/company/2023/a-new-era-of-transparency-for-twitter).
0 commit comments