Discrete Trust-aware Matrix Factorization for Fast Recommendation

Guibing Guo, Enneng Yang, Li Shen, Xiaochun Yang, Xiaodong He

Abstract

Recommender systems often struggle to balance the high accuracy provided by social trust data with the computational efficiency required for large-scale deployment. This paper introduces Discrete Trust-aware Matrix Factorization (DTMF), a novel approach that maps users and items into a shared Hamming space. By utilizing binary hashing and a trust-aware objective function, DTMF achieves significant speedups through bitwise operations while maintaining high recommendation quality. Experimental results on the Epinions and Douban datasets demonstrate that DTMF outperforms existing discrete models and remains competitive with real-valued trust-based methods.

Introduction

The rapid growth of online platforms has made efficient recommendation engines indispensable. Modern systems typically face a "speed vs. accuracy" trade-off. While incorporating social trust—information about user relationships—can significantly mitigate the "cold-start" problem and improve accuracy, doing so often involves complex real-valued matrix factorization. These models are computationally expensive and memory-intensive, making them difficult to scale.

Conversely, discrete or hashed models offer extreme efficiency by representing user and item features as binary codes (0s and 1s). This allows for lightning-fast similarity calculations using bitwise XOR operations. However, most existing discrete models ignore social trust, leading to a gap in predictive performance. DTMF bridges this gap by providing a trust-aware discrete recommendation framework.

Methodology

The core innovation of DTMF lies in its ability to learn high-quality binary representations directly from both rating and trust data.

Hamming Space Mapping

DTMF represents each user and item as an $r$-length binary vector in Hamming space (values of $\{-1, 1\}$). The predicted preference of a user for an item is determined by the Hamming distance between their respective codes. In practice, this is computed as the inner product of the binary vectors, which can be efficiently implemented using bitwise operations.

Optimization and Constraints

The model optimizes a dual-objective function that simultaneously reconstructs the user-item rating matrix and the user-user trust matrix. To ensure the learned binary codes are informative and efficient, the authors impose two critical constraints:

  1. Balance Constraint: Each bit is encouraged to take values of 1 or -1 with roughly equal frequency, maximizing the entropy of each bit.
  2. De-correlation Constraint: Different bits are encouraged to be independent, ensuring that each bit captures unique information about the user or item.

Discrete Coordinate Descent (DCD)

Optimizing binary codes is a challenging non-convex problem. Standard gradient descent cannot be applied directly to discrete values. DTMF employs Discrete Coordinate Descent (DCD), a greedy optimization strategy that updates the binary codes bit-by-bit. To avoid poor local optima, the system uses a "warm start" strategy, initializing the binary codes based on a relaxed real-valued version of the problem.

Experimental Evaluation

The authors evaluated DTMF on two large-scale datasets:

  • Epinions: A consumer review platform with directed trust links (~49k users, ~139k items).
  • Douban: A social networking site for media with bi-directional friendship links (~129k users, ~16.8M ratings).

The primary metric used for evaluation was Normalized Discounted Cumulative Gain (NDCG@K), which measures ranking accuracy.

Key Results

DTMF demonstrates a clear advantage over state-of-the-art discrete baselines such as Discrete Collaborative Filtering (DCF) and Balanced Collaborative Filtering (BCCF).

Ranking accuracy (NDCG@K) comparison for DTMF, DCF, and BCCF across different bit lengths and datasets.

As shown in the figures above, DTMF consistently achieves higher NDCG scores across various bit lengths (8, 16, and 32 bits) for both the Epinions and Douban datasets. The performance gap is particularly notable in the Douban dataset, where social ties are dense.

Furthermore, the model's performance continues to scale with increased code length.

Performance of DTMF on the Epinions dataset using 64-bit codes.

Remarkably, DTMF's accuracy is competitive with real-valued models like TrustMF. In the Douban dataset, DTMF even outperformed its real-valued counterpart, suggesting that the regularization provided by the discrete constraints can sometimes improve generalization.

Conclusion

Discrete Trust-aware Matrix Factorization (DTMF) offers a powerful solution for large-scale recommendation tasks where both speed and accuracy are paramount. By integrating social trust into a discrete hashing framework, it achieves state-of-the-art performance among discrete models while maintaining the efficiency benefits of binary representations. Future work may explore adapting this approach to implicit feedback datasets and more complex social structures.

Summary updated

BibTeX
@inproceedings{guo2019discrete,
  author = {Guibing Guo and Enneng Yang and Li Shen and Xiaochun Yang and Xiaodong He},
  title = {{Discrete Trust-aware Matrix Factorization for Fast Recommendation}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.24963/ijcai.2019/191},
}
Figure