Hacker News new | past | comments | ask | show | jobs | submit login
How TikTok's design makes the algorithm work (eugenewei.com)
67 points by sbuccini on Sept 22, 2020 | hide | past | favorite | 58 comments



This article is full of interesting ideas and speculation, but I think it gives TikTok a bit too much credit.

I don't want to sound overly dismissive, but it's pretty clear reading this that the author has not worked on recommendation or personalization systems recently.

The high level description of how he believes TikTok works is probably accurate (I don't work there so I can only speculate), but it's not unique to TikTok. Also most of the details are probably not accurate.

Some examples:

> For its algorithm to become as effective as it has, TikTok became its own source of training data.

^This is true of nearly every recommendation system.

> If you click into a text post by someone on Facebook but don’t comment or like ... That negative sentiment is difficult to capture

You can do the same thing with comments that he claims TT does with video (dwell time threshold feature)

> As you scroll up and past many stories, the algorithm can’t “see” which story your eyes rest on.

I don't work at Twitter, but I doubt that matters very much.

Also regarding "negative sentiment" feedback from users. TikTok does not have a UI tool to say "I don't like this", but other apps do. For example, you can ask Instagram to "show me fewer posts like this".

I agree with the claim that the "one thing at a time" UI is nice for the user in a lot of ways. But as a person who builds these things, I don't think this makes much of a difference for machine learning.


> TikTok does not have a UI tool to say "I don't like this", but other apps do. For example, you can ask Instagram to "show me fewer posts like this".

Press and hold on TikTok shows a popup for this.


Thanks! I didn't know this.

But yeah I think this makes it pretty clear that TT is not doing anything qualitatively different (except possibly a massive army of human annotators). They just do a good job.


From the article: "I doubt anyone in tech will find the description [of the algorithm] anything but obvious."

But TikTok is definitely special in this regard.

If you actually use TikTok for any length of time, you can see how remarkable it is. It learns extremely quickly what you want to see (and what you don't want to see), and provides it accurately and in apparently infinite quantity.


The same behaviour with YouTube caused widespread concern (Elsagate).

The only difference being TikTok uses a lot more human moderation compared with YouTube.

I don't find their recommendation system any special as opposed to their specific operational model.


YouTube recommendation sucks. It keeps recommending the same thing to you. Sometimes, videos from a few years ago just because you watched one video from this guy. TikTok recommendation system recommend a variety of clips and almost all of them are interesting to you. I go to YouTube if I know what I am going to watch, it has so much content, but I hate it when it automatically change the homepage after you clicked on one of the video.


That's not my experience, especially lately. I have lots of different topics on my YouTube feed. Topics that are specific as well as more general topics. Time and date of access is also relevant as well.


I think that because they directly show the videos, it forces a reply from you which gives them better data to make recommendations.

On other platforms like YouTube for example, there are a lot of factors beyond the video itself that influences if a person even clicks on it (like the thumbnail, the title, the number of views, who the creator is), so if someone doesn't click on a video, that doesn't tell you if they would have liked it or not. Because of that your data to make recommendations isn't as accurate.

That's the main difference I see with TikTok. They make recommendations proactively, instead of reactively.


> You can do the same thing with comments that he claims TT does with video (dwell time threshold feature)

>I don't work at Twitter, but I doubt that matters very much.

>Also regarding "negative sentiment" feedback from users. TikTok does not have a UI tool to say "I don't like this", but other apps do. For example, you can ask Instagram to "show me fewer posts like this".

There's a big difference in the usefulness of implicit and explicit feedback for recommenders, and there's a long history of research trying to address the shortcomings of each, or combine them to avoid their weaknesses (e.g. research into presentation biases, augmented matrix factorization, MF with implicit data, ensembles)

Implicit feedback (dwell times etc) are particularly prone to noise and biases. On the other hand, the amount of explicit data (likes, downvotes) companies can get is so small compared to implicit data, that many companies don't even bother with their explicit data. E.g. even YouTube claim not to use likes/dislikes, in order to better recommend to the long tail of items/users. So it very much does matter, being able to get good implicit data.

The interesting thing implied by OP is that TikTok seems to have completely sidestepped the pitfalls of each form of data. They in essence seem to have made implicit data be a gold standard judgment of relevance, which is really cool I think.

> I don't want to sound overly dismissive, but it's pretty clear reading this that the author has not worked on recommendation or personalization systems recently.

This is something that hasn't been done in any other large company's recommender system as far as I'm aware. It seems like a paradigm shift to me, albeit, is only possible because of the addictive nature of the app. So at least for similar UIs, this concept makes a lot of recsys research irrelevant and is highly novel. As such, I don't think you're giving OP or TikTok enough credit.


> dwell time threshold feature

For me at least, tiktok.com is an infinite scroll.


Though note that it's no mystery which video you're looking at, thus endless scroll still often has the same beneficial one-at-a-time characteristics that the article celebrates.

In fact, imgur's desktop website comes to mind as the rare design pattern where you can (or, could, back when it was only gifs) consume the content in a gallery view where the application doesn't know what holds your attention.


Someone on a different thread asked what new smartphone CPUs would be used for. The answer, according to this article, is gaze tracking the infinite scroll.

(Hmm. Part of the idea presented here is that it really doesn't take that long, especially in short-form, to gather less than thirty bits worth of targeting. In a world where "bespoke" is available to everyone, will hipsters have to shift to lauding mass-production to differentiate themselves?)


Wasn't investigating the relationship between mass production and art Warhol's big thing?


Very interesting article, including the linked first part. Especially his point in the first part that

> It turns out that in some categories, a machine learning algorithm significantly responsive and accurate can pierce the veil of cultural ignorance. Today, sometimes culture can be abstracted.

Which now makes me think about where algorithms are culture dependent and where not. Low level algorithms like quicksort definitely are not, but as we get "higher up" towards algorithms which work with user feedback …


> ... where algorithms are culture dependent and where not. Low level algorithms like quicksort definitely are not ...

Aside on this. In a 1st year CS class I was surprised to learn that half the class had one method to count the number of days in a month (30 days hath September) and the other half had another (using their knuckles). The method a person knew depended on where they grew up, and neither group had heard of the other method. So at least some search algorithms are culturally dependent :)


TikTok’s recommendation system is absurdly overrated.

I tried to make an account where I only watched (in full length)/searched for/liked videos of a specific gender/race/age group.. yet even after liking over a hundred videos, then 100% of the videos they suggested to me were the wrong gender/race/age group. YouTube on the other hand is capable of recommending the correct videos after watching just a couple. Instagram’s recommendations are also far more accurate (although I dislike the fact that Instagram mostly recommend popular users).

It’s very easy (and shouldn’t take long) to conduct this experiment, just make sure that the race you target doesn’t represent the majority of the users in your proximity. For instance, if you’re in Norway then try to get TikTok to recommend Asian girls aged 20-35.. sounds like it should be easy, right?


This seems like an unusual use case. Surely a recommendation system should try to find content that matches the users interests. I'm not sure why anyone would want a recommendation system that looks for age/gender/race as that seems fairly irrelevant to interesting content.


I’d say there are countless of valid use cases where this is relevant. Maybe you normally live in (or plan to travel to, or just curious about) X country but TikTok is incapable of understanding you’re only interested in videos from there. Maybe you enjoy watching 20-something year old Asian girls dance, maybe you enjoy watching 20-something white guys skateboarding, maybe you enjoy watching guys with sixpack exercise, maybe you enjoy watching party/club videos, maybe you enjoy watching people cook cakes, etc.

YouTube and Instagram is easily capable of recommending whatever content you show interest in.. TikTok on the other hand feels like the reddit’s /r/popular experience which simply looks at your location and recommend a list of random stuff that people in same area have shown interest in (and completely fail to integrate your interests into this feed). I’m not saying there’s anything wrong with that, but all this hype about their algorithm makes no sense.


If sorting by gender/phenotype/age is your squee, you might have better luck with NSFW sites.


Surely you can see that, as you are unable to speak every language in the world, yet you understand all media presented to you, that ALL of your media is already implicitly sorted by geography and language?

If e.g. YouTube recommended you the best items from all countries, you'd have a very bad time and would be unable to understand almost all media.

The same applies to age and gender. If you were only recommended items relevant to 90 year olds or 9 year olds, you'd have a very bad time on YouTube etc. Just because you don't notice that your media is implicitly sorted doesn't mean it isn't happening.


In fact, I actively search YouTube to watch things in languages I don't understand for audiences whose demographics I am outside. I passively get enough age-appropriate comprehensible-language content just by living in my own society.

a few examples:

https://news.ycombinator.com/item?id=23640033 (9 year olds, RU)

https://news.ycombinator.com/item?id=24431001 (CN, IN, RU, US)

https://news.ycombinator.com/item?id=24398456 (JP, SU, US)

https://news.ycombinator.com/item?id=24156310 (caucasian variety)

Now I realise I should seek out 90-year old appropriate programming. Anyone have any hints?

Bonus clip: https://www.youtube.com/watch?v=y2fNVztaC58

Edit: After a quick calculation, I realise I have watched music from 1943: "Blood on the Risers", "Lili Marleen", "Zog Nit Keyn Mol", "Bella Ciao", and "Катюша" are all suitable for 90-year olds to have encountered as young teens.


Well you're an extreme outlier. Typically people want age-appropriate content in a language that they speak, or, which at least has subtitles. As you point out, if this is your preference then you can use search functionalities for this purpose.


I agree I'm an outlier, but will note that young chinese don't seem to mind plenty of english in their lyrics

https://www.youtube.com/watch?v=hHLRFlKPNMA (with subtitles)

and it's not as if 80s europe wasn't full of foreign-language entertainment:

https://www.youtube.com/watch?v=TDOf41Xwrc4 (caveat for US HN'ers: it's a european music video. No blood, two beasts, some breasts.)

(The 80's were big hair and shoulder pads, no matter which side of the iron curtain.)


Are you implying that the only valid use case for liking specific types of videos is sexual gratification?


No. I'm stating that if gender/phenotype/age constitutes your prism, explicit fare is the only form of (one-hand casual) video entertainment coming to mind which explicitly categorises by those axes.

I mean, I heard from a friend, who certainly wasn't involved with making any of the stuff, that that's how such sites operate.

(Today I had some trouble searching for "Micro-abrasive Imperial Lapping Film" until I expanded the acronym. Doesn't Google realise I have a connector tip to polish?)


> I'm not sure why anyone would want a recommendation system that looks for age/gender/race as that seems fairly irrelevant to interesting content

You can't understand how age/gender/race is important for finding relevant content?! These are extremely important, fundamental, attributes that underpin good recommendations. I.e. they're so important that they generally go without saying, and are baked into the corpuses (e.g. your local news site doesn't recommend articles from another country, Disney's streaming service doesn't recommend knitting shows to children, etc)

Would you be happy if your Amazon Prime or Netflix account only showed items that are interesting to people aged {opposite age group to you} in {country on the other side of the world to you} who are {not your gender}?

I think you'd very quickly be surprised at how much media exists in the world and would quickly realise that you're mistaken.


I think the intention behind the OP’s post was to test how quickly you could steer the algorithm in a very specific direction.


Its such a shame that Tiktok with its massive teenage userbase doesn't have youtube's infamous recommendation system which inadvertently creates pedophilic wormholes.


"Algorithm isn't racially discriminatory" is an unusual complaint.


Really?

If somebody tried to sell me a facial recognition system and it matched my face with somebody of the opposite gender and a totally different race, well, I would not buy that system.

We're talking about video/image recognition here, not politics.


The intent of a facial recognition system is to match an individual, surely?


The intent is to match the appearance of their face.


TikTok as a whole is insanely overrated, at least in my opinion. I've really given it multiple tries, hours at a time, but it consistently fails to serve me anything that even remotely entertains me.

My biggest gripe with it is that half of the content appears to be of the "build some tension up by hinting at a certain conclusion of the video, then simply ending the video before it comes to that conclusion and leave the viewer clueless" type, and TikToks famed algorithm seems to be entirely unable to discern that I hate this crap. Maybe it's because I watched some of these fully in the beginning until I understood the pattern. However, afterwards I swiped this kind of video away immediately once I notice the pattern, but the famed algorithm appears to be unable to re-learn that I really, really, really hate this kind of content.


I, on the other hand, have a totally different experience. I used tik tok for a day and was really frustrated with the not very interesting content, but after explicitly disliking a couple of videos I got an amazingly interesting stream of funny videos from there on out. Given that all the information the algorithm has is rather indirect and negative feedback compared to classic news feeds were you positively select the creators in the beginning and the huge amount of new content that comes to the platform every day, I found the training time rather short and the result really good.


It's without question aimed at and useful primarily for a young demographic with an extremely short attention span. It's also really hard to create long-form quality content, the short clips remove that pressure, which is exactly what short tweets accomplish (the typical TikTok user is creating absolutely nothing original, they're all directly copying eachother; you have a tiny number of originators, and then everyone else is a clone (a mimic), which is humanity in a nutshell). It's mostly about status battling, young people fighting for some attention, trying to put a stake in the ground to claim status among peers to position themselves. It's why so many of the most popular users live in nice locations, in mansions or otherwise huge very nice homes, they're envied, they're pitching/riding status to a million followers. The sex selling, faux-dance cloning and ass shaking (WAP WAP WAP) that the majority of of the non-celebrity popular users use it for, tells you everything you need to know. It's the same thing that made Snapchat popular, sex always sells. TikTok of course derived from Musical.ly and was popularized first in the US among teenagers. The content that fills up the platform is still similar to what originally made Musical.ly popular.

TikTok is the Kardashian effect brought down to the masses of people, to roll around in. Mimic in just the right way and you too can be Kim for 15 minutes (if your house is big enough and or you're attractive enough, as you have to be able to sell it). TikTok's most popular non-celebrities are pitching exactly the same thing that made the Kardashians so popular, in the exact same way. It's a cultural wasteland, celebrated.

What the hell is anybody going to say in 10-15 seconds that is going to be valuable outside of a quick clip of music and some status pitching (show a big house, shake your ass, take off your shirt, dive into a pool, show seven seconds of a party)? Absolutely nothing. It's the same thing Instagram is mostly used for: status positioning, signaling. There is a reason why the evidence overwhelmingly points to all of this as being unhealthy - it's all built around intentionally amplifying an addictive, desperate aspect of human nature that is a big negative at its extremes (status seeking, narcissism, bullying, social competition, selling sex, all in a swirl together and pumped up).


You are seeing a very different FYP than I just saw on tiktok.com.

Is TikTok a SSCly Scissor Service?

https://slatestarcodex.com/2018/10/30/sort-by-controversial/


TikTok kept trying to show me rich people dancing in their mansions for about 2 days when I first downloaded it (and so: I couldn't understand the hype about it), but hasn't shown me that since. Now I understand the hype.


> build some tension up by hinting at a certain conclusion of the video, then simply ending the video before it comes to that conclusion and leave the viewer clueless"

People who expect a neural network to identify stuff like this have drunk WAAAAY too much ai kool-aid.


> "build some tension up by hinting at a certain conclusion of the video, then simply ending the video before it comes to that conclusion and leave the viewer clueless"

These videos are certainly pervasive - they are an attempt to trigger reactions to show that you like this content: for example, by getting you to watch through the end of the video, click on the creator's name for follow-up content, checking the comments for clues.

You can understand the videos as an attempt to game the algorithm, and I also think they are playing on themes which humans are genuinely addicted to and find it hard to fully control.

Long click will allow you to 'remove content from this creator' (excuse my translation): that will help.


Have you considered the possibility that this behaviour is not a bug but rather a feature?


Ah yes, the last refuge of the scoundrel.


Two potential issues come to mind when I consider your test through the lens of TikTok:

1. There basically isn't content where the content consists solely of the gender/race/age of those in frame and nothing else (outside of fetishism).

2. People who strictly want to only watch that content aren't very common (outside of fetishism).

So it makes sense why your cohort might not show up on a website that has a much more intolerant stance on NSFW content than Youtube and Instagram.

If we're to believe that TikTok only recommends videos that have been human-tagged (claimed in TFA and in these comments), then it seems even more likely that a video of (your example) east asian women aged 20-35 dancing to music are tagged "dancing", (e.g.) "kpop" and not "east asian" "women" "20-35". And your feed of "dancing" + "kpop" recommendations only incidentally contain the demographic you seek while being oblivious to it.

Just guessing, of course. I have a kneejerk charity response for something when someone on HN says that it's absurdly bad. ;) If only I had this reflex at all times.


This is why TikTok's algorithm is better than YouTube's, in my opinion.

YouTube takes the content you have seen and explicitly shown that you like, and shows you a more extreme version of it. It tends to over-recommend alt-right YouTube, for example.

TikTok takes the content you have seen and implicitly shown that you like, and shows you diverse content that has some of the features you seemed to enjoy, while it learns from that.

If you are looking to fetishise young Asian women, then maybe you are on the wrong type of website (and: maybe you shouldn't do this).

Is it a bug in the algorithm, or a feature of it? If I'm a young Asian woman creator, I also have an interest in whether the algorithm is fetishising my work.


> TikTok takes the content you have seen and implicitly shown that you like, and shows you diverse content that has some of the features you seemed to enjoy, while it learns from that.

In my case the recommendations had nothing to do with what I had liked or shown interest in. It was equivalent to visiting Reddit’s /r/popular, which might appeal to most people, but from an algorithmic perspective then there’s nothing impressive about it. Like I also mentioned in another comment, I think there’s nothing wrong with this approach, I just don’t understand how people can be impressed by it from a technical point of view.

> If you are looking to fetishise young Asian women, then maybe you are on the wrong type of website (and: maybe you shouldn't do this).

I was just trying to conduct the most simple experiment imaginable to see whether it was actually capable of detecting what I showed interest in and do so in a way that I could easily verify the results. What I was looking for in the experiment represent perhaps 20% of the userbase, yet it was still incapable of displaying a single post that matched what I was trying to achieve (because the feed just show what they believe is interesting in your area). I could also have tried to achieve something more complex, like train TikTok to show skateboarding videos (which might represent less than 0.001% of their videos), but I figured I’d try with the easiest thing imaginable first (which it failed at).

And I fail to see why there’s anything wrong with being interested in watching content of people within a certain age group, or gender, or nationality..

If I were a TikTok user then I’d surely hope that they were able to recommend my videos to people that were interested in the kind of content I posted (because that would open up a lot of possibilities, like meeting people with similar interests, selling products, etc.)


So your claim (in response to my point) is that young Asian women who might create content on TikTok want to be fetishised? I don't think so.


Youtube mostly suggests already seen videos, hence i wouldn't classify it as a good recommender. I agree with your comment on instagram.

In general, there are multiple approaches on recommender systems, to name but a few: -suggest content with similar features with what you watched -suggest content that similar users already watched -suggest completely new and/or different content

I haven't used tik tok, but you might fall into category #2 and #3. And to be honest, if i owned such an app i would pursue users to be recommended new and popular content to keep them in the platform.


You just pointed out the exact problem I don't like about YouTube. It assumes you are going to watch based on exactly what you have watched. Which we don't. We want the recommendation system to suggest something different but to our taste. It is not like you are going to have the same meal again and again.


I liked the point that algorithms don't have to be user-hostile. Thanks for the read.


> Before the video is even sent down to your phone by the FYP algorithm, some human on TikTok’s operations team has already watched the video and added lots of relevant tags or labels.

Is this confirmed? That's a neat tidbit. Nice article!


This is very likely based on the size of the moderation teams working for TikTok/Bytedance.

It's also the reason why TikTok is going to be hard to scale profitably in advanced economies. Chinese staff, especially for work like moderation, is a lot cheaper.

Worth nothing that TikTok operations globally is mainly supported by Bytedance staff in China. Very skeptical on how they can achieve splitting the company and launching an IPO without moving most of those jobs moving overseas.

If they split off some staff into their own Chinese company owned by TikTok Global based in the US, it doesn't change anything.

License from Bytedance to allow TikTok the use the codebase and code also won't fly in an IPO.

The only way this makes sense is that TikTok will never IPO, this is merely a delaying tactic until the election year closes.


This is a very nice thing to see as it ensures that only content approved by a human reviewer can be promoted by the algorithm, hopefully reducing the risk that malicious/illegal content goes viral.


Only approved content means mostly boring content that conforms to markets and other ambitions.

No illegal content for a social media service from China is a pretty large negative point.


> No illegal content for a social media service from China is a pretty large negative point.

If they allowed illegal content, they'd have been banned even sooner. The best you can hope for is that they do not apply Chinese law outside of China, which seems to be the case, considering they have to make TikTok unavailable in China to avoid people seeing anything that's illegal in China.


The Chinese version is called Douyin and it probably is a completely separate network.

The problem with "illegal" is that it is quickly extended to legally questionable. Defending content is not financially viable for any platform, even if you are in the right. In consequence it will be removed.

Twitter, Facebook and co currently attempt a regulatory capture and want to actually scrap their legal protections because they now have their censorship algorithm idiots demanded for some time.


I've always said that people complaining about portrait videos don't understand how much more convenient it is to watch. TikTok really takes the one-hand casual video watching to its extreme.


Boy, can this guy write, or what? Eugene Wei's content always enraptures me. Really captivating stuff.


I never found the recommended content on TickTock very good. It really does seem like it is geared to a certain kind of teenager. Chinese video recommendation apps on the other hand (e.g. douyin, xiaohongshu, Kuaishou, Xigua) are excellent.


Interesting read, thanks!




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

Search: