Empowering Collaborative Filtering with Principled Adversarial Contrastive Loss
Authors: An Zhang
Leheng Sheng
Zhibo Cai
Xiang Wang
Tat-Seng Chua
Venue: NeurIPS 2023 poster (2023)
Keywords: Collaborative filtering
Contrastive loss
Recommendation
Generalization ability
TL;DR: A standard contrastive loss in recommender systems, particularly for out-of-distribution tasks.

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 topK 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.

Empowering Collaborative Filtering with Principled Adversarial Contrastive Loss
An Zhang' Leheng Sheng Zhibo Cai
Xiang Wang' Tat-Seng Chua'
National University of Singapore
Tsinghua University *Center for Applied Statistics and School of Statistics, Renmin University of China UUniversity of Science and Technology of China
anzhangfu. nus edu, chenglh22@maills www.lssssiinnaaaiae cn, caizhibo@ruc. edu. en, xiangwang com, dcscts@mus edu.sg
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- comi-supervised top- recommendations. The basic idea is to routinely conduct heuristic-baser data augmentation and apply contrastive losses (e.g., InfoNCE) 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 CF methods, especially w.r.f. its generalization ability. To bridge the gap, we delve into the reasons underpinning the success of contrastive loss in CF, and propose principled Adversarial InfoNCE loss (AdvInfoNCE),, which is 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 fine-grained hardness-aware ranking criterion 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 AdvInfoNCE over most contrastive loss functions, we advocate its adoption as standard loss in recommender systems, particularly for the out-of- of--ossriibuutin tasks. Codes are available at https:/ //tthtbt.b/tt///g///g////t com/ Lom/LehengTHU AdvInfoNCC
Introduction
Contrastive Learning (CL) has emerged potent tool in self-supervised learning tasks [1-4], given its superior generalization ability. By simultaneously pulling positive pairs close together while pushing apart negative pairs the feature space [5], CL has demonstrated the ability to extract general features from limited signals. This promising result has propelled research interest in leveraging CL for Collaborative Filtering (CF) in top-K recommendation tasks, leading marked enhancement in performance and generalization ability [6-12]. Specifically, the prevalent paradigm in CL-based CF methods is routinely adopt heuristic-be based data augmentation for user-item bipartite graphs
Zhang and Leheng Sheng contribute equally to this work.
Zhibo Cai is the corresponding author.
37th Conference on Neural Information Processing Systems (NcurIPS 2023).

---

Ranking Criterion for InfONCE
Ranking Criterion for True Negative ji
Ranking Criterion False Negative Fz
1
2/2
(a) ((,,) - su,, 0 0
(b) ji) - s(,, 1) S 6
(c) s(u, s(u, i) S -652
Figure I: Comparative geometric interpretation of ranking criteria based on similarity measure s(:-)) for InfoNCE (Ia) and our proposed AdvInfoNCE (Ib-1c). The figures depict the user u as red dot, with items i (positive), ju (true negative), and je (false negative) depicted points with varying shades of blue. The color gradient reflects the underlying similarity between user u and the items, while the shaded region delineates the feasible zone for its corresponding negative item.
[13-15], coupled with the indiscriminate application of contrastive losses such InfoNCE [16]. Wherein, a common assumption underlying these methods is considering all unobserved interactions as negative signals [17, 18].
Despite the empirical success of CL-bbaed CF methods, two critical limitations have been observed that potentially impede further advancements in this research direction:
Lack of considering the tailored inductive bias for CF. As a standard approach for semi- supervised top-K K recommendation with implicit feedback, CF methods face unique challenges. In most cases, the majority of user-item interactions remain unobserved and unlabelled, from which CF methods directly draw negative instances. However, indiscriminately treating these unobserved interactions as negative signals overlooks the risk of false negatives, thus failing provide reliable contrastive signals [19]. This issue is known as the exposure bias [20, 21] in recommender systems. Unfortunately, this inherent inductive bias is rarely considered in current CL-based CF methods. resulting in suboptimal recommendation quality and generalization ability [22].
Limited theoretical understanding for the generalization ability of CL-baaed CF methods. While data augmentation, as a key factor for generalization ability, is pivotal in computer vision [23, 24], CI.-based CF models exhibit insensitivity to perturbations the user-item bipartite graph [25]. Recent studies [26-28] empirically reveal that contrastive loss plays more crucial role in boosting performance in CF than heuristic-bare -baee graph augmentation. However, an in- theoretical understanding of contrastive loss in top-K recommendation that could shed light on the generalization ability of Ca-b CF methods remains largely under-explored.
To better understand and reshape the contrastive loss specially tailored for top-K recommendation, we aim to automatically and adversarially assign hardness to each negative user-item pair, which de facto concurrently enlarges the similarity discrepancy for hard negatives and loosens the ranking constraint for false negatives. To be specific, the fundamental idea revolves around discerning a fine-grained degree of hardness for negative interactions, thereby yielding more profound insight into the underlying ranking criterion for top- K recommendation, as depicted in Figure Notably, for given user v. 83 refers to the hardness of item j. When 8, > 0 (as seen in Figure 1b), item ji is identified as a hard negative, resulting in a significant contraction of the feasible representation space. Conversely, when 8,, < 0 (as seen in Figure Ic), the ranking criterion is relaxed compared to the constraint of InfoNCE, allowing the recommender to mitigate the impact of false negative noise. Nevertheless, the tasks of effectively distinguishing between the hard and false negatives, and of learning a proper fine-gratd grained ranking of interactions continue to present significant challenges [22].
To this end, we incorporate fine-graines hardness- aware ranking criterion and devise a slightly altered version of InfoNCE loss through adversarial training. This modified contrastive loss coined AdvInfoNCE, is explicitly designed for robust top- K recommendation. Specifically, we frame hardness learning as an adversarial optimization problem by designing hardness mapping from interactions to hardness and iterating between hardness evaluation and CF recommender refinement.

---

