{"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/collaborative-filtering-based-on-diffusion","title":"Collaborative Filtering Based on Diffusion Models: Unveiling the Potential of High-Order Connectivity","arxiv_id":"2404.14240","date":"2024-04-22","proceeding":null,"authors":["Yu Hou","Jin-Duk Park","Won-Yong Shin"],"abstract":"A recent study has shown that diffusion models are well-suited for modeling the generative process of user-item interactions in recommender systems due to their denoising nature. However, existing diffusion model-based recommender systems do not explicitly leverage high-order connectivities that contain crucial collaborative signals for accurate recommendations. Addressing this gap, we propose CF-Diff, a new diffusion model-based collaborative filtering (CF) method, which is capable of making full use of collaborative signals along with multi-hop neighbors. Specifically, the forward-diffusion process adds random noise to user-item interactions, while the reverse-denoising process accommodates our own learning model, named cross-attention-guided multi-hop autoencoder (CAM-AE), to gradually recover the original user-item interactions. CAM-AE consists of two core modules: 1) the attention-aided AE module, responsible for precisely learning latent representations of user-item interactions while preserving the model's complexity at manageable levels, and 2) the multi-hop cross-attention module, which judiciously harnesses high-order connectivity information to capture enhanced collaborative signals. Through comprehensive experiments on three real-world datasets, we demonstrate that CF-Diff is (a) Superior: outperforming benchmark recommendation methods, achieving remarkable gains up to 7.29% compared to the best competitor, (b) Theoretically-validated: reducing computations while ensuring that the embeddings generated by our model closely approximate those from the original cross-attention, and (c) Scalable: proving the computational efficiency that scales linearly with the number of users or items.","url_abs":"https://arxiv.org/abs/2404.14240v1","url_pdf":"https://arxiv.org/pdf/2404.14240v1.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":"collaborative-filtering-based-on-diffusion","repo_url":"https://github.com/jackfrost168/cf_diff","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"collaborative-filtering","task_name":"Collaborative Filtering"},{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"recommendation-systems","task_name":"Recommendation Systems"}],"methods":[{"method_slug":"ae","method_name":"AE"},{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2404.14240","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.14240"}},"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/jackfrost168/cf_diff","reach":{"status":"ok"}}],"summary":{"ran_honours":2,"ran_draft_wrong":1,"ran":5},"by_repo_kind":{"official":{"samples":8,"ran":8,"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":"2ab2316ac6fdd869","entry":"betas_for_alpha_bar","repo":"jackfrost168/cf_diff","repo_kind":"official","path":"models/gaussian_diffusion.py","file_url":"https://github.com/jackfrost168/cf_diff/blob/HEAD/models/gaussian_diffusion.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2ab2316ac6fdd869"}},{"code_sha256_prefix":"c26b918effa6b11b","entry":"betas_from_linear_variance","repo":"jackfrost168/cf_diff","repo_kind":"official","path":"models/gaussian_diffusion.py","file_url":"https://github.com/jackfrost168/cf_diff/blob/HEAD/models/gaussian_diffusion.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c26b918effa6b11b"}},{"code_sha256_prefix":"35d1a13f8866e86e","entry":"computeTopNAccuracy","repo":"jackfrost168/cf_diff","repo_kind":"official","path":"evaluate_utils.py","file_url":"https://github.com/jackfrost168/cf_diff/blob/HEAD/evaluate_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"35d1a13f8866e86e"}},{"code_sha256_prefix":"873e59590af928c6","entry":"data_load","repo":"jackfrost168/cf_diff","repo_kind":"official","path":"data_utils.py","file_url":"https://github.com/jackfrost168/cf_diff/blob/HEAD/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"873e59590af928c6"}},{"code_sha256_prefix":"b5d15c59030cf191","entry":"data_load","repo":"jackfrost168/cf_diff","repo_kind":"official","path":"data_preprocessing/data_preprocessing_item_2nd_hop.py","file_url":"https://github.com/jackfrost168/cf_diff/blob/HEAD/data_preprocessing/data_preprocessing_item_2nd_hop.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b5d15c59030cf191"}},{"code_sha256_prefix":"25c975f5355eaa20","entry":"get_top_k_similar_pearson","repo":"jackfrost168/cf_diff","repo_kind":"official","path":"data_utils.py","file_url":"https://github.com/jackfrost168/cf_diff/blob/HEAD/data_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"25c975f5355eaa20"}},{"code_sha256_prefix":"cf2798b666b231ca","entry":"normal_kl","repo":"jackfrost168/cf_diff","repo_kind":"official","path":"models/gaussian_diffusion.py","file_url":"https://github.com/jackfrost168/cf_diff/blob/HEAD/models/gaussian_diffusion.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cf2798b666b231ca"}},{"code_sha256_prefix":"3cef9867af2fd687","entry":"timestep_embedding","repo":"jackfrost168/cf_diff","repo_kind":"official","path":"models/CAM_AE.py","file_url":"https://github.com/jackfrost168/cf_diff/blob/HEAD/models/CAM_AE.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3cef9867af2fd687"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}