{"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/llmrec-large-language-models-with-graph","title":"LLMRec: Large Language Models with Graph Augmentation for Recommendation","arxiv_id":"2311.00423","date":"2023-11-01","proceeding":null,"authors":["Wei Wei","Xubin Ren","Jiabin Tang","Qinyong Wang","Lixin Su","Suqi Cheng","Junfeng Wang","Dawei Yin","Chao Huang"],"abstract":"The problem of data sparsity has long been a challenge in recommendation systems, and previous studies have attempted to address this issue by incorporating side information. However, this approach often introduces side effects such as noise, availability issues, and low data quality, which in turn hinder the accurate modeling of user preferences and adversely impact recommendation performance. In light of the recent advancements in large language models (LLMs), which possess extensive knowledge bases and strong reasoning capabilities, we propose a novel framework called LLMRec that enhances recommender systems by employing three simple yet effective LLM-based graph augmentation strategies. Our approach leverages the rich content available within online platforms (e.g., Netflix, MovieLens) to augment the interaction graph in three ways: (i) reinforcing user-item interaction egde, (ii) enhancing the understanding of item node attributes, and (iii) conducting user node profiling, intuitively from the natural language perspective. By employing these strategies, we address the challenges posed by sparse implicit feedback and low-quality side information in recommenders. Besides, to ensure the quality of the augmentation, we develop a denoised data robustification mechanism that includes techniques of noisy implicit feedback pruning and MAE-based feature enhancement that help refine the augmented data and improve its reliability. Furthermore, we provide theoretical analysis to support the effectiveness of LLMRec and clarify the benefits of our method in facilitating model optimization. Experimental results on benchmark datasets demonstrate the superiority of our LLM-based augmentation approach over state-of-the-art techniques. To ensure reproducibility, we have made our code and augmented data publicly available at: https://github.com/HKUDS/LLMRec.git","url_abs":"https://arxiv.org/abs/2311.00423v6","url_pdf":"https://arxiv.org/pdf/2311.00423v6.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":"llmrec-large-language-models-with-graph","repo_url":"https://github.com/hkuds/llmrec","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"model-optimization","task_name":"Model Optimization"},{"task_slug":"recommendation-systems","task_name":"Recommendation Systems"}],"methods":[{"method_slug":"pruning","method_name":"Pruning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2311.00423","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.00423"}},"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/hkuds/llmrec","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":12,"ran_draft_wrong":1,"ran_honours":1,"ran_violates":1,"unverified":1},"by_repo_kind":{"official":{"samples":16,"ran":15,"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":"5b38f312a03301ac","entry":"LLM_request","repo":"hkuds/llmrec","repo_kind":"official","path":"LLM_augmentation_construct_prompt/gpt_i_attribute_generate_aug.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/LLM_augmentation_construct_prompt/gpt_i_attribute_generate_aug.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5b38f312a03301ac"}},{"code_sha256_prefix":"ea02c0066939a02c","entry":"average_precision","repo":"hkuds/llmrec","repo_kind":"official","path":"utility/metrics.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/utility/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ea02c0066939a02c"}},{"code_sha256_prefix":"37c8ab61f69c3c23","entry":"build_knn_neighbourhood","repo":"hkuds/llmrec","repo_kind":"official","path":"LATTICE/codes/Models.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/LATTICE/codes/Models.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"37c8ab61f69c3c23"}},{"code_sha256_prefix":"220cb127bddfb532","entry":"build_knn_normalized_graph","repo":"hkuds/llmrec","repo_kind":"official","path":"utility/norm.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/utility/norm.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"220cb127bddfb532"}},{"code_sha256_prefix":"e6fb9f69e2c06f0c","entry":"build_sim","repo":"hkuds/llmrec","repo_kind":"official","path":"LATTICE/codes/Models.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/LATTICE/codes/Models.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e6fb9f69e2c06f0c"}},{"code_sha256_prefix":"b18055ccb5503f13","entry":"build_sim","repo":"hkuds/llmrec","repo_kind":"official","path":"utility/norm.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/utility/norm.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b18055ccb5503f13"}},{"code_sha256_prefix":"698d3807a0c41ec9","entry":"compute_normalized_laplacian","repo":"hkuds/llmrec","repo_kind":"official","path":"LATTICE/codes/Models.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/LATTICE/codes/Models.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"698d3807a0c41ec9"}},{"code_sha256_prefix":"bdd46dd855ba018d","entry":"construct_prompting","repo":"hkuds/llmrec","repo_kind":"official","path":"LLM_augmentation_construct_prompt/gpt_i_attribute_generate_aug.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/LLM_augmentation_construct_prompt/gpt_i_attribute_generate_aug.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bdd46dd855ba018d"}},{"code_sha256_prefix":"b5675cc2f92dfe30","entry":"construct_prompting","repo":"hkuds/llmrec","repo_kind":"official","path":"LLM_augmentation_construct_prompt/gpt_ui_aug.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/LLM_augmentation_construct_prompt/gpt_ui_aug.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b5675cc2f92dfe30"}},{"code_sha256_prefix":"ab926c8b04596e98","entry":"construct_prompting","repo":"hkuds/llmrec","repo_kind":"official","path":"LLM_augmentation_construct_prompt/gpt_user_profiling.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/LLM_augmentation_construct_prompt/gpt_user_profiling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ab926c8b04596e98"}},{"code_sha256_prefix":"6671a1bd7a99e865","entry":"get_gpt_response_w_system","repo":"hkuds/llmrec","repo_kind":"official","path":"LLM_augmentation_construct_prompt/gpt_user_profiling.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/LLM_augmentation_construct_prompt/gpt_user_profiling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6671a1bd7a99e865"}},{"code_sha256_prefix":"a88637e01d318677","entry":"guassian_kernel","repo":"hkuds/llmrec","repo_kind":"official","path":"MMSSL/MMD.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/MMSSL/MMD.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a88637e01d318677"}},{"code_sha256_prefix":"e4b5dda77a9a6a63","entry":"mmd_rbf","repo":"hkuds/llmrec","repo_kind":"official","path":"MMSSL/MMD.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/MMSSL/MMD.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e4b5dda77a9a6a63"}},{"code_sha256_prefix":"de0d0e47ac6bbe6c","entry":"precision_at_k","repo":"hkuds/llmrec","repo_kind":"official","path":"utility/metrics.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/utility/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"de0d0e47ac6bbe6c"}},{"code_sha256_prefix":"4437293713f250ee","entry":"recall","repo":"hkuds/llmrec","repo_kind":"official","path":"utility/metrics.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/utility/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4437293713f250ee"}},{"code_sha256_prefix":"9ca663afcc4bd067","entry":"get_sparse_laplacian","repo":"hkuds/llmrec","repo_kind":"official","path":"utility/norm.py","file_url":"https://github.com/hkuds/llmrec/blob/HEAD/utility/norm.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9ca663afcc4bd067"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}