{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/sequential-recommendation-with-latent","title":"Sequential Recommendation with Latent Relations based on Large Language Model","arxiv_id":"2403.18348","date":"2024-03-27","proceeding":null,"authors":["Shenghao Yang","Weizhi Ma","Peijie Sun","Qingyao Ai","Yiqun Liu","Mingchen Cai","Min Zhang"],"abstract":"Sequential recommender systems predict items that may interest users by modeling their preferences based on historical interactions. Traditional sequential recommendation methods rely on capturing implicit collaborative filtering signals among items. Recent relation-aware sequential recommendation models have achieved promising performance by explicitly incorporating item relations into the modeling of user historical sequences, where most relations are extracted from knowledge graphs. However, existing methods rely on manually predefined relations and suffer the sparsity issue, limiting the generalization ability in diverse scenarios with varied item relations. In this paper, we propose a novel relation-aware sequential recommendation framework with Latent Relation Discovery (LRD). Different from previous relation-aware models that rely on predefined rules, we propose to leverage the Large Language Model (LLM) to provide new types of relations and connections between items. The motivation is that LLM contains abundant world knowledge, which can be adopted to mine latent relations of items for recommendation. Specifically, inspired by that humans can describe relations between items using natural language, LRD harnesses the LLM that has demonstrated human-like knowledge to obtain language knowledge representations of items. These representations are fed into a latent relation discovery module based on the discrete state variational autoencoder (DVAE). Then the self-supervised relation discovery tasks and recommendation tasks are jointly optimized. Experimental results on multiple public datasets demonstrate our proposed latent relations discovery method can be incorporated with existing relation-aware sequential recommendation models and significantly improve the performance. Further analysis experiments indicate the effectiveness and reliability of the discovered latent relations.","url_abs":"https://arxiv.org/abs/2403.18348v1","url_pdf":"https://arxiv.org/pdf/2403.18348v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"sequential-recommendation-with-latent","repo_url":"https://github.com/ysh-1998/lrd","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"collaborative-filtering","task_name":"Collaborative Filtering"},{"task_slug":"knowledge-graphs","task_name":"Knowledge Graphs"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"recommendation-systems","task_name":"Recommendation Systems"},{"task_slug":null,"task_name":"Relation"},{"task_slug":"sequential-recommendation","task_name":"Sequential Recommendation"},{"task_slug":"world-knowledge","task_name":"World Knowledge"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.18348","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.18348"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ysh-1998/lrd","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":4,"unverified":1},"by_repo_kind":{"official":{"samples":5,"ran":4,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"0417e9a61df6d66c","entry":"batch_to_gpu","repo":"ysh-1998/lrd","repo_kind":"official","path":"src/utils/utils.py","file_url":"https://github.com/ysh-1998/lrd/blob/HEAD/src/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0417e9a61df6d66c"}},{"code_sha256_prefix":"a50781884d40eb67","entry":"df_to_dict","repo":"ysh-1998/lrd","repo_kind":"official","path":"src/utils/utils.py","file_url":"https://github.com/ysh-1998/lrd/blob/HEAD/src/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a50781884d40eb67"}},{"code_sha256_prefix":"0cd1bb143750fa70","entry":"eval_list_columns","repo":"ysh-1998/lrd","repo_kind":"official","path":"src/utils/utils.py","file_url":"https://github.com/ysh-1998/lrd/blob/HEAD/src/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0cd1bb143750fa70"}},{"code_sha256_prefix":"62d48d226bb7a89f","entry":"load_unit2index","repo":"ysh-1998/lrd","repo_kind":"official","path":"src/deal_result.py","file_url":"https://github.com/ysh-1998/lrd/blob/HEAD/src/deal_result.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"62d48d226bb7a89f"}},{"code_sha256_prefix":"3d59d38bbf50df0a","entry":"find_info","repo":"ysh-1998/lrd","repo_kind":"official","path":"src/exp.py","file_url":"https://github.com/ysh-1998/lrd/blob/HEAD/src/exp.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3d59d38bbf50df0a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}