Notes

Deep Interest Network (DIN)

A shopper who has bought a tent, running shoes and a cookbook is three different shoppers depending on what you are about to show them. Compressing that history into one fixed vector throws away exactly the part that tells you which. Deep Interest Network (DIN) keeps the history and re-reads it for every candidate.

Attention over behaviour history
DIN represents a user as the set of items they have interacted with, then computes a local activation unit: a small attention network that scores each historical item against the candidate being ranked. The user vector is the attention-weighted sum of those history embeddings, recomputed per candidate — the tent dominates when scoring a sleeping bag, the cookbook when scoring a frying pan. Alibaba's production version adds the Dice activation and a mini-batch-aware regulariser that penalises only the embeddings a batch actually touched.

What it fixes
Pooling a user's history by simple averaging — the standard embedding-and-MLP recipe — produces one representation whatever is being scored. That caps expressiveness exactly where e-commerce CTR lives: diverse interests, where the history relevant to any single ad is a thin slice of the whole. DIN's gain on display-advertising AUC came from removing that bottleneck, not from more layers.

Cost and placement
Candidate-dependent user vectors cannot be cached or indexed, so DIN belongs in the ranking stage over a few hundred candidates and never in retrieval. It is the ancestor of the sequence-aware rankers that followed, DIEN among them, which read behaviour history the same way.

Deep Interest Network (DIN) is a click-through model that replaces a single pooled user vector with an attention-weighted read of the user's behaviour history, scoring each past item against the candidate being ranked. A shopper's tent purchase then drives the prediction for a sleeping bag while their cookbook drives the prediction for a pan. It lifts accuracy where interests are diverse, at the cost of a user representation that cannot be cached.

Your shopping history is not one taste, it is several. Camping gear for a holiday, a cookbook, shoes for the gym. If a shop blends all of that into a single idea of you, it ends up with a blurry average that suits no particular moment.

Deep Interest Network is a way of deciding what to show you that looks back at your history selectively. Before guessing whether you will click a sleeping bag, it asks which of your past purchases are relevant to a sleeping bag — the tent, mostly — and leans on those while ignoring the rest. The effect is like a shop assistant who remembers the right part of your last visit, not all of it.