Empowering Collaborative Filtering with Principled Adversarial Contrastive Loss

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.

Paper

Similar papers

Peer review

Reviewer 1hVj5/10 · confidence 3/52023-06-29

Summary

In this work, the authors focus on improving the generalization ability of the top-K recommendation model by a proposed principled Adversarial InfoNCE loss (AdvInfoNCE). Existing contrastive learning based methods usually lack considering the tailored inductive bias (such as hard negatives and false negatives) and sufficient theoretical understanding for the generalization ability. The proposed AdvInfoNCE loss could adaptively explore and assign hardness (weight) for each negative instance in an adversarial fashion. The theoretical guarantees and experiments demonstrate the effectiveness of the proposed AdvInfoNCE loss.

Strengths

1. The motivation that adaptively assigns hardness for each negative instance in an adversarial fashion to improve the generalization ability is justified. 2. The theoretical proof demonstrates the generalization ability of the proposed AdvInfoNCE loss. 3. The experiments on unbiased datasets and out-of-distribution settings demonstrate the effectiveness of the proposed AdvInfoNCE loss in terms of generalization ability.

Weaknesses

1. It would be better to add an intuitive example to show the adaptive learning process for hard negatives and false negatives in the min and max stages. 2. In terms of adaptively learning hardness for each negative instance, it would be better to add some baselines focusing on mining hard negatives or false negatives. 3. In terms of the generalization ability, it would be better to add some baselines focusing on out-of-distribution. Besides, OOD experiments are also performed on popularity-based distribution shift scenarios, what’s the difference compared with debiasing experiments?

Questions

1. Could you please give an intuitive description to show the adaptive learning process for hard negatives and false negatives in the min and max stage ? Especially for hard negatives and false negatives? 2. Why the corresponding item is identified as a hard negative rather than a general negative when sigma > 0 ? 3. In terms of adaptively learning hardness for each negative instance, could you please add some baselines focusing on mining hard negatives or false negatives [1,2] ? 4. In terms of the generalization ability, could you please add some baselines focusing on out-of-distribution [3,4] ? [1] Chen, Jin, et al. "Cache-Augmented Inbatch Importance Resampling for Training Recommender Retriever." In NIPS, 2022. [2] Chen, Jin, et al. "Learning Recommenders for Implicit Feedback with Importance Resampling." In WWW, 2022. [3] Hongyi Wen, et al. "Distributionally-robust Recommendations for Improving Worst-case User Experience". In WWW, 2022. [4] An Zhang, et al. "Invariant Collaborative Filtering to Popularity Distribution Shift". In WWW, 2023.

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

The authors adequately point out the limitations and there is no negative societal impact of their work.

Authorsrebuttal2023-08-14

Follow-up discussion

Thank you for your valuable feedback on our submission, particularly your suggestions to include **an illustrative example** and add **XIR, AdaSIR, S-DRO, and InvCF** as new baselines. These insightful suggestions enhance the quality of our work and better strengthen our claims. We hope that these improvements will be taken into consideration. If we fully address your concerns about our paper, we would be grateful if you could re-evaluate our paper. If you have additional concerns, we remain open and would be more than happy to discuss with you.

Reviewer qmEP8/10 · confidence 4/52023-07-03

Summary

This paper is on collaborative filtering (CF) enhanced by contrastive learning (CL). The authors point out that the adoption of CL into CF is suboptimal due to challenges such as the issue of out-of-distribution, the risk of false negatives, and the nature of top-K evaluation. They also note that current CL-based CF methods lack consideration of the tailored inductive bias for CF and have limited theoretical understanding of their generalization ability. To address these limitations, the authors propose a principled Adversarial InfoNCE loss for CF that focuses on mining hard negatives and distinguishing false negatives from the vast unlabeled user-item interactions. The proposed method is compared with several state-of-the-art contrastive learning-based CF methods on both unbiased and synthetic datasets. The experiments show that the proposed method outperforms the baselines in terms of accuracy and robustness, demonstrating its potential for improving the performance of recommender systems.

Strengths

i) The paper proposes a novel approach to adaptive contrastive learning in collaborative filtering by adopting an adversarial approach. The proposed Adversarial InfoNCE loss addresses the limitations of existing methods and allows for the fine-grained assignment of hardness to each negative user-item pair, which enhances the recommender's generalization ability and empowers top-K recommendations via informative negative sampling. ii) The paper provides innovative theoretical insights into the benefits of adversarial hardness learning. It shows that the proposed hardness scores are correlated with the out-of-distribution problem of recommendation, and can thereby enhance the generalization ability of recommenders. iii) The study of hardness gives an in-depth analysis on the learned hardness scores, which uncovers the importance of learning correct hardness for the massive negative samples without observations.

