Rethinking Contrastive Learning for Graph Collaborative Filtering: Limitations and a Simple Remedy
Abstract
Graph collaborative filtering (GCF) is a dominant paradigm in recommender systems, where contrastive learning (CL) objectives such as the Sampled Softmax (SSM) loss are widely used for optimization. However, it remains unclear how CL interacts with the prediction mechanism of GCF. By unfolding the prediction mechanism of GCF, we show that the user-item prediction score is computed by aggregating learnable weights over a large number of neighbor pairs formed by the multi-hop neighbors of the user and the item. This analysis suggests that effective optimization critically depends on which neighbor pairs are upweighted during training. Empirically, we find that effective recommendation is achievable by selectively upweighting only a small subset of neighbor pairs whose constituent neighbors are structurally similar to the target user and item, and that the effect of such selective upweighting varies across different neighbor pair types. Based on these findings, we analyze SSM and identify key limitations in its neighbor pair weight update dynamics. To address these limitations, we propose NT-SSM, an effective and principled CL objective that induces type-aware neighbor pair weight update dynamics. Experiments demonstrate consistent performance improvements over SSM across multiple datasets and GCF models.
Lay Summary
Machine learning systems are widely used to recommend products, movies, music, and other content. Many modern recommender systems use graphs, where users and items are connected by past interactions. However, it is not always clear how these systems learn which connections are actually useful for making good recommendations. In this paper, we show that graph-based recommender systems make predictions by combining many indirect connections between users and items. We find that not all of these connections are equally helpful. Instead, recommendation quality improves when the model focuses on a smaller set of informative connections, especially those that are structurally similar to the target user or item. Based on this insight, we propose NT-SSM, a new training method that helps the model focus on useful connections in a more careful way. NT-SSM also treats different types of connections differently, rather than applying the same rule to all of them. Experiments on several recommendation datasets show that this leads to more accurate recommendations.