GraphHash: Graph Clustering Enables Parameter Efficiency in Recommender Systems

Xinyi Wu, Donald Loveland, Runjin Chen, Yozen Liu, Xin Chen, Leonardo Neves, Ali Jadbabaie, Clark Mingxuan Ju, Neil Shah, Tong Zhao

TL;DR

This paper introduces GraphHash, a novel method that uses graph clustering on user-item interaction data to efficiently reduce the memory footprint of recommender systems. By grouping similar users and items based on their interaction patterns, GraphHash significantly cuts down on the size of embedding tables, outperforming traditional hashing techniques in both retrieval and click-through-rate prediction tasks.

What Problem Does This Paper Address?

Modern deep recommender systems rely heavily on massive embedding tables to represent users and items. These tables can consume hundreds of gigabytes of memory due to the sheer number of unique users and items (high cardinality). This memory overhead poses significant challenges for deploying and scaling these systems. A common solution is the "hashing trick," which maps multiple entities to the same embedding, thereby reducing table size. However, traditional hashing methods, often based on simple ID mapping (like modulo operations), lead to "collisions" where dissimilar entities share embeddings, degrading model performance. While graph-based approaches have shown great promise in improving recommendation quality by capturing collaborative signals, their potential for optimizing embedding table reduction has been largely overlooked. This paper aims to bridge this gap by proposing a graph-based hashing method.

Methods

The core of GraphHash lies in modularity-based bipartite graph clustering. The authors construct a bipartite graph where users and items are nodes, and interactions (like clicks or purchases) are edges. They then apply a graph clustering algorithm, specifically the Louvain method, to partition this graph into communities. Entities within the same community are then mapped to the same embedding, effectively reducing the embedding table size.

The authors justify this approach by highlighting a theoretical connection between the modularity objective and message-passing, a common technique in graph neural networks (GNNs) for learning embeddings. They argue that GraphHash acts as a computationally efficient proxy for message-passing during preprocessing, offering a "coarser but more efficient way to achieve a similar smoothing effect." This makes it a "plug-and-play" alternative to traditional ID hashing.

For improved collision mitigation, they also propose DoubleGraphHash, which combines GraphHash with a traditional random hash function.

Datasets

The paper evaluates GraphHash on several standard datasets for two key recommendation tasks:

  • Retrieval (Top-K Recommendation):
    • Gowalla
    • Yelp2018
    • AmazonBook
  • Click-Through-Rate (CTR) Prediction:
    • Frappe
    • MovieLens-1M
    • MovieLens-20M

The paper also includes additional experiments on the Pinterest dataset.

Key Insights and Ideas

  • Graph Structure for Efficiency: The most significant insight is that the inherent structure of user-item interactions (represented as a graph) can be leveraged not just for improving recommendation accuracy, but also for achieving parameter efficiency.
  • Modularity as a Proxy for Smoothing: The theoretical link between modularity maximization and message-passing provides a strong foundation for using graph clustering as an alternative to computationally intensive GNN layers for embedding smoothing.
  • Balanced Performance: Unlike some hashing methods that heavily favor "power users" (those with many interactions), GraphHash demonstrates a more balanced performance across different user groups, closely mirroring the performance of models without any hashing.
  • Robustness to Hyperparameters: GraphHash shows greater robustness to hyperparameters like the uniformity term in the DirectAU loss compared to traditional hashing methods.
  • Retrieval vs. CTR Nuances: The paper highlights that while GraphHash excels in retrieval, its variant (DoubleGraphHash) is more crucial for CTR prediction, suggesting that collision avoidance is more critical in the latter task.

Key Results

  • Substantial Recall Improvement: GraphHash achieves an average of 101.52% improvement in recall when reducing embedding table size by over 75%.
  • Significant NDCG Gains: On average, GraphHash outperforms baselines by 88.33% in NDCG for retrieval tasks.
  • CTR Performance: For CTR prediction, DoubleGraphHash shows competitive results, achieving an average reduction in LogLoss and improvement in AUC.
  • Efficiency: GraphHash is computationally efficient, leveraging fast clustering algorithms like Louvain, making it suitable for large-scale industrial applications.
  • Backbone Agnostic: The method is designed to be plug-and-play, working seamlessly with various recommender system architectures (MF, NeuMF, LightGCN, WideDeep, DLRM, DCNv2).

Limitations and Future Work

  • OOV Handling: The current work does not address out-of-vocabulary (OOV) IDs, which is a common challenge in real-world recommender systems.
  • Frequency Information Integration: While GraphHash leverages interaction graphs, future work could explore how to better integrate frequency information with graph clustering for even more effective reduction.
  • Adaptation to OOV: Adapting GraphHash to handle OOV scenarios is suggested as a future research direction.
  • Clustering Objective Exploration: While modularity is effective, exploring other graph clustering objectives could yield further improvements.

Summary updated

BibTeX
@inproceedings{wu2024graphhash,
  author = {Xinyi Wu and Donald Loveland and Runjin Chen and Yozen Liu and Xin Chen and Leonardo Neves and Ali Jadbabaie and Clark Mingxuan Ju and Neil Shah and Tong Zhao},
  title = {{GraphHash: Graph Clustering Enables Parameter Efficiency in Recommender Systems}},
  booktitle = {The Web Conference},
  year = {2024},
  url = {https://openreview.net/forum?id=U3TzIAg5Dg},
}
Figure