Item Similarity
"Customers who bought this also bought…" is the oldest genuinely useful recommendation on the internet, and the number underneath it is item similarity.
How it is computed
Each item is represented by its column of the user-item matrix — the vector of who interacted with it — and two items are compared through those columns. Cosine similarity on binary implicit data, adjusted cosine on explicit ratings, Pearson correlation, or a conditional probability of co-purchase are the standard choices. Nothing about the item's content enters the calculation: two documentaries count as similar only because the same people watched both.
Why it is computed offline
Comparing every pair is quadratic in catalogue size, so the matrix is built in a batch job, truncated to each item's top k neighbours, and shipped to the serving layer as a lookup table. Retrieval then costs one table read per item in a user's history, which is why the technique was practical on 2003 hardware and still anchors the candidate-generation stage today.
What distorts it
Raw co-occurrence favours whatever is popular, since a bestseller co-occurs with everything, so implementations damp the denominator or discount high-degree items — without that correction, popularity bias is baked in at the first step. Two further cautions:
- Items with a handful of interactions produce similarities that are mostly sampling noise.
- Similarity is symmetric while taste is not — a sequel implies the original far more strongly than the reverse.
Item similarity scores how alike two catalogue items are from the users who interacted with both, comparing their columns of the user-item matrix by cosine, adjusted cosine, or conditional probability — never by item content. The matrix is computed offline and truncated to each item's top neighbours, which turns retrieval into a table lookup over a user's history. Popular items inflate raw co-occurrence, so damping is mandatory or recommendations collapse onto bestsellers.
Two films count as similar when the same people watch both. That is the whole idea behind item similarity. Nobody has to describe the films, tag their genres, or know anything at all about them — the overlap in audiences does the work.
It is why a shop can say "people who bought this also bought that" without understanding either product. The weak spot is fame. A runaway bestseller gets bought alongside almost everything, so it looks similar to almost everything, and the suggestions drift toward what is already popular unless the system deliberately holds it back.