Proceedings

gSASRec: Reducing Overconfidence in Sequential Recommendation Trained with Negative Sampling (Extended Abstract)

Download BibTeX Cite

Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence. Sister Conferences Best Papers. Pages 8447-8449.

https://doi.org/10.24963/ijcai.2024/939

Abstract

Sequential recommendation models predict the next item in a sequence of user-item interactions, akin to how language models predict the next tokens. These models often adapt language model architectures, treating item IDs as if they were token IDs. However, the number of potential items in recommender systems makes calculating the interaction probability for all items impractical during training; therefore, recommender systems frequently employ negative sampling, where the model learns to differentiate between actual user interactions (positives) and randomly chosen non-interactions (negatives), often using Binary Cross-Entropy (BCE) the loss, framing the problem as a binary classification task.

We demonstrate that using negative sampling with BCE can lead to overconfidence, where the model's predicted probabilities for user interactions are higher than the actual probabilities. Although the actual score magnitude is not important for ranking items (only the order of scores matters), overconfidence leads to training instability when using Binary Cross-Entropy (BCE) loss. We show that overconfidence explains the performance gap between two leading sequential recommendation models, SASRec and BERT4Rec -- the former uses negative sampling, while the latter does not. To counter overconfidence, we introduce Generalised Binary Cross-Entropy (gBCE) loss and the gSASRec model that utilises gBCE. We mathematically prove and empirically validate that gSASRec effectively addresses the issue of overconfidence. Consequently, gSASRec's effectiveness is better than that of SASRec and matches the state of the BERT4Rec while retaining negative sampling. On the Gowalla dataset with more than 1MM items, where training BERT4Rec is infeasible, gSASRec outperforms the original SASRec model by 41% in terms of NDCG@10.

  1. [Cho et al., 2011] Eunjoon Cho, Seth A. Myers, and Jure Leskovec. Friendship and mobility: User movement in location-based social networks. In Proc. KDD, page 1082, 2011.
  2. [Devlin et al., 2019] Jacob Devlin, Ming-Wei Chang, Ken- ton Lee, and Kristina Toutanova. BERT: Pre-training of Deep Bidirectional Transformers for Language Under- standing. In Proc. of NAACL-HLT, pages 4171-4186, 2019.
  3. [Harper and Konstan, 2015] F. Maxwell Harper and Joseph A. Konstan. The MovieLens Datasets: His- tory and Context. ACM Transactions on Interactive Intelligent Systems (TiiS), 5(4):19:1-19:19, December 2015.
  4. [Kang and McAuley, 2018] Wang-Cheng Kang and Julian McAuley. Self-Attentive Sequential Recommendation. In Proc. ICDM, pages 197-206, November 2018.
  5. [Petrov and Macdonald, 2022] Aleksandr Petrov and Craig Macdonald. A Systematic Review and Replicability Study of BERT4Rec for Sequential Recommendation. In Proc. RecSys, pages 436-447, 2022.
  6. [Petrov and Macdonald, 2023] Aleksandr Vladimirovich Petrov and Craig Macdonald. gSASRec: Reducing Overconfidence in Sequential Recommendation Trained with Negative Sampling. In Proc. RecSys, pages 116-128, 2023.
  7. [Petrov et al., 2024] Aleksandr V. Petrov, Sean MacAvaney, and Craig Macdonald. Shallow Cross-Encoders for Low- Latency Retrieval. In Proc. ECIR, 2024.
  8. [Schedl, 2016] Markus Schedl. The LFM-1b Dataset for Music Retrieval and Recommendation. In Proc. ICMR, ICMR '16, pages 103-110, New York, NY, USA, June 2016. Association for Computing Machinery.
  9. [Sun et al., 2019] Fei Sun, Jun Liu, Jian Wu, Changhua Pei, Xiao Lin, Wenwu Ou, and Peng Jiang. BERT4Rec: Sequential Recommendation with Bidirectional Encoder Representations from Transformer. In Proc. CIKM, pages 1441-1450, November 2019.
  10. [Vaswani et al., 2017] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is All you Need. In Proc. NeurIPS, 2017.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards