Papers › Neighborhood-Enhanced Supervised Contrastive Learning for Collaborative Filtering

Neighborhood-Enhanced Supervised Contrastive Learning for Collaborative Filtering

18 Feb 2024arXiv:2402.11523archive 2025-07-28

Peijie Sun, Le Wu, Kun Zhang, Xiangzhi Chen, Meng Wang

While effective in recommendation tasks, collaborative filtering (CF) techniques face the challenge of data sparsity. Researchers have begun leveraging contrastive learning to introduce additional self-supervised signals to address this. However, this approach often unintentionally distances the target user/item from their collaborative neighbors, limiting its efficacy. In response, we propose a solution that treats the collaborative neighbors of the anchor node as positive samples within the final objective loss function. This paper focuses on developing two unique supervised contrastive loss functions that effectively combine supervision signals with contrastive loss. We analyze our proposed loss functions through the gradient lens, demonstrating that different positive samples simultaneously influence updating the anchor node's embeddings. These samples' impact depends on their similarities to the anchor node and the negative samples. Using the graph-based collaborative filtering model as our backbone and following the same data augmentation methods as the existing contrastive learning model SGL, we effectively enhance the performance of the recommendation model. Our proposed Neighborhood-Enhanced Supervised Contrastive Loss (NESCL) model substitutes the contrastive loss function in SGL with our novel loss function, showing marked performance improvement. On three real-world datasets, Yelp2018, Gowalla, and Amazon-Book, our model surpasses the original SGL by 10.09%, 7.09%, and 35.36% on NDCG@20, respectively.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2402.11523")

Code

Syntology Ran 1 of 2 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 1 ran with no contract checked.

By repository: community (archive-listed): 2 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

PeiJieSun/NESCL mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

2 samples harvested; 1 ran; 0 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran
1unverified

Licence: 0 of the 2 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from PeiJieSun/NESCL. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

activation_layer PeiJieSun/NESCL/recbole/model/layers.py community (archive-listed) ran MIT (permissive) · b5b0bb176f34b7a4 · report
item_list PeiJieSun/NESCL/recbole/debug/model_fusion.py community (archive-listed) unverified MIT (permissive) · b33b61d781d779f2 · report

Tasks

Collaborative FilteringContrastive LearningData AugmentationRecommendation Systems

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Collaborative Filtering Gowalla NESCL NDCG@20 0.1617 #3 of 11 Archive leaderboard report
Collaborative Filtering Gowalla NESCL Recall@20 0.1917 #3 of 11 Archive leaderboard report
Collaborative Filtering Yelp2018 NESCL NDCG@20 0.0611 #1 of 9 Archive leaderboard report
Collaborative Filtering Yelp2018 NESCL Recall@20 0.0743 #1 of 9 Archive leaderboard report
Recommendation Systems Amazon-Book NESCL Recall@20 0.0624 #8 of 16 Archive leaderboard report
Recommendation Systems Amazon-Book NESCL nDCG@20 0.0513 #8 of 16 Archive leaderboard report
Recommendation Systems Gowalla NESCL Recall@20 0.1917 #2 of 13 Archive leaderboard report
Recommendation Systems Gowalla NESCL nDCG@20 0.1617 #2 of 13 Archive leaderboard report
Recommendation Systems Yelp2018 NESCL NDCG@20 0.0611 #1 of 11 Archive leaderboard report
Recommendation Systems Yelp2018 NESCL Recall@20 0.0743 #1 of 11 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Contrastive LearningSupervised Contrastive Loss

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections