~learn.
0:00 / 1:10
Side quest 30 · TikTok

Your video shares a vector with spam

transcript

Your kunafa video and a spam video. Nothing alike. Inside the model, they share one row.

A model learns a vector for every video. The usual trick: hash IDs into a fixed table. Say 2 to the 25 rows. About 33 million. Hundreds of millions of videos won't fit. They collide.

A shared row gets everyone's gradients. Your kunafa inherits some of the spam's poor watch time. And the more IDs you add, the more they share.

ByteDance's Monolith paper tested it. 7.73 percent of user IDs collided. And 2.86 percent of movie IDs. The collisionless model scored higher AUC from the first epoch.

The fix: key every row by the full ID, in a cuckoo hash map. But a full-ID table could grow forever. So an ID earns a row after enough sightings. And rows that go idle expire.

The problem was never the size. It was the sharing. Two IDs should never share a vector.

Full breakdown in the lecture.