GARCIA: Powering Representations of Long-tail Query with Multi-granularity Contrastive Learning

Weifan Wang, Binbin Hu, Zhicheng Peng, Mingjie Zhong, Zhiqiang Zhang, Zhongyi Liu, Guannan Zhang, Jun Zhou

Introduction

In large-scale service search engines, such as those operated by Alipay or WeChat, query distributions are characterized by a significant "long-tail" phenomenon. While a small subset of "head" queries accounts for the vast majority of search traffic, millions of unique, low-frequency "tail" queries constitute the remainder. Standard machine learning models, which rely heavily on frequent co-occurrence patterns, often struggle to generate robust representations for these rare queries. This data sparsity leads to suboptimal search results and a degraded user experience for niche or specific searches.

To address this, researchers from Ant Group have developed GARCIA (GrAph based service seaRch framework with multi-Granularity Contrastive leArning). GARCIA is designed to enhance the representation of tail queries by explicitly transferring knowledge from high-frequency head queries and leveraging hierarchical user intentions.

The GARCIA Framework

GARCIA moves beyond traditional search models by treating head and tail queries as distinct but related entities. The framework consists of three primary components: Adaptive Encoding, Intention Trees, and Multi-granularity Contrastive Learning.

Adaptive Encoding

Recognizing that head and tail queries follow different data distributions, GARCIA utilizes separate Graph Neural Network (GNN) encoders for each. This adaptive approach prevents the dominant patterns of high-frequency queries from overwhelming the subtle features of rare queries during the embedding process. By maintaining separate parameters, the model preserves the unique semantic nuances of the long tail while still allowing for structural learning.

Intention Trees

To provide a semantic anchor for queries, the authors constructed a hierarchical "Intention Tree." This structure maps queries to specific user goals across multiple levels of granularity (up to five levels). For instance, a tail query like "iPhone Rental" is mapped as a child of the broader "Cell-Phone Rental" intention, which in turn falls under "3C Rental." This hierarchy allows the model to understand that even if a specific query is rare, its underlying intent is shared with more common queries.

Multi-granularity Contrastive Learning (CL)

The core innovation of GARCIA lies in its three-pronged contrastive learning strategy, designed to refine query and service representations:

  1. Knowledge Transfer Contrastive Learning (KTCL): This module explicitly bridges the gap between the head and the tail. It encourages the model to align the embeddings of tail queries with semantically similar head queries, effectively "borrowing" the rich representational data available for popular searches.
  2. Structure Enhancement Contrastive Learning (SECL): Utilizing the local graph structure of the search ecosystem, SECL ensures that a query’s representation remains consistent with its immediate neighbors (e.g., services frequently clicked after that query).
  3. Intention Generalization Contrastive Learning (IGCL): This module aligns query and service representations with their corresponding nodes in the Intention Tree. By anchoring embeddings to these hierarchical intents, the model can generalize its understanding to entirely new or extremely rare queries.

Experimental Evaluation

The researchers evaluated GARCIA using both industrial datasets and public benchmarks to ensure robustness and generalizability.

Datasets

  • Industrial Data: The model was tested on three large-scale snapshots from Alipay (Sep. A, B, and C), encompassing over 20 million users, 800,000 services, and 3.89 billion interactions.
  • Public Benchmarks: To verify performance outside the Alipay ecosystem, the team used three sub-datasets from the Amazon Product Dataset: Software, Video Games, and Music.

Key Results

GARCIA demonstrated significant improvements over state-of-the-art baselines, including LightGCN and KGAT:

  • Offline Performance: On Alipay datasets, GARCIA achieved up to a 13.92% improvement in Group AUC (GAUC) specifically for tail queries, proving its efficacy in handling data sparsity.
  • Online Impact: In a real-world deployment on the Alipay app, the framework produced a 0.79% absolute increase in Click-Through Rate (CTR) and a 0.60% increase in Valid CTR.
  • Ablation Studies: Removing any of the three CL modules resulted in a performance decline, confirming that knowledge transfer, structural consistency, and intention modeling are all critical to the framework's success.

Conclusion and Future Work

GARCIA represents a significant step forward in solving the long-tail problem in search. By treating head queries as a source of credible knowledge and using hierarchical intentions as semantic anchors, the framework provides a robust solution for representing rare queries.

Future research directions include refining the threshold for splitting head and tail queries, integrating deeper semantic models like BERT for text mining, and exploring multi-group transfer learning to handle various frequency bands more granularly.

Summary updated

BibTeX
@inproceedings{wang2023garcia,
  author = {Weifan Wang and Binbin Hu and Zhicheng Peng and Mingjie Zhong and Zhiqiang Zhang and Zhongyi Liu and Guannan Zhang and Jun Zhou},
  title = {{GARCIA: Powering Representations of Long-tail Query with Multi-granularity Contrastive Learning}},
  booktitle = {ICDE},
  year = {2023},
  url = {https://openreview.net/forum?id=slxa6A7df1},
}
Figure