Approximately 50% of X's For You Timeline posts come from the in-network search index — posts from accounts the user follows.
Source: X (formerly Twitter), X Recommendation Algorithm — GitHub README (2023)
X's For You Timeline mixes roughly 50% in-network posts from accounts you follow with 50% out-of-network content discovered via graph and embedding models. Posts are scored by a heavy neural network ranker, filtered through a visibility layer that enforces legal compliance and quality standards, and ranked using explicit signals like likes and replies alongside implicit signals like profile visits and tweet clicks.
In March 2023, X (formerly Twitter) published the source code for its recommendation algorithm on GitHub. The claims below come directly from that repository's README and component documentation — the first time X made the mechanics of its timeline public.
Approximately 50% of X's For You Timeline posts come from the in-network search index — posts from accounts the user follows.
X (formerly Twitter), 2023X uses a heavy neural network ranker as one of the main signals for selecting which posts appear in the For You Timeline after candidate sourcing.
X (formerly Twitter), 2023X collects both explicit user signals — likes and replies — and implicit signals — profile visits and tweet clicks — to rank content in the timeline.
X (formerly Twitter), 2023X uses Real-Graph — a model that predicts the likelihood of a specific user interacting with another specific user — as a relationship-strength ranking signal.
X (formerly Twitter), 2023X's visibility filter applies hard-filtering, visible product treatments, and coarse-grained downranking to support legal compliance, improve product quality, increase user trust, and protect revenue.
X (formerly Twitter), 2023Approximately 50% of X's For You Timeline posts come from the in-network search index — posts from accounts the user follows.
Source: X (formerly Twitter), X Recommendation Algorithm — GitHub README (2023)
The other approximately 50% of For You posts comes from out-of-network candidate sources — posts from accounts you do not follow, discovered via graph traversal and embedding models.
Source: X (formerly Twitter), X Recommendation Algorithm — GitHub README (2023)
X uses a heavy neural network ranker as one of the main signals for selecting which posts appear in the For You Timeline after candidate sourcing.
Source: X (formerly Twitter), X Recommendation Algorithm — GitHub README (2023)
X collects both explicit user signals — likes and replies — and implicit signals — profile visits and tweet clicks — to rank content in the timeline.
Source: X (formerly Twitter), X Recommendation Algorithm — GitHub README (2023)
X uses Real-Graph — a model that predicts the likelihood of a specific user interacting with another specific user — as a relationship-strength ranking signal.
Source: X (formerly Twitter), X Recommendation Algorithm — GitHub README (2023)
X calculates user reputation using TweepCred, a PageRank-derived algorithm that assigns a reputation score to each X user.
Source: X (formerly Twitter), X Recommendation Algorithm — GitHub README (2023)
X uses graph features between user pairs — such as how many of User A's following liked posts from User B — as a ranking signal for content discovery.
Source: X (formerly Twitter), X Recommendation Algorithm — GitHub README (2023)
X's visibility filter applies hard-filtering, visible product treatments, and coarse-grained downranking to support legal compliance, improve product quality, increase user trust, and protect revenue.
Source: X (formerly Twitter), X Recommendation Algorithm — GitHub README (2023)
Approximately 50%. X's open-source README states the search-index candidate source (In-Network posts) accounts for ~50% of posts. The other ~50% comes from out-of-network sources such as graph traversals and embedding models.
X uses a two-stage ranking system: a light ranker quickly narrows the candidate pool, then a heavy neural network ranker scores the remaining candidates. The heavy ranker is described as "one of the main signals used to select timeline posts."
Both explicit signals — likes, replies, retweets — and implicit signals — profile visits, tweet clicks — are collected through a User Signal Service and fed into ranking models.
X uses TweepCred, a PageRank-derived algorithm, to calculate each user's reputation score. This reputation influences how much weight their posts and interactions carry in the recommendation system.
The visibility filter handles hard-filtering, visible product treatments, and coarse-grained downranking to support legal compliance, improve product quality, increase user trust, and protect revenue.