Twitter open sources a portion of its code on GitHub, including its algorithm for recommending tweets in For You but excluding its ad recommendation algorithm
As repeatedly promised by Twitter CEO Elon Musk, Twitter has opened a portion of its source code, including the algorithm it uses …
TechCrunch Kyle Wiggers
Context & Ripple Effects
This release lands after calls for a more open and potentially customizable ranking system, while other coverage had already cautioned that publishing code alone cannot explain a recommendation engine fed by large-scale, changing data. The result is a concrete test of the gap between source availability and meaningful transparency.
That gap became visible quickly: researchers examining the published For You code said it lacked the context needed to fully account for recommendations. Later coverage of X's broader core-recommendation release suggests that public disclosure of ranking systems remained an ongoing, iterative practice rather than a one-time event.
First-order effects
- Developers and researchers can inspect the released For You ranking implementation on GitHub, enabling more specific scrutiny of how that disclosed component is designed.
- Twitter keeps the ad recommender closed, so advertisers and outside auditors gain no equivalent visibility into the system most directly tied to ad delivery.
Second-order effects
- The split release creates two different standards of explainability inside the same product: public debate can focus on feed ranking while commercial targeting and ad-ranking logic remain proprietary.
- External analysis is likely to test the published code against observed recommendations, but the missing contextual inputs identified by researchers limit what code review can establish about live outcomes.
Third-order effects
- If platforms increasingly publish recommendation components while withholding monetization systems and operational context, algorithmic transparency may become a scoped disclosure practice rather than full independent auditability.
- The durable question shifts from whether code is public to whether outsiders can reproduce, evaluate, and govern the live system—a distinction highlighted by earlier warnings that source code alone does not make complex recommenders transparent.
The trend: Platform transparency is moving toward selective publication of ranking code, with the practical value of disclosure determined by data, deployment context, and the systems left private.
Related: Twitter · GitHub · Researchers assess missing context in For You code · Why open-sourcing may not ensure transparency · X's later core recommendation system release
Related Coverage
- Twitter Recommendation Algorithm Twitter on GitHub
- Twitter Shares Some of the Secret Sauce Behind How It Works Wall Street Journal
- Twitter takes its algorithm ‘open-source,’ as Elon Musk promised The Verge · Mitchell Clark
- Elon delivers on Twitter promise to Open Source the algorithm, first embarrassing issue found techAU · Jason Cartwright
- Twitter makes most of its recommendation algorithms open source Techlusive · Md Waquar Haider
- Twitter Pulls Back The Curtain On Its Recommendation Algorithm SlashGear · Quentyn Kennemer
- Twitter Publishes its Tweet Ranking Algorithm Data on GitHub, Providing More Transparency in Process Social Media Today · Andrew Hutchinson
- Twitter's recommendation algorithm is now on GitHub Engadget · Karissa Bell
- Twitter's Recommendation Algorithm Is Now Open Source Gizmodo · Kevin Hurler
- Twitter towards algorithmic transparency by making its source code public Livemint
- Making good on Elon Musk's promise, Twitter open sources its recommendation algorithm BGR · Joe Wituschek
- Twitter releases its algorithm to the world, making it the first platform to bring transparency to social media Tech Startups · Nickie Louise
- Twitter's recommendation algorithm is now open source. — Interesting to see the language diversity: — Scala (53.8%) — Java (29.7%) … Parkash Heerani
- I have been working on Twitter's recsys for years, my team together with the home team built the heavy ranker, but I would not have imagined … Wenzhe Shi
- If you haven't checked out Twitter yet, Elon Musk has decided once again to open source Twitter's code base, starting with the recommendation system, https://github.com/... … Saif Ul Islam
- one of the ways that Twitter tests it's NSFW text classifier? — the string “xxx 🍑” — https://github.com/... @jeremybmerrill@journa.host · Jeremy B. Merrill
- Twitter posts the code it claims determines which tweets people see, and why Ars Technica · Kevin Purdy
- There are no files selected for viewing GitHub
- Twitter open-sources recommendation algorithm code BleepingComputer · Sergiu Gatlan
- Twitter Admits It's Been Forcing Elon Musk on Your Timeline New Republic · Prem Thakker
- Twitter makes some of its source code public Reuters
- Why does Elon Musk want you to game Twitter's algorithm? Fortune · Alexei Oreskovic
- Elon Musk Dethrones Barack Obama As Twitter's Top Influencer Observer · Sissi Cao
- The commit where Musk force pushed to main to remove himself from “the algorithm” is now going to be my favorite commit to use while developing at work. Thanks. — https://github.com/... @nova@hachyderm.io
Discussion
-
Twitter
Twitter
on x
Twitter's Recommendation Algorithm
-
Twitter
Twitter
on x
A new era of transparency for Twitter
-
@rodhilton@mastodon.social
Rod Hilton
on mastodon
You can tell that they were added very very recently because author_is_elon is above those lines, and additions are very clearly made by appending them to the file with no other ordering applied. …
-
@kjhealy@mastodon.social
Kieran Healy
on mastodon
Hardworking Twitter engineers scrubbing the Elon parameters I have some bad news for you about how git works
-
@chockenberry@mastodon.social
Craig Hockenberry
on mastodon
WHERE THE HELL IS AUHTOR_IS_CHOCK
-
@kjhealy@mastodon.social
Kieran Healy
on mastodon
They didn't turn off Issues or Pull requests, and you can imagine what's going on inside each.
-
@danluu@mastodon.social
Dan Luu
on mastodon
The new stuff in the Twitter algorithm is wild. — “author is elon”, “author_is_republican”, “author_is_democrat”, etc., are explicit terms that are special cased. — https://github.com/...
-
@elonmusk
Elon Musk
on x
Twitter recommendation source code now available to all on GitHub https://github.com/...
-
@twittereng
@twittereng
on x
Today marks a new era of transparency for Twitter. 🧵 We're sharing much of the source code that powers our platform with the world. Visit our blog to learn more about this initiative: https://blog.twitter.com/...
-
@mnateshyamalan
Soul Nate
on x
oh my god. i swear to you this is real. the algorithm source code literally has a carve out just for elon's posts https://twitter.com/...
-
@elonmusk
Elon Musk
on x
Most of the recommendation algorithm will be made open source today. The rest will follow. Acid test is that independent third parties should be able to determine, with reasonable accuracy, what will probably be shown to users. No doubt, many embarrassing issues will be... https:…
-
@zoeschiffer
@zoeschiffer
on x
The code that was released today doesn't show the parts that actually alter the scores of Elon and other users. The part of the code referenced below just tracks Elon stats (from what I know). Employees removed most PII before the code was released. https://twitter.com/...
-
@broderick
Ryan Broderick
on x
Musk being asked about this live on Spaces right now. Says “it shouldn't be there.” “There's a ton of stupid and embarrassing things being shown by making the code open source.” https://twitter.com/...
-
@amasad
Amjad Masad
on x
The 4 types of Twitter posters, according to the just open-sourced algorithm 😯 https://github.com/... https://twitter.com/...
-
@zoeschiffer
Zoë Schiffer
on x
Still, apparently Elon is pretty displeased this part of the code was released 🙃
-
@wongmjane
Jane Manchun Wong
on x
Twitter “the-algorithm” repo is now public https://github.com/... https://twitter.com/... https://twitter.com/...
-
@mnateshyamalan
Soul Nate
on x
lmaooo someone submitted a pull request called “better recommendations on timeline” and all it does is hide the tweets of anyone who pays for twitter https://twitter.com/...
-
@colin_fraser
Colin Fraser
on x
incredible https://github.com/... https://twitter.com/...
-
@beyang
@beyang
on x
Twitter's algo is LIVE on @sourcegraph with FULL compiler-accurate code nav! 👇 https://sourcegraph.com/... https://twitter.com/...
-
@kateconger
Kate Conger
on x
On a Twitter Space, Elon is disavowing the part of the code that classifies users as Democrat or Republican, says it should be removed. He didn't address the “author_is_elon” classifier. https://twitter.com/...
-
@kateconger
Kate Conger
on x
Twitter open-sourced its algorithm: https://github.com/...
-
@wongmjane
Jane Manchun Wong
on x
Twitter's algorithm specifically labels whether the Tweet author is Elon Musk besides the democrat, republican and “VIT” / “Power User” (I think it means legacy verified) labels https://github.com/... https://twitter.com/...
-
@olafurw
Ólafur Waage
on x
Twitter just released source code for “the algorithm” Oh, what file is this? Predicates for tweets on the home timeline? Oh what is that 2nd image? https://twitter.com/...
-
@elonmusk
Elon Musk
on x
Twitter will be updating its recommendation algorithm based on user suggestions every 24 to 48 hours
-
@martinsfp
@martinsfp
on x
More than anything, this is incredibly US-centric. Most of the world isn't a Democrat *or* Republican. https://twitter.com/...
-
@goldengateblond
Shauna
on x
suddenly all the reduced engagement for some of us and exploding engagement for others makes sense https://twitter.com/...
-
@edzitron
Ed Zitron
on x
He has no idea what is going on with his website https://twitter.com/...
-
@bindlecore
@bindlecore
on x
hovering 7 inches off the ground https://twitter.com/...
-
@nickpickles
Nick Pickles
on x
More transparency to build trust - today we're open sourcing our code, and providing detail on how our recommendation algorithm works. https://twitter.com/...
-
@stuartpstevens
Stuart Stevens
on x
Wait, it's not enough that we have to provide all the content for Twitter, now we have to write the code? https://twitter.com/...
-
@sarah_edo
Sarah Drasner
on x
I love open source https://twitter.com/...
-
@francissuarez
Mayor Francis Suarez
on x
.@elonmusk has taken a monumental step towards restoring transparency and trust in Twitter and tech companies worldwide by publishing its algorithmic code and spending time discussing it w the public in an open forum. https://twitter.com/...
-
@dancow
Dan Nguyen
on x
Having an if-elon-then-plusgood in the code wouldn't surprise or bother me tbh. I mean it's *his* site and at least it's nakedly transparent But Elon didn't know this flag existed, nor did his team bother to tell him? And yet he wants to rebuild the codebase from scratch? LOL htt…
-
@carnage4life
Dare Obasanjo
on x
The Twitter algorithm is now on GitHub. Conservatives can now prove they are being shadow banned. 🙃 https://twitter.com/...
-
@rmac18
@rmac18
on x
Pretty great that Twitter hosted this on GitHub, which it hit recently with a subpoena to compel it to unmask the person who leaked its whole source code.
-
@leodarcy1
Leo D'Arcy
on x
@wongmjane And there is already an issue to remove it 🤣https://github.com/...
-
@jeffjarvis
Jeff Jarvis
on x
Ah, well, then, this explains it all. https://twitter.com/...
-
@jdvance1
J.D. Vance
on x
This is a huge deal. Could very well be the Rosetta Stone of modern digital censorship. Every major social media company should follow Twitter's lead. https://twitter.com/...
-
@pt
Parker
on x
America's four political parties. https://twitter.com/...
-
@jason
@jason
on x
Ok @tiktok_us @facebook @instagram @YouTube, you're up... tell us how you're programming us and our kids #transparency https://twitter.com/...
-
@fmanjoo
Farhad Manjoo
on x
When you hard code the CEO into your ranking algorithm Can't believe this is real but it is https://github.com/... https://twitter.com/...
-
@rmac18
@rmac18
on x
The guy who is speaking on a Twitter space with Elon Musk right now has a pinned tweet featuring a video of himself sucking on someone's toes. Twitter 2.0, baby.
-
@techgirl1908
Angie Jones
on x
read: can y'all please help us figure out how this algorithm works cuz everyone who knew is now gone https://twitter.com/...
-
@goldman
Jason Goldman
on x
This shit is truly hilarious. It's reported he threw a fit because of his lower engagement and so they boosted him. And then he can't explain on a call about the open sourcing of the algorithm why there'd be an explicit flag just for him. It's so great. https://twitter.com/...
-
@anthony
Anthony DeRosa
on x
I asked ChatGPT-3 to analyze the Twitter source code: https://twitter.com/...
-
@kylenabecker
Kyle Becker
on x
This is great. Get all the gremlins out! @ElonMusk https://twitter.com/...
-
@rmac18
@rmac18
on x
the discussion on this Elon Musk open algorithm space can best be summarized as https://twitter.com/...
-
@jason
@jason
on x
That wasn't so hard... now let's see the @instagram algorithm and what it's doing to teenage girls @finkd https://twitter.com/...
-
@spikereacts_
Spike
on x
I had ChatGPT analyze the twitter source code to find out how to go viral. This is what I found. https://twitter.com/... https://twitter.com/...
-
@leokelion
Leo Kelion
on x
Twitter has made its recommendation algorithm open source, incl its models to detect toxic tweets, abusive content and NSFW material. It's a huge act of faith and it'll be interesting to see how it will deal with those who inevitably try to exploit it. https://github.com/...
-
@chrismessina
Chris Messina
on x
Boom, #TheAlgorithm is live! https://github.com/... https://blog.twitter.com/... /tip @techmeme
-
@kjhealy@mastodon.social
Kieran Healy
on mastodon
PS: People saying, “Meh, the module is just for collecting data on whether various A/B feature changes end up being good or bad for Elon personally” do not seem to understand how very entertaining it is to see Elon inserting “Benefit to Me” as an evaluation metric.
-
@wongmjane
Jane Manchun Wong
on x
Twitter's algorithm specifically labels whether the Tweet author is Elon Musk “author_is_elon” besides the Democrat, Republican and “Power User” labels https://github.com/... https://twitter.com/... https://twitter.com/...
-
@mahdi
@mahdi
on x
I asked Elon Musk why his name is hard coded here in Twitter Algorithm repo; you can listen to the answer yourself... and the Space finished right after that 🤭 https://github.com/... https://twitter.com/...
-
@wongmjane
Jane Manchun Wong
on x
Part of Twitter's algorithm specifically designates Jack Dorsey, Katy Perry, Stephen Curry and Barack Obama as “testing accounts” for getting random Tweets for testing, with an emphasis on Katy Perry in particular https://github.com/... https://twitter.com/...
-
@suzuki_takaya
Takaya Suzuki MD, PhD
on x
I wish the engineer won't be fired today... https://twitter.com/...
-
@fredwalton216
Fred Walton
on x
6) FT: “Still, apparently Elon is pretty displeased this part of the code was released.” 🙃 https://twitter.com/...
-
@mashable
@mashable
on x
Musk said he had no idea it was doing that! https://mashable.com/...
-
@clarajeffery
Clara Jeffery
on x
Unless the Democrat/Republican tags are assigned only to elected officials... wtf does this mean? Are the scrapping voter registration databases and cross referencing? Vibes? What? https://twitter.com/...
-
@davezatz
Dave Zatz
on x
Given the purchase price, he deserves it. https://twitter.com/...
-
@mattbinder
Matt Binder
on x
elon was asked about this on Twitter Spaces and he said “this is the first time i'm seeing this” and said they should change it he also decided that the person who asked him about it would be the last speaker and ended the Space right after https://twitter.com/...
-
@barnacules
@barnacules
on x
Told you 🤦♂️ This is because legacy checkmarks get a low weight and the system needed a way to differentiate Elon Musk since he has the same legacy checkmark ✅ https://twitter.com/...
-
@carnage4life
Dare Obasanjo
on x
It's even funnier to think they tried to remove all the places where Elon had been hard coded into the Twitter algorithm before releasing the code but missed one. $44B to become the most popular user on Twitter🤦🏾♂ ️https://twitter.com/... https://t.co/XdR8GhGesD
-
@tante
@tante
on x
Elon Musk is really such a weakling. https://twitter.com/...
-
@jasoncwarner
Jason Warner
on x
Ahhhhhh the hallmark of our modern democracy, the four political party system of the US https://twitter.com/...