Algorithms

How the X algorithm works, read from the code

X publishes the code behind its For You feed. That lets us skip the rumors and read the weights directly. Here is what the code says today, what changed since 2023, and what it means for your posts.

Updated

How the For You feed is built

X's repository, xai-org/x-algorithm on GitHub, holds the code for the For You feed. It mixes two kinds of posts:

  • In network: recent posts from accounts you follow, held in a store the code calls Thunder.
  • Out of network: posts from accounts you do not follow, found by a retrieval model called Phoenix and by a cluster system called SimClusters.

A service called home mixer runs the steps in order. It gathers candidates, filters out duplicates, old posts, your own posts and posts you have seen, scores what is left, and then picks the final order.

The scoring step is the one people care about. A transformer model predicts the chance you will take each action on each post. Then the code adds them up: each chance times its weight. The README puts it plainly: Final Score = the sum of weight times P(action).

The current weights

These are the default weights in home-mixer/params/param.rs, read on 30 September 2026. That file was last changed the same day, so they move often.

Predicted actionWeight
Share by copying the link20.0
Reply5.0
Quote5.0
Share by direct message5.0
Follow the author4.0
Share2.0
Repost1.0
Like0.5
Click0.3
Open a link0.2
Dwell0.05
Profile click0.0
Not dwelled (scrolled past)minus 0.02
Block the authorminus 31.2
Not interestedminus 47.52
Mute the authorminus 58.8
Reportminus 234.0
Selected weights from home-mixer/params/param.rs, checked 30 Sep 2026.

The file also sets a boost of 15.0 for mutual follows. X's own notes in the repository explain it: when you and an author follow each other, the weight on your predicted reply to their original posts goes up. X tested values from 5 to 20 in July 2026 and settled on 15 on 24 July.

How not to read these numbers

The code carries its own warning. The weights multiply the predicted chance of an action, not a count of actions. So it is wrong to say one report cancels hundreds of likes. The comment in the file says so directly, and adds that a report is more than 1,000 times rarer than a like, which is why its weight is so large. Reports from a group of bad actors mostly affect the feeds of people similar to them, not everyone.

What happens after scoring

The README lists three changes made after the score is computed:

  • Author diversity: each post after an author's first one in your feed is multiplied by a shrinking factor. Posting ten times in an hour does not buy ten slots.
  • Out of network discount: posts from accounts you do not follow are multiplied by a factor below 1, and so are replies and reposts from accounts you do follow. Strangers face a higher bar.
  • New author boost: authors with few impressions get lifted toward a target position, which gives small accounts a way in.

What changed since the 2023 release

Twitter first published ranking code in 2023, in a repository called the-algorithm-ml. Many posts about "the algorithm" still quote those numbers. They are out of date.

Action2023 weightCurrent weight
Like0.50.5
Repost1.01.0
Reply13.55.0
Reply the author engaged with75.0Not in the current list
Good profile click12.0Profile click 0.0
Reportminus 369.0minus 234.0

The big shift: the current code rewards sharing, especially copying the link to send elsewhere, far more than the 2023 code did. Replies still matter, but less than they did. If a guide tells you a reply is worth 75 likes, check its date.

What to do with this

  1. Write something worth sending to a friend. Copy link and direct message shares carry the heaviest positive weights. A clear, useful line that someone would paste into a team chat is the target.
  2. Ask for replies you actually want. A specific question earns real replies. Reply bait earns mutes, and the mute weight is more than 100 times the like weight.
  3. Give people a reason to follow. Following the author is weighted 4.0. Concrete detail, numbers and tools you used make a stranger want more.
  4. Space your posts out. The author diversity step shrinks each extra post from you in the same feed.
  5. Build real mutual follows. When you and a reader follow each other, the code raises the weight on their predicted reply to your original posts.

One more thing from X Help: X Premium includes "reply prioritization", with larger prioritization on higher tiers. So replies from Premium accounts may sit higher in a conversation.

Our X growth playbook turns these weights into a posting checklist. This page is the deeper reference and is kept current with the code.

What we could not verify

Some popular claims do not show up in the parts of the code we read. We did not find a fixed penalty for links in the weights file. Opening a link is weighted 0.2, a small positive. That does not prove there is no link effect elsewhere in the system. It means no one should quote you a number for it.

Time of day is also not a weight. It matters only because it changes who is online when a post is fresh. See the best time to post on X for what the studies found.

Questions

Is the X algorithm open source?

Yes. X publishes the code for its For You feed at github.com/xai-org/x-algorithm, including the default ranking weights and the pipeline that applies them. X says the defaults are synced to production values.

What does the X algorithm value most?

In the current code, sharing a post by copying its link has the highest positive weight at 20.0. Replies, quotes and direct message shares are 5.0 each. A like is 0.5.

Does one report cancel hundreds of likes?

No. The code itself says this is a misreading. Weights multiply the predicted chance of an action, and reports are more than 1,000 times rarer than likes, which is why their weight is large.

Are the 2023 Twitter algorithm weights still true?

No. The 2023 release weighted a reply at 13.5 and a reply the author engaged with at 75. The current code weights a reply at 5.0 and shares far higher.

How often does X update the algorithm code?

Often. The weights file we read was last changed on 30 September 2026, and the repository had commits on most days that week. Check the date on any weight you read.

Sources

  1. X: open source For You algorithm (xai-org/x-algorithm) · checked 30 Sept 2026
  2. X: ranking weights in home-mixer/params/param.rs · checked 30 Sept 2026
  3. X: bidirectional follow boost change notes (July 2026) · checked 30 Sept 2026
  4. Twitter: 2023 heavy ranker weights (the-algorithm-ml) · checked 30 Sept 2026
  5. X Help Center: About X Premium · checked 30 Sept 2026

Your next post, in your voice, on both networks.

7 days free. No card. Your drafts are kept.