Abstract
Query intent classification is a critical task in e-commerce search, aiming to map user queries to relevant product categories. However, short, informal queries and the polysemy of natural language pose significant challenges. We present the Multi-granularity Matching Attention Network (MMAN), a novel framework that captures both character-level and semantic-level interactions between queries and categories. By leveraging a BERT backbone with specialized matching modules, MMAN effectively bridges the "expression gap" in e-commerce retrieval. Experimental results on large-scale real-world datasets from JD.com demonstrate that MMAN outperforms state-of-the-art baselines, leading to significant improvements in both offline metrics and online business value.
Introduction
In the context of e-commerce, query intent classification involves identifying the specific product category a user intends to find based on their search query. For instance, a search for "apple" must be disambiguated between "Electronics" and "Fruit." This task is complicated by several factors:
- The Expression Gap: Users often employ informal, short, and ungrammatical language, whereas product categories are formal and structured.
- Polysemy: Words frequently have multiple meanings depending on context (e.g., "book" as a noun vs. a verb).
- The Long Tail: Rare queries lack sufficient training data for standard classification models to generalize effectively.
Existing approaches often treat this as a standard text classification problem, failing to capture the fine-grained interactions between the query and potential category labels.
The MMAN Framework
To address these challenges, we propose the Multi-granularity Matching Attention Network (MMAN). MMAN utilizes BERT as a foundational encoder and introduces specialized layers to perform multi-level matching between queries and categories.
The architecture consists of four primary components:
- Enhanced Representation: Category names are enriched with "core product words" to provide additional context for the BERT encoder.
- Self-Matching Module: An attention mechanism identifies intent-heavy words within the query (e.g., "shoes" in "blue running shoes").
- Char-Level Matching Module: This module addresses the literal gap by creating an interaction matrix via dot-product between query and category embeddings. A 2D Convolutional Neural Network (CNN) then extracts fine-grained character-level patterns.
- Semantic-Level Matching Module: Cross-attention is used to compare high-level semantic meanings, helping to resolve polysemy.
Experimental Evaluation
MMAN was evaluated on two massive datasets from JD.com: Category Data (4.5M queries across 90 categories) and Scene Data (8 broader domains). Unlike models trained on noisy click logs, our test sets were manually annotated by experts to ensure ground-truth quality.
Offline Performance
MMAN significantly outperformed several strong baselines, including RCNN, XML-CNN, and vanilla BERT.
As shown in the results, MMAN achieved a Micro-F1 of 63.74% on the Category Data, a substantial improvement over the BERT baseline (60.67%). Ablation studies (w/o self-matching, char matching, or semantic matching) confirm that each component contributes to the model's overall efficacy.
Online Impact
In live A/B testing on the JD.com mobile app, MMAN demonstrated clear business value:
- Gross Merchandise Volume (GMV): +0.351%
- Conversion Rate (UCVR): +0.113%
Specific service-oriented "scenes" saw even more dramatic gains. For example, in "hotel booking," Page Views (PV) increased by 74.85% and Clicks by 36.49%, indicating superior identification of service intent over physical goods.
Conclusion
The MMAN framework successfully bridges the gap between informal user queries and formal product categories by integrating literal and semantic matching. By capturing multi-granularity interactions, the model improves search relevance and drives significant business growth. Future work will explore incorporating taxonomic hierarchies to further refine category representations.
Summary updated