Skip to main content
QUICK REVIEW

[Paper Review] On the Effectiveness of Sampled Softmax Loss for Item Recommendation

Jiancan Wu, Xiang Wang|arXiv (Cornell University)|Jan 7, 2022
Recommender Systems and TechniquesComputer Science58 references13 citations
TL;DR

This paper provides a comprehensive theoretical and empirical analysis of sampled softmax (SSM) loss for item recommendation, demonstrating its advantages in mitigating popularity bias, mining hard negatives, and optimizing ranking metrics. It further reveals that SSM's limitation in adjusting representation magnitudes can be overcome by message-passing in graph neural networks, leading to state-of-the-art performance on benchmark datasets.

ABSTRACT

The learning objective plays a fundamental role to build a recommender system. Most methods routinely adopt either pointwise or pairwise loss to train the model parameters, while rarely pay attention to softmax loss due to its computational complexity when scaling up to large datasets or intractability for streaming data. The sampled softmax (SSM) loss emerges as an efficient substitute for softmax loss. Its special case, InfoNCE loss, has been widely used in self-supervised learning and exhibited remarkable performance for contrastive learning. Nonetheless, limited recommendation work uses the SSM loss as the learning objective. Worse still, none of them explores its properties thoroughly and answers ``Does SSM loss suit for item recommendation?'' and ``What are the conceptual advantages of SSM loss, as compared with the prevalent losses?'', to the best of our knowledge. In this work, we aim to offer a better understanding of SSM for item recommendation. Specifically, we first theoretically reveal three model-agnostic advantages: (1) mitigating popularity bias; (2) mining hard negative samples; and (3) maximizing the ranking metric. However, based on our empirical studies, we recognize that the default choice of cosine similarity function in SSM limits its ability in learning the magnitudes of representation vectors. As such, the combinations of SSM with the models that also fall short in adjusting magnitudes may result in poor representations. One step further, we provide mathematical proof that message passing schemes in graph convolution networks can adjust representation magnitude according to node degree, which naturally compensates for the shortcoming of SSM. Extensive experiments on four benchmark datasets justify our analyses, demonstrating the superiority of SSM for item recommendation. Our implementations are available in both TensorFlow and PyTorch.

Motivation & Objective

  • To investigate whether sampled softmax (SSM) loss is effective for item recommendation, despite its limited adoption in recommendation systems.
  • To theoretically analyze the model-agnostic advantages of SSM loss over conventional pointwise and pairwise losses.
  • To identify and address the limitation of SSM loss in adjusting representation vector magnitudes, especially in models like matrix factorization.
  • To demonstrate that graph neural networks (GNNs) with message passing can naturally compensate for this shortcoming.
  • To empirically validate the superiority of SSM loss across multiple benchmark datasets and model architectures.

Proposed method

  • Theoretical analysis proves that SSM loss mitigates popularity bias by encouraging uniform attention across items, including long-tail ones.
  • Theoretical analysis shows SSM loss inherently mines hard negative samples by focusing on the most confusing negatives during training.
  • Theoretical analysis establishes that SSM loss maximizes ranking metrics like NDCG and Recall by directly optimizing the probability of positive items over all others.
  • Mathematical proof is provided showing that message passing in GNNs adjusts representation magnitudes based on node degree, counterbalancing SSM's magnitude limitation.
  • Empirical evaluation is conducted on four benchmark datasets using both collaborative filtering and GNN-based models with SSM, BPR, and cross-entropy losses.
  • Implementation is released in both TensorFlow and PyTorch for reproducibility and community use.

Experimental results

Research questions

  • RQ1Does sampled softmax loss suit item recommendation, and what are its conceptual advantages over widely used losses like BPR and cross-entropy?
  • RQ2How does SSM loss affect popularity bias, and can it improve long-tail recommendation performance?
  • RQ3Why do some models fail when combined with SSM loss, and what is the root cause of this failure?
  • RQ4Can graph neural networks compensate for the magnitude adjustment deficiency of SSM loss?
  • RQ5Does the combination of SSM loss and GNNs lead to improved performance on standard recommendation benchmarks?

Key findings

  • SSM loss significantly reduces popularity bias, leading to better performance on long-tail items, as validated across all four benchmark datasets.
  • SSM loss inherently mines hard negative samples, providing more informative gradients that improve model generalization.
  • SSM loss directly optimizes ranking metrics such as NDCG and Recall@K, aligning better with real-world recommendation objectives than pointwise or pairwise losses.
  • The failure of SSM loss with models like matrix factorization is due to their inability to adjust representation vector magnitudes, which SSM cannot correct on its own.
  • Message passing in GNNs naturally adjusts representation magnitudes based on node degree, effectively compensating for SSM's limitation and enabling superior performance.
  • Empirical results show that SSM loss with GNNs outperforms BPR and cross-entropy baselines across all datasets and evaluation metrics, especially in top-K ranking performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.