technology
did you know TikTok has to predict whether you’ll swipe away?
recommendation systems use maths to rank what appears next.
watch time
longer watch time increases the score
likes
signals you enjoyed it
shares
strong signal of value
swipe-away risk
if you’re likely to skip, the score drops
ranking score
Σ
higher scores appear next
watch time
longer watching raises the score
likes
signals you enjoyed it
shares
strong signal of value
swipe-away risk
likely to skip? score drops
ranking score
Σ
higher scores appear next
score = w₁ · watch time + w₂ · likes + w₃ · shares − w₄ · swipe-away risk
each w is a weight learned from data
try the ranking yourself
ranking score = 0.21
play with the signals — the score updates live
middling — it might appear, but plenty outranks it.
weights here (w₁ 0.5, w₂ 0.2, w₃ 0.35, w₄ 0.8) are illustrative — a real system learns them from data, with far more signals involved.
the idea
TikTok wants to keep you watching, so it uses a machine learning model to estimate how likely you are to enjoy each video.
how it works
The model looks at thousands of signals — like watch time, likes, shares, and your past behaviour — and predicts the chance you’ll keep watching. Videos with higher predicted value are shown to you next.
go deeper
what is a recommendation system?
a feed feels effortless, but it is being assembled in real time. from thousands of candidate videos, the system has to guess which few you’ll actually watch.
it can’t know. so it predicts — using what people like you have done before — and ranks everything by those predictions.
how do machine learning models learn?
the score is a linear combination: each signal multiplied by a weight, then added up. the weights are learned by training on millions of past sessions.
during training, the model adjusts the weights to reduce prediction error — nudging w₄ up if swipes were more telling than expected, nudging w₂ down if likes turned out to mean little.
real systems stack many models and non-linear tricks on top of this skeleton, but the skeleton itself is arithmetic you already know.
score = Σ wᵢ · xᵢ
why is swipe-away risk so important?
the model looks at signals: how long you watched similar videos, what you liked, shared, skipped, and what people with overlapping tastes enjoyed.
each signal gets multiplied by a learned weight — how much that signal has mattered historically — and the results are summed into a score. videos are then ordered by score.
to be clear: nobody outside the company knows the exact production formula. what follows is the simplified shape these systems share.
score = w₁ · watch time + w₂ · like probability + w₃ · share probability − w₄ · skip probability
a simplified conceptual example. each w is a weight learned from data, not a number someone typed in.
the ethics of algorithmic feeds
- early signals dominate: the first second of watch time is often the most informative, which is why hooks exist.
- the system optimises for predicted engagement, not for what you’d say you value — a gap worth thinking about.
- the same ranking shape shows up in search results, music queues, and which adverts you see.
sources & further reading
concepts: recommendation systems · weighted scoring · machine learning
5 minute read