Skip to main content

Self Contrastive Learning for Session-Based Recommendation

  • Conference paper
  • First Online:
Advances in Information Retrieval (ECIR 2024)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14608))

Included in the following conference series:

Abstract

Session-based recommendation, which aims to predict the next item of users’ interest as per an existing sequence interaction of items, has attracted growing applications of Contrastive Learning (CL) with improved user and item representations. However, these contrastive objectives: (1) serve a similar role as the cross-entropy loss while ignoring the item representation space optimisation; and (2) commonly require complicated modelling, including complex positive/negative sample constructions and extra data augmentation. In this work, we introduce Self-Contrastive Learning (SCL), which simplifies the application of CL and enhances the performance of state-of-the-art CL-based recommendation techniques. Specifically, SCL is formulated as an objective function that directly promotes a uniform distribution among item representations and efficiently replaces all the existing contrastive objective components of state-of-the-art models. Unlike previous works, SCL eliminates the need for any positive/negative sample construction or data augmentation, leading to enhanced interpretability of the item representation space and facilitating its extensibility to existing recommender systems. Through experiments on three benchmarks, we demonstrate that SCL consistently improves the performance of state-of-the-art models with statistical significance. Notably, our experiments show that SCL improves the performance of two best-performing models by 8.2% and 9.5% in P@10 (Precision) and 9.9% and 11.2% in MRR@10 (Mean Reciprocal Rank) on average across different benchmarks. Additionally, our analysis elucidates the improvement in terms of alignment and uniformity of representations, as well as the effectiveness of SCL with a low computational cost. Code is available at https://github.com/ZhengxiangShi/SelfContrastiveLearningRecSys.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Bae, S., Kim, S., Ko, J., Lee, G., Noh, S., Yun, S.Y.: Self-contrastive learning: single-viewed supervised contrastive framework using sub-network. Proc. AAAI Conf. Artif. Intell. 37(1), 197–205 (2023). https://doi.org/10.1609/aaai.v37i1.25091. https://ojs.aaai.org/index.php/AAAI/article/view/25091

  2. Bahdanau, D., Cho, K., Bengio, Y.: Neural machine translation by jointly learning to align and translate. In: Bengio, Y., LeCun, Y. (eds.) 3rd International Conference on Learning Representations, ICLR 2015, Conference Track Proceedings, San Diego, CA, USA, 7–9 May 2015 (2015). http://arxiv.org/abs/1409.0473

  3. Brost, B., Mehrotra, R., Jehan, T.: The music streaming sessions dataset. In: Liu, L., et al. (eds.) The World Wide Web Conference, WWW 2019, San Francisco, CA, USA, 13–17 May 2019, pp. 2594–2600. ACM, USA (2019). https://doi.org/10.1145/3308558.3313641

  4. Chung, J., Gülçehre, Ç., Cho, K., Bengio, Y.: Empirical evaluation of gated recurrent neural networks on sequence modeling. CoRR abs/1412.3555 (2014). http://arxiv.org/abs/1412.3555

  5. Fu, X., Lipani, A.: Priming and actions: an analysis in conversational search systems. In: Association for Computing Machinery, SIGIR 2023, July 2023. https://doi.org/10.1145/3539618.3592041

  6. Fu, X., Yilmaz, E., Lipani, A.: Evaluating the Cranfield paradigm for conversational search systems. In: Proceedings of the 2022 ACM SIGIR International Conference on Theory of Information Retrieval, ICTIR 2022, pp. 275–280. Association for Computing Machinery, New York (2022). https://doi.org/10.1145/3539813.3545126

  7. Gao, T., Yao, X., Chen, D.: SimCSE: simple contrastive learning of sentence embeddings. In: Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, Online and Punta Cana, Dominican Republic, pp. 6894–6910. Association for Computational Linguistics (2021). https://doi.org/10.18653/v1/2021.emnlp-main.552. https://aclanthology.org/2021.emnlp-main.552

  8. He, K., Fan, H., Wu, Y., Xie, S., Girshick, R.: Momentum contrast for unsupervised visual representation learning. In: 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020, pp. 9726–9735 (2020). https://doi.org/10.1109/CVPR42600.2020.00975

  9. Hendriksen, M., Kuiper, E., Nauts, P., Schelter, S., de Rijke, M.: Analyzing and predicting purchase intent in e-commerce: anonymous vs. identified customers. arXiv preprint arXiv:2012.08777 (2020)

  10. Hidasi, B., Karatzoglou, A., Baltrunas, L., Tikk, D.: Session-based recommendations with recurrent neural networks. In: Bengio, Y., LeCun, Y. (eds.) 4th International Conference on Learning Representations, ICLR 2016, San Juan, Puerto Rico, Conference Track Proceedings, 2–4 May 2016 (2016). http://arxiv.org/abs/1511.06939

  11. Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Comput. 9(8), 1735–1780 (1997)

    Article  Google Scholar 

  12. Jannach, D., Ludewig, M., Lerche, L.: Session-based item recommendation in e-commerce: on short-term intents, reminders, trends and discounts. User Model. User-Adap. Inter. 27(3), 351–392 (2017)

    Article  Google Scholar 

  13. Li, J., Ren, P., Chen, Z., Ren, Z., Lian, T., Ma, J.: Neural attentive session-based recommendation. In: Lim, E., et al. (eds.) Proceedings of the 2017 ACM on Conference on Information and Knowledge Management, CIKM 2017, Singapore, 06–10 November 2017, pp. 1419–1428. ACM, Singapore (2017). https://doi.org/10.1145/3132847.3132926

  14. Liu, Q., Zeng, Y., Mokhosi, R., Zhang, H.: STAMP: short-term attention/memory priority model for session-based recommendation. In: Guo, Y., Farooq, F. (eds.) Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, KDD 2018, London, UK, 19–23 August 2018, pp. 1831–1839. ACM, UK (2018). https://doi.org/10.1145/3219819.3219950

  15. Liu, Z., Chen, Y., Li, J., Yu, P.S., McAuley, J., Xiong, C.: Contrastive self-supervised sequential recommendation with robust augmentation. arXiv preprint arXiv:2108.06479 (2021)

  16. Ma, J., Zhou, C., Yang, H., Cui, P., Wang, X., Zhu, W.: Disentangled self-supervision in sequential recommenders. In: Gupta, R., Liu, Y., Tang, J., Prakash, B.A. (eds.) The 26th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, KDD 2020, Virtual Event, CA, USA, 23–27 August 2020, pp. 483–491. ACM (2020). https://dl.acm.org/doi/10.1145/3394486.3403091

  17. Nie, P., et al.: MIC: model-agnostic integrated cross-channel recommender. In: Proceedings of the 31st ACM International Conference on Information and Knowledge Management, CIKM 2022, pp. 3400–3409. Association for Computing Machinery, New York (2022). https://doi.org/10.1145/3511808.3557081

  18. van den Oord, A., Li, Y., Vinyals, O.: Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748 (2018)

  19. Qiu, R., Huang, Z., Yin, H., Wang, Z.: Contrastive learning for representation degeneration problem in sequential recommendation. In: Proceedings of the Fifteenth ACM International Conference on Web Search and Data Mining, WSDM 2022, pp. 813–823. Association for Computing Machinery, New York (2022). https://doi.org/10.1145/3488560.3498433

  20. Qiu, R., Li, J., Huang, Z., Yin, H.: Rethinking the item order in session-based recommendation with graph neural networks. In: Zhu, W., et al. (eds.) Proceedings of the 28th ACM International Conference on Information and Knowledge Management, CIKM 2019, Beijing, China, 3–7 November 2019, pp. 579–588. ACM, Beijing (2019). https://doi.org/10.1145/3357384.3358010

  21. Rendle, S., Freudenthaler, C., Schmidt-Thieme, L.: Factorizing personalized Markov chains for next-basket recommendation. In: Rappa, M., Jones, P., Freire, J., Chakrabarti, S. (eds.) Proceedings of the 19th International Conference on World Wide Web, WWW 2010, Raleigh, North Carolina, USA, 26–30 April 2010, pp. 811–820. ACM, USA (2010). https://doi.org/10.1145/1772690.1772773

  22. Shani, G., Heckerman, D., Brafman, R.I.: An MDP-based recommender system. J. Mach. Learn. Res. 6, 1265–1295 (2005)

    MathSciNet  Google Scholar 

  23. Shi, Z., Feng, Y., Lipani, A.: Learning to execute actions or ask clarification questions. In: Findings of the Association for Computational Linguistics, NAACL 2022, Seattle, United States, pp. 2060–2070. Association for Computational Linguistics (2022). https://doi.org/10.18653/v1/2022.findings-naacl.158. https://aclanthology.org/2022.findings-naacl.158

  24. Shi, Z., Lipani, A.: Don’t stop pretraining? Make prompt-based fine-tuning powerful learner. In: Thirty-seventh Conference on Neural Information Processing Systems. NeurIPS (2023). https://openreview.net/forum?id=s7xWeJQACI

  25. Shi, Z., Ni, P., Wang, M., Kim, T.E., Lipani, A.: Attention-based ingredient parser. In: European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning (ESANN), Bruges, Belgium (2022). https://doi.org/10.14428/esann/2022.ES2022-10

  26. Shi, Z., Ramos, J., Kim, T.E., Wang, X., Rahmani, H.A., Lipani, A.: When and what to ask through world states and text instructions: IGLU NLP challenge solution. In: Advances in Neural Information Processing Systems (NeurIPS), IGLU Workshop (2023). https://nips.cc/virtual/2022/66405

  27. Shi, Z., Tonolini, F., Aletras, N., Yilmaz, E., Kazai, G., Jiao, Y.: Rethinking semi-supervised learning with language models. In: Rogers, A., Boyd-Graber, J., Okazaki, N. (eds.) Findings of the Association for Computational Linguistics, ACL 2023, Toronto, Canada, July 2023, pp. 5614–5634. Association for Computational Linguistics (2023). https://doi.org/10.18653/v1/2023.findings-acl.347. https://aclanthology.org/2023.findings-acl.347

  28. Shi, Z., Zhang, Q., Lipani, A.: StepGame: a new benchmark for robust multi-hop spatial reasoning in texts. In: Proceedings of the AAAI Conference on Artificial Intelligence, June 2022, vol. 36, pp. 11321–11329 (2022). https://doi.org/10.1609/aaai.v36i10.21383. https://ojs.aaai.org/index.php/AAAI/article/view/21383

  29. Song, W., Xiao, Z., Wang, Y., Charlin, L., Zhang, M., Tang, J.: Session-based social recommendation via dynamic graph attention networks. In: Culpepper, J.S., Moffat, A., Bennett, P.N., Lerman, K. (eds.) Proceedings of the Twelfth ACM International Conference on Web Search and Data Mining, WSDM 2019, Melbourne, VIC, Australia, 11–15 February 2019, pp. 555–563. ACM (2019). https://doi.org/10.1145/3289600.3290989

  30. Sun, F., et al.: BERT4Rec: sequential recommendation with bidirectional encoder representations from transformer. In: Zhu, W., et al. (eds.) Proceedings of the 28th ACM International Conference on Information and Knowledge Management, CIKM 2019, Beijing, China, 3–7 November 2019, pp. 1441–1450. ACM, Beijing (2019). https://doi.org/10.1145/3357384.3357895

  31. Wang, L., Lim, E.P., Liu, Z., Zhao, T.: Explanation guided contrastive learning for sequential recommendation. In: Proceedings of the 31st ACM International Conference on Information and Knowledge Management, CIKM 2022, pp. 2017–2027. Association for Computing Machinery, New York (2022). https://doi.org/10.1145/3511808.3557317

  32. Wang, T., Isola, P.: Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In: Proceedings of the 37th International Conference on Machine Learning, ICML 2020, Virtual Event, 13–18 July 2020, vol. 119, pp. 9929–9939. Proceedings of Machine Learning Research (PMLR) (2020). http://proceedings.mlr.press/v119/wang20k.html

  33. Wang, W., et al.: Beyond clicks: modeling multi-relational item graph for session-based target behavior prediction. In: Huang, Y., King, I., Liu, T., van Steen, M. (eds.) The Web Conference 2020, WWW 2020, Taipei, Taiwan, 20–24 April 2020, pp. 3056–3062. ACM/IW3C2, Taiwan (2020). https://doi.org/10.1145/3366423.3380077

  34. Wang, Z., Wei, W., Cong, G., Li, X., Mao, X., Qiu, M.: Global context enhanced graph neural networks for session-based recommendation. In: Huang, J., et al. (eds.) Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2020, Virtual Event, China, 25–30 July 2020, pp. 169–178. ACM (2020). https://doi.org/10.1145/3397271.3401142

  35. Wei, Y., et al.: Contrastive learning for cold-start recommendation. In: Proceedings of the 29th ACM International Conference on Multimedia, MM 2021, pp. 5382–5390. Association for Computing Machinery, New York (2021). https://doi.org/10.1145/3474085.3475665

  36. Wu, S., Tang, Y., Zhu, Y., Wang, L., Xie, X., Tan, T.: Session-based recommendation with graph neural networks. In: The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, 27 January–1 February 2019, pp. 346–353. AAAI Press (2019). https://doi.org/10.1609/aaai.v33i01.3301346

  37. Xia, X., Yin, H., Yu, J., Shao, Y., Cui, L.: Self-supervised graph co-training for session-based recommendation. In: Proceedings of the 30th ACM International Conference on Information and Knowledge Management, Virtual Event, Queensland, Australia, pp. 2180–2190. ACM (2021). https://doi.org/10.1145/3459637.3482388. https://dl.acm.org/doi/10.1145/3459637.3482388

  38. Xia, X., Yin, H., Yu, J., Wang, Q., Cui, L., Zhang, X.: Self-supervised hypergraph convolutional networks for session-based recommendation. In: Proceedings of the AAAI Conference on Artificial Intelligence, Virtual, vol. 35, pp. 4503–4511. AAAI (2021). https://doi.org/10.1609/aaai.v35i5.16578. https://ojs.aaai.org/index.php/AAAI/article/view/16578

  39. Xie, R., Qiu, Z., Zhang, B., Lin, L.: Multi-granularity item-based contrastive recommendation. arXiv preprint arXiv:2207.01387 (2022)

  40. Xie, X., Sun, F., Liu, Z., Gao, J., Ding, B., Cui, B.: Contrastive pre-training for sequential recommendation. arXiv preprint arXiv:2010.14395 (2020)

  41. Xie, X., et al.: Contrastive learning for sequential recommendation. In: 2022 IEEE 38th International Conference on Data Engineering (ICDE), virtual, pp. 1259–1273. IEEE (2022). https://ieeexplore.ieee.org/abstract/document/9835621

  42. Xu, C., et al.: Graph contextualized self-attention network for session-based recommendation. In: Kraus, S. (ed.) Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, 10–16 August 2019, pp. 3940–3946. ijcai.org (2019). https://doi.org/10.24963/ijcai.2019/547

  43. Yao, T., et al.: Self-supervised learning for deep models in recommendations. arXiv e-prints pp. arXiv-2007 (2020)

    Google Scholar 

  44. Yin, H., Cui, B.: Spatio-Temporal Recommendation in Social Media. SCS, Springer, Singapore (2016). https://doi.org/10.1007/978-981-10-0748-4

    Book  Google Scholar 

  45. Yu, J., Yin, H., Gao, M., Xia, X., Zhang, X., Hung, N.Q.V.: Socially-aware self-supervised tri-training for recommendation. arXiv preprint arXiv:2106.03569 (2021)

  46. Yu, J., Yin, H., Li, J., Wang, Q., Hung, N.Q.V., Zhang, X.: Self-supervised multi-channel hypergraph convolutional network for social recommendation. arXiv preprint arXiv:2101.06448 (2021)

  47. Yu, J., et al.: Are graph augmentations necessary? Simple graph contrastive learning for recommendation. In: Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2022, pp. 1294–1303. Association for Computing Machinery, New York (2022). https://doi.org/10.1145/3477495.3531937

  48. Zhang, Y., et al.: Sequential click prediction for sponsored search with recurrent neural networks. In: Brodley, C.E., Stone, P. (eds.) Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence, 27–31 July 2014, Québec City, Québec, Canada, pp. 1369–1375. AAAI Press (2014). http://www.aaai.org/ocs/index.php/AAAI/AAAI14/paper/view/8529

  49. Zhou, K., et al.: S3-Rec: self-supervised learning for sequential recommendation with mutual information maximization. In: d’Aquin, M., Dietze, S., Hauff, C., Curry, E., Cudré-Mauroux, P. (eds.) The 29th ACM International Conference on Information and Knowledge Management, CIKM 2020, Virtual Event, Ireland, 19–23 October 2020, pp. 1893–1902. ACM (2020). https://doi.org/10.1145/3340531.3411954

  50. Zhou, X., Sun, A., Liu, Y., Zhang, J., Miao, C.: SelfCF: a simple framework for self-supervised collaborative filtering. ACM Trans. Recomm. Syst. 1, 1–25 (2023). https://doi.org/10.1145/3591469

  51. Zimdars, A., Chickering, D.M., Meek, C.: Using temporal data for making recommendations. arXiv preprint arXiv:1301.2320 (2013)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Zhengxiang Shi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Shi, Z., Wang, X., Lipani, A. (2024). Self Contrastive Learning for Session-Based Recommendation. In: Goharian, N., et al. Advances in Information Retrieval. ECIR 2024. Lecture Notes in Computer Science, vol 14608. Springer, Cham. https://doi.org/10.1007/978-3-031-56027-9_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-56027-9_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-56026-2

  • Online ISBN: 978-3-031-56027-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics