Transformer-Empowered Content-Aware Collaborative Filtering

Weizhe Lin, Linjun Shou, Ming Gong, Jian Pei, Zhilin Wang, Bill Byrne, Daxin Jiang

Abstract

Modern recommender systems often struggle to effectively integrate structured Knowledge Graph (KG) data with unstructured textual descriptions without incurring prohibitive computational costs. This paper presents CKMPN (Content-aware KG-Enhanced Meta-Preference Network), a novel framework that fuses a Transformer-based Content-Based Filtering (CBF) model with a KG-based Collaborative Filtering (CF) model. By employing Cross-System Contrastive Learning, the framework aligns the latent spaces of frozen pre-trained text encoders with graph-based collaborative signals. Experimental results on book and movie recommendation benchmarks demonstrate that CKMPN achieves state-of-the-art performance while maintaining memory efficiency, particularly excelling in cold-start scenarios.

1. Introduction

Recommender systems typically follow two paradigms: Collaborative Filtering (CF) and Content-Based Filtering (CBF). While recent advancements have enhanced CF with Knowledge Graphs (KGs) to incorporate structured data, these models often ignore the rich, fine-grained information available in unstructured text descriptions. Directly integrating large language models like BERT into graph-based CF architectures is computationally prohibitive due to the memory requirements of graph convolutions. This paper addresses the challenge of fusing these two disparate data sources efficiently and effectively.

2. Methodology

The proposed CKMPN framework consists of three primary components designed to bridge the gap between structured KG data and unstructured text:

  1. KMPN (KG-Enhanced Meta-Preference Network): A CF model that aggregates KG features into item embeddings and models users through latent "meta-preferences." It utilizes a Soft Distance Correlation loss to ensure diversity among these preferences.
  2. NRMS-BERT: A CBF model that leverages a fine-tuned BERT encoder for item descriptions and multi-head self-attention to construct user profiles from browsing history.
  3. CKMPN (Content-aware KMPN): The integrated system that fuses the two models using Cross-System Contrastive Learning. By freezing the pre-trained NRMS-BERT and using its embeddings as anchors, the KMPN model is guided to align its latent space with text-aware features without the memory overhead of end-to-end Transformer training.
Architecture of the CKMPN framework

3. Key Innovations and Insights

The success of CKMPN is attributed to several novel techniques that improve representation learning and fusion:

  • Soft Constraints for Diversity: Rather than forcing user preference embeddings to be strictly orthogonal, the authors introduce Soft Distance Correlation. By applying PCA and constraining only the top principal components, the model maintains expressiveness in higher dimensions while ensuring preference diversity.
  • Reciprocal Ratio Negative Sampling (RRNS): To improve training quality, RRNS assumes that popular items are less likely to be true "hard negatives" for a user, sampling them less frequently during training.
  • Contrastive Fusion vs. Late Fusion: Unlike traditional late fusion (e.g., concatenation), contrastive learning aligns latent spaces gently. This preserves the nuanced representations of the Transformer while allowing the CF model to absorb textual insights.
Hyperparameter sensitivity analysis

4. Experimental Evaluation

The model was evaluated on two datasets: Amazon-Book-Extended and Movie-KG-Dataset. CKMPN consistently outperformed state-of-the-art baselines like KGIN. On the Amazon dataset, CKMPN achieved a Recall@20 of 0.1718 compared to KGIN's 0.1654. Similar gains were observed in the movie dataset (Recall@20: 0.1457 vs. 0.1351).

Notably, the model demonstrated robust cold-start performance. On unseen users in the movie dataset, CKMPN maintained a Recall@20 of 0.1024, indicating that the injection of textual features significantly aids generalization when interaction data is sparse.

5. Conclusion

CKMPN provides a scalable and effective solution for combining KG-based collaborative signals with Transformer-encoded text. Its two-stage training pipeline and independent user/item embedding generation make it highly suitable for the "Recall" phase of industrial-scale recommender systems, enabling fast Approximate Nearest Neighbor (ANN) searches in production environments.

Summary updated

BibTeX
@inproceedings{lin2022transformer,
  author = {Weizhe Lin and Linjun Shou and Ming Gong and Jian Pei and Zhilin Wang and Bill Byrne and Daxin Jiang},
  title = {{Transformer-Empowered Content-Aware Collaborative Filtering}},
  booktitle = {KaRS@RecSys},
  year = {2022},
  url = {https://openreview.net/forum?id=SudlvrGHLI5},
}
Figure