Weaknesses

i) The proposed method can be viewed as an adaptive SSL method for recommendation [1-2]. Also, it can be a learnable negative sampling approach [3-4]. Literature review (baseline comparison would do better) should be done for these two very relevant research line. ii) Though a brief training cost experiment is given in the appendix. I would expect more detailed efficiency experiments or analysis to support the claim that the proposed AdvInfoNCE can serve as a foundation loss for future CF researches, as the proposed approach utilizes the adversarial training method. [1] Graph contrastive learning with adaptive augmentation [2] Automated Self-Supervised Learning for Recommendation [3] Personalized Ranking with Importance Sampling [4] AHP: Learning to Negative Sample for Hyperedge Prediction

Questions

It would be better for the authors to clarify the relations between the proposed method and the related research lines I mentioned above. And I would expect the authors to give a more detailed efficiency analysis or experiments.

Rating

8: Strong Accept: Technically strong paper, with novel ideas, excellent impact on at least one area, or high-to-excellent impact on multiple areas, with excellent evaluation, resources, and reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

4 excellent

Presentation

4 excellent

Contribution

3 good

Limitations

N/A

Reviewer PLbw8/10 · confidence 4/52023-07-05

Summary

This paper studies contrastive learning (CL) in collaborative filtering (CF) for top-k recommendation. In particular, it focuses on the CF-tailored challenges for CL, and then presents adversarial infoNCE (AdvInfoNCE) loss. This loss dynamically assigns hardness to negative instances and incorporates a fine-grained ranking criterion to improve the CF recommender’s generalization ability. Furthermore, this paper highlights theoretical properties of AdvInfoNCE. Experiments on both synthetic and real-world datasets are done to show the effectiveness of this loss, especially in out-of-distribution scenarios.

Strengths

1. The motivation of considering fine-grained hardness-aware ranking criteria is clear and reasonable. Technically, it is insightful and novel to transfer the distinguish between false and hard negatives into a margin learning problem. 2. As proved in Sec 3.3, the adversarial training framework of AdvInfoNCE is natural and somehow equivalent to solve a distributionally robust optimization (DRO) problem. I appreciate this theoretical guarantee that can endow a AdvInfoNCE-trained CF models with better generalization ability. 3. The experiments are done on four datasets with two CF base models, which are sufficient to demonstrate the effectiveness of the proposed loss. Moreover, the selected baselines are quite new, including some recent and strong works. 4. This proposed loss seems to be a general loss that can be applied in general recommendation models.

Weaknesses

1. The hardness is denoted as $\delta$ in Sec 3.2, while related to $p(j|(u,i))$. This is not explained clearly. More clarifications are needed here. 2. In Line 214, the limitation is stated as the ‘training instability’, which is not empirically shown in the experiments, such as indicated by ‘training loss variance’. It would be better to discuss more about this instability. 3. Although the proof of Theorem 3.1 seems correct, the DL-divergence In Line 195 misses a minus sign. Please double check and fix it.

Questions

1. The hardness is denoted as $\delta_{j}^{(u)}$ first and then $\delta_{j}^{(u,i)}$, which seems confusing. Is it related to a specific user $u$ or a user-item pair $(u,i)$?

Rating

8: Strong Accept: Technically strong paper, with novel ideas, excellent impact on at least one area, or high-to-excellent impact on multiple areas, with excellent evaluation, resources, and reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

4 excellent

Limitations

Please refer to the weaknesses and questions.

Reviewer kSe86/10 · confidence 4/52023-07-05

Summary

Current losses for collaborative filtering struggle to handle the issue of unobserved user-item pairs. Typically, the approach is to treat unseen pairs as negatives while seen pairs as positives, but this is somewhat problematic because unseen pairs could just be unobserved positives. The authors propose an adversarial InfoNCE-based loss that claims to address this problem in collaborative filtering. This loss works by minimizing the InfoNCE loss given that we have adversarially learned weights for the negative samples. They give a theorem that shows this proposed loss can be interpreted as a distributionally robust optimization problem. Finally, they give some empirical results showing the efficacy of their method over other CF baselines.

Strengths

1. This paper provides a method that appears to give solid gains across various collaborative filtering tasks. 2. They do make an attempt to try to interpret what the \delta (adversarially learned parameters) in their method are doing. 3. The graphs for the results and the pictures explaining the methods are good and helped me with understanding. 4. The authors try to tackle a hard problem: it is hard to think about how to best utilize unseen pairs in collaborative filtering due to their unseen nature. 5. The method is fairly novel as a nontrivial extension to InfoNCE to the collaborative filtering setting via adversarial training.

Weaknesses

