TextGNN: Improving Text Encoder via Graph Neural Network in Sponsored Search

Jason Zhu, Yanling Cui, Yuming Liu, Hao Sun, Xue Li, Markus Pelger, Tianqi Yang, Liangjie Zhang, Ruofei Zhang, Huasha ZhaoWWW 2021 · DOI

Abstract

Text encoders based on C-DSSM or transformers have demonstrated strong performance in many Natural Language Processing (NLP) tasks. Low latency variants of these models have also been developed in recent years in order to apply them in the field of sponsored search which has strict computational constraints. However these models are not the panacea to solve all the Natural Language Understanding (NLU) challenges as the pure semantic information in the data is not sufficient to fully identify the user intents. We propose the TextGNN model that naturally extends the strong twin tower structured encoders with the complementary graph information from user historical behaviors, which serves as a natural guide to help us better understand the intents and hence generate better language representations. The model inherits all the benefits of twin tower models such as C-DSSM and TwinBERT so that it can still be used in the low latency environment while achieving a significant performance gain than the strong encoder-only counterpart baseline models in both offline evaluations and online production system. In offline experiments, the model achieves a 0.14% overall increase in ROC-AUC with a 1% increased accuracy for long-tail low-frequency Ads, and in the online A/B testing, the model shows a 2.03% increase in Revenue Per Mille with a 2.32% decrease in Ad defect rate.

Introduction

In sponsored search, the primary challenge is matching user queries with relevant advertiser keywords under strict latency constraints. While state-of-the-art Transformer models like BERT provide deep semantic understanding, they often struggle with the "long-tail" problem—rare or ambiguous queries where text alone is insufficient to determine intent. For example, a query like "achilles heel" could be interpreted through a mythological lens or a medical one. TextGNN addresses this by integrating user behavioral data, specifically historical click logs, to act as a "natural guide" for intent disambiguation.

Methodology

TextGNN builds upon the established "twin-tower" architecture, which processes queries and keywords in parallel branches to allow for efficient pre-computation of ad embeddings. The model utilizes a distilled TwinBERT encoder for language processing.

The TextGNN architecture integrates neighbor information from a click graph using a GNN Aggregator to enhance the final text representation.

To incorporate behavioral context, the model identifies "neighbors" for each query and keyword within a User Click Graph. These neighbors represent historical interactions (e.g., an ad clicked after a specific query). A Graph Attention Network (GAT) aggregates these neighbors, using learnable weights to prioritize the most relevant historical signals. A residual-style skip layer ensures that the original semantic meaning from the text encoder is preserved. To handle data sparsity for rare items, the authors employ an Approximate Nearest Neighbor (ANN) search to find semantic proxies, extending graph coverage from 37% to nearly 100%.

Results and Discussion

The integration of behavioral data allows the model to capture domain knowledge that is not explicitly present in the text. For instance, if users searching for "achilles heel" frequently click on medical ads, the GNN learns this context dynamically.

Offline performance comparison across different frequency buckets, showing that TextGNN with ANN provides the most significant gains for low-frequency (long-tail) items.

Offline evaluations demonstrated a 0.14% overall increase in ROC-AUC, with a notable 1% accuracy improvement for long-tail ads. In online A/B testing on Microsoft Bing, TextGNN delivered a 2.03% increase in Revenue Per Mille (RPM) and a 2.32% reduction in the Ad defect rate, proving its effectiveness in a high-scale production environment.

Conclusion

TextGNN successfully bridges the gap between pure semantics and user behavior. By augmenting twin-tower encoders with graph-based behavioral signals, the model significantly improves relevance for rare and ambiguous queries. Future research will focus on reducing query-side latency to enable full real-time GNN processing and incorporating more granular behavioral signals like dwell time to further refine neighbor selection.

Summary updated

BibTeX
@inproceedings{zhu2021textgnn,
  author = {Jason Zhu and Yanling Cui and Yuming Liu and Hao Sun and Xue Li and Markus Pelger and Tianqi Yang and Liangjie Zhang and Ruofei Zhang and Huasha Zhao},
  title = {{TextGNN: Improving Text Encoder via Graph Neural Network in Sponsored Search}},
  booktitle = {The Web Conference},
  year = {2021},
  doi = {10.1145/3442381.3449842},
}
Figure