{"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/stochastic-sampling-for-contrastive-views-and","title":"SCONE: A Novel Stochastic Sampling to Generate Contrastive Views and Hard Negative Samples for Recommendation","arxiv_id":"2405.00287","date":"2024-05-01","proceeding":null,"authors":["Chaejeong Lee","Jeongwhan Choi","Hyowon Wi","Sung-Bae Cho","Noseong Park"],"abstract":"Graph-based collaborative filtering (CF) has emerged as a promising approach in recommender systems. Despite its achievements, graph-based CF models face challenges due to data sparsity and negative sampling. In this paper, we propose a novel Stochastic sampling for i) COntrastive views and ii) hard NEgative samples (SCONE) to overcome these issues. SCONE generates dynamic augmented views and diverse hard negative samples via a unified stochastic sampling approach based on score-based generative models. Our extensive experiments on 6 benchmark datasets show that SCONE consistently outperforms state-of-the-art baselines. SCONE shows efficacy in addressing user sparsity and item popularity issues, while enhancing performance for both cold-start users and long-tail items. Furthermore, our approach improves the diversity of the recommendation and the uniformity of the representations. The code is available at https://github.com/jeongwhanchoi/SCONE.","url_abs":"https://arxiv.org/abs/2405.00287v2","url_pdf":"https://arxiv.org/pdf/2405.00287v2.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":"stochastic-sampling-for-contrastive-views-and","repo_url":"https://github.com/jeongwhanchoi/scone","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"collaborative-filtering","task_name":"Collaborative Filtering"},{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"recommendation-systems","task_name":"Recommendation Systems"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2405.00287","atlas_url":"https://app.syntology.ai/?focus=2405.00287","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.00287"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/jeongwhanchoi/scone","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":7,"ran_draft_wrong":3,"unverified":7},"by_repo_kind":{"official":{"samples":17,"ran":10,"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":"cde07004ee483dbc","entry":"bpr_loss","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"util/loss_torch.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/util/loss_torch.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cde07004ee483dbc"}},{"code_sha256_prefix":"e1222a969e6ed9c0","entry":"common","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"util/algorithm.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/util/algorithm.py","link_basis":"plan_row","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":"e1222a969e6ed9c0"}},{"code_sha256_prefix":"6a78f18d5b2ce056","entry":"extract","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"model/graph/SCONE.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/model/graph/SCONE.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6a78f18d5b2ce056"}},{"code_sha256_prefix":"b6d61bed2e663284","entry":"get_optimizer","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"losses_sgm.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/losses_sgm.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":"b6d61bed2e663284"}},{"code_sha256_prefix":"d5f12fb93c24b62e","entry":"get_sigmas","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"utils_sgm.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/utils_sgm.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":"d5f12fb93c24b62e"}},{"code_sha256_prefix":"cddf7c0cf4dae27e","entry":"l1","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"util/algorithm.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/util/algorithm.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cddf7c0cf4dae27e"}},{"code_sha256_prefix":"04b615bf51851196","entry":"l2","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"util/algorithm.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/util/algorithm.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"04b615bf51851196"}},{"code_sha256_prefix":"a05b1d0cf3f508b4","entry":"register_corrector","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"sampling_sgm.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/sampling_sgm.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a05b1d0cf3f508b4"}},{"code_sha256_prefix":"473066ddf62a075a","entry":"register_predictor","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"sampling_sgm.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/sampling_sgm.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"473066ddf62a075a"}},{"code_sha256_prefix":"029e212249aae32c","entry":"triplet_loss","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"util/loss_torch.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/util/loss_torch.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"029e212249aae32c"}},{"code_sha256_prefix":"73cee5051148c668","entry":"InfoNCE","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"util/loss_tf.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/util/loss_tf.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":"73cee5051148c668"}},{"code_sha256_prefix":"9325c22d0eb06da3","entry":"bpr_loss","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"util/loss_tf.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/util/loss_tf.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":"9325c22d0eb06da3"}},{"code_sha256_prefix":"b3e18524b8df81a1","entry":"get_model","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"utils_sgm.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/utils_sgm.py","link_basis":"harvester_set","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":"b3e18524b8df81a1"}},{"code_sha256_prefix":"a58facb8fe71823a","entry":"get_predictor","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"sampling_sgm.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/sampling_sgm.py","link_basis":"harvester_set","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":"a58facb8fe71823a"}},{"code_sha256_prefix":"c75b86662f8dec6b","entry":"l2_reg_loss","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"util/loss_torch.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/util/loss_torch.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":"c75b86662f8dec6b"}},{"code_sha256_prefix":"e4b39361eb110388","entry":"register_model","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"utils_sgm.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/utils_sgm.py","link_basis":"harvester_set","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":"e4b39361eb110388"}},{"code_sha256_prefix":"517a13a2d3646e6f","entry":"ssm_loss","repo":"jeongwhanchoi/scone","repo_kind":"official","path":"util/loss_tf.py","file_url":"https://github.com/jeongwhanchoi/scone/blob/HEAD/util/loss_tf.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":"517a13a2d3646e6f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}