A Theoretical Analysis of Recommendation Loss Functions under Negative Sampling

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Di Teodoro, Giulia, Siciliano, Federico, Tonellotto, Nicola, Silvestri, Fabrizio
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866912336206364672
author Di Teodoro, Giulia
Siciliano, Federico
Tonellotto, Nicola
Silvestri, Fabrizio
author_facet Di Teodoro, Giulia
Siciliano, Federico
Tonellotto, Nicola
Silvestri, Fabrizio
contents Loss functions like Categorical Cross Entropy (CCE), Binary Cross Entropy (BCE), and Bayesian Personalized Ranking (BPR) are commonly used in training Recommender Systems (RSs) to differentiate positive items - those interacted with by users - and negative items. While prior works empirically showed that CCE outperforms BCE and BPR when using the full set of negative items, we provide a theoretical explanation for this by proving that CCE offers the tightest lower bound on ranking metrics like Normalized Discounted Cumulative Gain (NDCG) and Mean Reciprocal Rank (MRR), followed by BPR and BCE. However, using the full set of negative items is computationally infeasible for large-scale RSs, prompting the use of negative sampling techniques. Under negative sampling, we reveal that BPR and CCE are equivalent when a single negative sample is drawn, and all three losses converge to the same global minimum. We further demonstrate that the sampled losses remain lower bounds for NDCG (MRR), albeit in a probabilistic sense. Our worst-case analysis shows that BCE offers the strongest bound on NDCG (MRR). Experiments on five datasets and four models empirically support these theoretical findings. Our code and supplementary material are available at https://github.com/federicosiciliano/recsys_losses.git.
format Preprint
id arxiv_https___arxiv_org_abs_2411_07770
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle A Theoretical Analysis of Recommendation Loss Functions under Negative Sampling
Di Teodoro, Giulia
Siciliano, Federico
Tonellotto, Nicola
Silvestri, Fabrizio
Information Retrieval
Loss functions like Categorical Cross Entropy (CCE), Binary Cross Entropy (BCE), and Bayesian Personalized Ranking (BPR) are commonly used in training Recommender Systems (RSs) to differentiate positive items - those interacted with by users - and negative items. While prior works empirically showed that CCE outperforms BCE and BPR when using the full set of negative items, we provide a theoretical explanation for this by proving that CCE offers the tightest lower bound on ranking metrics like Normalized Discounted Cumulative Gain (NDCG) and Mean Reciprocal Rank (MRR), followed by BPR and BCE. However, using the full set of negative items is computationally infeasible for large-scale RSs, prompting the use of negative sampling techniques. Under negative sampling, we reveal that BPR and CCE are equivalent when a single negative sample is drawn, and all three losses converge to the same global minimum. We further demonstrate that the sampled losses remain lower bounds for NDCG (MRR), albeit in a probabilistic sense. Our worst-case analysis shows that BCE offers the strongest bound on NDCG (MRR). Experiments on five datasets and four models empirically support these theoretical findings. Our code and supplementary material are available at https://github.com/federicosiciliano/recsys_losses.git.
title A Theoretical Analysis of Recommendation Loss Functions under Negative Sampling
topic Information Retrieval
url https://arxiv.org/abs/2411.07770