Hacker News new | past | comments | ask | show | jobs | submit login
ByteDance's Recommendation System (github.com/bytedance)
63 points by tim_sw 8 days ago | hide | past | favorite | 55 comments






The article linked in that post is dead (403). Here is a cached version:

https://archive.is/DDUjQ


I very much doubt this is the TikTok algorithm.

1. It doesn't even claim to be that.

2. It's over a year old - so even if it was, this is no longer it.

3. There's zero incentive for them to release it, but every incentive to release a fake one.

4. TikTok is too much of a national asset, I doubt the Chinese government would not use it to their advantage (and transparency would be counter to that).

Edit: there's also https://news.ycombinator.com/item?id=42471278


From what I can tell, they didn't release the actual model, but rather a kind of framework for running and training models in a distributed way. The only actual "model" in there appears to be three Dense layers in a "demo" file.

I mean, it's their serving infra, but not their features. See my reply in another parent comment.

Like Facebook before, everyone talks about the TikTok algorithm being some super secret and valuable mystery. In reality, both Facebook and TikTok succeeded because they were at the right place at the right time and didn't screw things up. The TikTok recommendation system is smart and very well implemented, but nothing novel that couldn't be implemented by a dozen other teams.

Not true. Why do IG reels and YouTube shorts suck, then?

They clearly built something superior. And it can't seem to be matched by the biggest tech companies.


More data beats better algorithms. TikTok has vastly more interaction data by nature of its design. IG and YouTube shorts don't have nearly the volume of engaged users and are reluctant to disrupt the cash cow of their traditional interfaces.

IG has plenty of data (I did ML at IG). Don't be naive.

It is the users and not the company.

I haven't worked on sites as big as YouTube but on sites with 100,000 members who are very much engaged with one "game" you usually find they are mainly indifferent when you offer them another "game" to play.

I like YouTube for what it is. I have interacted very little with shorts but Google has scarily seen into my imagination. I don't want to go into that rabbit hole.


IG users and Tiktok users were / are quite similar. Especially when Tiktok wasn't yet eating IGs lunch.

The definition of "similar" is the problem w/ vector search isn't it?

Two populations can be similar in terms of conventional demographics such as age, gender, race, what kind of clothes they wear, etc. but be different in their behavior. IG users are "players of the Instagram game" and TikTok are "players of the TikTok game" and a whole system of values and behaviors are involved.

To take an example playing the "engagement farming" game on Bluesky I can follow people and know some fraction of people will follow me back, but who do I want to follow?

I postulated that the people I want are people who will repost my photos so I can try following people who repost photos but I find that reposters are not "followers" whereas I get a much better response rate if I follow people who follow another social media photographer since those people are "followers". People have an online behavior signature like that which for me matters more than the color of your skin.


I question the assertion that TikTok has more interaction data than Google.

Google has a ton of interaction data to be sure, but the app design decisions of TikTok (auto play, auto loop, easy swipe, easy like, etc.) extract so much more usable/actionable interaction data. The size of the like button on YouTube is a tiny percent of the screen. On TikTok the like button is the whole video.

Not just that. The whole UI is designed for behavioral data aggregation.

It’s not just “did you click the like button”. It’s “did you swipe it away? How long did you watch until you swiped it away? Did you come back afterwards? Did you let it loop multiple times before moving on?”.

They’ll capture likes and dislikes you yourself probably didn’t even knew you had, just from tens and hundreds of these micro actions. And they’ll do it in the very first hour of you using the app, whereas YouTube won’t know too much about you even after months of you using it.


More data? Seriously? What has more data than YouTube?

A TikTok user may watch hundreds of videos and like dozens of them in a single viewing session. A YouTube user might watch ... 4? YouTube tried to force 10+ minute videos so they could insert television-style commercials.

IG reels and YouTube shorts are crap because creators create good content only for the place where all the audience is, which is TikTok. When users open TikTok they expect TikTok-style content. When users open YouTube they don't expect TikTok-style content, in fact they hate it. Same with IG reels.

It has nothing to do with the quality of the algorithm. In fact the YT algorithm has gotten worse since they introduced shorts because they shove shorts into people's faces.

A better question would be why is the regular YouTube algorithm so bad. And the answer is because it doesn't optimize at all for the consumers, but for the producers (producers of ads, that is). TT has figured out it doesn't matter what people consume as long as they consume, whereas YT is bullish into controlling what people consume.


My take: it's a mix of brand bundling and lack of data. They're roughly equivalent but shorts is bundled with youtube which has its own brand perception and reels are bundled with IG/FB and have their own brand perception. Additionally fewer users means less algorithmic data to keep viewers.

