I Read X's Open-Source Algorithm: One Reply From a Mutual Is Worth 30 Likes
xAI open-sourced the code behind X's For You feed. Most of what I saw online about it came from the README or from people quoting each other, so I cloned the repo and read the code itself: the Rust that builds your feed, the JAX that trains the model, and the config file X syncs from production.
This is what I found, read at commit b220448 from 3 November 2026. Every number below is from the code, with the file it lives in.
!The xai-org/x-algorithm GitHub repository at commit b220448, with 34.1k stars and 5.5k forks
The repo. 2,352 files of Rust, JAX and Scala, with a commit almost every weekday.
Before the numbers, here's the whole path a feed takes. Every time you open For You, this runs from left to right:
!Diagram of the For You pipeline: candidate sources, filters, Phoenix ranker, weighted sum, vm-ranker, visibility filtering, then your feed
One feed request, start to finish. Most of this post is about the green and amber boxes.
How a post gets scored
Every post you could see gets one score:
score = sum of (weight × the chance you'll take that action)
The model predicts the chance you'll like, reply, repost, share, mute, report and about 20 other actions. Each prediction is multiplied by a weight, and the results are added up. The weights live in home-mixer/params/param.rs, and X runs a cron job that copies the production values into that file. The last sync before I read it was 2 November.
| Action | Weight |
|---|---|
| Copy link to post | 20 |
| Reply | 5 |
| Quote | 5 |
| Share via DM | 5 |
| Follow the author | 4 |
| Share | 2 |
| Repost | 1 |
| Like | 0.66 |
| Click | 0.3 |
| Open a link | 0.2 |
| Profile click | 0 |
| Video quality view | 0 |
| Block author | -31.2 |
| Not interested | -52.27 |
| Mute author | -58.8 |
| Report | -234 |
!Excerpt of home-mixer/params/param.rs showing FavoriteWeight 0.66, ReplyWeight 5.0, the bidirectional reply boost 15.0, RetweetWeight 1.0, ShareViaCopyLinkWeight 20.0, QuoteWeight 5.0 and ReportWeight -234.0
The actual lines, from the file X syncs from production.
One thing to get right before reading too much into this table. The weights multiply your predicted chance of doing something, not counts. Reports are more than 1,000 times rarer than likes, so a report needs a huge weight just to move the ranking at all. "One report cancels 354 likes" is the wrong reading. X even added a code comment warning against exactly this math (their example says 468 likes).
The right reading: X values conversation and sharing far more than approval. A reply is worth about 7.6 likes. A copied link is worth about 30.
The biggest lever: mutuals
There is one extra parameter, bidirectional_follow_reply_weight_boost = 15. If the post is an original post (not a reply or a repost) and the author follows you back, the reply weight goes from 5 to 20.
So one reply from a mutual is worth about 30 likes.
!Excerpt of xai-value-model/inputs.rs: the boost applies only when the post is not a reply, not a retweet, and the author is a mutual follow
The whole eligibility rule is one line: original post, and you follow each other.
X documented the rollout in docs/BIDIRECTIONAL_BOOST_CHANGE.md. They A/B tested boosts of 5, 10, 15 and 20 starting 10 July 2026, shipped 20 on 13 July, then cut it to 15 on 24 July after people complained they were missing World Cup posts from accounts they didn't follow.
One negative prediction sinks a post
This is easy to miss. In xai-value-model/scoring.rs, a post with a positive total gets a small constant added. A post with a negative total gets squashed into a tiny range below that constant.
!Excerpt of xai-value-model/scoring.rs, offset_score: negative scores are rescaled into a range below the 0.001 offset, positive scores get the offset added
Positive totals get + 0.001. Negative totals get squeezed in below 0.001.
So every post with a negative total ranks below every post with a positive total, no matter how close to zero it is. If the model thinks a viewer is likely to mute you or hit "not interested", your post is effectively gone from their feed.
What happens after scoring
These adjustments don't run where the README says. Home-mixer hard-codes them off, and the separate vm-ranker service applies them:
- Same-author decay. Your k-th post in one feed load is multiplied by 0.75 × 0.5^k + 0.25. Your 1st post keeps 100%, the 2nd 62.5%, the 3rd 44%, and it never drops below 25%.
- Out-of-network discount. Posts from accounts the viewer doesn't follow get ×0.75. So do replies and reposts from accounts they do follow.
- Diversity rerank. Out of the top 150, a determinantal point process (θ = 0.65) trades a little score for posts that look less alike, using cosine similarity of post embeddings. Ten near-identical takes on the same news story won't all make it.
!Bar chart: a single author's 1st post keeps 100% of its score, the 2nd 62%, 3rd 44%, 4th 34%, 5th 30%, 6th 27%, with a floor at 25%
Posting a burst doesn't multiply your reach. Each extra post in one feed keeps less of its score.
There is no time decay in the score. Freshness comes from a hard 48-hour cutoff and from post age being one of the model's inputs.
Small accounts get a free shot
home-mixer/scorers/author_cold_start.rs is a real bandit. On each feed request, at most one post gets lifted to slot 16 if all of these are true:
- it's an original post, not a reply or a repost
- the author has 50,000 followers or fewer
- the post is under 2 hours old
- it has fewer than 200 home-feed views
To pick which one, X uses Thompson sampling. For each candidate it draws a like rate from Beta(0.75 + likes, 49.25 + views − likes), which starts at a 1.5% prior. It keeps the top 2 draws and takes whichever the model scores higher.
!Excerpt of home-mixer/scorers/author_cold_start.rs, sample_reward: n is home views, x is likes, and a Beta distribution with alpha0 plus likes and beta0 plus non-liking views is sampled
The bandit, in 13 lines.
Here's what that looks like for two example posts with the same 150 views:
!Three Beta distributions: the prior centred near 1.5%, a post with 2 likes in 150 views centred near 1%, and a post with 9 likes in 150 views centred near 4.5%
The post with 9 likes almost always draws a higher number, so it almost always wins the slot. The post with no data yet still has a long tail, which is how new posts get a chance.
In plain words: your likes per view in the first 2 hours decide whether X tests you on new people.
The model, Phoenix
If you work on recommender systems, this part is worth reading on its own. It's the most complete production recommender I've seen released.
- Ranking: a transformer with 8 layers, width 2560, and 20 query heads sharing 4 key/value heads. It reads your last 1,022 actions plus 64 candidate posts.
- Candidate isolation: candidate posts can attend to your history but not to each other. A post's score doesn't depend on what else is in the batch, so it can be cached.
- Hash embeddings: users, posts and authors are hashed into tables of 100M, 100M and 30M rows, two hashes each, so there's no vocabulary to maintain and a brand-new post works instantly.
- Semantic IDs: each post's multimodal embedding is quantized into 6 levels of 256 codes. Posts on the same topic share code prefixes, which helps the model generalise to posts it has never seen.
- About you: country, language, location, inferred gender, age bracket, and a 10-million-row table of IP address hashes. An installed-apps feature exists but is switched off in the ranker.
- Training: 1e11 examples, the Muon optimizer for dense weights, row-wise AdaGrad for the embedding tables.
- 8 October change: time-spent prediction moved from a Tweedie + MAE loss to CREAD, which classifies dwell time against 30 log-spaced thresholds from 2 to 120 seconds and then restores a number. That's what the changelog means by "predicts time spent much better".
Retrieval, the step that finds posts from people you don't follow, is a two-tower model. A transformer encodes your history into one vector, and the top matches come from an index of about 10 million posts.
What can hide a post regardless of score
After ranking, visibility-filtering checks every post. Some rules drop a post for everyone: suspended authors, spam labels, legal takedowns, and "Freedom of Speech, Not Reach" labels for hateful conduct, violent speech, abuse and civic integrity.
A second set only applies when the post would reach someone who doesn't follow the author. These include account labels like SPAM_HIGH_RECALL, IMPERSONATION_HIGH_PRECISION, ABUSIVE_HIGH_RECALL and DO_NOT_AMPLIFY. Followers still see the post. Strangers never do.
!GitHub view of visibility-filtering/rules/levels.rs: the OON_AUTHOR_LABEL_DROPS list, ending with DO_NOT_AMPLIFY_USER_LABEL_DROP_UNSPECIFIED
The list of account labels that block recommendations to non-followers. DO_NOT_AMPLIFY is the last one.
That's the "not banned, just not recommended" mechanism, written down in visibility-filtering/rules/levels.rs. The labels come from LLM classifiers running on Grok 4.1 Fast (the prompts aren't published), image and video models, and offline account-scoring jobs. X's Under the Hood page shows which labels are on your own account.
What the code settles
- Premium gets no boost in ranking. There's no Premium weight or multiplier anywhere in the scoring code, and the feed service only logs subscription level. One caveat: the author's tier is part of the account text X feeds into each post's embedding, so the model can see it.
- Strangers mass-reporting you does little. Only actions on posts X actually served in the feed count, and predictions are personalised, so reports mostly affect people who behave like the reporters.
- Links aren't penalised by a weight. Opening a link is +0.2. Link posts lose because people reply to them less.
Where the README and the code disagree
- The README links visibility-filtering/rules/registry.rs, but that file doesn't exist. The rules are in tweet_rules.rs, author_rules.rs and levels.rs.
- The README says the ranking scorer applies the author-diversity and out-of-network adjustments. In the code they're switched off there and applied in vm-ranker.
- FairShareRankingFilter is enabled in production but missing from the README's filter list. It trims candidates to 2,800, split proportionally across sources.
- The Brazil2026ElectionFilter was removed on 26 October, but a visibility rule that drops election-labelled posts for viewers in Brazil is still in the code.
So how do you get reach?
1. Write things people reply to or send to a friend. A reply is 5, a copied link 20, a like 0.66.
2. Build mutuals in your niche. Their replies count four times as much.
3. Post when your audience is online. The first 2 hours decide the small-account slot.
4. Post once, not three times in a row. The 3rd post keeps 44%.
5. Don't bait strangers. A predicted mute or "not interested" puts you below every positive post.
6. Check Under the Hood before blaming the algorithm.
None of this is a cheat code. The weights are fixed, but the predictions come from a model trained on what people really did. The only way to raise "chance this person replies" is to write something they want to reply to.
The repo is at xai-org/x-algorithm. The small model configs train on one NVIDIA GPU if you want to run Phoenix yourself.
Originally published at saksham.digital.
---
More of my writing and projects at saksham.digital.
How to master the X algorithm (how it works and my own tips)
In this guide, I’ll break down what X’s published algorithm reveals, what those mechanics mean in practice, and the step-by-step framework I’ve personally used to scale my accounts. Specifically, we’ll cover how the algorithm weighs different interactions, what triggers visibility penalties, survival tips for your spicy account and six actionable, multi-point strategies you can apply today to boost your reach, leverage platform tools, and turn attention into real growth.
Part 1: How the X Algorithm Actually Works
Not all engagement is created equal.
A like, a reply, and a share don’t carry the same weight. In fact, some interactions are weighted over 30 times more heavily than a like.
X predicts how likely someone is to interact with your post, assigns specific weights to those potential actions, and combines them to determine where posts appear in the For You feed.
Note: These weights apply to predicted engagement probabilities, not just raw counts. 20 likes don’t automatically equal one link share, but the weights reveal precisely which interactions X prioritizes.
What Boosts Your Reach 📈
🔗 Copy-link share: +20
🫂 Reply from a mutual: +15
💬 Standard reply: +5
🔁 Quote post: +5
✉️ DM share: +5
👤 Follow: +4
📤 Other shares: +2
🔄 Repost: +1
❤️ Like: +0.66
Takeaway: A copied link share carries approximately 30 times the ranking weight of a like. Furthermore, replies between mutual followers receive an additional boost, bringing their weight up to +15. X also monitors secondary signals like profile clicks, viewing time, and whether people stop scrolling to read your text.
What Hurts Your Reach 📉
🚩 Report: −234
🔇 Mute: −58.8
👎 Not interested: −52.27
🚫 Block: −31.2
Negative feedback carries massive penalties in the ranking system. Keeping casual viewers from muting or reporting your content is just as important as getting likes.
Three More Things Worth Knowing
1. Your first 48 hours matter: Posts older than approximately 48 hours are generally filtered out of the main recommendation pipeline.
2. Smaller accounts get discovery chances: Eligible smaller accounts can receive targeted exposure for fresh, original posts.
3. Content restrictions apply: X filters certain content before ranking it. This is especially vital for adult creators, whose posts may have limited recommendation eligibility regardless of engagement if flagged as sensitive.
Part 2: 3 Core Strategies to Grow Your Account
1. Master the Rhythm of Posting and Replying
2. Daily cadence: Maintain a steady daily rhythm of roughly two to five original posts plus consistent replies, spaced out rather than dumped all at once. Combine text posts with at least one picture or short clip per day.
Smart commenting: Comment thoughtfully under posts already getting traction in your niche, especially new ones. After a week, review your replies to see which ones drove the most profile visits and new followers.
Leverage conversations: Reply to comments on your own posts quickly. If you can strike up an active back and forth conversation, it acts as a massive growth factor since replies from mutuals scale up to +15 points each. A simple follower is +5 points per reply. Follow back people who consistently engage with you.
2. Build Real Peer Engagement in Your Niche
Comment under other creators posts with thoughts that show personality and add value, rather than dropping generic fire emojis. Genuine, reciprocal peer interaction compounds over time.
3. Balance Personality and Teasing
Purely explicit posts are frequently flagged and largely removed from recommendations to non-followers. A heavy explicit day can even trigger a temporary account-level penalty, suppressing your non-explicit reach as well.
Lead with personality: who you are, what you think, your goals, humor, and lighter teasing. Save explicitly adult content for platforms where users actually pay.
Explicit language alone can trigger algorithmic filters, so keep text light for maximum discovery. An explicit post every now and then is fine, but high frequency will kill your account reach.
Feel free to ask any questions if you should have some 🫶
Also, check out my profile for the full post with 6 of my own X strategies and 3 additional account survival tips.
18 points · 9 comments
Mentions
I Read X's Open-Source Algorithm: One Reply From a Mutual Is Worth 30 Likes xAI open-sourced the code behind X's For You feed. Most of what I saw online about it came from the README or from people quoting each other, so I cloned the repo and read the code itself: the Rust that builds your feed, the JAX that trains the model, and the config file X syncs from production. This is what I found, read at commit b220448 from 3 November 2026. Every number below is from the code, with the file it lives in. !The xai-org/x-algorithm GitHub repository at commit b220448, with 34.1k stars and 5.5k forks The repo. 2,352 files of Rust, JAX and Scala, with a commit almost every weekday. Before the numbers, here's the whole path a feed takes. Every time you open For You, this runs from left to right: !Diagram of the For You pipeline: candidate sources, filters, Phoenix ranker, weighted sum, vm-ranker, visibility filtering, then your feed One feed request, start to finish. Most of this post is about the green and amber boxes. How a post gets scored Every post you could see gets one score: score = sum of (weight × the chance you'll take that action) The model predicts the chance you'll like, reply, repost, share, mute, report and about 20 other actions. Each prediction is multiplied by a weight, and the results are added up. The weights live in home-mixer/params/param.rs, and X runs a cron job that copies the production values into that file. The last sync before I read it was 2 November. | Action | Weight | |---|---| | Copy link to post | 20 | | Reply | 5 | | Quote | 5 | | Share via DM | 5 | | Follow the author | 4 | | Share | 2 | | Repost | 1 | | Like | 0.66 | | Click | 0.3 | | Open a link | 0.2 | | Profile click | 0 | | Video quality view | 0 | | Block author | -31.2 | | Not interested | -52.27 | | Mute author | -58.8 | | Report | -234 | !Excerpt of home-mixer/params/param.rs showing FavoriteWeight 0.66, ReplyWeight 5.0, the bidirectional reply boost 15.0, RetweetWeight 1.0, ShareViaCopyLinkWeight 20.0, QuoteWeight 5.0 and ReportWeight -234.0 The actual lines, from the file X syncs from production. One thing to get right before reading too much into this table. The weights multiply your predicted chance of doing something, not counts. Reports are more than 1,000 times rarer than likes, so a report needs a huge weight just to move the ranking at all. "One report cancels 354 likes" is the wrong reading. X even added a code comment warning against exactly this math (their example says 468 likes). The right reading: X values conversation and sharing far more than approval. A reply is worth about 7.6 likes. A copied link is worth about 30. The biggest lever: mutuals There is one extra parameter, bidirectional_follow_reply_weight_boost = 15. If the post is an original post (not a reply or a repost) and the author follows you back, the reply weight goes from 5 to 20. So one reply from a mutual is worth about 30 likes. !Excerpt of xai-value-model/inputs.rs: the boost applies only when the post is not a reply, not a retweet, and the author is a mutual follow The whole eligibility rule is one line: original post, and you follow each other. X documented the rollout in docs/BIDIRECTIONAL_BOOST_CHANGE.md. They A/B tested boosts of 5, 10, 15 and 20 starting 10 July 2026, shipped 20 on 13 July, then cut it to 15 on 24 July after people complained they were missing World Cup posts from accounts they didn't follow. One negative prediction sinks a post This is easy to miss. In xai-value-model/scoring.rs, a post with a positive total gets a small constant added. A post with a negative total gets squashed into a tiny range below that constant. !Excerpt of xai-value-model/scoring.rs, offset_score: negative scores are rescaled into a range below the 0.001 offset, positive scores get the offset added Positive totals get + 0.001. Negative totals get squeezed in below 0.001. So every post with a negative total ranks below every post with a positive total, no matter how close to zero it is. If the model thinks a viewer is likely to mute you or hit "not interested", your post is effectively gone from their feed. What happens after scoring These adjustments don't run where the README says. Home-mixer hard-codes them off, and the separate vm-ranker service applies them: - Same-author decay. Your k-th post in one feed load is multiplied by 0.75 × 0.5^k + 0.25. Your 1st post keeps 100%, the 2nd 62.5%, the 3rd 44%, and it never drops below 25%. - Out-of-network discount. Posts from accounts the viewer doesn't follow get ×0.75. So do replies and reposts from accounts they do follow. - Diversity rerank. Out of the top 150, a determinantal point process (θ = 0.65) trades a little score for posts that look less alike, using cosine similarity of post embeddings. Ten near-identical takes on the same news story won't all make it. !Bar chart: a single author's 1st post keeps 100% of its score, the 2nd 62%, 3rd 44%, 4th 34%, 5th 30%, 6th 27%, with a floor at 25% Posting a burst doesn't multiply your reach. Each extra post in one feed keeps less of its score. There is no time decay in the score. Freshness comes from a hard 48-hour cutoff and from post age being one of the model's inputs. Small accounts get a free shot home-mixer/scorers/author_cold_start.rs is a real bandit. On each feed request, at most one post gets lifted to slot 16 if all of these are true: - it's an original post, not a reply or a repost - the author has 50,000 followers or fewer - the post is under 2 hours old - it has fewer than 200 home-feed views To pick which one, X uses Thompson sampling. For each candidate it draws a like rate from Beta(0.75 + likes, 49.25 + views − likes), which starts at a 1.5% prior. It keeps the top 2 draws and takes whichever the model scores higher. !Excerpt of home-mixer/scorers/author_cold_start.rs, sample_reward: n is home views, x is likes, and a Beta distribution with alpha0 plus likes and beta0 plus non-liking views is sampled The bandit, in 13 lines. Here's what that looks like for two example posts with the same 150 views: !Three Beta distributions: the prior centred near 1.5%, a post with 2 likes in 150 views centred near 1%, and a post with 9 likes in 150 views centred near 4.5% The post with 9 likes almost always draws a higher number, so it almost always wins the slot. The post with no data yet still has a long tail, which is how new posts get a chance. In plain words: your likes per view in the first 2 hours decide whether X tests you on new people. The model, Phoenix If you work on recommender systems, this part is worth reading on its own. It's the most complete production recommender I've seen released. - Ranking: a transformer with 8 layers, width 2560, and 20 query heads sharing 4 key/value heads. It reads your last 1,022 actions plus 64 candidate posts. - Candidate isolation: candidate posts can attend to your history but not to each other. A post's score doesn't depend on what else is in the batch, so it can be cached. - Hash embeddings: users, posts and authors are hashed into tables of 100M, 100M and 30M rows, two hashes each, so there's no vocabulary to maintain and a brand-new post works instantly. - Semantic IDs: each post's multimodal embedding is quantized into 6 levels of 256 codes. Posts on the same topic share code prefixes, which helps the model generalise to posts it has never seen. - About you: country, language, location, inferred gender, age bracket, and a 10-million-row table of IP address hashes. An installed-apps feature exists but is switched off in the ranker. - Training: 1e11 examples, the Muon optimizer for dense weights, row-wise AdaGrad for the embedding tables. - 8 October change: time-spent prediction moved from a Tweedie + MAE loss to CREAD, which classifies dwell time against 30 log-spaced thresholds from 2 to 120 seconds and then restores a number. That's what the changelog means by "predicts time spent much better". Retrieval, the step that finds posts from people you don't follow, is a two-tower model. A transformer encodes your history into one vector, and the top matches come from an index of about 10 million posts. What can hide a post regardless of score After ranking, visibility-filtering checks every post. Some rules drop a post for everyone: suspended authors, spam labels, legal takedowns, and "Freedom of Speech, Not Reach" labels for hateful conduct, violent speech, abuse and civic integrity. A second set only applies when the post would reach someone who doesn't follow the author. These include account labels like SPAM_HIGH_RECALL, IMPERSONATION_HIGH_PRECISION, ABUSIVE_HIGH_RECALL and DO_NOT_AMPLIFY. Followers still see the post. Strangers never do. !GitHub view of visibility-filtering/rules/levels.rs: the OON_AUTHOR_LABEL_DROPS list, ending with DO_NOT_AMPLIFY_USER_LABEL_DROP_UNSPECIFIED The list of account labels that block recommendations to non-followers. DO_NOT_AMPLIFY is the last one. That's the "not banned, just not recommended" mechanism, written down in visibility-filtering/rules/levels.rs. The labels come from LLM classifiers running on Grok 4.1 Fast (the prompts aren't published), image and video models, and offline account-scoring jobs. X's Under the Hood page shows which labels are on your own account. What the code settles - Premium gets no boost in ranking. There's no Premium weight or multiplier anywhere in the scoring code, and the feed service only logs subscription level. One caveat: the author's tier is part of the account text X feeds into each post's embedding, so the model can see it. - Strangers mass-reporting you does little. Only actions on posts X actually served in the feed count, and predictions are personalised, so reports mostly affect people who behave like the reporters. - Links aren't penalised by a weight. Opening a link is +0.2. Link posts lose because people reply to them less. Where the README and the code disagree - The README links visibility-filtering/rules/registry.rs, but that file doesn't exist. The rules are in tweet_rules.rs, author_rules.rs and levels.rs. - The README says the ranking scorer applies the author-diversity and out-of-network adjustments. In the code they're switched off there and applied in vm-ranker. - FairShareRankingFilter is enabled in production but missing from the README's filter list. It trims candidates to 2,800, split proportionally across sources. - The Brazil2026ElectionFilter was removed on 26 October, but a visibility rule that drops election-labelled posts for viewers in Brazil is still in the code. So how do you get reach? 1. Write things people reply to or send to a friend. A reply is 5, a copied link 20, a like 0.66. 2. Build mutuals in your niche. Their replies count four times as much. 3. Post when your audience is online. The first 2 hours decide the small-account slot. 4. Post once, not three times in a row. The 3rd post keeps 44%. 5. Don't bait strangers. A predicted mute or "not interested" puts you below every positive post. 6. Check Under the Hood before blaming the algorithm. None of this is a cheat code. The weights are fixed, but the predictions come from a model trained on what people really did. The only way to raise "chance this person replies" is to write something they want to reply to. The repo is at xai-org/x-algorithm. The small model configs train on one NVIDIA GPU if you want to run Phoenix yourself. Originally published at saksham.digital. --- More of my writing and projects at saksham.digital.
有没有 X 推特运营相关的社群? 马斯克早就把推特的推荐算法开源了,开源地址: xai-org/x-algorithm 截止到 2026 年 11 月 3 号,Github 标星达到 34K Star 这个推荐算法目前还在持续更新! 根据开源的推荐源码分析,「回复+作者回应」的权重是单纯点赞的 75 倍!  问一下各位 V 友,没有 X 推特运行相关的社群?最好是付费的? 
Lo pongo más detallado aunque sin imagen. Yo mismo he ido a Deepseek a hacer el análisis del código fuente de X y publicado en esta web. El resto de la gente puede hacer lo mismo pasando el enlace de la misma y comprobarlo Recompensa mucho conversar xai-org/x-algorithm t.co
X For You Feed Algorithm: the core code that determines which posts a viewer sees in the For You feed on X (34k stars) What it does All text below is quoted directly from the project README. >Algorithm powering the For You feed on X Key Design Decisions: - Multi-Action Prediction: Rather than predicting a single "relevance" score, the model predicts probabilities for many actions. Combining them into one number is a separate, explicit step. - Candidate Isolation in Ranking: This ensures the score for a post doesn't depend on which other posts are in the batch, making scores consistent and cacheable. - Hash-Based Embeddings: Both retrieval and ranking use multiple hash functions for embedding lookup, so there is no vocabulary to maintain and a new post is representable immediately. - Ranking and Visibility Are Separate: Ranking decides the order. Visibility filtering decides whether a post can be shown at all. Different services, different inputs, different rules. - Separation of pipeline execution and monitoring from business logic - Parallel execution of independent stages and graceful error handling - Easy addition of new sources, hydrations, filters, and scorers >Two pipelines do the work. The Post Pipeline finds, ranks and filters posts. The Blending Pipeline wraps it and adds what the model does not rank: ads, Who to Follow recommendations, prompts. Repository xai-org/x-algorithm Repository stats |Metric|Value| |:-|:-| |Stars|33,850| |Forks|5.5k| |Last release|None| |Languages|Rust 45.5%, Python 29.3%, Scala 17.1%| |Contributors|3| |AI contributor accounts (Claude / Codex / Cursor / Copilot)|@claude (1 commits)| |AI co-authored commits|Claude: 1| Main contributor |Field|Value| |:-|:-| |GitHub|@joshs1017dev| |Commits to this repo|1 (top contributor)| |Followers|5| ────────────────────────────── 📌 How many great GitHub repos have you discovered and completely forgotten about? Don't let another useful tool disappear into your Reddit feed. Get the community's best repos, organized by category, plus key takeaways from real developer discussions, delivered to your inbox twice a week. 📬 Never lose track of great repos again. Subscribe free.
github.com/xai-org/x-algorithm/blob/main/home-mix… なるほど。ここにちゃんと書いてあるね。
xai-org/x-algorithm なんと!バッチリ公開されてる情報だった。 凍結に関してもこのくらい透明性を確保すればいいのに。(-_-) #ツイッター
O algoritmo do Twitter é gratuitamente disponibilizado ao público: xai-org/x-algorithm. Não há nada que o (admitido) corrupto saiba como sobre funciona o "algoritmo" que não esteja aí
How to master the X algorithm (how it works and my own tips) In this guide, I’ll break down what X’s published algorithm reveals, what those mechanics mean in practice, and the step-by-step framework I’ve personally used to scale my accounts. Specifically, we’ll cover how the algorithm weighs different interactions, what triggers visibility penalties, survival tips for your spicy account and six actionable, multi-point strategies you can apply today to boost your reach, leverage platform tools, and turn attention into real growth. Part 1: How the X Algorithm Actually Works Not all engagement is created equal. A like, a reply, and a share don’t carry the same weight. In fact, some interactions are weighted over 30 times more heavily than a like. X predicts how likely someone is to interact with your post, assigns specific weights to those potential actions, and combines them to determine where posts appear in the For You feed. Note: These weights apply to predicted engagement probabilities, not just raw counts. 20 likes don’t automatically equal one link share, but the weights reveal precisely which interactions X prioritizes. What Boosts Your Reach 📈 🔗 Copy-link share: +20 🫂 Reply from a mutual: +15 💬 Standard reply: +5 🔁 Quote post: +5 ✉️ DM share: +5 👤 Follow: +4 📤 Other shares: +2 🔄 Repost: +1 ❤️ Like: +0.66 Takeaway: A copied link share carries approximately 30 times the ranking weight of a like. Furthermore, replies between mutual followers receive an additional boost, bringing their weight up to +15. X also monitors secondary signals like profile clicks, viewing time, and whether people stop scrolling to read your text. What Hurts Your Reach 📉 🚩 Report: −234 🔇 Mute: −58.8 👎 Not interested: −52.27 🚫 Block: −31.2 Negative feedback carries massive penalties in the ranking system. Keeping casual viewers from muting or reporting your content is just as important as getting likes. Three More Things Worth Knowing 1. Your first 48 hours matter: Posts older than approximately 48 hours are generally filtered out of the main recommendation pipeline. 2. Smaller accounts get discovery chances: Eligible smaller accounts can receive targeted exposure for fresh, original posts. 3. Content restrictions apply: X filters certain content before ranking it. This is especially vital for adult creators, whose posts may have limited recommendation eligibility regardless of engagement if flagged as sensitive. Part 2: 3 Core Strategies to Grow Your Account 1. Master the Rhythm of Posting and Replying 2. Daily cadence: Maintain a steady daily rhythm of roughly two to five original posts plus consistent replies, spaced out rather than dumped all at once. Combine text posts with at least one picture or short clip per day. Smart commenting: Comment thoughtfully under posts already getting traction in your niche, especially new ones. After a week, review your replies to see which ones drove the most profile visits and new followers. Leverage conversations: Reply to comments on your own posts quickly. If you can strike up an active back and forth conversation, it acts as a massive growth factor since replies from mutuals scale up to +15 points each. A simple follower is +5 points per reply. Follow back people who consistently engage with you. 2. Build Real Peer Engagement in Your Niche Comment under other creators posts with thoughts that show personality and add value, rather than dropping generic fire emojis. Genuine, reciprocal peer interaction compounds over time. 3. Balance Personality and Teasing Purely explicit posts are frequently flagged and largely removed from recommendations to non-followers. A heavy explicit day can even trigger a temporary account-level penalty, suppressing your non-explicit reach as well. Lead with personality: who you are, what you think, your goals, humor, and lighter teasing. Save explicitly adult content for platforms where users actually pay. Explicit language alone can trigger algorithmic filters, so keep text light for maximum discovery. An explicit post every now and then is fine, but high frequency will kill your account reach. Feel free to ask any questions if you should have some 🫶 Also, check out my profile for the full post with 6 of my own X strategies and 3 additional account survival tips.
Xアルゴリズムの仕組み:公開ソースコードの重みを全部読んでみた(10月27日の変更まで) :::note info 本記事には筆者が開発に関わっているサービス(GetXAPI)の紹介を含みます。重みと設定値はすべて、2026年10月28日(UTC)に xai-org/x-algorithm リポジトリを筆者が直接読んで確認したものです。 ::: 「いいねは0.5点」「通報1件でいいね355件分のマイナス」「プロフィールクリックは12点」。Xのアルゴリズムについて、日本語の解説記事やAIの回答にはこうした数字が並んでいます。ところが、いま公開されているコードを読むと、いくつかは2023年の旧Twitterのコードの数字で、いくつかは10月13日より前の古い値です。この記事では、Xのアルゴリズムの仕組みを公開ソースコードから行番号つきで整理し、重みがいつ変わったかも全コミットから洗い出しました。 2026年10月28日更新。重みは commit 2f25214(10月27日 01:28 UTC)の home-mixer/params/param.rs から引用し、翌日の commit 5ed7963 でも重みに変更がないことを確認しています。 Xのアルゴリズムはどういう仕組みですか? リクエストのたびに候補の投稿を集め、各投稿に対してあなたが取りそうな行動の確率を予測し、重みをかけて足し合わせた点数で並べます。 候補はフォロー中のアカウント(Thunder)と、フォロー外のアカウント(Phoenixの検索、SimClusters、人気投稿)から集まります。点数は Σ(重み × その行動の予測確率) で、READMEにもこの式が書かれています。投稿から48時間を過ぎた投稿はスコア計算の前に除外されます。 いいねの重みは0.5ですか? 10月13日までは0.5でした。 commit e1a0375 で0.6に、翌日の 17c96bf で 0.66 に上がりました。0.5という数字は、いまも vm-ranker/params.rs の3行目にフォールバック(既定値)として残っています。本番の設定から同期されているのは home-mixer 側のファイル(1行目に「mirrored from config feature-switch defaults」とある)なので、引用するならこちらです。 通報1件はいいね何件分ですか? そういう換算はできません。 重みは「回数」ではなく「予測確率」にかかります。param.rs の319〜346行目のコメントでは、X自身が「通報1件でいいね468件が帳消し」という読み方を誤りと書き、通報はいいねより1,000倍以上起きにくいと説明しています。 「Heavy Ranker」「プロフィールクリック12点」は今も正しいですか? いいえ、2023年の旧Twitterのリポジトリ(twitter/the-algorithm)の話です。 現在のおすすめはPhoenixモデルで順位付けされ、プロフィールクリックの重みは 0、作者のリプライ返し(+75)という項目も今の重み一覧にはありません。「候補を約1,500件抽出」という数字も、現在のコードでは確認できませんでした。 Xアルゴリズムの重み一覧(commit 2f25214) home-mixer/params/param.rs の348行目(FavoriteWeight)から460行目(ReportWeight)までの値です。 | 予測する行動 | 重み | |---|---| | リンクをコピーして共有 | 20.0 | | リプライ | 5.0(相互フォロー同士なら +15.0) | | 引用 | 5.0 | | DMで共有 | 5.0 | | 作者をフォロー | 4.0 | | 共有 | 2.0 | | リポスト | 1.0 | | いいね | 0.66 | | クリック後の滞在時間(連続値) | 0.4 | | クリック | 0.3 | | リンクを開く | 0.2 | | 画像の拡大、滞在 | 各0.05 | | 動画を開く | 0.02 | | 滞在時間(連続値) | 0.006 | | プロフィールクリック、動画の視聴品質 | 0 | | 滞在しない | −0.02 | | ブロック | −31.2 | | 興味がない | −52.272 | | ミュート | −58.8 | | 通報 | −234 | ブックマークには重みがありません。ただし viewer_history.rs の30行目で ClientTweetBookmark は「ポジティブな行動」に入っていて、モデルが読む行動履歴には使われます。 重みはいつ変わった?(8月13日以降の全変更) param.rs に触れた48コミットをすべて再生し、重みが変わったものだけを抜き出しました。 | 日付 | コミット | 変更 | |---|---|---| | 8月25日 | 0d3cdd8 | 滞在 0→0.05、動画を開く 0.05→0.07、動画の視聴品質 0.05→0 | | 9月29日 | a707cc2 | クリック 0.4→0.3、クリック後の滞在時間 0→0.4、興味がない −43.2→−47.52 | | 10月7日 | 78460ca | 未探索の投稿 0.02→0.015 | | 10月13日 | e1a0375 | いいね 0.5→0.6、動画を開く 0.07→0.02、滞在時間 0.004→0.006 | | 10月14日 | 17c96bf | いいね 0.6→0.66、興味がない −47.52→−52.272 | 相互フォローのリプライ加点は同期ファイルができる前の変更で、リポジトリ内の docs/BIDIRECTIONAL_BOOST_CHANGE.md によると7月13日に20で導入され、7月24日に15へ下げられています。 10月27日の変更で何が変わった? 重みは変わっていません。 変わったのは VMRankerSendDebiasInputs が false から true になったこと(param.rs 508行目)で、投稿ごとに7つの特徴量(動画の有無、最長動画の長さ、画像の有無、メディア数、文字量、改行数、URLの有無)が再ランキングのサービスに送られるようになりました。ただし、それを使う側の UserDebiasEnabled は vm-ranker/params.rs で false のままで、オフのときは処理がそのまま返ります。「リンク付き投稿は減点される」という説明も見かけますが、重みの上ではリンクを開く行動は +0.2 で、マイナスの項目はありません。 自分のアカウントに影響があったか測る コードからわかるのは「何が変わったか」までです。自分の投稿に効いたかは、変更日の前後で数字を比べるしかありません。GetXAPIのユーザー投稿取得エンドポイントは、最新投稿約20件の表示回数・いいね・リプライ・リポスト・引用・ブックマークを 1回0.001ドル で返します。 import csv import os from datetime import datetime, timezone import requests API_KEY = os.environ["GETXAPI_KEY"] FIELDS = ["viewCount", "likeCount", "replyCount", "retweetCount", "quoteCount", "bookmarkCount"] def snapshot(username, out="post_metrics.csv"): r = requests.get( "https://api.getxapi.com/twitter/user/tweets", params={"userName": username}, headers={"Authorization": f"Bearer {API_KEY}"}, timeout=30, ) r.raise_for_status() taken = datetime.now(timezone.utc).isoformat(timespec="seconds") new_file = not os.path.exists(out) with open(out, "a", newline="", encoding="utf-8") as f: w = csv.writer(f) if new_file: w.writerow(["taken_at", "post_id", "created_at"] + FIELDS) for p in r.json()["tweets"]: w.writerow([taken, p["id"], p["createdAt"]] + [p.get(k) for k in FIELDS]) snapshot("your_handle") 検証結果: 2026年10月28日に公開アカウント(@nikitabier)で実行し、1回の呼び出しで 22件 の投稿と6つの指標がCSVに書き込まれました。cronで毎日動かし、リポジトリのコミット履歴と見比べてください。 このコードからわからないこと - 返信欄の並び順。 XのヘルプセンターによるとX Premium(有料)の加入有無は返信の並びに考慮されますが、おすすめの順位付けコードにはPremiumや認証の項目はありませんでした。 - 非公開の部分。 一部のルールファイルとGroxという分類器のプロンプトは公開されていません。 - 一人ひとりの順位。 予測確率は人によって違うので、同じ投稿でも点数は人ごとに変わります。 よくある質問 Xのアルゴリズムはオープンソースですか? はい。github.com/xai-org/x-algorithm に、おすすめタイムラインのパイプライン、重み、フィルター、Phoenixモデルのコードが公開されています。一部のルールファイルと分類器のプロンプトは非公開です。 おすすめに表示させない・おすすめを変えるには? 見たくない投稿には「興味がない」(重み −52.272)を使い、アカウントのミュートやブロック、ミュートワードを設定すると、その投稿はスコア計算の前に除外されます。フォロー中のアカウントだけを見たいときは「フォロー中」タブに切り替えます。 Xのアルゴリズムはどのくらいの頻度で変わりますか? リポジトリにはほぼ毎日コミットがありますが、重みが変わったのは8月13日から10月28日までで5回です。多くのコミットは同期時刻の更新や、オフの新しい設定の追加です。 参考 - xai-org/x-algorithm README(commit 2f25214): github.com/xai-org/x-algorithm/blob/2f252142b9284… - home-mixer/params/param.rs(重み、commit 2f25214): github.com/xai-org/x-algorithm/blob/2f252142b9284… - vm-ranker/params.rs(フォールバック値、UserDebiasEnabled): github.com/xai-org/x-algorithm/blob/2f252142b9284… - param.rs のコミット履歴: github.com/xai-org/x-algorithm/commits/main/home-… - 10月27日の差分: github.com/xai-org/x-algorithm/compare/6258a15...… - X ヘルプセンター「おすすめタイムラインについて」: help.x.com - twitter/the-algorithm(2023年の旧Twitter版): twitter/the-algorithm - GetXAPI docs「User Tweets」: docs.getxapi.com - 英語版の詳しい解説: getxapi.com
btw, you can have Grok Bot monitor and text you whenever the 𝕏 algo changes. Just copy/paste this into your Bot: “You are my 𝕏 algo Bot. Your job is to monitor this GitHub [xai-org/x-algorithm] every few days, and text me updates. Keep the updates concise, and only inform me of the high-impact changes I need to know as a creator.” Worth bookmarking.