BERT4CTR: An Efficient Framework to Combine Pre-trained Language Model with Non-textual Features for CTR Prediction

Dong Wang, Kavé Salamatian, Yunqing Xia, Weiwei Deng, Qi Zhang

Abstract

BERT4CTR is a novel framework designed to efficiently integrate Pre-trained Language Models (PLMs) with non-textual features for Click-Through Rate (CTR) prediction. By employing a specialized Uni-Attention mechanism and dimensionality reduction, the framework achieves state-of-the-art accuracy while maintaining significantly lower computational overhead compared to existing multi-modal PLM approaches. Evaluations on large-scale datasets from Microsoft Bing Ads and KDD CUP 2012 demonstrate substantial improvements in AUC and click yields with minimal latency increases.

Introduction

In online advertising and recommendation systems, predicting Click-Through Rate (CTR) is a critical task. Effective models must process two distinct data types: textual features (e.g., search queries, ad titles) and non-textual features (e.g., user demographics, historical behavior). While PLMs like BERT excel at capturing textual semantics, integrating them into CTR pipelines is challenging. Shallow interaction models fail to capture deep cross-information, while fine-grained tokenization approaches suffer from excessive sequence lengths and high computational costs. BERT4CTR addresses these issues through an efficient fusion strategy.

Methodology

The BERT4CTR framework introduces three primary innovations: Uni-Attention, dimensionality reduction, and a two-step joint-training process.

Input Representation

The model represents the input as a combination of textual tokens and non-textual features. Figure 5 illustrates the organization of these different data types into a unified structure for processing.

Input representation of textual and non-textual features

Feature Embedding and Dimensionality Reduction

To handle high-dimensional industrial features, BERT4CTR maps sparse and dense non-textual features into a compressed embedding space. As shown in Figure 6, raw feature values undergo normalization or one-hot encoding before being projected into extended embeddings and eventually concatenated into a K-dimensional feature embedding. This keeps the computational cost manageable even with hundreds of variables.

The process of mapping raw sparse and dense features into embeddings

Uni-Attention Mechanism

Instead of treating non-textual features as standard tokens in a sequence, BERT4CTR uses them as Queries in a Query-Key-Value (QKV) attention mechanism. The Keys and Values are derived from the textual tokens. This allows non-textual features to attend to the semantic context of the text without adding hundreds of new tokens to the primary Transformer backbone. Additionally, positional embeddings are removed for non-textual components to prevent learning arbitrary relationships based on feature ordering.

Experiments and Results

The framework was evaluated on two massive datasets: the Microsoft Bing Ads dataset (190 million samples) and the KDD CUP 2012 dataset (235 million samples).

  • Accuracy: BERT4CTR outperformed state-of-the-art models (including DeepFM and Wide & Deep) by 0.4% to 0.7% in AUC. In CTR prediction, a 0.1% gain is considered significant for revenue.
  • Efficiency: Compared to fine-grained tokenization models like NumBERT, BERT4CTR reduced training costs by up to 64% and inference latency by up to 52%.
  • Real-world Impact: In a live A/B test on Microsoft Bing Ads, the model achieved a 1.4% gain in click yields with only a negligible (0.5%) increase in display latency.

Conclusion

BERT4CTR provides a scalable and efficient path for incorporating heavy PLMs into production environments for CTR prediction. By bridging the gap between textual context and tabular data through Uni-Attention and dimensionality reduction, it achieves superior performance without the prohibitive costs of previous methods. Future work includes extending the framework to multi-modal inputs like images and utilizing knowledge distillation for edge deployment.

Summary updated

BibTeX
@inproceedings{wang2023bert,
  author = {Dong Wang and Kavé Salamatian and Yunqing Xia and Weiwei Deng and Qi Zhang},
  title = {{BERT4CTR: An Efficient Framework to Combine Pre-trained Language Model with Non-textual Features for CTR Prediction}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2023},
  doi = {10.1145/3580305.3599780},
}
Figure