Tiktok was allowed to establish its own brand and develop a community while shorts and reels are intrinsically tied to their past. They may be able to escape that history but I don't think it's helping them be fast movers or win "cool" points.


> My take: it's a mix of brand bundling and lack of data. They're roughly equivalent but shorts is bundled with youtube which has its own brand perception and reels are bundled with IG/FB and have their own brand perception. Additionally fewer users means less algorithmic data to keep viewers.

My intuition would work the other way around. I'd expect offerings from more established companies to have a big leg up in terms of usable data. Youtube should be able to use a viewer's entire watch/subscription history to inform itself about what shorts a user might like, even before they've interacted with their first short. Bytedance, on the other hand, has to start from scratch with each truly new user.

The coolness or stodginess of the company would be secondary to its effects. If boring-old-Youtube could promise shorts creators great exposure to an enthusiastic audience, it would win the platform regardless of its brand.


I'll argue that TikTok's structure which offers you one video at a time gives you much more useful information than YouTube's interface, which looks like

https://www.threads.net/@mikeynerd/post/DB7DS7LzsVU

TikTok gets a definite thumbs up or thumbs down for every video it shows you whereas if you click on one particular sidebar video YouTube can make no conclusion about how you felt about the other videos in the sidebar. The recommendation literature talks about "negative sampling" to overcome this, I never could really believe in it, I think now it doesn't really work.

I built a system like that and found that, paradoxically, you have to make it blend in a good amount of content that it doesn't think you'd like for it to be able to calibrate itself.


> If boring-old-Youtube could promise shorts creators great exposure to an enthusiastic audience, it would win the platform regardless of its brand.

Just a guess, as someone who makes their living from YouTube: YouTube creators are driven to create content that earns them money. As compared to long-form content, YouTube shorts earn next-to-nothing, and it’s not clear that they drive significant new traffic to more-valuable content.

Most large creators on YouTube are focused on the bottom line, not exposure.


The reason shorts don't earn any money, as compared to Instagram and TikTok, is that they don't advertise crap for me to buy (I have YT premium), so I don't end up buying shit there like I do the other two.

Having read the paper, what's unique about Bytedance's approach is how relatively simple it is at its core - obviously there's a lot of complexity around it to do it at scale, but I feel like it's simpler than the social-graph based approaches.

It's simpler intuition but more complex from a data / ml perspective.

Their algorithm is really built around their features. Specifically, temporal representations of user interest:

https://ieeexplore.ieee.org/document/9458799/

The features used by their algorithm tells you what a user is interested, historically.

Contrast this to Meta, which uses the social graph as their features. Imagine features like the number of times a user likes another author's / cluster's content.

Tiktok will serve you $TOPIC because you have $INTERACTED with $TOPIC historically.

Meta will serve you $TOPIC because you have $INTERACTED with $PEOPLE who post $TOPIC, historically.

Meta only coincidentally gives you what you like.

Tiktok knows what you like.

This is the difference. This is why IG is losing.


That's a crazy design choice by meta if true. The interests of those in my social graph have very little connection to my interests.

It's because they originally built their recommendation system to recommend friends and their content. Here, the social graph makes complete sense as the foundation for their simple search algorithm. But as they expanded their recommendation capabilities, the features stuck around. It's the same reason why tech debt accumulates. Data sticks around in the same way code does. But data is even higher friction, since it's a superset of the code.

Reels isnt getting the organic growth data, tiktok has a data moat.

I haven’t used TikTok, but I find both Reels and Shorts addictive enough.

What part of right place at the right time did you miss?

Everyone talks about TikTok having some valuable algorithm, but I keep running into the most dimwitted nonsense every time I try it.

Then again, perhaps this is the algorithm's way of scaring me away to save precious bandwidth, knowing full well that I will never buy products from online ads anyway?


Quickly skip past videos you're not interested in, and like or comment on those you like. Your "For You" page should noticeably change.

Additional evidence that TikTok doesn't possess special algorithm and infrastructure prowess is the complete failure(/gaming?) of search. Many (most?!) searches on TikTok have been returning irrelevant shock and/or porn content for weeks.

What did Livejournal, Xanalga, Myspace, Tumblr, all screw up and Facebook do right? Facebook had stiff competition from the start.

> What did Livejournal, Xanalga, Myspace, Tumblr, all screw up

Don't forget Friendster!

Mainly bad-luck in being too early or too late, though MySpace had some self-inflicted problems with performance and overcomplicating the interface (by allowing customization).


This just feels like special pleasing. Why did Facebook get the timing exactly right and what was different about that time vs. a better understanding of user wants, well planned rollout and promotion strategy that created desire to have it, and not being too greedy.