1. I don't understand the role of the adversarial variables in the algorithm. In figure 2a there was some attempt at interpreting the values of the deltas, but it still does not make sense. I hope the authors can explain the role of the variables better. 2. I think the terminology of "hard negative" is confusing, because typically in the self-supervised learning literature people call negatives that are near the decision boundary "hard negatives". However, in this paper hard negatives are the opposite: negatives that are far away from the positives pair. I suggest rewriting the paper to make the message more clear. 3. In general, the paper is hard to understand and has many grammatical errors. The authors should fix this to make the paper easier to read. 4. From what I can understand, the loss should simply make the deltas as large as possible (positive) to increase the loss value given that there are no constraints (aside from the number of epochs trained, I guess). I have concerns about the usefulness and stability of this algorithm. 5. In theorem 3.1, we assume that the deltas imply a probability distribution. Is this true? As we train do the deltas for a user i add up to |N_i|? I'm not sure there is a constraint there enforcing this. In that case I'm not sure the theory applies to the algorithm as-is.

Questions

My questions are in the weaknesses.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

2 fair

Presentation

2 fair

Contribution

2 fair

Limitations

Seems to be sufficient.

Authorsrebuttal2023-08-14

Follow-up discussion

Thank you for taking the time to review our paper. We appreciate your feedback and hope our response do address your concerns, especially regarding the terminology and the algorithm. We thus do hope our clarification of this main concern does help you reassess our paper. If you have additional concerns, we would be more than happy to provide additional clarification. Thank you for your attention.

Reviewer kSe82023-08-15

I raise my score.

Based on the rebuttals given by the authors and other reviews, I revise my score upwards. I believe the findings in this paper would be a valuable contribution to the conference. I have one more question. Why should we expect that a hard negative more likely correspond to a true negative at test time (as shown in Figure 7)? I can see that the experiment results seem to support this, but why should this be intuitively true?

Authorsrebuttal2023-08-16

We would like to express our sincere appreciation for your review and for taking the time to reconsider our work based on the provided rebuttals. For your question regarding the hard negatives, our response is on the way. Thanks again.

Authorsrebuttal2023-08-17

Response to new questions

We appreciate you posing this insightful question regarding the relationship between true negatives and hard negatives. At its core, our hypothesis in AdvInfoNCE is grounded in this fundamental assumption about the relationship between true negatives and hard negatives. Allow me to elucidate our rationale: 1. **Definition of Ture Negatives and Hard Negatives.** - **True Negatives:** Within the recommendation framework of offline testing, negatives denote interactions absent from the training phase. While true negatives denote items that absent from both the training and testing phase and user intrinsically dislike, which is unknown. The ultimate goal of offline recommendation is to discern potential interactions (positives) for testing based on the understanding gained from fitting the training data. Equivalently speaking, offline recommendation testing is essentially to identify which items are true negatives: items that, even exposed to the user, are unlikely to be clicked on. In other words, the recommender aims to avoid such true negatives appearing in the top rankings of the recommendation system. - **Hard Negatives** learned by AdvInfoNCE: Hard negatives are interactions that are assigned a positive hardness value $\delta$ in AdvInfoNCE. Such a value suggests a narrowing of the feasible zone, distancing the interaction's representations from positive. In essence, AdvInfoNCE de-prioritizes these hard negatives in ranking. Hence, we expect the AdvInfoNCE can successfuly identify the true Negatives in dataset as its defined hard negatives. 2. **Hard negative mining justification.** Here, we also want to elucidate why we view the process of identifying true negatives as akin to hard negative mining. We define an item with $\delta > 0$ as a hard negative based on the gradient analysis presented in Appendix B.3. The gradients associated with the negative item j are proportionally linked to $\exp(\delta_j)$. In other words, for $\delta_j >0$, the recommender exhibits more attention to this item by a factor of $\exp(\delta_j) >1$. This trait aligns with the concept of hard negatives in hard negative mining. I hope this response offers a clearer, more concise understanding. Let me know if further clarifications are required.

Reviewer kSe82023-08-18

This still isn't clear to me.

I understand the AdvInfoNCE deprioritizes hard negatives and decreases their ranking. But that is not necessarily the same as decreasing the ranking of true negatives is it? Why should we expect that hard negatives are more likely to be true negatives?

Authorsrebuttal2023-08-21

Response to new questions

Thanks for your continued interest. Your question seems to center on how our identified hard negatives are related to true negatives. If we have misunderstood, kindly clarify further. In our paper, we delve into the theoretical understanding of AdvInfoNCE's effectiveness using DRO, gradient analysis, and alignment with top-k evaluation metrics. Your question has prompted us to distill our method's findings in the most straightforward manner, and we have taken time to introspect to provide a reasonable response. We appreciate your patience and insightful question. Let us intuitively grasp our findings through the lens of item popularity. Many foundational papers acknowledge that sampled negative items of high popularity should be considered as true negatives [1,2]. Such papers indicate that when an item possesses high popularity but remains unclicked by a user, it implies a greater likelihood of the item being uninteresting to the user. Concurrently, negatives with higher popularity are more likely to be identified as hard negatives by AdvInfoNCE. During the "min" stage of AdvInfoNCE, popular items are prone to quickly achieving higher cosine similarity scores due to the intrinsic properties of CF backbones [3,4]. Consequently, during the "max" stage of adversarial training, popular items tend to incur increased penalties and higher hardness values compared to those unpopular items. This phenomenon is also verified in the "averaged hardness" w.r.t. item popularity presented in Figure 2.(a) of our paper. In summary, items with higher popularity tend to be recognized as hard negatives by our method. Furthermore, according to the preceding literature, these popular items might also qualify as potential true negatives. This is how our identified hard negatives are related to true negatives. It is worth noting that, unlike false negatives, the true negatives here are unknown to us in fact. False negatives pertain to interactions unobserved during training but present in testing. However, we lack insight into whether other negative samples, which do not appear in the test set, could indeed be true negatives. Hence, we have come to realize that the two items in the case studies plotted on the right-hand side of Figure 7 can not be simply labeled as true negatives. They should exclusively be referred to as sampled negatives since whether they are true negatives is unknown. We have also revised the definition of true negatives as provided in the previous response. From: "True negatives denote interactions absent from both the training and testing phases. " to "True negatives denote interactions absent from both the training and testing phases and which users inherently dislike, making them unknown from a data perspective." Sorry for this confusion. We sincerely appreciate your valuable suggestions. We hope that our answer resolves your question. If you have any further questions, we are happy to continue discussing with you. [1] Session-based recommendations with recurrent neural networks. [2] Fast Matrix Factorization for Online Recommendation with Implicit Feedback. [3] Debiasing Neighbor Aggregation for Graph Neural Network in Recommender Systems. [4] Popularity-Opportunity Bias in Collaborative Filtering.

Reviewer kSe82023-08-21

Yes, thank you for making this clear. Your assumption that popular non-clicked items are more likely to be true negatives is essentially the core of the paper and I suggest it be emphasized in future drafts.

Reviewer ikze7/10 · confidence 4/52023-07-08

Summary

This paper proposes a principled AdvInfoNCE loss for CF methods to improve generalization ability. It utilizes a fine-grained hardness-aware ranking criterion to assign weights for unobserved user-item interactions. In this way, it can enable better distinction between different negative, thus mitigating the inductive bias in CF-based methods. It provides theoretical proof of the effectiveness of AdvInfoNCE loss and the experimental results compared with other popular loss used in recommenders look promising.

Strengths

It is well-written and easy to follow. Good motivation of improving the generalizability of CF-based methods. It provides thereotical guarantees for the loss design and conducts comprehensive analysis on the effectiveness of its method. Experimental results compared with other popular functions adopted in CF models look promising. Code is open.

Weaknesses

Experiments can be more extensive. The results on MF and LightGCN look promising. But I think it would be more convincing if the authors can consider more CF-based backbones like MultVAE [1] and DGCF [2]. [1] Liang et al. Variational Autoencoders for Collaborative Filtering. 2018 WWW. [2] Wang et al. Disentangled Graph Collaborative Filtering. 2020 SIGIR.

Questions

This paper proposes a novel constrastive loss for fine-grained ranking of negative samples to improve the generalizability of CF-based models, which is a significant contribution. It provides comprehensive theoretical analysis and experiments look promising. I just have minor concerns about the technical details. - Do you attempt other similarty measurements for calculating the hardness and whether the choice of similarity calculation matters? - What is the rate of negative samples over all the unobserved interactions used in your method and is there any result of using different negative sampling rate?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

More CF-based backbones can be considered.

Reviewer PLbw2023-08-14

Thank you for the classifications. My concerns have been resolved. BTW, I specifically appreciate the illustrative examples provided, which clearly present how the proposed model works. Given this, I increase my score slightly.

Authorsrebuttal2023-08-17

Thanks reviewer!

We sincerely thank you for recognizing our efforts in rebuttal. We appreciate your decision to increase the score. Your feedbacks have been invaluable to our work.

Authorsrebuttal2023-08-17

Thanks!

We appreciate your acknowledgment of our efforts in addressing the concerns. Your insightful comments have been instrumental in enhancing the quality of our work.

Reviewer ikze2023-08-21

Thank you for the efforts. My concerns have been addressed and I will maintain my rating.

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC