Skip to main content

Item2Vec (Sequential)

Description

The Item2Vec policy adapts the Word2Vec algorithm (CBOW or Skip-gram) to learn item embeddings from user interaction sequences. It captures item co-occurrence patterns within a defined context window, placing items frequently interacted with together closer in the embedding space. Primarily models similarity based on co-occurrence rather than strict sequential order.

Policy Type: item2vec Supports: embedding_policy, scoring_policy

Hyperparameter tuning

  • embedding_size: Dimensionality of item embeddings.
  • window_size: Context window size for predicting items in sequences.
  • min_count: Minimum number of times an item must appear to be included in the vocabulary.
  • algorithm: Training algorithm (cbow or skip-gram).
  • max_window_size: Maximum window size for context.
  • workers: Restrict number of workers for memory estimation.

V1 API

policy_configs:
scoring_policy:
policy_type: item2vec
embedding_size: 512 # Dimensionality of the learned item embeddings
window_size: 20 # Context window size (items before/after)
min_count: 1 # Minimum frequency for an item to be included
algorithm: "cbow" # Training algorithm ('cbow' or 'skipgram')

Usage

Use this model when:

  • You have sequential interaction data (user sessions, browsing history)
  • You want to capture item co-occurrence patterns
  • You need a simple, efficient sequential embedding approach
  • You're working with session-based recommendations
  • You want to model "items frequently viewed together"

Choose a different model when:

  • You need to model strict temporal order and dependencies (use SASRec/BERT4Rec)
  • You want to leverage item content features (use Two-Tower or BeeFormer)
  • You only have non-sequential interaction data
  • You need the highest accuracy for sequential recommendations

Use cases

  • E-commerce browsing sessions (items viewed in same session)
  • Music playlists and song sequences
  • Video watching sequences
  • Shopping cart co-occurrence patterns
  • Session-based web recommendations

References