Learning a Fine-Grained Review-based Transformer Model for Personalized Product Search

Keping Bi, Qingyao Ai, W. Bruce Croft

Abstract

Product search has been a crucial entry point to serve people shopping online. Most existing personalized product models follow the paradigm of representing and matching user intents and items in the semantic space, where finer-grained matching is totally discarded and the ranking of an item cannot be explained further than just user/item level similarity. In addition, while some models in existing studies have created dynamic user representations based on search context, their representations for items are static across all search sessions. This makes every piece of information about the item always equally important in representing the item during matching with various user intents. Aware of the above limitations, we propose a review-based transformer model (RTM) for personalized product search, which encodes the sequence of query, user reviews, and item reviews with a transformer architecture. RTM conducts review-level matching between the user and item, where each review has a dynamic effect according to the context in the sequence. This makes it possible to identify useful reviews to explain the scoring. Experimental results show that RTM significantly outperforms state-of-the-art personalized product search baselines.

Introduction

Standard personalized product search usually follows a "vector matching" paradigm: the system turns a user into one vector based on history and a product into another based on descriptions or reviews, then calculates the distance between them. However, researchers argue this approach is too blunt. It suffers from a loss of granularity—where specific user preferences can be washed out by an "average" product vector—and static representations, where a product's representation remains the same regardless of the user's specific intent.

To address these flaws, we introduce the Review-based Transformer Model (RTM). RTM moves beyond matching users and products as static points in space by treating a user’s history and a product’s features as a sequence of individual reviews. This allows the model to perform "fine-grained" matching, identifying exactly which specific product review satisfies a specific user preference mentioned in their past behavior.

Methods

Instead of collapsing reviews into a single vector, RTM feeds a sequence into a Transformer encoder: [Query, User Review 1...m, Item Review 1...n]. This architecture allows for deep, review-level interaction through attention mechanisms.

The RTM architecture encodes a sequence of query, user reviews, and item reviews using Transformer layers to produce a purchase probability.

Key technical highlights of the RTM architecture include:

  • Review-Level Interaction: Because every unit (query or review) can "attend" to every other unit, the model can explicitly match a specific user preference from a past review to a specific item property in an item review.
  • Dynamic Embeddings: The representation of an item is no longer static; it is computed on-the-fly based on its interactions with the current query and the specific user’s history.
  • Flexible Personalization: Unlike previous models where personalization is a fixed "add-on," RTM allows the attention mechanism to decide if the user's history is relevant. If past reviews don't help, the attention weights for those units can drop to zero.
  • Position & Segment Embeddings: The model uses optional embeddings to track the chronological order of reviews (recency) and to distinguish between user-side and item-side information.

Experimental Results

The model was evaluated using the Amazon Product Search dataset across three categories: Sports & Outdoors, Clothing, Shoes & Jewelry, and CDs & Vinyl. Crucially, the researchers used a chronological split (80% training, 10% validation, 10% testing) to ensure a realistic evaluation that prevents the model from "peeking" into future data.

Performance comparison of RTM against various personalized and non-personalized baselines across three Amazon datasets.

As shown in the results table above, RTM consistently outperformed state-of-the-art baselines (including HEM, ZAM, and the previous Transformer-based TEM) across all metrics:

  • MRR (Mean Reciprocal Rank): RTM showed significant gains, particularly in the Sports and Clothing categories, often improving over the best baseline by 15-60%.
  • NDCG@20: In the Clothing category, RTM achieved an NDCG of 0.099, significantly higher than the best baseline (TEM) at 0.076.
  • Generalization: Because RTM represents users and items solely through their reviews rather than unique IDs, it can generalize to new users or items not seen during training, provided they have associated text.

Key Insights and Discussion

  • Explainability: Because the model uses attention, researchers can look at the "attention weights" to see which specific reviews triggered a recommendation. This allows the system to provide justifications, such as recommending a product because a specific review mentions a feature the user has liked in the past.
  • Static vs. Dynamic Categories: The paper finds that for categories like CDs & Vinyl, the order of reviews matters less because music quality is static. However, for Clothing, recent reviews are vital because styles change and product quality can fluctuate over time.
  • Model Depth: On larger, noisier datasets, a multi-layer Transformer performed better, suggesting that complex interactions between many reviews require more "depth" to resolve.

Limitations and Future Work

While powerful, RTM faces challenges regarding computational cost. Encoding a long sequence of reviews for every query-item pair is expensive compared to simple dot-products. This might necessitate a two-stage retrieval process where a cheaper candidate generation phase is followed by RTM re-ranking. Additionally, the model's performance on cold start scenarios—where users or items have no review history—remains a hurdle. Future directions include incorporating other structured data, like brands or categories, directly into the Transformer sequence to further enrich the context.

Summary updated

BibTeX
@inproceedings{bi2021learning,
  author = {Keping Bi and Qingyao Ai and W. Bruce Croft},
  title = {{Learning a Fine-Grained Review-based Transformer Model for Personalized Product Search}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2021},
  url = {https://openreview.net/forum?id=YZdd8EyFY2Q},
}
Figure