Dual-Tower Counterfactual Session-Aware Recommender System
Abstract
:1. Introduction
2. Related Work
2.1. Session-Aware Recommender Systems
2.2. Counterfactual Learning for Recommender Systems
3. Method
3.1. Problem Statement
3.2. Overview of the Proposed Framework
- (1)
- Counterfactual Interactions Matching: Initially, for each session in the training set, we generate a corresponding counterfactual session utilizing the nearest neighbor matching to enhance the training data.
- (2)
- Self-supervised-based Dual-Tower Counterfactual Learning: This stage employs the idea of data augmentation to train the model, which involves using the original sessions (known as factual sessions) from the training set along with counterfactual sessions generated through the Counterfactual Interactions Matching step. The recommendation model being trained utilizes an attention-based architecture and features a dual-tower structure. This dual-tower approach encourages parallel learning of both factual and counterfactual sessions, promoting the model to discern causal relationships by contrasting the different static long-term preferences between factual and counterfactual sessions. Specifically, one tower targets the prediction of the next item in the factual session, while the other tower focuses on the next item in the counterfactual session. Multi-task learning strategies are applied to assimilate the counterfactual insights from both factual and counterfactual sessions. To further motivate the model to learn the different static long-term preferences and their causal effects on next-item selection, our paper proposes a novel training objective function based on self-supervised learning. The main concept is to control dynamic short-term preferences and the causal relationship between these preferences and the next-item decision. Under these conditions, distinct static long-term preferences of factual and counterfactual sessions lead to varied choices of the next item.
- (3)
- Intervention-based Counterfactual Recommendation: The DTC model integrates ideas from collaborative filtering and counterfactual inference to predict the next item in a target session. Conventionally, collaborative filtering techniques would first identify a small quantity of neighbor sessions, or similar sessions, within the dataset that are akin to the target session. The items from these neighbor sessions are then predicted as the potential next items for the target session. The challenge with this approach, however, lies in its heavy reliance on the computation method for session similarity. Since SARSs must consider finding similar sessions with comparable dynamic short-term and static long-term preferences, the task becomes challenging, often resulting in the retrieval of noisy data or similar sessions laden with disproportionately popular items. Building on this, our research introduces an Intervention-based Counterfactual Recommendation method founded on the principles of counterfactual inference. Specifically, for a similar session derived from the dataset for the target session s, we employ counterfactual inference to hypothesize: what would be the next item for if the static long-term preference was the same as that of the user corresponding to s. This counterfactual inference-based next-item prediction is anticipated to closely align with the actual next item in the target session s, compared to direct predictions based on and its associated user’s long-term preference.
3.3. Counterfactual Interactions Matching
3.4. Self-Supervised-Based Dual-Tower Counterfactual Learning
3.5. Intervention-Based Counterfactual Recommendation
4. Experiments
4.1. Experimental Settings
- SKNN: This straightforward model introduces a collaborative angle to the context of sessions, homing in on items from sessions that share similarities with the active session, much like comparing neighborhoods to find the best result [37].
- GRU4Rec: Unpacking the sequence of choices a user makes, GRU4Rec brings into use gated recurrent units within an RNN to capture the patterns of a user’s evolving interests during a session [13].
- STAMP: STAMP employs an innovative memory-based neural network enhanced with attention mechanisms to pinpoint precise user desires at a given moment, using this focus to guide the next-item recommendation [38].
- CSRM: A memory-neural-network-based SBRS that uses attention networks to learn session similarities and make recommendations based on neighbor sessions and their similarities [39].
- SRGNN: A graph-neural-network-based SBRS that represents sessions as graphs and employs a graph neural network to recommend items based on item transition patterns extracted from the graph [23].
- HGRU: HGRU employs a hierarchical RNN where one RNN models sequential patterns in the session context, and the other RNN learns a user’s preferences across their sessions [24].
- II-RNN: II-RNN utilizes information from the most recent session to complement and initialize the RNN modeling the target session [25].
- SASRec: SASRec is a self-attention-based sequential RS designed to model users’ interaction sequences. In this work, we concatenate all interactions of each user to form user sequences [40].
- BERT4Rec: BERT4Rec is a deep bidirectional self-attention-based sequential RS model. BERT4Rec adopts the Cloze objective and predicts an item based on its context and the user’s historical interactions [41].
- INSERT: INSERT is an SBRS that considers both users’ static long-term preferences and short-term preference in sessions. It is designed for next-item recommendations in short sessions based on few-shot learning and meta-learning [10].
- COCO: COCO is a state-of-the-art SARS and utilizes counterfactual learning to learn representations of inner-session causes and outer-session causes for better recommendation performance [5].
- Last.fm (Last.fm and Delicious are from https://grouplens.org/datasets/hetrec-2011/, accessed on 1 May 2024.) used in [3] contains logs of users’ music listening behaviors in the Last.fm online music service.
- Delicious is a dataset that contains user tagging records in a social-network-based bookmarking system named Delicious.
4.2. Recommendation Performance Evaluation
4.3. Ablation Study
4.4. Recommendation Performance on Sessions with Different Lengths
4.5. Hyper-Parameters Sensitivity Test
5. Discussion
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Wang, S.; Cao, L.; Wang, Y.; Sheng, Q.Z.; Orgun, M.A.; Lian, D. A survey on session-based recommender systems. ACM Comput. Surv. (CSUR) 2021, 54, 1–38. [Google Scholar] [CrossRef]
- Wang, S.; Zhang, Q.; Hu, L.; Zhang, X.; Wang, Y.; Aggarwal, C. Sequential/Session-based Recommendations: Challenges, Approaches, Applications and Opportunities. In Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval, Madrid, Spain, 11–15 July 2022; pp. 3425–3428. [Google Scholar]
- Latifi, S.; Mauro, N.; Jannach, D. Session-aware recommendation: A surprising quest for the state-of-the-art. Inf. Sci. 2021, 573, 291–315. [Google Scholar] [CrossRef]
- Ying, H.; Zhuang, F.; Zhang, F.; Liu, Y.; Xu, G.; Xie, X.; Xiong, H.; Wu, J. Sequential recommender system based on hierarchical attention network. In Proceedings of the IJCAI International Joint Conference on Artificial Intelligence, Stockholm, Sweden, 13–19 July 2018. [Google Scholar]
- Song, W.; Wang, S.; Wang, Y.; Liu, K.; Liu, X.; Yin, M. A Counterfactual Collaborative Session-based Recommender System. In Proceedings of the WWW ’23: ACM Web Conference 2023, Austin, TX, USA, 30 April–4 May 2023; pp. 971–982. [Google Scholar] [CrossRef]
- Chen, J.; Dong, H.; Wang, X.; Feng, F.; Wang, M.; He, X. Bias and debias in recommender system: A survey and future directions. ACM Trans. Inf. Syst. 2023, 41, 1–39. [Google Scholar] [CrossRef]
- Glymour, M.; Pearl, J.; Jewell, N.P. Causal Inference in Statistics: A Primer; John Wiley & Sons: New York, NY, USA, 2016. [Google Scholar]
- Zhao, T.; Liu, G.; Wang, D.; Yu, W.; Jiang, M. Learning from counterfactual links for link prediction. In Proceedings of the International Conference on Machine Learning, PMLR, Baltimore, MD, USA, 17–23 July 2022; pp. 26911–26926. [Google Scholar]
- Johansson, F.; Shalit, U.; Sontag, D. Learning representations for counterfactual inference. In Proceedings of the International Conference on Machine Learning, PMLR, New York, NY, USA, 20–22 June 2016; pp. 3020–3029. [Google Scholar]
- Song, W.; Wang, S.; Wang, Y.; Wang, S. Next-item recommendations in short sessions. In Proceedings of the 15th ACM Conference on Recommender Systems, Amsterdam, The Netherlands, 27 September–1 October 2021; pp. 282–291. [Google Scholar]
- Le, D.T.; Fang, Y.; Lauw, H.W. Modeling sequential preferences with dynamic user and context factors. In Proceedings of the Joint European Conference on Machine Learning and Knowledge Discovery in Databases, Riva del Garda, Italy, 19–23 September 2016; pp. 145–161. [Google Scholar]
- Rendle, S.; Freudenthaler, C.; Schmidt-Thieme, L. Factorizing personalized markov chains for next-basket recommendation. In Proceedings of the 19th International Conference on World Wide Web, Raleigh, NC, USA, 26–30 April 2010; pp. 811–820. [Google Scholar]
- Hidasi, B.; Karatzoglou, A.; Baltrunas, L.; Tikk, D. Session-based recommendations with recurrent neural networks. In Proceedings of the 4th International Conference on Learning Representations, San Juan, PR, USA, 2–4 May 2016; pp. 1–10. [Google Scholar]
- Hidasi, B.; Karatzoglou, A. Recurrent neural networks with top-k gains for session-based recommendations. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management, Turin, Italy, 22–26 October 2018; pp. 843–852. [Google Scholar]
- Wu, C.Y.; Ahmed, A.; Beutel, A.; Smola, A.J.; Jing, H. Recurrent recommender networks. In Proceedings of the 10th ACM International Conference on Web Search and Data Mining, Cambridge, UK, 6–10 February 2017; pp. 495–503. [Google Scholar]
- Cheng, C.; Yang, H.; Lyu, M.R.; King, I. Where you like to go next: Successive point-of-interest recommendation. In Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence, Beijing, China, 3–9 August 2013. [Google Scholar]
- Liu, X.; Liu, Y.; Aberer, K.; Miao, C. Personalized point-of-interest recommendation by mining users’ preference transition. In Proceedings of the 22nd ACM International Conference on Information & Knowledge Management, San Francisco, CA, USA, 27 October–1 November 2013; pp. 733–738. [Google Scholar]
- Song, W.; Chen, H.; Liu, X.; Jiang, H.; Wang, S. Hyperbolic node embedding for signed networks. Neurocomputing 2021, 421, 329–339. [Google Scholar] [CrossRef]
- Song, W.; Wang, S.; Yang, B.; Lu, Y.; Zhao, X.; Liu, X. Learning node and edge embeddings for signed networks. Neurocomputing 2018, 319, 42–54. [Google Scholar] [CrossRef]
- Chen, W.; Cai, F.; Chen, H.; de Rijke, M. A dynamic co-attention network for session-based recommendation. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, Beijing, China, 3–7 November 2019; pp. 1461–1470. [Google Scholar]
- Wang, S.; Xu, X.; Zhang, X.; Wang, Y.; Song, W. Veracity-aware and event-driven personalized news recommendation for fake news mitigation. In Proceedings of the ACM Web Conference 2022, Lyon, France, 25–29 April 2022; pp. 3673–3684. [Google Scholar]
- Qiu, R.; Li, J.; Huang, Z.; Yin, H. Rethinking the item order in session-based recommendation with graph neural networks. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, Beijing, China, 3–7 November 2019; pp. 579–588. [Google Scholar]
- Wu, S.; Tang, Y.; Zhu, Y.; Wang, L.; Xie, X.; Tan, T. Session-based recommendation with graph neural networks. In Proceedings of the AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 29–31 January 2019; Volume 33, pp. 346–353. [Google Scholar]
- Quadrana, M.; Karatzoglou, A.; Hidasi, B.; Cremonesi, P. Personalizing session-based recommendations with hierarchical recurrent neural networks. In Proceedings of the 11th ACM Conference on Recommender Systems, Como, Italy, 27–31 August 2017; pp. 130–137. [Google Scholar]
- Ruocco, M.; Skrede, O.S.L.; Langseth, H. Inter-session modeling for session-based recommendation. In Proceedings of the 2nd Workshop on Deep Learning for Recommender Systems, Como, Italy, 27 August 2017; pp. 24–31. [Google Scholar]
- Guo, Z.; Xiao, T.; Wu, Z.; Aggarwal, C.; Liu, H.; Wang, S. Counterfactual learning on graphs: A survey. arXiv 2023, arXiv:2304.01391. [Google Scholar]
- Gao, C.; Zheng, Y.; Wang, W.; Feng, F.; He, X.; Li, Y. Causal inference in recommender systems: A survey and future directions. ACM Trans. Inf. Syst. 2024, 42, 1–32. [Google Scholar] [CrossRef]
- Wei, T.; Feng, F.; Chen, J.; Wu, Z.; Yi, J.; He, X. Model-agnostic counterfactual reasoning for eliminating popularity bias in recommender system. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, Singapore, 14–18 August 2021; pp. 1791–1800. [Google Scholar]
- Wang, W.; Feng, F.; He, X.; Zhang, H.; Chua, T.S. Clicks can be cheating: Counterfactual recommendation for mitigating clickbait issue. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, Virtual Event, 11–15 July 2021; pp. 1288–1297. [Google Scholar]
- Zhang, S.; Yao, D.; Zhao, Z.; Chua, T.S.; Wu, F. Causerec: Counterfactual user sequence synthesis for sequential recommendation. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, Virtual Event, 11–15 July 2021; pp. 367–377. [Google Scholar]
- Wang, Z.; Zhang, J.; Xu, H.; Chen, X.; Zhang, Y.; Zhao, W.X.; Wen, J.R. Counterfactual data-augmented sequential recommendation. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, Virtual Event, 11–15 July 2021; pp. 347–356. [Google Scholar]
- Xiong, K.; Ye, W.; Chen, X.; Zhang, Y.; Zhao, W.X.; Hu, B.; Zhang, Z.; Zhou, J. Counterfactual review-based recommendation. In Proceedings of the 30th ACM International Conference on Information & Knowledge Management, Virtual Event, 1–5 November 2021; pp. 2231–2240. [Google Scholar]
- Mu, S.; Li, Y.; Zhao, W.X.; Wang, J.; Ding, B.; Wen, J.R. Alleviating spurious correlations in knowledge-aware recommendations through counterfactual generator. In Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval, Madrid, Spain, 11–15 July 2022; pp. 1401–1411. [Google Scholar]
- Tan, J.; Xu, S.; Ge, Y.; Li, Y.; Chen, X.; Zhang, Y. Counterfactual explainable recommendation. In Proceedings of the 30th ACM International Conference on Information & Knowledge Management, Virtual Event, 1–5 November 2021; pp. 1784–1793. [Google Scholar]
- Li, Y.; Chen, H.; Xu, S.; Ge, Y.; Zhang, Y. Towards personalized fairness based on causal notion. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, Virtual Event, 11–15 July 2021; pp. 1054–1063. [Google Scholar]
- Jannach, D.; Ludewig, M.; Lerche, L. Session-based item recommendation in e-commerce: On short-term intents, reminders, trends and discounts. User Model. User-Adapt. Interact. 2017, 27, 351–392. [Google Scholar] [CrossRef]
- Ludewig, M.; Jannach, D. Evaluation of session-based recommendation algorithms. User Model. User-Adapt. Interact. 2018, 28, 331–390. [Google Scholar] [CrossRef]
- Liu, Q.; Zeng, Y.; Mokhosi, R.; Zhang, H. STAMP: Short-term attention/memory priority model for session-based recommendation. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, London, UK, 19–23 August 2018; pp. 1831–1839. [Google Scholar]
- Wang, M.; Ren, P.; Mei, L.; Chen, Z.; Ma, J.; de Rijke, M. A collaborative session-based recommendation approach with parallel memory modules. In Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, Paris, France, 21–25 July 2019; pp. 345–354. [Google Scholar]
- Kang, W.C.; McAuley, J. Self-attentive sequential recommendation. In Proceedings of the 2018 IEEE International Conference on Data Mining (ICDM), Singapore, 17–20 November 2018; pp. 197–206. [Google Scholar]
- Sun, F.; Liu, J.; Wu, J.; Pei, C.; Lin, X.; Ou, W.; Jiang, P. BERT4Rec: Sequential recommendation with bidirectional encoder representations from transformer. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, Beijing, China, 3–7 November 2019; pp. 1441–1450. [Google Scholar]
Last.fm | Delicious | |
---|---|---|
#sessions | 5915 | 45,772 |
#interactions | 38,367 | 249,919 |
#users | 1101 | 1752 |
#items | 711 | 5047 |
#interactions per user | 34.85 | 142.65 |
#interactions per session | 6.49 | 5.46 |
#sessions per user | 5.37 | 26.13 |
Last.fm | Delicious | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
R@5 | N@5 | M@5 | R@20 | N@20 | M@20 | R@5 | N@5 | M@5 | R@20 | N@20 | M@20 | |
SKNN | 0.235 | 0.116 | 0.077 | 0.536 | 0.202 | 0.107 | 0.111 | 0.055 | 0.037 | 0.293 | 0.107 | 0.055 |
GRU4Rec | 0.331 | 0.238 | 0.207 | 0.542 | 0.298 | 0.228 | 0.234 | 0.172 | 0.151 | 0.390 | 0.216 | 0.167 |
STAMP | 0.269 | 0.190 | 0.164 | 0.500 | 0.256 | 0.187 | 0.150 | 0.104 | 0.089 | 0.294 | 0.105 | 0.103 |
CSRM | 0.342 | 0.250 | 0.220 | 0.562 | 0.312 | 0.241 | 0.197 | 0.144 | 0.126 | 0.346 | 0.186 | 0.141 |
SR-GNN | 0.265 | 0.186 | 0.160 | 0.477 | 0.246 | 0.181 | 0.205 | 0.149 | 0.130 | 0.354 | 0.191 | 0.145 |
HGRU | 0.340 | 0.242 | 0.209 | 0.576 | 0.309 | 0.233 | 0.218 | 0.160 | 0.141 | 0.377 | 0.205 | 0.156 |
II-RNN | 0.359 | 0.259 | 0.223 | 0.586 | 0.323 | 0.248 | 0.257 | 0.189 | 0.166 | 0.424 | 0.236 | 0.183 |
SASRec | 0.346 | 0.206 | 0.141 | 0.651 | 0.201 | 0.178 | 0.193 | 0.130 | 0.071 | 0.385 | 0.184 | 0.093 |
BERT4Rec | 0.304 | 0.182 | 0.142 | 0.622 | 0.273 | 0.174 | 0.207 | 0.101 | 0.084 | 0.369 | 0.186 | 0.100 |
INSERT | 0.364 | 0.258 | 0.224 | 0.589 | 0.323 | 0.246 | 0.264 | 0.196 | 0.174 | 0.436 | 0.245 | 0.191 |
COCO | 0.504 | 0.289 | 0.205 | 0.793 | 0.374 | 0.238 | 0.359 | 0.215 | 0.163 | 0.520 | 0.263 | 0.180 |
DTC | 0.519 * | 0.298 * | 0.224 | 0.814 * | 0.385 * | 0.256 * | 0.385 * | 0.229 * | 0.177 * | 0.564 * | 0.282 * | 0.196 * |
Dataset | Variant | R@5 | N@5 | R@20 | N@20 |
---|---|---|---|---|---|
Last.fm | DTC w/o CF | 0.325 | 0.201 | 0.643 | 0.292 |
DTC w/o DT | 0.504 | 0.289 | 0.793 | 0.374 | |
DTC w/o SSL | 0.510 | 0.295 | 0.809 | 0.382 | |
DTC | 0.519 | 0.298 | 0.814 | 0.385 | |
Delicious | DTC w/o CF | 0.214 | 0.137 | 0.397 | 0.190 |
DTC w/o DT | 0.359 | 0.215 | 0.520 | 0.263 | |
DTC w/o SSL | 0.333 | 0.206 | 0.523 | 0.262 | |
DTC | 0.385 | 0.229 | 0.564 | 0.282 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Song, W.; Xing, X. Dual-Tower Counterfactual Session-Aware Recommender System. Entropy 2024, 26, 516. https://doi.org/10.3390/e26060516
Song W, Xing X. Dual-Tower Counterfactual Session-Aware Recommender System. Entropy. 2024; 26(6):516. https://doi.org/10.3390/e26060516
Chicago/Turabian StyleSong, Wenzhuo, and Xiaoyu Xing. 2024. "Dual-Tower Counterfactual Session-Aware Recommender System" Entropy 26, no. 6: 516. https://doi.org/10.3390/e26060516
APA StyleSong, W., & Xing, X. (2024). Dual-Tower Counterfactual Session-Aware Recommender System. Entropy, 26(6), 516. https://doi.org/10.3390/e26060516