TL;DR
Alibaba researchers have developed ei-SRC, the first interaction-based (cross-encoder) semantic relevance model successfully deployed for full-scale traffic on a major e-commerce platform. By combining a dynamic token-length representation scheme, domain-specific vocabulary expansion, and contrastive adversarial training, the system achieves the superior accuracy of cross-encoders while slashing computational overhead and latency. Deployed on Alibaba.com, it has significantly boosted click-through rates, conversion rates, and platform revenue.
What Problem Does This Paper Address?
In e-commerce search, Semantic Relevance Calculation (SRC) ensures that search results strictly match a user's intent. Doing this accurately is notoriously difficult: user queries are often short and ambiguous (e.g., "new apple discount"), while product titles are frequently stuffed with extraneous keywords to maximize exposure.
To solve this, search engines typically choose between two neural architectures:
- Representation-based models (Dual-encoders): These encode queries and items separately into vectors and compute similarity (like a dot product) online. They are fast and low-latency but miss fine-grained token-to-token interactions, leading to poorer relevance matching.
- Interaction-based models (Cross-encoders): These feed the query and item text together into a model like BERT, allowing deep self-attention across all tokens. They are highly accurate but computationally expensive ($O(l^2)$ time complexity relative to sequence length $l$), making them traditionally impractical for real-time, high-traffic online search engines.
The authors address this trade-off by making interaction-based models efficient and robust enough for production deployment under massive traffic constraints.
Methods
The proposed framework, ei-SRC, relies on three core innovations to optimize both efficiency and precision:
- Dynamic-length Representation Scheme (DRS): Instead of using a fixed, worst-case token length for all inputs, DRS dynamically calculates the maximum non-zero token length of queries and titles within a single batch and drops the remaining zero-padding columns. This dramatically reduces the sequence length $l$, yielding a quadratic reduction in multi-head attention runtime.
- Professional Terms Recognition Strategy: Standard tokenizers (like WordPiece) often split specialized e-commerce terms into generic sub-tokens (e.g., breaking "bluetooth" into "blue" and "##tooth"), which degrades semantic understanding. The authors added the top 20,000 most frequent e-commerce words directly to the vocabulary and integrated Named Entity Recognition (NER) embeddings to explicitly highlight core attributes like material, function, and style.
- Contrastive Adversarial Training (CAT): To make a lightweight 3-layer model perform as well as a heavy 12-layer model, the authors introduced a novel regularization protocol. It injects adversarial perturbations into the input embeddings while minimizing the bidirectional KL divergence between different dropout distributions of the outputs. Additionally, a "heated-up" softmax function forces the model to focus heavily on hard negative samples during early training phases.
Datasets
The models were trained and evaluated using real-world data from Alibaba.com:
- Log-derived Dataset: 80 million user-clicked query-item pairs extracted from search logs. To capture user intent accurately, pairs were re-sampled based on the depth of user action (e.g., higher weights for purchases or adding to cart vs. a simple page click). 70 million pairs were used for continued pre-training, and 10 million for initial fine-tuning.
- Manually Annotated Dataset: 250,000 query-item pairs meticulously labeled by three human annotators and verified by a domain expert based on strict alignment of subjects, core keywords, and units of measurement. 150,000 pairs were used for fine-tuning, and 100,000 served as the evaluation benchmark.
Key Insights and Ideas
- Padding is a Hidden Tax: Standard deep learning workflows rely on uniform tensor shapes, which forces models to spend massive compute cycles processing meaningless padding tokens. Trimming these dynamically at the batch level (as shown in Figure 2) yields massive efficiency gains without losing information.
- Shallow Interaction Beats Deep Representation: A highly regularized, 3-layer interaction model utilizing CAT can comfortably outperform a standard 12-layer BERT base model, proving that structural interaction is far more vital for text matching than raw parameter depth.
- Vocabulary Expansion Compounds Speedups: By preventing sub-token fragmentation of domain words, vocabulary expansion naturally shortens the overall sequence length. This directly compounds the computational savings achieved by the dynamic-length scheme.
Key Results
- Offline Performance: The 3-layer ei-SRC achieved an AUC of 0.9033, outperforming the 12-layer BERT base model (0.8907) and vastly outperforming representation-based baselines like SBERT-mini (0.8184).
- Online Efficiency: Implementing DRS alongside an online cache reduced GPU utilization by 48% and cut reaction latency by 40%.
- Business Impact: In live A/B testing on Alibaba.com, the full ei-SRC framework delivered an incremental +1.54% increase in Click-Through Rate (CTR), a +1.02% increase in Conversion Rate (CVR), and a +1.87% boost to the average earnings rate (PAY).
Limitations and Future Work
While ei-SRC successfully brings interaction-based modeling to online search relevance, the authors note that it is currently confined to the relevance filtering stage. Future work will focus on integrating this framework directly into the downstream ranking models, recommendation systems, and Pay-Per-Click (P4P) advertising systems. Additionally, they plan to explore how Large Language Models (LLMs) like ChatGPT can be leveraged to distill knowledge and further guide the learning process of smaller online SRC models.
Summary updated