x algorithm series
The Twitter algorithm in 2026: how the open-source ranker works and why your voice matters
14 min read
Updated 21 October 2026. We first wrote this series in May 2026, from the xai-org/x-algorithm repo as it stood then. Since 13 August 2026 the repo has added the real ranking weights, visibility filtering, the labeling systems, the Phoenix training code and SimClusters. This update corrects the May claims that the weights were unpublished and that Phoenix had 19 heads (the README now lists 25 predicted actions), fixes the repo history, and points every file path at the current code.
The latest change since this refresh is in our October 2026 algorithm update: on 22 October equal trimming was switched on for the 2,800 posts the ranking model scores, and on 23 October a warning label and a shorter AI slop label appeared in the code. No weight changed.
The code behind Twitter’s For You feed is public on GitHub at xai-org/x-algorithm. xAI first published it on 20 January 2026 and updated it on 15 May 2026. Since 13 August 2026 it has changed almost every weekday, and on 21 October 2026 it had 33.7k stars. We wrote this series from the May state, so we read the current code again.

The xai-org/x-algorithm repository, home of the open-source Twitter algorithm. Screenshot from github.com/xai-org/x-algorithm, 21 October 2026.
The core conclusion survived that re-read, and the new code makes it easier to check. Twitter’s ranker is a sequence model: it reads what a viewer has engaged with and predicts what that viewer will do with each new post. Published weights then turn those predictions into one score. Most “Twitter algorithm advice” from 2020 to 2023 was written for a different system.
What changed since May
The README’s “Notable Updates” section lists three releases since May that matter for creators:
13 August 2026. The repo added the key configuration parameters, including the weights that blend predicted actions into a score (
home-mixer/params/param.rs). It addedvisibility-filtering/, which decides whether a post is shown or dropped, plus the labeling systems it reads, such asagatha/anduser-cred-v2/. It swapped the Phoenix demo for the production training code, and addedsimclusters/as an extra out-of-network source.14 August 2026. Notes explaining that weights scale predicted probabilities, not raw counts. Also a filter that removes posts from accounts reported to Brazil’s Electoral Court for the 2026 election, unless the viewer follows them (
home-mixer/filters/brazil_2026_election_filter.rs).18 September 2026. Under the Hood, a pilot tool that shows the visibility-limiting labels on your account and posts (
under-the-hood/), now also shows posts withheld in a country after a legal demand, and which country.

