Free Bird
March 31, 2023 2:28 PM Subscribe
In response to criticisms, Twitter has released the source code for their recommendation algorithm.
With the release, people have already identified points in the code designed to signal boost Twitter's owner, as well as explicit political weighting.
With the release, people have already identified points in the code designed to signal boost Twitter's owner, as well as explicit political weighting.
And reading commentary over in Hacker news, that's just for tracking metrics. Given the political scrutiny they've gotten, it makes sense that they'd track tweets they show by party.
posted by Spike Glee at 2:45 PM on March 31, 2023 [2 favorites]
posted by Spike Glee at 2:45 PM on March 31, 2023 [2 favorites]
We invite the community to submit GitHub issues and pull requests for suggestions on improving the recommendation algorithm.
Fired too many coders and now looking for free "open source" labor.
Yeah no.
posted by Ayn Marx at 2:46 PM on March 31, 2023 [47 favorites]
Fired too many coders and now looking for free "open source" labor.
Yeah no.
posted by Ayn Marx at 2:46 PM on March 31, 2023 [47 favorites]
FWIW the code related to tagging author_is_elon and author_is_republican and the like looks like it's just propagating the label. There's no code in "the_algorithm" to apply that label, nor code to use it in ranking. It is consistent with someone wanting to preserve those tags, plausibly as a way to check the impact of ranking. That's still implicitly affecting the ranking eventually; if you're tweaking the code until Elon's rank is boosted 1000x (a real thing that really happened) for instance.
I'm looking forward to a real analysis of what the code actually does; this little tagging this is just a surface result that someone found less than hour before the code release. The deeper criticism I've read is that the code doesn't really give you all the weightings and other data necessary to understand or reproduce the actual ranking, particularly for the machine learning side of things.
posted by Nelson at 3:01 PM on March 31, 2023 [5 favorites]
I'm looking forward to a real analysis of what the code actually does; this little tagging this is just a surface result that someone found less than hour before the code release. The deeper criticism I've read is that the code doesn't really give you all the weightings and other data necessary to understand or reproduce the actual ranking, particularly for the machine learning side of things.
posted by Nelson at 3:01 PM on March 31, 2023 [5 favorites]
It might not be in the code, but having those metrics available and also having a mandate to "show no bias" can lead to its own problems.
For example, lets say you're a Twitter engineer. You came up with a solution to reduce bot-like behavior, by detecting accounts that paste the same thing as other accounts. You know that before your solution, the ratio of "Republican" vs "Democrat" tweets is 55/45.
Pulling the tweets from the last day, you apply your algorithm in a test environment to see if it works correctly. To your dismay, when you suppress bot-like behavior, the new ratio of R/D tweets is 40/60. This shows a clear bias against R tweets, even though your solution was made completely independently of the metrics. Do you think your solution is going to be integrated?
posted by meowzilla at 3:26 PM on March 31, 2023 [11 favorites]
For example, lets say you're a Twitter engineer. You came up with a solution to reduce bot-like behavior, by detecting accounts that paste the same thing as other accounts. You know that before your solution, the ratio of "Republican" vs "Democrat" tweets is 55/45.
Pulling the tweets from the last day, you apply your algorithm in a test environment to see if it works correctly. To your dismay, when you suppress bot-like behavior, the new ratio of R/D tweets is 40/60. This shows a clear bias against R tweets, even though your solution was made completely independently of the metrics. Do you think your solution is going to be integrated?
posted by meowzilla at 3:26 PM on March 31, 2023 [11 favorites]
It is if your public image is heavily dependent on "fairness", as is (what seems like) a lot of internal corporate rhetoric. Which I assume is what meowzilla was getting at.
posted by sagc at 3:33 PM on March 31, 2023
posted by sagc at 3:33 PM on March 31, 2023
For fairness, you need to block equal numbers of Republican bots and Democratic bots.
Sort of like how, for fairness, you need to block equal numbers of bullets fired at schoolchildren and by schoolchildren.
posted by straight at 3:33 PM on March 31, 2023 [30 favorites]
Sort of like how, for fairness, you need to block equal numbers of bullets fired at schoolchildren and by schoolchildren.
posted by straight at 3:33 PM on March 31, 2023 [30 favorites]
RIP to the intern that's entire career is going to depend on catching 100% of the soon-be-hundreds of PRs with GPL3 code before they get merged in.
posted by Back At It Again At Krispy Kreme at 3:34 PM on March 31, 2023 [6 favorites]
posted by Back At It Again At Krispy Kreme at 3:34 PM on March 31, 2023 [6 favorites]
I can't decide if Elon released this to deflect all questions about the algorithm with "just read the code dummy" knowing that it'll be unanswerable without the databases and weights, or if he thinks randos are going to pick up maintenance of the modules that now have no owner. Or both.
Someone already found a vulnerability in the Deez module, so that's something. (this kind of spam is pretty much the average quality of all content contributed thus far)
posted by credulous at 3:40 PM on March 31, 2023 [4 favorites]
Someone already found a vulnerability in the Deez module, so that's something. (this kind of spam is pretty much the average quality of all content contributed thus far)
posted by credulous at 3:40 PM on March 31, 2023 [4 favorites]
RIP to the intern that's entire career is going to depend on catching 100% of the soon-be-hundreds of PRs with GPL3 code before they get merged in.
That job 100% does not exist at Twitter.
posted by Going To Maine at 3:56 PM on March 31, 2023 [6 favorites]
That job 100% does not exist at Twitter.
posted by Going To Maine at 3:56 PM on March 31, 2023 [6 favorites]
I can't imagine they'll actually accept pull requests.
posted by entropone at 4:00 PM on March 31, 2023 [3 favorites]
posted by entropone at 4:00 PM on March 31, 2023 [3 favorites]
I cloned the repo and wrote a zsh script that started with
The rest of that script leveraged Github Copilot and its VSCode extension and completely refactored the whole app in VSCodium.
I submitted a PR while the above mentioned intern was on break and it was auto-merged - their devops team is short-staffed these days and they’ve written a bunch of Terraform scripts that just push stuff to prod.
So if your “For You” feed is full of good dogs and rescue goats tomorrow you can thank “free open source labor”.
posted by bendy at 5:13 PM on March 31, 2023 [19 favorites]
code ~/myProjects/the-algorithm
The rest of that script leveraged Github Copilot and its VSCode extension and completely refactored the whole app in VSCodium.
I submitted a PR while the above mentioned intern was on break and it was auto-merged - their devops team is short-staffed these days and they’ve written a bunch of Terraform scripts that just push stuff to prod.
So if your “For You” feed is full of good dogs and rescue goats tomorrow you can thank “free open source labor”.
posted by bendy at 5:13 PM on March 31, 2023 [19 favorites]
It’s interesting to see some of the inner workings, but what I’d really like to know is how they decide if the algorithm is doing what they want, i.e apart from relatively easily measurable things like scalability, memory use and speed, how are they testing the impact of it, and what counts as “better” for their purposes? Also what are their purposes?
posted by Jon Mitchell at 5:19 PM on March 31, 2023 [1 favorite]
posted by Jon Mitchell at 5:19 PM on March 31, 2023 [1 favorite]
Often, the overall metric is engagement, so the algorithm becomes biased towards showing you stuff that you'll love or hate, so that you'll like and reply, or you'll do a hate-tweet about how terrible people are these days.
posted by meowzilla at 5:23 PM on March 31, 2023 [1 favorite]
posted by meowzilla at 5:23 PM on March 31, 2023 [1 favorite]
I indexed the-algorithm-ml repo using the autodoc and uploaded the results it to a repo here: https://github.com/context-labs/autodoc
I haven't done the full one yet, I think we may have it soon.
posted by daHIFI at 5:23 PM on March 31, 2023
I haven't done the full one yet, I think we may have it soon.
posted by daHIFI at 5:23 PM on March 31, 2023
MetaFilter:
posted by Harvey Kilobit at 6:43 PM on March 31, 2023
exists(_.toxicityScore.exists(_ > 0.91)))
posted by Harvey Kilobit at 6:43 PM on March 31, 2023
RIP to the intern that's entire career is going to depend on catching 100% of the soon-be-hundreds of PRs with GPL3 code before they get merged in.
They appear to have released it as AGPL.
But I doubt they’re gonna be merging changes to this version back to the internal version by default.
posted by atoxyl at 8:21 PM on March 31, 2023
They appear to have released it as AGPL.
But I doubt they’re gonna be merging changes to this version back to the internal version by default.
posted by atoxyl at 8:21 PM on March 31, 2023
I mean I assume this is supposed to be some kind of dual licensing situation.
posted by atoxyl at 8:35 PM on March 31, 2023
posted by atoxyl at 8:35 PM on March 31, 2023
They posted a blog post as well - mostly just a high level overview but it includes some details like "Ranking is achieved with a ~48M parameter neural network that is continuously trained on Tweet interactions to optimize for positive engagement (e.g. Likes, Retweets, and Replies)".
It's not surprising they didn't release related embeddings and such that they actually use to source the candidate recommended tweets but they do seem like the most interesting parts. "Open-sourcing" ML models without more details on the training data used is honestly pretty pointless. They do have a little bit of detail on the input features for the ranker here.
posted by colourlesssleep at 2:24 AM on April 1, 2023 [2 favorites]
It's not surprising they didn't release related embeddings and such that they actually use to source the candidate recommended tweets but they do seem like the most interesting parts. "Open-sourcing" ML models without more details on the training data used is honestly pretty pointless. They do have a little bit of detail on the input features for the ranker here.
posted by colourlesssleep at 2:24 AM on April 1, 2023 [2 favorites]
AA+ to NoxAeternum for this thread's headline. (I love a good headline.)
posted by Paul Slade at 3:44 AM on April 1, 2023
posted by Paul Slade at 3:44 AM on April 1, 2023
Musk makes further promises he presumably won't keep
This is most of the recommendation code. In the coming weeks, we will open source literally everything that contributes to showing a tweet, such that the output can be at least roughly approximated.posted by Nelson at 6:58 AM on April 1, 2023
Twitter thread analyzing the algorithm. It's shallow and simple, but interesting. Particularly surprised by this fact:
posted by Nelson at 12:02 PM on April 1, 2023 [2 favorites]
You are clustered into a group. The algorithm puts you into a grouping of similar profiles.This explains so much about what I've seen in Twitter results!
posted by Nelson at 12:02 PM on April 1, 2023 [2 favorites]
Apparently someone tweaked the algorithm by removing geographical groupings. I was getting zero ads since Musk fired the European teams, now I'm getting an ad every four tweets.
posted by I claim sanctuary at 4:25 AM on April 2, 2023 [1 favorite]
posted by I claim sanctuary at 4:25 AM on April 2, 2023 [1 favorite]
« Older he had a good run | "It’s Who I Was, And Where I Was, And It Happened... Newer »
This thread has been archived and is closed to new comments
There's also explicit weighing on whether a tweeter is Musk or not.
posted by Spike Glee at 2:40 PM on March 31, 2023 [3 favorites]