{"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/llm2rec-large-language-models-are-powerful","title":"LLM2Rec: Large Language Models Are Powerful Embedding Models for Sequential Recommendation","arxiv_id":"2506.21579","date":"2025-06-16","proceeding":null,"authors":["Yingzhi He","Xiaohao Liu","An Zhang","Yunshan Ma","Tat-Seng Chua"],"abstract":"Sequential recommendation aims to predict users' future interactions by modeling collaborative filtering (CF) signals from historical behaviors of similar users or items. Traditional sequential recommenders predominantly rely on ID-based embeddings, which capture CF signals through high-order co-occurrence patterns. However, these embeddings depend solely on past interactions, lacking transferable knowledge to generalize to unseen domains. Recent advances in large language models (LLMs) have motivated text-based recommendation approaches that derive item representations from textual descriptions. While these methods enhance generalization, they fail to encode CF signals-i.e., latent item correlations and preference patterns-crucial for effective recommendation. We argue that an ideal embedding model should seamlessly integrate CF signals with rich semantic representations to improve both in-domain and out-of-domain recommendation performance. To this end, we propose LLM2Rec, a novel embedding model tailored for sequential recommendation, integrating the rich semantic understanding of LLMs with CF awareness. Our approach follows a two-stage training framework: (1) Collaborative Supervised Fine-tuning, which adapts LLMs to infer item relationships based on historical interactions, and (2) Item-level Embedding Modeling, which refines these specialized LLMs into structured item embedding models that encode both semantic and collaborative information. Extensive experiments on real-world datasets demonstrate that LLM2Rec effectively improves recommendation quality across both in-domain and out-of-domain settings. Our findings highlight the potential of leveraging LLMs to build more robust, generalizable embedding models for sequential recommendation. Our codes are available at https://github.com/HappyPointer/LLM2Rec.","url_abs":"https://arxiv.org/abs/2506.21579v1","url_pdf":"https://arxiv.org/pdf/2506.21579v1.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":"llm2rec-large-language-models-are-powerful","repo_url":"https://github.com/happypointer/llm2rec","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"collaborative-filtering","task_name":"Collaborative Filtering"},{"task_slug":"sequential-recommendation","task_name":"Sequential Recommendation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2506.21579","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2506.21579"}},"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/happypointer/llm2rec","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":1,"unverified":7},"by_repo_kind":{"official":{"samples":8,"ran":1,"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":8,"samples":[{"code_sha256_prefix":"bf4fb435a6b6eb85","entry":"dot_product_scores","repo":"happypointer/llm2rec","repo_kind":"official","path":"baselines/EasyRecModel.py","file_url":"https://github.com/happypointer/llm2rec/blob/HEAD/baselines/EasyRecModel.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bf4fb435a6b6eb85"}},{"code_sha256_prefix":"3ce965a6dac0dd4b","entry":"cal_bpr_loss","repo":"happypointer/llm2rec","repo_kind":"official","path":"baselines/EasyRecModel.py","file_url":"https://github.com/happypointer/llm2rec/blob/HEAD/baselines/EasyRecModel.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3ce965a6dac0dd4b"}},{"code_sha256_prefix":"d4d4d106cec3fcce","entry":"generate_direct_item_prompt_pog","repo":"happypointer/llm2rec","repo_kind":"official","path":"Baseline_inference.py","file_url":"https://github.com/happypointer/llm2rec/blob/HEAD/Baseline_inference.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d4d4d106cec3fcce"}},{"code_sha256_prefix":"1758b59f47d487bc","entry":"generate_title_item_prompt_pog","repo":"happypointer/llm2rec","repo_kind":"official","path":"Baseline_inference.py","file_url":"https://github.com/happypointer/llm2rec/blob/HEAD/Baseline_inference.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1758b59f47d487bc"}},{"code_sha256_prefix":"603780a8016d3c0d","entry":"get_cosine_schedule_with_warmup","repo":"happypointer/llm2rec","repo_kind":"official","path":"llm2rec/run_csft.py","file_url":"https://github.com/happypointer/llm2rec/blob/HEAD/llm2rec/run_csft.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"603780a8016d3c0d"}},{"code_sha256_prefix":"e3c2d2649981bc40","entry":"initialize_peft","repo":"happypointer/llm2rec","repo_kind":"official","path":"llm2rec/run_mntp.py","file_url":"https://github.com/happypointer/llm2rec/blob/HEAD/llm2rec/run_mntp.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e3c2d2649981bc40"}},{"code_sha256_prefix":"db52e722750876eb","entry":"initialize_peft","repo":"happypointer/llm2rec","repo_kind":"official","path":"llm2rec/run_unsupervised_SimCSE.py","file_url":"https://github.com/happypointer/llm2rec/blob/HEAD/llm2rec/run_unsupervised_SimCSE.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"db52e722750876eb"}},{"code_sha256_prefix":"16b97391a1758fda","entry":"reg_pick_embeds","repo":"happypointer/llm2rec","repo_kind":"official","path":"baselines/EasyRecModel.py","file_url":"https://github.com/happypointer/llm2rec/blob/HEAD/baselines/EasyRecModel.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"16b97391a1758fda"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}