NEGABARO RecSys
A technical guide to recommendation system algorithms and architectures
𧬠Embedding & Representation
What Is a Vector?
A bundle of numbers with direction and magnitude β higher dimensions carry meaning
A vector is a list of numbers. Two numbers = a point on a plane, three = a point in space, 1536 = a point in meaning space.
What Is Embedding?
You need numbers to compute β the starting point of all AI
Embedding converts unstructured data like text, images, and items into numeric vectors. The distance between vectors becomes "semantic similarity."
Word2Vec
Where word embeddings began
Learns semantic vectors by predicting a center word from context (CBOW) or context from a center word (Skip-gram).
Item2Vec
Word2Vec applied to item recommendations
Treats user purchase/click sequences as "sentences" and embeds each item as a "word."
Embeddings in Recommendation Systems
Mapping users, items, and context into one vector space
In RecSys, embeddings map users and items into a shared vector space where distance measures preference.
π Classical Methods
Collaborative Filtering
"People with similar taste liked this"
The most classic approach: recommend based on user-user or item-item similarity.
Matrix Factorization
The latent factor model that dominated Netflix Prize
Decompose the user-item matrix into two low-rank matrices to predict ratings for unseen items.
π§ Deep Learning RecSys
GRU4Rec
Session-based recommendation β predicting the next click with RNN
Models user click sequences with GRU to predict the next item a user will click.
Transformer-based Recommendation
Self-Attention processes the entire behavior sequence at once
Where GRU processed sequentially, Transformer captures relationships across the entire sequence in parallel via Self-Attention.
BERT4Rec
Masked Language Model for recommendations β learning preferences by filling blanks
Applies BERT's MLM approach to recommendations. Masks items in the middle of sequences and learns bidirectional context by predicting them.