Empowering Collaborative Filtering with Principled Adversarial Contrastive Loss
An Zhang, Leheng Sheng, Zhibo Cai, Xiang Wang, Tat-Seng Chua
Abstract
Contrastive Learning (CL) has achieved impressive performance in self-supervised learning tasks, showing superior generalization ability. Inspired by the success, adopting CL into collaborative filtering (CF) is prevailing in semi-supervised top-K recommendations. The basic idea is to routinely conduct heuristic-based data augmentation and apply contrastive losses (e.g., InfoNCE) on the augmented views. Yet, some CF-tailored challenges make this adoption suboptimal, such as the issue of out-of-distribution, the risk of false negatives, and the nature of top-K evaluation. They necessitate the CL-based CF scheme to focus more on mining hard negatives and distinguishing false negatives from the vast unlabeled user-item interactions, for informative contrast signals. Worse still, there is limited understanding of contrastive loss in CF methods, especially w.r.t. its generalization ability. To bridge the gap, we delve into the reasons underpinning the success of contrastive loss in CF, and propose a principled Adversarial InfoNCE loss (AdvInfoNCE), which is a variant of InfoNCE, specially tailored for CF methods. AdvInfoNCE adaptively explores and assigns hardness to each negative instance in an adversarial fashion and further utilizes a fine-grained hardness-aware ranking criterion to empower the recommender's generalization ability. Training CF models with AdvInfoNCE, we validate the effectiveness of AdvInfoNCE on both synthetic and real-world benchmark datasets, thus showing its generalization ability to mitigate out-of-distribution problems. Given the theoretical guarantees and empirical superiority of AdvInfoNCE over most contrastive loss functions, we advocate its adoption as a standard loss in recommender systems, particularly for the out-of-distribution tasks. Codes are available at https://github.com/LehengTHU/AdvInfoNCE.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers15
- On Softmax Direct Preference Optimization for RecommendationYuxin Chen, Junfei Tan, An Zhang, Zhengyi Yang et al.NeurIPS 2024 · 126 citations
- Graph Representation Learning via Causal Diffusion for Out-of-Distribution RecommendationChu Zhao, Enneng Yang, Yuliang Liang, Pengxiang Lan et al.WWW 2025 · 21 citations
- General Debiasing for Graph-based Collaborative Filtering via Adversarial Graph DropoutAn Zhang, Wenchang Ma, Pengbo Wei, Leheng Sheng et al.WWW 2024 · 21 citations
- PSL: Rethinking and Improving Softmax Loss from Pairwise Perspective for RecommendationWeiqin Yang, Jiawei Chen, Xin Xin, Sheng Zhou et al.NeurIPS 2024 · 17 citations
- MixRec: Individual and Collective Mixing Empowers Data Augmentation for Recommender SystemsYi Zhang, Yiwen ZhangWWW 2025 · 13 citations
Builds on29
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- Supervised Contrastive LearningPrannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna et al.NeurIPS 2020 · 7,049 citations
- LightGCN: Simplifying and Powering Graph Convolution Network for RecommendationXiangnan He, Kuan Deng, Xiang Wang, Yan Li et al.SIGIR 2020 · 4,448 citations
- Barlow Twins: Self-Supervised Learning via Redundancy ReductionJure Zbontar, Li Jing, Ishan Misra, Yann LeCun et al.ICML 2021 · 2,942 citations
- Understanding Contrastive Representation Learning through Alignment and Uniformity on the HypersphereTongzhou Wang, Phillip IsolaICML 2020 · 2,360 citations
Related papers
- Towards the Generalization of Contrastive Self-Supervised LearningWeiran Huang, Mingyang Yi, Xuyang Zhao, Zihao JiangICLR 2023 · 21 citations
- Automated Self-Supervised Learning for RecommendationLianghao Xia, Chao Huang, Chunzhen Huang, Kangyi Lin et al.WWW 2023 · 141 citations
- Contrastive Flow Matching for Collaborative FilteringWangyu Jin, Jiansheng Qian, Wenwen Xia, Hongliang He et al.SIGIR 2026
- Unveiling Vulnerabilities of Contrastive Recommender Systems to Poisoning AttacksZongwei Wang, Junliang Yu, Min Gao, Hongzhi Yin et al.KDD 2024 · 16 citations
- Rethinking Negative Pairs in Code SearchHaochen Li, Xin Zhou, Anh Tuan Luu, Chunyan MiaoEMNLP 2023 · 6 citations
