Skip to content

The Ranking Stack

Two-Tower Models

11 min+110 XPStep 1/10

Two encoders, one dot product

A two-tower model is an architecture born from serving economics. A user/query tower consumes history, context, and demographics; an item tower consumes content features and ID embeddings. Each produces a vector; the score is their dot product.

The trick that makes it servable: item embeddings can be precomputed offline — run the item tower over the whole catalog, load the vectors into an ANN index. At request time you pay for exactly one forward pass (the user) plus one index lookup. Millions of items 'scored' for the price of a single embedding.

insight

Two-tower isn't a model choice, it's a deployment shape: everything expensive is moved offline, and the request-time path is one forward pass plus a lookup.