User Details X Algorithm Mechanics After Reviewing 400,000 Lines of Code

Image for User Details X Algorithm Mechanics After Reviewing 400,000 Lines of Code

A social media user, identified as Ahmad, has garnered significant attention on the X platform after claiming to have reviewed 400,000 lines of the platform's algorithm source code. His detailed thread, which quickly accumulated 7 million impressions and 7,000 new followers in nine days, purports to reveal the intricate mechanisms governing content visibility, virality, and suppression on X. Ahmad described the code as "a mess. it's a masterpiece. it's a threat model disguised as a social network."

The deep dive into X's algorithm outlines numerous factors influencing a post's reach. Key positive engagement signals include replies, retweets, likes, bookmarks, and follows, with extended watch times (over 10 seconds) and text read for more than two seconds significantly boosting content. Conversely, actions such as blocks, mutes, reports, and "see fewer posts like this" clicks can severely diminish visibility, potentially leading to a "shadowban" that can last for months.

Ahmad's analysis highlights a brutal decay rate, stating that "every 6 hours, your tweet loses 50% of its power." He introduced "Tweepcred" as a reputation score, starting at -128 for new users, with verified accounts instantly reaching 100, and a minimum score of 17 required for meaningful visibility. The algorithm also leverages "simclusters" to group users with similar engagement patterns, emphasizing that "the algo doesn't care who you follow, it cares who vibes like you."

The tweet also detailed specific "shadowban" labels, including spam, gore, toxicity, low quality, NSFW, and even "mentions person too much," each contributing to a "visibility coffin." Strategies for virality include "replyguymaxxing" (replying to replies), "profilevisitmax" (baiting profile clicks), and spacing out tweets to avoid "diversity filters." Ahmad also warned against all caps, offensive words, excessive linking, and maintaining a healthy follower-to-following ratio, ideally above 1:1.67.

X, formerly Twitter, began open-sourcing parts of its algorithm in March 2023 under Elon Musk's ownership, aiming for greater transparency. The platform's algorithm, particularly the "For You" feed, relies on a complex ranking system that considers user engagement, content relevance, and a variety of signals to personalize feeds. While some of Ahmad's specific terms like "Tweepcred" and "simclusters" may be internal or user-derived interpretations, the general principles he outlines align with common understandings of how large-scale social media algorithms prioritize and distribute content.