Artificial Intelligence 14 min read

Applying Word2Vec Embeddings to Rental and News Recommendation: Model, Hyper‑parameters, and Optimization

This article explains the fundamentals of the Word2Vec SGNS model, details its hyper‑parameters and training tricks, and demonstrates how customized embeddings are built for rental‑listing and news‑article recommendation, covering data preparation, objective‑function redesign, evaluation, and deployment in both recall and ranking stages.

Sohu Tech Products
Sohu Tech Products
Sohu Tech Products
Applying Word2Vec Embeddings to Rental and News Recommendation: Model, Hyper‑parameters, and Optimization

Since the introduction of Word2Vec, dense word embeddings have replaced high‑dimensional sparse representations and are now widely used in NLP, search, recommendation, and advertising. The paper "Real‑time Personalization using Embeddings for Search Ranking at Airbnb" showed how to adapt Word2Vec for business scenarios, inspiring similar improvements for Sohu News recommendation.

The SGNS (Skip‑gram with Negative Sampling) model, a combination of the skip‑gram architecture and negative sampling, learns word (or item) vectors by predicting context words from a center word. Key hyper‑parameters include iteration count, window size, number of negative samples, negative‑sampling distribution (controlled by factor a), down‑sampling threshold t, and learning rate a.

For rental‑listing recommendation, user behavior sessions are split into 30‑minute windows, treating clicked listings as words and a session as a sentence. The objective function is modified to give higher weight to reservation actions, use city‑level negative sampling, and adjust window sizes based on behavior type, producing embeddings for listings, user attributes, and listing attributes.

Vector quality is verified through visualizations such as geographic clustering of listings, and by inspecting correlations with price, style, and layout. Encoding user and item attributes as separate embeddings mitigates sparsity and captures dynamic preferences.

In the news‑recommendation scenario, millions of user behavior sequences (click, exposure, share, dislike) are cleaned and segmented. Only click events serve as centers for SGNS updates; global negative sampling is replaced by exposure‑based negative sampling to avoid sampling unseen items. The loss combines positive click pairs, global negatives, share signals, exposure‑based negatives, and dislike handling.

After offline training, a similarity matrix of news embeddings is stored for fast recall. During online ranking, cosine similarity between candidate news and user‑specific vectors (click, share, dislike) is discretized and fed into a ranking model, with features visualized for A/B testing. Cold‑start is addressed by embedding news tags or averaging vectors of similar recent articles.

The article concludes by summarizing Word2Vec principles, hyper‑parameter tuning, and practical improvements for both rental and news recommendation pipelines, inviting further discussion on the technical details.

personalizationrecommendationembeddingCold StartWord2VechyperparametersSGNS
Sohu Tech Products
Written by

Sohu Tech Products

A knowledge-sharing platform for Sohu's technology products. As a leading Chinese internet brand with media, video, search, and gaming services and over 700 million users, Sohu continuously drives tech innovation and practice. We’ll share practical insights and tech news here.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.