ML-Powered Search & Ranking • Real-time Search PersonalizationMedium⏱️ ~3 min
Embedding Based Similarity Features: EmbClickSim and EmbSkipSim
Embedding based similarity features are a core technique for real-time personalization, capturing both attraction and aversion signals by comparing candidate item embeddings to user interaction centroids. Airbnb trained 32 dimensional listing embeddings from 800 million click sessions across 4.5 million listings using a skip gram model with market specific negative sampling. For sessions ending in bookings, the booked listing serves as a global context, creating embeddings that cluster similar properties in vector space.
At query time, the system computes two key features for each candidate. EmbClickSim is the dot product between the candidate embedding and the centroid of the user's last 5 to 10 clicked listings. A high score means the candidate is similar to what the user recently engaged with, signaling strong relevance. EmbSkipSim is the dot product with the centroid of skipped or explicitly rejected listings. A high skip similarity suggests the user is avoiding this type of item, and the ranker can downweight it. This separation of positive and negative signals prevents the system from promoting items similar to things the user actively disliked, not just passively ignored.
Computing these features is fast. With 32 dimensional embeddings stored as float arrays in memory, the dot product for 1,000 candidates completes in under 1 millisecond on modern CPUs using vectorized instructions. Airbnb reports sub millisecond similarity computation, allowing them to use these features for every candidate in the ranking stage without exceeding the latency budget. For carousels of similar listings, they also use k equals 12 Approximate Nearest Neighbors (ANN) directly on embeddings to retrieve visually and semantically similar properties.
The tradeoff is feedback loops and filter bubbles. Overweighting EmbClickSim can create echo chambers where users only see more of what they clicked, reinforcing narrow preferences and reducing discovery. Airbnb mitigates this by blending similarity features with diversity constraints, limiting the number of results from the same neighborhood or host, and using exploration to inject items with lower similarity scores. They also decay short-term click centroids with a half life of hours, so a single browsing session does not dominate future rankings for days.
Embeddings need retraining to stay fresh. Airbnb retrains embeddings offline weekly on billions of interactions. Drift between offline trained embeddings and online user behavior can cause feature mismatch. To detect this, they monitor the distribution of similarity scores in production and compare to offline validation sets, alerting if the distributions diverge beyond thresholds.
💡 Key Takeaways
•Airbnb trained 32 dimensional embeddings from 800 million click sessions using skip gram with booked listing as global context and market specific negative sampling
•EmbClickSim is the dot product between candidate and user's last 5 to 10 clicked item centroid, capturing attraction signals with high scores indicating relevance
•EmbSkipSim is the dot product with skipped item centroid, capturing aversion signals to prevent promoting items similar to what the user explicitly rejected
•Computing similarity for 1,000 candidates completes in under 1 millisecond using vectorized CPU instructions on 32 dimensional float arrays stored in memory
•Overweighting EmbClickSim creates filter bubbles, mitigated by diversity constraints, exploration injection, and exponential decay of short-term centroids with half life of hours
📌 Examples
User clicks three beach hotels in Miami. EmbClickSim boosts other beach properties in South Florida. User skips downtown high rises, EmbSkipSim downweights similar urban listings
Airbnb uses k equals 12 ANN on embeddings for similar listing carousels, achieving 21 percent CTR increase by surfacing visually and semantically related properties
Google Shopping computes product embedding similarity to user's cart and browsing history, improving conversion by 8 percent while adding less than 2 milliseconds to ranking latency