The README’s Notable Updates for 18 September, 14 August and 13 August 2026. Screenshot from the xai-org/x-algorithm README on GitHub, 21 October 2026.
For this article, that meant four corrections: the weights are public, the README lists 25 predicted actions, SimClusters is back, and several file paths we cited have moved.
What changed from the 2023 code
The 2023 Twitter release (the twitter/the-algorithm and twitter/the-algorithm-ml repositories) described a stack typical of recommender systems through about 2022. A Scala home-mixer orchestrated the candidate pipeline. A MaskNet heavy ranker scored candidates against around 6,000 hand-engineered features. SimClusters supplied community signals, TwHIN supplied graph embeddings and RealGraph scored follow affinity. A light ranker, source-specific rerankers and a serving layer called Navi completed the picture.
Most of that is gone. Twitter now runs one transformer named Phoenix for ranking and a two-tower Phoenix model for retrieval, with a Rust pipeline around them (home-mixer/). The May release shipped a sample transformer ported from Grok-1. Since 13 August, phoenix/ holds the production model code, trained in JAX and served by a Rust engine (phoenix/README.md).
The 2023 stack and what the code shows on 21 October 2026
Layer | 2023 release | 2026 code (21 October) |
|---|---|---|
Orchestration | Scala home-mixer | Rust home-mixer built on the candidate-pipeline framework |
Ranker | MaskNet heavy ranker on ~6,000 hand-engineered features | Phoenix transformer reading the viewer’s engagement history, plus some context and profile features |
First pass | Separate light ranker | Phoenix two-tower retrieval, then Phoenix ranking |
Community signals | SimClusters embeddings | SimClusters, re-added on 13 August 2026 as an out-of-network source |
Graph signals | TwHIN embeddings and RealGraph follow affinity | An in-network flag, a mutual-follow check, and user-cred-v2 PageRank in the labeling path |
In-network store | Earlybird search index | Thunder, recent posts held in memory (48 hours by default) |
Out-of-network | Mixed sources and source-specific rerankers | Phoenix retrieval, SimClusters and a shared popular-posts list |
Trust and safety | Visibility filtering inside home-mixer | A visibility-filtering service after selection, fed by separate labeling systems |
Engagement signals | About 10 weights disclosed | 25 predicted actions, with weights published in param.rs |
Serving | Navi | A Rust serving engine for Phoenix, plus the vm-ranker reranking service |
Source: xai-org/x-algorithm README.md and phoenix/README.md, read 21 October 2026
Notice what is still missing on the right: no TwHIN, no RealGraph, no light ranker, no 6,000-feature heavy ranker. The ranker is expected to learn most of what those systems encoded from the viewer’s own history. That is the shift this article is about.
Phoenix in one picture
Here is the ranking model, simplified, with the production numbers from the Phoenix README.
Viewer history. The viewer’s recent actions, up to 1,022 positions in the production ranking config. Each carries the post, its author, the action taken, the post’s semantic ID, context and dwell time, plus profile features such as country and language.
Candidates. Up to 64 posts per pass, each represented by hashed post and author IDs (two hashes per entity), semantic IDs and context.
Transformer. 8 layers in production. Candidates can attend to the viewer and the history, never to each other.
Outputs. A probability for each action, plus regression heads for continuous values such as dwell time.
Score. The weighted-sum step, wired up in
home-mixer/scorers/value_model.rs, multiplies each prediction by its weight and adds them up.
Four properties matter. First, the history is a sequence, not a summary. Second, it predicts many actions, not one “engagement score”. Third, the weights that combine those predictions live in param.rs and the arithmetic in xai-value-model/scoring.rs, and both are readable. Fourth, candidate isolation: per the README, a post’s score does not depend on which other posts are in the batch. When Phoenix scores your post for a viewer, the score depends only on that viewer and that post.
The 25 predicted actions and the scoring math
The README’s “Scoring and Ranking” section lists 25 actions Phoenix predicts, in five groups:
Engagement (7): favorite, reply, repost, quote, share, share via DM, share via copy link.
Clicks (6): post, profile, link, photo expand, video open, quoted post.
Attention (6): video quality view, dwell, dwell time, click dwell time, video continuation seconds, profile visit seconds.
Author (1): follow author.
Negative (5): not interested, mute author, block author, report, not dwelled.
If you want the exact count: PhoenixScores in xai-value-model/phoenix_scores.rs holds 28 outputs, the 25 above plus quoted video quality view, post unexplored and react with video. compute_weighted_score in scoring.rs sums 29 weighted terms; the extra one is a user-level video continuation value derived from the other predictions, not predicted itself. Seven of those 29 weights are 0 by default, including ProfileClickWeight, VqvWeight, QuotedVqvWeight and ReactWithVideoWeight, so 22 terms actually count today.
The formula itself is short: final score = Σ (weight × predicted probability or value), then offset_score. These are some of the production defaults:
Selected weight defaults in param.rs, 21 October 2026
Action | Weight |
|---|---|
Favorite (like) | 0.66 |
Reply | 5.0 (20.0 on original posts from accounts you follow that follow you back) |
Repost | 1.0 |
Quote | 5.0 |
Share via DM | 5.0 |
Share via copy link | 20.0 |
Follow author | 4.0 |
Click dwell time | 0.4 |
Not interested | -52.272 |
Mute author | -58.8 |
Block author | -31.2 |
Report | -234.0 |
Source: home-mixer/params/param.rs, read 21 October 2026
Read those numbers the way the repo tells you to. A weight multiplies the predicted probability that this viewer takes the action (or a predicted value, such as dwell time). It does not multiply a count of actions anyone took. The comments in scoring.rs call the “one report cancels 468 likes” reading incorrect, and explain that the baseline probability of a report is more than 1000x lower than a like, which is why its weight is large. (The 468 comes from the July like weight of 0.5; today’s is 0.66.) They add that mass reporting mostly affects recommendations for users similar to the reporters.
offset_score handles the sign. A net-positive sum gets a tiny constant added (0.001). A net-negative sum, where predicted not-interested taps, mutes, blocks and reports outweigh the positives, is squeezed into a band below 0.001. So, before the adjustments that follow, a post the model expects a viewer to dislike more than like ranks under every post it expects them to like. A5 covers the negative side in detail, and A2 walks all 25 actions (its URL still says 19; the article explains the count).
Per unit of predicted probability, the weights put a reply at about 7.6 times a like (5.0 against 0.66), a follow at about 6 times and a share via copy link at about 30 times. Our read: a post that gets the right people replying, sharing and following will outrank a post that only collects likes. That is the opposite of what “how do I get more likes” advice optimises for.
Out of network is a different path entirely
The accounts a viewer follows are only one input to For You. The README lists four places posts come from:
Thunder (in-network): recent posts from accounts the viewer follows, held in memory for 48 hours by default (
thunder/args.rs).Phoenix retrieval (out-of-network): embeds the viewer and each post as vectors and returns the posts nearest the viewer.
SimClusters (out-of-network): groups accounts and posts by who engages with what, then uses those clusters to find candidates. Re-added on 13 August 2026.
Popular posts (out-of-network): a shared list of popular recent original posts from the most-followed accounts (
home-mixer/sources/popular_posts_source.rs).
Every candidate, from any source, then passes the same pre-scoring filters, including AgeFilter, which drops posts older than 48 hours (home-mixer/params/config.rs). After scoring, posts from accounts the viewer does not follow are multiplied by an out-of-network factor, 0.75 by default, and so are replies and reposts from accounts the viewer does follow. That 0.75 is a code default in vm-ranker/params.rs; the production value is unclear from the code.
Phoenix retrieval is a two-tower model (phoenix/xrex/models/recsys_two_tower_model.py). One tower encodes the viewer’s engagement history. The other encodes each post through its semantic IDs, codes derived from the post’s content so that same-topic posts share prefixes, plus hashed author IDs. Retrieval returns the closest matches by dot product, and it is trained with likes as the positive signal.
Our read: reaching a stranger through Phoenix retrieval depends on how well your post matches that stranger’s history, more than on your like count (SimClusters and the popular-posts list do lean on engagement). Posts that stay on recognisable topics, in a recognisable way, give the retrieval model a clearer place to put you. Generic engagement bait looks like everything else trained on the same internet. A3 walks the retrieval sources and the out-of-network discount.
Why “algorithm hacks” stopped working
The 2023 ranker was a feature-engineering problem. Every “Twitter algorithm hack” you read, the question-as-hook, the reply-magnet first line, the screenshot-of-text move, worked because it mapped onto features the heavy ranker consumed. Optimise for the feature, win the slot.
Phoenix works differently. It learns what a reply-magnet first line looks like from viewer histories, and every prediction is conditioned on one specific viewer. A move that tickled one feature in 2023 now meets a per-viewer model of what this person actually engages with. Our read: if a viewer mostly engages with careful long replies, the screenshot-of-text move will likely score worse for them, however well it once did for a generic audience. Two popular beliefs do not show up in the scoring formula at all: there is no link-penalty term and no verified or Premium term in it.
After the weighted sum, three adjustments and a reranker follow:
Author diversity. Each post after an author’s first in the same ranked list is multiplied by (1 - floor) × decay^k + floor, where k is how many higher-scored posts by that author are already in the list. With the code defaults in vm-ranker/params.rs (decay 0.5, floor 0.25; production values unclear from the code), your posts get ×1.0, ×0.625, ×0.44, ×0.34 and then approach ×0.25.
Out-of-network discount. ×0.75 by default, as above.
New-author boost. On each feed load, at most one original post can be lifted to about 16th place, if its author has 50,000 followers or fewer, the post is no more than 2 hours old and it has fewer than 200 home-timeline views (
home-mixer/scorers/author_cold_start.rs).DPP reranker. The vm-ranker service (
vm-ranker/dpp.rs) takes the top posts by score (150 by code default) and uses a determinantal point process over post embeddings to pick a set that scores well without being too similar. The README describes it as giving up a little score for less similarity between neighbours.
Then visibility filtering runs after selection. It cannot move a post up or down, but it can drop it entirely (home-mixer/filters/vf_filter.rs).
The volume playbook (“post 10 times a day, optimise for impressions”) runs into the diversity decay and the DPP reranker together. Our read: several similar posts inside the same 48-hour window mostly compete with each other for the same viewers. A7 walks the decay curve and the cadence that respects it.
Voice as a history embedding
This section is our interpretation of the architecture, not something the code states. Here is the fact it rests on: the viewer’s history is an ordered list of posts the viewer engaged with, each tagged with its author (as hashed IDs), the action taken, the post’s semantic ID and dwell time. Creators the viewer engages with often appear in it many times.
Our read: the transformer can learn what posts from you look like in that viewer’s history. Not your username, which is just a pair of hashed IDs, but your pattern: topics, framing, sentence shapes, recurring themes. When a new post from you arrives, the model has a per-viewer sense of “one of those posts”. Consistency likely strengthens that. Drift likely weakens it, pulling your score toward what the model would predict for an unfamiliar author.
Candidate isolation is a fact, and it matters here. Because candidates cannot attend to each other, a strong post in the same batch does not lift a weaker one next to it. Each post is scored on its own against the viewer’s history. Our read: three on-voice posts followed by one off-voice post do not average out. The fourth is judged alone.
That is why we call voice an algorithm-level moat, not only a brand line. Consistent, recognisable content from a real person looks like the most reliable way to earn the replies, dwell, shares and follows the weights reward, and to avoid the not-interested taps, mutes and blocks they punish. A8 walks the embedding side in depth.
What this means for the tools you use
No tool changes how Twitter ranks a post. The ranker predicts what each viewer will do, and the weights, filters and reranker sit in public code. What a tool can do is help a real person publish consistent, recognisable content more often, without drifting into posts their audience would skip, mute or mark “not interested”.
Our read: tools that start from other people’s formats help with a blank page, but the posts tend to look like everyone else’s. Tools that start from your own posts aim at consistency instead.
VoiceMoat is a Personal Brand OS for LinkedIn and Twitter. audenAI, the brain inside VoiceMoat, learns from your own posts. You draft in Studio, VoiceMoat checks drafts for Style and Stance, and it schedules, publishes and shows analytics. It also connects to Claude, ChatGPT and Grok through its connector. Plans are Creator $35/month, Pro $69/month and Enterprise $150/month, with a 3-day trial for $1 on Creator or $5 on Pro (see pricing). None of that changes the ranker. It is aimed at the consistency that, in our read, earns the positive actions. A10 compares it with Tweet Hunter and Typefully, against criteria drawn from the current code.
The nine articles after this one
This piece is the hub. Nine more articles unpack the mechanics, and all nine were refreshed on 21 October 2026 against the current code.
A2: How Phoenix ranks every post. The 25 signals the README lists (the URL still says 19), the published weights and the scoring math.
A3: Out of network is the new in network. Phoenix retrieval, SimClusters and popular posts: how unfollowed creators reach new viewers.
A4: How Twitter fills your feed slots. Ads, Who to Follow and prompts, placed by the blending pipeline around the ranked posts.
A5: The negative-signal economy. The negative weights, now public, and the repo’s warning against reading them as counts.
A6: How dwell time is scored. The attention signals, their weights and the writing patterns that earn them.
A7: Why Twitter feeds reject your third post of the day. Author diversity, the out-of-network discount and the new-author boost, then the DPP reranker.
A8: Your voice is an embedding. How Phoenix represents posts and authors, and what drift looks like.
A9: 48 hours in Thunder. The 48-hour AgeFilter that applies to every source.
A10: VoiceMoat vs Tweet Hunter and Typefully. Three tools compared against criteria from the current code.
Every article in the series cites the repo files each claim rests on and labels our interpretations as our read. The 2023 weights are history now that the 2026 defaults are public. The aim is accuracy, because the conclusion (“voice is the moat”) is only as strong as the reading underneath it.
What is the Twitter algorithm in 2026?
It is the open-source code in the xai-org/x-algorithm repo that builds Twitter's For You feed. Posts come from Thunder (accounts you follow) and from Phoenix retrieval, SimClusters and a popular-posts list (accounts you don't). A transformer called Phoenix predicts 25 actions for each post, published weights combine them into one score, then author diversity, an out-of-network discount, a new-author boost and a DPP reranker follow. Visibility filtering can still drop a post after that.
Where is the Twitter algorithm code on GitHub?
At github.com/xai-org/x-algorithm. xAI first published it on 20 January 2026, updated it on 15 May 2026, and has pushed changes almost every weekday since 13 August 2026. The weights are in home-mixer/params/param.rs and the scoring arithmetic is in xai-value-model/scoring.rs.
How many signals does the Twitter algorithm use in 2026?
The README lists 25 actions Phoenix predicts, in five groups: engagement (7), clicks (6), attention (6), follow author (1) and negative (5). The scoring code holds 28 outputs and sums 29 weighted terms, 7 of which are 0 by default. Earlier versions of this article said 19 heads, based on the May 2026 code.
Are the Twitter ranking weights public?
Yes, since 13 August 2026. The defaults are in home-mixer/params/param.rs: for example favorite 0.66, reply 5.0, share via copy link 20.0, not interested -52.272 and report -234.0. The repo warns that weights multiply predicted probabilities, not counts, so "one report cancels 468 likes" is wrong.
What changed in the Twitter algorithm repo since May 2026?
On 13 August 2026 it added the weights, visibility filtering, the labeling systems, the Phoenix training code and SimClusters. On 14 August it added notes on how weights work and a Brazil 2026 election filter. On 18 September the Under the Hood tool began showing when posts were withheld in a country for legal reasons.
Does a consistent voice help under the 2026 Twitter algorithm?
Our read is yes, though the code does not say so directly. Phoenix scores every post against each viewer's own engagement history, and each post is scored in isolation. Consistent, recognisable content from a real person looks like the most reliable way to earn replies, dwell, shares and follows and to avoid not-interested taps, mutes and blocks.
This article was drafted with AI assistance and human-edited by Prateek Singh. All technical claims are sourced to the xai-org/x-algorithm repository; file paths are cited inline.
More in the series

