Inside the Code: The Exact Weights Shaping the X "For You" Feed

You are fighting an invisible scale. You draft a technical breakdown, hit publish, and watch it stall at a few hundred impressions. Your competitor posts a low-effort observation, and it scales to hundreds of thousands.

That gap isn’t mysterious. It’s arithmetic. When X open-sourced its recommendation engine in March 2023 — the repository is called the-algorithm — it published the actual scoring code behind the “For You” timeline, including the HeavyRanker model directory that turns raw engagement predictions into a final rank score. Some of what follows is a direct read of committed parameter files. Some of it is the community’s reverse-engineering of those files, since X has updated weights privately since the initial dump and never republished a full changelog. I’m marking which is which.

The Heavy Ranker: what’s actually documented

The heavy ranker is a gradient-boosted decision tree that predicts the probability of a handful of engagement types, then multiplies each probability by a fixed weight before summing them into a final score. The weight table itself shipped in the initial commit, and outlets that pulled the raw file — including Mashable’s line-by-line breakdown and Fast Company’s analysis — reported the same numbers:

  • Author replied to by the original poster: roughly 75x the weight of a baseline like — the single richest signal in the model, per Mashable.
  • Reply generally engaged: around 13.5x, per the same breakdown.
  • Retweet: roughly 20x.
  • Like: the baseline, weighted at 1x or 0.5x depending on which surface generated it.
  • Profile click followed by a like or reply within the session: roughly 12x, treated as a “high-intent” signal in the code comments.

None of these numbers are static. X’s engineers have said publicly the live weights get retuned constantly, and the committed repo is a snapshot, not a live mirror. Treat the ratios above as directionally accurate — replies beat retweets beat likes, by a wide and repeatable margin — not as numbers you can back out to the decimal today.

If your posts are broadcast announcements that don’t invite replies, you’re leaving the single largest multiplier in the system untouched.

The link penalty: real, but not precisely quantified in the open code

Growth marketers have argued for years about whether links in posts hurt reach. The open-source drop didn’t hand over an explicit “URL penalty coefficient” — no file states a number — but the candidate-generation and filtering stages do treat posts with outbound links differently, and Twitter’s own engineering blog post accompanying the release acknowledged the system optimizes heavily for time-on-platform, which structurally disadvantages exit-intent content. Independent testing groups, including the ones cited in Social Media Today’s post-launch analysis, have run controlled A/B posts for over a year and consistently found link posts underperform link-free posts by wide margins in impressions-per-follower — this is community consensus built on repeated testing, not a line of Scala you can point to. The “link in the replies” workaround persists because replies are scored as separate candidate objects in the pipeline, and nothing in the released code shows the parent post’s link penalty propagating downward to child replies.

Author diversity and the reputation score

X organizes users into interest clusters using a graph technique called SimClusters, and the “For You” candidate pool draws heavily from your cluster neighborhood before the heavy ranker ever runs. Layered on top is an author diversity filter, confirmed in the repo’s home-mixer product code, that suppresses back-to-back posts from the same account in a single user’s feed — the exact suppression curve isn’t published as a clean number, but the mechanism itself is real and documented in the source.

The “reputation score” reported widely after launch — covered by The Verge — factors in follower-to-following ratio, block and report rates, and blue-checkmark status. The negative weight on blocks and reports is real and disproportionately large relative to positive signals per the released model documentation, though X has not published the exact multiplier publicly. The Premium subscriber boost in candidate generation is also documented in the release notes, not a rumor — Twitter’s own blog confirmed paying subscribers get pulled into a larger initial candidate pool.

How to engineer around what’s actually confirmed

  • Chase the reply loop, not the like. The 75x author-reply multiplier is the best-documented lever in the whole system. Write hooks that require clarification or invite disagreement.
  • Assume the link tax is real even without a public coefficient. Native media plus a follow-up reply with your URL remains the safest structure until X publishes otherwise.
  • Space your posts. The diversity filter is confirmed in code even if its decay curve isn’t. Six hours between high-effort posts is a reasonable buffer based on community testing, not gospel.

The system isn’t sentient. It’s a set of weights, some published, some inferred, all pointed at maximizing session time. Feed it what’s actually confirmed to work, and it distributes your content for you.


This article was generated with the help of AI.

This post was generated by Omniposter AI. Start your free trial.