TensorTonicTensorTonic
Problems
Study PlansProjectsInterviewPricingFeedback
Back to Projects

Build from first principles

Build a Two-Tower Recommender

Learn user and item vectors with two towers, retrieve candidates fast, and stop popular items from crowding out everything else.

What is a two-tower recommender?Two networks, one dot product, and why retrieval comes before ranking
1Score Users Against ItemsScore every user against every item
2Train With In-Batch NegativesLearn from the other items in the batch
3Correct In-Batch Sampling Bias With log qStop punishing popular items for being popular
4Retrieve the Top K Unseen ItemsPick candidates a user has not seen
5Measure Recall@K, Tail Recall and CoverageJudge the retrieved lists
From Towers to RecommendationsSee how your pieces train and judge a real retrieval model
Train, Break and Fix a RetrieverTrain two towers, watch in-batch negatives hide popular items, correct with log q, and weigh recall against coverage

Two towers, one score

1,000 items
user 42
user tower
every item
item tower
ยทdot product
item 12
item 507
item 88
item 341
item 9
item 730
1. user tower2. item tower3. dot product4. top K
Start project