A Semi-supervised Scalable Unified Framework for E-commerce Query Classification

Chunyuan Yuan, Chong Zhang, Zheng Fang, Ming Pang, Xue Jiang, Changping Peng, Zhangang Lin, Ching Law · DOI

Abstract

In the domain of e-commerce, accurately classifying user queries is critical for effective search and recommendation. However, industrial systems often struggle with short, ambiguous queries and the "Matthew effect," where rare "tail" queries lack sufficient click data for accurate modeling. This paper introduces SSUF, a modular, semi-supervised framework developed at JD.com. SSUF integrates Large Language Model (LLM)-generated world knowledge and complex label relationship graphs to enhance query representations. Experimental results on massive real-world datasets demonstrate that SSUF significantly outperforms existing state-of-the-art models, delivering substantial gains in both offline F1 scores and online advertising revenue.

Introduction

Understanding user intent from brief queries like "16pro" is a fundamental challenge in e-commerce. Traditional industrial models typically rely on posterior click behavior—using what users eventually clicked to generate training labels. This reliance creates a "Matthew vicious cycle": popular queries accumulate data and become highly accurate, while rare queries remain neglected due to a lack of historical context. Furthermore, classification tasks such as product category prediction and user intent identification are often siloed, preventing the sharing of valuable semantic insights across tasks.

To address these challenges, we propose the Semi-supervised Scalable Unified Framework (SSUF). SSUF breaks the popularity bias by incorporating external world knowledge and structural label relationships, allowing the model to generalize effectively even for queries with zero historical clicks.

The SSUF Framework

SSUF utilizes a "pluggable" architecture designed for scalability and engineering efficiency. The framework consists of three primary enhancement modules that enrich the query and label representations before final classification.

The SSUF architecture, featuring label, knowledge, and structure-enhanced modules for robust query classification.

1. Label-enhanced Module

Rather than treating labels as arbitrary numerical IDs, SSUF leverages BERT to encode the semantic meaning of label names, descriptions, and associated product keywords. This allows the model to recognize linguistic similarities between categories, such as "Smartphone" and "Mobile Phone."

2. Knowledge-enhanced Module

To resolve ambiguity in short queries, SSUF employs an LLM with Retrieval-Augmented Generation (RAG) and Chain-of-Thought (CoT) reasoning to generate "world knowledge" summaries. These summaries are fused with the query representation via an attention mechanism. This module also generates semi-supervised labels using a "stop-gradient" technique to prevent circular dependency during training.

3. Structure-enhanced Module

This module employs a Graph Convolutional Network (GCN) to model complex relationships between labels. It integrates three distinct graph types:

  • Co-occurrence: Labels frequently appearing together in click logs.
  • Semantic Similarity: Linguistically related labels.
  • Hierarchy: The expert-defined category tree (e.g., Electronics → Mobile Phones → Smartphones).

Experimental Evaluation

SSUF was evaluated on two massive datasets derived from JD.com's production logs, characterized by extreme class imbalance:

  • Intent Task: ~67.5 million training queries across 1,605 user intents.
  • Category Task: ~113.7 million training queries across 6,634 product categories.

Results and Analysis

SSUF demonstrated superior performance across both tasks when compared to strong baselines like XML-CNN, LSAN, and SMGCN.

Performance comparison of SSUF against state-of-the-art baselines on Intent and Category tasks.

Offline Performance

As shown in the performance table, SSUF achieved a Macro F1 of 41.22 on the Category Task, a significant improvement over the BERT baseline (33.80) and the previous state-of-the-art SMGCN (40.15). The gains in Macro F1 particularly highlight the framework's ability to handle "tail" queries more effectively than traditional methods.

Online Impact

In live A/B testing on JD.com, SSUF delivered measurable business value:

  • +3.14% in Ad Impressions.
  • +2.72% in Clicks.
  • +4.49% in total Ad Revenue.

By caching GCN-produced label embeddings, the system maintains high efficiency, allowing for deployment in real-time, high-traffic environments with minimal added latency.

Conclusion

SSUF represents a significant step forward in industrial query classification by successfully integrating LLM-based knowledge and structural graph data into a semi-supervised framework. By breaking the "Matthew effect," SSUF ensures high accuracy for both head and tail queries. Future work will focus on incorporating user-specific historical session data to move toward personalized query classification, further refining the system's predictive power.

Summary updated

BibTeX
@misc{yuan2025semi,
  author = {Chunyuan Yuan and Chong Zhang and Zheng Fang and Ming Pang and Xue Jiang and Changping Peng and Zhangang Lin and Ching Law},
  title = {{A Semi-supervised Scalable Unified Framework for E-commerce Query Classification}},
  year = {2025},
  eprint = {2506.21049},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.21049},
}
Figure