The X Algorithm Explained: How the “For You” Feed Actually Works [Jan 2026]

Gemini Generated Image ptnvsptnvsptnvsp scaled 1

The X Algorithm Explained: How the “For You” Feed Actually Works [Jan 2026]

X (formerly Twitter) has officially open-sourced the algorithm that powers its “For You” feed. This is a significant move toward algorithmic transparency—and gives us a direct look at how content gets ranked and distributed on the platform.

Here’s everything you need to know about how the X algorithm works.

How the X “For You” Feed Works

The X algorithm combines content from two sources:

  1. In-network content – Posts from accounts you follow
  2. Out-of-network content – Posts discovered through machine learning recommendations

Both content types are ranked using a Grok-based transformer model that predicts engagement probability. The highest-scoring content appears in your feed.

x algorithm for you feed

The Four Core Components of the X Algorithm

Thunder: In-Network Content Retrieval

Thunder is an in-memory data store that handles content from accounts you follow. It consumes real-time events via Kafka and maintains separate collections for:

  • Original posts
  • Replies and reposts
  • Video content

The result is sub-millisecond response times. When you open X, content from your followed accounts loads instantly without database queries.

Phoenix: Machine Learning Ranking

Phoenix is the ML system responsible for both retrieval and ranking.

For retrieval, Phoenix uses a two-tower neural network that encodes users and posts into mathematical embeddings. Finding relevant out-of-network content becomes a similarity search—identifying posts that are mathematically “close” to your demonstrated interests.

For ranking, Phoenix uses a transformer model that predicts engagement across 15+ different actions (more on this below).

Home Mixer: Pipeline Orchestration

Home Mixer coordinates the entire recommendation pipeline:

  1. Query Hydration – Fetch user engagement history and metadata
  2. Candidate Sourcing – Pull content from Thunder and Phoenix
  3. Hydration – Enrich posts with author info, video duration, subscription status
  4. Pre-Scoring Filters – Remove duplicates, old posts, self-posts, blocked authors
  5. Scoring – Apply Phoenix predictions with weighted combinations
  6. Selection – Sort by score and select top candidates
  7. Post-Selection – Final visibility validation

core components of x twitter algorithm

Candidate Pipeline: Modular Framework

The Candidate Pipeline provides reusable building blocks: Sources, Hydrators, Filters, Scorers, Selectors, and SideEffects. This modular architecture enables parallel processing and makes the system extensible.

How X Calculates Content Scores

This is where the X algorithm differs from traditional recommendation systems.

Instead of a single “relevance score,” the algorithm predicts probabilities across 15+ different user actions:

Positive signals:

  • Likes
  • Replies
  • Reposts
  • Profile clicks
  • Follows
  • Video watch time

Negative signals:

  • Blocks
  • Mutes
  • Reports
  • “Not interested” taps

The final score is calculated as a weighted sum:

Final Score = Σ (weight × probability of action)

Positive actions carry positive weights. Negative actions carry negative weights. Content that tends to get blocked or reported receives lower scores and reduced distribution.

x algorithm content score

Two Key Design Decisions

No Hand-Engineered Features

Traditional recommendation systems rely on thousands of manually crafted features: post length, hashtag count, time since posting, follower ratios, and engagement velocity.

X eliminated all hand-engineered features. The transformer model learns relevance patterns directly from engagement sequences. This reduces infrastructure complexity and allows the model to discover patterns that human engineers might miss.

Candidate Isolation During Scoring

During inference, candidate posts cannot “attend to” each other—they only see user context. This architectural choice means a post’s score remains consistent regardless of what other posts are in the same batch.

The benefit: scores are cacheable and reusable, which provides significant performance improvements at scale.

What This Means for X Users

Your engagement directly shapes your feed. Every like, reply, follow, block, and mute influences what the algorithm shows you next.

Negative signals carry real weight. When you mute an account or report a post, the algorithm learns from that feedback and adjusts accordingly.

Out-of-network discovery is embedding-based. The algorithm surfaces content that’s semantically similar to what you’ve engaged with before—not just popular content.

Technical Stack

The X algorithm codebase is:

  • 62.9% Rust – High-performance data pipeline
  • 37.1% Python – Machine learning components
  • License: Apache 2.0

The open-source release allows anyone to study, modify, or deploy the system.

Key Takeaways

  • X’s “For You” feed blends followed accounts with ML-discovered content
  • Content is ranked by a transformer predicting 15+ engagement actions
  • Negative signals (blocks, mutes, reports) actively suppress content
  • The system eliminated hand-crafted features in favor of learned representations
  • Candidate isolation enables efficient caching and consistent scoring

Source: https://github.com/xai-org/x-algorithm

W

Wallaroo Media

AI-powered ecommerce growth agency specializing in ads, email, and SEO for Shopify brands. We build growth systems, not campaigns.