Start
a computer screen with a bunch of code on it

What X's Open-Sourced Recommendation Algorithm Reveals About What Gets Amplified

X's public recommendation code shows exactly how replies, dwell time, and negative signals are weighted—giving creators concrete data on what the platform actually amplifies.

What X actually released

In March 2023, X (formerly Twitter) published portions of its recommendation algorithm on GitHub. The release included the code that determines which posts appear in users' "For You" timelines—the algorithmic feed that drives most discovery on the platform.

The code is not complete. X did not release the models trained on user behavior, the full ranking pipeline, or the systems that handle ads and safety filtering. What creators did get is the scoring logic: the specific multipliers and penalties applied to posts before they're ranked.

This matters because it removes speculation. Instead of guessing why one post outperforms another, you can see the numerical weights X applies to engagement types, content formats, and user actions.

How the scoring system works

X's algorithm assigns each post a score based on predicted engagement. The system estimates the probability that a user will interact with a post, then multiplies those probabilities by fixed weights.

According to the published code, here's how different actions are weighted:

  • Favorites (likes): 0.5×
  • Retweets: 1.0×
  • Replies: 13.5×
  • Profile visits triggered by the post: 12×
  • Time spent viewing the post (dwell time): weighted by duration

The reply multiplier stands out. A single reply contributes 27 times more to a post's score than a like. This explains why posts that spark conversation—even contentious ones—tend to spread further than posts that simply collect likes.

Negative signals and penalties

The algorithm also applies penalties. Negative feedback reduces a post's reach, and the code shows specific deductions:

  • Muting the author: −10× penalty
  • Blocking the author: −75× penalty
  • Reporting the post: significant negative weight
  • Skipping past the post quickly: reduces future similar recommendations

These penalties are applied before the post is shown to most users. If early viewers skip or report a post, the algorithm limits its distribution immediately. This front-loaded filtering means the first few minutes after posting are critical.

X also penalizes posts with outbound links. The code includes a demotion factor for tweets containing URLs, particularly links that take users off-platform. Posts with media (images, videos) embedded directly on X receive no such penalty.

What this means for reply strategy

The 13.5× reply weight creates a clear incentive: posts that invite responses will outperform posts that don't. But not all replies are equal.

The algorithm distinguishes between short, low-effort replies and longer, substantive ones. Replies with higher character counts and those that themselves receive engagement contribute more to the original post's score. A reply that sparks its own thread amplifies the parent post further.

This weighting also explains why polarizing posts spread. Disagreement drives replies. A post that makes half the audience want to argue will generate more algorithmic lift than a post everyone passively agrees with.

For creators, this suggests asking direct questions, taking clear positions, or leaving intentional gaps that invite correction or elaboration. The goal is not controversy for its own sake—it's giving people a reason to type a response.

Dwell time and how it's measured

Dwell time—how long a user looks at a post—factors into ranking, but the mechanism is less transparent than engagement multipliers. The code references dwell time as a signal, but the exact thresholds and weights are not published.

What is clear: X tracks whether users pause on a post, scroll past it immediately, or return to it after initially scrolling by. Posts that hold attention, even without a click or like, are treated as valuable.

For video, this means watch time matters. For text posts, it suggests that longer posts—if they're read—may benefit from extended dwell time. However, X does not reward length alone. A long post that users scroll past immediately will perform worse than a short post that stops the scroll.

The platform also tracks "negative dwell time"—when a user sees a post, scrolls away, then returns to hide or report it. This pattern triggers a penalty.

Why media format matters

The algorithm treats images, videos, and text differently. Posts with native video (uploaded directly to X) receive a boost, particularly if users watch beyond the first few seconds. Posts with external video links (YouTube, Vimeo) do not receive the same treatment.

Images perform better than text-only posts, but the advantage is smaller than the reply multiplier. A text post that generates ten replies will outperform an image post that generates five, even if the image has more likes.

Carousel posts (multiple images) do not receive special weighting in the published code, but they do increase the likelihood of dwell time by giving users more to look at.

The recency decay curve

X's algorithm applies a time decay to all posts. The code shows that a post's score drops steadily after publication, with the steepest decline in the first few hours.

This decay is not linear. A post that gains early engagement can extend its lifespan by continuing to appear in feeds, which generates more engagement, which delays the decay. Posts that start slow rarely recover.

For creators, this means timing matters—but only if the post is strong enough to generate early replies. Posting at a high-traffic time won't save a weak post, but it can amplify a strong one by increasing the number of early viewers who might reply.

What the algorithm ignores

The published code does not show any weighting for:

  • Follower count: Large accounts are not inherently boosted.
  • Verification status: Blue checkmarks do not increase post scores directly.
  • Hashtags: No evidence of hashtag-based ranking in the recommendation code.
  • Keyword matching: The algorithm predicts engagement, not topic relevance.

This does not mean these factors have zero effect. Accounts with more followers will naturally reach more people organically, which increases the chance of early engagement. But the algorithm itself does not add a multiplier for account size.

Practical takeaways for posting on X

Based on the published weights, here's what moves the needle:

  1. Write posts that invite replies. Ask questions, take positions, or share incomplete thoughts that others will want to finish.
  2. Post media natively. Upload images and video directly to X rather than linking out.
  3. Avoid outbound links in high-priority posts. If you need to share a link, consider posting it in a reply to your own tweet instead of in the original post.
  4. Watch the first hour. If a post isn't generating replies or retweets within 60 minutes, it's unlikely to recover. Don't repost immediately—wait at least 24 hours or reframe the idea.
  5. Prioritize replies over likes. A post with 10 replies and 20 likes will outperform a post with 100 likes and 2 replies.

The algorithm rewards conversation, not applause. If you're optimizing for reach, optimize for replies.

For creators looking to accelerate early engagement on strong posts, Fanovera offers visibility campaigns for X that can help surface content to a wider audience during that critical first hour when the algorithm is still deciding whether to amplify it further.