BCFNet: A Balanced Collaborative Filtering Network with Attention Mechanism

Zi-Yuan Hu, Jin Huang, Zhi-Hong Deng, Chang-Dong Wang, Ling Huang, Jian-Huang Lai, Philip S. YuarXiv 2021

Abstract

Collaborative Filtering (CF) based recommendation methods have been widely studied, which can be generally categorized into two types, i.e., representation learning-based CF methods and matching function learning-based CF methods. Representation learning tries to learn a common low dimensional space for the representations of users and items. In this case, a user and item match better if they have higher similarity in that common space. Matching function learning tries to directly learn the complex matching function that maps user-item pairs to matching scores. Although both methods are well developed, they suffer from two fundamental flaws, i.e., the representation learning resorts to applying a dot product which has limited expressiveness on the latent features of users and items, while the matching function learning has weakness in capturing low-rank relations. To overcome such flaws, we propose a novel recommendation model named Balanced Collaborative Filtering Network (BCFNet), which has the strengths of the two types of methods. In addition, an attention mechanism is designed to better capture the hidden information within implicit feedback and strengthen the learning ability of the neural network. Furthermore, a balance module is designed to alleviate the over-fitting issue in DNNs. Extensive experiments on eight real-world datasets demonstrate the effectiveness of the proposed model.

Introduction

Collaborative Filtering (CF) is the engine behind most modern recommendation systems, but it generally splits into two camps: Representation Learning (RL) and Matching Function Learning (MFL). RL methods, such as Matrix Factorization, map users and items into a shared latent space. While effective at capturing low-rank relations, they are limited by the simplicity of the dot product. Conversely, MFL methods utilize Deep Neural Networks (DNNs) to learn complex interaction functions but often struggle with simple low-rank patterns and are prone to overfitting, particularly in sparse data scenarios.

BCFNet addresses this "best of both worlds" gap by integrating both approaches. Furthermore, it addresses the noise inherent in implicit feedback (e.g., clicks, views) by incorporating an attention mechanism to weight historical interactions based on their informativeness.

The BCFNet Architecture

BCFNet employs a three-pronged ensemble architecture to capture a wide range of user-item interaction patterns.

The BCFNet architecture consists of three main components: BCFNet-rl for representation learning, BCFNet-bm as a balance module, and BCFNet-ml for matching function learning.
  1. BCFNet-rl (Attentive Representation Learning): This module uses a Multi-Layer Perceptron (MLP) to learn user and item embeddings. It introduces a feed-forward attention layer that weights input interaction vectors, allowing the model to focus on the most relevant historical interactions.
  2. BCFNet-ml (Attentive Matching Function Learning): This module learns the interaction function itself via an MLP, using attention to capture hidden information within concatenated user-item representations.
  3. BCFNet-bm (Balance Module): Acting as the "stabilizer," this module uses Generalized Matrix Factorization (GMF) to capture low-rank relations that deep MLPs might miss, helping to prevent overfitting in sparse datasets.

The outputs of these modules are concatenated in a Fusion Layer and passed through a final Sigmoid activation to predict interaction probabilities, optimized via Binary Cross-Entropy (BCE) loss.

Experimental Evaluation

The model was evaluated on eight diverse real-world datasets, ranging from standard benchmarks like MovieLens to extremely sparse Amazon e-commerce datasets.

Statistics of the eight real-world datasets used for evaluation, highlighting varying levels of sparsity.

As shown in the table above, the datasets include "long tail" categories like Amazon Toy, which exhibits a sparsity level of 99.92%. These varied environments allow for a robust assessment of BCFNet's performance across different scales and data densities.

Key Findings and Discussion

BCFNet consistently outperformed seven baseline models, including NeuMF and DMF. Key insights from the study include:

  • The Importance of the Balance Module: The inclusion of the GMF-based balance module was critical. It suggests that for sparse data, a linear "shortcut" helps the model maintain a baseline of logic that deep layers might otherwise over-complicate.
  • Attention as a Denoising Filter: The attention mechanism effectively filters noisy implicit feedback, assigning higher weights to informative interactions.
  • Resilience to Sparsity: Performance gains over state-of-the-art models actually increased as datasets became sparser. For instance, on the Amazon Toy dataset, BCFNet improved the Hit Ratio (HR@10) by 15.10% over NeuMF.
  • Pre-training Benefits: Independently pre-training the three sub-modules before fusion led to significant performance boosts, such as a 21.51% improvement in HR@10 on MovieLens 100k.

Conclusion and Future Work

BCFNet demonstrates that balancing deep and shallow learning paths, combined with attention mechanisms, significantly improves recommendation quality in sparse environments. Future research directions include exploring pair-wise loss functions (like BPR) to improve ranking quality and incorporating auxiliary data such as user demographics or temporal information to further enhance the model's predictive power.

Summary updated

BibTeX
@misc{hu2021bcfnet,
  author = {Zi-Yuan Hu and Jin Huang and Zhi-Hong Deng and Chang-Dong Wang and Ling Huang and Jian-Huang Lai and Philip S. Yu},
  title = {{BCFNet: A Balanced Collaborative Filtering Network with Attention Mechanism}},
  year = {2021},
  eprint = {2103.06105},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.06105},
}
Figure