[Paper Review] Semantic Product Search
This paper proposes a deep learning model for semantic product search that improves retrieval beyond lexical matching by leveraging customer behavior data. Using a novel 3-part hinge loss, n-gram pooling, hashing for OOV tokens, and model-parallel training across 8 GPUs, the method achieves 4.7% higher Recall@100 and 14.5% higher MAP than state-of-the-art baselines on product search benchmarks.
We study the problem of semantic matching in product search, that is, given a customer query, retrieve all semantically related products from the catalog. Pure lexical matching via an inverted index falls short in this respect due to several factors: a) lack of understanding of hypernyms, synonyms, and antonyms, b) fragility to morphological variants (e.g. "woman" vs. "women"), and c) sensitivity to spelling errors. To address these issues, we train a deep learning model for semantic matching using customer behavior data. Much of the recent work on large-scale semantic search using deep learning focuses on ranking for web search. In contrast, semantic matching for product search presents several novel challenges, which we elucidate in this paper. We address these challenges by a) developing a new loss function that has an inbuilt threshold to differentiate between random negative examples, impressed but not purchased examples, and positive examples (purchased items), b) using average pooling in conjunction with n-grams to capture short-range linguistic patterns, c) using hashing to handle out of vocabulary tokens, and d) using a model parallel training architecture to scale across 8 GPUs. We present compelling offline results that demonstrate at least 4.7% improvement in Recall@100 and 14.5% improvement in mean average precision (MAP) over baseline state-of-the-art semantic search methods using the same tokenization method. Moreover, we present results and discuss learnings from online A/B tests which demonstrate the efficacy of our method.
Motivation & Objective
- Address the limitations of lexical matching in product search, such as failure to recognize synonyms, hypernyms, morphological variants, and spelling errors.
- Leverage customer behavior data—especially purchases and clicks—to learn semantic representations that capture user intent beyond keyword matching.
- Develop a scalable deep learning architecture capable of handling large-scale product catalogs with high-dimensional embeddings and out-of-vocabulary tokens.
- Improve retrieval performance on both offline metrics (Recall@100, MAP) and online A/B tests, ensuring real-world impact on customer satisfaction and business KPIs.
Proposed method
- Propose a 3-part hinge loss function that differentiates between random negatives, impressed-but-not-purchased items, and actual positive (purchased) items, enabling better signal discrimination.
- Use average pooling over n-grams to capture short-range linguistic patterns and improve robustness to word order and morphological variations.
- Apply hashing to embed out-of-vocabulary tokens, reducing the vocabulary size and improving generalization to rare or unseen words.
- Implement model parallel training across 8 GPUs by splitting the embedding matrix along the embedding dimension and decomposing cosine similarity computation to reduce communication overhead to 3 scalars per GPU.
- Use Siamese network architecture with shared weights for query and product embeddings, enabling efficient similarity computation via cosine similarity.
- Optimize training by placing gradient variables on the same GPUs as their corresponding operations, improving memory distribution and computational efficiency.
Experimental results
Research questions
- RQ1Can customer behavior data—particularly purchases and clicks—be effectively leveraged to train a deep learning model that improves semantic matching in product search beyond lexical methods?
- RQ2How does a 3-part hinge loss function that distinguishes between non-purchased impressions and actual purchases improve model generalization and retrieval performance?
- RQ3To what extent does n-gram pooling with average pooling enhance robustness to morphological variants and synonymy in product queries?
- RQ4What are the trade-offs and scaling characteristics of model-parallel training for large embedding matrices in a multi-GPU setting?
- RQ5Can the proposed model achieve measurable improvements in both offline metrics and online A/B tests in a real-world e-commerce environment?
Key findings
- The proposed model achieves at least a 4.7% improvement in Recall@100 and 14.5% improvement in mean average precision (MAP) over state-of-the-art semantic search baselines using the same tokenization method.
- The 3-part hinge loss significantly outperforms standard loss functions by better modeling the distinction between non-purchased impressions and actual purchases.
- Hashing of out-of-vocabulary tokens improves precision across different tokenization strategies, enhancing robustness to rare or unseen words.
- Model-parallel training with communication-efficient decomposition of cosine similarity enables linear scaling of training time with embedding dimension per GPU, reducing training time for large models.
- Online A/B tests confirm the model’s efficacy in real-world deployment, demonstrating measurable improvements in key business and user satisfaction metrics.
- Despite exploring self-attention and positional encodings, no improvement in precision was observed, suggesting that the current architecture is well-suited to the unique characteristics of product search.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.