Platform Tips

X Algorithm Is Open Source: What The Weights Actually Reveal (2026)

Jane Ivanova

CEO, Publora

· Updated

X Algorithm Is Open Source: What The Weights Actually Reveal (2026)

TL;DR

X (formerly Twitter) is the only major social platform that has open-sourced its recommendation algorithm. The repo went public in March 2023 and remains the most detailed public document of how a fee

X (formerly Twitter) is the only major social platform that has open-sourced its recommendation algorithm. The repo went public in March 2023 and remains the most detailed public document of how a feed ranking system actually works. In January 2026, xAI released a Grok-powered version that adds a transformer-based content-understanding layer on top — but the underlying engagement weights are still the public reference for how the platform values different signals.

This article walks through the actual weights, the filters that kill posts before they're even scored, and what those numbers mean for what you publish. Skip the speculation; the source code answers most of the questions creators have been guessing at for years.

TL;DR — In Five Bullets

  1. The repo lives at github.com/twitter/the-algorithm (Scala) and twitter/the-algorithm-ml (Python). Public since March 2023.
  2. The published weights (April 2023): like 0.5, retweet 1.0, conversation click with 2+ minutes 10.0, conversation click 11.0, profile click 12.0, reply 13.5, reply the author engages with 75.0 (Heavy Ranker README).
  3. Four filters kill posts before scoring: author diversity (3-per-window cap), negative feedback recency (30 days), sole-link posts, out-of-network limits.
  4. January 2026 Grok update adds transformer-based content understanding — the fundamental weights remain public, but a new layer applies LLM context.
  5. What to optimize for: replies that earn a reply from you (the 150x signal). Then plain replies (13.5) and profile clicks (12.0). Likes are the cheapest and least informative.

What "Open Source" Actually Means Here

The term gets thrown around carelessly. Here's what's actually public and what isn't.

Public:

  • Heavy Ranker scoring logic — the model that scores candidate tweets for a user's For You feed.
  • Candidate generation — how the platform pulls the initial pool of ~1,500 tweets per request before ranking.
  • SimClusters embeddings — community-based clustering used to predict topical interest.
  • Engagement weight constants — the multipliers we'll cover in detail below.
  • Negative feedback handling — how blocks, mutes, and "show less of this" affect future scoring.

Not public (or only partially):

  • Real-time spam and abuse classifiers (security-sensitive, kept private).
  • Ad targeting and pricing models.
  • Some safety classifiers around hate speech and graphic content.
  • The exact January 2026 Grok integration logic — the transformer-based content understanding layer is not in the public repo as of the article's publication.

The release in March 2023 was unusual because no other major platform has come close. Meta has published high-level papers about Instagram and Facebook ranking, but not the actual production code. TikTok has shared nothing of substance. LinkedIn published a research paper about its 360Brew foundation model, but again — the deployed code is private.

The Weights, From Lowest to Highest

