X · The global conversation

From 500 million to a handful

Every day, about 500 million posts are published. You will see a few dozen. Between the two sits a machine that, in under a second and a half, picks, scores and ranks. In March 2023, Twitter (now X) published its code so anyone could read it. Here is how it works. ↗

A post’s journey · Four stages
  1. 1 · Candidates~1,500 out of hundreds of millions: half from people you follow, half from outside your network.
  2. 2 · ScoringA neural network predicts 10 interactions and adds them up with weights.
  3. 3 · FiltersBlocks, author diversity, balance and social proof.
  4. 4 · MixingAds and suggestions are blended in, and it reaches your screen.
The experience · Your live feed

Change the weights, change the feed

There are 16 candidate posts (made up). The model has already predicted how likely you are to do each thing with each one; those probabilities depend on your interests. You control the weights and the filters. Tap a post in the feed to see the math behind its score.

Your interests
Weight of each interaction
Filters and rules

“Published” weights: the ones in the Heavy Ranker README (April 5, 2023). The posts, the probabilities and the effect of each filter are illustrative.

From people you follow—
Dropped—
Top spot—
    Dropped by the filters (0)
      Step 1 · Inside and outside your network

      Communities, not just followers

      For the accounts you follow, a model called Real Graph estimates how likely you are to engage with each one. To find posts from people you don’t follow, the system walks the graph: what did the people you follow like recently? Who has tastes similar to yours?

      The other route is SimClusters: about 145,000 communities discovered from who follows whom, recalculated every three weeks. ↗ You and every post live in several communities at once, and how close you are counts as relevance.

      Step 2 · Why a reply is worth more than a like

      Probabilities times weights

      The model doesn’t “count” likes: it predicts how likely you are to do each thing. Liking is easy and common, so its weight is small (0.5). A reply that the author answers is rare and a sign of real conversation: it weighs 75. A report subtracts 369. ↗

      Because probabilities are multiplied, a high weight on something nearly impossible adds little. Try “Likes only” and watch the lighter posts climb.

      The algorithm in numbers (2023)
      Posts per day~500 M

      What was published across the whole network in 2023, according to the engineering blog. ↗

      Candidates1,500

      The ones that reach the ranking stage on every visit. ↗

      Ranking~48 M

      Parameters in the neural network that scores, with thousands of features per post. ↗

      Communities145,000

      The SimClusters, recalculated every three weeks. ↗

      Runs5 B

      The full pipeline runs about 5 billion times a day. ↗

      Time< 1.5 s

      On average, even though each run uses 220 s of CPU spread across many machines. ↗

      Vision · Status

      A public square with its code in plain sight

      When it published its algorithm in 2023, Twitter said the goal was full transparency about how its systems work. ↗ Here is where each piece stands:

      • “For You” feed code published on GitHub (2023)Operational
      • New algorithm with a Transformer model, also open (2026)Operational
      • “Under the Hood”: see the labels that limit your account’s reachTesting
      • See inside the app why each post shows up in your feedConcept
      • An open, transparent global conversationConcept

      Approximate status as of October 2026; things may have moved on. The 2026 repository is updated almost daily; Under the Hood is a pilot that X says it will open up gradually. ↗ Seeing why each post appears was announced in 2023 as work in progress, with no date. ↗ Since February 2026, X has been part of SpaceX. ↗