Benefiting from this adversarial framework, our AdvInfoNCE endows two appealing properties. On the one hand, serves as a specialized contrastive loss for top-K collaborative filtering that acknowledges the risk of false negatives while utilizing hard negative mining. Additionally, we theoretically demonstrate through adaptive gradients that AdvInfoNCE subtly employs informative negative sampling (ef. Appendix B.3). On the other hand, we bridge the adversarial hardness learned by AdvInfoNCE with the ambiguity set in distributionally robust optimization (DRO), thereby naturally demonstrating its generalization ability and assuring its robust performance against the noise of false negatives (ef. Theorem 3.1). This furnishes a potential theoretical rationalization for the exceptional robustness observed in contrastive learning. Extensive experiments the out- of-distribution benchmark datasets in top- K recommendation tasks further highlight the capability of AdvInfoNCE in addressing the issue of biased observations. We advocate for AdvInfoNCE to be considered as significant reference loss for future contrastive learning research CF and recommend its adoption standard loss in recommender systems.
2 Preliminary of Contrastive Collaborative Filtering (CF)
Task Formulation. Personalized recommendations aim to retrieve a small subset of items from large catalog to align with the user preference. Here we focus on a typical setting, collaborative filtering (CF) with implicit feedback (e.g., click, purchase, view times, etc.), which can be framed as a semi-supervised top-K recommendation problem [29]. Wherein, the majority of all possible user-item interactions are unobserved, thus previous studies typically assign them with negative labels [29, 30J. Let O+ = ((u, i)lym. = 1] (O- = {(u, i)ly = 0}) be the observed (unobserved) interactions between users 2/ and items I. where you 1 (Wri 0) indicates that user E U has (has not) interacted with item E I. For convenience, let Z = {ilvni = 1} (I₁ = (illuy = 0}) denote the set of items that user u has (has not) adopted before. To overcome the distribution shifts in real-world scenarios [31, 10]. the lontiacting goal is to optimize a robust CF model ÿ : U x R capable of distilling the true preferences of users towards items.
Modeling Strategy. Leading CF models [32-35] involve three main modules: user behavior encoder the (-) T - Rd, an item encoder (e(+) I + Rd, and predefined similarity function +(:-): Rdd x Rd + R, where 0 is the set of all trainable parameters. The encoders transfer the user and item into d-dimensional representations. The similarity function measures the similarity between the user and item in the representation space, whose widely-used implementations include dot product [30], cosine similarity [36], and neural networks [37]. For the sake of simplicity and better interpretation, we set the similarity function in our paper as:
1 (w) de (i)
s(u, i) = vo (1)l /l (i)l
(I)
in which is the Loss Function. Point- and pair-wise loss functions are widely used to optimize the parameters 6:
known temperature [38].
Point-wise losses (e.g., binary cross-entropy [39, 40], mean square error [32)) typically treat
observed interactions O+ as positive instances and all unobserved interactions O- as negatives. CF methods equipped with point-wise loss naturally cast the problem of item recommendations into a binary classification or regression task. However, due to the large scale of indiscriminative unobserved interactions, this type of loss function fails effectively consider the ranking criterion nor efficiently handle false negative instances [41].
Pairwise loss functions (e.g., BPR [30], WARP [42], pairwise hinge loss [43]) aim to differentiate items in a specific relative order. For instance, BPR assumes that the user prefers the positive item over unobserved items. Although effective, these loss functions share a common limitation that lacks sensitivity to label noise and false negatives [22].
Recent CF methods, inspired by the success of contrastive learning (CL) in self-supervised learning tasks, show a surge of interest in contrastive loss:
Contrastive losses (e.g., InfoNCE [16], InfoL. [44], DCL [45], SupCon [46]) enforce the agree- ment between positive instances and the discrepancy between negative instances in the representa- tion space. Separately treating the observed and unobserved interactions as positive and negative
3

---

instances allows us to get rid of data augmentation and directly apply these losses in CF. Here we focus mainly on InfoNCE (also well-known as softmax loss in CF [29]). and our findings could be easily extended to other contrastive losses. Specifically, given a user with positive item and the set of items Iy that has not interacted with, InfoNCH essentially encourages the CF model to satisfy the following ranking criterion:
VEE,, i>
where >u represents the personalized ranking order of user u. We equivalently reformulate this ranking criterion in the semantic similarity space, as depicted in Figure la:
Vj E I s(u,)) s(u, i) 5. 0.
Overall, the objective function of personalized recommendation with InfoNCE loss can be formu- lated as follows:
exp (s(u,
LInfONCE =
Σ log exp (s(u, i)) + EjEN. exp (s(u,
(4)
(u,
where (u, E O+ is an observed interaction between user and item i. In most cases, the number of unobserved items, i.e., [I can be extremely large, thus negative sampling becomes a prevalent solution. The standard process of negative sampling involves uniformly drawing a subset of negative instances, denoted by No. from the unobserved item set Z,
Discussion. Scrutinizing the ranking criterion in Equation (3), we can easily find that InfoNCE cares about the positive item's relative orders with the negative items holistically, while ignoring the ranking relationships among these negatives. Moreover, it simply treats all unobserved interactions as negative items, thus casily overlooking the risk of false negatives [29, 30J. Such oversights impede the performance and generalization ability of InfoNCE-eepoowntt we aim to devise a variant of InfoNCE by considering these factors.
CF models. To bridge the gap,
Methodology of AdvInfoNCE
On the foundation of InfoNCE loss, we first devise AdvInfoNCE, robust contrastive loss tailor-made for Top-K recommendation scenarios. Then we present its desirable properties that underscore the efficacy of negative sampling and generalization ability across distribution shifts. Additionally, we delve into the hard negative mining mechanism of AdvInfoNCE and its alignment with Top-K ranking evaluation metries in Appendix B.3 and B.4, respectively.
3.1 Fine-grained Ranking Criterion
Instead of relying on the coarse relative ranking criterion presented in Equation (3), we learn a fine-grained ranking criterion in Top-K recommendation by incorporating varying degrees of user preferences for different items into the loss function. In other words, we need treat the positive item anchor, quantify the relative hardness of each item as compared with the anchor, and differentiate between false negatives and hard negatives. Here the hardness of a negative item is defined as its minimal similarity distance towards the positive anchor.
For simplicity, we consider a single observed user-item pair (u, i) E O+ from now on. Let us assume that for (u, i), we have access to the oracle hardness ö, of each negative item j E Wy. By assigning distinct hardness scores to different negatives, we reframe a hardness- aware fine- mra-grrined ranking criterion in the semantic similarity space as follows:
(5) Incorporating the hardness scores enables us to exhibit the ranking among negative items (i.e. the larger hardness score 8, the item holds, the less likely the user would adopt it) and endow with better flexibility, compared with InfoNCE in Figure 1a. Specifically, as Figure 1b shows, if 5, > ji is identified as hard negative item with contracted feasible zone, which indicates stringent constraint prompting the model to focus more on ji- Meanwhile, as Figure I depicts, o; < 0. j2 tends to be a false negative item and its feasible zone expands, which characterizes more relaxed constraint. Clearly, the hardness degree òn encapsulates mnaignai ranking criterion for user u, thereby facilitating more accurate recommendation.
Vj E Nr., s(u.j) - s(u, 0 < 0.

---

3.2 Derivation of AdvInfoNCE
The fine- fine-graing sne-grained ranking criterion for single positive interaction (u, as defined in Equation (5),
can be seamlessly transformed into the main part of our AdvInfoNCE:
exp(s(u, i))
(0 {s(u,)) - s(u, i) + +J..JNN. = log exp(s(u, i)) + Σ Σラ exp(o,) exp(s(u,
Fine-grained ranking criterion
AdvInfoNCE
(6)
InfoNCE is a special case of AdvInIoNCE, when Vj. = 0. We briefly outline the main steps of derivation (see Appendix B.1 for the complete derivation):
Derivation Outline. Based on the LogSumExp operator, i.e., max (2) (f1,..., Po log E; cx:();)). the fine-grained ranking criterion could be approximated in different form as (og(exp(()
N1 exp(s(u.j) s(u, a) + 6j)). Consequently, the right-hand side of Equation (6) can be derived by factoring out the negative sign of the logarithm and reorganizing the term.
We would like to highlight the straightforward nature of this derivation, which is achieved without the need for assumptions, but the widely-used LogSumExp operator [47].
However, the oracle hardness 8j is not accessible measurable in real-world scenarios. The challenge, hence, comes to how to automatically learn the appropriate hardness for each negative instance. Inspired by the adversarial training [48], exploit min-max game, which allows train the model alternatively between the prediction of hardness and the refinement of CF model. Formally, taking into account all observed interactions, we cast the AdvlnfoNCE learning framework as the following optimization problem:
exp (s(u, i)) j=1 exp(ofa.0) ((u.)) exp(s(u,,)) (7)
min LAdvInfONCE = min max 0 ACC())
Σ (o.))
log
8
exp (s(u, i)) + Σ W.ll
Here, with a slight abuse of notation, let sf denote the relative hardness of negative item j in contrast with interaction (u, i), and A represent the collective set of all ofw.)) The definition and enlightening explanation of C(n) will be presented in Section 3.3.
3.3 In-depth Analysis of AdvInfoNCE
In spite of the adversarial training framework of AdvInfoNCE, the theoretical understanding in terms of its inherent generalization ability remains untouched. In this section, study it through the lens of distributionally robust optimization (DRO) [49] over negative sampling. From this perspective, AdvInfoNCE focuses the worst-case distribution over high-quality hard negative sampling.
Theorem 3.1. We define 5fu.3) = log(IA.. PL, i))), where p i)) is the probability of sam-
pling negative item j for observed interaction (u, i). Then, optimizing AdvInfoNCE loss is equivalent to solving Kullback- Leibler (KL) divergence-constree constraiind distributionally robust optimization (DRO) problems over negative sampling:
min LAdVIIaNCE 4> min max
Ep Ep(exp(s(u..)) - s(u, : <| P.K
(8)
9
where Po stands for the distribution of uniformly drawn negative samples, i.e,, (u, P denotes the distribution of negative sampling pl] i)).
For brevity, we present a proof sketch summarizing the key idea here and delegate the full proof to Appendix B.2.
Proof. By defining 0/1x0)) = log(INul pu, f))), we have 1 Null [.. xf = -DLL (Pu (Pol PP).
Therefore, by rearranging the terms, optimizing AdvInfoNCE can be restated as a standard DRO
5

---

problem:
min LAdvInIONCE = min max AEC())
Σ
log + Willl
Σ p(i(u, exp(s(u,)) - s(u,
(u,
min
sup (u.j)E++ P(l((u,))
Σ
Ep Eplexp(s(u..) -((, [)], s.t. DRL(PollP) S
We now turn our attention to the role of C(r) and its relationship with the ambiguity set P in DRO. The ambiguity set is formulated by requiring the distribution of negative sampling to fall within a certain 77 distance from the uniform distribution, defined below:
P = (u, i)) E [
[ + + DKL (Po( = [ }}
-log(1
(9)
where serves as the hyperparameter to regulate the deviation of the negative sampling distribution from the uniform distribution. In terms of implementation, c controlled by the number of adversarial training epochs (see Algorithm 1). Clearly, C(n) is an equal counterpart to the ambiguity set IP.
Discussion. Grounded by theoretical proof, understand the generalization ability of Ad- vInfoNCE through the lens of DRO over informative negative sampling. In essence, by learning the hardness in adversarial manner, AdvInfoNCE effectively enhances the robustness of the CF recommender. Moreover, apart from the robustness of AdyInfoNCE: (see Section 3.3), we also identify its hard negative mining mechanism through gradients analysis (see Appendix B.3) and its alignment with top-K ranking evaluation metrics (see Appendix B. B.4). Specifically, the gradients con- cerning negative samples are proportional the hardness term exp(o)). indicating that AdvInfoNCE is hardness-awar aware loss. To some extent, our AdvInfoNCE is equivalent to the widely-adopted Discounted Cumulative Grain (DCG) ranking metric.
Limitation. AdvInfoNCE employs end-to end negative sampling in an adversarial manner, com- pelling the recommender ensure robustness from the worst-case scenario. Despite its empirical success and desirable properties, AdvInfoNCE, is not immune to the limitations of adversarial training, which is well-known for its potential training instability.
4
Experiments
We aim to answer the following research questions:
RQI: How does AdvinfoNCE perform compared with other CL-based CF methods?
RQ2: Can AdvInfoNCE effectively learn the fine-grained ranking criterion? What are the impacts of the component (i.e., the number of adversarial training epochs) on AdvInfoNCE?
Baselines. Two high-performing encoders ID-based (MF [50]) and graph-based (LightGCN [51] are selected as CF backbone models. We thoroughly compare AdvInfoNCE with two categories of
the latest CL-based CF methods: augmentation- based baselines (SGL [13], NCL [52]. XSimGCL [27]) and loss- based basclines (CCL [53], BC Loss [54], Adap-r [55]). See detailed introduction and comparison of baselines Appendix A.
To verify the generalization ability of AdvInfoNCE, we conduct extensive experiments three standard unbiased datasets (KuaiRec [56], Yahoo!R3 [57], Coat [58]) and one synthetic dataset (Tencent [10]). We employ three commonly used metrics (Hit Ratio (HR @ K), Recall K, Normalized Discounted Cumulative Gain (NDCG@ K)) for evaluation, with K by default at 20. Please refer to Appendix C and D for more experimental results over additional backbones, additional baselines, and an intuitive understanding of AdvInfoNCE.
Datasets.
4.1 Overall Performance Comparison (RQ1)
4.1.1 Evaluations on Unbiased Datasets
Motivation. Evaluating the efficacy and generalization ability of CF models based on partially observed interactions collected from existing recommender system is rather challenging [59]. This is

---

Table 1: The performance comparison unbiased datasets over the LightGCN backbone. The improvement achieved by AdvInfoNCE is significant (p-value << 0.05).
KuniRec
Yshoo!R3
Cout
Recall
NDCG
Recall
NDCG
Recall
NDCG
BPR (Rendle et al, 2012)
0.1652
0.3905
0.1487
0.0697
0.2737
0.1707
InfoNCE den Oord et 2018)
0.1800
0,4529
0:1475
0.0858
0,2689
0.1882
SGL (Wa et at., 2021)
0.1829"1:015
0.1588
0.1583-1.199
0.1474 9008
0.0682
0.2737
0,1716 8.503
NCL (Lin et 2022)
0.1764 -2005
0.4478
-1-13%
0.1407-1.018
0.1407
0. 0.0609
0.2778
0.1739
11773-77-00
XSimGCI. (Yu ol., 2022)
0.1907
0.4531
+00044
0.1503
0.0708 -1-436
0.2729 --4000
0.1655
12.05%
CCL (Mao at,,, 2021)
0.1776 11305
0.4497-3
9115
0.1453 10R8
0.0676-3311
0.2732 20005
0.1941
1306
BC Loss (Zhang et al., 2022)
0.1799 -0000
0.1417
2:477%
0.1498
0.0703 9..70
0.2719
0,1921
12.078
Adap-r (Chen ot al,, 2023)
0.17177 1001
0.4323
1.50%
0.1516-2.766
7.00
0.0704
0.070--9-00
0:2700-0:1136
0.1957 900
AdvInfoNCE
0.1979 +9.94%
0,4697 9-373
0.1527 +5.0956
0
0.0718*-2.475
0.2846 +0.649%
0.2026*17.609
primarily due to the exposure bias of the recommender system confounding the observed data. To
address this issue, some researchers propose using unbiased evaluations [57, 58). In these datasets, items in the test set are randomly exposed to users, while partially observed interactions are still used for training. The distribution shift between training and testing enables a fair evaluation of the generalization ability of CF methods in out-of-distribution tasks.
Results. Tables 1 and 4 present a comparative analysis of the performance on standard unbiased datasets over the LightGCN and MF backbones. The best best-performing methods per test are bold and starred, while the second-best methods are underlined. The red and blue percentages respectively refer to the increase and decrease of CF methods relative to InfoNCE in each metric. We observe that:
CL.-based CF methods have driven impressive performance breakthroughs compared with BPR in most evaluation metries. This aligns with findings from prior research [27, 54] that con- trastive loss significantly boosts the generalization ability of CF methods by providing informative contrastive signals. In contrast, BPR loss, which focuses on pairwise relative ranking, often suffers from ineffective negative sampling [30] and positive-unlade unlabeled issues [21].
Contrastive loss, rather than graph augmentation, plays more significant role in enhancing the generalization ability of CF models. We categorize CL-based CF baselines into two research lines: one adopts user-item bipartite graph augmentation along with augmented views as positive signals (referred to as sugmentation-basee loss using interacted items positive instances (referred to as loss-based). Surprisingly, our results reveal no substantial difference between the performance of augmentation- and loss-based methods. This finding provides further evidence in support of the claim made in prior studies [27, 26] that, specifically in CF tasks, the contrastive loss itself is the predominant factor contributing to the enhancement of a CF model's generalization ability.
and another focuses solely on modifying contrastive
AdvInfoNCE consistently outperforms the state-of-the-art CL.-based CF baselines in terms of all metrics on all unbiased datasets. AdvInfoNCE shows an improvement ranging from 3.53% to 9.94% on Recall 20 compared to InfoNCE. Notably, AdvInfoNCE gains the most on the fully-exposed dataset, KuaiRec, which is considered contrast, most of the CL-based CF methods underperform relative to InfoNCE and behave in an unstable manner when the testing distribution shifts. This clearly indicates that AdvInfoNCE greatly enhances the robustness of the CF model in real-world scenarios. We attribute this improvement to the fine- graiiga ranking criterion of AdvInfoNCE that automatically differentiates hard and false negative samples. Additionally, as shown in Table 9, AdvInfoNCE only adds negligible time complexity compared to InfoNCE
ideal offline A/B testing, In
4.1.2 Evaluations on Various Out-of-distribution Settings
Motivation. In real-world scenarios, recommender systems may confront diverse, unpredictable, and unknown distribution shifts. We believe that a good recommender with powerful generalization ability should be able to handle various degrees of distribution shift. Following previous work [10], we partition the Tencent dataset into three test sets with different out-of-distribution degrees. Here, a higher y value signifies greater divergence in distribution shift (for more details on the experimental settings, see Appendix C. We evaluate all CF methods with identical model parameters across all test sets, without knowing any prior knowledge of the test distribution beforehand.
7

---

Table 2: The performance comparison the Tencent dataset over the LightGCN backbone. The
improvement achieved by AdvInfoNCE is significant (p-value << 0.05).
2001
= 10
2
Validation NDCG
HR
Recall
NDOG
HR
Recall
NDCG
HR
Recall
NDCG
BPR (Rendio ct al. 2012)
0.1141
0.0416
0.0233
0.0720
0.0262
0.01:1
0.0501
0.0186
0.0109
0.0673
InfoNCE Evan den Oord et al,, 2018)
0.1456
0.0540
0.0020
0.0024
0.0332
0.0195
0.0646
0,0242
0.0145
0.0854
SGL 2021)
0.0455
0.0756
0.0157
0.0517
0,0729
NCI. (1 at, 2022)
0.1182
0.0413
0.8226
0.0734
0.0274
0.0145
0.0511
0.0189
0.0123
0.0009
XSimOCL (Yo ct all,, 2022)
0.1392
0.0501
0.0273
0.0830
0.0297
0.0160
0.0539
0.0203
0.0110
0.0873
CCI.MMa 2021)
0.1372
0.0516
0.0318
0.0025
0,0350
0.0221
0.0683
0.0299
0.0170
0,0782
Loss (Zhang at. 2022)
0.1513
0.0562
0.0041
0.0884
0.0396
0,0216
0.0682
0,0817
Adap-r (Chen et nl. 2023)
0.1488
0.0537
0.0317
0.8340
0.18338
0.0200
0.0642
0.0231
0.0143
0.0852
AdvInfoNCE.
0.1600
0.0594
0.03566
0.1087
0.04033
0.0243
0.0774
0
0
0.0879
Imp..8 over the strongest baselines
5.74%
5.75%
4.53%
10.50%
10.11%
9.95%
13.32%
5.88%
Imp.5 56 over InfoNCE
7.61%
10.00%
11.25%
17.64%
21.39%
24.62%
10.91%
21.90%
24.14%
16025
n/44
1.39
Average p0lto, 1))
0.0.0
Re
0.122
IuSvCE:: Rand
Align Loss
1.25
0.15
115
00000
0:04
1.0
0.00
100
1.35
Item popalarity degree
Epochs
Uniform Loss
(a) Distribution of hardness
(b) Varying hardness strategies
(c) Alignmennt & uniformity analysis
Figure 2: Study of hardness. (2a) Illustration of hardness i.e. the probability of negative sampling (p (il (u, i))) learned by AdvInfoNCE w.rl. item popularity on Tencent. The dashed line represents the uniform distribution. (2b) Performance comparisons with varying hardness learning strategies on Tencent (7 = 10). (2c) The trajectories of align loss and uniform loss during training progress. Lower values indicate better performance. Arrows denote the losses' changing directions.
Results. As illustrated in Tables 2 and 5, AdvInfoNCE yields consistent boost compared to all SOTA baselines across all levels of out-of-distribution test sets. In particular, AdvInfoNCE substantially improves Recall @ 20 by 10.00% to 21.90% compared to InfoNCE and by 5.75% to 10.90% compared to the second- best baseline. It's worth noting that AdvInfoNCE gains greater improvement on test sets with higher distribution shifts, while all CL-based CF baselines suffer significant performance drops due to these severe distribution shifts. We attribute this drop to the coarse relative ranking criterion which injects erroneously recognized negative instances into contrastive signals. In contrast, benefiting from the effective adversarial learning of the fine- ane-grained ranking criterion, AdvInfoNCE can achieve 24.14% improvement over InfoNCE w.E.t. NDCG@20 20 when y = 2, fully stimulating the potential of contrastive loss. These results validate the strong generalization ability of AdvInfoNCE as demonstrated in Theorem 3.1, proving that optimizing AdvinfoNCE is equivalent solving DRO problems constrained by KL divergence over high-quality negative sampling.
4.2 Study on AdvInfoNCE (RQ2)
4.2.1 Effect of Hardness
Motivation. To evaluate the effectiveness of the fine-grained hardness-aware ranking criterion leamned by AdvInfoNCE, and further investigate whether it truly enhances the generalization ability of CF models, we conduct a comprehensive analysis on the Tencent dataset. This analysis contains three-fold: it studies the distribution of hardness (i.e., examining the negative sampling strategy of AdvInfoNCE); the performance trend over varying hardness learning strategies; and conducting an analysis of the alignment and uniformity properties of representations over varying hardness learning strategies. Additional experiments on the KuaiRec dataset, exhibiting similar trends and findings, can be found in Appendix D.2.
Distribution of hardness, aka. negative sampling strategy. As elucidated in Theorem 3.1, learning
the hardness g(u.i) in an adversarial manner essentially conducts negative sampling. Inspired by item popularity- based negative sampling strategies [60-62], we probe into the relationship between adversarial negative sampling of AdvInfoNCE and the popularity of negative items. Figure 2a
8

---

0.15
Validation Recalli000
2.5
Recallig20
0:34
Fall eoerid
V-14
6.22
Fart tastrreenell
Tarha
e430 Rocallig
OOD Recallig 20:200
Validation Rocalligg
000 Recall
8:30
0:17
Validation
0.15
0:2
8:31
Epochs
Epochs
Epochs
(a) End carly-stage
(b) End at mid-stage
(c) End at late-stage
Figure 3: The performance on the in in-disributtin validation set and out-of-distributie test sets of Tencent. The total number of epochs of adversarial training is gradually increasing from (a) to (c), and the green star denotes the timepoint when we terminate adversarial training.
depicts skewed negative sampling distribution that focuses more on popular negative items and de-emphasizes the hardness of unpopular negative items, which are likely to be false negatives. These results highlight two findings. Firstly, in line with [61], only minor portion of negative instances are potentially important for model learning, while a vast number of negatives are false negatives. Secondly, more frequent items constitute better hard negatives, which is consistent with the findings in previous work [60]. This appularity-oorellaeee negative sampling validates that AdvInfoNCE automatically mitigates the influence of popularity bias during training, alleviates the overlook of false negatives in CF, and utilizes high-quality hard negative mining.
Performance over varying hardness learning strategies. Figure 2b clearly demonstrates that distilling the fine-grained hardness of negative items (AdvInfoNCE) is excelling over the uniformly random hardness (InfoNCE+Rand) equal hardness (InfoNCE), and reversed fine-grained hardness InnnnoooN++Reeeee throughout the training process. This validates AdyInfoNCE's ability to simultaneously filter and up-weight more informative hard negatives while identifying and down- weighting the potential false negatives. These desired properties further enable AdvInfoNCE to extract high-quality negative signals from large amount of unobserved data.
Alignment and uniformity analysis. is widely accepted that both alignment and uniformity necessary for a good representation [5]. We, therefore, study the behavior of AdvInfoNCE through the lens of align loss and uniform loss, as shown in Figure 2c. AdvInfoNCE improves uniformity while maintaining similar level of alignment as InfoNCE, whereas reversed fine-grained hardness significantly reduces representation uniformity. These findings underscore the importance of fine-gra -ra-ggai hardness, suggesting that AdvInfoNCE learns more generalized representations.
4.2.2 Effect of the Adversarial Training Epochs
The critical hyperparameter, the number of adversarial training epochs, controls the degree of deviation from uniform negative sampling. As illustrated in Figure 3a through 3b, improved out-of- distribution performance correlates with an increased adversarial learning period. On the other hand, Figures 3b through 3c show that overly prolonged adversarial training can also degrade performance on in-distribution validation sets. Therefore, it crucial to devise proper adversarial training period tailored to specific datasets, which aligns with the limitation of AdvInfoNCE. Consistent observations can be found KuaiRec in Appendix D.3.
5 Conclusion
Despite the empirical successes, the profound understanding of contrastive loss in collaborative filtering (CF) remains limited. In this work, we devised a principled AdvInfoNCE loss specially tailored for CF methods, utilizing fine- iie-ggrined hardness-awand ranking criterion to enhance the recommender's generalization ability. Grounded by theoretical proof, AdvInfoNCE empowers top- K recommendations via informative negative sampling in an adversarial manner. We believe that our AdvInfoNCE, as a variant of InfoNCE, provides a valuable baseline for future contrastive beasning-bseed CF studies and is important stepping stone toward generalized recommenders.

---

Acknowledgments and Disclosure of Funding
This research supported by the NExT Research Center, the National Natural Science Foundation of China (92270101 14), the University Synergy Innovation Program of Anhui Province (GXXT- 2022-040), and the MOE Project of Key Research Institute of Humanities and Social Sciences (200).)0001).
References
[1] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey E. Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020.
[2] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross B. Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020.
[3] Jure Zbontar, Li Jing, Ishan Misra, Yann LeCun, and Stéphane Deny. Barlow twins: Self- supervised learning via redundancy reduction. In ICML, 2021.
[4] Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. In CVPR, 2021.
[5] Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In ICML, 2020.
[6] Xin Xia, Hongzhi Yin, Junliang Yu, Qinyong Wang, Lizhen Cui, and Xiangliang Zhang. Self- supervised hypergraph convolutional networks for session-based recommendation. In AAAI, 2021.
[7] Hongrui Xuan, Liu, Bohan Li, and Hongzhi Yin. Knowledge enhancement for contrastive multi-behavior recommendation. In WSDM, 2023.
[8] Junliang Yu, Hongzhi Yin, Jundong Li, Qinyong Wang, Nguyen Quoc Viet Hung, and Xi- angliang Zhang. Self-supervised multi-channel hypergraph convolutional network for social recommendation. WWW, 2021.
(9] Kun Zhou, Hui Wang, Wayne Xin Zhao, Yutao Zhu, Sirui Wang. Fuzheng Zhang, Zhongyuan Wang, and Ji-Rong Wen. 3*3-rec: Self-supervised learning for sequential recommendation with mutual information maximization. CoRR, fats/2008.078777 2020.
[10] An Zhang, Jingnan Zheng, Xiang Wang, Yancheng Yuan, and Tat seng Chua. Invariant collaborative filtering to popularity distribution shift. In wWW, 2023.
[11] An Zhang, Wenchang Ma, Jingnan Zheng, Xiang Wang, and Tat-Seng Chua. Robust collab- orative filtering to popularity distribution shift. ACM Transactions Information Systems, 2023.
[12] Jin Chen, Defu Lian, Binbin Jin, Xu Huang, Kai Zheng, and Enhong Chen. Fast variational autoencoder with inverted multi-index for collaborative filtering. In Www, 2022.
[13] Jiancan Wu, Xiang Wang. Fuli Feng, Xiangnan He, Liang Chen, Jianxun Lian, and Xing Xie. Self-super Self-supervised graph learning for recommendation. In SIGIR, 2021.
[14] Chang Zhou, Jianxin Ma. Jianwei Zhang, Jingren Zhou, and Hongxia Yang. Contrastive learning for debiased candidate generation in scale recommender systems. In KDD, 2021.
[15] Lianghao Xia, Chao Huang, Chunzhen Huang, Kangyi Lin, Tao Yu, and Ben Kao. Automated self-supervised learning for recommendation. www, 2023.
[16] Aäron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. CoRR, abs/1807 hts//8877033745 2018.
[17] Wentao Shi, Jiawei Chen, Fuli Feng. Jizhi Zhang, Junkang Wu, Chongming Gao, and Xiangnan He. On the theories behind hard negative sampling for recommendation. In WWW, 2023.
10

---

[18] Defu Lian, Qi Liu, and Enhong Chen. Personalized ranking with importance sampling. In WWW, 2020.
[19] David T. Hoffmann, Nadine Behrmann, Juergen Gall, Thomas Brox, and Mehdi Noroozi. Ranking info noise contrastive estimation: Boosting contrastive learning via ranked positives. In AAAI, 2022.
[20] Jiawei Chen, Hande Dong, Xiang Wang. Fuli Feng, Meng Wang, and Xiangnan He. Bias and debias in recommender system: A survey and future directions. CoRR, abs/2010.03240, 2020.
[21] Xiaojie Wang, Rui Zhang, Yu Sun, and Jianzhong Qi. Doubly robust joint learning for recom- mendation on data missing not at random. In H,ML,,,,00 2019.
[22] Chenxiao Yang. Qitian Wu, Jipeng Jin, Xiaofeng Gao, Junwei Pan, and Guihai Chen. Trading hard negatives and true negatives: A debiased contrastive collaborative filtering approach. In IJCAI, 2022.
[23] Weiran Huang, Mingyang Yi, and Xuyang Zhao. Towards the generalization of contrastive self-supervised learning. In ICLR, 2023.
[24] Kendrick Shen, Robbie M. Jones, Ananya Kumar, Sang Michael Xie, Jeff Z. HaoChen, Tengyu Ma, and Percy Liang. Connect, not collapse: Explaining contrastive learning for unsupervised domain adaptation. In ICML, 2022.
[25] Dongha Lee, SeongKu Kang, Hyunjun Ju. Chanyoung Park, and Hwanjo Yu. Bootstrapping user and item representations for one-class collaborative filtering. In SIGIR, 2021.
[26] Junliang Yu, Hongzhi Yin, Xin Xia, Tong Chen, Lizhen Cui, and Quoc Viet Hung Nguyen. Are graph augmentations necessary?: Simple graph contrastive learning for recommendation. In SIGIR, 2022.
[27] Junliang Yu, Xin Xia, Tong Chen, Lizhen Cui, Nguyen Quoc Viet Hung, and Hongzhi Yin. Xsimgel: Towards extremely simple graph contrastive learning for recommendation. CoRR, 0es/2209.02544, 2022.
[28] Junkang Wu, Jiawei Chen, Jiancan Wu, Wentao Shi, Xiang Wang, and Xiangnan He. Under- standing contrastive learning via distributionally robust optimization. In NeurIPS, 2023.
[29] Ychuda Koren, Steffen Rendle, and Robert M. Bell. Advances in collaborative filtering. In Recommender Systems Handbook, pages 91-142. Springer US, 2022.
[30] Steffen Rendle, Christoph Freudenthaler, Zeno Gantner, and Lars Schmidt- Schmidt-Thieme, BPR: bayesian personalized ranking from implicit feedback. CoRR, 21111200226611. 2012.
[31] Yue He, Zimu Wang, Peng Cui, Hao Zou, Yafeng Zhang, Qiang Cui, and Yong Jiang. Causpref: Causal preference learning for out-of-distribtiion recommendation. In wwW, 2022.
[32] Yehuda Koren. Factorization meets the neighborhood: multifaceted collaborative filtering model. In KDD, 2008.
[33] Dawen I Liang, Rahul G. Krishnan, Matthew D. Hoffman, and Tony Jebara. Variational autoen- coders for collaborative filtering. In WWW, 2018
[34] Xiang Wang, Xiangnan He, Meng Wang, Fuli Feng, and Tat-Seng Chua. Neural graph collabo- rative filtering. In SIGIR, 2019.
[35] Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L. Hamilton, and Jure Leskovec. Graph convolutional neural networks for web-scale recommender systems. In KDD, 2018.
[36] Steffen Rendle, Walid Krichene, Li Zhang, and John R. Anderson. Neural collaborative filtering vs. matrix factorization revisited. In RecSys, 2020.
[37] Xiangnan He, Lizi Liao, Hanwang Zhang, Liqiang Nie, Xia Hu, and Tat-Seng Chua. Neural collaborative filtering. In WWW, 2017.

---

[38] Feng Wang and Huaping Liu. Understanding the behaviour of contrastive loss. In CVPR, 2021.
[39] Ying Shan, T. Ryan Hoens, Jian Jiao, Haijing Wang. Dong Yu, and J. C. Mao. Deep crossing:
Web-scale modeling without manually crafted combinatorial features. In KDD, 2016.
[40] Immanuel Bayer, Xiangnan He, Bhargav Kanagal, and Steffen Rendle. A generic coordinate descent framework for learning from implicit feedback. In WWW, 2017.
[41] Steffen Rendle, Item recommendation from implicit feedback. In Recommender Systems Handbook, pages 143-171. Springer US, 2022.
[42] Jason Weston, Samy Bengio, and Nicolas Usunier. WSABIE: scaling up to large vocabulary image annotation. In IJCAI, 2011.
[43] Cheng- Hsieh, Longqi Yang, Yin Cui, Tsung- Yi Lin, Serge Belongie, and Deborah Estrin. Collaborative metric learning. In WWW, 2017.
[44] Ben Poole, Sherjil Ozair, Aäron van den Oord, Alexander A. Alemi, and George Tucker. On variational bounds of mutual information. In JCML, 2019.
[45] Chun-Hsiao Yeh, Cheng- Yao Hong, Yen-Chi Hsu, Tyng-Luh Liu, Yubei Chen, and Yann LeCun. Decoupled contrastive learning. In ECCV, 2022.
[46] Prannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna, Yonglong Tian, Phillip Isola, Aaron Maschinot, Ce Liu, and Dilip Krishnan. Supervised contrastive learning. In NeurIPS, 2020.
[47] Carlo Alberto Barbano, Benoit Dufumier, Enzo Tartaglione, Marco Grangetto, and Pietro Gori. Unbiased supervised contrastive learning. In /CLR, 2023.
[48] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu, Towards deep learning models resistant to adversarial attacks. In ICLR, 2018.
[49] Zhaolin Hu and I. Jeff Hong. Kullhack-leibler divergence constrained distributionally robust optimization. Available at Optimization Online, 1(2):9, 2013.
[50] Ychuda Koren, Robert M. Bell, and Chris Volinsky. Matrix factorization techniques for recom- mender systems. Computer, 42(8):30-37, 2009.
[51] Xiangnan He, Kuan Deng, Xiang Wang, Yan Li, Yong-Dong Zhang, and Meng Wang. Lightenn: Simplifying and powering graph convolution network for recommendation. In SIGIR, 2020.
[52] Zihan Lin, Changxin Tian, Yupeng Hou, and Wayne Xin Zhao. Improving graph collaborative filtering with neighborhood-enniihet contrastive learning. In WWW, 2022.
[53] Kelong Mao, Jieming Zhu, Jinpeng Wang, Quanyu Dai, Zhenhua Dong, Xi Xiao, and Xiuqiang He. Simplex: A simple and strong baseline for collaborative filtering. In CIKM, 2021.
[54] An Zhang, Wenchang Ma, Xiang Wang, and Tat-Seng Chua. Incorporating bias-aware margins into contrastive loss for collaborative filtering. In NeurlPS, 2022.
[55] Jiawei Chen, Junkang Wu, Jiancan Wu, Xuezhi Cao, Sheng Zhou, and Xiangnan He. Adap-r: Adaptively modulating embedding magnitude for recommendation. In WWW, 2023.
[56] Chongming Gao, Shijun Li, Wenqiang Lei, Jiawei Chen, Biao Li, Peng Jiang, Xiangnan He, Jiaxin Mao, and Tat-Seng Chua. Kuairec: A fully-observed dataset and insights for evaluating recommender systems. In CIKM, 2022.
[57] Benjamin M. Marlin and Richard S. Zemel. Collaborative prediction and ranking with non- random missing data. In RecSys, 2009.
[58] Tobias Schnabel, Adith Swaminathan, Ashudeep Singh, Navin Chandak, and Thorsten Joachims. Recommendations as treatments: Debiasing learning and evaluation. In ICML, 2016.
[59] Yuta Saito, Suguru Yaginuma, Yuta Nishino, Hayato Sakata, and Kazuhide Nakata. Unbiased recommender learning from missing-not-at-randde not-at-random implicit feedback. In WSDM, 2020.
12

---

[60] Hugo Caselles-Dupiie Florian Lesaint, and Jimena Royo-Letelier. Word2vec applied to recom- mendation: hyperparameters matter. RecSys, 2018.
[61] Ting Chen, Yizhou Sun, Yue Shi, and Liangjie Hong. On sampling strategies for neural network-based collaborative filtering. In KDD, 2017.
[62] Steffen Rendle and Christoph Freudenthaler. Improving pairwise learning for item recommen- dation from implicit feedback. In WSDM, 2014.
[63] Hao Tang, Guoshuai Zhao, Yuxia Wu, and Xueming Qian. Multi-sample based contrastive loss for top-k recommendation. IEEE Transactions on Multimedia, 2021.
[64] Zhuang Liu, Yunpu Ma. Yuanxin Ouyang, and Zhang Xiong. Contrastive learning for recom- mender system. CoRR, abs/2101.01111, 2021.
[65] Tiansheng Yao, Xinyang Yi, Derek Zhiyuan Cheng, Felix X. Yu, Ting Chen, Aditya Krishna Menon, Lichan Hong, Ed H. Chi, Steve Tjoa, Jieqi (Jay) Kang, and Evan Ettinge.. Self- supervised learning for large-scale item recommendations. In CIKM, 2021.
[66] Lianghao Xia, Chao Huang, Yong Xu, Jiashu Zhao, Dawei Yin, and Jimmy X. Huang. Hyper- graph contrastive collaborative filterin.. In SIGIR, 2022.
[67] Haoxuan Li, Yi Bin, Junrong Liao, Yang Yang, and Heng Tao Shen. Your negative may not be true negative: Boosting image-text matching with false negative elimination. In ACM MM, 2023.
[68] Jiancan Wu, Xiang Wang, Xingyu Gao, Jiawei Chen, Hongcheng Fu, Tianyu Qiu, and Xi- angman He. On the effectiveness of sampled softmax loss for item recommendation. CoRR, abs/2201 023227, 2022.
[69] Kelong Mao, Jieming Zhu, Xi Xiao, Biao Lu, Zhaowei Wang, and Xiuqiang He. Ultragen: Ultra simplification graph convolutional networks for recommendation. In CIKM, pages 1253-1262. ACM, 2021.
[70] Thomas N. Kipf and Max Welling. Variational graph auto-encoders. CoRR, abs/1611.07300 2016.
[71] Hongyi Wen, Xinyang Yi, Tiansheng Yao, Jiaxi Tang. Lichan Hong, and Ed H Chi. Distributionally-rooo recommendations for improving worst-case user experience. In WWW, 2022.
[72] Jin Chen, Defu Lian, Yucheng Li, Baoyun Wang, Kai Zheng, and Enhong Chen. Cache- augmented inbatch importance resampling for training recommender retriever. In NeurIPS, 2022.
13

---

A Related Work
We remind important related works understand how AdvInfoNCE stands and its role in rich literature, Our work is related to the literature on contrastive rearning-based collaborative filtering (CL-based CF) methods, and theoretical understanding of contrastive loss in collaborative filtering.
A.1 Contrastive Learning-basee based Collaborative Filtering
The latest CL-based CF methods can roughly fall into two research lines. The first one, which we term the "augmentation-bass"""" basood" approach, leverages user-item bipartite graph augmentations along with augmented views as positive signals. The second category, referred to as "loss-based" approaches, mainly focuses the modification of contrastive loss. In loss-based CF models, interacted items serve as positive instances.
Augmentation-hased [13-15, 52, 26, 27, 63-66]. The prevailing augmentation- paradigm in CL-based CF methods is to employ user-item bipartite graph augmentations to generate contrasting views. These contrasting views are then treated as positive instances in the application of contrastive loss, such as InfoNCE loss, to further enhance collaborative filtering signals. Recent studies have extensively explored methods for generating contrastive views. Several studies like SGL [13] and DCL [64] elaborate on data-heuristic augmentation operators such as a random node or edge dropout and random walk. NCL [52] takes different approach and incorporates potential neighbors from both the graph structure and semantic space into contrastive views. XSimGCL [27] takes step further and discards ineffective graph augmentations, choosing instead employ simple nasee embedding augmentation. In pursuit of high-quality augmented supervision signals instead of handcrafted strategies, AutoCF [15] designs learnable masking function to automatically identify important centric nodes for data augmentation.
Loss-based [53-55, 22, 67]. Recent research, such as the experiments presented SimGCL [26] and XSimGCL [27]. has empirically shown that contrastive loss can be instrumental in enhancing the performance of CF methods, often playing a more significant role than heuristic-based graph augmentation. Despite these findings, there remains gap in the exploration of loss-based CF methods, an area ripe for further investigation. BC loss [54] incorporates bias-aware margins into the contrastive loss, enabling the learning of high-quality head and tail representations with robust discrimination and generalization abilities. Adap-r [55] proposes an adaptive fine ame-grained strategy for selecting the personalized temperature т for each user within the contrastive loss. HDCCF [22] devises a new contrastive loss function extending the advantage of negative mining from user-item neighbored users and items.
A.2 Theoretical Understanding of Contrastive Loss in CF
Despite the remarkable success of CL-based CF methods, there remains a lack of theoretical un- derstanding, particularly regarding the superior generalization ability of contrastive loss. In a study conducted by [68], three model-agnostic advantages contrastive loss are theoretically revealed, including mitigating popularity bias, mining hard negative samples, and maximizing the ranking metric. CL.eec [14] sheds light on contrastive loss from a bias-reduction perspective by revealing its connection with inverse propensity weighting techniques. XSimGCL [27] suggests that contrastive learning enables the recommender to learn more evenly distributed user and item representations, thereby mitigating the prevalent popularity bias in CF.
B In-depth Analysis of AdvInfoNCE
B.1 Complete Derivation of AdvInfoNCE
Full Derivation. We first introduce the widely-used LogSumHxp operator in machine learning algorithms.
max(21, 02, ..,. z log(exp(x1) + exp(x2) + + exp(x.))
(10)
The fine-grained ranking criterion for a single positive interaction (u, i) is defined as:
Vj E No. s(u,j) - s(u, 2) + < 0.
(11)
14

---

Then we probe into the Eq (11) and transform it into an optimization problem as follows:
min max [0, {s(u,j) s(u. i) + {JJeE,
(12)
We can seamlessly transform this optimization objective into the core component of our AdvInfoNCE:
W
[O, {) - s(u, + 5y)seN. = log(exp(()
- + +,))
==1
Hardness
ranking criterion
W
log
Σ j=1
exp(o)) exp(s(u,)) s(((
IN
exp(oj)
=log(1 + [Wi
exp(s(u,,) - s(u, i))3
Wel
exp(s(u, i))
log
exp(s(u, i)) + [ Σ 2 explo,)
NN..l exp(s(u,
AdvInfiNCE
(13)
Drawing inspiration from adversarial training [48], we utilize min-max game that allows for alternating training the model between predicting hardness and refining the CF model. Formally, we formulate the AdvInfoNCE learning framework the following optimization problem:
exp (s(u,))
min LAdvIniONCE = min max AEC(m)
log
(v,))0++
exp (s(u, W.
W
exp(6
exp(s(u,
N.
(14)
exp(ofu.)) where [N,. E C(n, (u, (N..) - W.I. + c). and e is a hyperparameter that regulates the
upper-bound deviation of hardness. In practice, is regulated by the number of adversarial training epochs under a fixed learning rate (refer to Algorithm 1).
exp(6(u.9)
we further define [. as p(il(u, i)), which signifies likelihood of selecting item j as negative sample for the user-item pair (u, i), we can rewrite the AdvInfoNCE loss as:
exp (s(u, i)) W
min LAdvInIINCE = min max-
Σ
log exp (s(u, + WM, Σ/ p(iluu, i)) exp(s(u,
p(-1-)
(u.3E0
(15)
B.2 Proof of Theorem
Theorem 3.1. We define 8/u..) = log(INa) ((i((,,))) i))) where p(llu,, (u) is the probability of sam-
pling negative item j for observed interaction (u, i). Then, optimizing AdvinfoNCE loss is equivalent to solving Kullback- Kullback-Leibler (KL) divergence-constraiieed distributionally robust optimization (DRO)
problems over negative sampling:
min LAdebfaNCE
> min max P(((E))
Brlexp(s(uu.) : <n)
(8)
where Po stands for the distribution of uniformly drawn negative samples, i.c., Polj (u, i)) P denotes the distribution of negative sampling pL, (u, i)).
p..
Proof. We denote the relative hardness of negative item j with respect to observed interaction (u, i) of (().)) and redefine it log(INal p(il(u, i))). In this definition, [Nu is the number of negative
15

---

samples for each user u, and (u, i)) is the probability of selecting item j as negative sample for given user-item pair (u, 2).
With the constraint that 1. j= pull(u, i)) = 1, we can recalculate the average hardness as follows:
NJ W
Σ
log(lNNal p(i((u, 8)))
W.
log(
W
[W p(l(,,
5=1
-Dok(PPolPP)
(16)
In this formulation, Po represents the distribution of uniformly drawn negative samples, where Poli((u,)) W.T. Mcanwhile, P denotes the distribution of negative sampling, represented as p(llu, i))-
Thus, Since p(l i)) E C(n. (u, ()) = (N..) [waT + +c), we further define = -lo - W the feasible zone presented above equivalent to relaxed constraint DxL(PolIP) S 17.
2
The AdvInfoNCE loss for all observations can be rewritten in a different form by reorganizing and simplifying the Eq (15):
NV púl(u, i)) exp(s(u, - s(u, i))
min LAdvInfaNCE = min Σ (u.))E++
max log + W
Σ
P(l(a.)))
W.
min Σ
Σ
p p(il(u, i)) exp(s(u,j) s(u,i))
P(l(),)))
(
- min (u.0)0++ P(lK
Σ
sup
Ep Ep(exp(s(u,,)) - s(u, 1))
(17)
The equation presented above exemplifies a widely encountered formulation of the Distributionally Robust Optimization (DRO) problem [49] where the ambiguity set of the probability distribution is defined by the Kullback-Leibler (KI.) divergence ( P) S n)-
B.3 Gradients Analysis
In this section, we delve into the crucial role of hardness 8, in controlling the penalty strength on hard negative samples. The analysis begins with the main part of AdvInfoNCE for single positive interaction (u, i). as defined in Eq (13), primarily due to its simplicity. For the sake of notation simplicity, let us denote it as:
exp(s(u, i))
(s logí exp(s(u, i)) Σ/ exp(6,) exp(s(u,
(18)
Then the gradient with respect to the positive representations (i) of item is formulated as:
-V i) @Lsav(u,)) Ōs(u, i) ds(u, (i)
exp(s(u, i))
(0(1)
= = exp(s(u, + E/V,
(19)
LVL exp((())
16

---

The gradients with respect to the negative representations (e( of item j is given by:
- -VyLad @cnd (u, i) @s(u,j)
Os(u,5) O0o(1)
exp(o,) exp(s(u.j))
Φ0(3)
exp(s(u, W. exp( exp(s(u,j))
exp(s(u, i))
exp(s(u,,))
60(1)
exp(6,){11 exp(s(u, i)) + Σラ Nil
exp(0,) exp(s(u,
exp( exp(s(u,
(20)
Clearly, for given user u, the gradient with respect to the positive item equals the sum of gradients of all negative items, in accordance with the findings in [38]. The hardness exp(áj) dictates the importance of negative gradients. Specifically, the gradients relating to the negative item Eq (20) correlate proportionally to the hardness term exp(d;), which shows that the AdvInfoNCE loss function is hardness-aware
B.4 Align Top-K evaluation metric
Discounted Cumulative Gain (DCG) is a commonly used ranking metric in top-K recommendation tasks. In DCG, the relevance of item's contribution to the utility decreases logarithmically in relation to its position in the ranked list. This mimics the behavior of a user who is less likely to scrutinize items that positioned lower in the ranking. Formally, DCG over rank (u, i) is defined as follows:
2
(u,
(21)
1og2(1 + ( i))
Where (u, I) a ranked list over I, as determined by the similarity function for user u, and y a label vector that indicates whether interaction has occurred previously or not. Then n,(u, i) is the rank of item i. Building on the research presented in [68], we explore how well AdvInfoNCE aligns with DCG for our purposes.
Under our proposed fine-grained hardness ranking criteria defined in Eq (11), the (,(u, can be obtained as follows:
(u, i) = 1+
Σ
(s((u, suu, i) 5, 0)
(ET((()
1 + Σ exp(s(u,,)) - s(u, i) 5,)-
(22)
ΛEZV()
The last inequality is satisfied by 1(x > 0) I exp(x).
2
logz (1 + To i))
1
S log
5
logo (1 + (x(
(u,(u, 1)
S log(
EjEr exp(s(u,)) - s(u, + +
exp(s(u, i))
log(
exp(s(u, i)) + exp(s(u,)) +5,)
Caav (u, i) S LAdVINEANCE
(23)
Suppose that there are K items in I that are interacted with u, let them be (,,2, ... K} ithout
loss of generality. Then
1
(v, <
(24)
log + i)'
17

---

the equality holds if and only if the interactions {(u, ((u,)):i :i= 1,2, ... , are ranked top-K. K. For given u,
exp(s(u,))
Ladv(u,
log(
exp(s(u,i)) + exp(s(u, 6,)
K
log(1 +
Σ
- exp(s(u t)) + b,))
i=1
JEI
K
K
log(1 +
Σ - Σ
log(1 + ( 1)e
(25)
i=1
jEI
K
(u,
(26)
loga (1 (1
2=1
The inequality in Eq (25) holds under the common usage of s(u, i) E [o, 1], the first inequality in Eq
(26) holds when I 2 6, while the second inequality in Eq (26) holds by Eq (24).
Therefore, by Eq (23) and Eq (26),
CAdvInINNE DCG((T (u, exp(- (ANV-AAVnnnNC)))
(27)
Consequently, minimizing LAdvInONNE equivalent to minimizing (I,
C Experiments
C.1 Experimental Settings
Datasets
KuaiRec [56] is a real-world dataset sourced from the recommendation logs of KuaiShou, platform for sharing short videos. The unbiased testing data consist of dense ratings from 1411 users for 3327 items, with the training data being relatively sparse. We categorize items that have viewing duration exceeding twice the length of the short video as positive interactions.
Yahoo!R3 [57] is dataset that encompasses ratings for songs. The training set comprised of 311,704 user-selected ratings ranging from 1 to 5. The test set includes ratings for ten songs randomly exposed to each user. Interactions with items receiving a rating of 4 or higher are considered positive in experiments.
Coat [58] records online shopping interactions of customers purchasing coats. The training set, characterized as a biased dataset, comprises ratings provided by users for 24 items they have chosen. The test set, on the other hand, contains ratings for 16 coats that were randomly exposed to each user. Ratings in Coat follow a 5-point scale, and interactions involving items with a rating of 4 or above classified positive instances in experiments.
Tencent [10] is collected from the Tencent's short-video platform. We sort the items according to their popularity descending order and divide them into 50 groups. Each group. defined by its popularity rank, is assigned certain number of interactions, denoted by N;. for inclusion in the
test set. The quantity N, is calculated based on No Y where No is the maximum number of interactions across all test groups and y denotes the extent of the long-tail distribution. A lower value of gamma indicates stronger deviation from the original distribution, thus yielding more evenly distributed test set. To ensure that the validation set mirrored the long-tail distribution of
Table Dataset statisties.
KuaiRec
Yahoo!R3
Coat
Tencent
#Users
7,176
14,382
290
95,709
#Items
10,728
1,000
295
41,602
#interactions
1.304,453
129.748
2,776
2.937.228
Density
0.0169
0.0090
0.0324
0.0007
18

---

Table 4: The performance comparison on unbiased datasets over the MF backbone. The improvement
achieved by AdvInfoNCE is significant (p-value << 0.05).
Yahoo!R3
Cost
Rocall
NDCG
Rocall
NDCG
BPR (Rendle al., 2012)
0,1189
0.0546
0,2782
0,1748
InfoNCE (van den Ocrd at. al. 2018)
0,1478
0.0894
0,2683
0.1961
(Mao al,, 2021)
0.1458 L.35%
0.0689
-1.22%
0.2682
0.1712
12:7
BC (7hang et al, 2022)
0.1492 14402-10555
0.0098
0,2098
0.2098-1h.e6%
0.1959
00.055
Adap-r (Chen ol, 2023)
1512
0.0694-9-6000
0,2712
0.59
CdV
0.1523 F3.04
0.0710 +2.31%
0.2905
0.1999 +1.9%%
the training set and side information of the test set leaked, the remaining interactions randomly divided into training and validation sets at a ratio of 60:10.
Baselines. In this study, conduct comprehensive evaluation of AdvInfoNCE using two widely adopted collaborative filtering backbones, MF [50] and LightGCN [51]. We thoroughly compare AdvInfoNCE with two categories of the latest CL-based CF methods: augmentation-bast baselines (SGL [13], NCL [52], XSimGCL [27]) and loss-based baselines (CCL [53], BC Loss [54], Adap-r [55]).
SGL [13] leverages data-heuristic graph augmentation techniques to generate augmented views. then employs contrastive learning on the augmented views and the original embeddings.
NCL [52] implements contrastive learning on two types neighbors: structural neighbors and semantic neighbors. Structural neighbors are represented by the embeddings derived from even- numbered layers in a Graph Neural Network (GNN). Semantic neighbors comprise nodes with similar features preferences, clustered through the Anpectation-Maximizztioo (EM) algorithm.
XSimGCL [27] directly infuses noise into graph embeddings from the mid-layer of LightGCN to generate augmented views. This method arises from experimental observations indicating that CF models are relatively insensitive to graph augmentation. Instead, the key determinant their performance lies in the application of contrastive loss.
CCL [53] proposes a variant of contrastive loss based on cosine similarity. Specifically, it imple- ments strategy for filtering out negative samples lacking substantial information by employing margin, denoted as m.
BC Loss [54] integrates a bias-aware margin into the contrastive loss to alleviate popularity bias. Specifically, the bias-aware margin is learned via a specialized popularity branch, which only utilizes the statistical popularity of users and items train additional CF model.
Adap-r [55] proposes to automatically search the temperature of InfoNCE. Moreover, a fine- grained temperature is assigned for each user according to their previous loss.
Evaluation Metrics. We apply the all-ranking strategy, which all items, with the exception of the positive ones present in the training set, are ranked by the collaborative filtering model for each user. An exception is KuaiRee, where the unbiased test set clusters structure leads to failure of the all-ranking strategy as the test set is not randomly selected from the whole user-item matrix. Consequently, for KuaiRee, we rank only the 3327 fully exposed items during the testing phase.
small matrix [56]. This unique
C.2 Performance over the MF Backbone
Given that the implementation of augmentation- methods is tied the LightGCN architecture, we compare AdvInfoNCE using the Matrix Factorization (MF) backbone against only loss-based methods. As shown in Table 4 and 5, AdvInfoNCE consistently surpasses all collaborative filter- ing baselines with modified contrastive losses. Moreover, similar to the trend observed with the LightGCN backbone, AdvInfoNCE excels on test sets exhibiting higher distribution shifts, while still preserving remarkable performance on the in-distribution validation set. The superior perfor- mance of AdvInfoNCE, across both the LightGCN and MF backbones emphasizes model-agnostic characteristic. We advocate for considering AdvInfoNCE as a standard loss in recommender systems.
19

---

Table 5: The performance comparison the Tencent dataset the MF backbone. The improve- ment achieved by AdvInfoNCE is significant (p-value << 0.05).
7=200 200
===
2=2
Validation
HR
Recall
NDCG
HR
Rocall
NDCG
HR
Recall
NDCG
NDCG
BPR (Rendic 2012)
0.0835
0.0259
0.0164
0.0516
0.0190
0.0102
0.0357
0.0141
0.0533
InfoNCB (von don Ourd at, 20183
0.1476
0.0638
0.8318
0.0920
0.0334
0.0194
0.0627
0.0233
0.0141
0/0856
CCL (Mao al., 2021)
0.1395
0.0523
0.0017
0.0530
0.0353
0.0221
0.0685
0,0206
0.0120
0,0782
Loss (Zhang at. 2022)
2022)
0.1546
0.0573
0.0349
0.1011
0.0978
0.0228
0.0737
0.0280
0.0128
0.0864
Adap-r (Chen ol., 2023)
0.1298
0,0512
0.0302
0.0316
0.0182
0.0911
AdrInfoNCE
0.1606
0.0595*
0.0355
0.1111
0.0412
0.0249
0.0813
0.0.00
0.0189*
0.0860
Impp% 96 over the strongest baseline
3.87%
3.52%
1 1.88
9..6%
8.80%
9938%
10.33%
9.87%
6.28%
1mp.5 f6 over InfoNCE
10.515
11.77%
20.81%%
41%
29.84%
31.97%
Table 6:
The performance comparison on the Tencent dataset over extensive backbones. The improvement achieved by AdvInfoNCE significant (p-value << 0.05).
10
Validation NDCG
HR
Recall
NDCG
HR
UlraGCN IMao et al., 2021)
0,0030
0,0343
0.0190
0.0587
B.0215
0.1199
0.0300
0.0157
0.005
0.0682
UlraGEN InfaNCE
0.1436
0.0519
0.0313
0.0896
D.024
0.0180
0.0617
0.0227
0.0155
0.0842
UlraGCN AdvisfaNCE
0.1538
0.022
0.0338
1.1025
D.0880
0.022
0.0726
0.0276
D.0168
0.0883
VGAE (Kipl and Welling, 2016)+ InfoNCE
0.1482
0.0536
0,0515
0.0923
0,0338
0.0232
0
0.0237
0.0141
0.0823
VGAE AdvlafaNCE
0.1588
0.0353*
0.0395*
0.0239
0.01824
0.0871
C.3 Performance over Extensive Backbones
To validate the generalization ability of AdvInfoNCE, we conducted experiments additional backbones, including UltrGGNN [69] and an adapted version of VGAE [70]. The results in Table 6 indicate that AdvInfoNCE performs excellently across various backbones, which showcases the generalization ability of AdvInfoNCE.
C.4 Performance Comparison with Extensive Baselines
We compare AdvInfoNCE on the LightGCN backbone with extensive baselines on Tencent. The results in Table 7 show that AdvInfoNCE also outperforms almost all the latest debiasing [10, 71] and hard negative mining algorithms [72].
C,5 Training Cost
Let n be the number of items, be the embedding size, N be the number of negative sampling, M + be the number of observed interactions, be the batch size and N₂ be the number of mini-batches within one batch. In AdvInfoNCE, the similarity calculation for one positive item with negative items costs O((N + 1)d). and the hardness calculation costs O(Nd). The total training costs of one epoch without backward propagation are summarized in Table 8. The training cost of AdvInfoNCE little higher than BPR loss, sharing the same complexity with InfoNCE.
In Table 9, we present both the per-epoch and total time costs for each baseline model on the Tencent dataset. As evidenced, augmentation based contrastive learning (CL) baselines significantly cut down the overall training time, while loss-based CL baselines exhibit complexity similar to that of InfoNCE. Surprisingly, compared to InfoNCE, AdvInfoNCE introduces only a marginal increase in computational complexity during the training phase.
D Discussion about AdvInfoNCE
D.1 Algorithm
Algorithm depicts the detailed procedure of AdvInfoNCE. Here we uniformly sample N negative items for each observed interaction and multiply large weighting parameter K in front of each negative item, as a surrogate of the whole negative set Ny. Specifically, we adversarially train the hardness g(u..) at fixed interval before reaching the maximum adversarial training epochs Fodu-
The precise methods for computing the hardness s(u..)) further discussed in Section D.4.
20

---

Table 7: The performance comparison the Tencent dataset with extensive baselines. The improve ment achieved by AdvInfoNCE is significant (p-value << 0.05).
7 = 200
==10
7=2
Validation
Rocall
NDCG
HR
Recall
NDCG
HR
Recall
NDCG
NDCG
XIR (Chen et al., 2022)
0.1463
0.0538
0.0322
0.0936
0.0341
0.0211
0.0642
0.0245
0.0154
0,0883
sDRO (Wen 2022)
0.1455
0.0286
0.0857
0,0301
0.0166
0.0552
0.0120
0,0872
In/CI (Zhang al., 2023)
0.1651
0.0605
0.0331
0.1061
0.0386
0.0204
0.0722
0.0272
0.0149
0.0912
AdvInfoNCE
0.1000
0.0694
0.0356
0.1087
0.0403*
0.0243*
0.0774
0.0295
0.0180
0.0879
Table 8: Time Complexity
+PPR
+IafoNCE
+BC
+Adap
+AdVlfoNCE
Backbone
O(N,Bo)
O(N,B( - 1)d)
OIN,BIN 1)6)
OLN,BIN + 1M)
O,N.BON + 1ld (M ald)
O(N,B(N + 1)d)
D.2 Effect of the Fine-grained Hardness on KuaiRec
We conduct the same experiments Section 4.2.1 KuaiRec, to investigate how the fine-grained hardness affects the
performance.
We plot the average value of (u, i)) across one batch, as depicted Figure 4a. The figure reveals that AdvInfoNCE learns a skewed negative sampling distribution, mirroring the trend observed in the Tencent dataset. Such a distribution places more emphasis on popular negative items and reduces the difficulty of unpopular negative items, which have higher probability of being false negatives.
To examine the effect of fine-grained hardness, we conduct experiments with four different hardness learning strategies, including AdvInfoNCE, InfoNCE, InfoNCE-Rand, and AdvInfoNCE-Revee AdvInfoNCE-RReerss refers to strategy where hardness is learned by minimizing, rather than maximizing, the loss function. This inversion results what we term 'reversed hardness', in contrast to the approach of our AdvInfoNCE method. InfoNCE-Rand denotes the assignment of uniformly random hardness for each negative item. We conduct 5-fold experiments with different random seeds for each strategy and report the mean value with standard error in Figure 4c. As the result shows, AdvInfoNCE, yields consistent improvements over the other three different hardness strategies during the training phase. In contrast, the performance of Adv ReveeCeeeeee drops rapidly as continuously training the reversed hardness. The sustained superior performance of AdvInfoNCE indicates that it effectively promotes the generalization ability of the CF model by automatically distinguishing false negatives and hard negatives.
Figure 4b illustrates the uniform and align loss during the training phase following the initial warm-up epochs. As demonstrated, after the warm-up phase, both InfoNCE and InfoNCE-RRnd exhibit slight increase align loss, while their uniform loss maintains a stable level. In contrast, AdvInfoNCE significantly improves uniformity other hand, employing reversed hardness (as in AdvInfoNCE-Rewee impact on representation uniformity. These findings underscore the importance of fine-grained hardness in AdvInfoNCE, suggesting that AdvInfoNCE learns more generalized representations.
acceptable cost of increasing align loss. On the
appears to have a negative
D.3 Effect of the Adversarial Training Epochs on KuaiRec
In this section, we conduct experiments on KuaiRec, where AdvInfoNCE is trained for varying numbers of adversarial epochs. We plot performance metrics (Recall 20 in Figure 5a and NDCG 20 in Figure 5b) on the test set, which represents out-of-distribution data, throughout the training phase. The green stars mark the corresponding endpoint of adversarial training. As illustrated Figure 5a and 5b, both Recall @ 20 and NDCG@22 20 show a proportional trend with the number of adversarial training epochs, up to a certain threshold. However, the number of adversarial training epochs exceeds the threshold, performance on -itt--ddistrbutionn sharply declines. This indicates need to strike balance when determining the appropriate number of adversarial training epochs for AdvInfoNCE.
worth noting that the extreme condition when
21

---

Table 9: Training cost on Tencent (seconds per epoch/in total).
+InfoNCE
+GGL
NNCL
+XSimGCI.
+CCL
+BC loss
+Adap-r
+AdvInooNCE
MF
16,8/7.123
17.2/4,111
/9,17 43.5/23.664
22.3/7,694
21,6/11,334
LightGCN
41.2/21.177
82.5/4868
54.9551611
42.1/84
12.1/11,114
55,6/17,236
44.6/21,586
Algorithm AdvInfoNCE
observed interactions O+, unobserved interactions O learning rate of adversarial training Trade maximum adversarial training epochs Eadu. adversarial training intervals Tades parameters of the CF model 8, parameters of the hardness evaluation models Badus weighting parameter K
Input:
Output: 0
Initialize: Initialize 0 and Oado, e +- 1, Cadv f-
repeat
Freeze parameters of the hardness evaluation model Badv
Randomly sample N negative items from Zū for each interaction within batch
Compute (u, i), ((u.)) with and Oadv, respectively
Compute LAdv (u, 1) = log exp (s(u.i))+ E5= exp(6) (1 exp(o(u.))
exp exp (e(u.))
Update 9 by minimizing Ladv (u) if e mod Tedu == 0 & Cadv I Eadv then Freeze parameters of the CF model 0 Update Oade by maximizing (u,
Endu Eado
end if
4- e+1
until CF model converges
D.4 Hardness Learning Strategy
To accurately evaluate the hardness of each negative instance, we need to establish mapping from unobserved user-item pairs to their corresponding hardness values, and this mapping mechanism can be diversified. Generally, the hardness learning strategy can be formulated as:
(u.3) = log(IVal p(il(,,
(28)
exp (goaac (u,
- log [Wal
(29)
exp(genao (u, k))
where Do... (u, is raw hardness score function for the unobserved user-item pair (u,j), and p(i(u, 1)) is the probability of sampling the negative instance j. which is calculated by normalizing specific mapping methods: embedding-based (i.e.,
B8gav (u,j), In this paper, AdvinfoNCE-emmedd mapping and multilayer perceptron-based (i.e., AdvInfoNCE-mmlp mapping. should be noted that all the results reported in the main text of this paper are based the implementation of the AdvinfoNCE-embed version.
proposed
AdvInfoNCE-embed The hardness computation process in AdVInfoNCE-ember follows similar protocol as CF models. We directly map the index of users and items into its corresponding hardness embedding and calculate the hardness of each user-item pair through score function. Specifically, this process involves a user hardness encoder V0.... (.) U + IR" and an item hardness encoder de... I- Rdd where Oade denotes all the trainable parameters of the hardness learning model. In our experiments, adopt the same embedding dimension as the CF models for hardness learning. For the score function, we define ge.a. ju.j) L. (u)T (f).
Adv InfoNCE--mlp. Unlike AdvInfoNCE-embel AdvInfoNCE-mip maps the embeddings of items and users from the CF model into another latent space with two multilayer perceptrons (MLPs) and calculates the hardness on this latent space. By respectively defining the MLPs for users and items MLP., and MLP.,, v, the score function for hardness calculation is defined g0.... (u, MLP,, a (w)) ML., (i). our experiment, we simply employ one-layer MI.Ps and set the dimension of latent space as four. It's worth noting that this MLP-based implementation of
22

---

0.33
Average pOKo, ())
IRRACE Waand
0.155
Align Lows
1.0
0.55
Recally
05
End antiannnttlliitt trailing
0000
20
60
160
1000
Item popularity degree
Epochs
Uniform Loss
(a) Distribution of hardness.
(b) Varying hardness strategies
(c) Alignment & uniformity analysis
Figure 4: Study of hardness. (4a) Illustration of hardness ie., the probability of negative sampling (p (il (u, i))) learned by AdvInfoNCE w.r.f item popularity on KuaiRec. The dashed line represents the uniform distribution. (4b) Performance comparisons with varying hardness learning strategies on KuaiRec. (4c) The trajectories align loss and uniform loss during training progress. Lower values indicate better performance. Arrows denote the losses' changing directions.
0OD Test Recall@:20
0.25
Adveriorial Training Advariorial Training Ead *
Adversurial
OOD Test NDCG@220
0.60
Adveriaiial Training
Adveruriia Training End
0.20
11.00
0.15
0.20
0.05
100
100
Epochs
Epochs (b) NDCG@D 20
(a) Recall @ 20
Figure The performance on KuaiRee with different numbers of adversarial training epochs. (5a) Per-
formance comparisons w.r.f Recall @ 20 on KuaiRec. (5b) Performance comparisons w.r.. NDCG@20 on KuaiRee.
AdvInfoNCE may also be adaptable for handling out-of-distribution tasks in other fields, such as computer vision (CV) and natural language processing (NLP).
As reported in Table 10, both AdvinfoNCE-embeed and AdvInfoNCE-mlp yield significant improve- ments over InfoNCE. Moreover, AdvInfoNCE-embed generally outperforms AdvinfoNCE-mlp.
D.5 The Intuitive Understanding of AdvInfoNCE.
In this section, we aim to understand the mechanism of AdvInfoNCE intuitively, from the perspective of false negative identification.
Figure 6 illustrates the changes of the muttof-distribution performance and FN identification rate during the training process on Tencent. Here, the FN identification rate indicates the proportion of false negatives with negative dj. It can be observed that the out-of-distribution performance exhibits rising trend along with the FN identification rate. Meanwhile, the out-of nut-of-distribution performance of InfoNCE remains relatively low. This indicates that AdvInfoNCE enhances the generalization ability of the CF model by identifying false negatives.
Figure illustrates how AdvInfoNCE adjusts the scores and rankings of sampled negative items, by identifying the false negatives and true negatives. We retrieve the negative items sampled during training. If a sampled negative item appears the test set, labeled otherwise. In Figure 7a and 7b, the leftmost item represents false negative, while the other two items on the right are negatives. The bar charts blue and red depict the cosine similarity scores of sampled negative items measured by InfoNCE and AdvInfoNCE respectively. The rankings of sampled negative items are annotated above the bars. The line graph illustrates the hardness 8, computed by AdvInfoNCE, measured on the right axis. It can be observed that when the hardness 8,
false negative (FN);
23

---

Table 10: The performance comparison between AdvinfoNCE-embed and AdvInfoNCE-mlp over the LightGCN backbone.
KuniRee
Yahoo
Cost
Tencent (y 1==20 200)
Tencent ( = 10)
Tencent (1 = 2)
Recall
NDCG
Recall
NDCG
Recall
NDCG
Recall
NDCG
Recall
NICG
Recall
NDCG
InfoNCE
0.4520
0.0898
0.2680
0.1882
0.0340
0.0020
0.0242
0.0145
Ad-InfoNCE-emmee
0.1979
0.1697
0.1527
0.0718
0.2846
0.2126
0.0591
0.0356
0.0103
0.0213
0.0295
0.0180
Imp.& & InfoNCE
9.94%
3.71%
3.53%
2.87%
5,84%
7.65%
10.00%
11.25%
21.39%
24.02%
21.90%
24.14%
AdvinfoNCE-mill
0.1851
0.4579
0.1346
0A0724
0.2843
0.20022
0.0987
0.0334
0.0364
0.0221
0.02900
0.0100
1mp.2 & over InfoNCE
2.83%
1.10%
4.75%
3.72%
5.73%
6.38%
5.00%
5.91%
9.61%
13.33%
7.41%
10.32%
0.0200
0.75
InfoNCE
FN Identification Rate
AdvinfoNCE
0.70
0.0190
0.65
0.60
NDCG@20
0.0170
0.55
0.50
0.45
0.0150
0.40
0.35
0.0130
0.30
Adversarial Training Epochs
Figure 6: FN identification rate and NDCG@ 20 during training on Tencent, where FN identification rate indicates the proportion of false negatives (FN) with negative 8, and NDCG@D 20 shows the out-of-distribution performance. As training proceeds, AdvInfoNCE' FN identification rate increases, capping at nearly 70%. This reveals AdvInfoNCE's s capability to identify approximately 70% false negatives in the test set. We attribute the superior recommendation performance of AdvInfoNCE over InfoNCE to this gradual identification.
negative (i.e., indicating that the item identified as false negative), the cosine similarity score improves. Conversely, if the hardness 8j is positive, the score decreases.
E Hyperparameter Settings
For a fair comparison, we conduct all the experiments in Py Torch with a single Tesla V100-SXM3- 32GB GPU and an Intel(R) Xcon(R) Gold 6248R CPU. We optimize all methods with the Adam optimizer and set the layer numbers of LigntGCN by default at with the embedding size as 64 and the weighting parameter K as 64. We search for hyperparameters within the range provided by the corresponding references. For AdvInfoNCE, we search Irade in [le-1, le-4], Ende in [1, 30) and Tado in (5, 10, 15, 20). We adopt the early stop strategy that stops training if Recall @ 20 on the validation set does not increase for 20 successive evaluations. It's worth noting that AdvInfoNCE inherits the hyperparameter sensitivity property of adversarial learning, therefore it's necessary to choose proper hyperparameters for different datasets. We suggest selecting a suitable adversarial learning rate iradv first and then increasing the number of adversarial training epochs Fanoo gradually until AdvInfoNCE reaches relatively stable performance. We report the effect of changing the number of negative sampling in Table 13, where N is the number of negative sampling.
24

---

01-
AdVIRRNNCI
1
0.-
8:5
Cosine Simllarity
Sinilarity
0.4
12124
105
5416
12:1007
11.
000
1.2000
4:5p
Froo Th0
20ca Item
Iato ONN
Aso
Item
(a) User 46767
(b) User 54944
Figure 7: Case studies of refining the item ranking. With two randomly sampled users along with their sampled negative items, subsequently retrieve their associated 5 values, ranking positions, and cosine similarities. Here FN denotes false negative (i.e., interactions unobserved during training but present in testing). The bar charts demonstrate the cosine similarity scores of these sampled negative items as gauged by both InfoNCE and AdvInfoNCE. Their rankings are annotated atop the bars. An accompanying line illustrates the hardness 6, derived by AdvInfoNCE, (measured the right axis). Notably, when å < 0, AdvInfoNCE identifies and elevates an FN; conversely, for potentially negative, AdvInfoNCE leans towards positive and declines its rank.
Table 11: Hyperparameters search spaces for baselines.
Hyperparameter space
Ir ~ { le-5, 3e-5, 5e-5, le-4, 3e-4, Se-4, le-3), hatch size (64, 128, 256, 512, 1024, 2048)
MF LightGCN
No. negative samples ~ [64, 128, 256, 512)
SSM
[0.05.
CCL
w 21, 5, 100, 200). m (0.2, 0.4, 0.6, 0.8, 1)
BC Loss
Ti ~ [0.05, 31, 72 [0.05, 3]
Adap-T
worm_up_epocce
[10, 20, 50. 100)
SGL
~~ [0.05, 3]. A ~ (0.005, 0.01, 0.05, 0.1. 0.5, 1.0), p~ (0. 0.1, 0.3, 0.5)
NCL.
7 [0.05, 31, A [lc-10, 1c-6), A2 [lc-10, 1c-6], & ~~ [5, 10000]
XSimGCL
[0.05, 3]. (0.01.0005..1..0.0005. 1.0)
0.2,
(0.005, 0.01. 0.05. 0.1. 0.5. 1.0)
Table 12: Model architectures and hyperparameters for AdvInfoNCE.
Hyperparameters AdvinSoNCE
Irade
Easto
Tast
+
Ir
batch size
No. negative samples
LightGCN
Tencent
Se-5
5
0.09
le-3
2048
128
KuaiRec
Se-5
5
2
3e-5
2048
128
Yahoo!R3
le-4
13
5
0.28
5e-4
1024
Coat
le-2
20
15
0.75
1e-3
1024
64
MF
Tencent
Se-5
0.09
le-3
2048
128
Yahoo!R3
le-4
12
5
0.28
5e-4
1024
64
Coat
le-2
18
15
0.75
le-3
1024
64
Table 13: Varying number of negative sampling on Tencent
200
y= 10
Validation
HR
Recall
NDCG
HR
Recall
NDCG
HR
Recall
NDCG
NDCG
64
0.1513
0.0563
0.0333
0.1006
0.0373
0.0225
0.0708
0.0269
0.0164
0.0854
128
0.1600
0.0594
0.0356
0.1087
0.0403
0.0243
0.0774
0.0295
0.0180
0.0879
0.1642
0.0367
0.1122
0.0419
0.0253
0.0815
0.0310
0.0189
0.0889
25


Reviews:
[{"review_id": "7ZoiF2l6Ms", "reviewer": "Reviewer_ikze", "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. ", "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.  \n- Do you attempt other similarty measurements for calculating the hardness and whether the choice of similarity calculation matters?  \n- 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?  ", "limitations": "More CF-based backbones can be considered.  ", "rating": 7, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "It is well-written and easy to follow.  \nGood motivation of improving the generalizability of CF-based methods.  \nIt provides thereotical guarantees for the loss design and conducts comprehensive analysis on the effectiveness of its method.  \nExperimental results compared with other popular functions adopted in CF models look promising.  \nCode is open.  \n", "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].  \n\n[1] Liang et al. Variational Autoencoders for Collaborative Filtering. 2018 WWW.  \n[2] Wang et al. Disentangled Graph Collaborative Filtering. 2020 SIGIR.  ", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "**Response to Reviewer $\\color{blue}{\\text{ikze}}$**\n\nWe sincerely thank you for your time and valuable comments. Your main suggestions about considering additional CF-backbones help us substantiate wide applicability of AdvInfoNCE. \n\n> **Comment 1: Additional CF-based backbones** - \"Experiments can be more extensive. ...\"\n\nThanks for your great suggestions! \nWe fully agree that considering a broader range of CF-based backbones will better showcase the applicability of AdvInfoNCE loss.\nWhile the rebuttal period is time-constrained, we have incorporated the AdvInfoNCE loss to both a GCN-based CF backbone: UltraGCN [3], and a VAE-based CF backbone: VGAE [4].\n\nWe deeply appreciate your suggestion of considering DGCF [2] and MultVAE [1]. \nAs outlined in the DGCF paper, it fundamentally emerges as a special case of LightGCN under the multi-intent assumption. Given the extensive experiments we have already conducted with LightGCN, we chose UltraGCN which offers an ultra-simplified\nformulation beyond LightGCN. \nAs for MultVAE, it primarily takes into account the user-by-item interaction matrix instead of traditional user/item embeddings.\nAdapting AdvInfoNCE to MultVAE requires re-defing interaction-wise negative sampling and restructuring the entire training pipeline, which we leave for future work.\nWhat we accomplished during the rebuttal period was to demonstrate how AdvInfoNCE can be applied to another VAE-based backbone, VGAE.\n\nTo demonstrate the applicability of AdvInfoNCE under UltraGCN and VGAE, we show the results on Tencent in Table 1. Clearly, AdvInfoNCE boosts the recommendation performance of UltraGCN and VGAE in terms of various OOD settings by a large margin. More detailed analyses can be found in our revision paper in Appendix. \n\n**Table 1: Overall performance for UltraGCN and VGAE backbones**\n|                 |          | $\\gamma=200$ |       |       | $\\gamma=10$ |      |       | $\\gamma=2$ |        | Validation|\n| :-------------: | :------: | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: |:-----: |\n| | HR | Recall | NDCG | HR | Recall | NDCG | HR | Recall | NDCG |NDCG|\n| UltraGCN | 0.0930 | 0.0343 | 0.0190 | 0.0567 | 0.0215 | 0.0119 | 0.0400 | 0.0157 | 0.0095 | 0.0682 |\n|UltraGCN+ InfoNCE | 0.1436 | 0.0519 | 0.0303 | 0.0896 | 0.0324 | 0.0189 | 0.0617 | 0.0227 | 0.0135 | 0.0842 |\n|UltraGCN+ AdvInfoNCE | $\\underline{0.1538}$ | $\\underline{0.0569}$ |$\\underline{0.0338}$ | $\\underline{0.1025}$ | $\\underline{0.0380}$ | $\\underline{0.0227}$ |$\\underline{0.0726}$ | $\\underline{0.0276}$ | $\\underline{0.0168}$ | 0.0883 |\n|  VGAE + InfoNCE   |   0.1482   |    0.0536    |   0.0315   |   0.0923   |   0.0338    |   0.0202   |   0.0640   |   0.0237   |   0.0141   |   0.0823   |\n| VGAE + AdvInfoNCE | **0.1588** |  **0.0589**  | **0.0353** | **0.1069** | **0.0395**  | **0.0239** | **0.0778** | **0.0296** | **0.0182** | 0.0871 |\n\n> **Question 1: Different similarity measurements** - \"Do you attempt other similarty ...?\"\n\nThank you for highlighting this question. In light of this, we **conducted new experiments** evaluating both inner product and cosine similarity measurements for hardness calculation. As indicated in Table 2, the choice between these measurements doesn't introduce significant discrepancies in performance.\n\n**Table 2: Varying similarity measurements**\n|                          |            | $\\gamma=200$ |            |            | $\\gamma=10$ |            |            | $\\gamma=2$ |            | Validation |\n| :----------------------: | :--------: | :----------: | :--------: | :--------: | :---------: | :--------: | :--------: | :--------: | :--------: | :--------: |\n|                          |     HR     |    Recall    |    NDCG    |     HR     |   Recall    |    NDCG    |     HR     |   Recall   |    NDCG    |    NDCG    |\n|    AdvInfoNCE-cosine     |   0.1561   |    0.0581    |   0.0346   |   0.1046   |   0.0389    |   0.0237   |   0.0750   |   0.0286   |   0.0175   | **0.0881** |\n| AdvInfoNCE-inner product | **0.1600** |  **0.0594**  | **0.0356** | **0.1087** | **0.0403**  | **0.0243** | **0.0774** | **0.0295** | **0.0180** |   0.0879   |\n\n\n> **Question 2: Different negative sampling rate** - \"What is the rate ...?\"\n \nYour point on negative sampling rate is noteworthy.\nThe detailed information of negative samples on different datasets can be found in Appendix (Table 9).\nAs expounded in Theorem 3.1, our AdvInfoNCE design capitalizes on obtaining high-quality hard negative samples from a distribution perspective. Theoretically, increasing the number of negative samples should yield a more favorable negative distribution. However, the trade-off with computational expense led us to adopt 128 negative samples for all Tencent baseline methodologies. In response to your query, we evaluated two other rates (64 and 256 samples) as represented in Table 3. Our findings consistents with our initial thinking: higher negative sampling rates do offer performance enhancements for AdvInfoNCE.\n\n\n**Table 3: Varying Number of Negative Sampling on Tencent**\n|      |      | $\\gamma=200$ |      |      | $\\gamma=10$ |      |      | $\\gamma=2$ |      | Validation |\n| :--: | :--: | :----------: | :--: | :--: | :---------: | :--: | :--: | :--------: | :--: | :--------: |\n|      |  HR  |    Recall    | NDCG |  HR  |   Recall    | NDCG |  HR  |   Recall   | NDCG |    NDCG    |\n|  64  | 0.1513 | 0.0563 | 0.0333 | 0.1006 | 0.0373 | 0.0225 | 0.0708 | 0.0269 | 0.0164 | 0.0854 |\n| 128  | 0.1600 |  0.0594  | 0.0356 | 0.1087 | 0.0403  | 0.0243 | 0.0774 | 0.0295 | 0.0180 |   0.0879   |\n| 256  | **0.1642** | **0.0609** | **0.0367** | **0.1125** | **0.0419** | **0.0253** | **0.0815** | **0.0310** | **0.0189** | **0.0889** |\n\n[1] Variational Autoencoders for Collaborative Filtering. 2018\n\n[2] Disentangled Graph Collaborative Filtering. 2020\n\n[3] UltraGCN: Ultra Simplification of Graph Convolutional Networks for Recommendation. 2021\n\n[4] Variational Graph Auto-Encoders. 2016"}, {"review_id": "xf3yJGs4qv", "reviewer": "Reviewer_kSe8", "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.", "questions": "My questions are in the weaknesses.", "limitations": "Seems to be sufficient.", "rating": 6, "confidence": 4, "soundness": 2, "presentation": 2, "contribution": 2, "strengths": "1.  This paper provides a method that appears to give solid gains across various collaborative filtering tasks.\n\n2.  They do make an attempt to try to interpret what the \\delta (adversarially learned parameters) in their method are doing.\n\n3.  The graphs for the results and the pictures explaining the methods are good and helped me with understanding. \n\n4.  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.\n\n5.  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.\n\n2.  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.\n\n3.  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.\n\n4.  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.\n\n5.  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.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "**Response to Reviewer $\\color{red}{\\text{kSe8}}$**\n\nWe appreciate your comments, some of which inspires us to greatly improve our paper.\nBelow we provide the point-to-point responses to address your concerns and clarify the misunderstandings of our proposed method.\nIf you have additional questions, we would be pleased to discuss them with you.\n\n> **Comment 2: Terminology confusing** - \"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. ...\"\n\nWe agree that hard negatives are negatives lying close to the decision boundary, making them hard to classify. \nHowever, a more capable model, exhibiting superior generalization, aims to reshape the representation space by pushing those hard negatives far from the decision boundary [1,2].\nFigure 1 in our original submission offers a visual explaination of this concept. \nIt depicts the feasible zone for hard and false negatives of both InfoNCE and AdvInfoNCE.\nWith the application of AdvInfoNCE, hard negatives are purposefully distanced from the positive pairs from a feasible zone perspective.\nBy adjusting the feasible zone using $\\delta$ in AdvInfoNCE, we effectively re-rank the negatives in representation space.\nWe are confident in our choice of terminology and value further discussion if any points require elaboration. \n\n\n> **Comment 1: Role of $\\delta$** - \"I don't understand the role of the adversarial variables...\"\n\nWe value your comments. To better clarify the role of $\\delta$ and its learning process for hard and false negatives, we **conducted additional illustrative examples**.\n\nThe illustrative example should highlight two points. 1. AdvInfoNCE could effectively **identify the false and hard negatives** via learnable $\\delta_j$ (max-stage). 2. $\\delta$ helps to **refine the item ranking** compared to InfoNCE (min-stage).\n\n- **Identification of False and Hard Negatives:** \nOn the Tencent training data, we trained both the InfoNCE and AdvInfoNCE models. Interactions unobserved during training but present in testing are labeled as false negatives (FN), otherwise true negatives (TN).\nBased on our theoretical assumption, for a FN, we wish a more relaxed constraint, leading to $\\delta < 0$. \nTo validate this assumption, we introduce the 'FN identification rate', a metric determining the proportion of FNs where $\\delta < 0$.\nAs Fig 6 in one-page uploaded pdf shows, our observations are consistent with our claim. \nAs training proceeds, the FN identification rate increases, capping at nearly 70%. \nThis reveals AdvInfoNCE's capability to identify approximately 70% of FNs in test set. \nWe attribute the superior performance of AdvInfoNCE over InfoNCE to this gradual identification.\n- **Refinement of Item Ranking:** \nwe randomly draw two users along with their FN and TN items, subsequently retrieving their associated $\\delta$ values, ranking positions, and cosine similarities, as demonstrated in Fig 7.\nConsistent with our prior findings, for an FN, AdvInfoNCE generally assigns a negative $\\delta$. \nThis negative $\\delta$, indicating a more lenient feasible zone constraint, enables the recommender to achieve higher cosine similarity.\nThis, in turn, escalates the FN's ranking.\nFor instance, as Fig 7(a) shows, given $\\delta=−0.7887$, AdvInfoNCE elevates an FN from the 55th to a commendable 5th position. Conversely, for a TN, AdvInfoNCE leans towards a positive $\\delta$, narrowing the feasible zone, thus distancing it from positives. \nAn exemplary case is the TN $j_{6543}$ in Fig 7(a), where AdvInfoNCE, upon learning its $\\delta = 1.1921$, declines its rank from 257th to 4587th. \nSuch real-world cases attest to $\\delta$'s role in fine-tuning recommendation ranking.\n\nIn a word, for a specific u, the learnable $\\delta_j$ measures the hardness of item j and further frame a fine-grained ranking criterion. \n\n> **Comment 3: hard to understand** -\"In general, the paper is hard to understand ...\"\n\nThanks. We thoroughly proofread the manuscript and sincerely hope that our revised version will provide a smoother reading experience, aligning with the feedbacks we've received from other reviewers.\n\n\n> **Comment 4 & 5: Constraint of algorithm** - \"From what I can understand, the loss should simply make the deltas as large as possible (positive) ...\" \"In theorem 3.1, we assume that the deltas imply a probability distribution. Is this true? ...\"\n\nThanks for your feedback. \nWhile we indeed delineate the constraints of AdvInfoNCE in various parts of our original manuscript, such as in lines 180, 187, 199-204, 547 and Eq 9, we recognize the need to highlight them more prominently.\n\nWe define $\\delta_j^{(u,i)}$ as $\\log(|N_u|\\cdot p(j|(u,i)))$, where $p(j|(u,i))$ denotes the probability of sampling negative item $j$ for observed interaction $(u,i)$.\nThis signifies that the summation over all j for $p(j|(u,i))$ equals 1.\nMoreover, the bounds for $\\delta_j^{(u,i)}$ are strictly set as $(\\log(1-|N_u|\\epsilon), \\log(1+|N_u|\\epsilon))$, which can be found in Eq 9.\n\nTo provide an empirical insight into the $\\delta$ value, we list its mean and standard deviation in our experiments during training: (-0.0, 0.0003), (-1e-4, 0.0164), (-0.0028, 0.0733), (-0.0128, 0.1549), (-0.0353, 0.2515), (-0.0747, 0.3572), (-0.1343, 0.4676).\nNoted that, the mean of $\\delta$ is equivalent to $- D_{KL}(P_0||P)$, as stated in Line 195.\n\n\n[1] ArcFace: Additive Angular Margin Loss for Deep\nFace Recognition\n\n[2] Simplify and Robustify Negative Sampling for\nImplicit Collaborative Filtering"}, {"review_id": "19UZh7cBQf", "reviewer": "Reviewer_PLbw", "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.", "questions": "1.\tThe 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)$?", "limitations": "Please refer to the weaknesses and questions.", "rating": 8, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 4, "strengths": "1.\tThe 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.\n2.\tAs 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.\n3.\tThe 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.\n4.\tThis proposed loss seems to be a general loss that can be applied in general recommendation models.\n", "weaknesses": "1.\tThe 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.\n2.\tIn 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.\n3.\tAlthough the proof of Theorem 3.1 seems correct, the DL-divergence In Line 195 misses a minus sign. Please double check and fix it.\n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "**Response to Reviewer $\\color{orange}{\\text{PLbw}}$**\n\nWe thank the reviewer for the thorough and valuable feedback. To address your concerns, we present the point-to-point responses as follows. We have carefully revised our paper by taking into account all your suggestions. Looking forward to more discussions with you.\n\n>**Comment 1: Clearer explanation** - \"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.\" \n\nThank you for highlighting the need for clearer explaination concerning the relation between hardness and the negative sampling probability.\nFollowing your suggestion, we have **revised the methodology section** in the manuscript. For the sake of addressing your question directly, we would like to provide a detailed elaboration here:\n\nIn our paper, specifically at Line 195, the hardness $\\delta_j^{(u,i)}$ for a negative item $j$ with respect to observed interaction $(u,i)$ is defined as:\n$\\delta_j^{(u,i)} \\doteq \\log(|N_u|\\cdot p(j|(u,i)))$.\nHere $|N_u|$ denotes the total count of negative items for user u.\n$p(j|(u,i))$ signifies the likelihood of picking item $j$ as a negative item given the observed interaction $(u,i)$.\nBy defining the hardness in this manner, we closely relate our hardness to a particular strategy used for negative sampling.\n\nMoreover, as outlined in Theorem 3.1, optimizing AdvInfoNCE loss is equivalent to solving a Distributionally Robust Optimization (DRO) problem focusing on the negative sampling strategy. \nFor instance, in scenarios where uniform negative sampling is employed (i.e., $p(j|(u,i)) = \\frac{1}{|N_u|}$), the hardness value $\\delta_j^{(u,i)}$ always equals 0.\n\nThis offers an insight: InfoNCE is a special case of AdvInfoNCE, where incorporates the uniform negative sampling.\nAs a result, with no difference of $\\delta_j$, InfoNCE is unable to differentiate between true negatives and false negatives, which is consistent with our earlier illustration in Figure 1 (a).\n\n\n> **Comment 2: More discussion about instability** - \"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.\"\n\nThanks for your valuable comments. \nThe \"instability\" here pertains to the instability and inconsistency of hyperparameters (i.e., the learning rate and epochs for adversarial training) ranges across different datasets. \nAs reported in Table 9, the optimal adversarial learning rate varies largely across different datasets (e.g., 1e-2 for Coat and 5e-5 for Tencent).  \nMoreover, Figure 3 indicates that increasing the number of epochs of adversarial training without constraints leads to a significant decline in in-distribution performance. \nAdditionally, when exploring the role of negative sampling numbers, we found that these two hyperparameters also require delicate adjustments for varying numbers of negative samples. Inappropriate learning rates for adversarial training can result in varying degrees of hardness mining, consequently leading to inconsistent and suboptimal performance.\n\n\n> **Comment 3: missing a minus sign** - \"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.\"\n\nThank you for your carefully reading and notification. \nYou are right, and there is a missing minus sign in the proof of Theorem 3.1.\nWe sincerely apologize for the oversight and we have **rectified the error**. \nTo prevent such errors from cropping up again, we have conducted a thorough review of all the mathematical expressions and formulas throughout the paper, ensuring their accuracy and consistency.\n\nWe truly appreciate your attention to detail. Thank you for helping us improve the precision and clarity of our work.\n\n\n\n> **Question 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)?\"\n\nThank you for highlighting this discrepancy in notation. \nYou are right. The term $\\delta_j^{(u,i)}$ denotes the hardness of a negative item $j$ with respect to observed interaction $(u,i)$.\nIn the methodology section of our original paper, specifically around line 150, we simplified the notation to focus primarily on a single user-item pair $(u,i)$. This was done to facilitate ease of understanding for the reader. As we progressed further into the methodology, post line 177, we expanded our considerations to account for all observed interactions, thereby introducing the notation $\\delta_j^{(u,i)}$.\n\nWe acknowledge that this transitional shift in notation might cause confusion, and we truly appreciate your keen attention to detail. We will consider including an explanatory note or rephrasing to make this transition clearer in future versions.\n"}, {"review_id": "fm64huB0lL", "reviewer": "Reviewer_qmEP", "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.\n\nTo 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.", "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.", "limitations": "N/A", "rating": 8, "confidence": 4, "soundness": 4, "presentation": 4, "contribution": 3, "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.\n\nii) 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.\n\niii) 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.\n\nii) 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.\n\n[1] Graph contrastive learning with adaptive augmentation\n\n[2] Automated Self-Supervised Learning for Recommendation\n\n[3] Personalized Ranking with Importance Sampling\n\n[4] AHP: Learning to Negative Sample for Hyperedge Prediction", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "**Response to Reviewer $\\color{purple}{\\text{qmEP}}$**\n\nThanks so much for your time and positive feedback! To address your concerns, we present the point-to-point responses as follows. \nWe have carefully revised our paper, taking all your feedbacks into account. \n\n\n>**Comment 1: Clarify the relations** - \"The proposed method can be viewed as an adaptive SSL method for recommendation. Also, it can be a learnable negative sampling approach. Literature review (baseline comparison would do better) should be done for these two very relevant research line.\"\n\nThanks for your insightful comments. We acknowledge the importance of clarifying the relationship between our work and both the adaptive SSL method and learnable negative sampling approaches.\nFollowing your suggestion, we have carefully **revised the related work section** to provide a more comprehensive literature review that aligns our method with both mentioned paradigms.\nAdditionally, heeding your advice, we have **incorporated two new baselines** - adaptive SSL method: AutoCF [1] and negative sampling approach: XIR [2]. The results are summarized in the table 1 provided:\n\n**Table 1: Two new baselines on Tencent**\n|        |        | $\\gamma=200$ |        |        | $\\gamma=10$ |        |        | $\\gamma=2$ |        | Validation |\n| :----: | :----: | :----------: | :----: | :----: | :---------: | :----: | :----: | :--------: | :----: | :--------: |\n|        |   HR   |    Recall    |  NDCG  |   HR   |   Recall    |  NDCG  |   HR   |   Recall   |  NDCG  |    NDCG    |\n| AutoCF | 0.1560 |    0.0570    | 0.0317 | 0.1092 |   0.0399    | 0.0227 | 0.0797 |   0.0295   | 0.0172 |   0.0723   |\n|  XIR   | 0.1463 |    0.0538    | 0.0326 | 0.0936 |   0.0341   | 0.0211 | 0.0642 |   0.0245   | 0.0154 |   **0.0883**   |\n| AdvInfoNCE | **0.1600** |  **0.0594**  | **0.0356** | **0.1087** | **0.0403**  | **0.0243** | **0.0774** | **0.0295** |**0.0180** |   0.0879   |\n\nWe observe that:\n-  Consistency in Superiority: AdvInfoNCE consistently showcases better performance over both AutoCF and XIR across various levels of out-of-distribution test sets. This demonstrates the robustness and generalization ability of our approach.\n\n- XIR's Specific Strength: XIR demonstrates enhanced performance particularly when faced with data exhibiting a long-tailed distribution. We attribute this advantage of XIR to adaptively achieve a more accurate estimation of the softmax distribution.\n\n- Impressive Performance for AutoCF: Surprisingly, in some metrics, AutoCF exceeds the performance of the second-best methods reported in our original submission. We believe the reason for AutoCF's success lies in its ability to perform masked subgraph augmentation automatically.\n  \n\nThese experiments have enriched our understanding of where AdvInfoNCE stands in the current research landscape. We have incorporated these insights into our revised manuscript.\n\n\n\n>**Comment 2: Efficiency analysis** - \"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.\"\n\nWe highly appreciate your insightful suggestions.\nFollowing your suggestions, we have **analyzed the time complexity** of our proposed AdvInfoNCE method and, for a comprehensive understanding, compared it with two standard losses in CF (BPR and InfoNCE) and other Contrastive Learning-based CF methods (CCL, BC loss, Adap-$\\tau$). \n\nLet's define some notations for clarity:\n- $n$: Number of users\n- $d$: Embedding size\n- $N$: Number of negative sampling\n- $M = |\\mathcal{O}^{+}|$: Number of observed interactions\n- $B$: Batch size\n- $N_{b}$: Number of mini-batches within one epoch\n\nClearly, The total time complexity of one epoch without backward propagation for BPR loss is $O(N_{b}Bd)$.\nFor AdvInfoNCE, the similarity calculation for one positive item along with N negative items costs $O((N+1)d)$, and the hardness calculation costs $O(Nd)$. This implies that the training cost of AdvInfoNCE, though slightly higher than that of BPR loss, shares the same complexity order with InfoNCE.\nDetailed computational costs of  sampling based losses are summarized as follows: \n\n**Table 2: Time complexity comparison**\n\n\n| InfoNCE | CCL | BC Loss | Adap-$\\tau$ | AdvInfoNCE |\n| :-----: | :-----: | :-----: | :-----: | :-----: |\n| $O(N_{b}B(N+1)d)$ | $O(N_{b}B(N+1)d)$ | $O(N_{b}B(N+1)d)$ | $O(N_{b}B(N+1)d+(M+n)d)$ | $O(N_{b}B(N+1)d)$ |\n\n\n\n\n[1] Automated Self-Supervised Learning for Recommendation. 2023\n\n[2] Cache-Augmented Inbatch Importance Resampling for Training Recommender Retriever. 2022\n\n"}, {"review_id": "4qnyJYdcdz", "reviewer": "Reviewer_1hVj", "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.", "questions": "1.\tCould 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?\n2.\tWhy the corresponding item is identified as a hard negative rather than a general negative when sigma > 0 ?\n3.\tIn 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] ?\n4.\tIn terms of the generalization ability, could you please add some baselines focusing on out-of-distribution [3,4] ?\n\n[1] Chen, Jin, et al. \"Cache-Augmented Inbatch Importance Resampling for Training Recommender Retriever.\" In NIPS, 2022.\n[2] Chen, Jin, et al. \"Learning Recommenders for Implicit Feedback with Importance Resampling.\" In WWW, 2022.\n[3] Hongyi Wen, et al. \"Distributionally-robust Recommendations for Improving Worst-case User Experience\". In WWW, 2022.\n[4] An Zhang, et al. \"Invariant Collaborative Filtering to Popularity Distribution Shift\". In WWW, 2023.\n", "limitations": "The authors adequately point out the limitations and there is no negative societal impact of their work.", "rating": 5, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1.\tThe motivation that adaptively assigns hardness for each negative instance in an adversarial fashion to improve the generalization ability is justified.\n2.\tThe theoretical proof demonstrates the generalization ability of the proposed AdvInfoNCE loss.\n3.\tThe experiments on unbiased datasets and out-of-distribution settings demonstrate the effectiveness of the proposed AdvInfoNCE loss in terms of generalization ability.\n", "weaknesses": "1.\tIt 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.\n2.\tIn 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. \n3.\tIn 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?\n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "**Response to Reviewer $\\color{green}{\\text{1hVj}}$**\n\nWe gratefully thank you for the valuable comments. To address your concerns, below we provide the point-to-point responses. \n\n>**Comment 1 + Question 1: Intuitive example** \n\nWe value your insightful comments. To better clarify the role of $\\delta$ and its learning process for hard and false negatives, we **conducted additional illustrative examples**.\n\nThe illustrative example should highlight two points. 1. AdvInfoNCE could effectively **identify the false and hard negatives** via learnable $\\delta_j$ (max-stage). 2. $\\delta$ helps to **refine the item ranking** compared to InfoNCE (min-stage).\n- **Identification of False and Hard Negatives:** \nOn the Tencent training data, we trained both the InfoNCE and AdvInfoNCE models. Interactions unobserved during training but present in testing are labeled as false negatives (FN), otherwise true negatives (TN).\nBased on our theoretical assumption, for a FN, we wish a more relaxed constraint, leading to $\\delta < 0$. \nTo validate this assumption, we introduce the 'FN identification rate', a metric determining the proportion of FNs where $\\delta < 0$.\nAs Fig 6 in one-page uploaded pdf shows, our observations are consistent with our claim. \nAs training proceeds, the FN identification rate increases, capping at nearly 70%. \nThis reveals AdvInfoNCE's capability to identify approximately 70% of FNs in test set. \nWe attribute the superior performance of AdvInfoNCE over InfoNCE to this gradual identification.\n- **Refinement of Item Ranking:** \nwe randomly draw two users along with their FN and TN items, subsequently retrieving their associated $\\delta$ values, ranking positions, and cosine similarities, as demonstrated in Fig 7.\nConsistent with our prior findings, for an FN, AdvInfoNCE generally assigns a negative $\\delta$. \nThis negative $\\delta$, indicating a more lenient feasible zone constraint, enables the recommender to achieve higher cosine similarity.\nThis, in turn, escalates the FN's ranking.\nFor instance, as Fig 7(a) shows, given $\\delta=−0.7887$, AdvInfoNCE elevates an FN from the 55th to a commendable 5th position. Conversely, for a TN, AdvInfoNCE leans towards a positive $\\delta$, narrowing the feasible zone, thus distancing it from positives. \nAn exemplary case is the TN $j_{6543}$ in Fig 7(a), where AdvInfoNCE, upon learning its $\\delta = 1.1921$, declines its rank from 257th to 4587th. \nSuch real-world cases attest to $\\delta$'s role in fine-tuning recommendation ranking.\n\nIn a word, for a specific u, the learnable $\\delta$ variable measures the item hardness and further frame a fine-grained ranking criterion.\n\n>**Comment 2 + Comment3: Add mining hard negatives & OOD baselines** \n\nThanks so much for bringing these excellent works to us. Folloing your suggestion, we have **conducted additional experiments** on XIR [1], S-DRO [2], and InvCF [3] on Tencent. \nWe appreciate your recommendation of including AdaSIR [4]; however, due to the constraints of the rebuttal period, we have planned to consider it as a baseline in our future work.\n\n**Table 1: Overall performance on Tencent**\n|        |        | $\\gamma=200$ |        |        | $\\gamma=10$ |        |        | $\\gamma=2$ |        | Validation |\n| :----: | :----: | :----------: | :----: | :----: | :---------: | :----: | :----: | :--------: | :----: | :--------: |\n|        |   HR   |    Recall    |  NDCG  |   HR   |   Recall    |  NDCG  |   HR   |   Recall   |  NDCG  |    NDCG    |\n|  XIR   | 0.1463 |    0.0538    | 0.0326 | 0.0936 |   0.0341   | 0.0211 | 0.0642 |   0.0245   | 0.0154 |   0.0883   |\n|    sDRO    | 0.1455 | 0.0516 | 0.0286 | 0.0857 | 0.0304 | 0.0166 | 0.0552 | 0.0205 | 0.0110 | 0.0872 |\n|   InvCF    | **0.1651** | **0.0605** | 0.0331 | 0.1061 | 0.0386 | 0.0204 | 0.0722 | 0.0272 | 0.0149 | **0.0912** |\n| AdvInfoNCE| 0.1600 |  0.0594  | **0.0356** | **0.1087** | **0.0403**  | **0.0243** | **0.0774** | **0.0295** | **0.0180** |   0.0879   |\n\nWe observe that:\n- AdvInfoNCE consistently exhibits superior performance compared to hard negative mining methods and OOD baselines across varying test set levels in terms of NDCG metric. Such results underscore the robustness and generalization ability of AdvInfoNCE.\n\n- For the case where $\\gamma = 200$, although InvCF slightly edges out AdvInfoNCE in HR and Recall, a potential explanation lies in InvCF's design which selects in-batch negatives (1024 in total). In contrast, AdvInfoNCE uses only 128 negatives. As can be inferred from another analysis (Table 3 in response for the first Reviewer ikze), amplifying the number of negative sampling could boost the performance of AdvInfoNCE. (Sorry for inconvenience. Due to space constraints, I can not directly include Table here.)\n  \n- Specific Strength of XIR: XIR demonstrates enhanced performance particularly when faced with data exhibiting a long-tailed distribution, i.e., $\\gamma =200$. We attribute this advantage of XIR to adaptively achieve a more accurate estimation of the softmax distribution.\n\n\n>**Question 2: General or hard negative** \n\nYour question goes to the heart of our method. In our paper, we define an item with $\\delta > 0$ as a hard negative based on the gradient analysis presented in Appendix B.3.\nThe gradients corresponding to the negative item j have a proportional relation to the $\\exp(\\delta_j)$.\nIn other words, for $\\delta_j >0$, the recommender exhibits more attention to this item by a factor of $\\exp(\\delta_j) >1$.\nSuch characteristics naturally fall under the category of hard negatives based on hard negative mining.\n\n\n[1] Cache-Augmented Inbatch Importance Resampling for Training Recommender Retriever. 2022\n\n[2] Distributionally-robust Recommendations for Improving Worst-case User Experience. 2022\n\n[3] Invariant Collaborative Filtering to Popularity Distribution Shift. 2023\n\n[4] Learning Recommenders for Implicit Feedback with Importance Resampling. 2022"}]

Author rebuttal:
We are delighted to see the contributions of our paper have been acknowledged by the majority of the Reviewers. Specifically, we appreciate the Reviewers' recognition of our motivation, theoretical analysis ($\color{blue}{\text{ikze}}$, $\color{orange}{\text{PLbw}}$, $\color{purple}{\text{qmEP}}$, $\color{green}{\text{1hVj}}$), and novelty ($\color{blue}{\text{ikze}}$ , $\color{red}{\text{kSe8}}$, $\color{green}{\text{1hVj}}$).


We appreciate all the reviewers for their valuable comments and suggestions. This helped improve our submission and better strength our claims. Taking into account suggestions of Reviewers, we have summarized the updates to the paper as follows:

- **More detailed explanations.** Addressing the concerns raised by Reviewers $\color{red}{\text{kSe8}}$ and $\color{green}{\text{1hVj}}$, we have incorporated **two additional illustrative experiments** on the dynamic evolution of the fine-grained hardness $\delta_{j}$ and case studies explaining the effect of $\delta_{j}$.

- **Experiments on two collaborative filtering backbones.** Following the suggestions of Reviewer $\color{blue}{\text{ikze}}$, we have conducted experiments on **two new CF backbones** to validate the generalization ability of AdvInfoNCE.

- **Comparison experiments.** In response to Reviewers $\color{purple}{\text{qmEP}}$ and $\color{green}{\text{1hVj}}$, we have added literature reviews and **four supplementary comparison experiments** in the fields of negative sampling, adaptive SSL, and recommendation debiasing.

- **Details about AdvInfoNCE.** We have incorporated detailed discussion about AdvInfoNCE, including hyperparameters selection, instability and computational complexity, to address the concerns of Reviewers $\color{blue}{\text{ikze}}$, $\color{orange}{\text{PLbw}}$ and $\color{purple}{\text{qmEP}}$.

We have tried our best to address the main concerns raised by reviewers and we hope that these improvements will be taken into consideration.
We also present the point-to-point responses for each reviewer below.

Meta-review: The paper introduces a novel adversarial contrastive loss, Adversarial InfoNCE, designed to enhance the performance, particularly in out-of-distribution (OOD) scenarios, of collaborative filtering in top-k recommendation systems. Despite initial concerns raised during the review process, the majority were resolved satisfactorily. All reviewers collectively, with some expressing strong support, recommended the acceptance of the paper. It is highly advised that the subsequent revision includes the additional discussions and results discussed during the review process.
Decision: Accept (poster)