The X Algorithm Handbook
Rules and playbooks distilled from X's official open-source recommendation algorithm (2025-09 update). Every number cites a source file. You can check it all yourself.
twitter/the-algorithm (latest commit c54bec0, 2025-09-03, "update for-you recommendations code") and twitter/the-algorithm-ml. In the 2025 code, the model weights are set remotely (the defaults in code are 0). The weight numbers quoted here come from the last table X made public (April 2023) β the official README still points to them. The open-source code may differ from what runs in production. Treat every number as a strong hint about scale, not an exact value.
What is this
X (Twitter) put its recommendation algorithm β the code that decides which posts you see β on GitHub. It even got a quiet update in September 2025. That means for the first time, questions like "how do I grow?" and "why is my reach dead?" have answers you can actually check.
This handbook pulls out every rule that matters for creators, organized as Rules β Time β Playbooks by situation, so you can look things up any time. It's written for people just starting out, small accounts, and people reviving old accounts.
The big picture: a post's journey
Scoring: the points table
The whole algorithm boils down to one simple idea. Think of it like a video game:
The model guesses what each reader will do with your post. Each action is worth points (from the last table X made public):
| What a reader does | Points | Notes |
|---|---|---|
| Replies to you β and you answer back | +75 | The biggest prize in the whole game |
| Replies to your post | +13.5 | Worth 27 likes |
| Visits your profile, then likes or replies | +12 | Your pinned post matters |
| Opens your post and stays 2+ minutes | +10β11 | Deep reading counts |
| Reposts it | +1 | |
| Likes it | +0.5 | The weakest positive signal |
| Taps "not interested" / mutes / blocks | β74 | β erases 148 likes |
| Reports your post | β369 | β erases 738 likes |
Source: the-algorithm-ml/projects/home/recap/README.md; weights are read in home-mixer/.../param/HomeGlobalParams.scala (2025 version sets them remotely; defaults are 0, but the scale still holds)
New in the 2025 update
The September 2025 code added new things the model now predicts. That tells you what X is rewarding now:
- Bookmarks, shares, screenshots β "worth saving" earns its own points
- Dwell time β making people stop and read = points
- Video watch time (down to the millisecond), quality views, immersive views β video got a much bigger scoreboard
- Phoenix scorer β a new model that reads each user's recent behavior
- Grok content tags β AI labels content quality (see Limits)
Source: home-mixer/.../model/PredictedScoreFeature.scala (15 prediction heads), PhoenixPredictedScoreFeature.scala
Boosts & penalties (the multipliers)
After the model scores your post, a chain of multipliers gets applied:
| Multiplier | Value | Meaning |
|---|---|---|
| Out-of-network discount | Γ0.75 | Non-followers see your post at 75% strength |
| Reply discount | Γ0.75 | Replies shared as content get 75% strength |
| Same-author discount | Γ1 β Γ0.625 β Γ0.4375β¦ | Your 2nd, 3rd post in one refresh decays by 0.75Γ0.5^n+0.25, floor Γ0.25. Spamming doesn't work |
| Feedback fatigue | Γ0.2 to start | After someone taps "not interested" on you, your posts show to them at 20% strength. Recovers 0.2 every 35 days β full recovery takes 140 days |
| Grok "slop" decay | Γ(0β1) | Content Grok flags as low-effort filler gets multiplied down |
| Live content boost | dynamic | Only for followed authors with 1M+ followers. Not your problem yet |
Source: home-mixer/.../scorer/RescoringFactorProvider.scala, DiversityDiscountProvider.scala, FeedbackFatigueScorer.scala (140 days / floor 0.2), GrokSlopScoreRescorer.scala, ScoredTweetsParam.scala (the 0.75 defaults)
Filters (instant removal, no discount)
- Posts already seen / already served, including their reply chains
- Same-author dedup (usually one post per author per refresh)
- Media-cluster dedup β reposting the same images/videos gets detected and removed
- Grok NSFW / gore filters
- Everything from authors the user muted or blocked
Source: home-mixer/.../functional_component/filter/ (18 filters)
Where traffic comes from
About 50% of the For You feed comes from accounts people follow (the Earlybird index holds the last 7 days of posts). The other 50% comes from recommendations to strangers. Four doors lead to strangers:
| Door | How it works | What it means for small accounts |
|---|---|---|
| UTEG like-spread | Someone likes your post β their followers may see "X liked this." The interaction graph only keeps 24β48 hours | One like from a real account with real followers beats 50 bot likes (bots have no followers β the chain breaks) |
| SimClusters | ~145k interest "neighborhoods." Your neighborhood is decided by who follows and likes you. Each liker's interests get added to your post's profile in real time | Stay in one lane and your neighborhood label gets sharp. Random followers and like-swaps blur your label |
| Search | Every public post enters the search index | Doesn't care about followers. Use words people actually search for β traffic is possible on day one |
| Communities | A separate pipeline sends posts straight to community members | Reach a whole community with 0 followers. The most underrated door for new accounts |
Source: README.md (the 50% split), src/scala/.../user_tweet_entity_graph/README.md (24β48h), simclusters_v2/README.md, ScoredTweetsRecommendationPipelineConfig.scala (9 candidate pipelines)
Account trust (TweepCred)
Every account has a 0β100 trust score, computed with PageRank β the same idea Google used to rank web pages. Followers pass trust to you. The more trusted your followers are, the more they pass. The key rules:
| Rule | Value | In the code |
|---|---|---|
| Suspended account | base score = 0 | if (isSuspended) 0 |
| Verified account | base score = 100 (max) | if (isVerified) 100 |
| Regular account ceiling | base score tops out at 55 | device weight 0.55 Γ age weight Γ 100 |
| Account-age weight | maxes out at 30 days | if (age > 30) 1.0 |
| Restricted account | base score Γ0.1 | score *= 0.1 |
| Follow-ratio penalty (base) | following > 500 AND following/followers > 0.6 β exponential decay | UserMass.scala |
| Follow-ratio penalty (PageRank) | following > 2500 β divided by up to 50 | Reputation.scala |
| Low-trust filter | TweepCred < 40 gets filtered from follow recommendations | LowTweepCredFollowStore.scala |
Source: src/scala/com/twitter/graph/batch/job/tweepcred/UserMass.scala, Reputation.scala
Limits & safety labels
"Shadowban" isn't magic β in the code it's specific labels with specific actions. Three levels:
- Drop (fully hidden): the content or account stops appearing
- Downrank: sorted to the bottom
- Conversation folding: replies get hidden behind "show more" in a low-quality section
| Label | What triggers it | Result |
|---|---|---|
NotGraduated | New account that hasn't "graduated" | May not be shown to non-followers at all; replies folded |
EngagementSpammer | Like-swap groups, fake engagement | Drop |
DuplicateContent | Reposted / copied content | Drop |
CopypastaSpam | Copy-pasting viral posts | Downrank / folded |
UntrustedUrl | Sketchy links in replies | Folded into the abusive-quality section |
HighToxicityScore | High score from the toxicity model (pToxicity) | Downranked by per-language thresholds |
NsfwHighPrecision etc. | NSFW model hits | Drop / downrank |
Source: visibilitylib/.../UserLabelRules.scala, DownrankingRules.scala, trust_and_safety_models/README.md
Negative feedback (block / mute / report / "not interested") is counted in 1-day / 7-day / 30-day windows β old mistakes fall out of the stats after 30 days (but feedback fatigue runs its own 140-day timer).
Source: representation-scorer/.../UserSignalServiceRecentEngagementsClient.scala
Behavior dictionary: what every action does
Every action has two sides: when you do it (it shapes your profile and relationships) and when you receive it (it changes your post's score). The repo root file RETREIVAL_SIGNALS.md lists all 18 signals and exactly which systems consume each one. Here they are, one by one.
Signal-flow abbreviations: USS=User Signal Service Β· SC=SimClusters neighborhoods Β· TwHIN=knowledge-graph embeddings Β· UTEG=like-spread graph Β· FRS=follow recommendations Β· LR=light ranker
π Posting (original)
| When you do it | Enters your followers' in-network candidate pool (7-day shelf life); your 2nd+ post in one refresh decays from Γ0.625; duplicate media gets cluster-deduped; Grok tags content quality |
|---|---|
| Key clocks | First hour (buzz features halve every 30 min) β 48 hours (like-spread window) β 7 days (candidate pool) β forever (search) |
| Playbook | 1β3 good posts a day; post when your readers are online; guard the first hour; silent after 48 hours = move on; never post in rapid bursts |
π¬ Replying
| When you do it | Visible to everyone reading the conversation (the only surface that ignores follower count); distributed as content at Γ0.75; charges the relationship edge between you two; spammy replies get folded into the low-quality section |
|---|---|
| When you receive it | +13.5; answer that reply and it triggers the game's biggest prize: +75 |
| Signal flow | USS Β· TwHIN Β· UTEG Β· FRS Β· LR |
| Playbook | A small account's main quest. 3β5 thoughtful replies a day; answer every comment under your own posts (each one is a +75 chance); quality over volume |
β€οΈ Liking (and unliking)
| When you do it | Four effects: β shapes your interest profile (decides what you see); β‘ may broadcast to your followers ("X liked", 48-hour window) β a like is a public endorsement; β’ your interest vector gets added to that post's profile in real time, helping it find its audience; β£ keeps funding the author's neighborhood label with a 100-day half-life |
|---|---|
| When you receive it | +0.5 (weakest positive signal, but with hidden embedding and spread value); who likes you decides who your post gets shown to next |
| Signal flow | Like: all six systems | Unlike: USS Β· SC (negative β withdraws the interest vote) |
| Playbook | Like deliberately inside your niche β it's the cheapest support you can give and a vote for your own profile; random likes pollute your label for a full batch cycle (~a week) |
π Reposting & quoting
| When you do it | Distributes the content to your followers at full strength (no discount, same stage as originals); a quote also creates your own new post that can earn engagement; both count as repost signals shaping your profile |
|---|---|
| When you receive it | +1 (quotes carry the same weight as reposts in Phoenix) |
| Signal flow | USS Β· TwHIN Β· UTEG Β· FRS Β· LR |
| Playbook | Quote beats plain repost: you gain a content surface and a conversation entry of your own. Reposting good niche content is a cheap way to stay daily-active and keep follower edges warm |
π Bookmarking
| When you do it | A private positive signal (USS only) β not public, doesn't spread, quietly trains your profile |
|---|---|
| When you receive it | New 2025 prediction head (BookmarkParam) with its own positive weight β "worth saving" is now rewarded on its own |
| Signal flow | USS |
| Playbook | Deliberately make save-worthy formats: checklists, tutorials, comparison tables, reference posts. Bookmark rate is one of the best new metrics to watch in analytics |
π€ Sharing & screenshots
| When you do it | Shares (including copy-link and off-platform shares) feed USS / FRS; a strong interest statement |
|---|---|
| When you receive it | New 2025 Share prediction head (Phoenix tracks 3 share actions); screenshots are their own prediction head too (ScreenshotParam) β getting screenshotted earns points |
| Signal flow | USS Β· FRS |
| Playbook | Make content people forward to group chats; self-contained, one-screen layouts are screenshot-friendly. "Worth sending to a friend" is the new banger standard |
β Following
| When you do it | The strongest profile vote there is: all six systems consume it, often as both feature and training label. Up to 500 follows is penalty-free; past that, keep following β€ 0.6 Γ followers |
|---|---|
| When you receive it | Passive: trust inflow (PageRank) + a neighborhood vote + you become a "friend of a friend" to all their followers. Active: edge strength peaks at the follow moment β a 7-day trial that silently zeroes out without interaction |
| Signal flow | USS Β· SC Β· TwHIN Β· UTEG Β· FRS |
| Playbook | Treat your follow list as a "what's my niche" declaration form; when someone follows you, go reply to one of their posts β weld the edge shut while it's hot, much faster than waiting for their like |
β Unfollowing
| When you do it | Recorded as a "recently unfollowed" signal (USS feature) that shapes what gets recommended to you; does not directly hurt your own trust score β pruning is safe |
|---|---|
| When you receive it | You lose that person's trust inflow and in-network eligibility; follow-then-unfollow games leave a data trail |
| Signal flow | USS |
| Playbook | Prune old follow-for-follow lists boldly (especially if you follow 2,500+); never play the follow/unfollow game |
π Muting & blocking
| When you do it | USS / FRS features β the system stops recommending those accounts to you; cleaning your timeline = improving your own consumption profile. Use freely |
|---|---|
| When you receive it | Counts into the negative-feedback group (the β74 tier), tracked in 1/7/30-day windows; pile up enough and account-level labels trigger |
| Signal flow | USS Β· FRS |
| Playbook | Avoid block-magnet behavior: @-spamming, promo comments under strangers' posts, showing up too often in the wrong people's feeds |
π "Not interested"
| When you do it | Trains your own feed (USS feature); hits the author at the β74 tier |
|---|---|
| When you receive it | β74 (β erases 148 likes) + 140 days of feedback fatigue from that user (your posts start at Γ0.2 for them, recovering one step every 35 days) |
| Signal flow | USS |
| Playbook | The most underrated liability in the system. Trend-jacking to the wrong crowd, clickbait, and hard selling are all net losses by the math β reach 100 right people, never bother 10,000 wrong ones |
π¨ Reporting
| When you do it | USS feature, trains your feed |
|---|---|
| When you receive it | β369 (the heaviest penalty in the system, β erases 738 likes); high report rates trigger safety labels like HighPReportedTweetScore β downrank / folding |
| Signal flow | USS |
| Playbook | The red-line list: rage bait, rule-edge testing, mass DMs, sketchy links. One report costs more than one banger earns |
π Browsing (clicks / dwell / video / profile visits)
| When you do it | All implicit signals quietly shaping your profile: detail-page clicks (USS/FRS, LR training labels), watching videos past a seconds/percentage bar (USS/SC, LR labels), notification opens and Notifications-tab clicks (USS/SC/TwHIN/FRS) |
|---|---|
| When you receive it | Open + stay 2 minutes +10β11; profile visit that converts +12; video watch time counted to the millisecond (VideoWatchTimeMsParam); dwell is its own prediction head |
| Signal flow | USS Β· SC Β· FRS Β· LR (varies by action) |
| Playbook | Build "open it and stay" structure: a first-line hook, long posts that fold, images that carry detail; videos need β₯10 seconds to enter the quality-view system; make your profile worth the click β the pinned post is your +12 landing page |
Sources for this section: RETREIVAL_SIGNALS.md (18 signals Γ 6 systems matrix), PredictedScoreFeature.scala, PhoenixPredictedScoreFeature.scala, FeedbackFatigueScorer.scala, UTEG README
The seven clocks
The whole system runs on timers, like ovens in a kitchen. Hour-level clocks decide a post's fate. Day-level clocks decide relationships. Week-level clocks decide your label. Hundred-day clocks decide compound interest.
| Clock | Value | What it means for you | Source |
|---|---|---|---|
| Real-time engagement features | half-life 30 minutes | The first hour decides a post's fate. Stay and answer every comment | TimelinesOnlineAggregationConfigBase.scala |
| UTEG interaction graph | 24β48 hours | Nothing after 48 hours? Move on. Post the next one | UTEG README |
| RealGraph edge weight | daily decay Γ0.955, half-life β 7 days; updates daily | Go quiet for a week and every relationship loses half its strength. A little every day beats a Sunday binge | InteractionGraphAggregationConfig.scala |
| Earlybird index | 7 days | How long a post stays in the recommendation pool | search README |
| SimClusters batch job | runs every 7 days | What you do this week becomes your label next week. Off-topic likes pollute your label for a full cycle | InterestedInFromKnownFor.scala batchIncrement=Days(7) |
| Like-edge half-life | 100 days | Every real like keeps funding your neighborhood label for 3+ months β compound interest | ProducerNormsAndCounts.scala |
| Feedback fatigue | recovers one step every 35 days, full at 140 days | Annoying one reader costs you four months | FeedbackFatigueScorer.scala |
Playbook β New account (days 0β30)
Your situation: you wear the NotGraduated "new kid" badge, your age weight isn't full, and the algorithm doesn't know who you are. The goal of the first 30 days is not followers. It's teaching the algorithm who you are, and earning a handful of real relationships.
- Day 0: photo, bio, pinned post all done (profile-visit conversions are worth +12); valid device linked; Premium optional (base trust 55 β 100); follow 100β300 accounts in your topic (under 500 is safe) β this is your first "who I am" form for the algorithm
- Week 1: replies only. Three to five thoughtful replies a day. Goal: a few real accounts in your topic notice you. Post your own stuff freely as practice β ignore the numbers
- Week 2: the first label-maker cycle lands; the algorithm starts to know you. Stay on topic, no random likes. Start posting in 2β3 active Communities
- Weeks 3β4: post more, use searchable words. The test: replies get steady engagement β your content works, do more. Nobody responds β fix the content. It's not a shadowban
- Day 30: age weight full, new-kid badge mostly behind you. Now push originals for real
Playbook β‘ Old account, 0 followers
Your situation: better than a new account β age weight full β, no new-kid badge β, clean record β. But like a new account: no relationships, no neighborhood. Run the new-account playbook, skip the 30-day waiting period. Every clock starts today.
- Do the Day 0 checklist, then start from "Week 1." Same rhythm
- Your edge: you can push hard from day one β no badge to outgrow
- Door priority: replies > Communities > search keywords > earning that first like from someone with real followers (UTEG)
Playbook β’ Waking up a dormant account (followers, but years of silence)
Your situation: your structural assets survived (trust score, follower graph, age). Your behavioral assets are dead: the friendship strength between you and every follower has decayed to zero. To the algorithm, your followers are now strangers who happen to follow you. Your neighborhood label is blurry.
- Audit first: followers still active and on-topic β focus on reconnecting; mostly dead or you're switching topics β run the 0-follower playbook
- First two weeks = relight the edges: go reply to and like your still-active followers' posts. Earn even one like back. The decay math favors you: recent interactions far outweigh old silence β a few new touches beat years of quiet
- Be an active reader for a week first: rebuilds your interest signals and reconnects edges at the same time
- Prune old follows: if you followed thousands back in the day, trim to the safe line (unfollowing doesn't hurt your own trust)
- Refresh your profile before posting again: when old followers see you resurface, their first glance decides between a like-back and an unfollow
- Expect: 3β6 weeks to rebuild normal distribution. If weeks pass with followers visibly seeing nothing and zero engagement, suspect an old safety label β appeal or start fresh
Playbook β£ Changing your niche
Your situation: your neighborhood label points at your old topic. Posting new-topic content right away β it goes to old followers first β "not interested" (β74) β terrible start.
- The order must be: interact first, post later. Spend 2β3 weeks engaging hard in the new community (follow, like, reply)
- Wait until people from the new community start liking you β their interest vectors reshape your post profiles and your label in real time
- Then ramp up new-topic originals. You can taper old-topic content; no need to zero it out
- Remember the weekly clock: every repositioning takes at least 2 batch cycles (~14 days) to settle
Playbook β€ Every post: the checklist
- Timing: post when your target readers are online
- Guard the first hour (30-minute half-life): answer every single comment β each answer is a +75 chance
- 48-hour review: if it's spreading, keep tending it; if it's silent, move on β the post keeps working through search (7-day pool + permanent search index)
- Never: post in rapid bursts (2nd post drops to Γ0.625), bait clicks (β74 to start), buy fake engagement (broken chains = wasted money), repost duplicate media (cluster dedup filters it out)
FAQ
Q: What does one new follower actually give me? The chance they like my stuff again is low, right?
Passive benefits (work even if they never act): β they pass trust to you continuously (PageRank); β‘ they cast a vote for which neighborhood you belong to; β’ you become a "friend of a friend" to all of their followers (a social-proof feature in ranking).
Active benefits (with an expiry date): at the moment of the follow, your friendship strength is at its peak β the first few days are when they're most likely to see you. Think of a follower as a 7-day trial subscription that silently cancels unless they interact. No interaction in the window β the edge decays to zero in weeks β they become a ghost follower.
The move: when someone follows you, go reply to one of their posts with something real. It's much faster than waiting for them to like you β and if they answer, that's a +75-class signal that welds the edge shut.
Q: Why do some million-follower accounts get no reach?
Followers aren't a bank balance β they're batteries that need recharging. Friendship strength halves every 7 days; years of silence zero it all out, leaving only passive benefits. The metric to watch is "how many familiar faces engage per post," not the follower count.
Q: Does buying followers or likes work?
At the code level it's useless and harmful: bots have no followers, so the like-spread chain breaks (you bought nothing); bot interest vectors are noise that blurs your neighborhood label; engineered engagement triggers the EngagementSpammer label = Drop.
Q: Am I shadowbanned?
Rule out the simple thing first: do your replies get any engagement? Yes β you're not banned, your content's distribution is just low. Total silence for weeks (followers can see you, zero engagement) β suspect a safety label; check the Limits section triggers and review your recent behavior (sketchy links, bulk actions, reports).
Q: Is Premium (verification) worth it?
For the base trust score, the code literally says if (isVerified) mass = 100, while unverified caps at 55. That's the part you can verify in the code; other perks (editing, long posts) are a separate question.
Q: How many posts per day?
The same-author discount (2nd post Γ0.625) plus cluster dedup means: 1β3 good posts beat 10 filler posts. Spend the saved time in the reply sections (the +75 gold mine).
Source file index
| Topic | File (path inside the repo) |
|---|---|
| Scoring formula & last public weights | the-algorithm-ml/projects/home/recap/README.md |
| 2025 dynamic weight params | home-mixer/server/src/main/scala/com/twitter/home_mixer/param/HomeGlobalParams.scala |
| 15 prediction heads | home-mixer/.../model/PredictedScoreFeature.scala |
| Boosts / penalties | home-mixer/.../scorer/RescoringFactorProvider.scala, DiversityDiscountProvider.scala |
| Feedback fatigue (140 days) | home-mixer/.../scorer/FeedbackFatigueScorer.scala |
| Grok slop decay | home-mixer/.../scorer/GrokSlopScoreRescorer.scala |
| Trust: base score | src/scala/com/twitter/graph/batch/job/tweepcred/UserMass.scala |
| Trust: PageRank adjustment | src/scala/com/twitter/graph/batch/job/tweepcred/Reputation.scala |
| Safety labels | visibilitylib/.../UserLabelRules.scala, DownrankingRules.scala |
| Edge decay (7 days) | src/scala/com/twitter/interaction_graph/scio/agg_all/InteractionGraphAggregationConfig.scala |
| Weekly neighborhood batch job | src/scala/com/twitter/simclusters_v2/scalding/InterestedInFromKnownFor.scala |
| 100-day like half-life | src/scala/com/twitter/simclusters_v2/scalding/ProducerNormsAndCounts.scala |
| Real-time aggregation (30 min) | src/scala/com/twitter/timelines/prediction/common/aggregates/real_time/TimelinesOnlineAggregationConfigBase.scala |
| Retrieval signals master list | RETREIVAL_SIGNALS.md (repo root) |