Twitter Algorithm
The Twitter algorithm's 25 signals: a creator's guide to how Phoenix ranks every post
Phoenix, the model behind the Twitter algorithm, predicts how likely each viewer is to take 25 different actions on a post, and a weighted sum of those predictions sets the order. This guide lists all 25 with the default weights published in home-mixer/params/param.rs in August 2026, from share via copy link at 20 to report at -234. It explains why every weight multiplies a predicted probability, not a count, and closes with a five-move framework for posts that earn several strong signals at once.
15 min read

Twitter Algorithm
Twitter algorithm negative signals: what a mute, block or report really costs
The Twitter algorithm predicts five negative actions for every post and gives them the largest weights in the code: report -234, mute -58.8, not interested -52.272, block -31.2 and not dwelled -0.02. Those weights multiply one viewer's predicted probability of the action, not counts, so a single mute does not cancel dozens of likes. This article explains the offset branch exactly as the code runs it, the filters that act after a real mute or block, and the visibility labels you can now check with Under the Hood.
13 min read

Twitter Algorithm
How the Twitter Phoenix algorithm sees creators: hashed authors, semantic IDs and viewer history
Phoenix, the model behind the Twitter For You feed, never reads your "voice". It reads hashed author IDs, semantic IDs that describe each post, and each viewer's last thousand or so actions. This refresh walks the production code published since August 2026 and labels clearly where our creator advice is interpretation rather than code fact.
12 min read

