Improving Text Matching in E-Commerce Search with A Rationalizable, Intervenable and Fast Entity-Based Relevance Model

Jiong Cai, Yong Jiang, Yue Zhang, Chengyue Jiang, Ke Yu, Jianhui Ji, Rong Xiao, Haihong Tang, Tao Wang, Zhongqiang Huang, Pengjun Xie, Fei Huang, Kewei TuarXiv 2023

Abstract

Discovering the intended items of user queries from a massive repository of items is one of the main goals of an e-commerce search system. Relevance prediction is essential to the search system since it helps improve performance. When online serving a relevance model, the model is required to perform fast and accurate inference. Currently, the widely used models such as Bi-encoder and Cross-encoder have their limitations in accuracy or inference speed respectively. In this work, we propose a novel model called the Entity-Based Relevance Model (EBRM). We identify the entities contained in an item and decompose the QI (query-item) relevance problem into multiple QE (query-entity) relevance problems; we then aggregate their results to form the QI prediction using a soft logic formulation. The decomposition allows us to use a Cross-encoder QE relevance module for high accuracy as well as cache QE predictions for fast online inference. Utilizing soft logic makes the prediction procedure interpretable and intervenable. We also show that pretraining the QE module with auto-generated QE data from user logs can further improve the overall performance. The proposed method is evaluated on labeled data from e-commerce websites. Empirical results show that it achieves promising improvements with computation efficiency.

Problem Statement

In e-commerce search, matching a user's query to an item title is a complex task. For instance, a query like "gym weight" should match "Adjustable 24KG Dumbbell" but not "Weight Lifting Hooks," even though both contain related keywords.

Figure 1: Examples of relevant and irrelevant items for the query 'Gym Weight' based on entity matching.

Existing solutions face three primary challenges:

  1. The Accuracy-Speed Tradeoff: Bi-encoders are fast but lack the deep interaction modeling of Cross-encoders (like BERT), which are too slow for real-time production environments.
  2. Lack of Interpretability: Neural models often function as "black boxes," making it difficult to understand why a specific item was deemed relevant.
  3. Difficulty in Intervention: Correcting systematic errors typically requires expensive model retraining rather than targeted, immediate fixes.

Methodology: The Entity-Based Relevance Model (EBRM)

The EBRM addresses these issues by decomposing the Query-Item (QI) relevance problem into multiple Query-Entity (QE) sub-problems. The architecture consists of three main stages:

  1. Entity Extraction: A Named Entity Recognition (NER) tool identifies key entities (primarily product types) within item titles.
  2. Query-Entity (QE) Relevance: A BERT-based Cross-encoder scores the relevance between the query and each extracted entity. Because entities are frequently reused across different items, these scores can be efficiently cached.
  3. Soft Logic Aggregation: The final relevance score is computed using Zadeh soft logic. By applying a max operator, the model determines that an item is relevant if at least one of its core entities is highly relevant to the query.

To enhance performance, the authors employ a Warm-up Pre-training strategy. This involves mining search logs to identify entities that users frequently click on for specific queries, creating a large-scale pseudo-labeled dataset for initial training.

Evaluation and Results

The model was rigorously tested on a large-scale private e-commerce dataset and the open-source WANDS dataset.

  • Inference Speed: EBRM achieved a throughput of approximately 4,898 instances per second, making it 1,100x faster than a standard BERT-base Cross-encoder (4.38 instances/sec).
  • Predictive Accuracy: The model outperformed Bi-encoder baselines and matched the performance of heavy Cross-encoders on real-world data.
  • Resource Efficiency: EBRM requires significantly less cache storage (0.5 MB) compared to the high-dimensional vector storage required by Bi-encoders (500 MB+).
  • Online Performance: In live A/B testing, the model delivered a 1.29% improvement in search relevance over the existing production system.

Discussion and Conclusion

EBRM provides a unique combination of speed, accuracy, and transparency. By focusing on entities, the model becomes rationalizable (providing clear justifications for matches) and intervenable (allowing engineers to manually update the QE cache for instant "hotfixes").

While currently focused on product types, future work could expand the soft logic framework to include attributes like brand or material. The model's success demonstrates that decomposing complex matching tasks into entity-level sub-problems is a viable path toward more efficient and controllable e-commerce search engines.

Summary updated

BibTeX
@misc{cai2023improving,
  author = {Jiong Cai and Yong Jiang and Yue Zhang and Chengyue Jiang and Ke Yu and Jianhui Ji and Rong Xiao and Haihong Tang and Tao Wang and Zhongqiang Huang and Pengjun Xie and Fei Huang and Kewei Tu},
  title = {{Improving Text Matching in E-Commerce Search with A Rationalizable, Intervenable and Fast Entity-Based Relevance Model}},
  year = {2023},
  eprint = {2307.00370},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.00370},
}
Figure