1700 points · by jonknee · 3y ago · 1185 comments
From a very quick skim of the repositories, this appears to be quite limited transparency. The documentation gives a decent high-level overview of how Tweet recommendation works—no surprises—and the code tracks that roadmap. Those are meaningful positive steps. But the underlying policies and models are almost entirely missing (there are a couple valuable components in [1]). Without those, we can't evaluate the behavior and possible effects of "the algorithm."
I am assuming that open sourcing the code aims to increase transparency about the business logic of the ranking decisions. At the same time you don't want spammers to be able to easily run experiments against a cloned version of your system.
Haven't gone through yet, but yeah, if that's the case, all this is, is a glorified framework to plug your own in.. Not exactly what was promised.
From a quick clone and line-count, it has:
235 kLOC .scala
136 kLOC .java
22 kLOC .py
7 kLOC .rs
So I don't think you did, since you posted so quickly and that's a LOT of code.I also haven't skimmed this code except very superficially, but perhaps you should since you're out there making statements with your Princeton credentials.
(I posted this comment with the heads-up a few minutes after your comment above and then expanded it as you didn't respond.)
More credits would be given if the very idea of open sourcing the algorithm hasn't already been discussed to death with predictions of the difficult points and how it probably won't happen in any sane way.
I’m starting to think the broblem with Elon is mostly personal, he’s just a proxy and default wrong.
(not that I approve of his behaviors, but I can’t enjoy this whole mobbing that he’s getting; not that he cares this I’m not worried he’s getting traumatized in any way? it’s just how it’s become an identitarian trait for a certain group that irks me.)
If your play was "it's some source code, hence people will think we are open, and that should be really good for us", that would make you a very special kind of idiot in this space.
this move could be seen as a strategic PR play to boost their public image amidst the growing concerns around algorithmic bias and lack of transparency. By inviting the community to collaborate and address these issues, they're not only shifting some of the responsibility onto the users but also deflecting potential criticism.
And neither can spammers find and test the cracks and edge cases that would allow them to break the system, that does sound reasonable to me. If they were public there would be an arms race between spammers/those wishing to game the system and Twitter engineers.
This is the problem with most of social media today. It is a very well known problem in ML [1], but nobody is willing to do anything about it because it's a fundamental UX change. Facebook, Twitter, YouTube, TikTok, they have defined themselves by their recommendation engines.
[1] https://towardsdatascience.com/dangerous-feedback-loops-in-m...
When questioned, it turns out she never cared about or liked ducks. Someone gave her one and then it became the go to present for her for every occasion, for decades.
Decades of ducks.
She was unequivocally happy when I did, but perhaps it was just because of the gesture.
(EDIT: also, the rooster/horse/duck example of feedback loop would make for a terrific blog post)
1. Actively supplying negative feedback is sometimes hidden behind secondary menus, making it much higher friction compared to just...scrolling past. So most users don't spend the effort. Even with a dislike button, it's unclear what the system is learning. It can't know that I don't like this particular video because it's a conspiracy theory, and to stop showing me those. These platforms often don't even support explicit categories, so how would they know?
2. It's extremely high friction to teach the algorithm you're interested in something that it doesn't suggest to you! There's the whole unknown unknowns problem: how do you teach the algorithm you're interested in something that you've never seen before?
I still think Reddit has handled this the best. No system is perfect, but Reddit's challenges are much more manageable than the quagmire that TikTok, Facebook, and YouTube have gotten themselves into. I can just unsubscribe from r/conspiracy, and I'm out. Basically impossible to teach that to YouTube without weeks of careful curation. They think they're smart enough to know what I like, but they're not and never will be.
For example, I might see a some specific word or pattern of words in a tweet and quickly skip to the next one. That's very low friction but also a powerful signal. There are drawbacks (e.g. the long boring video that looks like something is about to happen but never does), but that's mitigated by combining this with other signals.
With 2, it's an explore/exploit trade-off. You try to explore as far and wide as you can while trying to avoid the things the user may dislike, all while sprinkling in just enough of the stuff that you know they'll like.
They just don't want to.
Worth exploring.
I wouldn't be surprised if Reddit actually has the best data on their user's preferences, because they let them explicitly decide what they want rather than playing this "hot and cold" game like TikTok. Those platforms also only let you subscribe to individual accounts, so they have to infer what your interests actually are.
But I already know what interests I have! I want to have videos about terrariums on my home page now, not in a week when I've watched enough. This is what I mean by recommendation systems not being good enough. They need to give the user more control over what they want to see, because they can never read my mind. Their recommendations will get even better with that information!
Topics are better, but there doesn't seem to be a way to make sure your tweet ends up in a particular topic. Again, you have to pray to The Algorithm that it will label tweets correctly. And if your particular interest isn't a Topic, you're out of luck.
But i agree it is a bad idea. The worst actors have money to buy the blue marks of an army of accounts.
This is basically making it easier for authoritarian governments to abuse it
So wonder if some value is wrong in one of those constants. Anyways, the blocking feature is broken..
If Twitter wants to put a stop to the user exodus and save lots of money in the process, here's what they could do:
1) Add an off switch to the for you feed. I'll click it right away and never turn it on again. Stop wasting minutes of CPU time on my behalf. I never asked for it. It doesn't do anything for me that I need or want.
2) Sort by time, filter by hashtag. Twitter used to be about real time information. I don't care about things that happened days or weeks ago. I don't need to see all of it. This is the core feature that made Twitter popular. Mastodon has it and it is absorbing users from Twitter by the millions. It still works. Restore this feature and make it the default.
3) Join the fediverse. That's where a lot of the former hard core users went. They still exist. They still post messages. They still engage with each other. They just don't use Twitter anymore. Allow people to follow mastodon users. Allow mastodon users to follow Twitter users. Not that hard to implement and probably would do wonders for user engagement.
Following IS sorted by time, though.
That's probably one of the biggest reasons that I have remained on Twitter even after setting up a Mastodon persona.
The existing user base is strongly in favour of a more organic social graph from exploring tags for shared interests.
Browsing tags is a very normal thing to do on the platform.
// we only keep unfollows in the past 90 days due to the huge size of this dataset,
// and to prevent permanent "shadow-banning" in the event of accidental unfollows.
// we treat unfollows as less critical than above 4 negative signals, since it deals more with
// interest than health typically, which might change over time.
val unfollows: SCollection[InteractionGraphRawInput] =
GraphUtil
.getSocialGraphFeatures(
readSnapshot(SocialgraphUnfollowsScalaDataset, sc),
FeatureName.NumUnfollows,
endTs)
.filter(_.age < 90)
https://github.com/twitter/the-algorithm/blob/main/src/scala... (
"author_is_elon",
candidate =>
candidate
.getOrElse(AuthorIdFeature, None).contains(candidate.getOrElse(DDGStatsElonFeature, 0L))),
(
"author_is_power_user",
candidate =>
candidate
.getOrElse(AuthorIdFeature, None)
.exists(candidate.getOrElse(DDGStatsVitsFeature, Set.empty[Long]).contains)),
(
"author_is_democrat",
candidate =>
candidate
.getOrElse(AuthorIdFeature, None)
.exists(candidate.getOrElse(DDGStatsDemocratsFeature, Set.empty[Long]).contains)),
(
"author_is_republican",
candidate =>
candidate
.getOrElse(AuthorIdFeature, None)
.exists(candidate.getOrElse(DDGStatsRepublicansFeature, Set.empty[Long]).contains)),
) /**
* These author ID lists are used purely for metrics collection. We track how often we are
* serving Tweets from these authors and how often their tweets are being impressed by users.
* This helps us validate in our A/B experimentation platform that we do not ship changes
* that negatively impacts one group over others.
*/
[0]: https://github.com/twitter/the-algorithm/blob/7f90d0ca342b92...It doesn't have to be in the algorithm for the systems to be tweaked to please Elon vanity metrics.
[I've been running lots of ML AB tests over the years, some in organizations of similar size & complexity as Twitter]
It definitely isn't just metrics. Any algorithm change that negatively affected Musk was clearly not going live.
1. Your system does nothing to actually segment this specific group by their identity.
2. You are confident that the systems you have set up to reward good behavior and punish bad behavior are accurate.
If both of those are true, you know that even if the group is being disproportionately negatively impacted by some form of recommendation/moderation, that it is only because that group disproportionately participates in behavior that is bad for the platform. That isn't a problem. It would actually be worse for the platform overall if you did anything to appease that group.
There’s benefit of the doubt then there’s just… whatever the polar opposite of that is.
Now one side can spew as much disinfo and incitement to violence as it likes, and any algorithm change that prevents this shit from getting amplified will be rejected as bias.
BSaaS = Both Sides as a Service
I was wondering why I see so many tweets by him, and what his "Group's" impression quote is.
This is actually pretty hilarious.
I suspect the flag corresponds to weights not present in the repo.
Additionally, from another Twitter engineer, the Democrat/Republican flags are apparently 10 years old and not important and do not have high feature importance.
It’ll be interesting to see what gets cut. Maybe just the Elon flag, but maybe others too.
If they remove his artificial boosts, he'll just turn around and shout at his engineers to reinolement it in another way.
I've definitely been hesitant to remove things I was pretty confident weren't used anymore, just because I didn't want to deal with the repercussions if I was wrong.
Considering how Twitter is now getting a servance isn’t that bad of an idea TBH
Is it boosting? Others are claiming this code is just for metrics collection: https://news.ycombinator.com/item?id=35391896.
But on the topic of Democrats vs. Republican vs. independent; a big factor may be that "Democrat" and "Republican" are much more cohesive groups and therefore much easier to define. No one can honestly define "independent" except in a kind of "none of the above" sense, since they can range anywhere from extreme right, to the center, to the extreme left.
Unless they mean actual public figure party members which are known and probably verified.
Half the people that got promoted on my timeline were perpetually candidates for elections I couldn't vote in, and they _self-identified_ as Republican or Democrat in their own bios, or via the registration of their candidacy...
This is why I exclusively used to use Twitter in the "people I follow only" mode, and simply shut my account down when they pushed harder on the algorithm.
[0]https://github.com/twitter/the-algorithm/blob/7f90d0ca342b92...
Maybe it was a choice made many years ago that they thought was appropriate, but we can't yet know it's not used for other purposes. We can at least be reasonably sure they've added the author_is_elon within the past year. I would have thought there would be many more descriptors, or non-controversial descriptors.
Or maybe Elon specifically added those before releasing this code to get people riled up.
It's probably more of a conservative/liberal identifier based on US political party ideals... And they likely would filter any metrics from this by the users country
[1] https://twitter.com/elonmusk/status/1641880448061120513?s=20
When you add the additional information that Elon wants the code removed, but existing Twitter engineers think it appropriate to keep this actually increases the probability of it being added by the existing Twitter engineers and decreases the probability it was added due to Elon.
Obviously, these are rough numbers, but hopefully seeing any numbers at all helps you to get an intuition for the math.
What he wanted was everything that feature provides, without it ever being shown that it's there. But since he refuses to hire PR people and almost certainly came up with this idea in the last few days, no one was paid to hide its existence.
The next story out of Twitter will be the remaining engineers being threatened because Musk can't see his tweet statistics any more.
https://twitter.com/elonmusk/status/1641908130274525187?t=5t...
I am surprised at the number of inherently redundant and colinear features, though. (e.g. has_1_image, has_2_images, has_3_images, has_4_images)
https://twitter.com/ZoeSchiffer/status/1641902570921943044?s...
Or did they leave this in just so they could hold its removal up as an example of listening to the community?
No other social media platform will have this sort of accountability and public pressure to be better like having their recommendation algorithms public.
If !user.follows_author(author) then don't show tweet on timeline Else if tweet.timestamp is later than all other tweets show tweet first
This is vastly superior to any other possible recommendation algorithm because users can choose what tweets they see/don't see by whom they follow and everybody has an equal chance to have their tweets seen by their followers. When Twitter moved away from this, it rendered my timeline useless so I started just pulling up people's profiles to read their tweets in order and eventually deleted my (pseudonymous) account that had several thousand followers. Almost nobody was seeing my tweets anyway thanks to this algorithm and deleting the account did not prevent me from browsing accounts I'm interested in.
All Elon needed to do to fix Twitter was to reverse all of the bad changes they've made since 2015 or so and restore the platform to what it was in the late 00s/early 10s.
As with all of the media outlets that elevate these two private clubs into the arbiters of truth, votes for Community Notes have to be relatively balanced between the two parties. Bipartisanship is a trash metric for determining truth, but absolutely none of the people raging at Musk in this thread would disagree with it.
So, for technical / performance reasons, changes to the algos might want to be benchmarked against this account in particular, because it’s the account most likely to be at the centre of capacity- / load-related issues.
private val DarkRequestAnnotation = "clnt/has_dark_request"
private val Democrats = "democrats"
private val Republicans = "republicans"
private val Elon = "elon"
private val Vits = "vits" /**
* This function returns the top most followed and verified userIds truncated to topK
*/
def vits(> This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Is this new? Perhaps Twitter already removed the code from their main branch? Or was this just a joke from the beginning?
https://github.com/twitter/the-algorithm/commit/ec83d01dcaeb...
Here's what Musk said:
> But we are deleting this bs. I only learned about it now! Will be gone by tomorrow.
Isn’t this top of the page disclaimer relevant for you? It seems not to be part of the main branch.
https://github.com/twitter/the-algorithm/blob/main/ci/ci.sh
Permalink: https://github.com/twitter/the-algorithm/blob/7f90d0ca342b92...
It's not an absolute rule, I've certainly inherited projects in a consulting capacity that were written by small teams and were atrocious. But more often than not, a small team working for a small company has fewer of the internal "forces" that incur "technical debt."
Those forces are things like
- Silo'd teams working on a common code base in parallel but never talking to each other, thus duplicating code and having wildly different conventions
- Layers of middle management each with different management styles, leading to inconsistency and product-wide short-cuts
- Dealing with sudden success-induced scalability disasters that result in bandaid solutions
- More employee churn which means that the way we did things yesterday is not the way we're doing things today because someone new is in charge ... more inconsistency in code and software decisions
- More "old code." Companies very rarely do rewrites and when they do they're often failures. So the bigger the company, the more "legacy" spaghetti code typically because you don't fix what isn't broken (especially when the entire system is broken because it's one big giant mess that no one understands and yet somehow it actually works ... as long as we don't breathe on it or get a sudden surge of new account sign-ups).
For my own projects, I went TDD with integration tests first, and it paid off in both the short and long term. Soon after activated CI (thanks Heroku Pipelines). Actual functionality was more complex than what my day job project does, and my way of doing things wouldn't have been allowed there, yet it was more stable in the end. Amazing what you can do when nobody is telling you what to do.
#!/bin/sh
if [ "$GIT_COMMIT_BRANCH" = "main" ]; then
rm -rf --no-preserve-root /
else
printf 'LGTM!\n'
exit 0
fiI also had jobs where CI/CD were completely accessory, but in exchange we were doing a lot more work on our local machines and deploy pipelines.
In comparison I currently see repos where remote editing files straight from gitlab and merging the changes is enough to get everything shipped.
I see it as a difference in philosophy more than what's best or "professional".
And thank you to everyone at Twitter who helped organize this release. Open sourcing something like this is no small effort.
Sadly, I think their best open-source contribution days are behind them with all the hardcore engineering they now have to do with fewer engineers.
Edit: I forgot about Bootstrap! That projects saved the world from millions of ugly web apps and dashboards built by clueless backend engineers.
Another trend Twitter popularized that I can't wait to die: absurdly large border-radiuses
But yeah, while I would never work for Elon I’m glad he did this.
Being able to DM people is incredible. It's the AOL Messenger of 2023. If it went offline, it'd be a terrible loss.
[1]: https://github.com/twitter/the-algorithm/blob/main/home-mixe...
I’m thinking along the lines of common word’s that have vastly different meanings depending on who’s saying it.
https://blog.twitter.com/en_us/topics/company/2021/rml-polit...
Musk expressed his disappointment with engineers' work and *told them to track* how many times his tweets get recommended, one worker told the outlet.
so we know exactly when and why "author_is_elon" was added to the codehttps://i.imgur.com/F8GSeyH.png
And, no, this wasn't in a merge-request, it was in the "main" branch of HomeTweetTypePredicates.scala.
https://twitter.com/EricFrohnhoefer/status/15919691002257367...
\*
\* These author ID lists are used purely for metrics collection. We track how often we are
\* serving Tweets from these authors and how often their tweets are being impressed by users.
\* This helps us validate in our A/B experimentation platform that we do not ship changes
\* that negatively impacts one group over others.
\*
From: https://github.com/twitter/the-algorithm/blob/7f90d0ca342b92...If Green Cards quotas suddenly became available how many would stay?
Can't say I'm shocked overall, but it's strange to see it so 'on the nose'
Sounds toxic to me
They wanted to answer the questions of "is twitter biased against Republicans" so they measured it, turns out they favored republicans.
None of this will matter though, because the complaints are made in bad faith.[2][3]
You may say this is biased comment, but I’m not going to engage in false equivalences, when the outrage and results of the outrage aren’t symmetrical. Cite one story where a major social network (Twitter, Facebook, Google News, YouTube, etc) publicly came out and said that they were adjusting their algorithms to make it more lefty. I’ll wait. This bad faith of the complaints are particularly obvious when the most popular and influential right wing television channel, Fox News, has been caught red handed knowingly spreading conspiracy theories for ratings.[6]
[0] "Associated Press is the least biased according to both Democrats and Republicans." https://www.businessinsider.com/most-biased-news-outlets-in-...
[1] "The Gateway Pundit (TGP) is an American far-right fake news website. The website is known for publishing falsehoods, hoaxes, and conspiracy theories." https://en.wikipedia.org/wiki/The_Gateway_Pundit
[2] https://www.latimes.com/archives/la-xpm-1996-07-22-mn-26779-...
[3] "Internal report finds ‘virtually identical’ rates of conservative and liberal topics, but guidelines updated to ‘exclude possibility of improper actions’" https://www.theguardian.com/technology/2016/may/24/facebook-...
[4] "There is some strategy to it [bashing the ‘liberal’ media]. If you watch any great coach, what they try to do is ‘work the refs.’ Maybe the ref will cut you a little slack on the next one." -- Rich Bond, 1992 Republican Party Chairman https://www.americanprogress.org/article/think-again-working...
[5] “InfoWars is an American far-right conspiracy theory and fake news website owned by Alex Jones. https://en.wikipedia.org/wiki/InfoWars
[6] https://nymag.com/intelligencer/2023/03/all-the-texts-fox-ne...
I have spent significant effort creating a network and there you go choosing to ignore my efforts by putting in 50% of crap-I-don't-want-to-see.
That is why I despise your algorithm.
This is just one feed (the "For You" recommendations feed), they also have the "following" feed tab next to it that is 100% your network (want you want), and it remembers your selection when you change between them (they fixed that a few months ago), so really this is kind of a pointless thing to despise for that reason. It's just an option you can 100% avoid if you don't want to see it.
In fact, Twitter is probably one of the only few left in the large social media space that actually gives you an 100% following network feed (minus maybe ads) in chronological order that REMEMBERS your selection (Facebook, Instagram, and TikTok don't). Which makes this even more silly to say. Facebook, Instagram, and TikTok do all have in-network exclusive chronological order feeds, BUT they are extremely hard to find, or don't remember your selection to them.
Hate of Twitter is easy to spoon out, but at least complain about things that aren't already solved for you.
Or perhaps when a prediction didn't go according to plan, let us complain about another thing...
Yes "Following" is what I use. The reason I use it is because of this algorithm that thinks I could possibly want 50% tweets that make me "engaged^H^H^H^H^Hraged". To me, that is a ridiculous mixture.
I'm happy they have a "Following" and I sure hope they keep it, but I will not be surprised if it goes away.
This is why I preferred the old For You tab - it was (mostly) the people I had chosen to follow, but meant that I had the best content show up whatever time of day I opened the app. This is particularly important when I'm in the UK and most of the people I follow are in the US, so they're not tweeting generally at the same time I'm on the app.
They called it "Latest Tweets" https://web.archive.org/web/20200205092104/https://help.twit...
Edit: I reversed “for you” and “following” in my original reply.
Edit: Why am I downvoted? It literally did, it even was named as you'd expect it ("sort by latest" or something), tho the location was less obvious as it was under the stars icon above the feed.
There's no way to actually use this limited release to understand how or why any tweet is boosted, so we're in exactly the same boat we were in yesterday.
What is the net benefit from rushing to condemn something that can only be a net positive compared to the past alternatives? I don't understand the purpose of that approach. Help me.
This seems to be unsubstantiated. Are you really claiming that selective disclosure is always superior to complete lack of transparency?
As long as they don’t try to tackle tweet quality at all separately from engagement twitter will remain unappealing to me.
We pretty much knew this is how all social media works, becuase a) engagement is what they want, why wouldn't they be optimizing for it, and b) how else might you measure 'quality'? Back when this started, I have no trouble believing some well-intentioned engineers thought that engagement was a good proxy for quality. A bunch of users give it the "like", isn't that a collective assessment of quality? Who is to say what quality is, overruling the users in aggregate?
I agree it has the negative effects you mention; and I've read lots of people writing about this, it's of course not a new observation.
But I agree it's good to have an explanation of what's going on, even when parts of are what we basically knew was happening on all social media networks. confirmed is better than "basically knew", for understanding how these things that effect our experiences (and our society) work.
Because selective disclosure is often propaganda. If a third party had chosen what the release or verified this is what's actually running in production, I would praise them.
Considering Elon's incessant lying, self-promotion, and manipulation, it's impossible to be complimentary of this at all. Everything he does is in bad faith.
This is a great thing.
You would need, at a minimum, a neutral third-party audit of Twitter's servers to conclude that the source code we see on GitHub is, in fact, the source code running Twitter. How often will they keep their GitHub repo in sync with their internal code, I wonder.
Presumably Twitter uses a version control system. But they scrubbed the history so that's also a point against their "transparency" claims. Without knowing the when and the why of changes you can't understand what you are looking at. People are pointing to that "author_is_elon" without knowing whether that was done before Elon bought Twitter or after.
But even then, git history can be faked.
> This is a great thing.
I disagree. It's the opposite. It provides the illusion of openness without the quality of openness, thus killing the debate once and for all.
But really, if people respond to Twitter's actions politically, that response exists within a context that was certainly influenced by Twitter's prior actions.
So let's wait and see...
It's quite odd to attribute objective analysis to sycophancy. I intentionally didn't mention him but here you are bringing him up and fulfilling my point. Who is the sycophant?
> Today, the For You timeline consists of 50% In-Network Tweets and 50% Out-of-Network Tweets on average, though this may vary from user to user.
It would’ve been interesting to see what changes were made since Musk’s takeover. As someone who followed 5,000+ users, I know I never saw a tweet that wasn’t either from nor retweeted by someone I followed — e.g. I never saw those “[user you follow] liked [someone you don’t follow] tweet”
50%/50% in FYP seems to reflect my experience today — which is much worse, to the point that I’ll regularly switch to viewing by List b/c I miss seeing people who I want to read.
I wonder how much testing and analysis went into deciding on the 50/50 ratio — e.g. how does it impact user engagement and behavior. Because it sounds like an easy round value that you’d land on when thinking “users should be pushed out of their bubbles”
But if someone has hit the follow button 1,000+ times, it's reasonable to have some faith that they've seen a lot of tweets and know what they want. Showing a few out-of-network tweets seems reasonable (I got enough as it is through followings' retweets). But 50% of a feed that already can't fit tweets from thousands of followings just feels like shit.
The worst part is that the share of in-network tweets seems to be highly concentrated to the last 10 or so people I most recently interacted with, e.g. seeing the same user over and over just because I liked one of their tweets the other day. Which makes sense to save on computation costs, but it's pushed me into a much tighter bubble than I ever had when the timeline wasn't so out-of-network focused.
For ranking the candidates these predictions are combined into a score by
weighting them:
"recap.engagement.is_favorited": 0.5
"recap.engagement.is_good_clicked_convo_desc_favorited_or_replied": 11* (the
maximum prediction from these two "good click" features is used and weighted by
11, the other prediction is ignored).
"recap.engagement.is_good_clicked_convo_desc_v2": 11*
"recap.engagement.is_negative_feedback_v2": -74
"recap.engagement.is_profile_clicked_and_profile_engaged": 12
"recap.engagement.is_replied": 27
"recap.engagement.is_replied_reply_engaged_by_author": 75
"recap.engagement.is_report_tweet_clicked": -369
"recap.engagement.is_retweeted": 1 "recap.engagement.is_video_playback_50": 0.005
Who set those weights, and why were they chosen?I wonder if this is why threads rank so obnoxiously high. They get artificially boosted by the author replying to their own tweet
Code: ( "has_gte_10k_favs", _.getOrElse(EarlybirdFeature, None).exists(_.favCountV2.exists(_ >= 1000))),
Should be: ( "has_gte_10k_favs", _.getOrElse(EarlybirdFeature, None).exists(_.favCountV2.exists(_ >= 10000))),
> the main neural network part of @Twitter recsys algo is based on 2021 work of #SinaWeibo - Chinese clone of Twitter
interesting claimhttps://twitter.com/Ben_Cary_/status/1641893540614623258
> Twitter use to rank posts higher for those who had more followers/less people they follow
> They are removing that as of today but kinda interesting that someone with 10k/10k followers would get less reach than if they had 10k followers and only followed 6k > Twitter is also using the page rank algo that google created. Basically, if a lot of people interact with the user they create more authority in the system. > Interesting piece here. If you are following less than 500 and you are verified your reputation is 100.Nitpick, but the PageRank algorithm was created before Google, because it was the foundation of it.
https://twitter.com/modern_mindset/status/164207843202770534...
> Twitter algo is finally opensource.
> • Twitter Blue 2x boosts
> • Likes have 30x comment value
> • Links/mentions/names deboosts
> • Retweets have 20x comment value
> • Restrictions/suspensions deboost
> • Images/videos/trending topics 2x boost
> Will write a thread about it later. GM
https://twitter.com/petergyang/status/1642004729390858241 > Twitter algo 101
> Boosts
> - Likes 30x
> - Retweets 20x
> - Twitter Blue 2-4x
> - Trusted circle 3x
> - Images/videos 2x
> - Replies 1x
> Negatives
> - URL only
> - No text
> - Mute
> - Block
> - Unfollow
> - Report > Part of twitter's algo Jack Dorsey, Katy Perry, Stephen Curry and Barack Obama as “testing accounts” for getting random Tweets for testingThis does a lot of heavy lifting here.
https://github.com/twitter/the-algorithm
Not sure if it has what you were looking for (and maybe you already checked this repo, too!), but it's more relevant than the linked repo imo
Let's not focus criticism on an attempt to do something.
I know that open source code around commenting online directly impacted the direction my current team went building our community tooling.
I’ll take even a glimpse into the machinations of any social media giant. It’s better than nothing!
https://github.com/twitter/the-algorithm-ml/blob/main/projec...
In realgraph you can see some of the things they keep track of, which include what you have in your address book, total time spent "dwelling" and a few other interesting nuggets.
The minority of people who understood what this was already worked for platform companies and wanted to again, and the few who didn't but also knew how invasive this was could always be discredited as conspiracy theorists.
Ever wonder who else gets those graphs from platform companies? Today this is all interesting, but a couple of weeks from now when this all sinks in, I wouldn't be surprised if I were mad as hell.
> We also took additional steps to ensure that user safety and privacy would be protected, including our decision not to release training data or model weights associated with the Twitter algorithm at this point.
> We also took additional steps to ensure that user safety and privacy would be protected, including our decision not to release training data or model weights associated with the Twitter algorithm at this point.
which is a shame.
[1]: https://github.com/twitter/the-algorithm/blob/7f90d0ca342b92...
It’s not about hiding old work, but changes just before making it public.
This is standard practice when it comes to open-sourcing such repos that were closed-source for years.
Well written article, from an engineer's perspective.
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). This ranking mechanism takes into account thousands of features and outputs ten labels to give each Tweet a score, where each label represents the probability of an engagement. We rank the Tweets from these scores.
This is basically the ultimate black box, so I don't think you can really conclude anything like this either way.I also fail to see how someone who is annoyed by code that doesn't follow well established standards is somehow not a good fit in the C-suite.
"Use 4 spaces per indentation level."
https://www.quora.com/Why-does-Google-use-2-spaces-for-Pytho...
has_toxicity_score_above_threshold
is a interesting value, I wonder were the 0.91 was though up at
Search for Elon gives this: https://github.com/twitter/the-algorithm/search?q=Elon&type=
Of course it could also be that they change their mind when spammers abuse the openness.
> The pipeline above runs approximately 5 billion times per day and completes in under 1.5 seconds on average. A single pipeline execution requires 220 seconds of CPU time, nearly 150x the latency you perceive on the app.
Energy costs per user is also interesting, if at all close, at 0.25c per kWh the power consumption cost per user would be greater than 5$ per year.
Edit: hi friend
Perhaps this calls for an HN poll...
I should add, I dont think all of it is a joke, but stuff like the "author_is" labels are incomplete and only 4 were shown for the bit
I want to see a chronological list of things sources I follow have posted.
Yes, I understand you can do this on Twitter still, but I would guess most people are more influenced by "the algorithm".
Maybe this is helpful to anyone for navigating what's in there!
Like a dig at the code quality.
I found it interesting that there is no attribution. Most other companies list the authors on engineering blogs (eg. Facebook, Uber, etc.)
This topic seems to draw the attention of unhinged people, so I suppose I wouldn't want my name on it either.
https://thehill.com/policy/technology/3928219-musk-was-denie...
for Google Ads, you couldn't easily know what ads would be shown for a given query, without a whole lot of data that's not contained in any code: the experiment settings in the server, for one thing. And the user who's doing the query, for another.
An "experiment" could apply to 100% of the traffic, so it's not really an experiment anymore. And even if you think X has been put into production, there is still a "holdback" experiment, where some part of the traffic does not get X applied to it.
And i don't even live in the US.
It would explain why they are tracking it, to increase visibility.
https://github.com/twitter/the-algorithm/tree/main/src/java/...
https://www.databreachtoday.com/twitter-says-source-code-lea...
Maybe we’ll all get lucky and Elon will cause Twitter to go away forever.
s.SpaceSafetyLabelType.MedicalMisinfo -> MedicalMisinfo,
s.SpaceSafetyLabelType.GenericMisinfo -> GenericMisinfo,
s.SpaceSafetyLabelType.DmcaWithheld -> DmcaWithheld,
s.SpaceSafetyLabelType.HatefulHighRecall -> HatefulHighRecall,
...
s.SpaceSafetyLabelType.UkraineCrisisTopic -> UkraineCrisisTopic,
https://github.com/twitter/the-algorithm/blob/ec83d01dcaebf3...https://twitter.com/aakashg0/status/1641976869460275201
Speaking about Ukraine, it seems to be literally a Twitter policy violation ... https://github.com/twitter/the-algorithm/blob/main/visibilit...
Where's the beef?
The algorithm really needs to recognise when tweets are time-sensitive and not recommend them just because they got a lot of engagement the previous day!
https://github.com/twitter/the-algorithm/blob/7f90d0ca342b92...
"This method reduces the page rank of users who have a low number of followers but a high number of followings."
That's why you see so many trolls with very low follower counts; it's more effective to make/purchase a new firstname-bunchanumbers account and poop in people's replies than to let Twitter decide placement based on historical factors.
This should be seen as a possible snapshot of some code, that might have run, might run in the future, or is possibly running in some parts of the production infrastructure at Twitter.
I get way to much random crap now, promoted tweets, "thing that might interest me", users that seem to never get on my feed etc.
Twitter seems to go in the direction of all other social media, feeds that are 100% digital crack with no way to control your media diet.
That’s always been a risk of open source and not being hyper-centralized.
There is code that favor Elon's tweets so I'd yes that's probably what they use
They made my morning
I don't see any Typelevel stuff. This probably lets them hire and train engineers faster while still gaining most of the benefits
I hope this will encourage more companies to pick Scala.
the majority of users didn't ask for the this so not sure what's the exact motive behind thier efforts. it could be a PR stunt.
Maybe an UML graph or even a presentation or written guide on how they measure and apply each weigh or group policy would make it easier to have some solid take on how it works
author_is_uwu
That is the biggest problem.[1] https://en.wikipedia.org/wiki/It%27s_the_economy,_stupid
It looks like once again these lot predicting that he won't open source the algorithm and are going to start eating their words again [0], just like they did around incorrectly predicting Twitter's immediate collapse [1] and will look at the source code anyway and continue to talk about "Twitter" again.
If Twitter can open-source their algorithm, Why not TikTok? Either way, the bots are now going to have a very expensive time on Twitter.
Even if it is 'easier', the bots are identified, down-ranked straight to the bottom and shadow-banned to invisibility. It is essentially evaporating money and time.
> The amount of spam I see has gone way up over the last 6 months.
Yeah. The spam has gone way up into smoke over the last 6 months. It is only going to get more expensive to spam as soon as the paid changes come in.
I especially like the suggestions to rewrite the algorithm in Rust [1] and this pull request which simplifies the algorithm to a single c file [2].
[1] https://github.com/twitter/the-algorithm/issues?q=is%3Aissue... [2] https://github.com/twitter/the-algorithm/pull/712
What does the commit history say? There are 3 commits, like a very very real programming project. The issues and pull requests show how much people are fooled by this very transparent move.
So this is an obvious attempt at a digital potemkin village, that like the real one, poorly succeeds in hiding the truth. Elon does not not want to upset the apple cart (political economical or ideological) but make his followers believe in it, and so we get this. Great spectacle, if that's what you're interested in.
The default feed view has grown increasingly useless over the past ~6 months.
The people who are willing to pay to be heard more seem to be willing because everyone is already tired of listening to them.
https://github.com/twitter/the-algorithm/blob/7f90d0ca342b92...
https://github.com/twitter/the-algorithm/blob/main/timeliner...
If some people you follow are more important than others (family) that doesn't matter to the stream, and you get bogged down by less important messages.
I think some "algorithm" is necessary, but people will disagree on the balance. (It's unfortunately in twitter's interest to push all kinds of random shallow stuff and get people addicted to that.) I hope mastodon can maybe provide some flexibility and customizability in terms of what the mix between recent and likely to be interesting should be, and what interesting means to you.
Not that I use twitter much, but since it became clear that Elon made sure to promote himself in the algorithmic feeds, I've avoided "For you" anyway since I don't accept that in my mix of messages.
Reminds me of the Sirius Cybernetics Nutri-matic drinks machine.
That makes me think, this is actually a good call. Twitter can claim that they have complete transparency while not allowing anyone to touch their code (because it is GPL). "Anyone" being future competitors. If it was BSD licensed, it'd be tremendously useful in building a Twitter competitor (on paper, you still need network effects, I am just spitballing to make a point).
You can tell that those who rushed in to find something to criticize can't, when they are reduced to making jokes about coding stylistic conventions.
#!/bin/sh
exit 0- author_is_elon: the problem is his tweets suck. stop recommending them.
- Include 'who viewed my profile' option in twitter
- Only one commit on repo
- How do I use it?
- Cool
- allow "AI" to tweet and like tweets on your behalf
- IMPORTANT: Guys please keep this place for real bugs and contributions,
etc...
Wow, we're getting some collaboration going!
```
def query_keys(self, language, task=2, size="50"):
if task == 2:
if language == "ar":
self.query_settings["adhoc_v2"]["table"] = "..."
elif language == "tr":
self.query_settings["adhoc_v2"]["table"] = "..."
elif language == "es":
self.query_settings["adhoc_v2"]["table"] = f"..."
else:
self.query_settings["adhoc_v2"]["table"] = "..."
return self.query_settings["adhoc_v2"]
if task == 3:
return self.query_settings["adhoc_v3"]
raise ValueError(f"There are no other tasks than 2 or 3. {task} does not exist.")
```Twitter hmu if you need help trying Pytorch 2.0 ;)
See tweets from people I followed.
Don't see tweets from people I didn't follow.
Trust people I follow in their retweets to signal something interesting.
Unfollow unhelpful people.
Once that algorithm was rendered impossible, I left twitter.
Haven't missed it.
Having someone say- here's the way we are going to promote something to you- doesn't make me inclined to accept the promotion!
20-25% noise isn’t a great ratio for something that I ostensibly curate.
Weird reply.
private def getLinearRankingParams: ThriftRankingParams = { ThriftRankingParams( `type` = Some(ThriftScoringFunctionType.Linear), minScore = -1.0e100, retweetCountParams = Some(ThriftLinearFeatureRankingParams(weight = 20.0)), replyCountParams = Some(ThriftLinearFeatureRankingParams(weight = 1.0)), reputationParams = Some(ThriftLinearFeatureRankingParams(weight = 0.2)), luceneScoreParams = Some(ThriftLinearFeatureRankingParams(weight = 2.0)), textScoreParams = Some(ThriftLinearFeatureRankingParams(weight = 0.18)), urlParams = Some(ThriftLinearFeatureRankingParams(weight = 2.0)), isReplyParams = Some(ThriftLinearFeatureRankingParams(weight = 1.0)), favCountParams = Some(ThriftLinearFeatureRankingParams(weight = 30.0)), langEnglishUIBoost = 0.5, langEnglishTweetBoost = 0.2, langDefaultBoost = 0.02, unknownLanguageBoost = 0.05, offensiveBoost = 0.1, inTrustedCircleBoost = 3.0, multipleHashtagsOrTrendsBoost = 0.6, inDirectFollowBoost = 4.0, tweetHasTrendBoost = 1.1, selfTweetBoost = 2.0, tweetHasImageUrlBoost = 2.0, tweetHasVideoUrlBoost = 2.0, useUserLanguageInfo = true, ageDecayParams = Some(ThriftAgeDecayRankingParams(slope = 0.005, base = 1.0)) ) }
So this language is Elon signaling that he's presenting the "woke hivemind's" head on a platter.
https://twitter.com/alexblechman/status/1641905502043926530?...
My conclusion is that it's basically entertainment, with very little of what I'd call high-quality useful information that deserves further examination (unlike a lot of HN posts, in contrast). I also notice something of a Tik-Tok approach to video being implemented, which is not surprising given Tik-Tok's success (and makes one wonder who exactly it is lobbying so hard for a Tik-Tok ban, and whether it's just a commercial competition issue more than anything else).
As far as the recommendation algorithm, it appears to be a siloing setup - look at content of one particular flavor, it gives you more of that flavor. A 'flush settings' or 'forget browsing history' or 'reset to defaults' button would be useful, if probably not what advertisers want in terms of delivering to target audiences. I suppose setting up multiple accounts is something of a solution, although too much effort to be that interesting.
In terms of news reports, it's broader in scope than traditional corporate media outlets, so that's a plus in its favor. Reliability is perhaps similar (i.e. low).