...so then instagram and facebook and twitter and bluesky and reddit and youtube etc etc all have extremely bad content discovery by choice? Why?

for those interested, Chinese laws forbid the export of recommendation systems, unless ByteDance is challenging the Chinese laws here, which is highly unlikely, this simple can not be the recommendation system used in their production.

will be far more interesting to know say what is the difference, what got changed/removed to make them feel comfortable that such an open source variant won't get them into troubles with some 3-letters-acronym agencies back home.


This is essentially the framework for executing their recommendation system but the actual piece which determines the recommendation is a model called "demo" so I presume its not the actual ML model they use in production.

thank for the details, very useful.

Context: ByteDance is the parent company of TikTok. Frequently people talk about "the tiktok algorithm". This is that.

While this is from ByteDance, who also are behind TikTok, this algorithm is likely not the one behind TikTok.

Instead, it is likely a component that powers ByteDance's commercial recommender system solution, which they market to e-commerce companies: https://www.byteplus.com/en/product/recommend

This was mentioned in past discussions of the paper on HN.

And even if aspects of this are used for TikTok: (a) it would be just one of many components of their recommendation system, and (b) the TikTok recommendation system has changed a lot during the 2+ years since this has been published.

So take what you see here with a grain of salt. After reading the paper and the code, you will NOT know how TikTok's recommendations work.


There's also a heavy element of manual curation in TikTok. They have people putting their fingers on the scales to decide what content gets promoted. Where are those people, and what's their agenda? Who knows.

Releasing the recommender on Github is a way to try to diffuse that criticism. But it's just one part of the puzzle that is Tiktok's content distribution.


This is true for all social media algorithms. None of them are purely automated and for good reason. You need humans going in and tweaking the outcomes to ensure users have a good experience.

Of course, when the conversation is about TikTok, this often becomes accusations of propaganda.

But YouTube, Facebook, and Twitter all exert significant control over their algorithms and things like their Homepage, Trending Topics, etc. The conservative right often labels such curation as liberal propaganda.


Sure. HN is very actively moderated, and most people here probably agree that it’s worth it. (Those who don’t like it presumably don’t stay here.)

But at the massive scale of Meta or ByteDance, there is a difference between removing problematic content and actively promoting content. They’re two sides of the same coin, but the first is applied based on reactive guidelines (“we’ve previously decided this kind of content shouldn’t be here”) while the second is ultimately an in-the-moment opinion on whether more people should be seeing the content. The line is blurry, but these are not the same thing, and vibes-based content promotion is easier to manipulate.

Are there CCP agents working at ByteDance? Of course there are because it’s practically mandatory — just like American telecom companies have NSA wiretap rooms. Do those CCP agents get consulted on which foreign political candidate should get the viral boost? Perhaps not. But it appears they’ve built a system where this kind of thing is possible and leaves little paper trail because the curated boosting is so integral to the platform.


> HN is very actively moderated

I explicitly did not mention HackerNews, as the homepage feed is primarily based on user voting - neither algorithms nor chronology. Dang’s moderation is not comparable to other social media platform’s feed curation.

> there is a difference between removing problematic content and actively promoting content

Again, there is sufficient evidence that all major social media platforms do exactly this, not just TikTok. Hence why I said:

>> The conservative right often labels such curation as liberal propaganda.

> where this kind of thing is possible and leaves little paper trail

Could you point to the paper trail that Meta, Google, Twitter provide on their curation actions? Otherwise, this just proves my point that people blindly want to accuse Chinese platforms of shady activities, and Western ones as paragons of virtue.


> This is true for all social media algorithms. None of them are purely automated and for good reason.

Purely chronological sorting of posts works the best and is fully automated. It's just really bad at keeping users eyeballs on ads.


I really don’t agree with this - chronological sorting favors larger/power users who spam their content through all hours of the day, versus smaller users that you probably care more about.

If you don't have a way to manually push the algo, then you'd never be able to sell features like promoted posts and the like. And why would you not want a feature to sell?

Ads can be inserted into any kind of feed, there is no difference between chronological and algorithmic. It’s usually a simple calculation of target ads displayed per posts viewed, with per user/advertiser caps.

nobody said anything about ads

What do you think a promoted post is? It’s an ad based on “user generated content”.

> They have people putting their fingers on the scales to decide what content gets promoted.

Is this just your belief or is there evidence you can point to.

How would you differentiate manual intervention from algorithmic intervention?


It was previously discussed in HN [0].

[0]: https://news.ycombinator.com/item?id=34480003


There are a lot of interesting projects in that GitHub account, I didn't know ByteDance was such an open source hero!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: