Logo
FrontierNews.ai

X Just Open-Sourced Its Algorithm. Here's What Makes Posts Go Viral.

X has released the complete code behind its "For You" feed algorithm on GitHub, making it the first major social platform to open-source its full ranking system. The move reveals surprising weightings: replies and shares are far more valuable than likes, while negative signals like reports have dramatically outsized influence on what users see. The disclosure includes the model configuration, filtering systems, and parameters that determine how posts reach audiences.

What Do the Algorithm's Hidden Weights Actually Reveal?

For years, users have speculated about how social platforms decide what appears in their feeds. X's transparency tool, called "Under the Hood," now lets users download their own visibility labels and cross-reference them against the open-source code. The algorithm's weightings show a clear hierarchy of engagement signals.

The most striking finding is how little a simple like actually matters. In X's ranking system, a like carries a weight of 0.5, serving as the baseline unit for comparison. Everything else is measured against this standard. Here's how different interactions stack up:

  • Replies, Quotes, and Direct Messages: Each weighted at 5, making them 10 times more valuable than a like in determining reach.
  • Link Shares: Weighted around 20 in absolute terms, roughly 40 times stronger than a like, making this the single strongest positive signal for algorithmic promotion.
  • Follows from a Post: Weighted at 4 in absolute terms, equivalent to 8 likes in algorithmic value.
  • Reposts: Weighted at 1 in absolute terms, equivalent to 2 likes.

The negative signals are far more dramatic. A predicted report pulls in the opposite direction roughly 468 times as strongly as a like. A mute carries about 118 times the weight, a "not interested" action around 86 times, and a block about 62 times. This weighting structure suggests that ragebait, deliberately provocative content designed to anger users, is unlikely to be an effective growth strategy on the platform.

How Does X Actually Rank Posts in Your Feed?

The algorithm works in two main stages. First, posts are gathered from two sources: the Thunder service pulls recent posts from accounts you follow, while Phoenix Retrieval and SimClusters supply content from unfamiliar accounts based on community interaction patterns. Both pools then flow through a transformer model called Phoenix, which reads your recent engagement history and predicts how likely you are to like, reply, repost, click, spend time reading, or take negative actions like blocking or reporting each post.

The final score is a weighted sum of these predicted probabilities. Posts older than 48 hours are filtered out before this calculation. Beyond the raw signal weights, X applies structural adjustments that matter just as much for reach. The platform discounts each additional post by the same author within a feed to encourage diversity. Posts from accounts you don't follow are multiplied by a factor of 0.75, meaning out-of-network content gets less visibility. New authors with few impressions receive a boost to help them gain initial traction.

"You'll get the core ranking code that pulls posts and ranks them for any given user," said Keith Coleman, VP of Product at X. "Parts of it, such as the ranker and the score calculation, can be run outside the company."

Keith Coleman, VP of Product at X

The codebase released is roughly 10 to 15 times larger than X's previous open-source releases. External researchers were able to review the code and train the scoring model themselves before the public announcement, validating the transparency effort.

Why Is X Doing This, and What's the Catch?

X's transparency push addresses a longstanding criticism: accusations of shadowbanning, where users believe their posts are being hidden without explanation. By combining open code with individual visibility labels, users can now look up how their content is being treated and understand why. The company is even inviting developers to submit changes via pull requests, which X engineers will review. The repository has already collected around 27,500 stars on GitHub and has several dozen open pull requests.

However, the disclosure is not complete. X has withheld the prompts for Grok-based classifiers, which check posts for spam, rule violations, and problematic media. The company also hasn't released all labeling rules. The reasoning is straightforward: releasing these details would allow bad actors to deliberately game the system. Researcher John Thickstun previously noted that withheld weights and parameters diminish the practical transparency gain, though the August update addresses this concern partly by releasing far more information than before.

The move also reveals politically sensitive elements. The code contains a filter that, in the context of Brazil's 2026 elections, removes posts from accounts reported to the country's electoral court, unless the user follows the account themselves. This shows how platform policies are embedded directly into the algorithm's logic.

How Does This Compare to Other Social Platforms?

X remains alone in this level of algorithmic transparency. Meta, TikTok, and YouTube have published research papers and high-level descriptions of their recommendation systems, but none has released a runnable codebase that users and developers can actually inspect and test. X's move represents a significant departure from industry norms, though it's worth noting that the company's ownership structure has shifted dramatically in recent years.

X Corp. became a subsidiary of xAI in March 2025. Then in early February 2026, SpaceX acquired xAI in an all-stock transaction, making xAI a wholly owned subsidiary of the space company. The transaction valued SpaceX at around one trillion dollars and xAI at around 250 billion dollars. This explains why the algorithm code now lives under the GitHub organization xai-org and why Grok-based models such as Phoenix and the Grox classifiers are so deeply embedded in the recommendation logic. X now sits two levels below SpaceX in the corporate hierarchy.

Elon Musk justified the transparency move as an attempt to improve fairness and gather feedback. Earlier in the year, he had described the algorithm itself as in need of improvement. The open-source approach allows the broader developer community to scrutinize, understand, and potentially improve how content reaches users on the platform.