X's For You feed is no longer a black box in the same way it was. The source release shows the core recommendation architecture, while the live weights, training data, and operational switches remain outside public view. In 2023, Elon Musk promised to open-source the X algorithm. In May 2026, xAI published a core For You feed code release under the repository. It is more than a high-level description: it includes the orchestration layer, model pipeline, candidate sourcing, filtering, scoring, and content-understanding components. It is not the entire operating system of X. Production weights, training data, feature flags, and live policy settings are still not public. We reviewed the release. Here is what the public code shows. The Architecture: Five Moving Parts The For You feed is assembled by five interconnected systems: Component / Language / Purpose Home Mixer / Rust / Orchestration -- hydrates queries, sources candidates, filters, scores, selects Phoenix / Python/JAX / ML engine -- retrieval (two-tower) + ranking (Grok transformer) Thunder / Rust / In-memory store of recent posts from followed accounts, sorted by recency Candidate Pipeline / Rust / Reusable framework defining Source, Hydrator, Filter, Scorer, Selector traits Grox / Python / Content understanding -- spam detection, topic classification, safety labels, embeddings When you open the For You tab, Home Mixer coordinates the entire pipeline. It fetches your context (who you follow, what you have engaged with, what you have muted), sources candidates from multiple pools, filters out content you should not see, scores what remains, and returns a ranked feed. How the Feed Is Built: 8 Stages The pipeline runs in strict order: Stage 1 -- Query Hydration (15 parallel hydrators): The system loads your social graph, engagement history, demographic data, inferred topics, mutual follow connections, and a bloom filter of posts you have already seen. This all happens before any candidate is fetched. Stage 2 -- Candidate Sourcing (6 parallel sources): Recent posts from accounts you follow (Thunder), out-of-network posts from the Phoenix retrieval model, topic-based candidates, and cached posts from previous requests. The retrieval model uses a two-tower architecture: one tower encodes you + your history into an embedding, the other encodes every post into an embedding, and a dot-product similarity search finds the most relevant candidates. Stage 3 -- Candidate Hydration (10 parallel hydrators): Each candidate is enriched with its full text, media, author info, language, subscription status, and whether the viewer follows the author. Stage 4 -- Pre-Scoring Filters (14 sequential filters): Duplicates, very old posts, your own posts, muted keywords, blocked/muted authors, previously seen posts, paywalled content you cannot access -- all removed before the expensive ML scoring runs. Stage 5 -- Scoring (3 sequential scorers): This is where the ranking happens. PhoenixScorer sends candidates to the Grok transformer. RankingScorer combines the predicted engagement probabilities with configurable weights. VMRanker optionally applies diversity optimization. Stage 6 -- Selection: Top-K candidates by final score. Stage 7 -- Post-Selection Hydration: Visibility filtering data, brand safety labels, conversation metrics. Stage 8 -- Post-Selection Filters: Visibility filtering (spam, deleted posts, violence), conversation dedup (only the highest-scored post per thread survives). The 19 Engagement Signals The Grok transformer does not produce a single "relevance" score. It predicts the probability of 19 discrete actions, plus continuous dwell time metrics: Positive signals: Signal / What It Measures favorite_score / Like reply_score / Reply repost_score / Retweet photo_expand_score / Image click/expand click_score / Any click profile_click_score / Click through to author profile vqv_score / Video quality view (video watched past minimum duration) share_score / Any share share_via_dm_score / Direct message share share_via_copy_link_score / Link copy share dwell_score / Dwelled on post in feed quote_score / Quote tweet quoted_click_score / Clicked into quoted tweet follow_author_score / Followed the author from this post Negative signals: Signal / What It Measures not_interested_score / Hit "Not Interested" block_author_score / Blocked the author mute_author_score / Muted the author report_score / Reported the post Continuous signals: Signal / What It Measures dwell_time / How long you stopped on the post (continuous, log-normalized) click_dwell_time / Dwell after clicking video_watch_time / Video watch duration How the Score Is Calculated The RankingScorer combines all predicted engagement probabilities into a single score: The demo weights from the open-source release: Signal / Demo Weight Favorite (like) / 1.0 Reply / 0.5 Repost (retweet) / 0.3 Dwell / 0.2 Critical caveat: Production weights are NOT hardcoded. They are dynamically loaded from xAI's feature switch system at request time. The demo weights prove the architecture; they do not prove the operating parameters. The model could be configured to weight retweets above likes in production, or to weight dwell time above everything. There is no way to verify this from the source code alone. After the weighted score is computed, two adjustments are applied: Author diversity decay: If multiple posts from the same author appear in a feed, each subsequent post is multiplied by an exponential decay factor: If the decay is 0.7 and the floor is 0.1, a second post from the same author is scored at 73% of its original value, a third at 52%, a fourth at 38%. You cannot spam your way to feed dominance. OON (Out-of-Network) adjustment: Posts from accounts the viewer does not follow are multiplied by an (less than 1.0). This means a post from someone you follow needs less engagement to appear than an equally engaging post from a stranger. The Transformer: Candidate Isolation The ranking model has a deliberate architectural feature called candidate isolation. During inference, each candidate post can attend to the user embedding and the user's engagement history, but candidates cannot attend to each other. This means each post's score is independent of whatever other posts happen to be in the same batch. The scores are deterministic and cacheable. It also means the model cannot learn cross-post diversity -- that is handled by the author diversity decay and the optional DPP (Determinantal Point Process) ranker downstream. What Gets Filtered Before Scoring The pre-scoring filters are the silent gatekeepers. Content removed at this stage never reaches the scoring model at all: Posts older than MAX_POST_AGE are discarded (exact threshold is a feature flag) Previously seen/served posts are removed via bloom filters + client-sent seen IDs Posts from blocked, muted, or blocking authors are removed Posts containing muted keywords are removed Paywalled content the viewer has not subscribed to is removed Duplicate retweets of the same original post are collapsed After scoring, the Visibility Filter removes content flagged as spam, deleted, violent, or gore. The Conversation Dedup Filter keeps only the highest-scored post per conversation thread. The Retrieval Model: How Out-of-Network Posts Are Found The retrieval model is a separate neural network -- a two-tower architecture: User tower: Encodes your user ID + engagement history (posts, authors, actions, dwell times) through a shared Phoenix transformer, then mean-pools and L2-normalizes the output into a fixed-dimension embedding vector. Candidate tower: Encodes each post's ID + author ID through a 2-layer MLP with SiLU activations, then L2-normalizes the output. Similarity between user and candidate is computed as a simple dot product. The system then retrieves the top-K most similar candidates via approximate nearest neighbor search. Implication: For your posts to reach non-followers, the retrieval model must find them semantically similar to what those users have engaged with before. Topic relevance matters for discovery. Hash-Based Embeddings Both the retrieval and ranking models use hash-based embeddings rather than direct ID lookups. Two linear congruential hash functions map each user ID, post ID, and author ID to embedding vectors. This has three consequences: Unseen IDs get similar embeddings to IDs that hash to similar values The embedding table is bounded regardless of how many users/posts exist Similar entities get similar representations by hash collision, acting as a form of regularization Post Age: Learned, Not Heuristic The ranking model does not apply a hardcoded time-decay formula. Instead, post age is fed into the transformer as bucketed embeddings at 60-minute granularity, up to 4,800 minutes (80 hours). The model learns its own age-decay curve from the data. Posts older than the threshold are filtered entirely before scoring. But within the scoring window, the transformer decides how much to penalize age based on what it has learned from billions of engagement examples. What This Means The algorithm is an engagement maximizer The system optimizes for the weighted sum of predicted engagement probabilities. It does not optimize for truth, quality, nuance, or civic value. If a post that is misleading generates more likes, replies, and dwell time than an accurate one, the algorithm will prefer the misleading post. Negative signals are the only quality guardrail The negative weights (block, mute, report, "not interested") are the system's only built-in mechanism for suppressing harmful content at the ranking stage. If users do not actively express negative sentiment toward a post, the algorithm has no reason to demote it -- regardless of its accuracy. Transparency is partial The source code reveals the architecture. It does not reveal the production weights, the training data, the feature flag configurations, or the A/B test parameters. You can see the machine. You cannot see the dials. The Grox pipeline decides what even gets a chance Before any ML scoring happens, the Grox content understanding pipeline classifies posts by topic, detects spam, applies safety labels, and enforces policy. Content flagged here is filtered before it reaches the ranking model. The scoring model only sees what Grox allows through. Author diversity is real but bounded The exponential decay prevents any single account from dominating a feed. But the floor parameter ensures the decay never reaches zero. A prolific account will always have some presence, just increasingly attenuated. Practical Implications For anyone trying to understand what the X algorithm rewards: Likes are the strongest positive signal in the known configuration. Content that generates likes will be distributed further. Replies are the second strongest. Posts that spark conversation outperform posts that are merely consumed. Dwell time is explicitly modeled. Content that holds attention -- long-form text, images that make people stop, videos that are watched -- gets a scoring boost. The OON penalty is steep. Reaching non-followers requires significantly higher engagement because of the out-of-network weight factor. Author diversity decay limits spam. Posting 10 times an hour will not give you 10x the reach. Each post competes against your own previous posts in the same feed. Negative signals are devastating. A post that generates blocks, mutes, or reports is pushed below a scoring threshold that is very difficult to overcome. The retrieval model uses semantic similarity. For your posts to be discovered by non-followers, they need to be topically relevant to what those users already engage with. Video needs minimum duration. Videos shorter than a threshold duration get zero VQV weight. Short video clips are effectively invisible to the video engagement scoring pathway. First impressions matter. The bloom filter system aggressively removes previously seen posts. If someone scrolls past your content without engaging, they will not see it again. The model predicts follow behavior. Content that makes people want to follow you directly contributes to your score. This is especially valuable for new accounts. The Bigger Picture X open-sourcing its algorithm is genuinely unprecedented. No other major social platform has published the actual production code for its recommendation system. But transparency of architecture is not transparency of operation. The weights, the training data, the feature flags -- these are the real levers of power, and they remain behind closed doors. The system X built is technically sophisticated. The candidate isolation trick is clever. The hash-based embeddings are pragmatic. The multi-action prediction framework is expressive. But it is still an engagement maximizer. It still surfaces what keeps you scrolling, not what keeps you informed. The useful takeaway is not that the release explains every ranking decision. It does not. The useful takeaway is that the public code confirms the feed is built around predicted engagement, with safety and quality controls layered around that objective. --- Sources: All findings are derived directly from the xai-org/x-algorithm GitHub repository, including the Home Mixer orchestration layer, Phoenix ranking and retrieval models, Grox content understanding pipeline, and Thunder in-memory store. Production weight values cited are from the open-source demo configuration and may differ from live production values.