A Transformer-based Embedding Model for Personalized Product Search

Keping Bi, Qingyao Ai, W. Bruce Croft · DOI

TL;DR

This paper introduces TEM, a Transformer-based model for personalized product search that dynamically controls the influence of user preferences. Unlike previous methods, TEM can adapt personalization to be dominant when needed and also considers interactions between a user's past purchases, leading to significant improvements in search relevance.

What Problem Does This Paper Address?

Online shopping relies heavily on product search, where users express their needs via queries. While personalization aims to tailor search results to individual tastes, it doesn't always improve quality. Existing approaches often apply personalization uniformly across all search sessions or have limitations in how much personalization can influence results. For instance, some models use a fixed blend of query and user preferences, while others, like the Zero Attention Model (ZAM), can adapt personalization but cap its influence to be at most equal to the query's importance. This paper addresses the need for a more flexible personalization mechanism that can adapt to different scenarios, allowing personalization to be more dominant when user preferences are crucial and also capturing the nuanced relationships between items a user has previously purchased.

Methods

The proposed Transformer-based Embedding Model (TEM) leverages a Transformer encoder to process a sequence of the user's query and their historical purchase history.

Here's a breakdown of the key components:

  • Item Generation Model: This foundational component models the probability of an item being purchased given a query and user, drawing from established personalized product search frameworks.
  • Query Representation: Queries are encoded using a non-linear projection on average word embeddings, a technique shown to be effective in prior work.
  • Item Language Model: Item embeddings are learned from their associated review text, maximizing the likelihood of observing the review words given the item.
  • Transformer-based Personalization: This is the core innovation. TEM feeds the query and a sequence of the user's purchased items (with positional embeddings to capture order) into a multi-layer Transformer encoder. The output of the Transformer's query representation is then used to model the user's purchase intent.
  • Dynamic Personalization Control: The Transformer architecture allows TEM to dynamically adjust the influence of personalization. A single-layer TEM is shown to be a more flexible version of ZAM, while multi-layer TEMs can capture interactions between historical items, leading to richer representations.
  • Interaction Modeling: By processing the sequence of items, TEM can learn how items co-occur in a user's purchase history, which can be crucial for understanding their preferences.

Datasets

The experiments were conducted on the Amazon product search dataset. To create query-user pairs, the authors followed a strategy used in previous work: they constructed query strings by concatenating words from an item's multi-level category, removing stopwords and duplicates. They used three categories of varying scales:

  • Cell Phones & Accessories
  • Sports & Outdoors
  • Movies & TV

The dataset was split into training (70%), validation (10%), and test (20%) sets, with a chronological partitioning of user purchases to ensure that test set purchases occurred after training set purchases.

Key Insights and Ideas

  • Personalization isn't always better: The paper highlights that personalization can sometimes harm search quality, especially with data sparsity or noisy user preferences. This underscores the need for adaptive personalization.
  • The limitations of ZAM: While ZAM introduced adaptive personalization via a zero vector, it capped personalization's influence to be at most equal to the query. TEM overcomes this by allowing personalization to be potentially more influential than the query when user preferences are dominant.
  • Item interactions matter: The ability of multi-layer TEM to consider the relationships between previously purchased items is a key differentiator. This allows for a more nuanced understanding of user intent beyond just individual item preferences.
  • Flexibility is key: TEM's Transformer architecture provides a flexible framework for dynamically controlling personalization, ranging from no influence to complete dominance, which is crucial for diverse user behaviors and query types.

Key Results

TEM significantly outperformed state-of-the-art baselines across all three datasets and evaluation metrics (Precision@20, MRR, NDCG@20).

  • Overall Improvement: TEM consistently achieved the best performance, showing improvements of approximately 20% to 50% over the best baselines.
  • Ranking Quality: The improvements in Precision, NDCG, and MRR indicate that TEM not only retrieves more relevant items but also promotes them to higher positions in the search results.
  • Layer Impact: The best performance for TEM was achieved with 1 or 2 Transformer layers, suggesting that considering item interactions is beneficial for personalized product search in certain categories.

Limitations and Future Work

  • Limitations: The paper notes that the numbers in their tables are smaller than those reported in prior work [2] due to a different data splitting strategy. Their chronological split for test sets makes prediction harder than the random split used previously.
  • Future Work:
    • Explainable Product Search: The attention scores in TEM could be used to explain why certain items are recommended, providing insights into personalization and user preferences.
  • Incorporating Richer Product Information: The authors are interested in extending TEM to incorporate other product attributes like price, ratings, and images.

Summary updated

BibTeX
@inproceedings{bi2020transformer,
  author = {Keping Bi and Qingyao Ai and W. Bruce Croft},
  title = {{A Transformer-based Embedding Model for Personalized Product Search}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2020},
  doi = {10.1145/3397271.3401192},
}
Figure