The X Algorithm Explained: How the “For You” Feed Actually Works [Jan 2026]
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:
- In-network content – Posts from accounts you follow
- 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.
![The X Algorithm Explained: How the “For You” Feed Actually Works [Jan 2026] 2 x algorithm for you feed](https://wallaroomedia.com/wp-content/uploads/2026/01/Gemini_Generated_Image_ptnvsptnvsptnvsp-1-300x300.png)
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:
- Query Hydration – Fetch user engagement history and metadata
- Candidate Sourcing – Pull content from Thunder and Phoenix
- Hydration – Enrich posts with author info, video duration, subscription status
- Pre-Scoring Filters – Remove duplicates, old posts, self-posts, blocked authors
- Scoring – Apply Phoenix predictions with weighted combinations
- Selection – Sort by score and select top candidates
- Post-Selection – Final visibility validation
![The X Algorithm Explained: How the “For You” Feed Actually Works [Jan 2026] 3 core components of x twitter algorithm](https://wallaroomedia.com/wp-content/uploads/2026/01/Gemini_Generated_Image_ptnvsptnvsptnvsp-2-300x300.png)
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.
![The X Algorithm Explained: How the “For You” Feed Actually Works [Jan 2026] 4 x algorithm content score](https://wallaroomedia.com/wp-content/uploads/2026/01/Gemini_Generated_Image_ptnvsptnvsptnvsp-3-300x300.png)
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