hourden
Sign in Create accountSign up
BuyInstagramTikTokYouTubeFacebookX (Twitter)TwitchTelegramSpotifySoundCloudDiscordRedditLinkedInThreadsPinterestSnapchatKickRumbleAll services

How Does the X Algorithm Work?

Every other feed is a black box people guess about. X put its recommendation code on GitHub, twice, so the question can be answered by reading it rather than by rumor.

Updated September 2026

How does the X algorithm work? For the For You tab, in four steps. It gathers a pool of candidate posts, some from accounts you follow and some from accounts you don't. It filters out posts you shouldn't see, such as duplicates, posts you have already seen, and posts from accounts you muted or blocked. It scores each remaining post by predicting how likely you are to do a series of things with it, from liking and replying to muting or reporting the author. Then it combines those predictions into one score, adjusts for variety, and fills your feed from the top.

That description is not a guess. X publishes the code behind the For You feed on GitHub. The current version, released in January 2026 under the xai-org organization, replaced the system Twitter first published in 2023 with a ranking model built on the same transformer architecture as xAI's Grok, and X said it would keep publishing updates on a regular cycle.

The part most guides skip

This is what makes X different from every other network people ask about. When someone explains the Instagram or TikTok algorithm, they are working from the platform's blog posts, from experiments, and from inference. When someone explains X, they can link to a repository and point at the stage that does the thing they are describing.

That does not make the feed fully transparent. The published code shows the architecture and how the pieces fit together, but the trained model itself learns from engagement data that is not public, so reading the code tells you what the system is trying to predict, not exactly what it will predict for a given post. It is still far more than any other large network offers.

And it settles a few recurring arguments. Yes, X has an algorithm; For You is a ranked feed. Yes, it is open source, in the sense that the recommendation pipeline is published. And yes, it changed: the 2026 release is a different system from the one published in 2023. Understanding which parts the ranker can see also clarifies what a public number like Twitter views does and does not do, which comes up further down.

Is the X algorithm open source?

The recommendation pipeline is. Twitter first published its recommendation code in March 2023, with a long explanation of how the For You timeline was assembled at the time. In January 2026, X published a rebuilt version under the xai-org organization on GitHub, described by X's engineering account as powered by the same transformer architecture as the Grok model.

What is published is the machinery: the services that fetch candidate posts, the filters, the scoring logic, and the model architecture. What is not published is the data the model was trained on and the private signals about individual users. So the code tells you how decisions are structured, and the trained model fills in the specifics.

How does the X algorithm choose which posts to consider?

It starts by gathering candidates from two directions.

In-network posts come from accounts you follow. The 2026 code describes a component called Thunder that keeps recent posts from followed accounts in memory so they can be fetched quickly.

Out-of-network posts come from accounts you don't follow. For these, the system represents you and each post as vectors and looks for posts that sit close to you, a retrieval approach meant to find things people with similar interests engaged with. This is how a post from an account you have never heard of ends up in your feed, and it is why a post can collect far more impressions than its author has followers. What an impression is on X covers how those displays are counted.

The candidates are then enriched with the information the ranker needs, such as who wrote each post and what kind of media it contains, and passed through a first round of filters.

How does the X algorithm rank posts?

By predicting what you will do. The ranking model looks at each candidate post alongside your own recent activity and outputs a probability for a list of actions: liking, replying, reposting, quoting, sharing, clicking into the post, clicking the author's profile, opening a link, expanding media, watching a video, spending time on the post, and following the author. It also predicts negative actions: marking the post not interested, muting the author, blocking them, and reporting the post.

Each predicted probability is multiplied by a weight, positive for the actions X wants and negative for the ones it doesn't, and the results are added into one score. The repository is explicit that the weights apply to the predicted probabilities, not to the raw counts a post has already collected. A post with thousands of likes does not automatically outrank one with a few; what matters is how likely you in particular are to act on it.

