[Paper Review] Empowering Collaborative Filtering with Principled Adversarial Contrastive Loss
This paper proposes AdvInfoNCE, a principled adversarial contrastive loss for collaborative filtering that adaptively assigns hardness to negative samples and enforces a fine-grained ranking criterion. By distinguishing hard negatives from false negatives through adversarial training, AdvInfoNCE improves generalization and achieves state-of-the-art performance on out-of-distribution recommendation tasks across multiple benchmarks, with up to 24.62% relative improvement in NDCG over InfoNCE.
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.
Motivation & Objective
- To address the limitations of existing contrastive learning methods in collaborative filtering, particularly the failure to distinguish false negatives from true negatives.
- To improve the generalization ability of contrastive learning-based recommender systems, especially under out-of-distribution settings.
- To provide a theoretically grounded, adaptive contrastive loss that explicitly models the hardness of negative samples in a fine-grained manner.
- To reduce exposure bias in semi-supervised top-K recommendation by refining the ranking criterion through adversarial hardness assignment.
Proposed method
- Proposes AdvInfoNCE, a modified InfoNCE loss that incorporates adversarial training to dynamically assign hardness values δj to each negative item j.
- Introduces a fine-grained ranking criterion where negative items with δj > 0 (hard negatives) are pulled further apart, while those with δj < 0 (false negatives) are relaxed to reduce constraint pressure.
- Employs an adversarial optimization process that iteratively updates the hardness values δj based on the model’s current predictions, improving the contrastive signal quality.
- Uses a two-stage training process: first pre-train the backbone model, then conduct adversarial training to refine the hardness assignments and optimize the contrastive loss.
- Adapts the contrastive loss to the top-K recommendation setting by explicitly modeling the ranking discrepancy between positive and negative items.
- Employs a temperature-scaled contrastive objective with a learnable temperature τ and adversarial learning rate lradv to stabilize training.
Experimental results
Research questions
- RQ1How can contrastive learning be made more effective in collaborative filtering by better distinguishing hard negatives from false negatives?
- RQ2What is the impact of adversarial hardness assignment on the generalization ability of contrastive learning in top-K recommendation?
- RQ3Can a fine-grained, adaptive ranking criterion improve the robustness of recommender systems under out-of-distribution settings?
- RQ4How does the proposed AdvInfoNCE loss compare to standard InfoNCE and other contrastive losses in terms of performance and generalization?
Key findings
- AdvInfoNCE achieves up to 24.62% relative improvement in NDCG@20 over InfoNCE on the Tencent dataset (γ = 200), demonstrating strong generalization on out-of-distribution data.
- On the Tencent dataset, AdvInfoNCE identifies approximately 70% of false negatives in the test set, as indicated by the FN identification rate, which correlates with performance gains.
- The model with AdvInfoNCE-mlp achieves 21.90% relative improvement in NDCG@20 on the KuaiRec dataset, showing consistent gains across diverse benchmarks.
- The ablation study confirms that adversarial hardness assignment significantly improves performance, with AdvInfoNCE outperforming both InfoNCE and other contrastive baselines across all datasets.
- The method shows robustness to hyperparameter settings, especially when the adversarial learning rate lradv and number of adversarial epochs Eadv are carefully tuned.
- The model maintains high performance even with reduced negative sampling (N=64), indicating efficient learning with minimal computational cost.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.