The Heavy Ranker scores each candidate tweet on the predicted probability of different engagement actions, multiplied by the weights published in the April 2023 Heavy Ranker README. The result is a single score, and the top-ranked tweets fill the For You feed.

  • Like — 0.5 (the baseline). The cheapest interaction. Public, low-friction, often performed without reading. The algorithm reads it as the weakest signal of interest.
  • Retweet — 1.0. The user co-signed your post to their network. The published weight is only twice a like's, so a retweet helps mainly by showing the post to the retweeter's followers, not through its ranking score.
  • Conversation click with 2+ minutes — 10.0. The user opened the conversation and stayed at least 2 minutes. Bookmarks are not among the weighted actions in the published list; this long-read click is the closest signal that someone found the post worth their time.
  • Conversation click — 11.0. The user clicked into the conversation and replied to or liked a post there. They didn't just scroll past. Strong signal of genuine interest.
  • Profile click — 12.0. The post was good enough that the user opened the author's profile and liked or replied to a post there. This is the start of a follow funnel.
  • Reply — 13.5. The user invested in writing back. Replies require thought and exposure (the user's name appears next to the reply). High-quality engagement.
  • Reply the author engages with — 75.0. The big one: 150 times a like's weight. The user wrote a reply, the post author engaged with it, and a real conversation started. This is the strongest positive signal in the ranker, more than five times the weight of a plain reply (75.0 vs 13.5).

There are also negative weights. Blocks, mutes, and "show less of this" actions on a post drag the score down by significant multipliers (the exact values vary by signal). Negative feedback within the last 30 days also affects future scoring on everything that account publishes, not just the original post.

The Filters That Kill Posts Before Scoring

Here's the part most creators miss. Before any of these weights apply, your post has to survive a series of pre-ranking filters. Posts that fail the filters never get scored, no matter how good they are.

Four filters that kill X posts before they're scored — posting too often (author diversity), negative feedback recency, sole-link posts with no context, out-of-network reach limits

1. Author Diversity (~3 Posts per Feed Window)

The candidate-generation step caps how often posts from the same author can appear in a feed. The cap is roughly 3 posts per feed window for most users. If you post 10 times in an hour, most of those posts will never be scored — they were filtered out at candidate generation.

Implication: high-volume posting hurts more than it helps. 3-5 well-considered posts a day outperform 15 rushed ones, because most of the rushed ones never reach the ranker.

2. Negative Feedback Recency (30-Day Decay)

If users have blocked, muted, or selected "show less of this" on your posts in the last 30 days, the algorithm down-weights everything you publish — not just the post that received the negative feedback. This decays over time but stays relevant for about a month.

Implication: one or two posts that earn mass negative feedback can sink your reach for weeks. Polarizing for engagement is a high-variance strategy with downside that lingers.

3. Sole-Link Posts

Posts that consist primarily of an outbound URL with little or no original text are throttled. The algorithm reads them as low-effort distribution rather than original content. The threshold isn't "any link," it's "the post is dominated by the link with no real substance around it."

Implication: if you're sharing a link, write 100-200 words of original commentary around it. Otherwise the algorithm treats it as link spam, regardless of where the link points.

4. Out-of-Network Limits

Each feed has a cap on how many posts from accounts the user doesn't follow can appear. Free accounts have a tighter cap than X Premium accounts, but the cap exists for everyone. Once the cap is hit, additional candidates from outside the user's network don't get included regardless of score.

Implication: growth into new networks is throttled by design. The fastest path to reach is engagement from your existing network — replies, quote tweets, and retweets that pull the post into followers' For You feeds first, where it gets the in-network signal boost.

How to Write for the Weights

The weights tell you exactly what to optimize for. Here's the operational version of "write better posts."

Aim for the 150x Signal: Reply With Author Response

The single highest-weight signal is a reply that prompts a reply from you. Two practical implications:

  • End posts with a specific question. Not "thoughts?" but "what's the strongest counter-argument to this?" or "have you seen this work in B2C as well as B2B?" The more answerable the question, the more replies you'll get.
  • Reply to your own thread. When replies start coming in, write substantive responses to the early ones — not "thanks!" but a real follow-up that opens the conversation further. Each meaningful exchange compounds the score.

Aim for Bookmarks and Long Reads

Bookmarks are unusual because they're private — the user doesn't have to commit reputationally. Posts that get heavily bookmarked tend to be:

  • Reference content. Lists, frameworks, useful templates, "save this for later" data.
  • Threads with takeaways. The hook makes a strong claim, the body delivers specifics, the close is summarizable.
  • Posts that capture a recurring decision. "How to think about X" content gets bookmarked more than one-off observations.

Make the Topic Obvious in Line One

Candidate generation uses content embeddings to match posts to user interests. If line one of your post is vague, the embedding won't strongly cluster with any interest topic — and the post will fail to enter relevant candidate pools. Specifically: lead with the topic, not with a teaser. "B2B SaaS pricing is broken" beats "I learned something interesting today."

What This Means for Cross-Platform Posting

If you publish on multiple platforms — X, Threads, Bluesky, LinkedIn, Instagram — the weights tell you that the same post will perform differently on each. The mistake most creators make is writing one post and copying it across, expecting the algorithms to value the same things.

The X weights (replies high, author-engaged replies highest, retweets low) push toward conversational, opinion-led, save-worthy content.

LinkedIn's 360Brew pushes harder toward saves, deep comments, and reposts — and away from likes. The relative weights differ from X, even when the metric names look similar. (See the LinkedIn metrics deep dive for the comparable framework on that platform.)

Threads and Bluesky are still figuring out their ranking signals — both lean closer to chronological than algorithmic, which means the X-style "optimize for replies" approach matters less.

Instagram and TikTok weight watch-time and re-watches over discrete engagement signals like likes — the same hook structure won't carry over.

The practical takeaway: if you cross-post, adapt the post for each platform's weights. A scheduler like Publora makes this manageable — you can write the platform-specific variant for each network from one workflow rather than maintaining five separate calendars.

What the Open-Source Repo Doesn't Tell You

The weights are real and useful, but the repo isn't the whole story. Three things to keep in mind:

  • The code has drifted since release. The March 2023 release was a snapshot. The production system has changed in the years since — most notably the January 2026 Grok integration. Some files in the public repo no longer match production exactly.
  • The Grok layer is opaque. The transformer-based content understanding layer added in January 2026 is not in the public repo. It applies its own scoring on top of (or in front of) the Heavy Ranker, and what it actually weights is unclear.
  • Spam and safety classifiers are private. Posts that trigger safety or spam classifiers get filtered before any engagement scoring matters. The classifiers themselves aren't public, so you have to infer their behavior from observed outcomes.

The fundamentals — the engagement weight ladder, the four pre-ranking filters, the candidate generation logic — are still the best public reference for how to write for the platform. The Grok layer adjusts but doesn't replace them.

Frequently Asked Questions

Is the X (Twitter) algorithm really open source?

Partly. X released the core ranking and recommendation code in March 2023 in github.com/twitter/the-algorithm. The repo includes the Heavy Ranker, candidate generation, SimClusters embeddings, and engagement weights. What's not included: real-time spam classifier, ad targeting, safety classifiers. No other major platform has open-sourced this much.

What is the highest-weighted engagement signal?

A reply that the original author engages with — weighted 75.0, or 150 times a like's 0.5. Next: reply at 13.5, profile click at 12.0, conversation click at 11.0, and a conversation click with 2+ minutes of reading at 10.0; a retweet is only 1.0. These weights are published in the Heavy Ranker README of twitter/the-algorithm-ml (April 2023).

Did the X algorithm change in January 2026?

Yes. xAI released a Grok-powered version — a transformer model that reads post content and watches videos. The legacy Heavy Ranker still influences scoring, but candidate-generation and content understanding are now LLM-driven. Engagement weights appear unchanged in publicly visible code.

Are bookmarks weighted higher than likes?

Not in the published weights: bookmarks are not one of the engagement types the open-source Heavy Ranker scores. The closest signal is a conversation click where the user stays at least 2 minutes, weighted 10.0 against a like's 0.5. Bookmarks still signal intent to return, but the public code doesn't show whether they count in ranking.

Does X Premium boost reach?

Yes — concentrated in out-of-network reach. Premium accounts have higher caps for showing posts to non-followers. For your existing followers, weight differences are minor. Premium replies are also surfaced higher in reply threads.

What posts get killed before they're scored?

Four filters: author diversity (~3-per-window cap on posts from same author), negative feedback recency (blocks/mutes from last 30 days), sole-link posts with no context, out-of-network limits per feed window. These are pre-scoring filters — engagement quality doesn't matter until you pass them.

Where can I read the actual code?

github.com/twitter/the-algorithm (Scala, production scoring) and github.com/twitter/the-algorithm-ml (Python, ML training). For curated annotated reading, the awesome-twitter-algo repo is the best community reference — it explains each subdirectory and which files contain the weight constants.

Schedule X, Threads, LinkedIn, and Bluesky from One Place

The X weights tell you to optimize for replies and real conversations. The LinkedIn weights tell you to optimize for saves. Threads and Bluesky push you toward chronological consistency. Publora lets you write platform-specific variants of the same idea and schedule them across all of them — without juggling five tools or copy-pasting one post into networks that reward different signals. Try Publora free (posting to X requires Pro).


Serge Bulaev writes about social media platforms, scheduling tools, and how creator-side algorithms actually work. Founder of Publora and Co.Actor.

Sources

Related Articles