# Empowering Collaborative Filtering with Principled Adversarial Contrastive Loss

arXiv: https://arxiv.org/abs/2310.18700 · HTML: https://mlsanity.com/paper/2310.18700/

## Key facts

- Cited by 24 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 28 Oct 2023.

## Built on by (most cited first, 24 of 24)

- [On Softmax Direct Preference Optimization for Recommendation](https://mlsanity.com/paper/2406.09215/) (2024)
- [Language Representations Can be What Recommenders Need: Findings and Potentials](https://mlsanity.com/paper/2407.05441/) (2024)
- [Dual Test-time Training for Out-of-distribution Recommender System](https://mlsanity.com/paper/2407.15620/) (2024)
- [Mixed Attention Network for Cross-domain Sequential Recommendation](https://mlsanity.com/paper/2311.08272/) (2023)
- [Graph Representation Learning via Causal Diffusion for Out-of-Distribution Recommendation](https://mlsanity.com/paper/2408.00490/) (2024)
- [Preference Diffusion for Recommendation](https://mlsanity.com/paper/2410.13117/) (2024)
- [PSL: Rethinking and Improving Softmax Loss from Pairwise Perspective for Recommendation](https://mlsanity.com/paper/2411.00163/) (2024)
- [Breaking the Top-K Barrier: Advancing Top-K Ranking Metrics Optimization in Recommender Systems](https://mlsanity.com/paper/2508.05673/) (2025)
- [Distributionally Robust Graph Out-of-Distribution Recommendation via Diffusion Model](https://mlsanity.com/paper/2501.15555/) (2025)
- [A Comprehensive Survey on Self-Supervised Learning for Recommendation](https://mlsanity.com/paper/2404.03354/) (2024)
- [Beyond Single Labels: Improving Conversational Recommendation through LLM-Powered Data Augmentation](https://mlsanity.com/paper/2508.05657/) (2025)
- [Advancing Loss Functions in Recommender Systems: A Comparative Study with a R'enyi Divergence-Based Solution](https://mlsanity.com/paper/2506.15120/) (2025)
- [Prompt-Based LLMs for Position Bias-Aware Reranking in Personalized Recommendations](https://mlsanity.com/paper/2505.04948/) (2025)
- [How does Labeling Error Impact Contrastive Learning? A Perspective from Data Dimensionality Reduction](https://mlsanity.com/paper/2507.11161/) (2025)
- [Talos: Optimizing Top-K Accuracy in Recommender Systems](https://mlsanity.com/paper/2601.19276/) (2026)
- [Multi-Margin Cosine Loss: Proposal and Application in Recommender Systems](https://mlsanity.com/paper/2405.04614/) (2024)
- [Convolutional Transformer Neural Collaborative Filtering](https://mlsanity.com/paper/2412.01376/) (2024)
- [Intrinsic and Extrinsic Factor Disentanglement for Recommendation in Various Context Scenarios](https://mlsanity.com/paper/2503.03524/) (2025)
- [Negative Metric Learning for Graphs](https://mlsanity.com/paper/2505.10307/) (2025)
- [Causal Negative Sampling via Diffusion Model for Out-of-Distribution Recommendation](https://mlsanity.com/paper/2508.07243/) (2025)
- [ANCHOR: Integrating Adversarial Training with Hard-mined Supervised Contrastive Learning for Robust Representation Learning](https://mlsanity.com/paper/2510.27599/) (2025)
- [Correct and Weight: A Simple Yet Effective Loss for Implicit Feedback Recommendation](https://mlsanity.com/paper/2601.04291/) (2026)
- [DSL: Understanding and Improving Softmax Recommender Systems with Competition-Aware Scaling](https://mlsanity.com/paper/2602.07206/) (2026)
- [Debiasing Message Passing to Mitigate Popularity Bias in GNN-based Collaborative Filtering](https://mlsanity.com/paper/2605.11145/) (2026)

## Abstract (arXiv)

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.
