Introduction
E-commerce search engines frequently encounter challenges with "tail" (rare) queries, often failing to distinguish between core intent terms and noisy modifiers. For instance, in a query like "socks for running shoes," the primary intent is "socks," yet standard engines might prioritize "running shoes." Additionally, a "vocabulary gap" exists where users' search terms differ from catalog descriptions (e.g., "outdoor paint" vs. "exterior paint").
Traditional weighting methods like TF-IDF or BM25 are often inadequate in e-commerce contexts. Crucial intent terms (e.g., "women" in "women shoes") are common and thus receive low weights, leading to irrelevant results. This paper introduces two deep learning models—Contextual Term-Weighting (CTW) and Contextual Query Refinement (CQR)—to address these issues by leveraging historical query reformulation logs.
Methodology
The authors employ a distant-supervised approach. Instead of manual labeling, they utilize historical logs where a user issued a query $q$, failed to find a product, reformulated it to $R(q)$, and subsequently added an item to their cart. $R(q)$ is assumed to represent the "true" product intent.
Contextual Term-Weighting (CTW)
The CTW model predicts an importance weight for each term in a query based on its specific context.
- Intent Encoder: A Bi-directional Gated Recurrent Unit (Bi-GRU) processes the query to capture contextual meaning (e.g., "3-piece" in different contexts).
- Feature Generator: This component calculates a term's contribution by analyzing the difference in GRU hidden states.
- Weight Calculator: A Multi-Layer Perceptron (MLP) outputs an importance score between 0 and 1 for each term.
Contextual Query Refinement (CQR)
CQR suggests new terms to bridge the vocabulary gap. It uses a Bi-GRU encoder to create a global intent representation, followed by a multilabel classifier that predicts relevant terms from the entire vocabulary, even if they were absent in the original query.
Experimental Setup
The models were trained and evaluated using 11 months of historical search logs from Walmart.com, specifically focusing on "tail" queries (appearing < 300 times in 60 days) with low click-through rates. The dataset included over 722,000 training pairs and a vocabulary of 12,118 terms.
Key Results
The proposed models demonstrated significant improvements over traditional baselines. Integrating CTW weights into a BM25F retrieval system resulted in a 3% improvement in Mean Reciprocal Rank (MRR).
Key findings include:
- Contextual Importance: The models successfully learned that term significance is context-dependent (e.g., "battery" is core in "AA battery" but a modifier in "battery night light").
- Distant Supervision Effectiveness: Using "add-to-cart" events as a ground-truth signal allowed for the creation of a massive, high-quality labeled dataset.
- Robustness for Tail Queries: By learning semantic embeddings, the models generalize effectively to previously unseen queries.
Conclusion
While effective, the current CQR model is limited by a fixed vocabulary and the assumption that reformulated queries are always superior. Future work may involve incorporating product descriptions directly into the training process to further bridge the gap between user language and product catalogs.
Summary updated