Twitter Algorithm
Twitter out of network: how your posts reach people who don't follow you
Out-of-network posts reach strangers on the Twitter For You feed through three live lanes: Phoenix retrieval, SimClusters and a shared popular-posts list. This refresh rebuilds the article from the October 2026 code, including the 0.75 out-of-network discount, the filters that keep replies and reposts from travelling, the extra visibility rules for recommendations and the new-author boost for small accounts.
11 min read

Twitter Algorithm
How often to post on Twitter: author diversity, DPP and your third post of the day
How often should you post on Twitter? The open-source For You code answers part of it: each extra post from the same author in one feed request is multiplied by (1 - floor) × decay^n + floor, and a determinantal point process then picks a varied set from the top-scored posts. The repo's code defaults are decay 0.5 and floor 0.25, but production values are not confirmed. This refresh fixes our May file paths and explains what the maths does and does not say about posting frequency.
10 min read

Twitter Algorithm
Tweet Hunter vs Typefully vs VoiceMoat in 2026: what the Twitter algorithm code says to look for
Tweet Hunter, Typefully and VoiceMoat compared against six criteria drawn from the current open-source Twitter algorithm: 25 predicted actions, published weights, negative signals and cadence. No tool changes how Twitter ranks a post; the question is which one helps you publish consistent content your audience replies to, shares and follows. Prices were checked on 21 October 2026, and Hypefury, which no longer lists Twitter among the platforms it works with, is not scored.
9 min read
The whole series
The Twitter/X algorithm in May 2026: all ten articles