That is the main shift from the 2023 system, which combined a neural ranker with a large set of hand-built features and rules. According to X, the 2026 version removed the hand-engineered features and most of the heuristics, and leaves more of the judgment to the model.

What adjusts the score after ranking?

A few published adjustments. An author diversity step reduces the score of each additional post from the same author, so one prolific account cannot fill your feed. Out-of-network posts are multiplied by a factor below one, which means a post from someone you don't follow has to score higher to beat a post from someone you do. The code also describes an adjustment that gives new authors some room. After selection, a final round of filters runs before the feed is assembled.

What does the X algorithm filter out?

The filters are listed by name in the repository, which makes this the easiest part to read. Before scoring, they remove duplicate posts, posts that are too old, your own posts, posts you have already seen, posts containing keywords you muted, posts from accounts you blocked or muted, and posts from subscription-only content you don't have access to, among others.

This is also where the practical advice lives. If your For You feed has filled up with a subject you don't want, the fastest lever is not waiting for the model to notice. It is using the controls the filters and the negative predictions respond to: muting words, muting accounts, and marking posts not interested. How to reset the X algorithm goes through those controls in order.

Did X change its algorithm?

Yes, substantially, and the change is documented. The system Twitter published in 2023 was built from many separate parts: graph-based signals about who interacts with whom, community clusters, a neural network that scored candidates, and a layer of hand-written rules and boosts on top. The 2026 release replaced that with a smaller set of services around one ranking model built on a Grok-style transformer.

X also committed to updating the public repository on a regular schedule, so the code people read today may differ from what they read a few months ago. Any article quoting a specific number from the ranking code, including this one's descriptions, should be checked against the current repository before you rely on it.

One question that comes up in almost every discussion of the change is whether paying for X Premium affects ranking. The 2023 code contained explicit multipliers for verified authors; the answer for the current system is more nuanced, and does X Premium boost your reach goes through what is stated and what is not.

What the algorithm means for your own posts

Read the list of predicted actions and the strategy follows. The model rewards posts people are likely to reply to, stay on, and click into, and it penalizes posts people are likely to mute or report. Replies carry real weight in how a post travels, which is why posts that open a conversation tend to spread further than posts that only collect a quick like. How to get followers on Twitter follows that chain from impression to profile visit to follow.

It also explains where purchased numbers fit and where they don't. The ranker predicts what each viewer will do; it does not simply sort posts by the counts printed under them. So a larger public view count does not buy a place in anyone's For You feed. What Twitter views change is the first impression of a person who has already been shown the post and reads the number before deciding whether to stop. That is a real job, and it is a different job from ranking. The same goes for visible likes, which is the job Twitter likes do on a post: they shape how a reader reads the post, not the probabilities the model computes for them.

Hashtags are a smaller example of the same logic. The ranker already works out what a post is about and who it suits, so the job hashtags used to do has largely moved inside the model. Do hashtags still work on X covers that one in detail.

Questions people ask about the X algorithm

Does X have an algorithm?

Yes. The For You tab is a ranked feed built by a recommendation system. The Following tab shows posts from accounts you follow, and it is the place to go if you want less ranking.

Is the X algorithm open source?

The recommendation pipeline is published on GitHub. Twitter released a first version in 2023, and X released a rebuilt, Grok-based version in January 2026. The trained model's data is not public.

What does the X algorithm prioritize?

Posts you are predicted to engage with: reply to, like, repost, click into, or spend time on. Posts you are predicted to mute, block or report are pushed down.

Did X change its algorithm in 2026?

Yes. The 2026 release replaced the 2023 system of many hand-built features with a single transformer-based ranking model, and X said it would update the public code regularly.

Does the X algorithm favor posts from people I follow?

Somewhat. The published code applies a discount to out-of-network posts, so a post from an account you don't follow needs a higher score to appear. Many still do.

Do more views make X show a post to more people?

Not by themselves. The ranker predicts what each viewer will do with a post rather than sorting by the counts already on it. Replies and time spent matter more.

Keep reading