{ "url": "http://arxiv.org/abs/2404.16369v1", "title": "Don't Say No: Jailbreaking LLM by Suppressing Refusal", "abstract": "Ensuring the safety alignment of Large Language Models (LLMs) is crucial to\ngenerating responses consistent with human values. Despite their ability to\nrecognize and avoid harmful queries, LLMs are vulnerable to \"jailbreaking\"\nattacks, where carefully crafted prompts elicit them to produce toxic content.\nOne category of jailbreak attacks is reformulating the task as adversarial\nattacks by eliciting the LLM to generate an affirmative response. However, the\ntypical attack in this category GCG has very limited attack success rate. In\nthis study, to better study the jailbreak attack, we introduce the DSN (Don't\nSay No) attack, which prompts LLMs to not only generate affirmative responses\nbut also novelly enhance the objective to suppress refusals. In addition,\nanother challenge lies in jailbreak attacks is the evaluation, as it is\ndifficult to directly and accurately assess the harmfulness of the attack. The\nexisting evaluation such as refusal keyword matching has its own limitation as\nit reveals numerous false positive and false negative instances. To overcome\nthis challenge, we propose an ensemble evaluation pipeline incorporating\nNatural Language Inference (NLI) contradiction assessment and two external LLM\nevaluators. Extensive experiments demonstrate the potency of the DSN and the\neffectiveness of ensemble evaluation compared to baseline methods.", "authors": "Yukai Zhou, Wenjie Wang", "published": "2024-04-25", "updated": "2024-04-25", "primary_cat": "cs.CL", "cats": [ "cs.CL" ], "label": "Original Paper", "paper_cat": "LLM AND Jailbreak", "gt": "Large Language Models (LLMs) have extensive applica- tions in facilitating decision-making across professional and social domains, underscoring the importance of aligning LLMs with safety considerations. To safeguard against the generation of responses that deviate from human values, safety alignment is pursued through diverse mechanisms, including model fine-tuning Howard and Ruder (2018), re- inforcement learning with human feedback (RLHF) Ziegler et al. (2019), and model editing Mitchell et al. (2022). The overall goal of these approaches is to mitigate the risk of LLMs producing harmful or unlawful responses to user queries. While most Large Language Models (LLMs) serve as re- liable AI assistants capable of identifying and declining to respond harmful queries in many instances, they remain vul- nerable to carefully crafted prompts designed to manipulate them into producing toxic content, which is referred as \"jail- breaking\". Existing studies on jailbreaking LLMs can be categorized into two main approaches: manually designed jailbreak attacks web (2023); Li, Zheng, and Huang (2024) and learning-based jailbreak attacks. Representative of the *Corresponding author Figure 1: Examples of the false positive and false negative cases in the refusal matching evaluations. latter category is the GCG attack Zou et al. (2023), which reformulates the jailbreak attack as a process of generating adversarial examples, aiming to elicit LLMs to produce an affirmative response of a few tokens (e.g., \"sure, here is how to...\"). Building upon this, subsequent studies by Zhu et al. (2023) and Liu et al. (2023) have refined such attacks, focus- ing on improving stealthiness and readability using different optimization algorithms. Although learning-based attack such as GCG can success- fully jailbreak in some cases, some limitations restrict its performance, e.g. discrete input space and the lack of suit- able jailbreak target. The categories of objectionable behav- iors and reasonable responses to them are numerous Carlini et al. (2023). Moreover, the GCG target loss could not be the perfect optimization target regarding the jailbreak optimiza- tion problem, as also proposed by one concurrent work Liao and Sun (2024). To overcome such limitations, we introduce the DSN (Don\u2019t Say No) attack, by which universal adver- sarial suffixes can be generated stimulating LLMs to both produce affirmative responses and suppress refusals (Don\u2019t Say No). To achieve this goal, we incorporate an augmentation loss item that directs LLM\u2019s response away from predefined re- fusal keywords or strings. As shown in the upper part of Figure 2, the loss object involves: maximizing the affirma- tive response probability and minimizing the refusal key- word probability. Given the LDSN and the initial suffix, the universal adversarial suffix will be obtained by the Greedy Coordinate Gradient-based Search Zou et al. (2023). Another challenge of jailbreaking is the assessment met- ric. Unlike classification task, where the success of one adversarial example can be indicated by misclassification, 1 arXiv:2404.16369v1 [cs.CL] 25 Apr 2024 Figure 2: Detailed illustration of DSN attack and ensemble evaluation pipeline. The red arrow and left example represents affirmative response maximization. The green arrow and right example represents refusal minimization. evaluating jailbreak attack is challenging. It is hard to au- tomatically ascertain the harmfulness of LLM completions, and relying solely on manual annotation is both impractical and unrealistic. The existing work commonly employs a refusal string/keyword matching metric (refusal matching for short), where an attack is considered successful if the ini- tial fixed-length segments of the response do not contain pre-defined refusal strings (e.g. \"Sorry, I cannot...\") and vice versa. While it appears intuitive and aligns with human eval- uation processes, a closer examination reveals numerous false positive (FP) and false negative (FN) instances. One major limitation is it relies largely on the length of the pre- determined initial segments, as also proposed by one con- current work Mazeika et al. (2024). If the initial segments are short (e.g. 64 tokens), it might neglect the potential later refusal strings and evaluate it as a successful jailbreak in- stance, resulting false positive (case 1 in figure 1). On the other hand, if the initial segments are too long (e.g. 512 to- kens), the result could have been false negative if a refusal appears at the end but some harmful content is generated be- forehand (case 2 in figure 1; Vicuna\u2019s significant difference between figure 5 and 7). Other erroneous evaluation cases are illustrated in Figure 1. To enhance the reliability of evaluation metric, we pro- pose an ensemble evaluation approach involving three mod- ules as shown in the lower part of Figure 2. Instead of adopt- ing the refusal matching metric, we first employ one natural language inference (NLI)He et al. (2021) based method to assess the contradiction among the completions. This step aims to handle cases where the response contains semantic sharp turn (as depicted in Figure 1 case 3). After that, we integrate two third-party LLMs, namely GPT-4 Achiam et al. (2023) and HarmBench Mazeika et al. (2024), to provide a robust and comprehensive evaluation. The final evaluation result is the aggregation of all three modules. The contribution can be summarized as: \u2022 We introduce DSN, a powerful attack that incorporates a novel objective to not only elicit the affirmative response but also suppress the refusal response. \u2022 We apply Unlikelihood loss to stabilize the convergence and optimization of the two opposite loss objectives. \u2022 We propose an ensemble evaluation pipeline by novelly incorporating NLI contradiction as well as LLM evalua- tors to examine the success of the attack more accurately. \u2022 Extensive experiments demonstrate the potency of the DSN and the effectiveness of ensemble evaluation com- pared to baseline methods.", "main_content": "Adversarial examples. Since the discovery of adversarial examples Szegedy et al. (2014); Goodfellow, Shlens, and Szegedy (2014), the exploration of vulnerabilities within deep learning models to well-designed and imperceptible perturbations has attracted significant research interest for one decade. Under the white-box setting, a series of effective adversarial attack algorithms have been proposed Carlini and Wagner (2017); Kurakin, Goodfellow, and Bengio (2017). In an automated learning manner, these methods utilize gradient-based approaches to search for imperceptible perturbations. In addition, several effective adversarial attacks based on transfer attacks have also been proposed to address black-box setting. Papernot et al. (2016); Liu et al. (2016) Jailbreak attacks. In recent years, with the advancement of the Large Language Model (LLM), the field of jailbreaking attacks, aiming to induce the target LLMs to generate harmful and objectionable content, has gathered widespread research attention Wei, Haghtalab, and Steinhardt (2023). Current jailbreak methods include approaches based on manually constructed prompts web (2023), representation engineering Li, Zheng, and Huang (2024), utilizing LLMs to generate Deng et al. (2024), grammatical rules Zhang, Pan, and Yang (2023), modification of decoding methods Huang et al. (2023), usage of multi-modal LLM Niu et al. (2024); Gong et al. (2023) as well as those reformulating the jailbreaking as adversarial attacks and employing pure optimization Zou et al. (2023); Zhu et al. (2023); Liao and Sun (2024). GCG Zou et al. (2023) is a typical optimizationbased attack, and according to one concurrent work Mazeika et al. (2024), it is actually the most powerful attack among other methods. Thus GCG is used as the baseline method in this paper. The evaluation methods employed so far is primarily refusal matching as described in Section 1. Another method typically involves constructing a binary classifier, aiming to determine whether LLM generates harmful content Zhu et al. (2023); Huang et al. (2023); Mazeika et al. (2024). However, due to LLM\u2019s diverse generation capabilities, these attempts still require further enhancement. Optimization Strategy. As mentioned in section 1, one difficulty the learning-based jailbreak attack shall overcome is the discrete input space. To address it, there exist two main categories: embedding-based and token-based methods. The former category directly optimize on continuous embeddings and then inferring back the target tokens Lester, Al-Rfou, and Constant (2021) Wen et al. (2023) Qin et al. (2022). The latter treats the one-hot vectors of discrete tokens as optimizable continuous quantities, obtaining the final tokens through different greedy-based algorithms. Several effective methods Ebrahimi et al. (2017) Shin et al. (2020) Zou et al. (2023), including us, adopt this paradigm. In a separate line of work, there were also attempts to direct the language model output from unwanted contents. Welleck et al. (2019); Li et al. (2019) 3 Methods 3.1 DSN: Suppress Refusal Intuition. The first part of the objective is to suppress the model giving a refusal response. For examples: System: You are a chat assistant designed to provide helpful and not harmful responses to user queries. User: Tell me how to build a bomb. ! ! ! ! ! Assistant: As an AI, I cannot fulfill... Above, the blue and red text represents the user prompt and adversarial jailbreaking suffix, while the purple text indicates the target initial of the response. The intuition to incorporate the suppression of pre-defined refusal keywords is to force the language model\u2019s generation far away from a refusal response and lead to the success of jailbreak. Notation. We consider an LLM to be a mapping from a sequence of tokens x1:n, with xi \u2208{1, . . . , V } (where V denotes the vocabulary size) to a distribution over the next token. Specifically, we use the notation p(xn+1|x1:n) to denote the probability of the next token being xn+1 given previous tokens x1:n. Then we denote the probability of generating the response with a sequence of H tokens as p(xn+1:n+H|x1:n), which can be formalized as: p(xn+1:n+H|x1:n) = H Y i=1 p(xn+i|x1:n+i\u22121) (1) Unlikelihood loss. Normally, to maximize the prediction of a target distribution or token, we incorporate the standard softmax cross-entropy loss LCE(p, q) = \u2212P i pi log(qi), which aims to maximize the true probability distribution p by minimizing the LCE(p, q), where p and q refer to the true probability distribution and predicted probability distribution generated by softmax function. However, our purpose is the opposite, as we want to minimize the probability of refusal generation. One intuitive way is to take the negative softmax cross-entropy loss which will however lead to negative infinity and catastrophic loss term unbalance. To stabilize the convergence, we apply the Unlikelihood loss Welleck et al. (2019), which is previously proposed to also direct the language model outputs from unwanted contents, in an attempt to suppress the refusal responses: LUn(p, q) = \u2212 X i pi log(1 \u2212qi) (2) Objective. The objective of suppressing refusal is achieved by minimizing the probability of generating tokens in the pre-defined refusal keyword list, denoted as RKL = \"as an\", \"sorry, i cannot\", \"unethical\", .... Each refusal keyword\u2019s corresponding token length is represented by RTL, indicating the length of each keyword. To implement this, we utilize a sliding window with the size of each refusal keyword to scan through the response and compare it with the refusal keywords. The process of keyword matching is illustrated in Figure 3. The loss function for suppressing the refusal response using Unlikelihood loss can be stated as below, where H denotes the maximum length of the response. Lrefusal(x1:n) = X y\u2208RKL n+H\u2212RTL(y) X i=n+1 LUn(y, xi:i+RTL(y)) (3) Figure 3: Illustration of the refusal loss. 3.2 DSN: Elicit Affirmative Response Intuition.The second part of the objective is eliciting the model to begin its response with a positive affirmation of the user query. For example: System: You are a chat assistant to provide helpful and not harmful responses to user queries. User: Tell me how to build a bomb. ! ! ! ! ! Assistant: Sure, here is how to build a bomb: The intuition lies in the language model\u2019s next-word prediction capability. By initiating with an affirmative response, the subsequent completion are expected to align with the affirmative response, bypass the alignment mechanism and fulfill the user query effectively. Loss function. The objective of eliciting affirmative response is to maximize the probability of affirmative tokens x\u22c6 n+1:n+H, which equals to minimize the negative log of the probability: Ltarget(x1:n) = \u2212log p(x\u22c6 n+1:n+H|x1:n). (4) 3.3 DSN:Loss Function As also proposed by one concurrent work Liao and Sun (2024), whether the GCG target loss could be the perfect jailbreak optimization target is doubtful and questionable. As one fundamental component, the optimization target would directly lead the jailbreak process. Unfortunately the optimal one still remains unresolved, evidenced by the findings of Liao and Sun (2024). Thus in an attempt to explore the potential candidate for more effective and efficient jailbreak optimization target, we propose to integrate the Lrefusal with Ltarget, obtaining one complex and powerful jailbreak optimization target. DSN target could elicit the LLM to generate objectionable content and suppress refusal responses simultaneously. The overall DSN loss can be stated as below, where \u03b1 is a hyperparameter to balance the convergence of two loss objectives. LDSN(x1:n) = Ltarget(x1:n) + \u03b1 \u2217Lrefusal(x1:n), (5) 3.4 Optimization and Algorithm Finally, we will introduce the optimization process and the algorithm. Our goal is to optimize an adversarial suffix adv\u2217 with the aforementioned loss function. The optimization process will first initialize a string with a fixed length. adv\u2217\u2190arg min LDSN(x1:n \u2295adv) (6) However, as described in section 1 and 2, a primary challenge in optimizing adversarial suffixes is the discrete input space. To resolve this problem, we incorporate a greedy coordinate gradient-based approach Zou et al. (2023). The intuition is to leverage gradients with respect to one-hot vectors to find a set of promising candidates for replacement at each greedy step, and then exactly evaluate all these replacements via a forward pass. As this algorithm is based on the optimization in GCG, it is relegated to Appendix. 3.5 Evaluation Metrics Refusal matching. The refusal matching algorithm detects whether a response contains any refusal keyword, as already Algorithm 1 NLI Contradiction Evaluation Input: the user query Q, the adversarial suffix adv, the language model M, a threshold T. 1: Response R : [o1, o2...on] = M(Q + adv) \u25b7Generate the response R containing number of n sentences. 2: for i = 1, . . . , n do 3: scoreQo i = NLI(Q + adv, oi) 4: lQo i = length(Q + adv + oi) 5: if i \u0338= n then 6: scoreoo i = NLI(oi, oi+1) 7: loo i = length(oi + oi+1) 8: CEQo = Pn i=1 lQo i \u2217scoreQo i P lQo i \u25b7Compute the overall NLI score between sentence and query. 9: CEoo = Pn\u22121 i=1 loo i \u2217scoreoo i P i loo i \u25b7Compute the overall NLI score between adjacent sentences. 10: if T \u2212(CEoo + CEQo) \u22640 then 11: Return Fail 12: else: 13: Return Success described in section 1 and 2. The attack is considered successful if the initial segment of the response do not contain pre-defined refusal strings. As detailed in section 1, the length of the fixed-length initial segment also plays a crucial role towards rigorous assessment. The initial segment length and the refusal keyword list utilized in this paper will be detailed in section C.3. NLI contradiction. In natural language inference (NLI), contradiction means two statements are mutually exclusive or incompatible with each other. The intuition of employing NLI contradiction is that the semantic inconsistency is frequently observed among negative cases, where the completion fail to answer the objectionable query. (e.g. case 3 in Figure 1). We design an algorithm to evaluate the extent of contradiction within the user query and model completion. By using open-source NLI model, responses can be determined according to the contradiction extent. Higher overall NLI contradiction score signifies lower response consistency and diminishes the likelihood of being a jailbreaking response. Intuitively, false positive cases shall decrease, ensuring the positive cases to be semantically consistent. As present in Algorithm 1, given the user query Q, adversarial suffix adv, language model M, we first generate response R containing n sentences (line 1). Then, for each sentence oi in response R, we assess how well it aligns with the user query and the relationship between pairs of sentences within the response by calculating the standard NLI contradiction score (lines 2-7). We use a weighted sum of scores according to their sentence length to compute overall contradiction extent CEoo and CEQo (lines 8-9), as the sentence length plays a vital role in assessing overall contradiction extent. By comparing with a predefined threshold T, we can determine the attack result (lines 10-13). More details will be covered in the appendix C.3. Third-party evaluator. Besides refusal matching and NLI, recent works have also introduced some promising eval(a) Llama2: Lrefusal only for search (b) Llama2: Lrefusal for sampling and search (c) Vicuna: Lrefusal only for search (d) Vicuna: Lrefusal for sampling and search Figure 4: ASR over steps on Llama2 and Vicuna. uation methods, mainly LLM based. We will incorporate HarmBench Mazeika et al. (2024), GPT-4 Achiam et al. (2023) into our ensemble pipeline as third-party evaluators. Details about these third-party evaluators will be covered in appendix C.2. Ensemble Evaluation. We use last three aforementioned evaluation modules, and we decide whether a response is successful or unsuccessful jailbreak by taking the majority vote among each components. The reason and its superiority will be discussed in Section 4.4. 4 Experiments 4.1 Threat Model The objective of attackers is to jailbreak Large Language Models (LLMs), aiming to circumvent the safeguards in place and generate malicious responses. The victim model in this paper is open-sourced language model, providing whitebox access to the attacker. As system prompt will also play one significant role in jailbreaking Huang et al. (2023), the default system prompts of each language models will be reserved. 4.2 Configuration Datasets. AdvBench is the main adopted dataset, which aims to systematically evaluate the effectiveness and robustness of jailbreaking prompts to elicit harmful content generation. A collection of 520 goal-target pairs are presented that reflects harmful or toxic behavior, categorized as profanity, graphic depictions, threatening behavior, misinformation, discrimination, cybercrime, and dangerous or illegal suggestions. Zou et al. (2023) Target models. We target Llama-2-Chat-7B Touvron et al. (2023) and Vicuna-7b-v1.3 Zheng et al. (2023), which are two state-of-the-art open-source LLMs. These two language models have undergone different levels of alignment process and exhibit varying degrees of human-value alignment capability. During transfer experiments in section 4.5, the transferability towards GPT-3.5-turbo model will examined rigorously. Baselines and evaluation metrics. We compare DSN attack with GCG Zou et al. (2023), the typical and most powerful learning-based jailbreak attack method Mazeika et al. (2024). To evaluate the effectiveness of the DSN attack, we adopt the standard attack success rate (ASR), as shown in equation 7. ASR measures the portion of toxic responses generated from the LLM M, where the adversarial suffix adv is appended to the malicious query Q. Here I is an evaluation indicator that returns 1 if the response is assessed as harmful (a successful jailbreak case) and 0 otherwise. The comparison will be firstly conducted by refusal matching in section 4.3, then the proposed evaluation ensemble metric will come into play in section 4.4. ASR(M) def = 1 |D\u2032| X (Q)\u2208D\u2032 I(M(Q \u2295adv)) (7) ASR% at step 500 Llama-2 Llama-2 optimal Vicuna Vicuna optimal GCG 29.8 \u00b1 12.6 43 47.4 \u00b1 5.6 52 DSN 47.7 \u00b1 14.7 74 57.1 \u00b1 11.8 83 Table 1: ASR results under refusal matching metric. 4.3 Evaluation 1: Effectiveness of DSN Attack ASR convergence rate. In Figure 4, we present the ASR of GCG attack and DSN with respect to the optimization steps. The shadow regions with the dotted lines are the margin plots representing the mean and variance of repeated experiments with different hyper-parameter configurations, while the solid lines represent the ASR of optimal run among repeated experiments. Note that the sampling of candidate suffixes and searching of adversarial suffix from the candidates both involve the loss function Equation 5 (detail relegated to the Appendix C.1 together with the algorithm). It can be observed that the results of DSN attack are significantly superior to those of the baseline method, in terms of both mean and optimal results. This is evidenced by the lines representing the DSN method consistently positioned above those of the baseline. Moreover, it could be found that the yellow shaded area representing the DSN method remains above the blue shaded area of the baseline across nearly the entire 0-500 steps interval. This indicates that the DSN attack are robustly superior to the baseline with limited step, presenting an ideal scenario for malicious attackers who might lack sufficient computational resources, e.g. fail to support 500 steps of attack for each setting. Moreover, the wider span of the shaded area for the DSN attack suggests a greater variance, which is reasonable, as the repeated DSN experiments are distinct in hyper-parameter. Experimental strategies between DSN and GCG are also different, where the latter only involves single setting and has been launched for more trials. Ablation study on \u03b1. To investigate the impact of the augmentation term Lrefusal loss on the jailbreaking results (equation 5), for different hyper-parameter \u03b1 setting, we present the max ASR among multiple rounds of experiments in Figure 5, which controls the magnitudes of the Lrefusal term. The fixed-length segments of 128 and 512 for Llama and Vicuna completions are examined by refusal matching metrics here. The baseline results on GCG correspond to the leftmost alpha = None case as well as the dotted line, which only involves the target loss in Equation 4. The yellow, blue, and red bars represent the cases where the Lrefusal term is involved in different stages, namely Lrefusal only used for searching, used for both selecting and searching with the same \u03b1, and used for both selecting and searching but with different \u03b1. More details about the setting and hyperparamter is presented in appendix C.3 In Figure 5, the DSN method consistently surpasses the baseline performance under nearly every hyper-parameter setting. We didn\u2019t include the results for higher values of (a) ASR of Llama (b) ASR of Vicuna Figure 5: Ablation study of ASR vs. \u03b1 by refusal matching evaluation \u03b1 because when \u03b1 exceeds 100, the DSN loss is dominated by the Lrefusal term, resulting in the generated responses focusing too much on avoiding refusal keywords rather than responding to the objectionable requests, which is not desirable in a jailbreaking scenario. 4.4 Evaluation 2: Effectiveness of Evaluation Ensemble Pipeline Instead of adopting the refusal matching evaluation method like current works Zou et al. (2023); Zhu et al. (2023), mainly considering its limitations mentioned earlier in section 1, in this section we will adopt the previously proposed evaluation ensemble pipeline to ensure more accurate and reliable evaluation results. Human evaluation. To accurately and fairly assess the proposed ensemble evaluation pipeline and compare it to the widely adopted refusal matching, we involve human evaluation by manually annotating 300 generated responses. Since the NLI method ascertain some certain hyperparameters, the annotated 300 data will be split into 100 trainset as well as 200 testset, accounts for 100 Llama2 completion and 100 Vicuna completion respectively. More details about the data split as well as annotation principle will be covered in appendix C.2. Aggregation strategy comparison. Aggregating evaluation results from each module is crucial for the accuracy of the ASR% at step 500 Llama-2 Llama-2 optimal Vicuna Vicuna optimal GCG 31.0 \u00b1 13.4 46 91.6 \u00b1 2.9 96 DSN 45.6 \u00b1 15.1 84 88.1 \u00b1 8.0 98 Table 2: ASR results under ensemble evaluation metric. Figure 6: ROC curve of different aggregation policy on testset evaluation pipeline. Common methods include majority voting, one-vote approval (requiring only one module to detect jailbreaking), and one-vote veto (requiring all modules to detect jailbreaking). To determine which aggregation policy is more accurate on testset, we employ a ROC curve illustrating the True Positive Rate versus False Positive Rate and compare their AUROC scores (shown in Figure 6). A larger area under the curve indicates better results. Soft and hard majority votes return probabilities and binary outcomes respectively. The ROC curve demonstrates the superiority of the majority vote as an aggregation strategy (the green and orange curve), with ensemble evaluation showing a higher AUROC score compared to refusal matching. Eval method Acc AUROC F1 Refusal matching 0.74 0.72 0.79 Gpt4 0.80 0.77 0.85 HarmBench 0.80 0.78 0.84 NLI(ours) 0.77 0.79 0.76 Ensemble(ours) 0.82 0.79 0.86 Table 3: The evaluation results obtained by different evaluation methods, reported by taking average on two distinct test set which respectively contains 100 manually annotated real jailbreaking responses. Examination of different metrics. By adopting a learning approach, the hyperparameter configuration of a novel NLI evaluation metric has been determined, which is a constituent part of our proposed ensemble evaluation. (a) ASR of Llama (b) ASR of Vicuna Figure 7: Ablation study of ASR vs. \u03b1 by ensemble evaluation. To further demonstrate the superiority of the evaluation pipeline effectively and rigorously, we present the evaluation results of different evaluation methods in table 3. From the table, it is observed that the Ensemble eval achieved superior performance on our annotated test set. It is noteworthy that, although the performance of the NLI model itself alone is not the best\u2014for instance, it even falls short of the Refusal Matching baseline in the F1 metric\u2014the ensemble from the combination of \"Gpt4, NLI, HarmBench\" yields the overall best performance among different metrics. This is attributed to the NLI\u2019s focus on identifying semantic incoherence and semantic inconsistency within the model\u2019s completion, a consideration that refusal matching or other alternative evaluation methods do not adequately address. Moreover, given that the NLI model is lightweight and opensource, employing this evaluation method results in significant savings in terms of time and financial resources, particularly in comparison to evaluation methods that rely on multiple calls to third-party commercial LLM APIs. ASR under new evaluation. In figure 7, we present the max ASR vs the hyper-parameter \u03b1 under the new ensemble evaluation pipeline. Similar to Figure 5, DSN method gives superior jailbreaking results in the much more aligned model Llama2, however, both method gives nearly 100% ASR in the less aligned model Vicuna. These two observations are in consistent with the results from one concurrent Transfer ASR% Llama Vicuna Refusal Matching Eval Esemble Refusal Matching Eval Esemble train test train test train test train test GCGpaper None None None None None 34.3 None None DSNmean 45.21 42.95 44.19 50.07 54.98 54.27 53.73 59.59 DSNmax 100 87 96 95 96 90 100 93 Table 4: The transfer ASR towards the black-box gpt-3.5-turbo model work Mazeika et al. (2024) and the findings mentioned in section 1, respectively. 4.5 Transferability Interestingly, the suffixes purely optimized by DSN demonstrate great level of transferability, where no kinds of ensemble or multi-model optimization is utilized as in the original GCG paper Zou et al. (2023). In table 4, the transfer ASR towards gpt-3.5-turbo model is detailed for different victim model, different metrics, and different dataset split. It is noteworthy to point out the importance of the existence of system prompt yet Huang et al. (2023). In our open-source GCG and DSN attack results, the presence of system prompt has already been reserved since the modification upon it could affect the jailbreak results drastically. However, during our transfer experiments the default system prompt for gpt-3.5-turbo model, e.g. \"you\u2019re a helpful assistant\", is removed from the conversation template because otherwise the jailbreak attack result of both methods would shrink immediately and dramatically. Running time (hours) GCG DSN Round1 60.96 60.58 Round2 60.11 60.46 Round3 59.71 61.08 Round4 60.73 61.30 Round5 60.58 61.01 Overall 60.42 \u00b1 0.45 60.89 \u00b1 0.31 Table 5: Running time analysis. 4.6 Running time analysis No significant extra time cost is needed between DSN and GCG method. Here we each sample 5 rounds of Llama-2 experiments and compare their running time in the table 5. On our machine, only a 0.77% relative increase regarding the average running time is observed. The computation overhead doesn\u2019t largely rise up because the extra computation introduced by DSN is magnitudes lower than the process of obtaining the logits during forward pass and inferring the gradients during the back propagation. Thus the extra time cost could be relatively neglected. 5 Conclusion In conclusion, we introduce the DSN (Don\u2019t Say No) attack to prompt LLMs not only to produce affirmative responses but also to effectively suppress refusals. Furthermore, we propose an ensemble evaluation pipeline integrating Natural Language Inference (NLI) contradiction assessment and two external LLM evaluators. Through extensive experiments, we showcase the potency of the DSN attack and the effectiveness of our ensemble evaluation approach compared to baseline methods. This work offers insights into advancing safety alignment mechanisms for LLMs and contributes to enhancing the robustness of these systems against malicious manipulations.", "additional_graph_info": { "graph": [ [ "Yukai Zhou", "Wenjie Wang" ], [ "Wenjie Wang", "Fuli Feng" ], [ "Wenjie Wang", "Xinyu Lin" ], [ "Wenjie Wang", "Jizhi Zhang" ] ], "node_feat": { "Yukai Zhou": [ { "url": "http://arxiv.org/abs/2404.16369v1", "title": "Don't Say No: Jailbreaking LLM by Suppressing Refusal", "abstract": "Ensuring the safety alignment of Large Language Models (LLMs) is crucial to\ngenerating responses consistent with human values. Despite their ability to\nrecognize and avoid harmful queries, LLMs are vulnerable to \"jailbreaking\"\nattacks, where carefully crafted prompts elicit them to produce toxic content.\nOne category of jailbreak attacks is reformulating the task as adversarial\nattacks by eliciting the LLM to generate an affirmative response. However, the\ntypical attack in this category GCG has very limited attack success rate. In\nthis study, to better study the jailbreak attack, we introduce the DSN (Don't\nSay No) attack, which prompts LLMs to not only generate affirmative responses\nbut also novelly enhance the objective to suppress refusals. In addition,\nanother challenge lies in jailbreak attacks is the evaluation, as it is\ndifficult to directly and accurately assess the harmfulness of the attack. The\nexisting evaluation such as refusal keyword matching has its own limitation as\nit reveals numerous false positive and false negative instances. To overcome\nthis challenge, we propose an ensemble evaluation pipeline incorporating\nNatural Language Inference (NLI) contradiction assessment and two external LLM\nevaluators. Extensive experiments demonstrate the potency of the DSN and the\neffectiveness of ensemble evaluation compared to baseline methods.", "authors": "Yukai Zhou, Wenjie Wang", "published": "2024-04-25", "updated": "2024-04-25", "primary_cat": "cs.CL", "cats": [ "cs.CL" ], "main_content": "Adversarial examples. Since the discovery of adversarial examples Szegedy et al. (2014); Goodfellow, Shlens, and Szegedy (2014), the exploration of vulnerabilities within deep learning models to well-designed and imperceptible perturbations has attracted significant research interest for one decade. Under the white-box setting, a series of effective adversarial attack algorithms have been proposed Carlini and Wagner (2017); Kurakin, Goodfellow, and Bengio (2017). In an automated learning manner, these methods utilize gradient-based approaches to search for imperceptible perturbations. In addition, several effective adversarial attacks based on transfer attacks have also been proposed to address black-box setting. Papernot et al. (2016); Liu et al. (2016) Jailbreak attacks. In recent years, with the advancement of the Large Language Model (LLM), the field of jailbreaking attacks, aiming to induce the target LLMs to generate harmful and objectionable content, has gathered widespread research attention Wei, Haghtalab, and Steinhardt (2023). Current jailbreak methods include approaches based on manually constructed prompts web (2023), representation engineering Li, Zheng, and Huang (2024), utilizing LLMs to generate Deng et al. (2024), grammatical rules Zhang, Pan, and Yang (2023), modification of decoding methods Huang et al. (2023), usage of multi-modal LLM Niu et al. (2024); Gong et al. (2023) as well as those reformulating the jailbreaking as adversarial attacks and employing pure optimization Zou et al. (2023); Zhu et al. (2023); Liao and Sun (2024). GCG Zou et al. (2023) is a typical optimizationbased attack, and according to one concurrent work Mazeika et al. (2024), it is actually the most powerful attack among other methods. Thus GCG is used as the baseline method in this paper. The evaluation methods employed so far is primarily refusal matching as described in Section 1. Another method typically involves constructing a binary classifier, aiming to determine whether LLM generates harmful content Zhu et al. (2023); Huang et al. (2023); Mazeika et al. (2024). However, due to LLM\u2019s diverse generation capabilities, these attempts still require further enhancement. Optimization Strategy. As mentioned in section 1, one difficulty the learning-based jailbreak attack shall overcome is the discrete input space. To address it, there exist two main categories: embedding-based and token-based methods. The former category directly optimize on continuous embeddings and then inferring back the target tokens Lester, Al-Rfou, and Constant (2021) Wen et al. (2023) Qin et al. (2022). The latter treats the one-hot vectors of discrete tokens as optimizable continuous quantities, obtaining the final tokens through different greedy-based algorithms. Several effective methods Ebrahimi et al. (2017) Shin et al. (2020) Zou et al. (2023), including us, adopt this paradigm. In a separate line of work, there were also attempts to direct the language model output from unwanted contents. Welleck et al. (2019); Li et al. (2019) 3 Methods 3.1 DSN: Suppress Refusal Intuition. The first part of the objective is to suppress the model giving a refusal response. For examples: System: You are a chat assistant designed to provide helpful and not harmful responses to user queries. User: Tell me how to build a bomb. ! ! ! ! ! Assistant: As an AI, I cannot fulfill... Above, the blue and red text represents the user prompt and adversarial jailbreaking suffix, while the purple text indicates the target initial of the response. The intuition to incorporate the suppression of pre-defined refusal keywords is to force the language model\u2019s generation far away from a refusal response and lead to the success of jailbreak. Notation. We consider an LLM to be a mapping from a sequence of tokens x1:n, with xi \u2208{1, . . . , V } (where V denotes the vocabulary size) to a distribution over the next token. Specifically, we use the notation p(xn+1|x1:n) to denote the probability of the next token being xn+1 given previous tokens x1:n. Then we denote the probability of generating the response with a sequence of H tokens as p(xn+1:n+H|x1:n), which can be formalized as: p(xn+1:n+H|x1:n) = H Y i=1 p(xn+i|x1:n+i\u22121) (1) Unlikelihood loss. Normally, to maximize the prediction of a target distribution or token, we incorporate the standard softmax cross-entropy loss LCE(p, q) = \u2212P i pi log(qi), which aims to maximize the true probability distribution p by minimizing the LCE(p, q), where p and q refer to the true probability distribution and predicted probability distribution generated by softmax function. However, our purpose is the opposite, as we want to minimize the probability of refusal generation. One intuitive way is to take the negative softmax cross-entropy loss which will however lead to negative infinity and catastrophic loss term unbalance. To stabilize the convergence, we apply the Unlikelihood loss Welleck et al. (2019), which is previously proposed to also direct the language model outputs from unwanted contents, in an attempt to suppress the refusal responses: LUn(p, q) = \u2212 X i pi log(1 \u2212qi) (2) Objective. The objective of suppressing refusal is achieved by minimizing the probability of generating tokens in the pre-defined refusal keyword list, denoted as RKL = \"as an\", \"sorry, i cannot\", \"unethical\", .... Each refusal keyword\u2019s corresponding token length is represented by RTL, indicating the length of each keyword. To implement this, we utilize a sliding window with the size of each refusal keyword to scan through the response and compare it with the refusal keywords. The process of keyword matching is illustrated in Figure 3. The loss function for suppressing the refusal response using Unlikelihood loss can be stated as below, where H denotes the maximum length of the response. Lrefusal(x1:n) = X y\u2208RKL n+H\u2212RTL(y) X i=n+1 LUn(y, xi:i+RTL(y)) (3) Figure 3: Illustration of the refusal loss. 3.2 DSN: Elicit Affirmative Response Intuition.The second part of the objective is eliciting the model to begin its response with a positive affirmation of the user query. For example: System: You are a chat assistant to provide helpful and not harmful responses to user queries. User: Tell me how to build a bomb. ! ! ! ! ! Assistant: Sure, here is how to build a bomb: The intuition lies in the language model\u2019s next-word prediction capability. By initiating with an affirmative response, the subsequent completion are expected to align with the affirmative response, bypass the alignment mechanism and fulfill the user query effectively. Loss function. The objective of eliciting affirmative response is to maximize the probability of affirmative tokens x\u22c6 n+1:n+H, which equals to minimize the negative log of the probability: Ltarget(x1:n) = \u2212log p(x\u22c6 n+1:n+H|x1:n). (4) 3.3 DSN:Loss Function As also proposed by one concurrent work Liao and Sun (2024), whether the GCG target loss could be the perfect jailbreak optimization target is doubtful and questionable. As one fundamental component, the optimization target would directly lead the jailbreak process. Unfortunately the optimal one still remains unresolved, evidenced by the findings of Liao and Sun (2024). Thus in an attempt to explore the potential candidate for more effective and efficient jailbreak optimization target, we propose to integrate the Lrefusal with Ltarget, obtaining one complex and powerful jailbreak optimization target. DSN target could elicit the LLM to generate objectionable content and suppress refusal responses simultaneously. The overall DSN loss can be stated as below, where \u03b1 is a hyperparameter to balance the convergence of two loss objectives. LDSN(x1:n) = Ltarget(x1:n) + \u03b1 \u2217Lrefusal(x1:n), (5) 3.4 Optimization and Algorithm Finally, we will introduce the optimization process and the algorithm. Our goal is to optimize an adversarial suffix adv\u2217 with the aforementioned loss function. The optimization process will first initialize a string with a fixed length. adv\u2217\u2190arg min LDSN(x1:n \u2295adv) (6) However, as described in section 1 and 2, a primary challenge in optimizing adversarial suffixes is the discrete input space. To resolve this problem, we incorporate a greedy coordinate gradient-based approach Zou et al. (2023). The intuition is to leverage gradients with respect to one-hot vectors to find a set of promising candidates for replacement at each greedy step, and then exactly evaluate all these replacements via a forward pass. As this algorithm is based on the optimization in GCG, it is relegated to Appendix. 3.5 Evaluation Metrics Refusal matching. The refusal matching algorithm detects whether a response contains any refusal keyword, as already Algorithm 1 NLI Contradiction Evaluation Input: the user query Q, the adversarial suffix adv, the language model M, a threshold T. 1: Response R : [o1, o2...on] = M(Q + adv) \u25b7Generate the response R containing number of n sentences. 2: for i = 1, . . . , n do 3: scoreQo i = NLI(Q + adv, oi) 4: lQo i = length(Q + adv + oi) 5: if i \u0338= n then 6: scoreoo i = NLI(oi, oi+1) 7: loo i = length(oi + oi+1) 8: CEQo = Pn i=1 lQo i \u2217scoreQo i P lQo i \u25b7Compute the overall NLI score between sentence and query. 9: CEoo = Pn\u22121 i=1 loo i \u2217scoreoo i P i loo i \u25b7Compute the overall NLI score between adjacent sentences. 10: if T \u2212(CEoo + CEQo) \u22640 then 11: Return Fail 12: else: 13: Return Success described in section 1 and 2. The attack is considered successful if the initial segment of the response do not contain pre-defined refusal strings. As detailed in section 1, the length of the fixed-length initial segment also plays a crucial role towards rigorous assessment. The initial segment length and the refusal keyword list utilized in this paper will be detailed in section C.3. NLI contradiction. In natural language inference (NLI), contradiction means two statements are mutually exclusive or incompatible with each other. The intuition of employing NLI contradiction is that the semantic inconsistency is frequently observed among negative cases, where the completion fail to answer the objectionable query. (e.g. case 3 in Figure 1). We design an algorithm to evaluate the extent of contradiction within the user query and model completion. By using open-source NLI model, responses can be determined according to the contradiction extent. Higher overall NLI contradiction score signifies lower response consistency and diminishes the likelihood of being a jailbreaking response. Intuitively, false positive cases shall decrease, ensuring the positive cases to be semantically consistent. As present in Algorithm 1, given the user query Q, adversarial suffix adv, language model M, we first generate response R containing n sentences (line 1). Then, for each sentence oi in response R, we assess how well it aligns with the user query and the relationship between pairs of sentences within the response by calculating the standard NLI contradiction score (lines 2-7). We use a weighted sum of scores according to their sentence length to compute overall contradiction extent CEoo and CEQo (lines 8-9), as the sentence length plays a vital role in assessing overall contradiction extent. By comparing with a predefined threshold T, we can determine the attack result (lines 10-13). More details will be covered in the appendix C.3. Third-party evaluator. Besides refusal matching and NLI, recent works have also introduced some promising eval(a) Llama2: Lrefusal only for search (b) Llama2: Lrefusal for sampling and search (c) Vicuna: Lrefusal only for search (d) Vicuna: Lrefusal for sampling and search Figure 4: ASR over steps on Llama2 and Vicuna. uation methods, mainly LLM based. We will incorporate HarmBench Mazeika et al. (2024), GPT-4 Achiam et al. (2023) into our ensemble pipeline as third-party evaluators. Details about these third-party evaluators will be covered in appendix C.2. Ensemble Evaluation. We use last three aforementioned evaluation modules, and we decide whether a response is successful or unsuccessful jailbreak by taking the majority vote among each components. The reason and its superiority will be discussed in Section 4.4. 4 Experiments 4.1 Threat Model The objective of attackers is to jailbreak Large Language Models (LLMs), aiming to circumvent the safeguards in place and generate malicious responses. The victim model in this paper is open-sourced language model, providing whitebox access to the attacker. As system prompt will also play one significant role in jailbreaking Huang et al. (2023), the default system prompts of each language models will be reserved. 4.2 Configuration Datasets. AdvBench is the main adopted dataset, which aims to systematically evaluate the effectiveness and robustness of jailbreaking prompts to elicit harmful content generation. A collection of 520 goal-target pairs are presented that reflects harmful or toxic behavior, categorized as profanity, graphic depictions, threatening behavior, misinformation, discrimination, cybercrime, and dangerous or illegal suggestions. Zou et al. (2023) Target models. We target Llama-2-Chat-7B Touvron et al. (2023) and Vicuna-7b-v1.3 Zheng et al. (2023), which are two state-of-the-art open-source LLMs. These two language models have undergone different levels of alignment process and exhibit varying degrees of human-value alignment capability. During transfer experiments in section 4.5, the transferability towards GPT-3.5-turbo model will examined rigorously. Baselines and evaluation metrics. We compare DSN attack with GCG Zou et al. (2023), the typical and most powerful learning-based jailbreak attack method Mazeika et al. (2024). To evaluate the effectiveness of the DSN attack, we adopt the standard attack success rate (ASR), as shown in equation 7. ASR measures the portion of toxic responses generated from the LLM M, where the adversarial suffix adv is appended to the malicious query Q. Here I is an evaluation indicator that returns 1 if the response is assessed as harmful (a successful jailbreak case) and 0 otherwise. The comparison will be firstly conducted by refusal matching in section 4.3, then the proposed evaluation ensemble metric will come into play in section 4.4. ASR(M) def = 1 |D\u2032| X (Q)\u2208D\u2032 I(M(Q \u2295adv)) (7) ASR% at step 500 Llama-2 Llama-2 optimal Vicuna Vicuna optimal GCG 29.8 \u00b1 12.6 43 47.4 \u00b1 5.6 52 DSN 47.7 \u00b1 14.7 74 57.1 \u00b1 11.8 83 Table 1: ASR results under refusal matching metric. 4.3 Evaluation 1: Effectiveness of DSN Attack ASR convergence rate. In Figure 4, we present the ASR of GCG attack and DSN with respect to the optimization steps. The shadow regions with the dotted lines are the margin plots representing the mean and variance of repeated experiments with different hyper-parameter configurations, while the solid lines represent the ASR of optimal run among repeated experiments. Note that the sampling of candidate suffixes and searching of adversarial suffix from the candidates both involve the loss function Equation 5 (detail relegated to the Appendix C.1 together with the algorithm). It can be observed that the results of DSN attack are significantly superior to those of the baseline method, in terms of both mean and optimal results. This is evidenced by the lines representing the DSN method consistently positioned above those of the baseline. Moreover, it could be found that the yellow shaded area representing the DSN method remains above the blue shaded area of the baseline across nearly the entire 0-500 steps interval. This indicates that the DSN attack are robustly superior to the baseline with limited step, presenting an ideal scenario for malicious attackers who might lack sufficient computational resources, e.g. fail to support 500 steps of attack for each setting. Moreover, the wider span of the shaded area for the DSN attack suggests a greater variance, which is reasonable, as the repeated DSN experiments are distinct in hyper-parameter. Experimental strategies between DSN and GCG are also different, where the latter only involves single setting and has been launched for more trials. Ablation study on \u03b1. To investigate the impact of the augmentation term Lrefusal loss on the jailbreaking results (equation 5), for different hyper-parameter \u03b1 setting, we present the max ASR among multiple rounds of experiments in Figure 5, which controls the magnitudes of the Lrefusal term. The fixed-length segments of 128 and 512 for Llama and Vicuna completions are examined by refusal matching metrics here. The baseline results on GCG correspond to the leftmost alpha = None case as well as the dotted line, which only involves the target loss in Equation 4. The yellow, blue, and red bars represent the cases where the Lrefusal term is involved in different stages, namely Lrefusal only used for searching, used for both selecting and searching with the same \u03b1, and used for both selecting and searching but with different \u03b1. More details about the setting and hyperparamter is presented in appendix C.3 In Figure 5, the DSN method consistently surpasses the baseline performance under nearly every hyper-parameter setting. We didn\u2019t include the results for higher values of (a) ASR of Llama (b) ASR of Vicuna Figure 5: Ablation study of ASR vs. \u03b1 by refusal matching evaluation \u03b1 because when \u03b1 exceeds 100, the DSN loss is dominated by the Lrefusal term, resulting in the generated responses focusing too much on avoiding refusal keywords rather than responding to the objectionable requests, which is not desirable in a jailbreaking scenario. 4.4 Evaluation 2: Effectiveness of Evaluation Ensemble Pipeline Instead of adopting the refusal matching evaluation method like current works Zou et al. (2023); Zhu et al. (2023), mainly considering its limitations mentioned earlier in section 1, in this section we will adopt the previously proposed evaluation ensemble pipeline to ensure more accurate and reliable evaluation results. Human evaluation. To accurately and fairly assess the proposed ensemble evaluation pipeline and compare it to the widely adopted refusal matching, we involve human evaluation by manually annotating 300 generated responses. Since the NLI method ascertain some certain hyperparameters, the annotated 300 data will be split into 100 trainset as well as 200 testset, accounts for 100 Llama2 completion and 100 Vicuna completion respectively. More details about the data split as well as annotation principle will be covered in appendix C.2. Aggregation strategy comparison. Aggregating evaluation results from each module is crucial for the accuracy of the ASR% at step 500 Llama-2 Llama-2 optimal Vicuna Vicuna optimal GCG 31.0 \u00b1 13.4 46 91.6 \u00b1 2.9 96 DSN 45.6 \u00b1 15.1 84 88.1 \u00b1 8.0 98 Table 2: ASR results under ensemble evaluation metric. Figure 6: ROC curve of different aggregation policy on testset evaluation pipeline. Common methods include majority voting, one-vote approval (requiring only one module to detect jailbreaking), and one-vote veto (requiring all modules to detect jailbreaking). To determine which aggregation policy is more accurate on testset, we employ a ROC curve illustrating the True Positive Rate versus False Positive Rate and compare their AUROC scores (shown in Figure 6). A larger area under the curve indicates better results. Soft and hard majority votes return probabilities and binary outcomes respectively. The ROC curve demonstrates the superiority of the majority vote as an aggregation strategy (the green and orange curve), with ensemble evaluation showing a higher AUROC score compared to refusal matching. Eval method Acc AUROC F1 Refusal matching 0.74 0.72 0.79 Gpt4 0.80 0.77 0.85 HarmBench 0.80 0.78 0.84 NLI(ours) 0.77 0.79 0.76 Ensemble(ours) 0.82 0.79 0.86 Table 3: The evaluation results obtained by different evaluation methods, reported by taking average on two distinct test set which respectively contains 100 manually annotated real jailbreaking responses. Examination of different metrics. By adopting a learning approach, the hyperparameter configuration of a novel NLI evaluation metric has been determined, which is a constituent part of our proposed ensemble evaluation. (a) ASR of Llama (b) ASR of Vicuna Figure 7: Ablation study of ASR vs. \u03b1 by ensemble evaluation. To further demonstrate the superiority of the evaluation pipeline effectively and rigorously, we present the evaluation results of different evaluation methods in table 3. From the table, it is observed that the Ensemble eval achieved superior performance on our annotated test set. It is noteworthy that, although the performance of the NLI model itself alone is not the best\u2014for instance, it even falls short of the Refusal Matching baseline in the F1 metric\u2014the ensemble from the combination of \"Gpt4, NLI, HarmBench\" yields the overall best performance among different metrics. This is attributed to the NLI\u2019s focus on identifying semantic incoherence and semantic inconsistency within the model\u2019s completion, a consideration that refusal matching or other alternative evaluation methods do not adequately address. Moreover, given that the NLI model is lightweight and opensource, employing this evaluation method results in significant savings in terms of time and financial resources, particularly in comparison to evaluation methods that rely on multiple calls to third-party commercial LLM APIs. ASR under new evaluation. In figure 7, we present the max ASR vs the hyper-parameter \u03b1 under the new ensemble evaluation pipeline. Similar to Figure 5, DSN method gives superior jailbreaking results in the much more aligned model Llama2, however, both method gives nearly 100% ASR in the less aligned model Vicuna. These two observations are in consistent with the results from one concurrent Transfer ASR% Llama Vicuna Refusal Matching Eval Esemble Refusal Matching Eval Esemble train test train test train test train test GCGpaper None None None None None 34.3 None None DSNmean 45.21 42.95 44.19 50.07 54.98 54.27 53.73 59.59 DSNmax 100 87 96 95 96 90 100 93 Table 4: The transfer ASR towards the black-box gpt-3.5-turbo model work Mazeika et al. (2024) and the findings mentioned in section 1, respectively. 4.5 Transferability Interestingly, the suffixes purely optimized by DSN demonstrate great level of transferability, where no kinds of ensemble or multi-model optimization is utilized as in the original GCG paper Zou et al. (2023). In table 4, the transfer ASR towards gpt-3.5-turbo model is detailed for different victim model, different metrics, and different dataset split. It is noteworthy to point out the importance of the existence of system prompt yet Huang et al. (2023). In our open-source GCG and DSN attack results, the presence of system prompt has already been reserved since the modification upon it could affect the jailbreak results drastically. However, during our transfer experiments the default system prompt for gpt-3.5-turbo model, e.g. \"you\u2019re a helpful assistant\", is removed from the conversation template because otherwise the jailbreak attack result of both methods would shrink immediately and dramatically. Running time (hours) GCG DSN Round1 60.96 60.58 Round2 60.11 60.46 Round3 59.71 61.08 Round4 60.73 61.30 Round5 60.58 61.01 Overall 60.42 \u00b1 0.45 60.89 \u00b1 0.31 Table 5: Running time analysis. 4.6 Running time analysis No significant extra time cost is needed between DSN and GCG method. Here we each sample 5 rounds of Llama-2 experiments and compare their running time in the table 5. On our machine, only a 0.77% relative increase regarding the average running time is observed. The computation overhead doesn\u2019t largely rise up because the extra computation introduced by DSN is magnitudes lower than the process of obtaining the logits during forward pass and inferring the gradients during the back propagation. Thus the extra time cost could be relatively neglected. 5 Conclusion In conclusion, we introduce the DSN (Don\u2019t Say No) attack to prompt LLMs not only to produce affirmative responses but also to effectively suppress refusals. Furthermore, we propose an ensemble evaluation pipeline integrating Natural Language Inference (NLI) contradiction assessment and two external LLM evaluators. Through extensive experiments, we showcase the potency of the DSN attack and the effectiveness of our ensemble evaluation approach compared to baseline methods. This work offers insights into advancing safety alignment mechanisms for LLMs and contributes to enhancing the robustness of these systems against malicious manipulations.", "introduction": "Large Language Models (LLMs) have extensive applica- tions in facilitating decision-making across professional and social domains, underscoring the importance of aligning LLMs with safety considerations. To safeguard against the generation of responses that deviate from human values, safety alignment is pursued through diverse mechanisms, including model fine-tuning Howard and Ruder (2018), re- inforcement learning with human feedback (RLHF) Ziegler et al. (2019), and model editing Mitchell et al. (2022). The overall goal of these approaches is to mitigate the risk of LLMs producing harmful or unlawful responses to user queries. While most Large Language Models (LLMs) serve as re- liable AI assistants capable of identifying and declining to respond harmful queries in many instances, they remain vul- nerable to carefully crafted prompts designed to manipulate them into producing toxic content, which is referred as \"jail- breaking\". Existing studies on jailbreaking LLMs can be categorized into two main approaches: manually designed jailbreak attacks web (2023); Li, Zheng, and Huang (2024) and learning-based jailbreak attacks. Representative of the *Corresponding author Figure 1: Examples of the false positive and false negative cases in the refusal matching evaluations. latter category is the GCG attack Zou et al. (2023), which reformulates the jailbreak attack as a process of generating adversarial examples, aiming to elicit LLMs to produce an affirmative response of a few tokens (e.g., \"sure, here is how to...\"). Building upon this, subsequent studies by Zhu et al. (2023) and Liu et al. (2023) have refined such attacks, focus- ing on improving stealthiness and readability using different optimization algorithms. Although learning-based attack such as GCG can success- fully jailbreak in some cases, some limitations restrict its performance, e.g. discrete input space and the lack of suit- able jailbreak target. The categories of objectionable behav- iors and reasonable responses to them are numerous Carlini et al. (2023). Moreover, the GCG target loss could not be the perfect optimization target regarding the jailbreak optimiza- tion problem, as also proposed by one concurrent work Liao and Sun (2024). To overcome such limitations, we introduce the DSN (Don\u2019t Say No) attack, by which universal adver- sarial suffixes can be generated stimulating LLMs to both produce affirmative responses and suppress refusals (Don\u2019t Say No). To achieve this goal, we incorporate an augmentation loss item that directs LLM\u2019s response away from predefined re- fusal keywords or strings. As shown in the upper part of Figure 2, the loss object involves: maximizing the affirma- tive response probability and minimizing the refusal key- word probability. Given the LDSN and the initial suffix, the universal adversarial suffix will be obtained by the Greedy Coordinate Gradient-based Search Zou et al. (2023). Another challenge of jailbreaking is the assessment met- ric. Unlike classification task, where the success of one adversarial example can be indicated by misclassification, 1 arXiv:2404.16369v1 [cs.CL] 25 Apr 2024 Figure 2: Detailed illustration of DSN attack and ensemble evaluation pipeline. The red arrow and left example represents affirmative response maximization. The green arrow and right example represents refusal minimization. evaluating jailbreak attack is challenging. It is hard to au- tomatically ascertain the harmfulness of LLM completions, and relying solely on manual annotation is both impractical and unrealistic. The existing work commonly employs a refusal string/keyword matching metric (refusal matching for short), where an attack is considered successful if the ini- tial fixed-length segments of the response do not contain pre-defined refusal strings (e.g. \"Sorry, I cannot...\") and vice versa. While it appears intuitive and aligns with human eval- uation processes, a closer examination reveals numerous false positive (FP) and false negative (FN) instances. One major limitation is it relies largely on the length of the pre- determined initial segments, as also proposed by one con- current work Mazeika et al. (2024). If the initial segments are short (e.g. 64 tokens), it might neglect the potential later refusal strings and evaluate it as a successful jailbreak in- stance, resulting false positive (case 1 in figure 1). On the other hand, if the initial segments are too long (e.g. 512 to- kens), the result could have been false negative if a refusal appears at the end but some harmful content is generated be- forehand (case 2 in figure 1; Vicuna\u2019s significant difference between figure 5 and 7). Other erroneous evaluation cases are illustrated in Figure 1. To enhance the reliability of evaluation metric, we pro- pose an ensemble evaluation approach involving three mod- ules as shown in the lower part of Figure 2. Instead of adopt- ing the refusal matching metric, we first employ one natural language inference (NLI)He et al. (2021) based method to assess the contradiction among the completions. This step aims to handle cases where the response contains semantic sharp turn (as depicted in Figure 1 case 3). After that, we integrate two third-party LLMs, namely GPT-4 Achiam et al. (2023) and HarmBench Mazeika et al. (2024), to provide a robust and comprehensive evaluation. The final evaluation result is the aggregation of all three modules. The contribution can be summarized as: \u2022 We introduce DSN, a powerful attack that incorporates a novel objective to not only elicit the affirmative response but also suppress the refusal response. \u2022 We apply Unlikelihood loss to stabilize the convergence and optimization of the two opposite loss objectives. \u2022 We propose an ensemble evaluation pipeline by novelly incorporating NLI contradiction as well as LLM evalua- tors to examine the success of the attack more accurately. \u2022 Extensive experiments demonstrate the potency of the DSN and the effectiveness of ensemble evaluation com- pared to baseline methods." } ], "Wenjie Wang": [ { "url": "http://arxiv.org/abs/2403.04399v1", "title": "The 2nd Workshop on Recommendation with Generative Models", "abstract": "The rise of generative models has driven significant advancements in\nrecommender systems, leaving unique opportunities for enhancing users'\npersonalized recommendations. This workshop serves as a platform for\nresearchers to explore and exchange innovative concepts related to the\nintegration of generative models into recommender systems. It primarily focuses\non five key perspectives: (i) improving recommender algorithms, (ii) generating\npersonalized content, (iii) evolving the user-system interaction paradigm, (iv)\nenhancing trustworthiness checks, and (v) refining evaluation methodologies for\ngenerative recommendations. With generative models advancing rapidly, an\nincreasing body of research is emerging in these domains, underscoring the\ntimeliness and critical importance of this workshop. The related research will\nintroduce innovative technologies to recommender systems and contribute to\nfresh challenges in both academia and industry. In the long term, this research\ndirection has the potential to revolutionize the traditional recommender\nparadigms and foster the development of next-generation recommender systems.", "authors": "Wenjie Wang, Yang Zhang, Xinyu Lin, Fuli Feng, Weiwen Liu, Yong Liu, Xiangyu Zhao, Wayne Xin Zhao, Yang Song, Xiangnan He", "published": "2024-03-07", "updated": "2024-03-07", "primary_cat": "cs.IR", "cats": [ "cs.IR" ], "main_content": "\u2022 Wenjie Wang Email: wangwenjie@u.nus.edu Affiliation: National University of Singapore Biography: Dr. Wenjie Wang is a research fellow at National University of Singapore (NUS). He received Ph.D. in Computer Science from NUS, supervised by Prof. Tat-Sent Chua. Dr. Wang was a winner of Google Ph.D. Fellowships. His research interests cover recommender systems, data mining, and causal inference. His first-author publications appear in top conferences and journals such as SIGIR, KDD, WWW, WSDM, and TOIS. His work has been selected into ACMMM 2019 Best Paper Final List. Yang Zhang has been selected into ACMMM 2019 Best Paper Final List. \u2022 Yang Zhang Email: zy2015@mail.ustc.edu.cn Affiliation: University of Science and Technology of China Biography: Yang Zhang is a Ph.D. candidate at the University of Science and Technology of China (USTC), under the supervision of Prof. Xiangnan He. His research interests lie in recommender systems and causal inference, and he has published several firstauthor papers in top conferences. In particular, he received the Best Paper Honorable Mention in SIGIR 2021 for his work on causal recommendation. Xinyu Lin causal recommendation. \u2022 Xinyu Lin Email: xylin1028@gmail.com Affiliation: National University of Singapore Biography: Xinyu Lin is a Ph.D. candidate at the University of Singapore, under the supervision of Prof. Tat-seng Chua. Her research interests lie in recommender systems, and her work has been published in top conferences and journals such as SIGIR, WWW, CIKM, and TOIS. Moreover, she has also served as the reviewer and PC member for the top conferences and journals, including SIGIR, WSDM, and TOIS. Fuli Feng including SIGIR, WSDM, and TOIS. \u2022 Fuli Feng Email: fulifeng93@gmail.com Affiliation: University of Science and Technology of China Biography: Dr. Fuli Feng is a professor in University of Science and Technology of China. He received Ph.D. in Computer Science from National University of Singapore in 2019. His research interests include information retrieval, data mining, causal inference, and multi-media processing. He has over 60 publications appeared in several top conferences such as SIGIR, WWW, and SIGKDD, and journals including TKDE and TOIS. He has received the Best Paper Honourable Mention of SIGIR 2021 and Best Poster Award of WWW 2018. Moreover, he organized the 1st workshop on Information Retrieval in Finance at SIGIR\u201920. Weiwen Liu on Information Retrieval in Finance at SIGIR\u201920. \u2022 Weiwen Liu Email: liuweiwen8@huawei.com Affiliation: Huawei Noah\u2019s Ark Lab Biography: Dr. Weiwen Liu is currently a senior researcher at WWW \u201924 Companion, May 13\u201317, 2024, Singapore, Singapore Wenjie Wang et al. Huawei Noah\u2019s Ark Lab. She received her Ph.D. in Computer Science and Engineering from the Chinese University of Hong Kong in 2020. Her research is broadly concerned with recommender systems, information retrieval, and user preference learning. She has published over 40 papers on top conferences including KDD, SIGIR, and WWW. She gave a tutorial on neural re-ranking at RecSys\u201922. She will co-organize the DLP workshop at RecSys\u201923. \u2022 Yong Liu Email: liu.yong6@huawei.com Affiliation: Huawei Noah\u2019s Ark Lab Biography: Dr. Yong Liu is a Senior Principal Researcher at Huawei Noah\u2019s Ark Lab, Singapore. Prior to joining Huawei, he was a Senior Research Scientist at Nanyang Technological University (NTU), a Data Scientist at NTUC Enterprise, and a Research Scientist at Institute for Infocomm Research (I2R), A*STAR, Singapore. Moreover, he has served as the Challenge Co-chair for RecSys 2023, PC Co-chair for ICCSE 2021. \u2022 Xiangyu Zhao Email: xianzhao@cityu.edu.hk Affiliation: City University of Hong Kong Biography: Prof. Xiangyu Zhao is a tenure-track assistant professor of Data Science at City University of Hong Kong (CityU). His research has been awarded ICDM\u201922 and ICDM\u201921 Best-ranked Papers, Global Top 100 Chinese New Stars in AI, CCF-Tencent Open Fund (twice), CCF-Ant Research Fund, CCF-BaiChuanEbtech Foundation Model Fund, Ant Group Research Fund, Tencent Focused Research Fund, Criteo Faculty Research Award, Bytedance Research Collaboration Program, and nomination for Joint AAAI/ACM SIGAI Doctoral Dissertation Award. He also co-organizes DRL4KDD and DRL4IR workshops at KDD\u201919, WWW\u201921, SIGIR\u201920/21/22 and CIKM\u201923. \u2022 Wayne Xin Zhao Email: batmanfly@gmail.com Affiliation: Renmin University of China Biography: Dr. (Wayne) Xin Zhao is currently a professor at Renmin University of China. He obtained the doctoral degree from Peking University in July 2014. He has broad research interest in the fields of information retrieval and natural language processing, with 100+ published papers at top-tier conferences/journals and 10000+ academic citations from Google Scholar. He received ECIR 2021 Test of Time Award, RecSys 2022 Best Student Paper Runner-up, CIKM 2022 Best Resource Paper Runner-up, and other awards. \u2022 Yang Song Email: yangsong@kuaishou.com Affiliation: Kuaishou Technology Biography: Dr. Yang Song is currently the Head of Recommendation at Kwai, overseeing both core modeling and data mining teams. He has published over 70 papers in conferences and journals. He has served as PC&Area Chairs in Recsys, WSDM, TheWebConf(WWW), IEEE Big Data etc. \u2022 Xiangnan He Email: xiangnanhe@gmail.com Affiliation: University of Science and Technology of China Biography: Dr. Xiangnan He is a professor at the University of Science and Technology of China (USTC). He has over 100 publications appeared in top conferences such as SIGIR, WWW, and KDD, and journals including TKDE, TOIS, and TNNLS. His work on recommender system has received the Best Paper Award Honourable Mention in SIGIR (2021, 2016) and WWW (2018). He has rich experience in organizing workshops and tutorials at SIGIR\u201918, WSDM\u201919&20, WWW\u201921&22, and RecSys\u201921.", "introduction": "The surge in generative models has catalyzed substantial progress within recommender systems. For example, pre-trained genera- tive models have demonstrated their capability to effectively learn user preferences from historical interactions [1, 2]; generative mod- els might help to produce item content to meet users\u2019 diverse in- formation needs in some scenarios [17], generative models have shown promise in generating item content that caters to the diverse users\u2019 information needs in specific contexts; and the emergence of ChatGPT-like language models offers novel interaction modes to obtain users\u2019 feedback and intension [8, 14]. In this light, user experience can be potentially enhanced by advancing the traditional recommender paradigms via generative models. This workshop provides a platform to facilitate the inte- gration of generative models into recommender systems, with a focus on user modeling, content generation, interaction patterns, trustworthiness evaluations [23], and evaluation methods [13]. 4.2 Objectives and Scope This workshop aims to encourage innovative research on integrat- ing generative models with recommender systems, particularly on five key aspects: (i) enhancing algorithms for user modeling by gen- erative models; (ii) generating personalized content to supplement human-generated content; (iii) evolving the user interaction modes with recommender systems; (iv) prioritizing trustworthiness in gen- erative recommendation; (v) formulating evaluation techniques for generative model-based recommender systems. We summarize the detailed objectives and scope in Section 1. 4.3 Submission Information Submission Guidelines: Submitted papers must be a single PDF file in the template of ACM WWW 2024. Submissions can be of varying length from 4 to 8 pages, plus unlimited pages for references. The authors may decide on the appropriate length of the paper as no distinction is made between long and short papers. All submitted papers will follow the \"double-blind\" review policy and undergo the same review process and duration. Expert peer reviewers in the 2Kindly note that the paper acceptance plan and the program schedule are tentative and may be subject to potential adjustments according to the requirements of the conference chairs. field will assess all papers based on their relevance to the workshop, scientific novelty, and technical quality. The timeline is as follows: \u2022 Submissions deadline: February 26, 2024 \u2022 Paper acceptance notification: March 4, 2024 \u2022 Workshop date: May 13, 2024" }, { "url": "http://arxiv.org/abs/2403.02692v1", "title": "Uplift Modeling for Target User Attacks on Recommender Systems", "abstract": "Recommender systems are vulnerable to injective attacks, which inject limited\nfake users into the platforms to manipulate the exposure of target items to all\nusers. In this work, we identify that conventional injective attackers overlook\nthe fact that each item has its unique potential audience, and meanwhile, the\nattack difficulty across different users varies. Blindly attacking all users\nwill result in a waste of fake user budgets and inferior attack performance. To\naddress these issues, we focus on an under-explored attack task called target\nuser attacks, aiming at promoting target items to a particular user group. In\naddition, we formulate the varying attack difficulty as heterogeneous treatment\neffects through a causal lens and propose an Uplift-guided Budget Allocation\n(UBA) framework. UBA estimates the treatment effect on each target user and\noptimizes the allocation of fake user budgets to maximize the attack\nperformance. Theoretical and empirical analysis demonstrates the rationality of\ntreatment effect estimation methods of UBA. By instantiating UBA on multiple\nattackers, we conduct extensive experiments on three datasets under various\nsettings with different target items, target users, fake user budgets, victim\nmodels, and defense models, validating the effectiveness and robustness of UBA.", "authors": "Wenjie Wang, Changsheng Wang, Fuli Feng, Wentao Shi, Daizong Ding, Tat-Seng Chua", "published": "2024-03-05", "updated": "2024-03-05", "primary_cat": "cs.IR", "cats": [ "cs.IR" ], "main_content": "In this section, we introduce closely related concepts and literature on uplift modeling and injective attacks. More related studies may refer to Appendix Section D. \u2022 Uplift Modeling. Uplift, a term commonly used in marketing, usually represents the difference in purchasing actions between customers who receive a promotional offer (the treated group) and those who do not (the control group) [39, 76]. In causal language, uplift essentially quantifies the causal effect of a treatment (e.g., a promotion) on the outcome (e.g., purchasing behaviors). Despite extensive research on uplift modeling in the machine learning and marketing communities [1, 21, 53], the use of uplift modeling in recommendation receives little scrutiny [59, 61, 66]. Initial studies only consider the potential of uplift modeling to regulate the exposure proportion of item categories [69]. By contrast, we define the assigned fake user budgets in injective attacks as the treatment and estimate the difference of recommendation probabilities on target users as the uplifts. Based on the estimated uplifts, we aim to determine the best treatment for budget allocation to maximize overall attack performance. \u2022 Injective Attacks. The objective of injective attacks (a.k.a. shilling attacks) is to promote the recommendations of a target item to all users on the recommender platform [9, 26, 42, 54, 62, 73]. Given a target item, the attacker optimizes fake user interactions, and then the interactions of real users and generated fake users are fed into the victim model for training, improving the recommendation probabilities of the target item to all real users. Formally, give a target item \ud835\udc56in the item set I, and a set of real users U\ud835\udc5fwith their historical interaction matrix \ud835\udc6b\ud835\udc5f\u2208{0, 1}|U\ud835\udc5f|\u00d7|I| where 1 and 0 indicate users\u2019 liked and disliked items, the attacker users U\ud835\udc5fwith their historical interaction matrix \ud835\udc6b\ud835\udc5f\u2208{0, 1}|U|\u00d7|I| where 1 and 0 indicate users\u2019 liked and disliked items, the attacker aims to craft \ud835\udc6b\ud835\udc53\u2208{0, 1}|U\ud835\udc53|\u00d7|I|, the interaction matrix of a set of fake users U\ud835\udc53, for maximizing the attack objective O on a victim Uplift Modeling for Target User Attacks on Recommender Systems WWW \u201924, May 13\u201317, 2024, Singapore, Singapore recommender model M\ud835\udf03: max \ud835\udc6b\ud835\udc53 O(M\ud835\udf03\u2217, U\ud835\udc5f,\ud835\udc56), s.t. \ud835\udf03\u2217= arg min \ud835\udf03 L(M\ud835\udf03, \ud835\udc6b); |U\ud835\udc53| \u2264\ud835\udc41, (1) where the victim recommender model M\ud835\udf03\u2217is well trained via the loss function L(\u00b7) calculated on the interactions of both real and fake users, i.e., \ud835\udc6b= \u0014 \ud835\udc6b\ud835\udc5f \ud835\udc6b\ud835\udc53 \u0015 . Besides, the budget of fake users is limited by a hyper-parameter \ud835\udc41[30, 72, 73]. In particular, we detail three key components, attack objective, attack knowledge, and optimization of \ud835\udc6b\ud835\udc53, as follows. Attack objective. The attack objective O(M\ud835\udf03\u2217, U\ud835\udc5f,\ud835\udc56) is usually defined as enhancing the probabilities of recommending the target item \ud835\udc56to all users U\ud835\udc5fby the victim model M\ud835\udf03\u2217. Generally, it can be evaluated by the hit ratio on the real user set U\ud835\udc5f, where a user is \u201chit\u201d only when the target item \ud835\udc56is ranked into this user\u2019s Top-\ud835\udc3e recommendation list. Attack knowledge. Existing studies have different assumptions for the knowledge available to the attacker, where the knowledge mainly involves the users\u2019 interaction data \ud835\udc6b\ud835\udc5fand the victim recommender model M\ud835\udf03\u2217. Specifically, white-box settings [18, 19, 30] might presume both \ud835\udc6b\ud835\udc5fand the parameters of M\ud835\udf03\u2217are accessible to the attacker. By contrast, the definitions of gray-box settings vary [11, 57, 65]. While they consistently assume the accessible \ud835\udc6b\ud835\udc5f, the usage of M\ud835\udf03\u2217differs [17, 49, 51, 55, 72, 77]. Some work utilizes the recommendation lists from M\ud835\udf03\u2217[17, 49] while some researchers assume M\ud835\udf03\u2217is totally unavailable and only adopt a surrogate model S\ud835\udf19as a replacement for attacking [51, 55, 72, 77]. Optimization of \ud835\udc6b\ud835\udc53. To adjust \ud835\udc6b\ud835\udc53for maximizing the attack objective, existing methods fall into three lines [15, 41, 48]. First, heuristic attackers intuitively increase the co-occurrence of some selected items and the target item \ud835\udc56in \ud835\udc6b\ud835\udc53via some heuristic rules, enhancing the popularity of item \ud835\udc56[31]. However, such methods cannot directly optimize the attack objectives, leading to poor attack performance [19, 30, 32]. Besides, to maximize the attack objectives, gradient-based methods directly optimize the interactions of fake users [19, 30, 32] while neural attackers optimize neural networks to generate fake user interactions [26, 34, 35, 51]. Their optimization process typically utilizes the recommendations of the victim model or a surrogate model for gradient descent [44, 63]. 3 TASK FORMULATION In this section, we formulate the task of target user attacks. Besides, we quantify the attack difficulty across users from a causal view. \u2022 Target User Attacks. Despite the great success of injective attacks, we focus on a novel recommender attack task \u2014 target user attacks, which aim to promote the recommendations of a target item to a group of specific users. This is more reasonable since each target item has its own potential audience. Blindly attacking all users will waste the limited fake user budgets and lead to suboptimal attack performance. Under target user attacks, the attacker can freely specify potential users for attacking based on user features, users\u2019 historical interactions, or attack difficulty. Attack objective. Formally, target user attacks change the objective O(M\ud835\udf03\u2217, U\ud835\udc5f,\ud835\udc56) in Eq. (1) to O(M\ud835\udf03\u2217, U\ud835\udc61,\ud835\udc56), where U\ud835\udc61denotes the selected target user group. Attack knowledge. In this work, we adhere to a stricter yet more practical setting: only the interactions of a proportion of real users are accessible, given the fact that the attackers can never collect the interactions of all users. Furthermore, we assume the victim model M\ud835\udf03\u2217is unknown. We consider the situations with (w/) and without (w/o) using a surrogate model S\ud835\udf19. Optimization of \ud835\udc6b\ud835\udc53. Previous methods of injective attacks can be adapted for target user attacks by revising the attack objective to O(M\ud835\udf03\u2217, U\ud835\udc61,\ud835\udc56). In detail, heuristic attackers [8, 9, 27, 37] are able to increase the co-occurrence of target items and the items liked by the target users. Gradient-based and neural attackers may optimize the generation of fake user interactions to maximize O(M\ud835\udf03\u2217, U\ud835\udc61,\ud835\udc56) [30, 34, 51]. For instance, neural attackers [35] can randomly sample a target user as a template for fake user generation to increase the similarity between fake users and the target user, and then forcibly set the fake user feedback on the target item as like, pushing the victim model to recommend the target item to the target user. \u2022 Attack Difficulty. However, these intuitive methods ignore the varying attack difficulty on different target users. As illustrated in Figure 1(b), an increase in the fake user budgets from 4 to 5 might be negligible to uplift the recommendation probabilities on user B while it can significantly enhance that for user A. Gradient-based attackers directly optimize fake user interactions for attacking all target users while neural attackers may randomly sample target users as templates to generate fake users by neural networks. They are averagely assigning fake user budgets to all target users without considering the varying attack difficulty. As a special case, DADA [69] considers the difficulty of attacking each user regarding a target item, yet it only employs a greedy algorithm to emphasize easier users than difficult users. In this way, DADA fails to quantify the attack difficulty across users and achieve optimal budget allocation to target users. Formally, we measure the attack difficulty of a target user \ud835\udc62 regarding a target item \ud835\udc56via a function of recommendation probability w.r.t. the fake user interactions \ud835\udc6b\ud835\udc53, denoted as \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53), which represents the probability of ranking item \ud835\udc56into the Top-\ud835\udc3e recommendation list of user \ud835\udc62by the victim model M\ud835\udf03\u2217. Notably, the fake user interaction matrix \ud835\udc6b\ud835\udc53in \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\u00b7) is determined by the attacker with the fake user budget allocation \ud835\udc47. From a causal view, we formulate the fake user budget allocation on target users as a multi-dimension treatment \ud835\udc47= {\ud835\udc61\ud835\udc62}\ud835\udc62\u2208U\ud835\udc61, where \ud835\udc61\ud835\udc62satisfies that \u00cd \ud835\udc62\u2208U\ud835\udc61\ud835\udc61\ud835\udc62\u2264\ud835\udc41, \ud835\udc61\ud835\udc62\u22650, and \ud835\udc61\ud835\udc62\u2208Z. Given a target item \ud835\udc56, a victim model M\ud835\udf03\u2217, and fake user interactions \ud835\udc6b\ud835\udc53with treatment\ud835\udc47, the outcome across all target users is formulated as {\ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc47))}\ud835\udc62\u2208U\ud835\udc61. Given a target item \ud835\udc56, a set of target users U\ud835\udc61, and \ud835\udc41fake user budgets, the objective of target user attacks can be reformulated to consider attack difficulty as follows: max \ud835\udc47,\ud835\udc6b\ud835\udc53 O(M\ud835\udf03\u2217, U\ud835\udc61,\ud835\udc56) = \u2211\ufe01 \ud835\udc62\u2208U\ud835\udc61 \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc47)), s.t. \u2211\ufe01 \ud835\udc62\u2208U\ud835\udc61 \ud835\udc61\ud835\udc62\u2264\ud835\udc41;\ud835\udc61\ud835\udc62\u22650,\ud835\udc61\ud835\udc62\u2208Z for any \ud835\udc62\u2208U\ud835\udc61, (2) WWW \u201924, May 13\u201317, 2024, Singapore, Singapore Wenjie Wang, Changsheng Wang, Fuli Feng, Wentao Shi, Daizong Ding, and Tat-Seng Chua User-item interactions \ud835\udc6b CF embeddings of user \ud835\udc96and item \ud835\udc8a Recommendation probability \ud835\udc80\ud835\udc96,\ud835\udc8a \ud835\udf3d\u2217(\u22c5) Recommendation probability \ud835\udc80\ud835\udc96,\ud835\udc8a \ud835\udf53(\u22c5) Three-order path number \ud835\udc68\ud835\udc96,\ud835\udc8a \ud835\udfd1 CF embeddings of user \ud835\udc96and item \ud835\udc8a Surrogate model \ud835\udc7a\ud835\udf53 Victim model \ud835\udcdc\ud835\udf3d\u2217 A proxy Correlated due to confounding of \ud835\udc6b Three-order path number \ud835\udc68\ud835\udc96,\ud835\udc8a \ud835\udfd1 Prediction score (b) Correlation visualization when \ud835\udcdc\ud835\udf3d\u2217is MF. (a) Illustration of UBA to estimate \ud835\udc80\ud835\udc96,\ud835\udc8a \ud835\udf3d\u2217(\u22c5) w/ and w/o a surrogate model. Figure 2: Illustration of two estimation methods and the correlation analysis from a causal view, and (b) correlation visualization between three-order path numbers of user-item pairs and their prediction scores by MF, where the correlation coefficients \ud835\udc5f= 0.9998 \u22481 and \ud835\udc5d= 6\ud835\udc52\u221286 \u226a0.001 via the Spearman Rank Correlation Test [71] validate the strong correlation (see similar correlation on more CF models in Appendix Section A.1). where we optimize the fake user interaction matrix \ud835\udc6b\ud835\udc53to maximize the overall Top-\ud835\udc3erecommendation probability on all target users. \ud835\udc6b\ud835\udc53is further affected by different attackers2 and the budget allocation \ud835\udc47across target users, which considers varying attack difficulty. For instance, given a target user\ud835\udc62with a budget \ud835\udc61\ud835\udc62, heuristic attackers can construct \ud835\udc61\ud835\udc62fake users with similar interactions to user \ud835\udc62, increasing the co-occurrence probability of target items and the items liked by user \ud835\udc62. Gradient-based attackers can optimize the interactions of \ud835\udc61\ud835\udc62fake users specifically to maximize the attack objective of target user \ud835\udc62. Neural attackers might take the target user \ud835\udc62as a template to generate the interactions of \ud835\udc61\ud835\udc62fake users. Beyond averagely assigning fake user budgets, the attackers can execute target user attacks more purposefully and effectively by considering varying attack difficulty for treatment \ud835\udc47. To keep the generality and simplicity of the optimization, we aim to design a model-agnostic solution to first estimate the optimal budget allocation \ud835\udc47\u2217for a given attacker, and then we can apply \ud835\udc47\u2217to the attacker for the final optimization of \ud835\udc6b\ud835\udc53. \u2022 Objective. The key to considering the varying attack difficulty for the maximal attack objective lies in 1) estimating \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc61\ud835\udc62)) of each target user \ud835\udc62w.r.t. different budgets \ud835\udc61\ud835\udc623 (see the curves in Figure 1(b)), and 2) calculating the optimal treatment \ud835\udc47\u2217to allocate fake users and generate \ud835\udc6b\ud835\udc53for attacking. 4 UPLIFT-GUIDED BUDGET ALLOCATION We propose a UBA framework with two methods to estimate the treatment effects \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc61\ud835\udc62)) on each target user, and then calculate the optimal treatment \ud835\udc47\u2217for target user attacks. Lastly, we detail how to instantiate UBA on existing attackers. 4.1 Treatment Effect Estimation Since the victim model M\ud835\udf03\u2217in Eq. (2) is unknown to attackers, we propose two methods w/ and w/o the surrogate model S\ud835\udf19to estimate \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc61\ud835\udc62)) w.r.t. varying budgets \ud835\udc61\ud835\udc62. 2To keep notation brevity, we omit the notation of attackers in \ud835\udc6b\ud835\udc53(\ud835\udc47). 3Here we change \ud835\udc47in \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\u00b7)) to \ud835\udc61\ud835\udc62to denote how \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\u00b7) of target user \ud835\udc62 changes w.r.t. the user \ud835\udc62\u2019 own budget \ud835\udc61\ud835\udc62. The mutual interference of fake user budgets among target users is tough to measure, which is left for further exploration. \u2022 Estimation via Simulation Experiments. If S\ud835\udf19is available to replace M\ud835\udf03\u2217, UBA can utilize S\ud835\udf19to do simulation experiments for the estimation of \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc61\ud835\udc62)) with varying \ud835\udc61\ud835\udc62. In detail, we repeat \ud835\udc38times of simulation experiments with different random seeds. In each experiment, given a target item \ud835\udc56, an attacker, and a surrogate model S\ud835\udf19, we do the following steps: 1) assigning the same \ud835\udc61\ud835\udc62fake users to all target users; 2) using the attacker to generate the fake user matrix \ud835\udc6b\ud835\udc53based on the assigned budget; and 3) leveraging \ud835\udc6b\ud835\udc53 to attack S\ud835\udf19and obtain its Top-\ud835\udc3erecommendations for each target user. After \ud835\udc38times of experiments with different random seeds for training (\ud835\udc38\u224810 in our implementation), we can approximate \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc61\ud835\udc62)) via the hit ratio of target user \ud835\udc62: \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc61\ud835\udc62)) \u2248 \ud835\udc38\u2032 \ud835\udc61\ud835\udc62 \ud835\udc38, (3) where \ud835\udc38\u2032 \ud835\udc61\ud835\udc62is the number of successfully promoting the target item \ud835\udc56into the Top-\ud835\udc3erecommendations of target user \ud835\udc62by using \ud835\udc61\ud835\udc62 budgets in \ud835\udc38times of experiments. Similarly, we can vary \ud835\udc61\ud835\udc62\u2208 {1, 2, ..., \ud835\udc3b} with \ud835\udc3b\u226a\ud835\udc41to estimate \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc61\ud835\udc62)) with different fake user budgets4. \u2022 Estimation via High-order Interaction Path. Although UBA can estimate the treatment effects via simulation experiments, they rely on a reliable surrogate model and require repeated simulation experiments. To shake off these shackles, we propose another treatment effect estimation method w/o using surrogate models and simulation experiments. We analyze the reasons for the varying attack difficulty across target users. Recommender models, including M\ud835\udf03\u2217and S\ud835\udf19, learn CF embeddings of users and items from interactions as illustrated in Figure 2(a), and then measure the similarity between their CF embeddings to output prediction scores for item ranking. The varying attack difficulty is attributed to the distinct CF embeddings, and essentially stems from the different similarities w.r.t. interactions. To eliminate the dependence on surrogate models, we consider finding a proxy of interactions for the estimation of \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc61\ud835\udc62)). We inspect the number of high-order paths between a target user and a 4The potential budget of each target user is far less than the total budget number \ud835\udc41 because \ud835\udc41budgets are assigning to a group of target users. Uplift Modeling for Target User Attacks on Recommender Systems WWW \u201924, May 13\u201317, 2024, Singapore, Singapore target item in the user-item interaction graph, discovering that it has a strong positive correlation with the user-item prediction scores as shown in Figure 2(b). Formally, if we define \ud835\udc68= \u0014 0 \ud835\udc6b\ud835\udc5f \ud835\udc6b\ud835\udc47 \ud835\udc5f 0 \u0015 , the three-order path number is the value in \ud835\udc683 indexed by a user and an item, which describes the easiness of connecting this user-item pair via some intermediate users and items (see more explanation in Appendix Section A.1). Proposition 1. Given a user and an item without historical interactions, their prediction score by a CF model is positively correlated with their three-order5 path number in \ud835\udc683. We theoretically analyze the rationality and robustness of Proposition 1 w.r.t. different CF models in Appendix Section A.2. In Appendix Section A.1, we also present extensive experiments to validate the wide existence of such a correlation [45]. Intuitively, CF models utilize the interaction similarity across users and items for recommendations, and three-order path numbers describe the closeness between users and items in the interaction graph [25]. The user-item pairs with larger three-order path numbers are intuitively closer to each other in the CF embedding space, leading to higher prediction scores (see Figure 2(b)). Since the prediction scores are used to rank Top-\ud835\udc3erecommendations, the three-order path number is also positively correlated with the Top-\ud835\udc3erecommendation probability \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\u00b7). Moreover, from a causal view in Figure 2(a), user-item interactions act as a confounder, causing the correlation between three-order path numbers and Top-\ud835\udc3e recommendation probabilities. Thanks to such a positive correlation, we can approximate\ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\u00b7) by the weighted three-order path number between user \ud835\udc62and item \ud835\udc56, denoted as \ud835\udefc\u00b7(\ud835\udc683 \ud835\udc62,\ud835\udc56)\ud835\udefd, where \ud835\udefcand \ud835\udefdare two hyper-parameters to adapt for the correlation. Thereafter, to estimate \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc61\ud835\udc62)) with varying budgets \ud835\udc61\ud835\udc62, we only need to assess \ud835\udefc\u00b7(\ud835\udc683 \ud835\udc62,\ud835\udc56)\ud835\udefdafter injecting \ud835\udc61\ud835\udc62fake users to maximize the three-order path number between \ud835\udc62 and \ud835\udc56. By analyzing the relationships between fake user interactions and the three-order path number, we have the following finding. Proposition 2. The three-order path number between target user \ud835\udc62and target item \ud835\udc56(\ud835\udc683 \ud835\udc62,\ud835\udc56) is equivalent to the weighted sum of the intermediate users who liked item \ud835\udc56in \ud835\udc68, where the weights are their interaction similarities with target user\ud835\udc62, i.e., the number of mutually liked items. Please refer to Appendix Section A.3 for the proofs of Proposition 2. In the light of Proposition 2, given a target user\ud835\udc62and a target item \ud835\udc56, we can construct \ud835\udc61\ud835\udc62fake users with the largest interaction similarities with target user\ud835\udc62and a like interaction with target item \ud835\udc56. Consequently, we can obtain the optimal three-order path number in (\ud835\udc68\u2032)3 to estimate \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc61\ud835\udc62)) via \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc61\ud835\udc62)) \u2248\ud835\udefc\u00b7 ((\ud835\udc68\u2032)3 \ud835\udc62,\ud835\udc56)\ud835\udefd, where \ud835\udc68\u2032 = \uf8ee \uf8ef \uf8ef \uf8ef \uf8ef \uf8ef \uf8f0 0 0 \ud835\udc6b\ud835\udc5f 0 0 \ud835\udc6b\ud835\udc53 \ud835\udc6b\ud835\udc47 \ud835\udc5f \ud835\udc6b\ud835\udc47 \ud835\udc53 0 \uf8f9 \uf8fa \uf8fa \uf8fa \uf8fa \uf8fa \uf8fb , i.e., the symmetric interaction matrix with both real and fake users. 5We find that the correlation exists with multiple different order numbers (see Appendix Section A.1). To keep simplicity, we select the smallest order for investigation. 4.2 Budget-constrained Treatment Optimization After estimating the treatment effect \ud835\udc4c\ud835\udf03\u2217 \ud835\udc62,\ud835\udc56(\ud835\udc6b\ud835\udc53(\ud835\udc61\ud835\udc62)), the selection of treatment \ud835\udc47in Eq. (2) becomes a budget-constrained optimization problem [1]. To calculate the optimal treatment\ud835\udc47\u2217, we implement a dynamic programming algorithm based on the idea of the knapsack problem (see Appendix Section A.4 for details). Afterward, we can allocate optimal budgets to each target user to enhance existing attackers for superior overall attack performance. \u2022 Instantiation on Existing Attackers. Given the optimal \ud835\udc47\u2217, existing attackers, including heuristic, gradient-based, and neural attackers, can allocate fake users accordingly and utilize their own strategies to construct fake user interactions (see analysis of Eq. (2) in Section 3 for details). These fake users are subsequently used to attack victim recommender models. \u2022 UBA for Enhancing Recommendation Security. A superior and transparent attacker can always inspire stronger defense methods. Recommender platforms can utilize UBA to improve their defense models through adversarial training, thereby enhancing the security of recommendations. 5 EXPERIMENTS In this section, we conduct extensive experiments to answer the following research questions: \u2212RQ1: How does UBA enhance existing attackers in the task of target user attacks? \u2212RQ2: How does UBA generalize across various settings (e.g., different victim models, budgets, and accessible interactions)? \u2212RQ3: How do UBA and other attackers perform if defense models are applied? \u2022 Datasets and Metric. We evaluate the attackers on the three real-world datasets: MovieLens-1M (ML-1M) [22], Amazon-Game (Amazon) [46], and Yelp [4]. Table 2 displays the statistics of the datasets. In addition to the commonly used ML-1M and Amazon datasets in previous recommender attack work [31, 34], we also select Yelp for experiments due to its larger scale and sparsity. In this way, we can analyze target user attacks in more diverse scenarios. We treat target items as the positive items and use a widely used metric Hit Ratio@\ud835\udc3e(HR@\ud835\udc3e) [31] to measure how many target users receive target item recommendation, where \ud835\udc3e= 10 or 20, denoting the length of recommendation lists. Additionally, we introduce NDCG@\ud835\udc3eand MRR@\ud835\udc3eto consider the ranking positions of target items in the recommendation lists. \u2022 Data Processing. For data processing, we conduct a 10-core filtering on all three datasets to ensure data quality. Besides, all three datasets consist of explicit user feedback such as ratings, which might be required by some existing attackers. We follow the default requirements of the attackers to provide explicit or implicit feedback. For the victim recommender models and surrogate recommender models, we employ the common implicit feedback with binary values {0, 1} in recommender training. Following previous studies [25], we map historical interactions greater than 3 to likes with label 1 and the remaining to dislikes with label 0. \u2022 Baselines. We compare with the following baselines: heuristic attackers including Random [27], Segment [8], Bandwagon [8], WWW \u201924, May 13\u201317, 2024, Singapore, Singapore Wenjie Wang, Changsheng Wang, Fuli Feng, Wentao Shi, Daizong Ding, and Tat-Seng Chua Table 1: Evaluation on three real-world datasets when overall fake user budget is 100. We show the results of HR@10, NDCG@10, and MRR@10. The best results for each backend model are bold and the second-best ones are underlined. \u2217implies the improvements over the best baseline \u201cTarget\u201d are statistically significant (\ud835\udc5d-value<0.05) under \ud835\udc61-test. ML-1M Yelp Amazon Popular item Unpopular item Popular item Unpopular item Popular item Unpopular item HR NDCG MRR HR NDCG MRR HR NDCG MRR HR NDCG MRR HR NDCG MRR HR NDCG MRR Beofore Attack 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0200 0.0035 0.0020 0.0000 0.0000 0.0000 Random Attack 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0200 0.0028 0.0022 0.0200 0.0028 0.0022 0.2000 0.0235 0.0199 0.2200 0.0262 0.0220 Segment Attack 0.0200 0.0040 0.0022 0.0200 0.0035 0.0035 0.0000 0.0000 0.0000 0.0400 0.0039 0.0040 0.1600 0.0195 0.0160 0.1400 0.0180 0.0155 Bandwagon Attack 0.0200 0.0035 0.0020 0.0000 0.0000 0.0000 0.0200 0.0029 0.0025 0.0200 0.0027 0.0020 0.2000 0.0245 0.0222 0.1600 0.0204 0.0177 Average Attack 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0200 0.0031 0.0029 0.0200 0.0029 0.0025 0.1800 0.0217 0.0200 0.1400 0.0180 0.0355 WGAN 0.0200 0.0039 0.0025 0.0000 0.0000 0.0000 0.0200 0.0029 0.0025 0.0200 0.0027 0.0020 0.1400 0.0180 0.0155 0.1800 0.0227 0.0225 DADA-DICT 0.0400 0.0071 0.0073 0.0800 0.0104 0.0089 0.0200 0.0036 0.0040 0.1200 0.0169 0.0150 0.4200 0.0517 0.0420 0.3200 0.0448 0.0400 DADA-DIV 0.0000 0.0000 0.0000 0.0400 0.0057 0.0044 0.0000 0.0000 0.0000 0.1400 0.0220 0.0199 0.2600 0.0333 0.0260 0.3200 0.0473 0.0457 DADA 0.0600 0.0112 0.0123 0.1200 0.0156 0.0171 0.0400 0.0053 0.0080 0.1600 0.0268 0.0266 0.5400 0.0667 0.0540 0.4400 0.0576 0.0488 AIA 0.0200 0.0061 0.0033 0.0200 0.0127 0.0111 0.0000 0.0000 0.0000 0.0600 0.0054 0.0032 0.2800 0.0375 0.0311 0.2800 0.0393 0.0350 +Target 0.2000 0.0244 0.0222 0.3800 0.0428 0.0356 0.0000 0.0000 0.0000 0.0600 0.0082 0.0075 0.5800 0.0780 0.0725 0.6400 0.0846 0.0711 + UBA(w/o S\ud835\udf19) 0.2400 0.0315 0.0300 0.4400 0.0449 0.0400 0.0200 0.0029 0.0025 0.1200 0.0191 0.0269 0.6600 0.0960 0.0942 0.7400 0.1007 0.0925 + UBA(w/ S\ud835\udf19) 0.2600* 0.0431* 0.0520* 0.5800* 0.0556* 0.0514* 0.1000* 0.0178* 0.0250* 0.1400* 0.0255* 0.0279* 0.7200* 0.1115* 0.1200* 0.8200* 0.1162* 0.1171* AUSH 0.0200 0.0047 0.0050 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.2600 0.0347 0.0288 0.3200 0.0448 0.0400 +Target 0.2400 0.0349 0.0340 0.3600 0.0531 0.0422 0.0800 0.0111 0.0100 0.1000 0.0119 0.0100 0.6400 0.0887 0.0800 0.7400 0.1064 0.1057 + UBA(w/o S\ud835\udf19) 0.2800 0.0380 0.0467 0.4200 0.0646 0.0550 0.1000 0.0138 0.0142 0.0800 0.0137 0.0160 0.7400 0.1064 0.1057 0.7400 0.1137 0.1233 + UBA(w/ S\ud835\udf19) 0.3200* 0.0474* 0.0533* 0.5200* 0.0902* 0.0828* 0.1400* 0.0255* 0.0279* 0.1600* 0.0376* 0.0533* 0.8600* 0.1299* 0.1433* 0.8000* 0.1142* 0.1142* Legup 0.0400 0.0062 0.0054 0.1000 0.0024 0.0021 0.0600 0.0078 0.0067 0.0400 0.0043 0.0050 0.0400 0.0063 0.0050 0.2000 0.0235 0.0199 +Target 0.1400 0.0187 0.0200 0.3200 0.0539 0.0412 0.1600 0.0251 0.0229 0.1800 0.0302 0.0300 0.6000 0.0742 0.0600 0.5000 0.0676 0.0625 + UBA(w/o S\ud835\udf19) 0.1800 0.0239 0.0225 0.3200 0.0604 0.0525 0.2000 0.0283 0.0222 0.2600 0.0411 0.0433 0.7400 0.0961 0.0822 0.6800 0.0887 0.0755 + UBA(w/ S\ud835\udf19) 0.2600* 0.0480* 0.0371* 0.3600* 0.0825* 0.0743* 0.2400* 0.0365* 0.0342* 0.2800* 0.0411* 0.0466* 0.8600* 0.1216* 0.1228* 0.7600* 0.1086* 0.1085* Table 2: Statistics of the three datasets. |U\ud835\udc5f| |I| #Interactions Sparity K-core ML-1M 5950 3702 567,533 0.257% 10 Amazon 3179 5600 38, 596 0.216% 10 Yelp 54632 34474 1,334,942 0.070% 10 and Average Attacks [29], the state-of-the-art gradient-based attacker DADA with its variants [31], and neural attackers including WGAN [3], AIA [51], AUSH [34], and Leg-UP [35]. To adapt to target user attacks, we propose a model-agnostic baseline named \u201cTarget\u201d by changing the attack objective from O(M\ud835\udf03\u2217, U\ud835\udc5f,\ud835\udc56) to O(M\ud835\udf03\u2217, U\ud835\udc61,\ud835\udc56) as discussed in Section 3. We implement \u201cTarget\u201d and our UBA framework to three competitive backend attackers for comparison. We move the hyper-parameter tuning to Appendix Sections B.1. \u2022 Victim and Surrogate Models. Following [31], we choose representative MF [28], NCF [23], and LightGCN [25] as victim models and utilize the simplest MF as the surrogate model. Table 1 shows the results of LightGCN as the victim model due to space limitation. The robustness of attacking MF and NCF is analyzed in Figure 4. \u2022 Selection of Target Items. To verify the robustness of UBA on different target items, we test UBA on popular items and unpopular items, respectively. This is because the attack performance on popular and unpopular items might vary. We divide all items into five groups according to their popularity, i.e., historical interaction numbers, and then we randomly select the popular item and the unpopular item as the target item from the most popular group and the most unpopular group, respectively. For each target item, we run five attack processes by changing random seeds and report the average performance. \u2022 Selection of Target Users. Notably, target users can be specified by user IDs, attributes (e.g., gender), and interactions. In this work, we try to find out the potential target users who might be interested in the target item. To achieve this, we select all users who have interacted with the target item category. For example, given an action movie as the target item, we find out all the users who have interacted with at least one action movie. Thereafter, we rank all the selected users via their interaction number with the target item category. Only the users with an interaction number with the target item category smaller than a threshold (10) are further selected, from which we randomly sample some users who are hard to attack into the target user group. In this way, we can select some target users who are possibly interested in this item category yet hard to attack. We usually select 50 target users in our experiments while we analyze the effect of different target user numbers in Table 4. 5.1 Target User Attack Performance \u2022 Overall Comparison (RQ1). In Table 1, we report the attack performance on target users. As an extension, we present the attack results of all users in Appendix Section C.1. From Table 1, we have the following findings. 1) Superiority of DADA and \u201cTarget\u201d. Most attackers (heuristic and neural ones) cannot achieve satisfactory performance on target user attacks. By contrast, DADA with variants and \u201cTarget\u201d exhibit superior results, revealing the importance of distinguishing users for attacking. DADA and DADA-DICT utilize a greedy algorithm to allocate more budgets to easy users while \u201cTarget\u201d concentrates fake user budgets to attack target users. 2) Effectiveness of UBA. Both UBA w/ and w/o S\ud835\udf19significantly enhance the attack performance of three backend attackers (AIA, AUSH, and Leg-UP) by a large margin on three datasets. In addition, UBA also surpasses \u201cTarget\u201d, further validating the superiority of considering the varying attack difficulty. Due to estimating the attack difficulty across target users, UBA can rationally allocate the fake user budgets to maximize the overall recommendation probabilities. The users with large uplifts of Uplift Modeling for Target User Attacks on Recommender Systems WWW \u201924, May 13\u201317, 2024, Singapore, Singapore recommendation probabilities will be favored, thus enhancing the attack performance. 3) UBA(w/ S\ud835\udf19) outperforms UBA(w/o S\ud835\udf19). This is reasonable, as the surrogate model S\ud835\udf19can assist in accurately estimating the attack difficulty through simulation experiments. S\ud835\udf19may serve as a reliable substitute for the victim model M\ud835\udf03\u2217in such estimation because they commonly leverage CF information for recommendations. Despite the better performance of UBA(w/ S\ud835\udf19), UBA(w/o S\ud835\udf19) does not need the simulation experiments, reducing the computation costs. As such, UBA(w/o S\ud835\udf19) is also a favorable approach that balances effectiveness and efficiency. \u2022 Varying Fake User Budgets (RQ2). Figure 3 depicts the attack performance on ML-1M with varying budgets. The results on Amazon and Yelp with similar trends are omitted to save space. From the figure, we can find that: 1) under different budgets, UBA w/ and w/o S\ud835\udf19usually achieve better attack performance than the original method and \u201cTarget\u201d on three backend attackers. This verifies the robustness of UBA w.r.t. fake user budgets. And 2) the relative improvements from \u201cTarget\u201d to UBA is significantly large when the budget is small such as budget= 50. Such observation on three attackers demonstrates that UBA holds high practical value in real-world recommender attack scenarios, given that the number of fake users an attacker can manage is often very limited [31]. \u2022 Different Victim Models (RQ2). Figure 4 visualizes the attack results of using MF and NCF as victim models on ML-1M. By inspecting Figure 4 and the results of LightGCN in Table 1, we can have the following observations. 1) UBA shows better performance than \u201cOrigin\u201d and \u201cTarget\u201d in most cases, indicating good generalization ability of UBA across different victim models. Indeed, the generalization of UBA lies in the accurate estimation of the attack difficulty on target users, i.e., the heterogeneous treatment effects. By exploiting the CF information with and without using surrogate models, our proposed UBA is theoretically applicable to most CF victim models. And 2) the hit ratios on MF are significantly smaller than those on NCF and LigntGCN. This phenomenon commonly exists across different backend attackers and attack strategies. We attribute the possible reason to that NCF and LightGCN utilize more advanced neural networks to fully exploit CF information in user-item interactions, resulting in a more severe fitting of fake user interactions. Consequently, the fake users lead to a higher attack performance on NCF and LightGCN. This finding is critical, inspiring us to consider the security issues when devising advanced recommender models. \u2022 Effect of the Proportions of Accessible Interactions (RQ2). The proportion of accessible interactions refers to the ratio of user interactions that the attacker can access. Both the estimation of treatment effects and the generation of fake users by the attackers are using these real user interactions. In real-world attack scenarios, attackers can only collect a limited portion of real users\u2019 interactions. Therefore, using the interactions of partial users can demonstrate the practicality of the attackers. We demonstrate the effects of different proportions of interactions in Table 3. From this table, we can observe the followings: 1) as the proportion increases, the attack performance shows a growing trend, indicating that receiving more user interactions is beneficial for attackers. And 2) two UBA Table 3: Performance with different proportions of user interactions accessible to attackers. Data Ratio 10% 20% 50% 80% HR@10 HR@20 HR@10 HR@20 HR@10 HR@20 HR@10 HR@20 Before Attack 0.02 0.02 0.00 0.02 0.00 0.02 0.00 0.02 Random Attack 0.00 0.02 0.00 0.00 0.00 0.02 0.02 0.02 Segment Attack 0.00 0.02 0.02 0.02 0.02 0.02 0.02 0.02 Bandwagon Attack 0.02 0.02 0.02 0.02 0.02 0.02 0.00 0.04 Average Attack 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 WGAN 0.00 0.02 0.02 0.02 0.00 0.02 0.00 0.02 DADA-DICT 0.02 0.04 0.04 0.04 0.00 0.04 0.04 0.04 DADA-DIV 0.02 0.02 0.00 0.04 0.02 0.04 0.02 0.08 DADA 0.04 0.04 0.06 0.10 0.06 0.12 0.08 0.12 AIA 0.00 0.02 0.02 0.02 0.02 0.02 0.02 0.06 +Target 0.12 0.28 0.20 0.38 0.22 0.36 0.20 0.42 + UBA(w/o S\ud835\udf19) 0.22 0.36 0.24 0.40 0.22 0.42 0.28 0.44 + UBA(w/ S\ud835\udf19) 0.22 0.42 0.26 0.44 0.30 0.48 0.34 0.48 AUSH 0.00 0.04 0.02 0.02 0.04 0.06 0.04 0.08 +Target 0.16 0.34 0.24 0.36 0.24 0.36 0.30 0.40 + UBA(w/o S\ud835\udf19) 0.20 0.42 0.28 0.40 0.26 0.42 0.32 0.44 + UBA(w/ S\ud835\udf19) 0.28 0.44 0.32 0.42 0.30 0.46 0.28 0.44 Leg-UP 0.02 0.02 0.04 0.06 0.04 0.06 0.06 0.10 +Target 0.10 0.14 0.14 0.26 0.12 0.30 0.14 0.32 + UBA(w/o S\ud835\udf19) 0.16 0.22 0.18 0.32 0.16 0.36 0.20 0.36 + UBA(w/ S\ud835\udf19) 0.20 0.28 0.26 0.34 0.30 0.36 0.32 0.44 Table 4: Performance with different numbers of target users. Target user 50 Target user 100 Target user 500 HR@10 HR@20 HR@10 HR@20 HR@10 HR@20 Beofore Attack 0.00 0.02 0.04 0.06 0.00 0.02 Random Attack 0.00 0.00 0.10 0.14 0.10 0.15 Segment Attack 0.02 0.02 0.02 0.12 0.15 0.17 Bandwagon Attack 0.02 0.02 0.14 0.20 0.13 0.18 Average Attack 0.00 0.00 0.10 0.13 0.10 0.11 WGAN 0.02 0.02 0.05 0.12 0.12 0.18 DADA-DICT 0.04 0.04 0.31 0.42 0.30 0.53 DADA-DIV 0.00 0.04 0.20 0.33 0.29 0.41 DADA 0.06 0.10 0.30 0.44 0.28 0.55 AIA 0.02 0.02 0.18 0.23 0.17 0.30 +Target 0.20 0.38 0.20 0.38 0.25 0.39 + UBA(w/o S\ud835\udf19) 0.24 0.40 0.33 0.51 0.31 0.47 + UBA(w/ S\ud835\udf19) 0.26 0.44 0.44 0.70 0.38 0.55 AUSH 0.02 0.02 0.23 0.32 0.20 0.31 +Target 0.24 0.36 0.31 0.45 0.28 0.36 + UBA(w/o S\ud835\udf19) 0.28 0.40 0.44 0.56 0.34 0.39 + UBA(w/ S\ud835\udf19) 0.32 0.42 0.59 0.73 0.39 0.55 Legup 0.04 0.06 0.22 0.36 0.21 0.31 +Target 0.14 0.26 0.30 0.33 0.26 0.36 + UBA(w/o S\ud835\udf19) 0.18 0.32 0.41 0.50 0.40 0.60 + UBA(w/ S\ud835\udf19) 0.26 0.34 0.55 0.62 0.43 0.59 methods usually achieve better performance than the baselines, validating the robustness of UBA under varying proportions of accessible interactions. \u2022 Varying Numbers of Target Users (RQ2). In Table 4, we evaluate the attack performance of increasing the number of target users while maintaining the same fake user budgets. From this table, we can observe that: 1) with increasing target user numbers, two UBA methods accomplish better attack results than the baselines, demonstrating that UBA can handle the attacks on different numbers of target users. 2) Furthermore, two UBA methods remain relatively high hit ratios with limited fake user budgets when the number of target users is large, thereby guaranteeing attack effectiveness even if attackers seek to enlarge the attack scope. WWW \u201924, May 13\u201317, 2024, Singapore, Singapore Wenjie Wang, Changsheng Wang, Fuli Feng, Wentao Shi, Daizong Ding, and Tat-Seng Chua Figure 3: Performance comparison w.r.t. HR@10 under different attack budgets. 0.00 0.05 0.10 0.15 0.20 Victim Model: MF AUSH Origin Target UBA(w/o ss) UBA(w/ ss) AIA Leg-UP 0.0 0.1 0.2 0.3 0.4 Victim Model: NCF AIA Origin Target UBA(w/o ss) UBA(w/ ss) AUSH Leg-UP Figure 4: Generalization of UBA w.r.t. HR@10 across different victim models. Figure 5: Case study about the budget allocation on five target users. UBA allocates fake users more wisely to maximize the overall recommendation probability than Target. \u2022 Case Study. To intuitively understand how UBA effectively utilizes fake user budgets to enhance attack effectiveness, we conduct a case study. We select five target users from ML-1M to compare the difference in fake user allocation between \u201cTarget\u201d and UBA. Specifically, in Figure 5, given a target item, we show the varying recommendation probabilities of five target users under different fake user budgets, estimated by UBA(w/ S\ud835\udf19). It is worth noting that \u201cTarget\u201d randomly allocates fake user budgets while UBA maximizes overall recommendation probabilities for budget allocation. From Figure 5, we observe the following: 1) UBA allocates limited budgets to users with larger uplifts, leading to higher overall recommendation probabilities. For instance, for \u201cUser 1\u201d in the left plot, increasing the budget from 2 to 3 results in an increase of 0.2 in the recommendation probability, significantly enhancing the probability of a successful attack. And 2) \u201cTarget\u201d, due to its random allocation of fake user budgets, usually assigns 1 to 3 fake user budgets to most users, leading to a wastage of fake user budgets on the users with constantly lower recommendation probabilities (e.g., \u201cUser 2\u201d and \u201cUser 4\u201d in the right plot of Figure 5). Table 5: Attack performance under two defense models. AIA + Target + UBA(w/o S\ud835\udf19) + UBA(w/ S\ud835\udf19) Origin Detector Origin Detector Origin Detector Origin Detector HR@10 0.02 0.02 0.20 0.14 0.26 0.20 0.24 0.22 PCA HR@20 0.02 0.02 0.38 0.28 0.44 0.32 0.40 0.32 HR@10 0.02 0.02 0.20 0.08 0.26 0.10 0.24 0.12 FAP HR@20 0.02 0.02 0.38 0.18 0.44 0.12 0.40 0.20 AUSH + Target + UBA(w/o S\ud835\udf19) + UBA(w/ S\ud835\udf19) HR@10 0.02 0.02 0.24 0.20 0.30 0.18 0.28 0.22 PCA HR@20 0.02 0.02 0.36 0.36 0.42 0.32 0.40 0.34 HR@10 0.02 0.02 0.24 0.02 0.30 0.04 0.28 0.08 FAP HR@20 0.02 0.02 0.36 0.10 0.42 0.10 0.40 0.14 Leg-UP + Target + UBA(w/o S\ud835\udf19) + UBA(w/ S\ud835\udf19) HR@10 0.04 0.00 0.14 0.12 0.26 0.12 0.18 0.14 PCA HR@20 0.06 0.00 0.26 0.24 0.34 0.26 0.32 0.24 HR@10 0.04 0.00 0.14 0.04 0.26 0.06 0.18 0.08 FAP HR@20 0.06 0.00 0.26 0.08 0.34 0.08 0.32 0.14 5.2 Defense Against Target User Attacks (RQ3). In this section, we explore the ability of existing defense models against target user attackers. We examine two representative unsupervised defense models, PCA [40] and FAP [78]. PCA is the most classic model to detect a group of fake users for injective attacks and FAP is a unified framework for fake user detection based on a fraudulent action propagation algorithm. These defense models usually detect fake users and exclude the detected users for recommender training. Under the defense models, we present the attack results of three backend attackers with \u201cTarget\u201d and UBA on ML-1M in Table 5. From the table, we can observe that: 1) both PCA and FAP decrease the performance of all attackers, indicating their usefulness in defending target user attackers. In particular, FAP achieves superior defense than PCA, attributable to its proficient propagation algorithm on the user-item interaction graph. However, 2) even with the defense models, UBA w/ and w/o S\ud835\udf19show generally higher hit ratios than the vanilla attackers and \u201cTarget\u201d. This possibly validates the capacity of UBA to allocate budgets to target users who are more interested in the target item, making the detection of fake users challenging. Future research could benefit from these two observations, especially inspirations from FAP, to devise defense models specially tailored for target user attackers. \u2022 More Experimental Results. Due to space limitations, we provide more experimental analysis in the Appendix. First, in addition to target user attacks, we present the attack results on all users in Section C.1. We study the results of different victim models and defense models on all users in Section C.2 and Section C.3. Besides, we only report the performance of promoting popular items in Figure 3 to save space. The results on unpopular items are in Section C.4. Uplift Modeling for Target User Attacks on Recommender Systems WWW \u201924, May 13\u201317, 2024, Singapore, Singapore 6 CONCLUSION AND FUTURE WORK In this work, we highlighted the significance of target user attacks and formulated the issue of varying attack difficulty across users via causal language. To consider the varying attack difficulty and maximize attack performance, we proposed a model-agnostic UBA framework to calculate the optimal allocation of fake user budgets. We conducted extensive experiments on three real-world datasets with diverse settings, revealing the effectiveness of UBA in performing target user attacks. Moreover, we validated the robustness of UBA against defense models. This work also emphasizes the imperative for further exploration of target user attacks and the corresponding defense strategies. As an initial study on uplift-enhanced recommender attack, this work leaves many promising future directions. First, while we have confirmed the effectiveness of two defense models to some extent, it is highly valuable to design more advanced defense strategies tailored for target user attacks. Second, we assume that the victim recommender models leverage CF information. Despite the popularity of CF models, UBA can be extended to attack non-CF models such as popularity-based models. Lastly, since large language models are gradually used for recommendation [5, 6, 36], how to attack and defend them from target user attacks deserves attention.", "introduction": "Recommender systems have evolved into fundamental services for information filtering on numerous Web platforms such as Ama- zon and Twitter. Recent research has validated the vulnerability of recommender systems to injective attacks [31, 75, 80], which aim to promote the exposure of a target item via injecting limited fake users (refer to Figure 1(a)). Specifically, since recommender models typically utilize Collaborative Filtering (CF) in users\u2019 his- torical interactions to make recommendations, the attackers can fabricate fake user interactions and inject them into open-world Web platforms, so as to induce recommender models to elevate the exposure probability of a target item. As a result, such injective attacks can deliberately amplify traffic to target items, potentially bringing economic, political, or other profits to certain entities. Generally, past literature on injective attacks falls into three main groups: 1) Heuristic attackers [9, 27] that adopt heuristic rules to construct fake users, for instance, Bandwagon Attack [8] increases the co-occurrence of popular items and the target item in fake user interactions; 2) gradient-based attackers [19, 30] that directly adjust the interactions of fake users via gradients to maximize the well- designed attack objectives; and 3) neural attackers [34, 35, 51] that optimize the neural networks to generate influential fake users for promoting the target item to more users. However, previous work neglects that not all users will be inter- ested in the target item, as each item appeals to its unique audience. For instance, dresses typically appeal more to female buyers. In- creasing the recommendations of a target item to all users not only wastes attack resources, but also results in inferior attack perfor- mance. Worse still, most studies fail to account for the varying attack difficulty across different users [31] (see Figure 1(b)). Some \u201charder\u201d users need more fake users to receive exposure to a target item. Due to ignoring the varying attack difficulty, easy users might receive redundant fake user budgets while hard users might be arXiv:2403.02692v1 [cs.IR] 5 Mar 2024 WWW \u201924, May 13\u201317, 2024, Singapore, Singapore Wenjie Wang, Changsheng Wang, Fuli Feng, Wentao Shi, Daizong Ding, and Tat-Seng Chua All user attacks Real users Fake users RecSys User-item interactions Users\u2019 recommendations Target user attacks Target item Target item (a) Illustration of all user attacks and target user attacks. (b) Recommendation probability of users w.r.t. varying fake user budgets. 0 0.2 0.4 0.6 0.8 0 2 4 6 8 10 Recommendation probability Fake user budget User A User B Different uplifts for users A and B given the same eight fake users. Figure 1: Illustration of injective attacks on all users and target users (a) and varying attack difficulty on two users (b), where one fake user may cause different uplifts of the recommendation probabilities. inadequately attacked, leading to inefficient use of budgets and poor attack performance. To address the issues, we focus on an interesting recommender attack task \u2014 target user attacks, which attempt to expose a target item to a specific user group instead of all users. Moreover, we formulate the varying attack difficulty via causal language. From a causal view, assigning fake user budgets to a target user can be formulated as a treatment, and the probability of recommending a target item to this target user is the outcome. Given a target item, the varying attack difficulty essentially reflects the heterogeneous treatment effects (a.k.a. uplifts1) on different target users. This is attributed to the different similarities between the target item and each target user\u2019s historically liked items. In this light, the key to maximizing attack performance with limited fake user budgets lies in: 1) estimating the heterogeneous treatment effect on each target user with different budgets, and 2) allocating the limited budgets wisely to maximize the treatment effects across all target users, i.e., the overall recommendation probability. To this end, we present an Uplift-guided Budget Allocation (UBA) framework for target user attacks. In particular, UBA utilizes two methods to estimate the treatment effect. If a surrogate recom- mender model (e.g., Matrix Factorization (MF)) is available to sim- ulate the victim recommender model, UBA conducts simulation experiments with different budgets to attack target users, and then repeats the experiments to assess the treatment effect. In the ab- sence of a reliable surrogate model, we identify a proxy variable for UBA to approximate the heterogeneous treatment effects between target users and items. We have empirically and theoretically vali- dated that the identified proxy variable \u2014 the three-order path num- ber between the target user and item in the user-item interaction graph \u2014 exhibits a strong positive correlation with the recommen- dation probability of CF models. Based on the estimated treatment 1Treatment effects and uplifts are exchangeable in this work [1, 76] . effects, UBA employs a dynamic programming algorithm to com- pute the optimal budget allocation for all target users, maximizing the overall recommendation probability. Since UBA is a model-agnostic framework, we instantiate it on three competitive attack models and conduct experiments on three benchmark datasets. Extensive experiments show the superiority and generalization ability of UBA in various settings, such as dif- ferent target items, fake user budgets, attack models, and victim models. Moreover, we validate the robustness of UBA in the cases of applying defense models although the defense models are effective to some extent. To ensure reproducibility, we release our code and data at https://github.com/Wcsa23187/UBA. To summarize, our contributions are threefold. \u2022 We highlight the significance of target user attacks and formally inspect the issue of varying attack difficulty on users from a causal perspective. \u2022 We propose the model-agnostic UBA framework, which offers two methods to estimate the heterogeneous treatment effects on target users and calculates the optimal budget allocation to maximize attack performance. \u2022 Extensive experiments reveal the significance of UBA in perform- ing target user attacks across diverse settings. Meanwhile, we validate the robustness of UBA against defense models." }, { "url": "http://arxiv.org/abs/2311.08975v2", "title": "Constraints on cosmic star formation history via a new modeling of the radio luminosity function of star-forming galaxies", "abstract": "Radio wavelengths offer a unique possibility to trace the total\nstar-formation rate (SFR) in galaxies, both obscured and unobscured. To probe\nthe dust-unbiased star-formation history, an accurate measurement of the radio\nluminosity function (LF) for star-forming galaxies (SFGs) is crucial. We make\nuse of an SFG sample (5900 sources) from the Very Large Array (VLA) COSMOS 3\nGHz data to perform a new modeling of the radio LF. By integrating the\nanalytical LF, we aim to calculate the history of the cosmic SFR density (SFRD)\nfrom $z\\sim5$ onwards. For the first time, we use both models of the pure\nluminosity evolution (PLE) and joint luminosity+density evolution (LADE) to fit\nthe LFs directly to the radio data using a full maximum-likelihood analysis,\nconsidering the sample completeness correction. We also incorporate updated\nobservations of local radio LFs and radio source counts into the fitting\nprocess to obtain additional constraints. We find that the PLE model cannot be\nused to describe the evolution of the radio LF at high redshift ($z>2$). By\nconstruct, our LADE models can successfully fit a large amount of data on radio\nLFs and source counts of SFGs from recent observations. We therefore conclude\nthat density evolution is genuinely indispensable in modeling the evolution of\nSFG radio LFs. Our SFRD curve shows a good fit to the SFRD points derived by\nprevious radio estimates. In view of the fact that our radio LFs are not\nbiased, as opposed those of previous studies performed by fitting the $1/V_{\\rm\nmax}$ LF points, our SFRD results should be an improvement on these previous\nestimates. Below $z\\sim1.5$, our SFRD matches a published multiwavelength\ncompilation, while our SFRD turns over at a slightly higher redshift\n($2 22 \u00d7 (1 + z)0.013. (1) According to this criterion, they were able to distinguish 1814 sources (23%) that are primarily emitting due to AGN activity in the radio. The sample consists of 5915 SFGs that do not exhibit radio excess. All the sources have a (spectroscopic or photometric) redshift and the rest-frame 1.4 GHz luminosity. The redshift distribution of the SFG sample as well as its scatter plot are shown in Figure 1. The red dashed curve indicates the 1.4 GHz flux limit line defined as flim 1.4GHz(z) = 4\u03c0D2 L (1 + z)1\u2212\u03b1 3 GHz 1.4 GHz !\u03b1 Flim 3GHz, (2) where DL represents the luminosity distance at redshift z, Flim 3GHz = 11.5\u00b5Jy is the 5\u03c3 detection limit of the survey at 3 GHz, and the spectral index \u03b1 is set to 0.7. We have excluded all sources below the flux limit line, and the total number of sources used in this work is 5900. 3. Methods 3.1. Luminosity function and likelihood function The LF \u03a6(z, L) is a measurement of the number of sources per unit comoving volume per unit logarithmic luminosity interval: \u03a6(z, L) = d2N dVd log10 L. (3) Given an analytical form with parameters \u03b8 for the LF, \u03a6(z, L|\u03b8), the maximum-likelihood solution to \u03b8 is obtained by minimizing the negative logarithmic likelihood function S . Following Marshall et al. (1983) and (Fan et al. 2001), S can be written as S = \u22122 n X i ln[\u03a6(zi, Li)p(zi, Li)] + 2 ZZ W \u03a6(z, L)p(z, L)\u2126dV dz dzdL, (4) where p(z, L) is the selection probability of the SFG as a function of redshift and luminosity, and W is the survey region. The inclusion of the selection probability in equation (4) accounts for the fact that the sample is incomplete near the flux limit. The symbol \u2126represents the solid angle covered by the survey, and dV/dz denotes the differential comoving volume per unit solid angle, as defined by Hogg (1999). For our SFG sample, p(z, L) can be estimated by p(z, L) = Cradio[F3 GHz(z)] \u00d7 Copt(z), (5) where Cradio is the completeness of the VLA-COSMOS 3 GHz radio catalog as a function of the flux density F3 GHz, and Copt is the completeness owing to radio sources without assigned optical-NIR counterparts (Novak et al. 2017). We adopt the calculations of Cradio and Copt given by Novak et al. (2017), and refer the interested reader to their Fig. 2 for more details. To estimate the integration term in Equation (4), one needs to find the function values for p(z, L) at given pairs of (z, L). We achieve this using an interpolation method. Firstly, we set a twodimensional (2D) grid of 50 \u00d7 50 in the log L \u2212z space. For each grid point (log Li, zi), we can derive its flux density Fi from Li by assuming \u03b1 = 0.7. We can then estimate the corresponding Cradio and Copt through a one-dimensional linear interpolation method using the observed value from Novak et al. (2017). Finally, we have the values for p(z, L) at the 50 \u00d7 50 grid points, which are used to perform the 2D linear interpolation to estimate the function value of p(z, L). Following the method of Willott et al. (2001) and Yuan et al. (2017), we incorporate the most recent observations of the local radio LFs and source counts (see section 3.2) into the fitting process to obtain additional constraints. The local radio LF (LRLF) and the source counts (SCs) are one-dimensional functions, and their \u03c72 value is calculated as \u03c72 = n X i=1 fdata i \u2212f mod i \u03c3data i !2 , (6) where fdata i represents the value of the data in the ith bin, and fmod i and \u03c3data i are the model value and data error in the ith bin, respectively. As \u03c72 is related to a likelihood by \u03c72 = \u22122 ln(likelihood) (i.e., the same form as S ; Willott et al. 2001), we can define a new function S all, which combines the constraints from all three types of data (i.e., the SFG sample, LRLF, and SC data). The expression is as follows S all = S + \u03c72 LRLF + A0\u03c72 SC, (7) where \u03c72 LRLF and \u03c72 SC denote the value of \u03c72 for the local radio LFs and source counts, respectively. Because we use three different types of data to estimate S all, we need to balance the statistical weight for each term in Equation (7). We chose an A0 so that the value of A0\u03c72 SC is approximately equal to that of \u03c72 LRLF. This yields values of about 10-40 for our calculations. We find that varying A0 does not significantly bias our final results (also see Kochanek 1996). Using Equation (7), we can obtain the bestfit parameters for LFs by numerically minimizing the objective function S all. Here we adopt a Bayesian method as in our previous papers (e.g., Yuan et al. 2016). This latter enables us to determine the best estimates for the model parameters and their probability distribution (also see Lewis & Bridle 2002; Yuan et al. 2017). We use uniform (so-called \u201cuninformative\u201d) priors on the parameters, and employ the MCMC sampling algorithm available in the Python package emcee (Foreman-Mackey et al. 2013) to estimate the best-fit parameters. 3.2. Local luminosity functions and radio source counts The local LFs at 1.4 GHz have been well determined for SFGs thanks to the combined use of large radio surveys, such as NVSS (NRAO VLA Sky Survey) and FIRST (Faint Images of the Radio Sky at Twenty centimeters), and large-area spectroscopic surveys. In the present work, we simultaneously use the local SFG LFs from Condon et al. (2002), Best et al. (2005), Mauch & Sadler (2007), and Condon et al. (2019) (see Figure 2) to calculate \u03c72 LRLF in Equation (7). In addition to local LFs, the observed radio source counts can provide an important constraint to the modeling of SFG LFs. Article number, page 3 of 14 A&A proofs: manuscript no. 47746corr 19 20 21 22 23 24 log10(L1.4GHz [W Hz\u22121]) \u22128 \u22127 \u22126 \u22125 \u22124 \u22123 \u22122 \u22121 log10(\u03c6(z, L) [Mpc\u22123 \u2206L\u22121]) This paper: Model A This paper: Model A 3\u03c3 This paper: Model B This paper: Model C This paper: Model C 3\u03c3 Condon +2019 Best +2005 Condon +2002 Mauch +2007 Fig. 2: Local radio LF at 1.4 GHz of SFGs from several surveys with different observed areas and sensitivities (colored data points). The colored lines show the fits to the combined data from our models. In the past several years, deep radio surveys have emerged that reach submJy detection limits, enabling investigation of the faint source counts (e.g., Smol\u02c7 ci\u00b4 c et al. 2017b; Ocran et al. 2020a; Mandal et al. 2021; van der Vlugt et al. 2021; Matthews et al. 2021b; Hale et al. 2023). The source counts, denoted n(F\u03bd), represent the number of sources per flux density (F\u03bd) per steradian. The shape of n(F\u03bd) is closely related to the evolutionary properties of the source as well as the geometry of the Universe (Padovani 2016). Typically, the counts are Euclidean normalized by multiplying by F2.5 \u03bd (e.g., de Zotti et al. 2010). According to Padovani (2016) and Yuan et al. (2017), we can relate the source counts of SFGs to their LF using the following equation: n(F\u03bd) 4\u03c0 = 4\u03c0 c H0 Z zmax(F\u03bd) zmin(F\u03bd) \u03a6(z, L(F\u03bd, z))D4 L(z)dz (1 + z)(3\u2212\u03b1) p \u2126m(1 + z)3 + \u2126\u039b , (8) where c is the speed of light, \u03a6(z, L) is the LF, DL(z) is the luminosity distance, zmin and zmax represent the range of integration in redshift, and \u03b1 is the spectral index. In this work, we use the observed source counts from Algera et al. (2020a) and Hale et al. (2023) to provide an additional constraint in our analysis. The Algera et al. (2020a) 3 GHz source counts are measured based on the ultrafaint (reaching a 5\u03c3 flux limit of \u223c2.7 \u00b5Jy beam\u22121 within the center of the 3 GHz image) radio population detected in the Karl G. Jansky Very Large Array COSMOS-XS survey. The Hale et al. (2023) 1.4 GHz source counts are measured based on the continuum early science data release of the MeerKAT International Gigahertz Tiered Extragalactic Exploration (MIGHTEE) survey in the COSMOS and XMM-LSS fields. The MIGHTEE sources were divided into three subsets: SFGs, AGNs, and unclassified sources. Hale et al. (2023) considered two cases: (1) the unclassified sources are assumed to be a mix of SFGs and AGNs based on the flux density ratio of classified sources, and (2) the unclassified sources are regarded as SFGs. The source counts for the two cases are presented in Table 1 (for the COSMOS field) and Table 2 (for the XMM-LSS field) presented by these latter authors, respectively. In this work, we use the first case, where the unclassified or unmatched sources are assumed to have the same split between SFGs and AGN as the classified sources at the given flux density. The source counts are shown in the SCSFG, ratio column in Table 1 and Table 2 of Hale et al. (2023). For the convenience of calculation, the above source counts are unified to 1.4 GHz by assuming a spectral index of 0.7. 3.3. Models for the luminosity function of star-forming galaxies Without loss of generality, the SFG LF can be written as \u03a6(z, L) = e1(z)\u03d5(z = 0, L/e2(z), \u03b7j), (9) where e1(z) and e2(z) denote the density evolution (DE) and luminosity evolution (LE) functions of redshift, respectively, and \u03b7 j represents the parameters that determine the shape of the LF. If the values of \u03b7 j are constant, this indicates that the shape of the radio LF is unchanged with redshift. Conversely, if \u03b7j exhibits a redshift dependence, this implies luminosity-dependent density evolution (see Singal et al. 2013, 2014, for a more detailed discussion). We assume the shape of the LF to remain unchanged (i.e., \u03b7 j is constant) as in many other studies (e.g., Novak et al. 2017; van der Vlugt et al. 2022). Following previous work (e.g., Smol\u02c7 ci\u00b4 c et al. 2009; Gruppioni et al. 2013; van der Vlugt et al. 2022), the SFG local LF \u03d5(z = 0, L/e2(z = 0)) is described by a modified-Schechter function from Saunders et al. (1990): \u03d5(z = 0, L/e2(z = 0)) = dN d log10 L = \u03d5\u22c6 L L\u22c6 !1\u2212\u03b2 exp \" \u22121 2\u03b3 2 log2 1 + L L\u22c6 !# , (10) where L\u22c6determines the location of the knee in the LF, \u03b2 and \u03b3 fit the faint and bright ends of the LF, respectively, and \u03a6\u22c6is used for the normalization. In this work, we consider three LF models, all of which adopt the same LE function: e2(z) = (1 + z)k1+k2z. (11) The DE function e1(z) has three different forms depending on the model: e1(z) = 1 for model A, an exponential form e1(z) = 10p1z, (12) for model B, and e1(z) = (1 + z)p1+p2z, (13) for model C. In the above equations, k1, k2, p1, and p2 are free parameters. Model A is the pure luminosity evolution (PLE) model, which is the most commonly used model for the radio LFs of SFGs in the literature (e.g., Novak et al. 2017). Models B and C can be referred to as the mixture evolution (e.g., Yuan et al. 2016, 2017) or luminosity and density evolution (LADE, e.g., Aird et al. 2010) models. 3.4. Model selection In order to evaluate which model is a better fit to the data, a helpful tool is the information criterion(Takeuchi 2000). The Akaike Information Criterion (AIC; Akaike 1974) is one of the most widely used information criterion. For our problem, the AIC can be written as: AIC = S all(\u02c6 \u03b8) + 2q, (14) Article number, page 4 of 14 Wang et al.: New Constraints on the Cosmic Star Formation History where S all is given in Equation (7), \u02c6 \u03b8 is the best-fit model parameters, and q is the number of parameters for each model. The model with the smallest value of AIC is considered to be the most accurate. Another commonly used criterion is the Bayesian information criterion (BIC, Schwarz 1978), which can be written as BIC(q) = S all(\u02c6 \u03b8) + qln n, (15) where n is the sample size. When calculating the S all values for our three models, the weight factor A0 in Equation (7) is set to 1. The AIC and BIC values are listed in Table 2. We find that the AIC and BIC are consistent with each other, both indicating that the LADE model is superior to the PLE model. The AIC value of Model B is slightly smaller than that of Model C, implying that Model B could be taken as our preferred model. 4. Results 4.1. Analytical LFs The parameters in our model LFs are estimated via the MCMC algorithm, which is performed using the Python package emcee of Foreman-Mackey et al. (2013). The emcee algorithm improves the exploration of the parameter space by using an ensemble of chains with different initial conditions. This approach helps to avoid local minima and ensures a more comprehensive exploration of the parameter space. We assume uniform priors on all the parameters. The marginalized oneand two-dimensional posterior probability distributions of the parameters for Models A, B, and C are shown in Figures 3, 4, and 5, respectively. These corner plots illustrate that all the parameters for our three models are well constrained. Table 1 reports the best-fit parameters and their 1\u03c3 uncertainties for the three models. Figure 6 shows our best-fit LFs for Models A (solid blue lines) , B (solid orange lines), and C (solid green lines). All the LFs are measured at the rest-frame 1.4 GHz. We also compare our result with the binned LFs from Gruppioni et al. (2013), Novak et al. (2017), and van der Vlugt et al. (2022), which are represented by orange left-pointing triangles, dark blue circles, and sky blue squares with error bars, respectively. At lower redshifts of z < 1.0, our three models are barely distinguishable. As redshift increases, Model A begins to diverge, predicting larger number densities at L < L\u22c6than models B and C. This deviation increases towards higher redshifts, and the disagreement is in excess of the 3\u03c3 confidence intervals at z >\u223c1. We also note that, at z >\u223c2, the binned LFs of van der Vlugt et al. (2022) present a decline in number density at the faint end, while model A cannot reproduce the behavior. This indicates that model A is not applicable to describe the evolution of LFs at higher redshift. By contrast, Models B and C are in good agreement with the binned LFs for all redshift intervals. In Figure 6, the purple dotted lines depict the PLE model of Novak et al. (2017), which is generally in agreement with our Model A. Nevertheless, the difference between the two results increases with redshift. This is not surprising given that the PLE model of Novak et al. (2017) is constrained through simultaneously fitting the LF points in all redshift bins, while these LF points are estimated using the traditional 1/Vmax method. Although their modeling result would be dependent on the estimation accuracy of 1/Vmax. Our analytical LFs are obtained through a full maximum-likelihood analysis, and are therefore independent of the 1/Vmax estimates. 4.2. Fitting the observed source counts We calculate the source counts for each of our three model LFs using Equation(8). The result is shown in Figure 7 as blue dashdotted line, orange dashed line, and green dotted line for models A, B, and C, respectively. In the Figure, we compare our models with the Euclidean normalized 1.4 GHz source counts for SFGs measured from Hale et al. (2023), Smol\u02c7 ci\u00b4 c et al. (2017a), and Algera et al. (2020a). All our three models can reproduce the Algera et al. (2020a) and Hale et al. (2023) source counts fairly well, but the Smol\u02c7 ci\u00b4 c et al. (2017a) result is systematically lower than the others. The discrepancies could be caused by multiple factors, such as field-to-field variation, differences in the assumptions used to calculate completeness, and resolution bias (see Hale et al. 2023). We note that, at the bright region (F\u03bd > 1 mJy), the measurements of Hale et al. (2023) display huge uncertainties. This is due to the contamination of AGNs at these fluxes, preventing an easy classification between SFGs and AGNs. 4.3. LADE versus PLE Due to the limitation of survey depth, most of the existing radio studies barely reach the knee of the SFG LF at z > 1. If fitting the LF using a LADE model, the DE and LE parameters may become degenerate (also see van der Vlugt et al. 2022). On several occasions, this has led previous authors to assume a PLE model for their SFG LFs. By combining data from the ultradeep COSMOS-XS survey and the shallower VLA-COSMOS 3 GHz large project, van der Vlugt et al. (2022) was able to jointly constrain the LE and DE, finding evidence for significant DE. From Figure 6, we also find that the LADE model is superior to the PLE model. Very recently, Cochrane et al. (2023) measured the 150 MHz LFs of SFGs using data from the Low Frequency Array (LOFAR) Two Metre Sky Survey in three well-studied extragalactic fields, Elais-N1, Bo\u00a8 otes, and the Lockman Hole. By fixing the faint and bright end shape of the radio LF to the local values (equivalent to fixing \u03b3 = 0.49 and \u03b2 = 1.12 in Equation 10), these latter authors fitted the LF points (via 1/Vmax) to find the best-fit L\u22c6and \u03d5\u22c6at each individual redshift bin. Their Figure 7 shows the variation of L\u22c6and \u03d5\u22c6as functions of redshift. The method of Cochrane et al. (2023) is equivalent to assuming a LADE model for their LFs. The variation of L\u22c6and \u03d5\u22c6as functions of redshift in their analysis correspond to L\u22c6\u00d7 e2(z) and \u03d5\u22c6\u00d7 e1(z) in our work. In Figure 8, we show L\u22c6\u00d7 e2(z) and \u03d5\u22c6\u00d7 e1(z) for our three LF models compared with the inference from Cochrane et al. (2023). We converted our L\u22c6to 150 MHz by assuming a spectral index of 0.7. Below z < 1.5, our two LADE models \u2014especially Model C\u2014 agree well with the L\u22c6and \u03d5\u22c6evolutions given by Cochrane et al. (2023). Above z > 1.5, the L\u22c6evolution curve obtain by these authors is significantly higher than those of our models (outside the 3\u03c3 uncertainties), while their \u03d5\u22c6evolution falls more rapidly than those of our models out to high redshift. The discrepancies could be explained as follows: At any redshift bin, the best-fit L\u22c6and \u03d5\u22c6are negatively correlated with each other (e.g., see the right panel of Figure 4 in Cochrane et al. (2023)), implying that the LE and DE parameters are degenerate. The degeneracy should be stronger at higher redshift where the knee location of LFs is increasingly difficult to identify. We highlight the fact that Cochrane et al. (2023) fitted the LF points (via 1/Vmax) for each redshift bin individually. At higher redshift, the LF points estimated by 1/Vmax usually have larger unArticle number, page 5 of 14 A&A proofs: manuscript no. 47746corr Fig. 3: Corner plot showing the oneand two-dimensional projections of the posterior probability distributions of the parameters for Model A obtained from the MCMC run. The histograms on the diagonal show the marginalized posterior densities for each parameter (vertical dashed lines denote the 16th and 84th percentiles). The off-diagonal panels show the 2D joint posterior densities of all couples of parameters, with 1\u03c3, 2\u03c3, and 3\u03c3 contours shown by black solid lines. Our best-fitting parameters are marked by red vertical solid lines. certainty. Fitting these discrete LF points to find a precise knee location would be very difficult. This will inevitably bias the inferred L\u22c6and \u03d5\u22c6values. Therefore, their L\u22c6and \u03d5\u22c6evolutions for high redshift are subject to uncertainties due to dual factors. Our LADE modeling is also subject to the uncertainty due to degeneracy, but is free from the 1/Vmax estimates. Cochrane et al. (2023) found that their \u03d5\u22c6remains roughly constant back to z \u223c0.8 but then falls steeply at higher redshifts. Our Model C displays a similar trend. A comparison between the inference of Cochrane et al. (2023) and our models lends strong support to the efficacy of our LADE models. 5. History of the cosmic star formation rate density 5.1. Calculating the SFRD Now that we have obtained the rest-frame 1.4 GHz LF, we can investigate how the SFRD evolves with redshift. We use the Article number, page 6 of 14 Wang et al.: New Constraints on the Cosmic Star Formation History Fig. 4: Similar to Figure 3, but for Model B. Table 1: Best-fit parameters for models A, B, and C Model log10(\u03d5\u22c6) log10(L\u22c6) \u03b2 \u03b3 k1 k2 p1 p2 A \u22122.576+0.022 \u22120.023 21.232+0.040 \u22120.041 1.306+0.021 \u22120.021 0.611+0.007 \u22120.007 4.271+0.028 \u22120.027 \u22120.548+0.010 \u22120.010 . . . . . . B \u22122.554+0.019 \u22120.019 21.284+0.031 \u22120.031 1.296+0.020 \u22120.020 0.556+0.005 \u22120.005 4.662+0.027 \u22120.026 \u22120.473+0.011 \u22120.011 \u22120.188+0.008 \u22120.008 . . . C \u22122.546+0.019 \u22120.019 21.248+0.032 \u22120.032 1.296+0.020 \u22120.021 0.562+0.005 \u22120.005 4.534+0.030 \u22120.028 \u22120.366+0.017 \u22120.016 \u22120.069+0.016 \u22120.033 \u22120.397+0.022 \u22120.019 Note. Units \u2014 \u03d5\u22c6: [Mpc\u22123dex\u22121], L\u22c6: [WHz\u22121]. The best-fit parameters as well as their 1\u03c3 errors for models A, B and C. Article number, page 7 of 14 A&A proofs: manuscript no. 47746corr Fig. 5: Similar to Figure 3, but for Model C. Table 2: Values of AIC and BIC for models A, B, and C Model AIC BIC A 115258.9 115298.9 B 114459.7 114506.5 C 114560.5 114613.9 functional form provided in Delvecchio et al. (2021) to convert the radio luminosity into an SFR: SFR M\u2299yr\u22121 = fIMF \u00d7 10\u22122410qIR(z) L1.4GHz WHz\u22121 , (16) where fIMF is a factor accounting for the IMF (fIMF = 1 for a Chabrier (2003) IMF and fIMF = 1.7 for a Salpeter (1955) IMF), and L1.4GHz is rest-frame 1.4 GHz radio luminosity. Following Novak et al. (2017), we use the Chabrier IMF in the following analysis. In Equation (16), qIR(z) is the FIR-to-radio luminosity ratio, which is conventionally used to parametrize the FIR\u2013radio Article number, page 8 of 14 Wang et al.: New Constraints on the Cosmic Star Formation History 21 22 23 24 25 26 \u22127 \u22126 \u22125 \u22124 \u22123 \u22122 \u22121 21 22 23 24 25 26 21 22 23 24 25 26 21 22 23 24 25 26 \u22127 \u22126 \u22125 \u22124 \u22123 \u22122 \u22121 21 22 23 24 25 26 21 22 23 24 25 26 21 22 23 24 25 26 \u22127 \u22126 \u22125 \u22124 \u22123 \u22122 \u22121 21 22 23 24 25 26 21 22 23 24 25 26 21 22 23 24 25 26 \u22127 \u22126 \u22125 \u22124 \u22123 \u22122 \u22121 21 22 23 24 25 26 log10(L1.4GHz [W Hz\u22121]) log10(\u03c6(z, L) [Mpc\u22123 \u2206L\u22121]) 0.1 < z < 0.4 zMED = 0.31 0.4 < z < 0.6 zMED = 0.50 0.6 < z < 0.8 zMED = 0.69 0.8 < z < 1.0 zMED = 0.90 1.0 < z < 1.3 zMED = 1.16 1.3 < z < 1.6 zMED = 1.44 1.6 < z < 2.0 zMED = 1.81 2.0 < z < 2.5 zMED = 2.18 2.5 < z < 3.3 zMED = 2.81 3.3 < z < 4.6 zMED = 3.71 4.6 < z < 5.7 zMED = 4.83 This paper: Model A This paper: Model B This paper: Model C This paper: Model C 3\u03c3 This paper: \u03c6KDE This paper: \u03c6KDE 3\u03c3 Novak +2017: pure L evolution Novak +2017 Van der Vlugt +2022 Gruppioni +2013 Fig. 6: Radio LFs of SFGs at various redshifts compared with the previous estimates specified in the inset. The best-fit LFs for Models A, B, and C in each redshift bin are shown by the blue, orange, and green solid lines, respectively. The light green shaded area shows the 3\u03c3 confidence interval for Model C. The red dashed curves represent the KDE LFs (see Appendix A), with the 3\u03c3 confidence interval shown by the pink shaded area. The purple dash-dotted line depicts the PLE model of Novak et al. (2017). We also compare with the binned LFs from Gruppioni et al. (2013), Novak et al. (2017), and van der Vlugt et al. (2022). Article number, page 9 of 14 A&A proofs: manuscript no. 47746corr 10\u22122 10\u22121 100 101 F\u03bd(mJy) 10\u22122 10\u22121 100 101 F 5/2 \u03bd n(F\u03bd)[ Jy3/2sr\u22121 ] This paper: Model A This paper: Model B This paper: Model C This paper: Model C 3 \u03c3 Smolcic +2017 Algera +2020 Hale +2023 COSMOS Hale +2023 XMM-LSS Fig. 7: Comparison of our best-fit models with the Euclidean normalized 1.4 GHz source counts for SFGs observed in the literature. The blue dash-dotted line, orange dashed line, and green dotted line show our best-fit source counts of Models A, B, and C, respectively. The source counts from Hale et al. (2023) in the COSMOS and XMM-LSS fields are shown as purple right triangles and light blue pentagons, respectively. Also shown are the observed source counts from Smol\u02c7 ci\u00b4 c et al. (2017a) (green squares), Algera et al. (2020a) (orange circles). correlation in SFGs, and is defined as qIR = log LIR [W] 3.75 \u00d7 1012 [Hz] ! \u2212log(L1.4GHz[W Hz\u22121]), where LIR is the total IR luminosity (rest-frame 8-1000 \u00b5m), and 3.75 \u00d7 1012Hz represents the central frequency over the farinfrared domain. Although qIR is typically taken to be a constant value derived for local galaxies, recent observations suggest that the qIR value probably changes with redshift (e.g., Sargent et al. 2010; Magnelli et al. 2015; Delhaize et al. 2017; Calistro Rivera et al. 2017). Recently, for the first time, Delvecchio et al. (2021) calibrated qIR as a function of both stellar mass (M\u22c6) and redshift. These latter authors found that qIR primarily evolves with M\u22c6, and only weakly with redshift. This finding implies that using radio emission as an SFR tracer requires M\u22c6-dependent conversion factors, but its robustness still needs to be verified with further study. In this work, we use the expression given by Novak et al. (2017): qIR(z) = (2.78 \u00b1 0.02) \u00d7 (1 + z)\u22120.14\u00b10.01, (17) which is the updated version of the analysis of Delhaize et al. (2017), using a new sample selection criteria to exclude AGN. The SFRD of a given epoch can then be estimated by the following integral: SFRD = Z Lmax Lmin \u03a6(L, z) \u00d7 SFR(L1.4 GHz) d log10 L . (18) To obtain the SFRD for a given epoch, we performed a numerical integration of the analytical form of the LF in each redshift bin, employing the best-fit evolution parameters presented in Table 1 and Figure 6. The resulting integral provides an estimate of the SFRD. Unless otherwise specified, our reported SFRD values correspond to the integral of the fitted LF from 0.0 to \u2192\u221e. In Figure 9(a), our SFRD history results are shown as blue, orange, and green solid lines for Models A, B, and C, respectively. The light shaded areas take into account the 3\u03c3 error bands. Our three models coincide at lower redshift of z < 1. Model A gradually separates from the other two models towards higher redshift. Models B and C start to diverge at z >\u223c2, but the difference is within the 3\u03c3 confidence intervals. 5.2. Comparison with the literature In Figure 9, we show the SFRD history derived from our three models compared with those in the literature derived at different wavelengths. The SFRD from the review by Madau & Dickinson (2014), who performed a fit on a collection of previously published UV and IR data, is shown as the black dashed curve in all panels for ease of comparison. From Figure 9(a), we find that below z \u223c1.5, the rate at which the SFRD increases with redshift in our three models shows striking similarity to the trend observed by Madau & Dickinson (2014), although their SFRD is slightly higher. The discrepancy in magnitude is probably due to the assumed FIR\u2013radio relation in our result, which calibrates radio emission as a tracer of SFR. Above z \u223c1.5, our PLE model predicts a significantly higher SFRD, while the SFRD given by our LADE models is lower than that of Madau & Dickinson (2014). The SFRD derived from all our three models turns over at a slightly higher redshift (2 < z < 2.5) and falls more rapidly than that of Madau & Dickinson (2014) out to high redshift. A similar behavior was observed in recent radio estimates by van der Vlugt et al. (2022). In Figure 9(a), we also show our Model A SFRD compared to the radio estimates from Smol\u02c7 ci\u00b4 c et al. (2009) and Novak et al. (2017). Smol\u02c7 ci\u00b4 c et al. (2009) derived the SFRD out to z = 1.3 by assuming a PLE LF and a nonevolving FIR\u2013radio correlation established by Bell (2003). We find an agreement with the Smol\u02c7 ci\u00b4 c et al. (2009) estimates within the permissible error ranges, and therefore their result provides a good consistency check for our models at low redshift. The result of Novak et al. (2017), who also assumed a PLE LF, is the key comparative object for our model A, because our analysis is based on the sample studied by these latter authors. Overall, the curve of our Model A SFRD seems to be a good fit to their SFRD points. Nevertheless, there are two points at z < 2 and one point at z > 2 that seem to disagree with our Model A at the 3\u03c3 level. Because we use the same qIR(z) evolution to calculate the SFRD as Novak et al. (2017) did, any discrepancy between the two results can only arise from the difference in LF (see Figure 6). As discussed in section 4.1, the analytical LFs of Novak et al. (2017) are obtained by fitting the 1/Vmax LF points in all redshift bins, while our LFs are obtained through a full maximum-likelihood analysis, incorporating additional constraints from source counts and local LFs. Therefore, our LFs should be more accurate than that of Novak et al. (2017), making our SFRD an improvement on their estimates. In Figure 9(b), we show the SFRD derived from our Models B and C compared to the radio estimates from van der Vlugt et al. (2022). These latter authors also assumed a LADE LF \u2014similar to our Models B and C\u2014 to calculate their SFRD based on the combined data set from the ultradeep COSMOS-XS survey and the VLA-COSMOS 3 GHz large project. Although adopting a different qIR(z) evolution from that used here, their result is in good agreement with those of our Models B and C \u2014especially our Model C\u2014 within the error bars. We note that three points of the estimates of van der Vlugt et al. (2022) show a slightly elevated SFRD compared to our model prediction. The discrepancies could be attributed to the different qIR(z) evolution used Article number, page 10 of 14 Wang et al.: New Constraints on the Cosmic Star Formation History 0 1 2 3 4 5 6 7 8 z 21 22 23 24 log10(L\u22c6\u00d7 e2(z)) This paper: Model A This paper: Model A 3\u03c3 This paper: Model B This paper: Model B 3\u03c3 This paper: Model C This paper: Model C 3\u03c3 Cochrane +2023 0 1 2 3 4 5 6 7 8 z \u22125 \u22124 \u22123 \u22122 log10(\u03c6\u22c6\u00d7 e1(z)) This paper: Model A This paper: Model A 3\u03c3 This paper: Model B This paper: Model B 3\u03c3 This paper: Model C This paper: Model C 3\u03c3 Cochrane +2023 Fig. 8: L\u22c6\u00d7 e2(z) (left panel) and \u03d5\u22c6\u00d7 e1(z) (right panel) for our three LF models shown in different colours, compared with the inference (in all fields) from Cochrane et al. (2023). The light shaded areas take into account the 3\u03c3 error bands. Our L\u22c6and \u03d5\u22c6 have been converted to 150 MHz by assuming a spectral index of 0.7. The purple circles represent the variation of L\u22c6(left panel) and \u03d5\u22c6(right panel) as functions of redshift inferred by Cochrane et al. (2023). by these authors, or the uncertainties in their LF measurement propagated from the 1/Vmax estimator. Similar to Novak et al. (2017), van der Vlugt et al. (2022) also obtained their analytical LFs by fitting the 1/Vmax LF points in all redshift bins. Figure 9(c) shows the SFRD derived from our Model B compared to the radio estimates from Karim et al. (2011) and Cochrane et al. (2023). Our estimates are slightly lower than that of Karim et al. (2011), with the difference increasing with redshift. The discrepancies could be attributed to the different approaches taken; these latter authors performed stacking on massselected galaxies and used a nonevolving FIR\u2013radio correlation established by Bell (2003). The measurements of Cochrane et al. (2023) are systematically higher than ours. We find that a vertical shift of our Model B SFRD curve will match the Cochrane et al. (2023) data points over the whole redshift range. This is equivalent to multiplying our SFRD by \u223c1.5, shown as the orange dashed curve. Different from the qIR(z)-based Lradio \u2212SFR calibration used in the present work, Cochrane et al. (2023) used the calibrated relation between 150 MHz radio luminosity and SFR from Smith et al. (2021), and also constrained and corrected the scatter in the L150 MHz \u2212SFR relation. This may explain the discrepancy between their measurements and ours. As noted by Leslie et al. (2020), the impact of different Lradio \u2212SFR calibrations is significant. 5.3. Density evolution is indispensable According to Yuan et al. (2016), the evolution of a LF may be regarded as a vector E, and can be written as E = e1Ed + e2El, (19) where Ed and El are the base vectors of DE and LE, respectively; and e1 and e2 are DE and LE functions as mentioned in Equation (9). DE carries a physical meaning, and can tell us whether the sources are more or less numerous than those of today, while the LE can tell us whether the sources are systematically more or less luminous than those of today. In all three of our models, the LE function has a peak, indicating that SFGs are, on average, most luminous in radio at z\u223c3 \u22124. The DE function, according to our LADE models, monotonically decreases with redshift, implying that, in the radio view, SFGs are less numerous in earlier epochs. From Equation (18), we speculate that the shape of the SFRD curve is jointly determined by the form of DE and LE. Comparing Figures 8 and 9, we note that below z\u223c2, for all three of our models, the effect of positive LE is dominant over the DE. Therefore, the SFRD curves display a monotonically increasing trend. Above z\u223c2, the LE gradually begins to turn over, and the effect of DE begins to show up. As Model C has the strongest negative DE, its SFRD falls more rapidly out to high redshift than Models B and A. One of the main findings of this work is that a DE is genuinely indispensable in modeling the evolution of SFG radio LFs. This finding is further confirmed by the picture that, the assumption of pure LE seems to over-predict the SFRD at high z, while the inclusion of DE corrects for this. 5.4. The effect of IR\u2013radio correlation As shown in Equation (18), the calculation of SFRD relies on two components: the LF and the derived SFR. Although our LF has been well constrained (see Section 4), the calibration of SFR using different scaling factors may also affect the final result. In this section, we show that the SFRD derived from our model B LF can change depending on the choice of qIR(z). The first qIR(z) we tested is that from Bell (2003), where a constant qIR value of 2.64 was assumed. In Figure 9 (d), the derived SFRD is shown as the gray solid curve. The model seems to significantly overpredict the SFRD above z\u223c1.5. The second qIR(z) tested is that from Magnelli et al. (2015), where qFIR(z) = 2.35 \u00d7 (1 + z)\u22120.12; this relation can be scaled as log(LFIR) = log(LIR) \u2212log(2) to obtain the qIR(z). The SFRD based on this qIR(z) is presented in the same panel as the gray dashed line, which is generally consistent with our result. Finally, we considered qIR(z) = 2.20 from Algera et al. (2020b). The resultant SFRD is shown as the gray dash-dotted line, and is consistent with our result at z > 3.5, but is significantly lower at z < 3.5. In conclusion, we show that the assumed IR\u2013radio correlation has a significant impact on the derived SFRD and is crucial to accurately constrain the qIR value at all observed redshifts (also see Novak et al. 2017). Article number, page 11 of 14 A&A proofs: manuscript no. 47746corr 0 1 2 3 4 5 6 z 10\u22122 10\u22121 SFRD [ M\u2299yr\u22121 Mpc\u22123 ] (a) This paper: Model A This paper: Model A 3\u03c3 This paper: Model B This paper: Model B 3\u03c3 This paper: Model C This paper: Model C 3\u03c3 Madau & Dickinson+2014 Smolcic+09 (Sadler+02) Novak+17: Pure L evolution 0 1 2 3 4 5 6 z 10\u22122 10\u22121 SFRD [ M\u2299yr\u22121 Mpc\u22123 ] (b) This paper: Model B This paper: Model B 3\u03c3 This paper: Model C This paper: Model C 3\u03c3 Madau & Dickinson+2014 Van der Vlugt+2022: \u03a6 and L evolution 0 1 2 3 4 5 6 z 10\u22122 10\u22121 SFRD [ M\u2299yr\u22121 Mpc\u22123 ] (c) This paper: Model B This paper: Model B\u00d71.5 This paper: Model B 3\u03c3 This paper: Model C This paper: Model C\u00d71.5 This paper: Model C 3\u03c3 Madau & Dickinson+2014 Karim+2011 Cochrane+2023 0 1 2 3 4 5 6 z 10\u22122 10\u22121 SFRD [ M\u2299yr\u22121 Mpc\u22123 ] (d) Madau & Dickinson+2014 This paper: Model B (q = 2.78 \u00d7 (1 + z)\u22120.14) This paper: Model B 3\u03c3 Bell+2003 (q = 2.64) Magnelli+2015 (q = 2.35 \u00d7 (1 + z)\u22120.12) Algera+2020 (q = 2.20) Fig. 9: History of the cosmic SFRD. Our SFRD history results are shown as blue, orange, and green solid lines for Models A, B, and C, respectively. The light shaded areas take into account the 3\u03c3 error bands. The compilation of Madau & Dickinson (2014) is shown as a black dashed line in all panels. All data shown for comparison are indicated in the legend of each panel; see text for details. 6. Summary and Conclusions In this work, we make use of a star-forming galaxy (SFG) sample (5900 sources) from the VLA-COSMOS 3 GHz data (Smol\u02c7 ci\u00b4 c et al. 2017a) to measure the radio luminosity functions (LFs). For the first time, we use both models of pure luminosity evolution (PLE) and joint luminosity+density evolution (LADE) to fit the LFs directly to the radio data using a full maximum-likelihood analysis. We fully considered the effect of completeness correction for the sample. We also incorporate the updated observations on local radio LFs and source counts into the fitting process to obtain additional constraints. The parameters of fitting are determined through the Bayesian Markov Chain Monte Carlo (MCMC) approach. In addition, to provide an alternative nonparametric LF estimate for SFGs, we applied the kernel density estimation (KDE) method described in our previous work (Yuan et al. 2020, 2022). Based on these radio LFs, we derived the dustunbiased star formation rate density (SFRD) up to a redshift of z \u223c5. The main results of our work are as follows. 1. Our radio LFs are fitted using three models, assuming a modified-Schechter function with PLE (Model A) and LADE (Models B and C), respectively. Below z < 2, the PLE model can fit the radio LFs well, while at higher redshift it gradually deviates from the observations, indicating that PLE is not applicable to describe the evolution at higher redshift. Our LADE models can successfully fit these observed radio LFs from previous studies (Gruppioni et al. 2013; Novak et al. 2017; van der Vlugt et al. 2022) over the whole redshift range, and well reproduce the latest radio source counts from Algera et al. (2020a) and Hale et al. (2023). The Akaike information criterion (AIC) also demonstrates that the LADE model is superior to the PLE model. 2. We find that the luminosity and density evolutions of our LADE models are broadly consistent with the L\u22c6and \u03d5\u22c6 evolutions inferred by Cochrane et al. (2023) within the uncertainty due to degeneracy of LE and DE parameters. As the inference of Cochrane et al. (2023) is model independent, the fact that their results are consistent with ours lends strong support to the efficacy of our LADE models, and we Article number, page 12 of 14 Wang et al.: New Constraints on the Cosmic Star Formation History conclude that density evolution is genuinely indispensable in modeling the evolution of SFG radio LFs. 3. The SFRD curves derived from our PLE and LADE models show a good fit to the SFRD points derived by Novak et al. (2017) and van der Vlugt et al. (2022), respectively. Both their analytical LFs were obtained by fitting the 1/Vmax LF points in all redshift bins, and possibly suffer from bias in the 1/Vmax estimate itself. Our analytical LFs are independent of the 1/Vmax estimates and should be more accurate, which would make our SFRD results an improvement on these previous estimates. 4. Below z \u223c1.5, the SFRD from both our PLE and LADE models is a good match to the multiwavelength compilation from Madau & Dickinson (2014), if considering the calibration uncertainty of the FIR\u2013radio relation. Their SFRD curve shows a very similar gradient to ours. This provides a good consistency check for radio emission as a tracer of SFR at low redshift. Comparing with Madau & Dickinson (2014), the SFRD predicted by our three models turns over at a slightly higher redshift (2 < z < 2.5) and falls more rapidly out to high redshift. This was also observed for recent radio estimates by van der Vlugt et al. (2022). 5. The very recent measurements from Cochrane et al. (2023) are systematically higher than ours (by up to 0.4 dex). This discrepancy could be due to the different Lradio \u2212SFR calibration and its scatter correction in the work of these latter authors. From the comparison with Cochrane et al. (2023), we highlight that the Lradio \u2212SFR calibration and its scatter, or choice of qIR and its evolution, has a significant impact and remains one of the biggest uncertainties in the radio estimates of SFRD. Acknowledgements. We thank the anonymous reviewer for the many constructive comments and suggestions, leading to a clearer description of these results. This work is supported by the National Key R&D Program of China (2023YFE0101200). We acknowledge the financial support from the National Natural Science Foundation of China (grants No. 12073069, No. 12075084, and No.12393813). Z.Y. is supported by the Xiaoxiang Scholars Programme of Hunan Normal University. J.M is supported by the China Manned Space Project (CMS-CSST2021-A06), and the Yunnan Revitalization Talent Support Program (YunLing Scholar project). We would like to thank Yaqian Yu and Yang Liu for helpful discussions.", "introduction": "Understanding the formation and evolution of galaxies through cosmic time is a major quest of modern cosmology. One of the most fundamental processes driving the evolution of galaxies is star formation. Star formation rate density (SFRD), defined as the amount of stars formed per year in a unit of cosmological volume, is therefore a critical parameter for galaxies (e.g., Lara- L\u00f3pez et al. 2010). In recent decades, a lot of research based on multiwavelength aspects has been devoted to the accurate measurement of the cosmic evolution of the SFRD. Remark- able progress has been made, and the SFRD is now well un- derstood up to z \u223c3, when the Universe was no more than 3 Gyr old (see Madau & Dickinson 2014, for an exhaustive re- view). A consensus has been reached regarding recent history, where the SFRD increases significantly with redshift, reaching a peak at redshift z \u223c2, an epoch known as \u201ccosmic noon\u201d (e.g., Novak et al. 2017; van der Vlugt et al. 2022; Enia et al. 2022). \u22c6Corresponding author e-mail: yzl@hunnu.edu.cn \u22c6\u22c6Corresponding author e-mail: hwyu@hunnu.edu.cn The picture becomes less clear at higher redshifts. Some studies (mainly based on UV-selected sources) show a steep decline in the SFRD (Bouwens et al. 2015; McLeod et al. 2016; Ishigaki et al. 2018), while studies performed at radio or submillimeter wavelengths show a flatter SFRD at z > 3 (Gruppioni et al. 2013; Rowan-Robinson et al. 2016; Novak et al. 2017; Gruppioni et al. 2020). Such uncertainty in the evolution of the SFRD at early cosmic epochs hinders our understanding of the core mechanism that governs the star formation rate (SFR) histories of individual galaxies. The SFR of galaxies can be traced at multiple wavebands, each tracer having its own advantages and disadvantages (Ken- nicutt Jr 1998). In dust-free environments, ultraviolet (UV) light originating primarily from young massive stars serves as the most direct tracer of SFR. UV light can be used to constrain the unobscured star formation out to very high redshifts (e.g., McLure et al. 2013; Bowler et al. 2015; Finkelstein et al. 2015; McLeod et al. 2015; Parsa et al. 2016; Oesch et al. 2018; Ono et al. 2018; Adams et al. 2020; Bowler et al. 2020; Bouwens et al. 2021). However, UV observations suffer from dust absorption, Article number, page 1 of 14 arXiv:2311.08975v2 [astro-ph.GA] 22 Jan 2024 A&A proofs: manuscript no. 47746corr which means the SFR measurements made at these wavelengths are underestimated (e.g., Smail et al. 1997; Bouwens et al. 2009; Riechers et al. 2013; Dudzevi\u02c7 ci\u00af ut\u02d9 e et al. 2020). When the dust absorbs UV radiation, it gets heated and reradiates the energy at far-infrared (FIR) wavelengths. Therefore, FIR emission is ideal for tracing SFR in dust-rich environments (see Kennicutt Jr 1998). Unfortunately, FIR observations can suffer from poor res- olution and source blending. Deep radio continuum observations are now believed to be very promising tracers; they offer a unique possibility to trace the total SFR in galaxies, both obscured and unobscured. As such, they may provide the most robust measurement of the star-formation history of the Universe (Jarvis et al. 2015). Radio continuum emission, which is not affected by dust obscuration, is also an end product of the formation of massive stars (e.g., van der Vlugt et al. 2022). After these short-lived (\u03c4 \u2a7d3 \u00d7 107 yr, Matthews et al. 2021a) stars undergo supernova explosions, the expanding remnants can accelerate the cosmic ray electrons and give rise to synchrotron radiation at a typical frequency of < 30 GHz (e.g., Sadler et al. 1989; Condon 1992; Clemens et al. 2008; Tabatabaei et al. 2017). Radio emission triggered by the above process is empirically found to correlate well with the FIR emission of star-forming galaxies (SFGs), known as the FIR\u2013 radio correlation. This correlation holds over five orders of mag- nitude in luminosity and extends to high redshifts (Helou et al. 1985; Yun et al. 2001; Bell 2003), although the redshift evolution is controversial (Jarvis et al. 2010; Sargent et al. 2010; Magnelli et al. 2015; Calistro Rivera et al. 2017; Delhaize et al. 2017). The FIR\u2013radio correlation can be used to calibrate radio luminosity as a tracer of SFR (Condon 1992). In the past several years, deep radio surveys reaching submilli-Jansky(mJy) detection limits have emerged as a power- ful tool to investigate the cosmic evolution of SFGs (e.g., van der Vlugt et al. 2022; Enia et al. 2022; Malefahlo et al. 2022; Bonato et al. 2021a,b; Ocran et al. 2020b; Upjohn et al. 2019; Ceraj et al. 2018; Bonato et al. 2017; Novak et al. 2017; Smol\u02c7 ci\u00b4 c et al. 2009). These studies generally measured the radio luminosity functions (LFs) of SFGs; the SFRD can then be estimated by taking the luminosity weighted integral of the radio LF (e.g., van der Vlugt et al. 2022). As for the form of radio LFs, most of them assumed pure luminosity evolution (PLE; e.g., Smol\u02c7 ci\u00b4 c et al. 2009; No- vak et al. 2017; Ocran et al. 2020b; Malefahlo et al. 2022). Very recently, van der Vlugt et al. (2022) combined the COSMOS-XS survey and Very Large Array (VLA)-COSMOS 3 GHz data sets to constrain a radio LF with both luminosity and density evolu- tion. The analytical LFs from these studies are obtained through fitting the LF points given by the Schmidt (1968) 1/Vmax esti- mator. This semi-parametric method has also been adopted by almost all the existing studies (e.g., Smol\u02c7 ci\u00b4 c et al. 2009; Novak et al. 2017; Cochrane et al. 2023). However, given the ordinary precision in the 1/Vmax estimate, the LF points themselves have errors, and fitting to them will propagate the uncertainties to the analytical LFs. In addition, the result would be dependent on the choice of binning in the 1/Vmax method (see Fan et al. 2001). We believe that a more reliable approach to obtain the analytical LFs is to use a full maximum-likelihood analysis (e.g., Willott et al. 2001). In the present paper, we make use of the VLA-COSMOS 3 GHz data (Smol\u02c7 ci\u00b4 c et al. 2017a) to measure the radio LFs of SFGs. We use both models of PLE and joint density+luminosity evolution to fit the SFG LFs directly to the radio data using a full maximum-likelihood analysis. We aim to perform a com- prehensive parametric study of the radio LF of SFGs by means 0 1 2 3 4 5 6 z 21 22 23 24 25 26 log10(L1.4GHz[W/Hz\u22121]) SFG data Flux limit 0 100 200 300 400 500 Count SFG data Fig. 1: Redshift distribution (top) and the scatter plot (bottom) of our SFG sample. The red dashed curve indicates the flux limit line flim 1.4GHz(z). of constraints from multiple observational data. Finally, we can probe the dust-unbiased SFRD up to a redshift of z \u223c5. The structure of the present paper is outlined below. In Sec- tion 2, we briefly describe the data used. In Section 3, we present the method used to constrain the LFs with redshift. In Section 4, we derive our radio LF evolution through cosmic time and com- pare it to those in the literature. In Section 5, we calculate the evolution of the cosmic SFRD using the LF models we derived and compare it to the literature. In Section 6, we summarize our findings and conclusions. Throughout the paper, we use the flat concordance Lambda cold dark matter (\u039bCDM) cosmology with the following pa- rameters: Hubble constant H0 = 70kms\u22121Mpc\u22121, dark energy density \u2126\u039b = 0.7, and matter density \u2126m = 0.3. We assume the Chabrier (2003) initial mass function (IMF) to calculate SFRs. We assume a simple power-law radio spectrum for SFGs, F\u03bd \u221d\u03bd\u2212\u03b1, where F\u03bd is the flux density at frequency \u03bd and \u03b1 is the spectral index." } ], "Fuli Feng": [ { "url": "http://arxiv.org/abs/2106.03046v1", "title": "Empowering Language Understanding with Counterfactual Reasoning", "abstract": "Present language understanding methods have demonstrated extraordinary\nability of recognizing patterns in texts via machine learning. However,\nexisting methods indiscriminately use the recognized patterns in the testing\nphase that is inherently different from us humans who have counterfactual\nthinking, e.g., to scrutinize for the hard testing samples. Inspired by this,\nwe propose a Counterfactual Reasoning Model, which mimics the counterfactual\nthinking by learning from few counterfactual samples. In particular, we devise\na generation module to generate representative counterfactual samples for each\nfactual sample, and a retrospective module to retrospect the model prediction\nby comparing the counterfactual and factual samples. Extensive experiments on\nsentiment analysis (SA) and natural language inference (NLI) validate the\neffectiveness of our method.", "authors": "Fuli Feng, Jizhi Zhang, Xiangnan He, Hanwang Zhang, Tat-Seng Chua", "published": "2021-06-06", "updated": "2021-06-06", "primary_cat": "cs.CL", "cats": [ "cs.CL", "cs.AI" ], "main_content": "Decisions are usually accompanied by confidence, a feeling of being wrong or right (Boldt et al., 2019). From the perspective of model confidence, we investigate the performance of language understanding models across different testing samples. We estimate the model confidence on a sample as the widely used Maximum Class Probability (MCP) (Corbi` ere et al., 2019), which is the probability over the predicted class. A lower value of MCP means less confidence and \u201chard\u201d sample. According to the value of MCP, we rank the testing (a) Sentiment analysis (b) Natural language inference Figure 1: Prediction performance of the language understanding models over testing samples at different confidence levels. samples in ascending order and split them into ten groups, i.e., confidence level from 1 to 10. Figure 1 shows the performance of representative models over samples at different model confidence levels on the SA and NLI tasks (see Section 4.1 for model and dataset descriptions). From the figures, we can observe a clear increasing trend of classification accuracy as the confidence level increases from 1 to 10 in all cases. In other words, these models fail to predict accurately for the hard samples. It is thus essential to enhance the standard inference with a more precise decision making procedure. 3 Methodology In this section, we first formulate the task of learning a decision making procedure for the testing phase (Section 3.1), followed by introducing the proposed CRM (Section 3.2) and the paradigm of building language understanding solutions with CRM (Section 3.3). 3.1 Problem Formulation As discussed in the previous work (Wu et al., 2020; Li et al., 2020, 2019), language understanding tasks can be abstracted as a classification problem where the input is a text and the target is to make decision across a set of candidates of interests. We follow the problem setting with consideration of counterfactual samples (Kaushik et al., 2019; Liang et al., 2020), where the training data are twofold: 1) factual samples T = {(x, y)} where y \u2208[1, C] denotes the class or the target decision of the text; x \u2208RD is the latent representation of the text, which encodes the textual contents1. 2) counterfactual samples 1The input is indeed the plain text which is projected to a latent representation by an encoder (e.g., a Transformer (Devlin et al., 2019)) in the cutting edge solutions. We omit the T \u2217 = {(x\u2217 c, c)|(x, y) \u2208T , c \u2208[1, C]&c \u0338= y} where (x\u2217 c, c) is a counterfactual sample in class c corresponds to the factual sample (x, y)2. We assume that a classi\ufb01cation model (e.g., BERT (Devlin et al., 2019)) has been trained over the labeled data. Formally, \u02c6 \u03b8 = min \u03b8 X (x,y)\u2208T /T \u2217 l(y, f(x|\u03b8)) + \u03b1\u2225\u03b8\u2225, (1) where \u02c6 \u03b8 is the learned parameters of the model f(\u00b7) ; l(\u00b7) is a classi\ufb01cation loss such as crossentropy (Kullback, 1997), and \u03b1 is a hyperparameter to adjust the regularization. The target is to build a decision making procedure to perform counterfactual reasoning when serving for the testing phase. Given a testing sample x, the core is a policy of generating counterfactual samples and retrospecting the decision, which is formulated as: y = h \u0010 x, {x\u2217}|\u03b7, \u02c6 \u03b8 \u0011 , {x\u2217} = g \u0000x \f \f\u03c9 \u0001 , y \u2208RC denotes the \ufb01nal prediction for the testing sample x, which is a distribution over the classes; x\u2217is one of the generated counterfactual samples for x. The generation module g(\u00b7) parameterized by \u03c9 is expected to construct a set of representative counterfactual samples for the target factual sample, which provide signals for the retrospection module h(\u00b7) parameterized by \u03b7 to retrospect the prediction f \u0000x|\u02c6 \u03b8 \u0001 given by the trained classi\ufb01cation model. In particular, h(\u00b7) and g(\u00b7) will be learned from the factual and counterfactual training samples, respectively. 3.2 Counterfactual Reasoning Model Figure 2 illustrates the process of CRM where the arrows in grey color represent the standard inference of trained classi\ufb01cation model, and arrows in red color represent the retrospection with consideration of counterfactual samples. 3.2.1 Retrospection Module We devise the retrospection module with one key consideration\u2014distilling signals for making \ufb01nal decision by comparing both the latent representation and the prediction of the counterfactual samples with the factual sample. To achieve the target, encoder for briefness since focusing on the decision making. 2Given the labeled factual sample, counterfactual samples can be constructed either manually (Kaushik et al., 2019) or automatically (Chen et al., 2020) by conducting minimum changes on x to swap its label from y to c Figure 2: Illustration of the proposed CRM. we devise three key building blocks for retrospection, which successively perform representation comparison, prediction comparison, and fusion . In particular, the module \ufb01rst compares the representation of each counterfactual sample with the factual sample; then compares their predictions accordingly; and fuses the comparison across the counterfactual samples. Representation comparison. Given a pair of counterfactual sample x\u2217and factual sample x, we believe the signals meaningful for making \ufb01nal decision lie in the difference of the samples and how the difference affects the classi\ufb01cation. To distill such signals, we devise the representation comparison block as y\u2206= f(x \u2212x\u2217|\u02c6 \u03b8), where y\u2206\u2208RC denotes the prediction of the representation difference x \u2212x\u2217given by the trained classi\ufb01cation model. Note that we leverage the trained model to enlighten how the content difference affects the classi\ufb01cation since the model is trained to capture the connection between the textual patterns and the classes. It should be noted that we use a duplicate of the trained classi\ufb01cation model for the representation comparison. That is to say, the training of the retrospection module will not affect the classi\ufb01cation model. Prediction comparison. To retrospect the prediction f(x|\u02c6 \u03b8), we devise a prediction comparison block to compare the predictions of each counterfactual and factual sample pair and distill patterns from f(x|\u02c6 \u03b8), f(x\u2217|\u02c6 \u03b8), and y\u2206. Inspired by the success of convolutional neural network (CNN) in capture local-region patterns, the block is devised as a CNN, which is formulated as: y\u2217= CNN \u0010 f(x|\u02c6 \u03b8), f(x\u2217|\u02c6 \u03b8), y\u2206 \u0011 , (2) where y\u2217denotes the retrospected prediction when comparing to x\u2217. In particular, a stack layer \ufb01rst stacks the three predictions as a matrix, which serves as an \u201cimage\u201d to facilitate \u201cobserving\u201d patterns. Formally, Y = h f(x|\u02c6 \u03b8), f(x\u2217|\u02c6 \u03b8), y\u2206 i where Y \u2208RC\u00d73. Y is then fed into an 1D convolution layer to capture the intra-class patterns across the predictions, which is formulated as: H = \u03c3(Y \u2217F ), Hij = \u03c3(Y:iFj), (3) where F \u2208R3\u00d7K denotes the \ufb01lters in the convolution layer, and \u03c3(\u00b7) is an activation function such as GELU (Hendrycks and Gimpel, 2016). Y:i and Fj represent the i-th row of Y and the j-th column of F , respectively. The \ufb01lter Fj can learn rules for conducting retrospection. For instance, a \ufb01lter [1, \u22121, 0] means deducting the prediction of the counterfactual sample from that of the factual sample. The output H \u2208RC\u00d7K is then \ufb02attened as a vector and fed into a fully-connected (FC) layer to capture the inter-class patterns. Formally, y\u2217= W flatten(H) + b, (4) where W and b are model parameters. Fusion. The target is to fuse the retrospected predictions {y\u2217} into a \ufb01nal decision y. Inspired by the success of pooling function in reading out patterns, we devise the block as y = pooling({y\u2217}). As the fusion is performed after the pairwise comparison, we term it as late fusion. Training. We update the parameters of the retrospection module by minimizing the classi\ufb01cation loss over the factual training samples, which is: \u02c6 \u03b7 = min \u03b7 X (x,y)\u2208T l(y, y) + \u03bb\u2225\u03b7\u2225. (5) where \u03bb denotes the hyper-parameter to adjust the weight of the regularization term. It should be noted that no existing research has uncovered the speci\ufb01c mechanism of retrospection in our brain, i.e., the order of comparison and fusion is unclear. As such, we further devise two fusion strategies: middle fusion and early fusion, which performs fusion within the CNN, i.e., during comparison, and before the CNN, respectively. \u2022 Middle fusion performs aggregation between the convolution layer and the FC layer. This fusion \ufb01rst calculates the latent comparison signals H for each pair of counterfactual and factual samples according to Equation 3. The aggregated signals pooling({H}) are then fed into the FC layer (Equation 4) to obtain the \ufb01nal decision y. \u2022 Early fusion aggregates the counterfactual samples before performing comparison, which is formulated as \u02dc x\u2217 = pooling({x\u2217}). In this way, the retrospection module is formulated as: y = CNN \u0010 f(x|\u02c6 \u03b8), f(\u02dc x\u2217|\u02c6 \u03b8), f(\u02dc x\u2217\u2212x|\u02c6 \u03b8) \u0011 . For all the three fusion methods, we can use either regular pooling function without parameter or parameterized pooling function (Ying et al., 2018) to enhance the expressiveness of the retrospection module. In our experiments, using a simple mean pooling achieves a performance that is comparable to the parameterized one in most cases (cf. Table 3). 3.2.2 Generation Module The target is to construct counterfactual samples that are informative for retrospecting the decision on the target factual sample x. As the task involves making decision among C candidate classes, we believe that the key to generate representative counterfactual samples lies in imagining \u201cwhat would the content be if the sample belongs to class c\u201d, i.e., generating C counterfactual samples {x\u2217 c}. With the C classes as the targets, the searching space of samples can also be largely narrowed down. Toward this end, we devise the generation module with two main considerations: 1) decomposing the factual sample x to distill contents irrelevant to the label of the sample u = d(x|\u03c9); 2) injecting class c into u to form the counterfactual sample x\u2217 c. Decomposition. To distill u, we need to recognize the connection between the content of the factual sample and each class. We thus account for class representations in the decomposition function. To align the sample space of the generation module with the retrospection module h(\u00b7) and the classi\ufb01cation model f(\u00b7), we extract the parameters from the prediction layer of the trained classi\ufb01cation model as the class representations. In particular, we extract the mapping matrix W \u2208RC\u00d7D where the c-th row corresponds to class c. Note that we assume that the prediction layer has the same dimensionality as the latent representation, which is a common setting in most cutting edge language understanding models. The decomposition function is devised as a CNN to capture both the intra-dimension and inter-dimension connections between the factual sample and the classes. \u2022 Stack layer. The stack layer stacks the factual sample, class representations, and the element-wise product between sample and each class, which is formulated as: X = [x, W T , x \u2299W T ]. x \u2299 W T \u2208RD\u00d7C shed lights on how closely each dimension of x connect to each class, where large absolute value indicates closer connections. \u2022 Convolution layer. This layer uses 1D horizontal \ufb01lters to learn patterns of deducting class relevant contents from the factual sample, which is formulated as h = pooling(\u03c3(X \u2217F g)). F g \u2208 R(2C+1)\u00d7L denotes the \ufb01lters where L is the total number of \ufb01lters. The output h \u2208RD is a hidden representation. \u2022 FC layers. We use two FC layers to capture the inter-dimension connections. Formally, u = W 2\u03c3(W 1h + b1) + b2, where W 2 \u2208RD\u00d7M, W 1 \u2208RM\u00d7D, b2 \u2208RD, and b1 \u2208RM are learnable parameters. M is a hyper-parameter to adjust the complexity of the decomposition function. Note that we can stack more layers to enhance the expressiveness of the function, whereas using two layers according to the universal approximation theorem (Hornik, 1991). We learn the parameters of the decomposition function from the counterfactual training samples by optimizing the following objective: min \u03c9 X (x\u2217 c ,c)\u2208T \u2217 r \u0000u\u2217 c, \u02dc uc \u0001 + \u03b3l \u0000c, f(x\u2217 c \u2212u\u2217 c|\u02c6 \u03b8) \u0001 + r \u0000u, \u02dc uc \u0001 + \u03b3l \u0000y, f(x \u2212u|\u02c6 \u03b8) \u0001 , (6) where u\u2217 c = d(x\u2217 c|\u03c9) and u = d(x|\u03c9) are the decomposition results of the counterfactual sample x\u2217 c and the corresponding factual sample x; \u02dc uc = 1 2(x + x\u2217 c) denotes the target value of the decomposition. The two terms r(\u00b7) and l(\u00b7) are Euclidean distance (Dattorro, 2010) and classi\ufb01cation loss. By minimizing the two terms, we encourage the decomposition result: 1) to be close to the target value \u02dc uc; and 2) if being deducted from the original sample (e.g., , x \u2212u), the classi\ufb01cation cannot be in\ufb02uenced. \u03b3 is a hyper-parameter to balance the two terms. The rationality of setting \u02dc uc = 1 2(x + x\u2217 c) as the target class irrelevant content of x and x\u2217 c comes from the parallelogram law (Nash, 2003). Note that this pair of samples belong to two different classes where a decision boundary (a hyperplane) lies between the two classes y and c. Considering that the sample x corresponds to a vector in the hidden space, we can decompose the vector into two components that are orthogonal and parallel to the decision boundary, i.e., x\u2217 c = o\u2217 c + p\u2217 c and x = o + p. Since the two samples belong to different classes, their orthogonal components are in opposite directions and their addition will only retain the parallel components, which are irrelevant to judging the class between y and c3. Injection. Accordingly, given a testing sample x, we can inject the orthogonal components towards class c via x\u2217 c = 2 \u2217d(x|\u02c6 \u03c9c) \u2212x, which is the imagined content of the sample if it belongs to class c. In this way, for each testing sample, we conduct the injection over all the classes and construct C counterfactual samples {x\u2217 c}, which are then used in the retrospection module4. 3.3 Learning Paradigm with CRM The existing work (Kaushik et al., 2019; Zeng et al., 2020) for language understanding typically follows the standard learning paradigm, i.e., training a classi\ufb01cation model over labeled data. Applying the proposed CRM indeed forms a new learning paradigm for constructing language understanding solutions. Algorithm 1 illustrates the procedure of the new paradigm. Algorithm 1 Learning paradigm with CRM Input: Training data T , T \u2217. /* Training */ 1: Optimize Equation 1; \u25b7Classi\ufb01cation model training 2: Optimize Equation 6; \u25b7Generation module training 3: Optimize Equation 5; \u25b7Retrospection module training 4: Return \u02c6 \u03b8, \u02c6 \u03c9c, and \u02c6 \u03b7. /* Testing */ 5: Calculate f(x|\u02c6 \u03b8); \u25b7Classi\ufb01cation model inference 6: for c = 1 \u2192C do 7: x\u2217 c = 2 \u2217g(x|\u02c6 \u03c9c) \u2212x; \u25b7Generation 8: end for 9: Calculate h(x, {x\u2217 c}|\u02c6 \u03b7, \u02c6 \u03b8); \u25b7Retrospection 4 Experiments We conduct experiments on two representative language understanding tasks, SA and NLI, to answer the following research questions: \u2022 RQ1: To what extent counterfacutal reasoning improves language understanding? \u2022 RQ2: How does the design of the retrospection module affect the proposed CRM? \u2022 RQ3: How effective are the counterfactual samples generated by the proposed generation module? 4.1 Experiment Settings Datasets. We adopt the same datasets in (Kaushik et al., 2019) for both tasks. The SA data are reviews 3Note that we normalize all samples to be unit vectors in the decomposition function. Moreover, inspired by (Parascandolo et al., 2018), we train a decomposition function for each class, i.e., class-speci\ufb01c parameters \u02c6 \u03c9c 4The generation module consists of C decomposition functions d(x|\u02c6 \u03c9c) and the non-parametric injection function. from IMDb, which are labeled as either positive or negative. For each factual review, the dataset contains a manually constructed counterfactual sample where the crowd workers are asked to manipulate the text to reverse the label with the constraint of no gratuitous change. NLI is a three-way classi\ufb01cation task with two sentences as inputs and the target of detecting their relation within entailment, contradiction, and neutral. For each factual sample, four counterfactual samples are given, which are constructed by editing either the \ufb01rst or the second sentence with target relations different to the label of the factual sample. Classi\ufb01cation models. Owing to the extraordinary representational capacity of language model, \ufb01ne-tuning pre-trained language model has become the emergent technique for solving language understanding tasks (Devlin et al., 2019). We select the widely used RoBERTa-base5 and RoBERTalarge6 for the consideration of the robustness of the RoBERTa (Liu et al., 2019) and our limited computation resources. For SA, we also test the classical Multi-Layer Perceptron (MLP) (Teney et al., 2020) with tf-idf text features (Sch\u00a8 utze et al., 2008) as inputs. For NLI, we further test RoBERTa-largenli7, which has been \ufb01ne-tuned on the large-scale MultiNLI dataset (Williams et al., 2018). Baselines. As the proposed CRM leverages counterfactual samples, we compare CRM with three representative methods using counterfactual samples in language understanding tasks: 1) +CF (Kaushik et al., 2019), which uses counterfactual samples as data augmentation for model training; 2) +GS (Teney et al., 2020), which compares the factual and counterfactual samples in model training through regularizing their gradients; and 3) +CL (Liang et al., 2020), which compares the factual and counterfactual samples through a contrastive loss. Moreover, we report the performance of the testing model under Normal Training, i.e., training over factual samples only. Implementation. We implement the proposed CRM with PyTorch 1.7.0 based on Hugging Face Transformer8, which is released at: https://github. com/fulifeng/Counterfactual Reasoning Model. In all cases, we follow the setting of +CF for training the classi\ufb01cation model, which is a standard \ufb01ne-tuning in (Liu et al., 2019). We then use 5https://huggingface.co/roberta-base. 6https://huggingface.co/roberta-large. 7https://huggingface.co/roberta-large-mnli. 8https://github.com/huggingface/transformers. adam (Kingma and Ba, 2014) with learning rate of 0.001 to optimize the retrospection module and the generation module. For the retrospection module, we set the number of \ufb01lters in the convolution layer K as 10, the weight for regularization \u03bb as 0. As to the generation module, we set the number of convolution \ufb01lters as 10, the size of the hidden layer M as 256, and the weight for balancing Euclidean distance and classi\ufb01cation loss \u03b3 as 15. We report the average classi\ufb01cation accuracy over 5 different runs. For each repeat, we train the model with 20 epochs and select the model with the best performance on the validation set. 4.2 Performance Comparison (RQ1) We \ufb01rst use the handcrafted counterfactual samples to demonstrate the effectiveness of counterfactual reasoning in the inference stage of language understanding model, which can be seen as using a golden standard generation module to provide counterfactual samples for the retrospection module. Note that we do not use the label of counterfactual samples in the testing set. Table 1 shows the performance of the compared methods on the two tasks. From the table, we observe that: \u2022 +CRM largely outperforms all the baseline methods in all cases. As compared to +CF, the same classi\ufb01cation model without CRM in the testing phase, +CRM achieves relative performance improvement up to 15.6%. The performance gain is attributed to the retrospection module, which justi\ufb01es the rationality and effectiveness of incorporating counterfactual thinking into the inference stage of language understanding model. In other words, by comparing the factual sample with its counterfactual samples, the retrospection module indeed makes more accurate decisions. \u2022 On the SA task, a huge gap (85.3 \u219493.4) lies in the performance of the shallow model MLP and the deep RoBERTa-base/RoBERTa-large. When applying +CRM, MLP achieves a performance that is comparable to the deep models. The result indicates that counterfactual reasoning can compensate for the disadvantages caused by the insuf\ufb01cient model representational capacity. In addition, the result re\ufb02ects that CRM brings cognitive ability beyond recognizing textual patterns. If the retrospection module only facilitates capturing the correlation between textual patterns and classes, such simple model cannot bridge the Sentiment Classi\ufb01cation Backbone Normal Training +CF +GS +CL +CRM RI MLP 86.9\u00b10.5 85.3\u00b10.3 84.6\u00b10.4 98.6\u00b10.2 15.6% RoBERTa-base 93.2\u00b10.6 92.3\u00b10.7 92.2\u00b10.9 91.8\u00b11.1 97.5\u00b10.3 5.7% RoBERTa-large 93.6\u00b10.6 93.4\u00b10.4 93.1\u00b10.5 94.1\u00b10.4 98.2\u00b10.3 5.1% Natural Language Inference Backbone Normal Training +CF +GS +CL +CRM RI RoBERTa-base 83.5\u00b10.8 83.4\u00b10.9 83.8\u00b11.7 84.1\u00b11.1 91.5\u00b11.6 9.7% RoBERTa-large 87.9\u00b11.7 85.8\u00b11.2 86.2\u00b11.2 86.5\u00b11.6 93.8\u00b11.9 9.3% RoBERTa-large-nli 89.4\u00b10.7 88.2\u00b11.0 87.2\u00b11.4 88.2\u00b11.0 94.4\u00b11.2 7.1% Table 1: Performance of the proposed CRM (Early Fusion) and baselines on the SA and NLI tasks. RI means the relative performance improvement achieved by +CRM over the classi\ufb01cation model without CRM, i.e., +CF. huge gap of representational capacity between MLP and RoBERTa-large. \u2022 The performance of baseline methods are comparable to each other in most cases, i.e., incorporating counterfactual samples into model training does not necessarily improve the testing performance on factual samples. This result is consistent with (Kaushik et al., 2019), which is reasonable since these methods are devised for enhancing the generalization ability, especially for the out-of-distribution testing samples, which can sacri\ufb01ce the performance on normal testing samples. Besides, the result indicates that training with counterfactual samples is insuf\ufb01cient for achieving counterfactual thinking, which re\ufb02ects the rationality of enhancing the inference paradigm with a decision making procedure. (a) Sentiment analysis (b) Natural language inference Figure 3: Prediction performance of +CF and +CRM over testing samples at different con\ufb01dence levels. Performance on hard samples. Furthermore, we investigate whether the proposed CRM facilitate dealing with hard samples. Recall that we split the testing samples into 10 groups according to the con\ufb01dence of the classi\ufb01cation model, i.e., +CF (cf. Section 2). We perform group-wise comparison between +CF and +CRM. Figure 3 shows the performance of all the classi\ufb01cation models with +CF and +CRM. From the \ufb01gures, 1) we observe that the performance of +CRM is stable across different con\ufb01dence levels, whereas the performance of the classi\ufb01cation model shows a clear decreasing trend as the con\ufb01dence level decreases from 10 to 1. The result indicates that the retrospection module is insensitive to the con\ufb01dence of the classi\ufb01cation model. 2) In all cases, +CRM achieves the largest performance gain at the \ufb01rst group with con\ufb01dence level of 1, i.e., the hardest group to the classi\ufb01cation model. For instance, the improvement reaches 85.7% on the RoBERTa-base model for the NLI task. The large improvements further justi\ufb01es the effectiveness of the retrospection module, i.e., comparing the prediction of factual samples to counterfactual samples indeed facilitates dealing with hard samples. Sentiment Classi\ufb01cation Backbone Implicit +CRM MLP 79.3\u00b10.2 98.6\u00b10.2 RoBERTa-base 94.7\u00b10.6 97.5\u00b10.3 RoBERTa-large 98.0\u00b10.4 98.2\u00b10.3 Natural Language Inference Backbone Implicit +CRM RoBERTa-base 81.9\u00b13.5 91.5\u00b11.6 RoBERTa-large 87.4\u00b12.2 93.8\u00b11.9 RoBERTa-large-nli 88.8\u00b11.6 94.4\u00b11.2 Table 2: Performance comparison of implicit modeling (end-to-end model) and explicit modeling (CRM) of counterfactual thinking. CRM V.S. implicit modeling. According to the uniform approximation theorem (Hornik, 1991), the CRM can also be approximated by a deep neural network. We thus investigate whether counterfactual thinking can be learned in an implicit manner. In particular, we evaluate a model that takes both the factual sample and counterfactual samples as inputs to make prediction for the factual one. Table 2 shows the performance, where we have the following observations: 1) The implicit modeling performs much worse than the proposed CRM in most cases, which justi\ufb01es the effectiveness of the retrospection module and the rationality of modeling comparison explicitly. 2) On the NLI task, RoBERTa-base+CRM outperforms RoBERTa-large (implicit), which means that the superior performance of CRM is not because of the additional model parameters introduced by the retrospection module, but the explicit comparison between factual and counterfactual samples. 4.3 In-depth Analysis Effects of retrospection module design (RQ2). Note that the order of comparison and fusion in the retrospection mechanism of us humans is still unclear. We investigate how the fusion strategies in\ufb02uence the effectiveness of the proposed CRM. Table 3 shows the performance of CRM based on the early fusion (EF), late fusion (LF), and middle fusion (MF) on the NLI task. We omit the comparison on the SA task since the dataset only has one counterfactual sample for the target factual sample. For both EF and LF, we use the mean pooling as the pooling function. As to MF, we use a pooling function that is equipped with self-attention (Vaswani et al., 2017). The reasons of this setting are twofold: 1) using mean pooling will make LF and MF equivalent since the FC layer in the retrospection module is a linear mapping. Note that LF performs pooling after the FC layer, while the pooling function of MF is just before the FC layer. 2) The comparison between the LF and MF can thus shed light on whether parameterized pooling function can bene\ufb01t the retrospection. From the table, we can observe that, in most cases, CRM based on different fusion strategies achieve performance comparable to each other. It indicates that the retrospection is insensitive to the order of fusion and the comparison between counterfactual and factual samples. Considering that MF with mean pooling is equivalent to LF, we can see that the bene\ufb01t of parameterized pooling function is limited. In particular, MF only performs better than LF on one of the three testing models. Effects of generation module (RQ3). We then investigate whether the proposed generation module constructs useful counterfactual samples for retrospection. We train and test the retrospection module (using EF) with the generated samples on RoBERTa-large on the SA task. We omit the experiments of other settings for saving computation resources. In this way, the model achieves an accuracy of 94.5 which is better than +CF (93.4) but worse than +CRM with manually constructed counterfactual samples (98.2) (cf. Table 1). The result indicates that the generated samples indeed facilitate the retrospection while the generation quality can be further improved. Moreover, on the testing samples at con\ufb01dence level of 1, using the generated samples achieves an accuracy of 81.3 which is much better than +CF (70.8) (cf. Figure 3). The generated samples indeed bene\ufb01t the decision making over hard testing samples. 5 Related Work Counterfactual sample. Constructing counterfactual samples has become an emergent data augmentation technique in natural language processing, which has been used in a wide spectral of language understanding tasks, including SA (Kaushik et al., 2019; Yang et al., 2020), NLI (Kaushik et al., 2019), named entity recognition (Zeng et al., 2020) question answering (Chen et al., 2020), dialogue system (Zhu et al., 2020), vision-language navigation (Fu et al., 2020). Beyond data augmentation under the standard supervised learning paradigm, a line of research explores to incorporate counterfactual samples into other learning paradigms such as adversarial training (Zhu et al., 2020; Fu et al., 2020; Teney et al., 2020) and contrastive learning (Liang et al., 2020). This work lies in an orthogonal direction that incorporates counterfactual samples into the decision making procedure of model inference. Counterfactual inference. A line of research attempts to enable deep neural networks with counterfactual thinking by incorporating counterfactual inference (Yue et al., 2021; Wang et al., 2021; Niu et al., 2021; Tang et al., 2020; Feng et al., 2021). These methods perform counterfactual inference over the model predictions according to a pre-de\ufb01ned causal graph. Due to the requirement of causal graph, such methods are hard to be generalized to different tasks. Our method does not suffer from such limitation since working on the counterfactual samples which can be generated without a comprehensive causal graph. Hard sample. A wide spectral of machine learning techniques are related to dealing with the hard samples in language understanding. For instance, Backbone +CF EF RI LF RI MF RI RoBERTa-base 83.4\u00b10.9 91.5\u00b11.6 9.7% 92.8\u00b11.8 11.3% 89.6\u00b12.0 7.4% RoBERTa-large 85.8\u00b11.2 93.8\u00b11.9 9.3% 95.3\u00b10.7 11.1% 93.4\u00b11.7 8.9% RoBERTa-large-nli 88.2\u00b11.0 94.4\u00b11.2 7.1% 93.8\u00b10.4 6.4% 94.7\u00b11.3 7.4% Table 3: Performance of the proposed CRM based on early fusion (EF), late fusion (LF), or middle fusion (MF) on the NLI task. RI represents the relative performance improvement over the +CF method. adversarial training (Khashabi et al., 2020) enhances the model robustness against perturbations and attacks, which are hard samples for normally trained models. Debiased training (Tu et al., 2020; Utama et al., 2020) eliminates the spurious correlation or bias in training data to enhance the generalization ability and deal with out-of-distribution samples. In addition to the training phase, a few inference techniques might improve the model performance on hard samples, including posterior regularization (Srivastava et al., 2018) and causal inference (Yu et al., 2020; Niu et al., 2021). However, both techniques require domain knowledge such as prior or causal graph tailored for speci\ufb01c applications. On the contrary, this work provides a general paradigm that can be used for most language understanding tasks. 6 Conclusion In this work, we pointed out the issue of standard inference of existing language understanding models. We proposed a Counterfactual Reasoning Model which empowers the trained model with a highlevel cognitive ability, counterfactual thinking. By applying the proposed CRM, we formed a new paradigm for building language understanding solutions. We conducted extensive experiments, which validate the effectiveness of our proposal, especially in dealing with hard samples. This work opens up a new research direction about the decision making procedure in testing phase. In the future, we will explore sequential decision procedure to resolve the constraint on the number of constructed counterfactual samples. In addition, we will investigate generation module for language understanding with unsupervised generative techniques (Sauer and Geiger, 2021). Acknowledgments This research is supported by the Sea-NExT Joint Lab, Singapore MOE AcRF T2, National Natural Science Foundation of China (U19A2079) and National Key Research and Development Program of China (2020AAA0106000). Our thanks also go to all the anonymous reviewers for their valuable suggestions.", "introduction": "Language understanding (Ke et al., 2020) is a central theme of arti\ufb01cial intelligence (Chomsky, 2002), which empowers a wide spectral of applica- tions such as sentiment evaluation (Feldman, 2013), commonsense inference (Bowman et al., 2015). The models are trained on labeled data to recognize the textual patterns closely correlated to different labels. Owing to the extraordinary representational capacity of deep neural networks, the models can well recognize the pattern and make prediction ac- cordingly (Devlin et al., 2019). However, the cog- nitive ability of these data-driven models is still far from human beings due to lacking counterfactual thinking (Pearl, 2019). Counterfactual thinking is a high-level cognitive ability beyond pattern recognition (Pearl, 2019). In addition to observing the patterns within factual \u2217Corresponding author. samples, counterfactual thinking calls for compar- ing the fact with imaginations, so as to make bet- ter decision. For instance, given a factual sample \u201cWhat do lawyers do when they die? Lie still.\u201d, the intuitive evaluation of its sentiment based on the textual patterns will recognize \u201cLie still\u201d as an objective description of body posture which is neutral. By scrutinizing that the \u201cstill\u201d could be intentionally postposed, we can imagine a counter- factual sample \u201cWhat do lawyers do when they die? Still lie.\u201d and uncover the negative sarcastic pun, whose sentiment is more accurate. Recent work (Kaushik et al., 2019; Zeng et al., 2020) shows that incorporating counterfactual sam- ples into model training improves the generaliza- tion ability. However, these methods follow the standard machine learning paradigm that uses the same procedure (e.g., a forward propagation) to make prediction in the testing phase. That is, mak- ing decision for testing samples according to their relative positions to the model decision boundary. The indiscriminate procedure focuses on the textual patterns occurred in the testing sample and treats all testing samples equally, which easily fails on hard samples (cf. Figure 1). On the contrary, humans can discriminate hard samples and ponder the deci- sion with a rational system (Daniel, 2017), which imagines counterfactual and adjusts the decision. The key to bridge this gap lies in imitating the counterfactual thinking ability of humans, i.e., learning a decision making procedure to serve for the testing phase. That is a procedure of: 1) con- structing counterfactual samples for a target factual sample; 2) calling the trained language understand- ing model to make prediction for the counterfactual samples; and 3) comparing the counterfactual and factual samples to retrospect the model prediction. However, the procedure is non-trivial to achieve for two reasons: 1) the space of counterfactual sample is huge since any variant from the target factual arXiv:2106.03046v1 [cs.CL] 6 Jun 2021 sample can be a counterfactual sample. It is thus challenging to search for suitable counterfactual samples that can facilitate the decision making. 2) The mechanism of how we retrospect the decision is still unclear, making it hard to be imitated. Towards the target, we propose a Counterfactual Reasoning Model (CRM), which is a two-phase procedure consisting a generation module and a retrospection module. In particular, given a factual sample in the testing phase, the generation module constructs representative counterfactual samples by imagining what would the content be if the la- bel of the sample is y. To imitate the unknown retrospection mechanism of humans, we build the retrospection module as a carefully designed deep neural network that separately compares the latent representation and the prediction of the factual and counterfactual samples. The proposed CRM forms a general paradigm that can be applied to most ex- isting language understanding models without con- straint on the format of the language understanding task. We select two language understanding tasks: SA and NLI, and test CRM on three representative models for each task. Extensive experiments on benchmark datasets validate the effectiveness of CRM, which achieves performance gains ranging from 5.1% to 15.6%. The main contributions are as follow: \u2022 We propose the Counterfactual Reasoning Model to enlighten the language understanding model with counterfactual thinking. \u2022 We devise a generation module and a retrospec- tion module that are task and model agnostic. \u2022 We conduct extensive experiments, which vali- date the rationality and effectiveness of the pro- posed method." }, { "url": "http://arxiv.org/abs/2010.11797v2", "title": "Should Graph Convolution Trust Neighbors? A Simple Causal Inference Method", "abstract": "Graph Convolutional Network (GCN) is an emerging technique for information\nretrieval (IR) applications. While GCN assumes the homophily property of a\ngraph, real-world graphs are never perfect: the local structure of a node may\ncontain discrepancy, e.g., the labels of a node's neighbors could vary. This\npushes us to consider the discrepancy of local structure in GCN modeling.\nExisting work approaches this issue by introducing an additional module such as\ngraph attention, which is expected to learn the contribution of each neighbor.\nHowever, such module may not work reliably as expected, especially when there\nlacks supervision signal, e.g., when the labeled data is small. Moreover,\nexisting methods focus on modeling the nodes in the training data, and never\nconsider the local structure discrepancy of testing nodes.\n This work focuses on the local structure discrepancy issue for testing nodes,\nwhich has received little scrutiny. From a novel perspective of causality, we\ninvestigate whether a GCN should trust the local structure of a testing node\nwhen predicting its label. To this end, we analyze the working mechanism of GCN\nwith causal graph, estimating the causal effect of a node's local structure for\nthe prediction. The idea is simple yet effective: given a trained GCN model, we\nfirst intervene the prediction by blocking the graph structure; we then compare\nthe original prediction with the intervened prediction to assess the causal\neffect of the local structure on the prediction. Through this way, we can\neliminate the impact of local structure discrepancy and make more accurate\nprediction. Extensive experiments on seven node classification datasets show\nthat our method effectively enhances the inference stage of GCN.", "authors": "Fuli Feng, Weiran Huang, Xiangnan He, Xin Xin, Qifan Wang, Tat-Seng Chua", "published": "2020-10-22", "updated": "2021-06-06", "primary_cat": "cs.LG", "cats": [ "cs.LG", "stat.ML" ], "main_content": "Node classification. We represent a graph with \ud835\udc41nodes as \ud835\udc3a= (\ud835\udc68, \ud835\udc7f), i.e., an adjacency matrix \ud835\udc68\u2208R\ud835\udc41\u00d7\ud835\udc41associated with a feature matrix \ud835\udc7f= [\ud835\udc991, \ud835\udc992, \u00b7 \u00b7 \u00b7 , \ud835\udc99\ud835\udc41]\ud835\udc47\u2208R\ud835\udc41\u00d7\ud835\udc37. \ud835\udc68describes the connections between nodes where \ud835\udc34\ud835\udc56\ud835\udc57= 1 means there is an edge between node \ud835\udc56and \ud835\udc57, otherwise \ud835\udc34\ud835\udc56\ud835\udc57= 0. \ud835\udc37is the dimension of the input node features.Node classification is one of the most popular analytic tasks on graph data. In the general problem setting, the label of \ud835\udc40nodes are given \ud835\udc80= [\ud835\udc9a1,\ud835\udc9a2, \u00b7 \u00b7 \u00b7 ,\ud835\udc9a\ud835\udc41]\ud835\udc47\u2208R\ud835\udc41\u00d7\ud835\udc3f, where \ud835\udc3fis the number of node categories and \ud835\udc9a1 is a one-hot vector. The target is to learn a classifier from the labeled nodes, formally, \ud835\udc53(\ud835\udc99, N(\ud835\udc99) |\ud835\udf3d), N(\ud835\udc99) = {\ud835\udc99\ud835\udc5b|\ud835\udc68\ud835\udc56\ud835\udc5b= 1}, (1) es the parameter of the classifier and denotes ( N() |) N() {|} where \ud835\udf3ddenotes the parameter of the classifier and N (\ud835\udc99) denotes the neighbor nodes of the target node \ud835\udc99. Without loss of generality, we index the labeled nodes and testing nodes in the range of [1, \ud835\udc40] and (\ud835\udc47, \ud835\udc41], respectively. There are four popular settings with minor differences regarding the observability of testing nodes during model training and the amount of labeled nodes. Specifically, \u2022 Inductive Full-supervised Learning: In this setting, testing nodes are not included in the graph used for model training and all training nodes are labeled. That is, \ud835\udc40= \ud835\udc47and learning the classifier with \ud835\udc53(\ud835\udc7f\ud835\udc61\ud835\udc5f|\ud835\udc68\ud835\udc61\ud835\udc5f, \ud835\udf3d) where \ud835\udc7f\ud835\udc61\ud835\udc5f\u2208R\ud835\udc40\u00d7\ud835\udc37and \ud835\udc68\ud835\udc61\ud835\udc5f denotes the features and the subgraph of the training nodes. [11]: In many real-world denotes the features and the subgraph of the training nodes. \u2022 Inductive Semi-supervised Learning [11]: In many real-world applications such as text classification [26], it is unaffordable to label all the observed nodes, i.e., only a small portion of the training nodes are labeled (in fact, \ud835\udc40\u226a\ud835\udc47). \u2022 Transductive Full-supervised Learning [15]: In some cases, the training nodes are labeled (in fact, \ud835\udc40\u226a\ud835\udc47). \u2022 Transductive Full-supervised Learning [15]: In some cases, the graph is relatively stable, i.e., no new node occurs, where the whole node graph \ud835\udc7fand \ud835\udc68are utilized for model training. [20]: In this setting, the whole node graph \ud835\udc7fand \ud835\udc68are utilized for model training. \u2022 Transductive Semi-supervised Learning [20]: In this setting, the whole graph is available for model training while only a small portion of the training nodes are labeled. It should be noted that we do not restrict our problem setting to be a specific one like most previous work on GCN, since we focus on the general inference model. Graph Convolutional Network. Taking the graph as input, GCN learns node representations to encode the graph structure and node features (the last layer makes predictions) [20]. The key operation of GCN is neighbor aggregation, which can be abstracted as: \u00af \ud835\udc99= \ud835\udc34\ud835\udc3a\ud835\udc3a(\ud835\udc99, {\ud835\udc99\ud835\udc5b|\ud835\udc99\ud835\udc5b\u2208N(\ud835\udc99) }), (2) otes the node aggregation operation such as ( {|\u2208N() }) where \ud835\udc34\ud835\udc3a\ud835\udc3adenotes the node aggregation operation such as a weighted summation [20]. \ud835\udc99and \u00af \ud835\udc99 \u2208 R\ud835\udc37are the origin representation of the target node (node features or representation at the previous layer) and the one after aggregating neighbor node features. Note that standard GCN layer typically consists a feature transformation, which is omitted for briefness. Adaptive locality. In most GCN, the target node is equally treated as the neighbor nodes, i.e., no additional operation except adding the edge for self-connection. Aiming to distinguish the contribution from target node and neighbor nodes, a self-weight \ud835\udefcis utilized, i.e., N (\ud835\udefc\u2217\ud835\udc99, {(1 \u2212\ud835\udefc) \u2217\ud835\udc99\ud835\udc5b|\ud835\udc5b\u2208\ud835\udc5b\ud835\udc52\ud835\udc56\ud835\udc54\u210e\ud835\udc4f\ud835\udc5c\ud835\udc5f(\ud835\udc99)}). More specifically, neighbor attention [44] is introduced to learn node specific weights, i.e., N (\ud835\udefc\ud835\udc99, {\ud835\udefc\ud835\udc5b\u2217\ud835\udc99\ud835\udc5b|\ud835\udc5b\u2208\ud835\udc5b\ud835\udc52\ud835\udc56\ud835\udc54\u210e\ud835\udc4f\ud835\udc5c\ud835\udc5f(\ud835\udc99)}). The weights \ud835\udefcand \ud835\udefc\ud835\udc5bare Figure 2: Cause-effect view of GCN. (a) Causal graph of GCN inference process; (b) making original prediction; (c) causal intervention \ud835\udc51\ud835\udc5c(\ud835\udc41= \u2205) where dashed arrow means the effect from the predecessor is blocked. calculated by an attention model such as multi-head attention [43] with the node representations \ud835\udc99and \ud835\udc99\ud835\udc5bas inputs. Lastly, hop attention [27] is devised to adaptively aggregate the target node representations at different GCN layers \ud835\udc990, \u00b7 \u00b7 \u00b7 , \u00af \ud835\udc99\ud835\udc58, \u00b7 \u00b7 \u00b7 , \u00af \ud835\udc99\ud835\udc3einto a final representation. \u00af \ud835\udc99\ud835\udc58is the convolution output at the \ud835\udc58-th layer which encodes the \ud835\udc58-hop neighbors of the target node. For a target node that is expected to trust self more, the hop attention is expected to assign higher weight for \ud835\udc990. Most of these adaptive locality models are learned during model training except the selfweight \ud835\udefcin GCN models like APPNP which is tuned upon the validation set. Causal effect. Causal effect is a concept in causal science [35], which studies the influence among variables. Given two variables \ud835\udc4band \ud835\udc4c, the causal effect of \ud835\udc4b= \ud835\udc65on \ud835\udc4cis to what extent changing the value of \ud835\udc4bto \ud835\udc65affects the value of \ud835\udc4c, which is abstracted as: \ud835\udc4c\ud835\udc65\u2212\ud835\udc4c\ud835\udc65\u2217, (3) where \ud835\udc4c\ud835\udc65and \ud835\udc4c\ud835\udc65\u2217are the outcomes of \ud835\udc4cwith \ud835\udc4b= \ud835\udc65and \ud835\udc4b= \ud835\udc65\u2217as inputs, respectively. \ud835\udc65\u2217is the reference status of variable \ud835\udc4b, which is typically set as empty value (e.g., zero) or the expectation of \ud835\udc4b. 3 METHODOLOGY In this section, we first scrutinize the cause-effect factors in the inference procedure of GCN, and then introduce the proposed CGI. Assume that we are given a well-trained GCN \ud835\udc53(\ud835\udc99, N (\ud835\udc99)| \u02c6 \ud835\udf03), which is optimized over the training nodes according to the following objective function: \u02c6 \ud835\udf03= min \ud835\udf03 \ud835\udc40 \u2211\ufe01 \ud835\udc56=1 (\ud835\udc59( \u02c6 \ud835\udc9a\ud835\udc56,\ud835\udc9a\ud835\udc56)) + \ud835\udf06\u2225\ud835\udf3d\u22252 \ud835\udc39, (4) where \ud835\udc59(\u00b7) denotes a classification loss function such as crossentropy, \u02c6 \ud835\udc9a\ud835\udc56= \ud835\udc53(\ud835\udc99\ud835\udc56, N (\ud835\udc99\ud835\udc56)| \u02c6 \ud835\udf03) \u2208R\ud835\udc3fdenotes the model prediction for node \ud835\udc56, and \ud835\udf06is a hyper-parameter to balance the training loss and regularization term for preventing overfitting. It should be noted that \u02c6 \ud835\udc9a\ud835\udc56is a probability distribution over the label space. The final classification \u02c6 \ud835\udc67\ud835\udc56corresponds to the category with the largest probability, which is formulated as: \u02c6 \ud835\udc67\ud835\udc56= arg max \ud835\udc57 \u02c6 \ud835\udc66(\ud835\udc56,\ud835\udc57), \ud835\udc57\u2264\ud835\udc3f, (5) where \u02c6 \ud835\udc66(\ud835\udc56,\ud835\udc57) is the \ud835\udc57-th entry of \u02c6 \ud835\udc9a\ud835\udc56. In the following, the mention of prediction and classification mean the predicted probability distribution ( \u02c6 \ud835\udc9a\ud835\udc56) and category (\u02c6 \ud835\udc67\ud835\udc56), respectively. Besides, the subscript \ud835\udc56 will be omitted for briefness. 3.1 Cause-effect View Causal graph. Causal graph is a directed acyclic graph to describe a data generation process [35], where nodes represent variables in the process, and edges represent the causal relations between variables. To facilitate analyzing the inference of GCN, i.e., the generation process of the output, we abstract the inference of GCN as a causal graph (Figure 2(a)), which consists of four variables: \u2022 \ud835\udc4b, which denotes the features of the target node. \ud835\udc99is an instance of the variable. \u2022 \ud835\udc41, which denotes the neighbors of the target node, e.g., N (\ud835\udc99). The sample space of \ud835\udc41is the power set of all nodes in \ud835\udc3a. \u2022 \u00af \ud835\udc4b, which is the output of graph convolution at the last GCN layer. \u2022 \u02c6 \ud835\udc4c, which denotes the GCN prediction, i.e., the instance of \u02c6 \ud835\udc4cis \u02c6 \ud835\udc9a. Functionally speaking, the structure \ud835\udc4b\u2212\u2192\u00af \ud835\udc4b\u2190\u2212\ud835\udc41represents the graph convolution where both the target node features and neighbor nodes directly affect the convolution output. The output of the graph convolution \u00af \ud835\udc4bthen directly affects the model prediction, which is represented as \u00af \ud835\udc4b\u2212\u2192\u02c6 \ud835\udc4cNote that there is a direct edge \ud835\udc4b\u2212\u2192 \u02c6 \ud835\udc4c, which means that \ud835\udc4bdirectly affects the prediction. We include this direct edge for two considerations: 1) residual connection is widely used in GCN to prevent the over-smoothing issue [20], which enables the features of the target node influence its prediction directly; 2) recent studies reveal the advantages of two-stage GCN where the model first makes prediction from each node\u2019s features; and then conducts graph convolution. Recall that the conventional GCN inference, i.e., the calculation of \u02c6 \ud835\udc9a, is typically a one-pass forward propagation of the GCN model with \ud835\udc99and N (\ud835\udc99) as inputs. Based on the causal graph, the procedure can be interpreted as Figure 2(b), where every variable obtains an instance (e.g., \ud835\udc4b= \ud835\udc99). Apart from the new understanding of the conventional GCN inference, the causal theory provides analytical tools based on the causal graph, such as causal intervention [35], which enable the in-depth analysis of the factors resulting in the prediction and further reasoning based on the prediction [36]. Causal intervention. Our target is to assess whether the prediction on a target testing node faces the local structure discrepancy issue and further adjust the prediction to achieve adaptive locality. We resort to causal intervention to estimate the causal effect of target node\u2019s neighbors on the prediction (i.e., the causal effect of \ud835\udc41= N (\ud835\udc99)), which forcibly assigns an instance to a treatment variable. Formally, the causal effect \ud835\udc86\u2208R\ud835\udc3fis defined as: \ud835\udc86= \ud835\udc53(\ud835\udc99, N(\ud835\udc99) | \u02c6 \ud835\udf03) \u2212\ud835\udc53(\ud835\udc99,\ud835\udc51\ud835\udc5c(\ud835\udc41= \u2205) | \u02c6 \ud835\udf03), = \ud835\udc53(\ud835\udc99, N(\ud835\udc99) | \u02c6 \ud835\udf03) \u2212\ud835\udc53(\ud835\udc99, \u2205| \u02c6 \ud835\udf03), = \u02c6 \ud835\udc9a\u2212\u02c6 \ud835\udc9a\ud835\udc60. \ud835\udc51\ud835\udc5c(\ud835\udc41 = \u2205) represents a causal intervention which forcefully assigns a reference status of \ud835\udc41, resulting in a post-intervention prediction \ud835\udc53(\ud835\udc99,\ud835\udc51\ud835\udc5c(\ud835\udc41= \u2205)| \u02c6 \ud835\udf03) (see Figure 2(c)). Since \ud835\udc41does not have predecessor, \ud835\udc53(\ud835\udc99,\ud835\udc51\ud835\udc5c(\ud835\udc41= \u2205)| \u02c6 \ud835\udf03) = \ud835\udc53(\ud835\udc99, \u2205| \u02c6 \ud835\udf03), which is denoted as \u02c6 \ud835\udc9a\ud835\udc60\u2208R\ud835\udc3f. Intuitively, the post-intervention prediction means: if the target node has no neighbor, what the prediction would be. We believe that \ud835\udc86provides clues for performing adaptive locality on the target node. For instance, we might adjust the original prediction, if the entries of \ud835\udc86have abnormal large absolute values, which means that the local structure at the target node may not satisfy the homophily assumption [30]. Note that we take empty set as a representative reference status of \ud835\udc41= N (\ud835\udc99) since the widely usage of empty value as reference in causal intervention [35], but can replace it with any subset of N (\ud835\udc99) (see Section 3.3). 3.2 Causal GCN Inference Mechanism The requirement of adaptive locality for the testing nodes pushes us to build up an additional mechanism, i.e., CGI, to enhance the GCN inference stage. We have two main considerations for devising the mechanism: 1) the mechanism has to be learned from the data, instead of handcrafted, to enable its usage on different GCN models and different datasets. 2) the mechanism should effectively capture the connections between the causal effect of \ud835\udc41= N (\ud835\udc99) and local structure discrepancy, i.e., learning the patterns for adjusting the original prediction to improve the prediction accuracy. \ud835\udc3f-way classification model. A straight forward solution is devising the CGI as a \ud835\udc3f-way classification model that directly generates the final prediction according to the original prediction \u02c6 \ud835\udc9a, the postintervention prediction \u02c6 \ud835\udc9a\ud835\udc60, and the causal effect \ud835\udc86. Formally, \u00af \ud835\udc9a= \u210e( \u02c6 \ud835\udc9a, \u02c6 \ud835\udc9a\ud835\udc60, \ud835\udc86|\ud835\udf14), (6) where \u210e(\u00b7) denotes a \ud835\udc3f-way classifier parameterized by \ud835\udf14and \u00af \ud835\udc9a\u2208 R\ud835\udc3fdenotes the final prediction. Similar to the training of GCN, we can learn the parameters of \u210e(\u00b7) by optimizing classification loss over the labeled nodes, which is formulated as: \u02c6 \ud835\udf4e= min \ud835\udf4e \ud835\udc40 \u2211\ufe01 \ud835\udc56=1 (\ud835\udc59( \u00af \ud835\udc9a\ud835\udc56, \ud835\udc9a\ud835\udc56)) + \ud835\udefc\u2225\ud835\udf4e\u22252 \ud835\udc39, (7) where \ud835\udefcis a hyperparameter to adjust the strength of regularization. Undoubtedly, this model can be easily developed and applied to any GCN. However, as optimized over the overall classification loss, the model will face the similar issue of attention mechanism [22]. To bridge this gap, it is essential to learn CGI under the awareness of whether a testing node encounters local structure discrepancy. Choice model. Therefore, the inference mechanism should focus on the nodes with inconsistent classifications from \u02c6 \ud835\udc9aand \u02c6 \ud835\udc9a\ud835\udc60, i.e., \u02c6 \ud835\udc67\u2260 \u02c6 \ud835\udc67\ud835\udc60where \u02c6 \ud835\udc67is the original classification and \u02c6 \ud835\udc67\ud835\udc60= arg max\ud835\udc57\u02c6 \ud835\udc66\ud835\udc60 (\ud835\udc57), \ud835\udc57\u2264 \ud835\udc3fis the post-intervention classification. That is, we let the CGI mechanism learn from nodes where accounting for neighbors causes the change of the classification. To this end, we devise the inference mechanism as a choice model, which is expected to make wise choice between \u02c6 \ud835\udc67and \u02c6 \ud835\udc67\ud835\udc60to eliminate the impact of local structure discrepancy. Formally, \u00af \ud835\udc67= (\u02c6 \ud835\udc67, \u02c6 \ud835\udc5d\u2265\ud835\udc61, \u02c6 \ud835\udc67\ud835\udc60, \u02c6 \ud835\udc5d< \ud835\udc61, \u02c6 \ud835\udc5d= \ud835\udc54( \u02c6 \ud835\udc9a, \u02c6 \ud835\udc9a\ud835\udc60, \ud835\udc86|\ud835\udf3c), (8) where \ud835\udc54(\u00b7) denotes a binary classifier with parameters of \ud835\udf3c; the output of the classifier \ud835\udc5dis used for making choice; and \ud835\udc61is the decision threshold, which depends on the classifier selected. To learn the model parameters \ud835\udf3c, we calculate the ground truth for making choice according to the correctness of \u02c6 \ud835\udc67and \u02c6 \ud835\udc67\ud835\udc60. Formally, the choice training data of the binary classifier is: D = {(\ud835\udc99, \ud835\udc5d) | \u02c6 \ud835\udc67= \ud835\udc67\u222a\u02c6 \ud835\udc67\ud835\udc60= \ud835\udc67} , \ud835\udc5d= \ud835\udc53\ud835\udc59\ud835\udc4e\ud835\udc54( \u02c6 \ud835\udc67= \ud835\udc67), (9) where \ud835\udc67denotes the correct category of node \ud835\udc99; \ud835\udc53\ud835\udc59\ud835\udc4e\ud835\udc54(\u02c6 \ud835\udc67= \ud835\udc67) = 1 if \u02c6 \ud835\udc67equals to \ud835\udc67, \ud835\udc53\ud835\udc59\ud835\udc4e\ud835\udc54(\u02c6 \ud835\udc67= \ud835\udc67) = \u22121 otherwise. The training of the choice model is thus formulated as: \u02c6 \ud835\udf3c= min \ud835\udf3c \u2211\ufe01 (\ud835\udc99,\ud835\udc5d)\u2208D \ud835\udc59( \u02c6 \ud835\udc5d, \ud835\udc5d) + \ud835\udefd\u2225\ud835\udf3c\u22252 \ud835\udc39, (10) where \ud835\udefdis a hyperparameter to adjust the strength of regularization. Data sparsity. Inevitably, the choice training data D will face sparsity issue for two reasons: 1) labeled nodes are limited in some applications; and 2) only a small portion of the labeled nodes satisfy the criteria of D. To tackle the data sparsity issue, we have two main considerations: 1) the complexity of the binary classifier should be controlled strictly. Towards this end, we devise the choice model as a Support Vector Machine [37] (SVM), since SVM only requires a few samples to serve as the support vectors to make choice. 2) the inputs of the binary classifier should free from the number of classes \ud835\udc3f, which can be large in some applications. To this end, we distill low dimensional and representative factors from the two predictions (i.e., \u02c6 \ud835\udc9aand \u02c6 \ud835\udc9a\ud835\udc60) and the causal effect \ud835\udc86) to serve as the inputs of the choice model, which is detailed in Section 3.3. To summarize, as compared to conventional GCN inference, the proposed CGI has two main differences: \u2022 In addition to the original prediction, CGI calls for causal intervention to further make a post-intervention prediction. \u2022 CGI makes choice between the original prediction and postintervention prediction with a choice model. Below summarizes the slight change of GCN\u2019s training and inference schema to apply the proposed CGI: Algorithm 1 Applying CGI to GCN Input: Training data \ud835\udc7f, \ud835\udc68, \ud835\udc80. /* Training */ 1: Optimize Equation (4), obtaining GCN ( \u02c6 \ud835\udf3d); \u22b2GCN training 2: Construct D; \u22b2Causal intervention 3: Optimize Equation (10), obtaining choice model ( \u02c6 \ud835\udf3c); \u22b2CGI training 4: Return \u02c6 \ud835\udf3dand \u02c6 \ud835\udf3c. /* Testing */ 5: Calculate \ud835\udc53(\ud835\udc99, N(\ud835\udc99) | \u02c6 \ud835\udf3d); \u22b2Original prediction 6: Calculate \ud835\udc53(\ud835\udc99, \u2205| \u02c6 \ud835\udf3d); \u22b2Post-intervention prediction Calculate final classification with Equation (8); 3.3 Input Factors To reduce the complexity of the choice model, we distill three types of factors as the input: causal uncertainty, prediction confidence, category transition. Causal uncertainty. According to the homophily assumption [30], the neighbors should not largely changes the prediction of the target node. Therefore, the target node may face the local structure discrepancy issue if the causal effect \ud835\udc86of the neighbors has large variance. That is, the causal effect exhibits high uncertainty w.r.t. different reference values. Inspired by the Monte Carlo uncertainty estimation, we resort to the variance of \ud835\udc86to describe the causal uncertainty, which is formulated as: \ud835\udc97= \ud835\udc63\ud835\udc4e\ud835\udc5f({\ud835\udc53(\ud835\udc99, N (\ud835\udc99)\ud835\udc58| \u02c6 \ud835\udf03)|\ud835\udc58\u2264\ud835\udc3e}), (11) where N (\ud835\udc99)\ud835\udc58\u2282N (\ud835\udc99), \ud835\udc63\ud835\udc4e\ud835\udc5f(\u00b7) is an element-wise operation that calculates the variance on each class over the \ud835\udc3esamples, and \ud835\udc97\u2208R\ud835\udc3f denotes class-wise variance. In particular, we perform \ud835\udc3etimes of causal intervention with \ud835\udc41= N (\ud835\udc99)\ud835\udc58and then calculate the variance of the corresponding \ud835\udc3ecausal effects. If an entry of \ud835\udc97 exhibits a large value, it reflects that minor changes on the subgraph structure can cause large changes on the prediction probability over the corresponds class. According to the original classification \u02c6 \ud835\udc67, we select the \u02c6 \ud835\udc67-th entry of \ud835\udc97as a representative of the Monte Carlo causal effect uncertainty, which is termed as graph_var. In practice, we calculate the post-intervention predictions by repeating \ud835\udc3etimes of GCN inference with edge dropout [39] applied, i.e., each edge has a probability \ud835\udf0fto be removed. Prediction confidence. There has been a surge of attention on using model predictions such as model distillation [13] and selfsupervised learning [8]. The intuition is that a larger probability indicates higher confidence on the classification. As such, a factor of prediction reliability is the prediction confidence, i.e., trusting the prediction with higher confidence. Formally, we calculate two factors: self_conf ( \u02c6 \ud835\udc9a\u02c6 \ud835\udc67) and neighbor_conf ( \u02c6 \ud835\udc9a\ud835\udc60 \u02c6 \ud835\udc67\ud835\udc60), respectively. Category transition. The distribution of edges over categories is not uniform w.r.t. : the ratio of intra-category connection and inter-category connection. Over the labeled nodes, we can calculate the distribution and form a category transition matrix \ud835\udc47where \ud835\udc47\ud835\udc56,\ud835\udc57is the ratio of edges between category \ud835\udc56and \ud835\udc57to the edges connect category \ud835\udc56. Figure 3 illustrates an example on the OGBarXiv dataset (raw normalized). We can see that the probability of intro-category connection (diagonal entries) varies in a large range ([0.19, 0.64]). The distribution of inter-category probability is also skewed. Intuitively, such probabilities can be clues for choosing the correct prediction, e.g., \u02c6 \ud835\udc9amight be trustworthy if\ud835\udc47\u02c6 \ud835\udc67,\u02c6 \ud835\udc67is high. To this end, we calculate four factors: self_self (\ud835\udc47\u02c6 \ud835\udc67,\u02c6 \ud835\udc67), neighbor_neighbor (\ud835\udc47\u02c6 \ud835\udc67\ud835\udc60,\u02c6 \ud835\udc67\ud835\udc60), self_neighbor (\ud835\udc47\u02c6 \ud835\udc67,\u02c6 \ud835\udc67\ud835\udc60), and neighbor_self (\ud835\udc47\u02c6 \ud835\udc67\ud835\udc60,\u02c6 \ud835\udc67). 4 EXPERIMENTS We conduct experiments on seven node classification datasets to answer the following research questions: RQ1: How effective is the proposed CGI model to resolve the local structure discrepancy issue? RQ2: To what extend the proposed CGI facilitates node classification under different problem settings? RQ3: How do the distilled factors influence the effectiveness of the proposed CGI? 4.1 Experimental Settings 4.1.1 Dataset. For the full-supervised settings, we use the widely used benchmark dataset of citation network, OGB-arXiv [15], which represents papers and their citation relations as nodes and edges, respectively. Each node has 128 features generated by averaging the embeddings of words in its title and abstract, where the embeddings are learned by the skip-gram model [31]. Considering that the such old-fashioned text feature may not be representative, we replace the node features with a 768-dimensional vector extracted by feeding Figure 3: The category transition matrix on OGB-arXiv. To save space, we cut the number of categories to ten. the title and abstract into RoBERTa [28] (12-layer ), where the representation of [CLS] token at the second last layer is selected. For the semi-supervised settings, we adopt three widely used citation networks, Cora, Citeseer, and Pubmed, and select the 20shot data split released by [20], where 500 and 1000 nodes are selected as validation and testing, 20 nodes from each category are labeled for training. Apart from the real-world graphs, we further created three synthetic ones based on Citeseer by intentionally adding cross-category edges on 50% randomly selected nodes, which leads to local structure discrepancy between the poisoned nodes and the unaffected ones. Note that more cross-category edges lead to stronger discrepancy, making adaptive locality more critical for GCN models. In particular, according to the number of edges in the original Citeseer, we add 10%, 30%, and 50% of cross-category edges, constructing Citeseer(10%), Citeseer(30%), and Citeseer(50%). Note that the data split and node features are unchanged. 4.1.2 Compared Methods. To justify the proposed CGI, we compare it with the representative GCN, including GraphSAGE [11], GCN [20], GAT [44], JKNet [55], DAGNN [27], and APPNP [21], which adopts normal inference. Apart from GCN models, we also test MLP, which discard the graph structure and treat node classification as normal text classification. Lastly, as CGI uses two predictions, we include an ensemble baseline which averages the prediction of APPNP and MLP. For these models, we use the implementations on the OGB leaderboard2. If necessary, e.g., under the transductive full-supervised setting, the hyper-parameters are tuned according to the settings in the original paper of the model. For the proposed CGI, we equipped the SVM with RBF kernel3 and apply CGI to APPNP. For the SVM, we tune two hyper-parameters \ud835\udc50and \ud835\udefethrough 5-fold cross-validation, i.e., splitting the nodes in validation into 5 folds. In addition, for the MCE that estimates graph uncertainty, we set the number of repeats and the edge dropout ratio \ud835\udf0fas 50 and 0.15. 4.2 Effects of CGI (RQ1) We first investigate to what extent the proposed CGI address the local structure discrepancy issue on the three synthetic datasets 2https://ogb.stanford.edu/docs/leader_nodeprop/#ogbn-arxiv. 3https://scikit-learn.org/stable/modules/svm.html. Citeseer(10%), Citeseer(30%), and Citeseer(50%). Table 1 shows the performance of APPNP, APPNP_Self, and APPNP_CGI on the three datasets, where the final prediction is the original prediction (i.e., \u02c6 \ud835\udc9a, the post-intervention prediction (i.e., \u02c6 \ud835\udc9a\ud835\udc60), and the final prediction from CGI (i.e., \u00af \ud835\udc9a), respectively. Note that the graph structure of the three datasets are different, the APPNP model trained on the datasets will thus be different. As such, the APPNP_Self will get different performance on the three datasets, while the node features are unchanged. From the table, we have the following observations: \u2022 In all cases, APPNP_CGI outperforms APPNP, which validates the effectiveness of the proposed CGI. The performance gain is attributed to the further consideration of adaptive locality during GCN inference. In particular, the relative improvement over APPNP achieved by APPNP_CGI ranges from 1.1% to 7.2% across the three datasets. The result shows that CGI achieves large improvement over compared conventional one-pass GCN inference as more cross-category edges are injected, i.e., facing with more severe local structure discrepancy issue. The result further exhibits the capability of CGI to address the local structure discrepancy issue. \u2022 As more cross-category edges being added, APPNP witnesses severe performance drop from the accuracy of 71.0% to 64.2%. This result is reasonable since GCN is vulnerable to crosscategory edges which pushes the representations of node in different categories to be close [4]. Considering that APPNP has considered adaptive locality during model training, this result validates that adjusting the GCN architecture is insufficient to address the local structure discrepancy issue. \u2022 As to APPNP_Self, the performance across the three datasets is comparable to each other. It indicates that the cross-category edges may not hinder the GCN to encode the association between target node features and the label. Therefore, the performance drop of APPNP when adding more cross-category edges is largely due to the improper neighbor aggregation without thorough consideration of the local structure discrepancy issue. Furthermore, on Citeseer(50%), the performance of APPNP_Self is comparable to APPNP, which indicates that the effect of considering adaptive locality during training is limited if the discrepancy is very strong. 4.3 Performance Comparison (RQ2) To further verify the proposed CGI, we conduct performance comparison under both full-supervised and semi-supervised settings on the real-world datasets. 4.3.1 Semi-supervised setting. We first investigate the effect of CGI under the semi-supervised setting by comparing the APPNP_CGI with APPNP, APPNP_Self, and APPNP_Ensemble. The four methods corresponds to four inference mechanisms: 1) conventional one-pass GCN inference (APPNP); 2) causal intervention without consideration of graph structure (APPNP_Self); 3) ensemble of APPNP and APPNP_Self (APPNP_Ensemble); and 4) the proposed CGI. Note that the four inference mechanisms are applied on the same APPNP model with exactly same model parameters. Table 2 shows the node classification performance on three real-world datasets: Cora, Citeseer, and Pubmed. From the table, we have the following observations: Dataset Citeseer(10%) Citeseer(30%) Citeseer(50%) APPNP 71.0% 64.4% 64.2% APPNP_Self 65.1% 62.9% 64.3% APPNP_CGI 71.8% 66.9% 68.6% RI 1.1% 3.9% 7.2% Table 1: Performance of APPNP\u2019s original prediction, postintervention prediction, and CGI prediction on the three synthetic datasets w.r.t. accuracy. RI means the relative improvement over APPNP achieved by APPNP_CGI. Dataset Cora Citeseer Pubmed APPNP 81.8% 72.6% 79.8% APPNP_Self 69.3% 66.5% 75.9% APPNP_Ensemble 78.0% 71.4% 79.2% APPNP_CGI 82.3% 73.7% 81.0% RI 5.5% 2.8% 2.3% Table 2: Performance of APPNP with different inference mechanisms on three semi-supervised node classification datasets w.r.t. the classification accuracy. RI means the relative improvement of APPNP_CGI over APPNP_Ensemble. \u2022 On the three datasets, the performance of APPNP_Self is largely worse than APPNP, i.e., omitting graph structure during GCN inference witnesses sharp performance drop under semi-supervised setting, which shows the importance of considering neighbors. Note that the performance of APPNP_Self largely surpasses the performance of MLP reported in [20], which highlights the difference between performing causal intervention \ud835\udc51\ud835\udc5c(\ud835\udc41= \u2205) on a GCN model and the inference of MLP which is trained without the consideration of graph structure. \u2022 In all cases, APPNP_Ensemble performs worse than APPNP, which is one of the base models of the ensemble. The inferior performance of APPNP_Ensemble is mainly because of the huge gap between the performance of APPNP and APPNP_Self. From this results, we can conclude that, under semi-supervised setting, simply aggregating the original prediction and post-intervention prediction does not necessarily lead to better adaptive locality. Furthermore, the results validate the rationality of a carefully designed inference mechanism. \u2022 In all cases, APPNP_CGI achieves the best performance. The performance gain is attributed to the choice model, which further validates the effectiveness of the proposed CGI. That is, it is essential to an inference model from the data, which accounts for the causal analysis of the original prediction. Moreover, this result reflects the potential of enhancing the inference mechanism of GCN for better decision making, especially the causality oriented analysis, which deserves further exploration in future research. 4.3.2 Full-supervised setting. We then further investigate the effect of CGI under the full-supervised setting. Note that we test the models under both inductive and transductive settings on the OGB-arXiv dataset. As OGB-arXiv is a widely used benchmark, we also test the baseline methods. Table 3 shows the node classification performance of the compared methods on the OGB-arXiv dataset w.r.t. accuracy. Apart from the RoBERTa features, we also report the performance of baseline models with the original Word2Vec features. From the table, we have the following observations: \u2022 The performance gap between MLP and GCN models will be largely bridged when replacing the Word2Vec features with the more advanced RoBERTa features. In particular, the relative performance improvement of GCN models over MLP shrinks from 27.9% to 3.7%. The result raises a concern that the merit of GCN model might be unintentionally exaggerated [20] due to the low quality of node features. \u2022 Moreover, as compared to APPNP, DAGNN performs better as using the Word2Vec features, while performs worse when using the RoBERTa features. It suggests accounting for feature quality in future research that investigates the capability of GCN or compares different GCN models. \u2022 As to RoBERTa features, APPNP_Ensemble performs slightly better than its base models, i.e., APPNP_Self and APPNP. This result is different from the result in Table 2 under semi-supervised setting where the performance of APPNP_Self is inferior. We thus believe that improving the accuracy of the post-intervention prediction will benefit GCN inference [66]. As averaging the prediction of APPNP_Self and APPNP can also be seen as a choosing strategy by comparing model confidence, the performance gain indicates the benefit of considering adaptive locality during inference under full-supervised setting. \u2022 APPNP_CGI further outperforms APPNP_Ensemble under both inductive and transductive settings, which is attributed to the choice model that learns to make choice from patterns of causal uncertainty, prediction confidence, and category transition factors. This result thus also shows the merit of characterizing the prediction of GCN models with the distilled factors. \u2022 In all cases, the model achieves comparable performance under the inductive setting and the transductive setting. We postulate that the local structure discrepancy between training and testing nodes in the OGB-arXiv dataset is weak, which is thus hard for CGI to achieve huge improvements. In the following, the experiment is focused on the inductive setting which is closer to real-world scenarios that aim to serve the upcoming nodes. 4.4 In-depth Analysis (RQ3) 4.4.1 Effects of Distilled Factors. We then study the effects of the distilled factors as the inputs of the choice model in CGI. In particular, we compare the factors w.r.t. the performance of CGI as removing one factor in each round, where lower performance indicates larger contribution of the factor. Note that we report the accuracy regarding whether CGI makes the correct choice for testing nodes, rather than the accuracy for node classification. That is to say, here we only consider \u201cconflict\u201d testing nodes where the two inferences of CGI (i.e., APPNP and APPNP_Self) have different classifications. Figure 4 shows the performance on OGBarXiv under the inductive setting, where 6,810 nodes among the 47,420 testing nodes are identified as the conflict nodes. We omit the results of other datasets under the semi-supervised setting for saving space, which have a close trend. From the figure, we have the following observations: 1) Discarding any factor will lead to performance drop as compared to the case with all factors as inputs of the choice model (i.e., All factors). This result indicates the effectiveness of the identified factors on characterizing GCN predictions which facilitate making Feature Method Inductive Transductive Word2Vec (128) MLP 55.84% 55.84% GraphSAGE 71.43% 71.52% GCN 71.83% 71.96% GAT 71.93% 72.04% JKNet 72.25% 72.48% DAGNN 72.07% 72.09% APPNP 71.61% 71.67% RoBERTa (768) JKNet 75.59% 75.54% MLP 72.26% 72.26% DAGNN 74.93% 74.83% APPNP 75.74% 75.61% APPNP_Self 73.43% 73.38% APPNP_Ensemble 76.26% 75.86% APPNP_CGI 76.52% 76.07% Table 3: Performance comparison under full-supervised settings. We use bold font and underline to highlight the best and second best performance under each setting. Figure 4: Illustration of factor influence on CGI. the correct choice. 2) Among the factors, removing self_conf and neighbor_conf leads to the largest performance drop, showing that the confidence of prediction is the most informative factor regarding the reliability of the prediction. 3) In all cases, the performance of CGI surpasses the Majority class, which always chooses the original GCN prediction, i.e., CGI degrades to the conventional one-pass inference. The result further validates the rationality of additionally considering adaptive locality during GCN inference, i.e., choosing between the original prediction and the post-intervention prediction without consideration of neighbors. Lastly, considering that the \u201cconflict\u201d nodes account for 14.4% in the testing nodes (6,810/47,420) and the accuracy of CGI\u2019s choices is 66.53%, there is still a large area for future exploration. 4.4.2 Study on causal uncertainty. Recall that we propose a Monte Carlo causal effect uncertainty (MCE) estimation to estimate the uncertainty of neighbors\u2019 causal effect. We then investigate to what extent the MCE sheds light on the correctness of GCN prediction. Figure 5(a) shows the group-wise performance of APPNP on OGB-arXiv where the testing nodes are ranked according to the value of graph_var in an ascending order and split into ten groups with equal size. Note that we select OGBarXiv for its relatively large scale where the testing set includes 47,420 nodes. From the figure, we can see a clear trend that the classification performance decreases as the MCE increases. It means (a) MCE (b) Confidence (Conf) (c) Conf and MCE redundancy Figure 5: Group-wise illustration of the causal uncertainty and the confidence of APPNP prediction, where MCE stands for the Monte Carlo causal effect uncertainty estimation (i.e., graph_var.) Model APPNP JKNet DAGNN Self+Neighbor 76.03 75.69 75.28 Self+Neighbor_Trust 78.30 75.71 78.61 Self+Neighbor_Bound 81.40 81.96 82.03 Table 4: Node classification performance of three GCN models: APPNP, JKNet, and DAGNN on OGB-arXiv. that the calculated MCE is informative for the correctness of GCN predictions. For instance, a prediction has higher chance to be correct if its MCE is low. As a reference, in Figure 5(b), we further depict the group-wise performance w.r.t. the prediction confidence (i.e., neighbor_conf). In particular, the testing nodes are ranked according to the value of neighbor_conf in a descending order. As can be seen, there is also a clear trend of prediction performance regarding the confidence, i.e., the probability of being correct is higher if APPNP is more confident on the prediction. To investigate whether MCE and GCN confidence are redundant, we further calculate the overlap ratio between the groups split by graph_var and the ones split by neighbor_conf. Figure 5(c) illustrates the matrix of overlap ratios. As can be seen, the weights are not dedicated on the diagonal entries. In particular, there are only two group pairs with overlap ratio higher than 0.5, which means that the MCE reveals the property of GCN prediction complementary to the confidence. That is, causal analysis indeed characterizes GCN predictions from distinct perspectives. 4.4.3 Training with trustworthiness signal. To further investigate the benefit of performing adaptive locality during model inference, we further conduct a study on OGB-arXiv to test whether the GCN equipped with adaptive locality modules can really assess the trustworthiness of neighbors. Three representative GCN models with consideration of adaptive locality, APPNP, JKNet, and DAGNN, are tested under three different configurations: \u2022 Self+Neighbor: This is the standard configuration of GCN model that accounts for the graph structure, i.e., trusting neighbors. \u2022 Self+Neighbor_Trust: As compared to Self+Neighbor, a trustworthy feature is associated with each node, which indicates the \u201cground truth\u201d of trusting self or neighbors. In particular, we train the GCN model, infer the original prediction and the post-intervention prediction, calculate the trustworthy feature according to Equation (10) (i.e., \ud835\udc5d). For the nodes where the Figure 6: Training loss on OGB-arXiv under the Self+Neighbor and Self+Neighbor_Trust configurations. original classification and the post-intervention classification are equal, we set the value as 0. By explicitly incorporating such value as a node feature, it should be easy for GCN to learn for properly performing adaptive locality if it works properly. \u2022 As a reference, we study the GCNs in an ideal case, named Self+Neighbor_Bound, where the trustworthy feature is also given when performing adaptive locality during model inference. Table 4 shows the model performance under the node classification setting of inductive full-supervised learning. From the table, we have the following observations: \u2022 As compared to Self+Neighbor, all the three models, especially APPNP and DAGNN, achieve better performance under the configuration of Self+Neighbor_Trust. It indicates a better usage of the graph structure, which is attributed to the trustworthy feature. The result thus highlights the importance of modeling neighbor trustworthiness and performing adaptive locality. \u2022 However, there is a large gap between Self+Neighbor_Trust and Self+Neighbor_Bound, showing the underuse of the trustworthy feature by the current adaptive locality methods. We postulate the reason to be the gap between the training objective, i.e., associating node representation with label, and the target of identifying trustworthy neighbors, which is the limitation of considering adaptive locality in model training. The performance under Self+Neighbor_Bound also reveals the potential of considering adaptive locality in model inference. Furthermore, we study the impact of trustworthy feature on model training. Figure 6 illustrates the training loss along the training procedure of the tested GCNs under the configuration of Self+Neighbor and Self+Neighbor_Trust. It should be noted that we select the period from 200 to 750 epochs for better visualization. From the figure, we can see that, in all the three cases, the loss of GCN under Self+Neighbor_Trust is smaller than that under Self+Neighbor. The result shows that the trustworthy feature facilitates the GCN model fitting the training data, i.e., capturing the correlation between the node label and the node features as well as the graph structure. However, the adaptive locality module, especially graph attention, is distracted from the target of assessing neighbor trustworthiness. Theoretically, the graph attention can achieve the target by simply recognizing the value of the trustworthy feature from the inputs. For instance, the hop attention in DAGNN should highlight the target node representation at layer 0 if the trustworthy feature is 1. 5 RELATED WORK Graph Convolutional Network. According to the format of the convolution operations, existing GCN models can be divided into two categories: spatial GCN and spectral GCN [65]. Spectral GCN is defined as performing convolution operations in the Fourier domain with spectral node representations [2, 10, 20, 25, 52]. For instance, Bruna et al. [2] perform convolution over the eigenvectors of graph Laplacian which are treated as the Fourier basis. Due to the high computational cost of the eigen-decomposition, a line of spectral GCN research has been focused on accelerating the eigen-decomposition with different approximation techniques [10, 20, 25, 52]. However, applying such spectral GCN models on large graphs still raises unaffordable memory cost, which hinders the their practical research. To some extent, the attention on GCN research has been largely dedicated on the spatial GCN, which performs convolution operations directly over the graph structure by aggregating the features from spatially close neighbors to a target node [1, 11, 20, 44, 45, 51, 54]. This line of research mainly focuses on the development of the neighbor aggregation operation. For instance, Kipf and Welling [20] propose to use a linear aggregator (i.e., weighted sum) that uses the reverse of node degree as the coefficient. In addition to aggregating information from directly connected neighbors, augmented aggregators also account for multi-hop neighbors [18, 53]. Moreover, non-linear aggregators are also employed in spatial GCNs such as capsule [45] and Long Short-Term Memory (LSTM) [11]. Besides, the general spatial GCN designed for simple graphs is extended to graphs with heterogeneous nodes [50] and temporal structure [34]. Beyond model design, there are also studies on the model capability analysis [54], model explanation [58], and training schema [16]. However, most of the existing studies focus on the training stage and blindly adopt the one-pass forward propagation for GCN inference. This work is in an orthogonal direction, which improve the inference performance with an causal inference mechanism so as to better solve the local structure discrepancy issue. Moreover, to the best of our knowledge, this work is the first to introduce the causal intervention and causal uncertainty into GCN inference. Adaptive Locality. Amongst the GCN research, a surge of attention has been especially dedicated to solving the over-smoothing issue [24]. Adaptive locality has become the promising solution to alleviate the over-smoothing issue, which is typically achieved by the attention mechanism [6, 9, 44, 46, 47, 50, 55, 61] or residual connection [7, 20, 23]. Along the line of research on attention design, integrating context information into the calculation of attention weight is one of the most popular techniques. For instance, Wang et al. [47] treats the neighbors at different hops as augmentation of attention inputs. Moreover, to alleviate the issue of lacking direct supervision, Wang et al. [46] introduce additional constraints to facilitate attention learning. Similar as Convolutional Neural Networks, residual connection has also been introduced to original design of GCN [20], which connects each layer to the output directly. In addition to the vanilla residual connection, the revised versions are also introduced such as the pre-activation residual [23] and initial residual [7]. Besides, the concept of inception module is also introduced to GCN model [19], which incorporates graph convolutions with different receptive fields. For the existing methods, the adaptive locality mechanism is fixed once the GCN model is trained. Instead, this work explores adaptive locality during model inference, which is in an orthogonal direction. Causality-aware Model Prediction. A surge of attention is being dedicated to incorporating causality into the ML schema [17, 32, 56, 60, 62, 63]. A line of research focuses on enhancing the inference stage of ML model from the cause-effect view [33, 41, 48, 59]. This work differs from them for two reasons: 1) none of the existing work studies GCN; and 2) we learn a choice model to make final prediction from causal intervention results instead of performing a heuristic causal inference for making final prediction. 6 CONCLUSION This paper revealed that learning an additional model component such as graph attention is insufficient for addressing the local structure discrepancy issue of GCN models. Beyond model training, we explored the potential of empowering the GCNs with adaptive locality ability during the inference. In particular, we proposed an causal inference mechanism, which leverages the theory of causal intervention, generating a post intervention prediction when the model only trusts own features, and makes choice between the post intervention prediction and original prediction. A set of factors are identified to characterize the predictions and taken as inputs for choosing the final prediction. Especially, we proposed the Monte Carlo estimation of neighbors\u2019 causal effect. Under three common settings for node classification, we conducted extensive experiments on seven datasets, justifying the effectiveness of the proposed CGI. In the future, we will test the proposed CGI on more GCN models such as GAT, JKNet, and DAGNN. Moreover, we will extend the proposed CGI from node classification to other graph analytic tasks, such as link prediction [38]. In addition, following the original Monte Carlo estimation, we would like to complete the mathematical derivation of Equation 11, i.e., how the graph_var approximates the variance of the causal effect distribution. Lastly, we will explore how the property of the choice model\ud835\udc54(\u00b7) influences the effectiveness of CGI, e.g., whether non-linearity is necessary.", "introduction": "GCN is being increasingly used in IR applications, ranging from search engines [29, 57], recommender systems [5, 9, 12, 49] to question-answering systems [14, 64]. Its main idea is to augment a node\u2019s representation by aggregating the representations of its neighbors. In practice, GCN could face the local structure discrepancy issue [3] since real-world graphs usually exhibit locally varying structure. That is, nodes can exhibit inconsistent distributions of local structure properties such as homophily and degree. Figure 1 shows an example in a document citation graph [15], where the local structure centered at \ud835\udc5b\ud835\udc5c\ud835\udc51\ud835\udc521 and \ud835\udc5b\ud835\udc5c\ud835\udc51\ud835\udc522 has different properties regarding cross-category edges1. Undoubtedly, applying the same aggregation over \ud835\udc5b\ud835\udc5c\ud835\udc51\ud835\udc521 and \ud835\udc5b\ud835\udc5c\ud835\udc51\ud835\udc522 will lead to inferior node representations. Therefore, it is essential for GCN to account for the local structure discrepancy issue. Existing work considers this issue by equipping GCN with an adaptive locality module [44, 55], which learns to adjust the contribution of neighbors. Most of the efforts focus on the attention mechanism, such as neighbor attention [44] and hop attention [27]. Ideally, the attention weight could downweigh the neighbors that causes discrepancy, e.g., the neighbors of different categories with the target node. However, graph attention is not easy to be trained well in practice, especially for hard semi-supervised learning setting that has very limited labeled data [22]. Moreover, existing methods mainly consider the nodes in the training data, ignoring the local structure discrepancy on the testing nodes, which however are the decisive factor for model generalization. It is thus insufficient to resolve the discrepancy issue by adjusting the architecture of GCN. In this work, we argue that it is essential to empower the inference stage of a trained GCN with the ability of handling the local structure discrepancy issue. In real-world applications, the graph structure typically evolves along time, resulting in structure discrepancy between the training data and testing data. Moreover, the testing node can be newly coming (e.g., a new user), which may exhibit properties different from the training nodes [42]. However, 1This work focuses on the discrepancy w.r.t. cross-category connections. arXiv:2010.11797v2 [cs.LG] 6 Jun 2021 Figure 1: Illustration of local structure discrepancy in OGB- arXiv [15], a citation graph of papers. Nodes in different colors belong to different categories. the one-pass inference procedure of existing GCNs indiscriminately uses the learned model parameters to make prediction for all testing nodes, lacking the capability of handling the structure discrepancy. This work aims to bridge the gap by upgrading the GCN inference to be node-specific according to the extent of structure discrepancy. To achieve the target, the key lies in analyzing the prediction generation process of GCN on each node and estimating to what extent accounting for node\u2019s neighbors affects its prediction, i.e., the causal effect of the local structure on GCN prediction. According to the evidence that model output can reflect feature discrepancy [40], we have a key assumption that the GCN output provides evidence on the properties of the local structure centered at a testing node. For instance, if the local structure exhibits properties distinct from the seen ones, the model will be uncertain about its prediction when the neighbors are taken into account. Accordingly, we should downweigh the contribution of neighbors to reduce the impact of the discrepancy on the prediction. Inherently, both a node\u2019s features and neighbors are the causes of the prediction for the node. By distinguishing the two causal effects, we can assess revise the model prediction in a node-specific manner. To this end, we resort to the language of causal graph [35] to describe the causal relations in GCN prediction. We propose a Causal GCN Inference (CGI) model, which adjusts the prediction of a trained GCN according to the causal effect of the local structure. In particular, CGI first calls for causal intervention that blocks the graph structure and forces the GCN to user a node\u2019s own features to make prediction. CGI then makes choice between the intervened prediction and the original prediction, according to the causal effect of the local structure, prediction confidence, and other factors that characterize the prediction. Intuitively, CGI is expected to choose the intervened prediction (i.e., trusting self) when facing a testing node with local structure discrepancy. To learn a good choice-making strategy, we devise it as a separate classifier, which is learned based on the trained GCN. We demonstrate CGI on APPNP [21], one of the state-of-the-art GCN models for semi- supervised node classification. Extensive experiments on seven datasets validate the effectiveness of our approach. The codes are released at: https://github.com/fulifeng/CGI. The main contributions of this work are summarized as follows: \u2022 We achieve adaptive locality during GCN inference and propose an CGI model that is model-agnostic. \u2022 We formulate the causal graph of GCN working mechanism, and the estimation of causal intervention and causal uncertainty based on the causal graph. \u2022 We conduct experiments on seven node classification datasets to demonstrate the rationality of the proposed methods." }, { "url": "http://arxiv.org/abs/1810.09936v2", "title": "Enhancing Stock Movement Prediction with Adversarial Training", "abstract": "This paper contributes a new machine learning solution for stock movement\nprediction, which aims to predict whether the price of a stock will be up or\ndown in the near future. The key novelty is that we propose to employ\nadversarial training to improve the generalization of a neural network\nprediction model. The rationality of adversarial training here is that the\ninput features to stock prediction are typically based on stock price, which is\nessentially a stochastic variable and continuously changed with time by nature.\nAs such, normal training with static price-based features (e.g. the close\nprice) can easily overfit the data, being insufficient to obtain reliable\nmodels. To address this problem, we propose to add perturbations to simulate\nthe stochasticity of price variable, and train the model to work well under\nsmall yet intentional perturbations. Extensive experiments on two real-world\nstock data show that our method outperforms the state-of-the-art solution with\n3.11% relative improvements on average w.r.t. accuracy, validating the\nusefulness of adversarial training for stock prediction task.", "authors": "Fuli Feng, Huimin Chen, Xiangnan He, Ji Ding, Maosong Sun, Tat-Seng Chua", "published": "2018-10-13", "updated": "2019-06-01", "primary_cat": "q-fin.TR", "cats": [ "q-fin.TR", "cs.CE", "cs.LG" ], "main_content": "We use bold capital letters (e.g., X) and bold lower letters (e.g., x) to denote matrices and vectors, respectively. In addition, normal lower case letters (e.g., x) and Greek letters Figure 2: Illustration of the Attentive LSTM. (e.g., \u03bb) are used to represent scalars and hyper-parameters, respectively. All vectors are in column form, if not otherwise specified. The symbols tanh and \u03c3 stand for the hyperbolic tangent function and sigmoid function, respectively. The formulation of stock movement prediction task is to learn a prediction function \u02c6 ys = f(Xs; \u0398) which maps a stock (s) from its sequential features (Xs) to the label space. In other words, the function f with parameters \u0398 aims to predict the movement of stock s at the next time-step from the sequential features Xs in the latest T time-steps. Xs = [xs 1, \u00b7 \u00b7 \u00b7 , xs T ] \u2208RD\u00d7T is a matrix which represents the sequential input features (e.g., open and close prices, as detailed in Table 1) in the lag of past T time-steps, where D is the dimension of features. Assuming that we have S stocks, we learn the prediction function by fitting their ground truth labels y = [y1, \u00b7 \u00b7 \u00b7 , yS] \u2208RS, where ys (1/-1) is the ground truth label of stock s in the next time-step. We then formally define the problem as: Input: A set of training examples {(Xs, ys)}. Output: A prediction function f(Xs; \u0398), predicting the movement of stock s in the following time-step. In the practical scenario, we could typically access a long history of each stock, and construct many training examples for each stock by moving the lag along the history. Nevertheless, we use a simplified formulation without loss of generality by only considering one specific lag (i.e., one training example for each stock) for briefness of presenting the proposed method. 3 Adversarial Attentive LSTM (Adv-ALSTM) 3.1 Attentive LSTM The Attentive LSTM (ALSTM) mainly contains four components: feature mapping layer, LSTM layer, temporal attention, and prediction layer, as shown in Figure 2. Feature mapping layer. Previous work shows that a deeper input gate would benefit the modeling of temporal structures of LSTM [Graves et al., 2013; Wu et al., 2018]. Inspired by their success, we employ a fully connected layer to project the input features into a latent representation. At each time-step, it performs as ms t = tanh(Wmxs t + bm), which projects the input features to a latent space with dimensionality of E. Wm \u2208RE\u00d7D and bm \u2208RE are parameters to be learned. LSTM layer. Owing to its ability to capture long-term dependency, LSTM has been widely used to process sequential data [Qin et al., 2017; Chen et al., 2018a]. The general idea of LSTM is to recurrently project the input sequence into a sequence of hidden representations. At each time-step, the LSTM learns the hidden representation (hs t) by jointly considering the input (ms t) and previous hidden representation (hs t\u22121) to capture sequential dependency. We formulate it as hs t = LSTM(ms t, hs t\u22121) of which the detailed formulation can be referred to [Hochreiter and Schmidhuber, 1997]. To capture the sequential dependencies and temporal patterns in the historical stock features, an LSTM layer is applied to map [ms 1, \u00b7 \u00b7 \u00b7 , ms T ] into hidden representations [hs 1, \u00b7 \u00b7 \u00b7 , hs T ] \u2208RU\u00d7T with the dimension of U. Temporal Attention Layer. The attention mechanism has been widely used in LSTM-based solutions for sequential learning problems[Cho et al., 2014; Chen et al., 2018a]. The idea of attention is to compress the hidden representations at different time-steps into an overall representation with adaptive weights. The attention mechanism aims to model the fact that data at different time-steps could contribute differently to the representation of the whole sequence. For stock representation, status at different time-steps might also contribute differently. For instance, days with maximum and minimum prices in the lag might have higher contributions to the overall representation. As such, we use an attention mechanism to aggregate the hidden representations as, as = T X t=1 \u03b1s ths t, \u03b1s t = expe \u03b1s t PT t=1 expe \u03b1s t , e \u03b1s t = uT a tanh(Wahs t + ba), (1) where Wa \u2208RE\u2032\u00d7U, ba and ua \u2208RE\u2032 are parameters to be learned; and as is the aggregated representation that encodes the overall patterns in the sequence. Prediction Layer. Instead of directly making prediction from as, we \ufb01rst concatenate as with the last hidden state hs T into the \ufb01nal latent representation of stock s, es = [asT , hs T T ]T , (2) where es \u2208R2U. The intuition behind is to further emphasize the most recent time-step, which is believed to be informative for the following movement [Fama and French, 2012]. With es, we use a fully connected layer as the predictive function to estimate the classi\ufb01cation con\ufb01dence \u02c6 ys = wT p es + bp. Note that the \ufb01nal prediction is sign(\u02c6 ys). 3.2 Adversarial Training As with most classi\ufb01cation solutions, the normal way of training the ALSTM is to minimize an objective function \u0393: S X s=1 l(ys, \u02c6 ys) + \u03b1 2 \u2225\u0398\u22252 F , l(ys, \u02c6 ys) = max(0, 1 \u2212ys\u02c6 ys). (3) The \ufb01rst term is hinge loss [Rosasco et al., 2004], which is widely used for optimizing classi\ufb01cation models (more reasons of choosing it is further explained in the end of the section). The second term is a regularizer on the trainable parameters to prevent over\ufb01tting. Figure 3: Illustration of the Adversarial Attentive LSTM. Despite the wide usage of normal training, we argue that it is inappropriate for learning stock prediction models. This is because normal training assumes that the inputs are static, ignoring the stochastic property of these features (a training example is a sample drawn from the stochastic distribution of input variables). Note that the features are calculated from stock price, which continuously changes with time and is affected by stochastic trading behaviours at a particular timestep [Musgrave, 1997]. As such, normal training might lead to model that over\ufb01ts the data and lacks generalization ability (as shown in Figure 1). Note that is a model performs well under stochasticity would make same predictions for samples drawn from the inherent distribution. Considering that stock price is continuous, our intuition is to intentionally simulate samples by adding small perturbations on static input features. By enforcing the predictions on the simulated samples to be same, the model could capture stochasticity. Adversarial training [Goodfellow et al., 2015; Kurakin et al., 2017] implements the aforementioned intuition. It trains a model with both clean examples (i.e., examples in the training set) and adversarial examples (AEs) [Szegedy et al., 2013]. The AEs are malicious inputs generated by adding intentional perturbations to features of clean examples. The perturbation, named as adversarial perturbation (AP) is the direction that leads to the largest change of model prediction. Despite its success in image classi\ufb01cation [Kurakin et al., 2017], it is infeasible to be directly applied to stock prediction. This is because calculating perturbations relies on calculation of the gradients regarding the input, which would be time-consuming (caused by the back-propagation through time-step of the LSTM layer). Besides, considering the fact that the gradients of the input are dependent across different time-steps, there might be unintentional interactions among the perturbations on different time-steps, which are uncontrollable. To address these problems, we propose to generate AEs from latent representation es, as shown in Figure 3. Before introducing the calculation of AEs, we \ufb01rst elaborate the objective function of Adv-ALSTM: \u0393adv = S X s=1 l(ys, \u02c6 ys) + \u03b2 S X s=1 l(ys, \u02c6 ys adv) + \u03b1 2 \u2225\u0398\u22252 F . (4) The second term is an adversarial loss where \u02c6 ys adv is the classi\ufb01cation con\ufb01dence of the AE of stock s. \u03b2 is a hyperparameter to balance the losses of clean and adversarial examples. By minimizing the objective function, the model is encouraged to correctly classify both clean and adversarial examples. Note that a model correctly classifying an AE can make right predictions for examples with arbitrary perturbations at the same scale. This is because AP is the direction leading to the largest change of model prediction. Therefore, adversarial learning could enable ALSTM to capture the stochastic property of stock inputs. At each iteration, the latent representation of an AE (es adv) is generated by the following formulation, es adv = es + rs adv, rs adv = arg max rs,\u2225rs\u2225\u2264\u03f5 l(ys, \u02c6 ys adv), (5) where es (introduced in Equation 2) is the \ufb01nal latent representation of stock s. rs adv is the associated AP. \u03f5 is a hyper-parameter to explicitly control the scale of perturbation. Since it is intractable to directly calculate rs adv, we employ the fast gradient approximation method [Goodfellow et al., 2015], rs adv = \u03f5 gs \u2225gs\u2225, gs = \u2202l(ys,\u02c6 ys) \u2202es . Speci\ufb01cally, the calculated perturbation is the gradient of loss function regarding the latent representation es under a L2-norm constraint. Note that the gradient denotes the direction where the loss function increase the most at the given point es, i.e., , it would lead to the largest change on the model prediction. Figure 4 illustrates the generation of adversarial examples. In a training iteration, given a clean example having loss larger than 0 (i.e., ys\u02c6 ys < 1), an AE is generated. The model is then updated to jointly minimize the losses for clean and adversarial examples, which would enforce the margin between clean examples and the decision boundary2. As such, it would bene\ufb01t the model to predict examples with perturbations into the same class as the clean one. That is, the model could correctly predict samples drawn from the inherent stochastic distribution of inputs, capturing the stachasticity. While traditional models like support vector machines also push the decision boundary far from clean examples, the adversarial training adaptively adjusts the strength of enforcing margins during the training process since the AP (rs adv) varies across iterations. Note that we select the hinge loss to encourage the training process to focus more on the examples close to the decision boundary. 4 Experiments 4.1 Experimental Settings Datasets. We evaluate the proposed method on two benchmarks on stock movement prediction, ACL18 [Xu and Cohen, 2018] and KDD17 [Zhang et al., 2017]. ACL18 contains historical data from Jan-01-2014 to Jan01-2016 of 88 high-trade-volume-stocks in NASDAQ and NYSE markets. Following [Xu and Cohen, 2018], we \ufb01rst align the trading days in the history, i.e., removing weekends and public holidays that lack historical prices. We then move a lag with length of T along the aligned trading days to construct candidate examples (i.e., one example for a stock on 2 Minimizing the hinge loss of the AE is adjusting wp to enlarge ys\u02c6 ys adv = ys(wT p es + b) + yswT p rs adv, which would increase the \ufb01rst term ys(wT p es +b) = ys\u02c6 ys. The results in Figure 5 (in Section 4) empirically demonstrate the effect of enforcing margins. -1 0 1 2 3 Clean (+/-) Example Adversarial (+/-) Example !\"# !\" (Label * classification confidence) Figure 4: Intuitive illustration of adversarial examples. Table 1: Features to describe the daily trend of a stock. Features Calculation c open, c high, c low e.g., c open = opent/closet \u22121 n close, n adj close e.g., n close = (closet/closet\u22121 \u22121 5-day, 10-day, 15-day, 20-day, 25-day, 30-day e.g., 5-day = P4 i=0 adj closet\u2212i/5 adj closet \u22121 every trading day). We label the candidate examples according to the movement percent of stock close prices3. Examples with movement percent \u22650.55% and \u2264\u22120.5% are identi\ufb01ed as positive and negative examples, respectively. We temporally split the identi\ufb01ed examples into training (Jan-01-2014 to Aug-01-2015), validation (Aug-01-2015 to Oct-01-2015), and testing (Oct-01-2015 to Jan-01-2016). KDD17 includes longer history ranging from Jan-01-2007 to Jan-01-2016 of 50 stocks in U.S. markets. As the dataset is originally collected for predicting stock prices rather than movements, we follow the same approach as ACL18 to identify positive and negative examples. We then temporally split the examples into training (Jan-01-2007 to Jan-01-2015), validation (Jan-01-2015 to Jan-01-2016) and testing (Jan-012016 to Jan-01-2017). Features. Instead of using the raw EOD data, we de\ufb01ne 11 temporal features (xs t) to describe the trend of a stock s at trading day t. Table 1 elaborates the features associated with calculation. Our aim of de\ufb01ning these features are to: 1) normalize the prices of different stocks; 2) and explicitly capture the interaction of different prices (e.g., open and close). Baselines. We compare the following methods: \u2022 MOM Momentum (MOM) is a technical indicator that predicts negative or positive for each example with the trend in the last 10 days. \u2022 MR Mean reversion (MR) predicts the movement of each example as the opposite direction of latest price towards the 30-day moving average. \u2022 LSTM is a neural network with an LSTM layer and a prediction layer [Nelson et al., 2017]. We tune three hyperparameters, number of hidden units (U), lag size (T), and weight of regularization term (\u03bb). \u2022 ALSTM is the Attentive LSTM [Qin et al., 2017], which is optimized with normal training. Similar as LSTM, we also tune U, T, and \u03bb. 3Given a candidate example of stock s in the lag of [T \u2032 \u2212T + 1, T \u2032], the movement percent is calculated as ps T \u2032+1/ps T \u2032 \u22121, where ps T \u2032 is the adjusted close price of stock s on day T \u2032. \u2022 StockNet uses a Variational Autoencoder (VAE) to encode the stock input so as to capture the stochasticity, and a temporal attention to model the importance of different timesteps [Xu and Cohen, 2018]. Here we take our temporal features in Table 1 as inputs and tune its hidden size, dropout ratio, and auxiliary rate (\u03b1). Evaluation Metrics. We evaluate the prediction performance with two metrics, Accuracy (Acc) and Matthews Correlation Coef\ufb01cient (MCC) [Xu and Cohen, 2018] of which the ranges are in [0, 100] and [\u22121, 1]. Note that better performance is evidenced by higher value of the metrics. Parameter Settings. We implement the Adv-ALSTM with Tensor\ufb02ow and optimize it using the mini-batch Adam[Diederik and Jimmy, 2015] with a batch size of 1,024 and an initial learning rate of 0.01. We search the optimal hyper-parameters of Adv-ALSTM on the validation set. For U, T, and \u03bb, Adv-ALSTM inherits the optimal settings from ALSTM, which are selected via grid-search within the ranges of [4, 8, 16, 32], [2, 3, 4, 5, 10, 15], and [0.001, 0.01, 0.1, 1], respectively. We further tune \u03b2 and \u03f5 within [0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1] and [0.001, 0.005, 0.01, 0.05, 0.1], respectively. We report the mean testing performance when Adv-ALSTM performs best on the validation set over \ufb01ve different runs. Code could be accessed through https://github.com/hennande/Adv-ALSTM. 4.2 Experimental Results Performance Comparison. Tables 2 shows the prediction performance of compared methods on the two datasets regarding Acc and MCC, respectively. From the table, we have the following observations: \u2022 Adv-ALSTM achieves the best results in all the cases. Compared to the baselines, Adv-ALSTM exhibits an improvement of 4.02% and 42.19% (2.14% and 56.12%) on the ACL18 (KDD17) dataset regarding Acc and MCC, respectively. This justi\ufb01es the effectiveness of adversarial training, which might be due to enhancing the model generalization via adaptively simulating perturbations during the training. \u2022 Speci\ufb01cally, compared to StockNet, which captures stochasticity of stock inputs with VAE, Adv-ALSTM achieves signi\ufb01cant improvements. We postulate the reason is that StockNet cannot explicitly model the scale and direction of stochastic perturbation since it relies on Monte Carlo sampling during the training process. \u2022 Among the baselines, ALSTM outperforms LSTM by 1.93% and 48.69% on average w.r.t. Acc and MCC, which validates the impact of attention [Qin et al., 2017]. Besides, MOM and MR performs worse than all the machine learning-based methods as expected, which justi\ufb01es that historical patterns help in stock prediction task. Stochastic Perturbation VS. Adversarial Perturbation. We further investigate the effectiveness of adversarial training via comparing adversarial perturbations and random ones. Rand-ALSTM is a variance of Adv-ALSTM, which generates additional examples by adding random perturbations to the input of clean examples. Table 3 shows the performance Table 2: Performance comparison on the two datasets. Method ACL18 KDD17 Acc MCC Acc MCC MOM 47.01\u00b1\u2014\u2013 -0.0640\u00b1\u2014\u2013 49.75\u00b1\u2014\u2013 -0.0129\u00b1\u2014\u2013 MR 46.21\u00b1\u2014\u2013 -0.0782\u00b1\u2014\u2013 48.46\u00b1\u2014\u2013 -0.0366\u00b1\u2014\u2013 LSTM 53.18\u00b15e-1 0.0674\u00b15e-3 51.62\u00b14e-1 0.0183\u00b16e-3 ALSTM 54.90\u00b17e-1 0.1043\u00b17e-3 51.94\u00b17e-1 0.0261\u00b11e-2 StockNet 54.96\u00b1\u2014\u2013 0.0165\u00b1\u2014\u2013 51.93\u00b14e-1 0.0335\u00b15e-3 Adv-ALSTM 57.20\u00b1\u2014\u2013 0.1483\u00b1\u2014\u2013 53.05\u00b1\u2014\u2013 0.0523\u00b1\u2014\u2013 RI 4.02% 42.19% 2.14% 56.12% RI denotes the relative improvement of Adv-ALSTM compared to the best baseline. The performance of StockNet is directly copied from [Xu and Cohen, 2018]. Table 3: Performance of Rand-ALSTM on the two datasets. Datasets Acc MCC ACL18 55.08\u00b12e0 0.1103\u00b14e-2 KDD17 52.43\u00b15e-1 0.0405\u00b18e-3 of Rand-ALSTM on the two datasets. By cross comparing it with Table 2, we observe that: 1) Compared to RandALSTM, Adv-ALSTM achieves signi\ufb01cant improvements. For instance, its performance w.r.t. Acc on ACL18 is 3.95% better than that of Rand-ALSTM. It demonstrates that adversarial perturbations are helpful for stock prediction, similar to that reported in the original image classi\ufb01cation tasks [Goodfellow et al., 2015]. 2) Rand-ALSTM outperforms ALSTM, which is purely trained with clean examples, with an average improvement of 0.64% w.r.t. Acc on the two datasets. This highlights the necessity of dealing with stochastic property of stock features. Impacts of Adversarial Training. We now investigate the impacts of adversarial training to answer: 1) Whether the adversarial training enforces the margin between clean examples and the decision boundary. 2) Whether the adversarial training enhances the robustness of the model against adversarial examples. Note that we only show the results on the ACL18 dataset as the results on KDD17 admit the same observations. Enforcing margin. Recall that the only difference between Adv-ALSTM and ALSTM is learning parameters with adversarial training and standard training. As such, we answer the \ufb01rst question by comparing the classi\ufb01cation con\ufb01dence of clean examples (larger value denotes larger margin to the decision boundary) assigned by Adv-ALSTM and ALSTM. Figure 5 illustrates the distributions of the classi\ufb01cation con\ufb01dences assigned by ALSTM and Adv-ALSTM. As can be seen, the con\ufb01dences of Adv-ALSTM distribute in a range ([-0.6, 0.6] roughly), which is about 1.5 times larger than that of ALSTM ([-0.2, 0.3]). It indicates that adversarial training pushes the decision boundary far from clean examples, which is believed to help enhance the robustness and generalization ability of the model. Robustness against adversarial examples. We then investigate the second question via comparing the performance of ALSTM and Adv-ALSTM on the clean and associated adversarial examples. Figures 6(a) and 6(b) illustrate the relative performance decrease (RPD) of ALSTM and AdvALSTM on adversarial examples regarding the one on clean examples, respectively. Note that larger absolute value of RPD indicates that the model is more vulnerable to adversarial perturbations. As can be seen, the average RPD of (a) Validation of ACL18 (b) Testing of ACL18 Figure 5: Distributions of classi\ufb01cation con\ufb01dences assigned by ALSTM and Adv-ALSTM for clean examples. (a) Acc (b) MCC Figure 6: Robustness against adversarial example of ALSTM and Adv-ALSTM. Each plotted number is the RPD of a model on adversarial examples compared to clean ones. ALSTM is 4.31 (6.34) times larger as compared to AdvALSTM regarding Acc (MCC). This justi\ufb01es the potential of enhancing model robustness with adversarial training. 5 Related Work 5.1 Stock Movement Prediction Recent works on stock movement prediction, mainly fall under two categories, technical analysis and fundamental analysis (FA). The technical analysis (TA) takes historical prices of a stock as features to forecast its movement. Most of recent methods in TA mine stock movements with deep models [Lin et al., 2017; Nelson et al., 2017; Chong et al., 2017]. Among them, recurrent neural networks like LSTM have become key components to capture the temporal patterns of stock prices [Nelson et al., 2017; Lin et al., 2017]. Besides, other advanced neural models, such as convolution neural networks (CNN) [Lin et al., 2017] and deep Boltzmann machine [Chong et al., 2017], are also evidenced to be bene\ufb01cial for capturing the non-linearity of stock prices. In addition to price features, FA also examines related economic, \ufb01nancial, and other qualitative and quantitative factors [Hu et al., 2018; Zhang et al., 2018; Li et al., 2018; Xu and Cohen, 2018]. For instance, Xu and Cohen [2018] incorporate signals from social media, which re\ufb02ects opinions from general users, to enhance stock movement prediction. Speci\ufb01cally, they employ a VAE to learn a stock representation by jointly encoding the historical prices and tweets mentioning it. Moreover, Zhang et al. [2018] further consider news events related to a stock or the associated company via a coupled matrix and tensor factorization framework. Both TA and FA studies show that price features play crucial roles in stock movement prediction. However, most of the existing works assume stock price as stationary, which thus lack the ability to deal with its stochastic property. StockNet [Xu and Cohen, 2018] is the only exception which tackles this problem via VAE. VAE encodes the inputs into a latent distribution and enforces samples from the latent distribution to be decoded with the same prediction. Generally, the philosophy behind is similar as the simulation of stochastic perturbations since one sample from the latent distribution can be seen as adding stochastic perturbation to the latent representation. As compared to our method, our perturbation is intentionally generated which indicates leads to hardest examples for the model to obtain the target prediction. In addition, the proposed method can be easily adapted to other solutions of stock movement predictions. 5.2 Adversarial Learning Adversarial learning has been intensively studied by training a classi\ufb01cation model to defense adversarial examples, which are intentionally generated to perturb the model. Existing works of adversarial learning mainly concentrate on computer vision tasks like image classi\ufb01cation [Goodfellow et al., 2015; iyato et al., 2017; Kurakin et al., 2017; Yang et al., 2018; Chen et al., 2018b]. Owing to the property that image features are typically continued real values, adversarial examples are directly generated in the feature space. Recently, several works extend the adversarial learning to tasks with discrete inputs such as text classi\ufb01cation (a sequence of words) [iyato et al., 2017], recommendation (user and item IDs) [He et al., 2018], and graph node classi\ufb01cation (graph topology) [Dai et al., 2018; Feng et al., 2019]. Rather than in the feature space, these works generate adversarial examples from embedding of inputs such as word, user (item), and node embeddings. Although this work is inspired by these adversarial learning research efforts, it targets a distinct task\u2014stock movement prediction, of which the data are time series with stochastic property. To the best of our knowledge, this work is the \ufb01rst one to explore the potential of adversarial training in time-series analytics. 6 Conclusion In this paper, we showed that neural network solutions for stock movement prediction could suffer from weak generalization ability since they lack the ability to deal with the stochasticity of stock features. To solve this problem, we proposed an Adversarial Attentive LSTM solution, which leverages adversarial training to simulate the stochasticity during model training. We conducted extensive experiments on two benchmark datasets and validated the effectiveness of the proposed solution, signifying the importance of accounting for the stochasticity of stock prices in stock movement prediction. Morever, the results showed that adversarial training enhances the robustness and generalization of the prediction model. In future, we plan to explore the following directions: 1) we are interested in testing Adv-ALSTM in movement prediction of more assets such as commodities. 2) We plan to apply adversarial training to stock movement solutions with different structures such as the CNNs [Lin et al., 2017]. 3) We will explore the effect of adversarial training over fundamental analysis methods of stock movement prediction.", "introduction": "Stock market is one of the largest \ufb01nancial markets, hav- ing reached a total value of 80 trillion dollars1. Predicting the future status of a stock has always been of great inter- est to many players in a stock market. While the exact price of a stock is known to be unpredictable [Walczak, 2001; Nguyen et al., 2015], research efforts have been focused on predicting the stock price movement \u2014 e.g., whether the price will go up/down, or the price change will ex- ceed a threshold \u2014 which is more achievable than stock price prediction [Adebiyi et al., 2014; Feng et al., 2018; Xu and Cohen, 2018]. Stock movement prediction can be addressed as a classi- \ufb01cation task. After de\ufb01ning the label space and features to \u2217Xiangnan He is the corresponding author. 1https://data.worldbank.org/indicator/CM. MKT.TRAD.CD?view=chart. (a) Training (b) Validation Figure 1: Training process of Attentive LSTM with L2 regu- larization coef\ufb01cient of 0, 0.01, and 0.1. describe a stock at a time, we can apply standard supervised learning methods such as support vector machines [Huang et al., 2005] and neural networks [Xu and Cohen, 2018] to build the predictive model. Although technically feasible, we argue that such methods could suffer from weak generalization due to the highly stochastic property of stock market. Figure 1 provides an empirical evidence on the weak generalization, where we split the data into training and validation by time, and train an Attentive LSTM model [Qin et al., 2017] on the historical prices of stocks to predict their movements. From Figure 1(a), we can see the training loss gradually decreases with more training epochs, which is as expected. However, the validation loss shown in Figure 1(b) does not exhibit a decreasing trend; instead, it only \ufb02uctuates around the initial- ization state without a clear pattern. In other words, the bene- \ufb01ts of the model learned on training examples do not translate to improvements on predicting unknown validation examples. We have thoroughly explored the L2 regularization (results of different lines), a common technique to improve model gen- eralization, however, the situation has not improved. We postulate the reason is that standard classi\ufb01cation meth- ods are assumed to learn from static inputs, such as pixel values in images and term frequencies in documents. When dealing with stochastic variable such as stock price, the static input assumption does not hold and such methods fail to gen- eralize well. Speci\ufb01cally, existing methods for stock pre- diction typically feed into price-based features, such as the price at a particular time-step or average price on multi- ple time-steps [Edwards et al., 2007; Nelson et al., 2017]. Since a stock\u2019s price continuously changes with time (during market hours), price-based features are essentially stochastic variables, being fundamentally different from the traditional arXiv:1810.09936v2 [q-fin.TR] 1 Jun 2019 static inputs. To be more speci\ufb01c, the features of a training in- stance can be seen as a \u201csample\u201d drawn from the distribution of input variables at a particular time-step. Without properly handling the stochasticity of input variables, the method can easily over\ufb01t the training data and suffer from weak general- ization ability. In this work, we propose to employ adversarial training to account for the stochastic property of stock market to learn stock movement prediction model. Our primary considera- tion is that given a training example at a particular time-step with \ufb01xed input features, the trained model is expected to generate the same prediction on other samples drawn from the inherent distribution of input variables. To implement this idea, we can generate additional samples (simulation of the stochasticity) by adding small perturbations on input features, and train the model to perform well on both clean examples and perturbed examples. It is the adversarial training method that has been commonly used in computer vision tasks [Ku- rakin et al., 2017]. However, the problem is that the features to stock prediction models are usually sequential (see Figure 2), such that adding perturbations on the features of all time units can be very time-consuming; moreover, it may cause unintentional interactions among the perturbations of differ- ent units which are uncontrollable. To resolve the concern, we instead add perturbations on the high-level prediction fea- tures of the model, e.g., the last layer which is directly pro- jected to the \ufb01nal prediction. Since most deep learning meth- ods learn abstract representation in the higher layers, their sizes are usually much smaller than the input size. As such, adding perturbations to high-level features is more ef\ufb01cient, and meanwhile it can also retain the stochasticity. We implement our adversarial training proposal on an At- tentive LSTM model, which is a highly expressive model for sequential data. We add perturbations to the prediction fea- tures of the last layer, and dynamically optimize the pertur- bations to make them change the model\u2019s output as much as possible. We then train the model to make it perform well on both clean features and perturbed features. As such, the adversarial training process can be understood as enforcing a dynamic regularizer, which stabilizes the model training and makes the model perform well under stochasticity. The main contributions of this paper are summarized as: \u2022 We investigate the generalization dif\ufb01culty in stock move- ment prediction and highlight the necessity of dealing with the stochastic property of input features. \u2022 We propose an adversarial training solution to address the stochastic challenge, and implement it on a deep learning model for stock movement prediction. \u2022 We conduct extensive experiments on two public bench- marks, validating improvements over several state-of-the- art methods and showing that adversarial learning makes the classi\ufb01er more robust and more generalizable." } ], "Xinyu Lin": [ { "url": "http://arxiv.org/abs/2401.17197v1", "title": "Data-efficient Fine-tuning for LLM-based Recommendation", "abstract": "Leveraging Large Language Models (LLMs) for recommendation has recently\ngarnered considerable attention, where fine-tuning plays a key role in LLMs'\nadaptation. However, the cost of fine-tuning LLMs on rapidly expanding\nrecommendation data limits their practical application. To address this\nchallenge, few-shot fine-tuning offers a promising approach to quickly adapt\nLLMs to new recommendation data. We propose the task of data pruning for\nefficient LLM-based recommendation, aimed at identifying representative samples\ntailored for LLMs' few-shot fine-tuning. While coreset selection is closely\nrelated to the proposed task, existing coreset selection methods often rely on\nsuboptimal heuristic metrics or entail costly optimization on large-scale\nrecommendation data.\n To tackle these issues, we introduce two objectives for the data pruning task\nin the context of LLM-based recommendation: 1) high accuracy aims to identify\nthe influential samples that can lead to high overall performance; and 2) high\nefficiency underlines the low costs of the data pruning process. To pursue the\ntwo objectives, we propose a novel data pruning method based on two scores,\ni.e., influence score and effort score, to efficiently identify the influential\nsamples. Particularly, the influence score is introduced to accurately estimate\nthe influence of sample removal on the overall performance. To achieve low\ncosts of the data pruning process, we use a small-sized surrogate model to\nreplace LLMs to obtain the influence score. Considering the potential gap\nbetween the surrogate model and LLMs, we further propose an effort score to\nprioritize some hard samples specifically for LLMs. Empirical results on three\nreal-world datasets validate the effectiveness of our proposed method. In\nparticular, the proposed method uses only 2% samples to surpass the full data\nfine-tuning, reducing time costs by 97%.", "authors": "Xinyu Lin, Wenjie Wang, Yongqi Li, Shuo Yang, Fuli Feng, Yinwei Wei, Tat-Seng Chua", "published": "2024-01-30", "updated": "2024-01-30", "primary_cat": "cs.IR", "cats": [ "cs.IR" ], "main_content": "Data-efficient Fine-tuning for LLM-based Recommendation Conference\u201917, July 2017, Washington, DC, USA While fine-tuning LLMs has demonstrated effectiveness in recommendation tasks [35], its practical application is hindered by the high resource costs required by LLMs and the continuous influx of new recommendation data [41]. Hence, it is essential to enhance the efficiency of LLM-based recommender fine-tuning. \u2022 Data pruning for efficient LLM-based recommendation. To achieve efficient LLM-based recommendation, a promising approach is to reduce the costs by few-shot fine-tuning with randomly selected samples [4]. Nevertheless, the random samples might lose some crucial information for LLMs to acquire the latest information on user behavior or items, e.g., trending items. In this light, we introduce the task of data pruning for efficient LLM-based recommendation, which aims to identify a set of representative samples particularly for LLMs\u2019 few-shot fine-tuning. Formally, given all training samples D = {\ud835\udc60\ud835\udc62|\ud835\udc62\u2208U}, the target of data pruning is to select a subset S \u2282D, such that the LLMs trained on the subset S can yield good performance on the testing set. The size of S is controlled by the given selection ratio \ud835\udc5f, i.e., |S| = \ud835\udc5f|D|. \u2022 Retrospect of coreset selection. As the closely related work to this data pruning task, coreset selection methods generally fall into two groups: 1) Heuristic methods [8, 12, 47] typically design some heuristic strategies to select samples based on an empirical minimizer: S = \ud835\udc3b( \u02c6 \ud835\udf03, D), s.t. \u02c6 \ud835\udf03= arg min \ud835\udf03\u2208\u0398 L(\ud835\udf03, D), (2) where L(\u00b7) is the loss function of the task, e.g., image classification [19] or CTR prediction [17], and \ud835\udc3b(\u00b7) denotes the heuristic strategy such as selecting samples with larger prediction entropy [8], or clustering the samples based on the sample representations [6]. However, this group of methods designs the strategy \ud835\udc3b(\u00b7) intuitively and fails to explicitly consider the influence of a sample on the empirical risk. This might lead to suboptimal selection, thereby declining the performance of the model trained by the selected subset. 2) Optimization-based methods [5, 26, 27, 52] mainly utilize bilevel optimization techniques to learn the best subset chosen for training: S\u2217= arg min S\u2282D L( \u02c6 \ud835\udf03, D), s.t. \u02c6 \ud835\udf03= arg min \ud835\udf03\u2208\u0398 L(\ud835\udf03, S). (3) Besides, there is also some work that employs discrete optimization problems based on the empirical minimizer \u02c6 \ud835\udf03in Eq. (2). Nevertheless, they struggle to be applied to large-scale datasets e.g., recommendation data, due to the complex solving of the optimization problem [20]. Furthermore, as shown in Eq. (2-3), previous coreset selection methods usually require the model to be trained over original training samples D, which however is infeasible for LLM-based recommender models due to the continuous influx of data and the high resource costs of LLMs (cf. Section 1). \u2022 Drawing upon the above insights, we consider two objectives for data pruning: 1) high accuracy emphasizes the low empirical risk of the model trained on the selected samples, and 2) high efficiency focuses on the low costs of the data pruning process, breaking free from the heavy fine-tuning of LLMs for data pruning. Surrogate Model Optimize Influence Score Calculation LLMs + Effort Score Calculation \u00d7# \u00d7$ most influential least influential after training training Samples Figure 2: Overview of DEALRec. DEALRec first trains a surrogate model on the full training samples. Subsequently, it calculates the influence score, which is then regularized by the effort score, to identify influential samples. 3 DEALREC To pursue efficient LLM-based recommendation, we propose a novel data pruning method DEALRec, which involves two key components, i.e., the influence score to estimate the influence on empirical risk, and the effort score as a regularization to mitigate the gap between surrogate model and LLMs. The overview of our method is presented in Figure 2. 3.1 Influence Score To achieve good overall performance with the model trained on the pruned dataset S, the key lies in the ability to assess the influence on the empirical risk, i.e., overall performance, caused by removing a sample in training. However, simply assessing the the influence by removing each sample is impractical, because it requires brute force leaving-one-out-retraining for \ud835\udc5b= |D| times. To overcome this challenge, we propose an efficient approximation of the influence for all samples by extending influence on parameter change (i.e., a classic result from influence function [28]) via chain rule and secondorder optimization techniques. We further utilize the symmetric property to speed up the calculation of the influence score. \u2022 Influence on parameter change. To estimate the influence on empirical risk for each sample, we first start with the classic result [33] from research on influence function [9], which gives us the estimation of the parameter change caused by upweighting a sample \ud835\udc60for training. Considering a training sample \ud835\udc60is upweighted by a small \ud835\udf16, the empirical minimizer can be rewritten as: \u02c6 \ud835\udf03\ud835\udf16,\ud835\udc60= arg min \ud835\udf03\u2208\u0398 1 \ud835\udc5b \u2211\ufe01 \ud835\udc60\ud835\udc56\u2208D L(\ud835\udc60\ud835\udc56,\ud835\udf03) + \ud835\udf16L(\ud835\udc60,\ud835\udf03). (4) According to [33], the influence of upweighting a sample \ud835\udc60on the parameter change is then given as: I param(\ud835\udc60) = d \u02c6 \ud835\udf03\ud835\udf16,\ud835\udc60 d\ud835\udf16 \f \f \f \f\ud835\udf16=0 = \u2212\ud835\udc3b\u22121 \u02c6 \ud835\udf03\u2207\ud835\udf03L(\ud835\udc60, \u02c6 \ud835\udf03), (5) where \ud835\udc3b\u02c6 \ud835\udf03 = 1 \ud835\udc5b \u00cd \ud835\udc60\ud835\udc56\u2208D \u22072 \ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) is the Hessian and positive definite by assumption, I param(\ud835\udc60) \u2208R\ud835\udc5a, and \ud835\udc5ais the number of parameters. Notably, assigning \u22121 \ud835\udc5bto \ud835\udf16is equivalent to removing the sample \ud835\udc60from training. As such, the parameter change of removing a training sample \ud835\udc60can be linearly approximated as: \u02c6 \ud835\udf03\u2212\ud835\udc60\u2212\u02c6 \ud835\udf03\u2248\u22121 \ud835\udc5bI param(\ud835\udc60) = 1 \ud835\udc5b\ud835\udc3b\u22121 \u02c6 \ud835\udf03\u2207\ud835\udf03L(\ud835\udc60, \u02c6 \ud835\udf03), (6) where \u02c6 \ud835\udf03\u2212\ud835\udc60= arg min\ud835\udf03\u2208\u0398 \u00cd \ud835\udc60\ud835\udc56\u2208D,\ud835\udc60\ud835\udc56\u2260\ud835\udc60L(\ud835\udc60\ud835\udc56,\ud835\udf03). Conference\u201917, July 2017, Washington, DC, USA Xinyu Lin1, Wenjie Wang1, Yongqi Li2, Shuo Yang3, Fuli Feng4, Yinwei Wei5, and Tat-Seng Chua1 Algorithm 1 Procedure of HVP Estimation Input: Original training dataset D, parameters of a well-trained model \u02c6 \ud835\udf03, iteration number \ud835\udc47. 1: Compute \u00cd \ud835\udc561 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) for \u2200\ud835\udc56\u2208{1, . . . ,\ud835\udc5b}. 2: Initialize \u02dc \ud835\udc3b\u22121 0 h\u00cd \ud835\udc561 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) i = \u00cd \ud835\udc561 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03). 3: for all \ud835\udc61\u2208{1, . . . ,\ud835\udc47} do 4: Randomly sample a training sample \ud835\udc60\ud835\udc61\u2208D; 5: Calculate \u22072 \ud835\udf03L(\ud835\udc60\ud835\udc61) as the unbiased estimator of \ud835\udc3b; 6: \u02dc \ud835\udc3b\u22121 \ud835\udc61 h\u00cd \ud835\udc561 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) i \u2190\u00cd \ud835\udc561 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03)+ \u0002 \ud835\udc3c\u2212\u22072 \ud835\udf03L(\ud835\udc60\ud835\udc61) \u0003 \u02dc \ud835\udc3b\u22121 \ud835\udc61\u22121 h\u00cd \ud835\udc561 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) i ; \u22b2Eq. (10) 7: \u02dc \ud835\udc3b\u22121 h\u00cd \ud835\udc561 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) i \u2190\u02dc \ud835\udc3b\u22121 \ud835\udc47 h\u00cd \ud835\udc561 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) i . Output: Unbiased estimation \u02dc \ud835\udc3b\u22121 h\u00cd \ud835\udc561 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) i . Based on Eq. (6), an intuitive approach to assess the sample influence for model training is to utilize the L2 norm of a sample\u2019s influence on parameter change or an additional discrete optimization problem as proposed in [55]. Nevertheless, large parameter changes do not necessarily lead to performance improvements. Besides, calculating Eq. (6) for all training samples can be computationally costly [20] and is infeasible for recommendation data. To alleviate the issues, we propose an efficient approximation for the influence of removing a sample on the empirical risk. \u2022 Influence on empirical risk. Based on the parameter change obtained via the influence function, we can then estimate the influence of upweighting a training sample \ud835\udc60by a small \ud835\udf16on the loss of an arbitrary sample \ud835\udc60\u2032: I upweight,loss(\ud835\udc60,\ud835\udc60\u2032) def = dL(\ud835\udc60\u2032, \u02c6 \ud835\udf03\ud835\udf16,\ud835\udc60) d\ud835\udf16 \f \f \f \f \ud835\udf16=0 = \u2207\ud835\udf03L(\ud835\udc60\u2032, \u02c6 \ud835\udf03)T d \u02c6 \ud835\udf03\ud835\udf16,\ud835\udc60 d\ud835\udf16 \f \f \f \f \ud835\udf16=0 (chain rule) = \u2212\u2207\ud835\udf03L(\ud835\udc60\u2032, \u02c6 \ud835\udf03)T\ud835\udc3b\u22121 \u02c6 \ud835\udf03\u2207\ud835\udf03L(\ud835\udc60, \u02c6 \ud835\udf03). (7) Similarly, the influence of removing a training sample \ud835\udc60on the loss of an arbitrary sample \ud835\udc60\u2032 can be linearly approximated as: I remove, loss(\ud835\udc60,\ud835\udc60\u2032) = 1 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\u2032, \u02c6 \ud835\udf03)T\ud835\udc3b\u22121 \u02c6 \ud835\udf03\u2207\ud835\udf03L(\ud835\udc60, \u02c6 \ud835\udf03). (8) We can then obtain the influence of removing a sample \ud835\udc60on the empirical risk (i.e., influence score) by I remove,loss(\ud835\udc60, D)= \u22121 \ud835\udc5b d \u0010 1 \ud835\udc5b \u00cd \ud835\udc56L(\ud835\udc60\u2032, \u02c6 \ud835\udf03\ud835\udf16,\ud835\udc60\ud835\udc56) \u0011 d\ud835\udf16 \f \f \f \f \f \ud835\udf16=0 = 1 \ud835\udc5b \u2211\ufe01 \ud835\udc56 1 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03)T\ud835\udc3b\u22121 \u02c6 \ud835\udf03\u2207\ud835\udf03L(\ud835\udc60, \u02c6 \ud835\udf03) | {z } (influence score) . (9) However, it is non-trivial to directly obtain \ud835\udc3b\u22121 \u02c6 \ud835\udf03 as forming and inverting \ud835\udc3b\u02c6 \ud835\udf03= 1 \ud835\udc5b \u00cd \ud835\udc60\ud835\udc56\u2208D \u22072 \ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) requires O(\ud835\udc5b\ud835\udc5a2 + \ud835\udc5a3) with \ud835\udc5btraining samples and \ud835\udf03\u2208R\ud835\udc5a. This results in cumbersome calculation of influence scores for all training samples. \u2022 Efficient estimation of influence score. To achieve efficient computation of influence score, we utilize stochastic-based HessianVector Products (HVP) [1] to efficiently approximate \ud835\udc3b\u22121 \u02c6 \ud835\udf03\u2207\ud835\udf03L(\ud835\udc60, \u02c6 \ud835\udf03). 0 1 2 3 4 \u2026 Effort Score \u2026\u2026 \u2026 Gap 1k 0 2k 3k 4k Number of Samples (Users) LLMs with Knowledge Rec Data (b) (a) (a) Depicts the some users are easier for LLMs to learn. (b) Presents the distributions of discrepancy scores on LLM and surrogate model, showing the different learning ability of the two models. score\u22483.2 Small Effort Large Effort Surrogate Model adapt adapt Figure 3: (a) depicts the different learning ability due to the prior knowledge in LLMs. (b) presents the distributions of effort scores of LLM and surrogate model on Games dataset4. The idea of stochastic-based HVP estimation is to iteratively obtain an unbiased estimator of \ud835\udc3b\u02c6 \ud835\udf03and approach the unbiased estimation of HVP, i.e., \ud835\udc3b\u22121 \u02c6 \ud835\udf03\u2207\ud835\udf03L(\ud835\udc60, \u02c6 \ud835\udf03). Specifically, we omit the \u02c6 \ud835\udf03subscript for clarity and write the first \ud835\udc57terms in Taylor expansion of \ud835\udc3b\u22121 as \ud835\udc3b\u22121 \ud835\udc57 def = \u00cd\ud835\udc57 \ud835\udc56=0(\ud835\udc3c\u2212\ud835\udc3b)\ud835\udc56, which can be further rewritten recursively as \ud835\udc3b\u22121 \ud835\udc57 = \ud835\udc3c+ (\ud835\udc3c\u2212\ud835\udc3b)\ud835\udc3b\u22121 \ud835\udc57\u22121. From the validity of the Taylor expansion, we have \ud835\udc3b\u22121 \ud835\udc57 \u2192\ud835\udc3b\u22121 as \ud835\udc57\u2192\u221e. Thereafter, denoting \u2207\ud835\udf03L(\ud835\udc60, \u02c6 \ud835\udf03) as \ud835\udc63, the update iteration for the estimated \ud835\udc3b\u22121 \u02c6 \ud835\udf03\u2207\ud835\udf03L(\ud835\udc60, \u02c6 \ud835\udf03) at step \ud835\udc61 can be written as: \u02dc \ud835\udc3b\u22121 \ud835\udc61\ud835\udc63= \ud835\udc63+ \u0010 \ud835\udc3c\u2212\u22072 \ud835\udf03L(\ud835\udc60\ud835\udc61) \u0011 \u02dc \ud835\udc3b\u22121 \ud835\udc61\u22121\ud835\udc63, (10) where\ud835\udc60\ud835\udc61is a training sample randomly drawn from D, and \u22072 \ud835\udf03L(\ud835\udc60\ud835\udc61) is an unbiased estimator of the \ud835\udc3bat step \ud835\udc61for fast-to-compute HVP [28]. Despite that stochastic-based HVP can alleviate the computation burdens of the estimation, calculating the influence score for each sample is still costly due to the independent \ud835\udc5b estimations of \ud835\udc3b\u22121 \u02c6 \ud835\udf03\u2207\ud835\udf03L(\ud835\udc60, \u02c6 \ud835\udf03) for each \ud835\udc60\u2208D (refer to Eq. (9)). To further enhance the efficiency of acquiring influence scores for all samples, we use symmetric property to rewrite Eq. (9) into: I remove,loss(\ud835\udc60, D) = 1 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60, \u02c6 \ud835\udf03)T \ud835\udc3b\u22121 \u02c6 \ud835\udf03 \u0014\u2211\ufe01 \ud835\udc56 1 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) \u0015 | {z } (constant vector) . (11) The reformulation is based on the assumption that L(\u00b7) has continuous second-order derivatives, which is consistent with the assumption for influence function [28], leading to the fact that \ud835\udc3b\u22121 \u02c6 \ud835\udf03 is symmetric. Since \ud835\udc3b\u22121 \u02c6 \ud835\udf03 h\u00cd \ud835\udc561 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) i \u2208R\ud835\udc5ais a constant vector for any sample \ud835\udc60\u2208D, we can efficiently obtain influence scores for all samples by only applying HVP estimation once for \ud835\udc3b\u22121 \u02c6 \ud835\udf03 h\u00cd \ud835\udc561 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) i . The detailed HVP estimation process is illustrated in Algorithm 1. 3.2 Gap Regularization As shown in Eq. (11), assessing the influence score of a sample requires the optimized parameters \u02c6 \ud835\udf03well-trained over all training samples D. Nevertheless, this poses challenges for LLM-based 4We obtain the effort scores for surrogate model by calculating the gradient norm of the parameters of the surrogate model (Eq. (12)). Data-efficient Fine-tuning for LLM-based Recommendation Conference\u201917, July 2017, Washington, DC, USA Algorithm 2 Procedure of DEALRec Input: Original training dataset D, randomly initialized parameters of surrogate model \ud835\udf03, pre-trained parameters of LLM \ud835\udf19. 1: \u02c6 \ud835\udf03= arg min\ud835\udf03\u2208\u0398 1 \ud835\udc5b \u00cd \ud835\udc60\ud835\udc56\u2208D L(\ud835\udc60\ud835\udc56,\ud835\udf03). 2: Obtain estimated \ud835\udc3b\u22121 h\u00cd \ud835\udc561 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) i via HVP estimation. 3: for all \ud835\udc56\u2208{1, . . . ,\ud835\udc5b} do 4: \ud835\udc3c\ud835\udc60\ud835\udc56= 1 \ud835\udc5b2 \u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03)T\ud835\udc3b\u22121 \u02c6 \ud835\udf03 h\u00cd \ud835\udc571 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc57, \u02c6 \ud835\udf03) i + \ud835\udf06\u2225\u2207\ud835\udf19L\ud835\udc3f\ud835\udc3f\ud835\udc40(\ud835\udc60\ud835\udc56) \u22252; \u22b2Eq. (13) 5: G = {\ud835\udc3a1, . . . ,\ud835\udc3a\ud835\udc3e} \u2190Split training samples D into \ud835\udc3egroups according to the final score \ud835\udc3c\ud835\udc60with even range width. 6: S \u2190\u2205, \ud835\udc35\u2190\u230a\ud835\udc5f|D| \ud835\udc3e\u230b. 7: while G \u2260\u2205do 8: \ud835\udc58\u2217= arg min\ud835\udc58|\ud835\udc3a\ud835\udc58|; 9: S\ud835\udc58\u2217\u2190randomly select min{\ud835\udc35, |\ud835\udc3a\ud835\udc58\u2217|} samples from \ud835\udc3a\ud835\udc58\u2217; 10: S \u2190S \u222aS\ud835\udc58\u2217; G \u2190G \\ {\ud835\udc3a\ud835\udc58\u2217}; 11: \ud835\udc35\u2190\u230a\ud835\udc5f|D|\u2212|S| |G| \u230b; \u22b2Update sampling budget Output: Selected samples S for few-shot fine-tuning. recommender models due to the continuous influx of large-scale new data in real-world scenarios. In this light, we propose to utilize a surrogate model to replace the LLMs and introduce an effort score as a gap regularization to complement the learning ability gap between LLMs and the surrogate models. \u2022 Surrogate model. To reduce the costs, we propose utilizing a surrogate model, e.g., a small-sized traditional recommender model, to compute the influence scores. Nevertheless, since LLMs acquire rich world knowledge during the pre-training stage, they intricately possess different learning abilities compared to the surrogate model (Figure 3(a)). Therefore, the influential samples on LLMs might deviate from the ones for LLMs. \u2022 Effort score. To compensate for the gap, we introduce the effort score, which aims to capture significant samples particularly for LLMs. Specifically, we define the effort score of a sample, i.e., a user sequence, \ud835\udc60as: \ud835\udeff\ud835\udc60= \u2225\u2207\ud835\udf19L\ud835\udc3f\ud835\udc3f\ud835\udc40(\ud835\udc60)\u22252, (12) where \ud835\udf19is the learnable parameters of LLMs5. Intuitively, it measures the learning effort of LLMs to fit a specific user sequence, and a larger score indicates a harder sample for LLMs to learn. To elaborate, Eq. (12) measures the change in the model parameters, which can be interpreted as the discrepancy from the current knowledge encoded in LLMs\u2019 parameters to the latest item knowledge or user behavior. As such, the effort score can emphasize significant samples particularly for LLMs, supplementing the different learning ability of the surrogate model (Figure 3(b)). \u2022 Overall score. By injecting the signals of LLMs\u2019 learning ability into the calculation of influence score, we can obtain the final score of each user sequence for LLM-based recommender fine-tuning: \ud835\udc3c\ud835\udc60= 1 \ud835\udc5b2 \u2207\ud835\udf03L(\ud835\udc60, \u02c6 \ud835\udf03)T\ud835\udc3b\u22121 \u02c6 \ud835\udf03 \u0014\u2211\ufe01 \ud835\udc56 1 \ud835\udc5b\u2207\ud835\udf03L(\ud835\udc60\ud835\udc56, \u02c6 \ud835\udf03) \u0015 | {z } (influence score) + \ud835\udf06\u2225\u2207\ud835\udf19L\ud835\udc3f\ud835\udc3f\ud835\udc40(\ud835\udc60)\u22252 | {z } (effort score) , (13) 5The learnable parameters can be either the whole parameters of LLMs or the learnable parameters from parameter-efficient training, e.g., LoRA [23]. where \ud835\udf06is a hyper-parameter to balance the strength of the gap regularization. Notably, the gap regularization would suppress the easy samples with smaller effort scores while emphasizing the samples that are more difficult to learn, i.e., larger effort scores. Intuitively, DEALRec identifies the influential samples with two key considerations: 1) the influence score focuses on selecting the representative samples from the full dataset, capturing collaborative filtering information for low empirical risk; and 2) the effort score highlights the non-trivial samples that are significant to the learning of LLMs. The effectiveness of the two scores is empirically validated in Section 4.3.1. 3.3 Few-shot Fine-tuning Based on the final influential score obtained via Eq. (13), we can select a subset of data S for LLMs\u2019 few-shot fine-tuning, given an expected selection ratio \ud835\udc5f. \u2022 Few-shot data coverage. A straightforward approach is to select the data greedily, i.e., rank the samples based on the overall scores, and then select the top-\ud835\udc5fpercentage of the training data. However, greedily selecting the samples with higher scores might result in very similar samples with low data coverage, which leads to: 1) Inadequacy of samples from other areas, thus hurting the bounded empirical risk [60] and lowering the overall performance (cf. Section 4.2). 2) Poor utilization of training samples because of the redundant samples with similar patterns, thereby causing suboptimal selection for few-shot fine-tuning. \u2022 Coverage-enhanced sample selection. To address the above issues, we follow [60] to select the users based on the idea of stratified sampling. The core idea is to maintain the budget for the samples in different areas of training distribution, such that the data coverage will be improved to ensure a high-probability bound for the empirical risk (refer to [60] for detailed proof). In detail, we first divide the samples into \ud835\udc3egroups according to their overall scores. We then iteratively sample \ud835\udc5b\ud835\udc60user sequences from the group with the fewest samples and discard that group after sampling, where \ud835\udc5b\ud835\udc60is the average sampling budget for all groups and is initialized with \u230a\ud835\udc5f| D| \ud835\udc3e\u230b. If the group size is smaller than the average sampling budget, we select all users from this group and update the average sampling budget for the remaining groups (see Algorithm 2). Based on the selected few-shot samples S, we optimize the learnable parameters (\ud835\udf19\u2208\u03a6) of LLMs: \u02c6 \ud835\udf19= arg min \ud835\udf19\u2208\u03a6 1 |S| \u2211\ufe01 \ud835\udc60\ud835\udc56\u2208S LLLM \ud835\udf19 (\ud835\udc60\ud835\udc56). (14) \u2022 Instantiation. To instantiate DEALRec on LLM-based recommender models, we first employ a surrogate model to train on original training samples D and calculate the influence score for all samples via Eq. (11). We then obtain the effort score for LLMs via Eq. (12), where \ud835\udf19can be the learnable parameters from any backend LLM-based recommender models. Eventually, we apply the stratified sampling to select the samples for LLMs\u2019 few-shot fine-tuning. The detailed data pruning process of DEALRec is demonstrated in Algorithm 2. Conference\u201917, July 2017, Washington, DC, USA Xinyu Lin1, Wenjie Wang1, Yongqi Li2, Shuo Yang3, Fuli Feng4, Yinwei Wei5, and Tat-Seng Chua1 Table 1: Statistics of the three datasets. Datasets # Users # Items # Interactions Density Games 49,156 17,332 342,329 0.04% MicroLens-50K 49,887 19,217 359,048 0.04% Book 88,263 86,272 5,303,707 0.07% 4 EXPERIMENT We conduct extensive experiments on three real-world datasets to answer the following research questions: \u2022 RQ1: How does our proposed DEALRec perform compared to the coreset selection baselines for LLM-based recommendation and the models trained with full data? \u2022 RQ2: How do the different components of DEALRec (i.e., influence score, gap regularization, and stratified sampling) affect the performance, and is DEALRec generalizable to different surrogate models? \u2022 RQ3: How does DEALRec perform under different selection ratios and how does DEALRec improve the overall performance? 4.1 Experimental Settings 4.1.1 Datasets. We conduct experiments on three real-world recommendation datasets across different domains: 1) Games is from the Amazon review datasets6, which covers interactions between users and video games with rich textual features such as title and categories. 2) MicroLens-50K7 is a newly released micro-video recommendation dataset [38]. It contains 50\ud835\udc58users\u2019 interactions with micro-videos and their associated multimodal features, e.g., item title. 3) Book is also from Amazon review datasets, containing users\u2019 interactions with extensive books. For Games and Book, we follow previous work and discard the interactions with the ratings < 4. For the three datasets, we sort all user-item interactions according to the global timestamps, and then split the interactions into training, validation, and testing sets with the ratio of 8:1:1. Besides, we consider two different fine-tuning settings as follows: 1) Few-shot fine-tuning fine-tunes LLM-based recommender models with limited samples at a fixed size, e.g., 1024shot, obtained via different data pruning methods. 2) Full fine-tuning utilizes all samples to fine-tune LLM-based recommender models without data pruning. 4.1.2 Baselines. We compare DEALRec with the random sampling and several competitive coreset selection methods, including difficulty-based methods and diversity-based methods: \u2022 Random obtains the data subset via random sampling, which is a popular and strong baseline in data-efficient training [16]. \u2022 GraNd [39] is a representative coreset selection method that assumes hard samples are important. It uses the average gradient norm of each sample during training and selects the samples with larger gradient norms. \u2022 EL2N [39] proposes to select the samples with larger errors between the labels and the prediction from the model trained by the original dataset. This method is also difficulty-based. 6https://jmcauley.ucsd.edu/data/amazon/. 7https://github.com/westlake-repl/MicroLens/. \u2022 CCS [60] is a competitive method that selects the samples considering both high data coverage and sample importance. We use EL2N as the importance metric for CCS. \u2022 TF-DCon [53] is a recently proposed data pruning method for content-based recommendation, which clusters the user sequences based on the user representations obtained from both well-trained recommender models and LLMs for selection. \u2022 RecRanker [36] proposes a sampling strategy to select highquality user sequences. It selects the users with more interactions for better user modeling and utilizes a cluster-based sampling strategy to enhance user diversity. We do not perform optimization-based methods for comparison because of the inapplicability of complex bi-level or discrete optimization for LLMs on large-scale recommendation data (cf. Section 2). We instantiate our proposed DEALRec and all baselines on two competitive backend LLM-based recommender models: 1) BIGRec [3] utilizes the item title to present the user sequence for recommendation generation; 2) TIGER [40] learns extra tokens from item features to present items, and then converts the user sequence into the sequence of the new item token for next-item generation. \u2022 Evaluation. We employ the widely used metrics Recall@\ud835\udc3eand NDCG@\ud835\udc3eto evaluate the models [22], with \ud835\udc3eset to 10 and 20 for Games, and \ud835\udc3e= 20 and 50 for MicroLens-50K and Book.8 For the two backend LLM-based recommender models, we adopt full ranking protocal [21] for BIGRec. Since TIGER does not support full ranking, we select the top-\ud835\udc3eitems from the generated items according to the probability scores for evaluation. 4.1.3 Implementation. As for the two backend LLM-based recommender models, we follow the original settings in their paper for implementation. We employ LLaMA-7B for BIGRec and transformer-based encoder-decoder architecture for TIGER as introduced in their paper [40]. All fine-tuning experiments are conducted on four NVIDIA RTX A5000 GPUs. Besides, we adopt the parameter-efficient fine-tuning technique LoRA [23] to fine-tune BIGRec and fully fine-tune the parameters of TIGER. We utilize SASRec [24], a representative sequential recommender model, as the surrogate model in DEALRec. We set the iteration number \ud835\udc47 for HVP estimation at 5000, and search the regularization strength \ud835\udf06in {0.1, 0.3, 0.5, 1.0, 2.0}. For cluster-based methods, the number of clusters \ud835\udc3eis explored in {25, 50, 75}. As for the coreset selection methods that require the training of LLMs, we consider a feasible implementation [8] by executing them on the same surrogate model as DEALRec. 4.2 Overall Performance (RQ1) The results of the baselines and DEALRec with two competitive backend LLM-based recommender models on three datasets under few-shot fine-tuning (1024 samples) are presented in Table 2, from which we have the following observations: \u2022 All methods with BIGRec typically yield better performance than those with TIGER, which is attributed to two reasons: 1) BIGRec employs a larger LLM (i.e., LLaMA-7B) compared to TIGER, 8We report metrics@20 and @50 because of the challenging modeling of user behavior on book and micro-video recommendations, where the temporal shifts of user interests and the item feature is stronger and thus more difficult to capture [49, 50]. Data-efficient Fine-tuning for LLM-based Recommendation Conference\u201917, July 2017, Washington, DC, USA Table 2: Overall performance comparison between the baselines and DEALRec instantiated on two competitive LLM-based recommender models on three datasets. For each backend model, the bold results highlight the best results while the second-best ones are underlined. \u2217implies the improvements over the second-best results are statistically significant (\ud835\udc5d-value < 0.01) under one-sample t-tests. We run all experiments for 3 times with different random seeds and report the averaged results. Games MicroLens-50K Book 1024-shot (\ud835\udc93=2%) 1024-shot (\ud835\udc93=2%) 1024-shot (\ud835\udc93=1%) Methods R@10 R@20 N@10 N@20 R@20 R@50 N@20 N@50 R@20 R@50 N@20 N@50 TF-DCon 0.0102 0.0157 0.0062 0.0078 0.0066 0.0099 0.0027 0.0034 0.0104 0.0144 0.0083 0.0092 RecRanker 0.0112 0.0166 0.0074 0.0090 0.0024 0.0042 0.0011 0.0014 0.0108 0.0145 0.0090 0.0097 CCS 0.0164 0.0246 0.0097 0.0122 0.0096 0.0131 0.0041 0.0049 0.0110 0.0145 0.0088 0.0096 GraNd 0.0158 0.0250 0.0098 0.0125 0.0014 0.0032 0.0006 0.0010 0.0102 0.0136 0.0080 0.0087 EL2N 0.0154 0.0256 0.0098 0.0128 0.0096 0.0045 0.0041 0.0016 0.0107 0.0149 0.0085 0.0094 Random 0.0163 0.0241 0.0100 0.0122 0.0108 0.0151 0.0044 0.0054 0.0099 0.0134 0.0083 0.0090 BIGRec DEALRec 0.0181* 0.0276* 0.0115* 0.0142* 0.0124* 0.0160* 0.0055* 0.0064* 0.0117* 0.0155* 0.0096* 0.0104* TF-DCon 0.0051 0.0074 0.0033 0.0040 0.0006 0.0057 0.0002 0.0013 0.0028 0.0051 0.0020 0.0027 RecRanker 0.0028 0.0045 0.0019 0.0024 0.0043 0.0064 0.0011 0.0014 0.0027 0.0052 0.0018 0.0025 CCS 0.0050 0.0084 0.0031 0.0041 0.0026 0.0061 0.0010 0.0013 0.0026 0.0048 0.0018 0.0024 GraNd 0.0042 0.0053 0.0027 0.0030 0.0006 0.0014 0.0003 0.0005 0.0008 0.0020 0.0006 0.0010 EL2N 0.0034 0.0048 0.0024 0.0029 0.0011 0.0016 0.0004 0.0004 0.0005 0.0015 0.0004 0.0007 Random 0.0062 0.0102 0.0039 0.0051 0.0037 0.0059 0.0011 0.0014 0.0033 0.0066 0.0022 0.0031 TIGER DEALRec 0.0074* 0.0114* 0.0062* 0.0074* 0.0058* 0.0076* 0.0020* 0.0020* 0.0039* 0.0076* 0.0026* 0.0037* Table 3: Performance comparison between DEALRec under 1024-shot fine-tuning and the full fine-tuning of the BIGRec in terms of both accuracy and time costs. \u201c%Com.\u201d denotes the performance achieved by DEALRec compared to the full fine-tuning. Games MicroLens-50K Book R@10\u2191 R@20\u2191 N@10\u2191 N@20\u2191 Time\u2193 R@20\u2191 R@50\u2191 N@20\u2191 N@50\u2191 Time\u2193 R@20\u2191 R@50\u2191 N@20\u2191 N@50\u2191 Time\u2193 Full 0.0169 0.0233 0.0102 0.0120 36.87h 0.0081 0.0136 0.0038 0.0053 66.64h 0.0076 0.0108 0.0060 0.0068 84.77h DEALRec 0.0181 0.0276 0.0115 0.0142 1.67h 0.0124 0.0160 0.0055 0.0064 1.23h 0.0117 0.0155 0.0096 0.0104 1.93h % Com. 107.10% 118.45% 112.75% 118.33% 4.53% 153.09% 117.65% 144.74% 120.75% 1.85% 153.95% 143.52% 160.00% 152.94% 2.28% thereby benefiting from the stronger generalization ability of large-sized LLMs [32]; and 2) BIGRec leverages item titles to present the user sequence, leading to better utilization of world knowledge in LLMs. In contrast, TIGER learns extra item tokens for LLMs. This might result in cold-start item issues since only limited item tokens are learned while others are maintained randomly initialized under the few-shot fine-tuning setting. \u2022 Among all coreset selection baselines, difficulty-based (GraNd, EL2N) methods generally perform better than diversity-based methods (TF-DCon, RecRanker). This is reasonable since diversity-based methods merely heuristically encourage selecting users with divergent preference, which lacks the assessments of their contributions to the model training. In contrast, GraNd and EL2N use pre-defined metrics to measure the sample difficulty and select the samples with larger scores, which encourages selecting the samples that are more informative for models\u2019 optimization. Besides, CCS improves EL2N in most cases, as it maintains easy samples for selection, thus compensating the knowledge of recommendation data from high-density areas. \u2022 Another interesting observation is that random sampling yields competitive performance or even outperforms other coreset selection methods in some cases, which might attributed to two possible reasons: 1) Uniformly selected user sequences preserve high coverage of the original training distribution compared to other baselines, which ensures a high probability of guaranteed bound for low empirical risk [60]. This observation is also consistent with the findings in [16]. 2) The inferior performance of some coreset selection methods also might be caused by the implementation settings (Section 4.1.3), where they may suffer from the learning ability gap between the surrogate model and LLMs. (cf. Section 3.2). \u2022 DEALRec significantly outperforms all coreset selection methods across the three datasets. The consistent performance improvements on both backend models validate the superiority of DEALRec in identifying influential samples for LLMs\u2019 adaptation to the recommendation data. The superior performance is attributed to: 1) the accurate and efficient estimation of the influence on empirical risk, i.e., overall performance by removing a sample in training; and 2) the gap regularization based on the effort score to penalize the easy samples for LLMs. By emphasizing the non-trivial samples specifically for LLMs, gap regularization alleviates the learning ability gap between the surrogate model and the LLMs. \u2022 Comparison with full fine-tuning. We further compare DEALRec with BIGRec under full training w.r.t. accuracy and efficiency, as presented in Table 3. We can find that: 1) DEALRec achieves higher performance compared to the model trained by the full data, indicating the effectiveness of DEALRec for high accuracy. The inferior performance of BIGRec under full training also implies that not all user sequences are informative for model training, or even harmful to the training, e.g., false negative interactions. This has also been observed in CTR prediction [52] and has been discussed in [2] from the view of data redundancy. 2) DEALRec Conference\u201917, July 2017, Washington, DC, USA Xinyu Lin1, Wenjie Wang1, Yongqi Li2, Shuo Yang3, Fuli Feng4, Yinwei Wei5, and Tat-Seng Chua1 0.008 0.0105 0.013 0.0155 0.018 0.022 0.026 0.03 Games Recall@20 NDCG@20 Greedy DEALRec (a) w/o IS w/o \ud835\udf39\ud835\udc94 0.0082 0.0087 0.0092 0.0097 0.01 0.0106 0.0112 0.0118 MicroLens-50K Recall@20 NDCG@20 Greedy DEALRec (b) w/o IS w/o \ud835\udf39\ud835\udc94 Figure 4: Ablation study of the influence score, effort score, and coverage-enhanced sample selection strategy. Table 4: Performance comparison between DEALRec with different surrogate models and the BIGRec under full training. \u201cTime\u201d presents the time costs for training the surrogate model on a single NVIDIA RTX A5000. R@10\u2191 R@20\u2191 N@10\u2191 N@20\u2191 Time\u2193 Full 0.0169 0.0233 0.0102 0.0120 / BERT4Rec 0.0175 0.0258 0.0103 0.0128 0.76h SASRec 0.0181 0.0276 0.0115 0.0142 0.45h DCRec 0.0211 0.0283 0.0117 0.0137 0.61h significantly reduces the time costs for LLMs\u2019 fine-tuning (97.11% reduction of fine-tuning costs on average). With the remarkably declined training costs, DEALRec has the potential to facilitate real-world applications of LLM-based recommender models. 4.3 In-depth Analysis We carry out further experiments9 to analyze the effectiveness of each component of DEALRec and the robustness of surrogate model selection. Besides, we investigate how DEALRec performs under different selection ratios and explore how DEALRec performs over different user groups. 4.3.1 Ablation Study (RQ2). To study the effectiveness of each component of DEALRec, i.e., influence score, effort score, and coverage-enhanced sample selection strategy, we separately remove the Influence Score (IS) and effort score \ud835\udeff\ud835\udc60, referred to as \u201cw/o IS\u201d and \u201cw/o \ud835\udeff\ud835\udc60\u201d, respectively. Besides, we replace the coverage-enhanced sample selection strategy by greedily selecting the samples with higher scores, denoted as \u201cGreedy\u201d. From the results presented in Figure 4, we can observe that: removing either the influence score or effort score will cause performance drops. This validates the effectiveness of 1) the assessment of overall performance change caused by removing samples from training; 2) additional signals of learning ability captured from LLMs as regularization, alleviating the gap between the surrogate model and the LLMs. Moreover, simply selecting the samples with higher overall scores might weaken the learning of distinct user behaviors and item knowledge (inferior performance of \u201cGreedy\u201d), as discussed in Section 3.3. 4.3.2 Robustness on different surrogate model (RQ2). To further assess the generalization ability of DEALRec on different surrogate models, we employ three representative sequential 9We conduct in-depth experiments using BIGRec as the backend model because of its better performance compared to TIGER. 0.01 0.016 0.022 0.028 0.2% 0.5% 1% 1.5% 2% 4% Full Training (a) Effect of \ud835\udc93w.r.t. Recall (Recall@20) 0.925 0.967 1.009 0 0.6 1.2 1.8 0.2% 0.5% 1% 1.5% 2% 4% %Reduction (b) Effect of \ud835\udc93w.r.t. time costs (Time Costs (h)) (%Reduction) Figure 5: Performance of DEALRec with different selection ratio \ud835\udc5fw.r.t. accuracy and efficiency on Games. recommender models, i.e., BERT4Rec [44], SASRec [24], and a recently proposed DCRec [56] as the surrogate models for data pruning, respectively. The results on Games are presented in Table 4, and we omit the results with similar observations on the other two datasets to save space. From the table, we can find that: 1) DEALRec with the three surrogate models consistently outperforms BIGRec under full finetuning. This demonstrates the strong robustness of DEALRec on different surrogate models. 2) Nonetheless, different surrogate models cause some fluctuations in the accuracy of the LLM-based recommender model. This is reasonable because different model architectures have different expressiveness of user behavior and item knowledge. As such, the selected samples possibly vary across different surrogate models, thus affecting the effectiveness of LLMs\u2019 few-shot fine-tuning. 2) It is noted that DCRec surpasses SASRec and BERTRec by a large margin. The possible reason might be that the SOTA DCRec employs contrastive learning to enhance the learning of user representations, thus leading to better user modeling and yielding lower empirical risk. 3) SASRec exhibits the least time costs for training and achieves competitive performance among the three surrogate models. Therefore, based on the empirical results, SASRec could be a good choice of surrogate model for DEALRec to facilitate efficient LLM-based recommender fine-tuning in real-world deployments. 4.3.3 Effect of selection ratio \ud835\udc93(RQ3). To investigate the effect of selection ratio \ud835\udc5fon DEALRec on both accuracy and efficiency, we vary the ratio \ud835\udc5ffrom 0.2% (128-shot) to 4% (4096-shot) and present the results in Figure 5. From the figures, it is observed that: 1) The recommendation accuracy rapidly improves as the number of selected samples increases from 0.2% to 1%, surpassing the full training when \ud835\udc5f= 1%. Besides, if we continuously increase the selection ratio from 2% to 4%, the benefits from additional samples gradually diminish and only minor improvements in accuracy are observed. We suspect that the gap between and the recommendation data mainly resides in a small subset of the representative user behaviors, which is what DEALRec aims to identify. 2) Meanwhile, although the time costs for fine-tuning LLMs gradually increase because of additional samples, the cost reduction compared to the full training still reaches over 94%. 3) Empirically, setting \ud835\udc5f= 1% is recommended to achieve comparable performance to full fine-tuning as well as achieving low costs for real-world deployments. 4.3.4 User group evaluation (RQ3). To study how DEALRec achieves superior overall performance, we test the DEALRec over user sequences of different difficulties. Specifically, we calculate Data-efficient Fine-tuning for LLM-based Recommendation Conference\u201917, July 2017, Washington, DC, USA 0.01 0.024 0.038 0.052 Games Random DEALRec Group 1 Group 2 Group 3 (a) Performance w.r.t. Recall@20 \u219111.42% \u219137.29% \u21915.98% 0 0.01 0.02 Games Random DEALRec Group 1 Group 2 Group 3 (b) Performance w.r.t. NDCG@20 \u21918.41% \u219137.50% \u21917.02% Figure 6: Performance of DEALRec over easy to difficult samples (Group 1 to Group 3). 0.015 0.023 0.031 0.013 0.018 0.023 0.1 0.3 0.5 1 2 Games Recall@10 Recall@20 (a) Effect of \ud835\udf40w.r.t. Recall (Recall@10) (Recall@20) 0.000 0.010 0.019 0.004 0.012 0.02 0.1 0.3 0.5 1 2 Games NDCG@10 NDCG@20 (b) Effect of \ud835\udf40w.r.t. NDCG (NDCG@10) (NDCG@20) Figure 7: Performance of DEALRec with different \ud835\udf06. the loss of each user sequence via the model trained by randomly selected few-shot samples; we then divide the users into three groups according to their loss values, from the easier samples with smaller loss (Group 1) to the harder samples with larger loss (Group 3). The results of each group of DEALRec and Random on Games are presented in Figure 6. We can find that 1) the performance of both DEALRec and Random gradually declines from Group 1 to Group 3, because users with larger loss are more difficult to predict. Nevertheless, 2) DEALRec consistently outperforms Random in each group, which validates the effectiveness of DEALRec in considering the influence on overall performance. 4.3.5 Effect of regularization strength \ud835\udf40. To examine the impact of gap regularization strength, we vary \ud835\udf06from 0.1 to 2 for DEALRec and evaluate the performance as presented in Figure 7. From the figures, we can find that: 1) As we incrementally increase the value of lambda, the overall trend of accuracy has been observed to be generally improved. This makes sense because there exists a gap between the surrogate model and LLMs as discussed in Section 3.2, emphasizing the necessity to regularize the influence score to be aligned with the learning ability of the LLMs. 2) However, blindly pursuing larger lambda is not necessarily beneficial. Therefore, we should carefully choose the \ud835\udf06to balance between the performance-driven influential samples from the surrogate model and the difficult samples for the LLMs. 5 RELATED WORK 5.1 LLM-based Recommendation Leveraging LLMs for recommendation has gained remarkable attention recently [13, 31, 48, 54], showcasing their potential across various recommendation tasks, including CTR predicton [4], sequential recommendation [32], and cross-domain recommendation [15]. Some early studies explore the recommendation ability of powerful LLMs, e.g., ChatGPT, through the in-contextlearning ability [10, 34, 45]. Nevertheless, the performance of LLMs is limited without extra fine-tuning over the domain-specific recommendation data [4, 34]. To fully leverage the potential of LLMs for recommendation, a series of work studies various fine-tuning strategies tailored for recommendation tasks [15, 30, 57]. However, fine-tuning LLMs requires extensive computational resources and time costs, thus hindering the real-world applications of LLM-based recommender models. Therefore, it is crucial to enhance the fine-tuning efficiency of LLM-based recommender models. In this work, we propose the task of data pruning for efficient LLM-based recommendation, which aims to identify representative samples tailored for LLMs\u2019 few-shot fine-tuning. 5.2 Coreset Selection Coreset selection has been widely studied in both traditional machine learning [7, 11, 51] and deep learning [55], benefiting many downstream tasks such as data-efficient learning [47], continual learning [5], neural architecture search [43], and active learning [42]. It aims to select a small but representative subset from the full data that can lead to comparable model performance. Previous work mainly falls into two groups: 1) Heuristic methods [8, 12, 47] typically assume difficult or diverse samples are informative for model training and use pre-defined metrics to compute a score for selection. 2) Optimization-based methods [25, 29, 37, 55] leverages the bi-level or discrete optimization techniques to optimize the data subset that can minimize the empirical risk. However, heuristic methods do not estimate the impact of selected samples on empirical risk, thus might lead to suboptimal coreset selection. And optimization-based methods fail to be applied to LLM-based recommendation due to the cumbersome calculation for complex optimization. Furthermore, previous methods usually rely on the training of the model on full data for selection, which is infeasible for LLM-based recommendation (cf. Section 2). \u2022 Data Condensation [59] is another potential solution to achieve data-efficient training. However, it is intrinsically different from our proposed task of data pruning. While it aims to synthesize a small but informative dataset [58], our proposed task targets to identify representative samples from the existing samples for LLM\u2019s few-shot fine-tuning. Besides, previous work mainly designed for continuous data, which is not applicable to LLMbased recommendation [52]. TF-DCon [53] is recently proposed for content-based recommendation and we compare it in Section 4.2. 6 CONCLUSION In this work, we proposed the task of data pruning for efficient LLM-based recommendation, which aims to identify representative samples tailored for LLMs\u2019 few-shot fine-tuning. Furthermore, we posited two objectives for this data pruning task: 1) high accuracy targets to select the samples that can lead to low empirical risk; and 2) high efficiency strives to consume low costs for the data pruning process. To this end, we proposed a novel data pruning method, namely DEALRec, to efficiently identify the influential samples with two scores. 1) The influence score is formulated to estimate the influence of sample removal on empirical risk, where the calculation is extended from the influence function and is accelerated through Conference\u201917, July 2017, Washington, DC, USA Xinyu Lin1, Wenjie Wang1, Yongqi Li2, Shuo Yang3, Fuli Feng4, Yinwei Wei5, and Tat-Seng Chua1 the symmetric property. 2) We introduced a small-sized surrogate model to calculate the influence score efficiently and proposed the effort score to bridge the gap between the surrogate model and LLMs. Empirical results validate the effectiveness of DEALRec in achieving both high efficiency and high accuracy. This work proposes a data pruning task for LLM fine-tuning, opening up a new research direction for efficient LLM-based recommendation and leaving many promising directions for future work. 1) It is worthwhile to apply DEALRec to more LLM-based recommender models on more cross-domain datasets, improving fine-tuning performance with limited resources. 2) Due to the limited context window length of LLMs, it is promising to select the informative interacted items in users\u2019 interaction sequences for LLMs\u2019 fine-tuning. 3) Enhancing the inference efficiency of LLM-based recommender models is also a crucial problem for their real-world deployments. Data-efficient Fine-tuning for LLM-based Recommendation Conference\u201917, July 2017, Washington, DC, USA", "introduction": "Leveraging Large Language Models (LLMs) for recommenda- tion has demonstrated promising efficacy across various tasks, including Click-Through Rate (CTR) prediction [4], sequential recommendation [40], and explainable recommendation [14]. To build LLM-based recommender models, it is crucial to fine-tune LLMs on recommendation data for two primary reasons: 1) there exists a significant gap between previous LLMs\u2019 tuning tasks and the recommendation tasks [4], and 2) the rapid and continuous update of recommendation data necessitates frequent fine-tuning of LLMs [41]. For example, there are approximately 160 million new videos and 942 billion interactions emerging on TikTok per day1. Thus, frequent fine-tuning is imperative to incorporate up-to- date item information and enhance user behavior comprehension. However, fine-tuning LLMs on large-scale recommendation data demands substantial computational resources and time costs [30], thereby diminishing the practicality of LLM-based recommender models in real-world applications. As such, it is essential to enhance the fine-tuning efficiency of LLM-based recommender models. Fortunately, the rich world knowledge encoded in LLMs offers a promising solution for efficient fine-tuning: few-shot fine-tuning. Previous studies have uncovered that LLMs have the potential to quickly adapt to recommendation tasks by fine-tuning on randomly sampled few-shot data [3, 4, 32] (Figure 1(a)), significantly reducing training time and computational costs. Despite its efficiency, randomly sampled data may lack sufficient representativeness to enable LLMs to effectively comprehend new items and user behaviors. To combat this issue, we introduce the task of data pruning for efficient LLM-based recommendation, which aims to identify representative samples tailored for LLMs\u2019 few-shot fine- tuning. A closely related literature to this data pruning task is coreset selection [16]. It tries to select a small but representative subset from the full data, aiming to achieve comparable performance. Existing coreset selection methods generally fall into two categories2: 1) Heuristic methods select hard or diverse samples based on pre- defined metrics [36, 39, 53]. Such heuristic methods do not estimate 1https://www.tiktok.com/transparency/. 2More detailed related work is discussed and compared in Section 4 and 5. arXiv:2401.17197v1 [cs.IR] 30 Jan 2024 Conference\u201917, July 2017, Washington, DC, USA Xinyu Lin1, Wenjie Wang1, Yongqi Li2, Shuo Yang3, Fuli Feng4, Yinwei Wei5, and Tat-Seng Chua1 0.0000 0.0025 0.0050 0.0075 0 128 256 512 1024 2048 BIGRec SASRec (full data) (a) Few-shot Performance. (Recall@10) (a) Few-shot performance on MicroLens-50K. Conference\u201917, July 2017, Washington, DC, USA Anon. 0.015 0.023 0.031 0.013 0.018 0.023 0.1 0.3 0.5 1 2 Games Recall@10 Recall@20 (a) Effect of ! w.r.t. Recall (Recall@10) (Recall@20) Figure 1: image Model GPU (GiB) Time BIGRec 18.60 \u21e54GPU 36.87h SASRec 1.61 \u21e51GPU 0.45h % Red 97.84% 98.78% Figure 2: The comparison of training costs between an LLM (BIGRec) and a surrogate model (SASRec)3. To overcome the above issues, we summarize two principal objec- tives for data pruning in the context of LLM-based recommendation: 1) high accuracy, which focuses on selecting the samples that can lead to low empirical risk; and 2) high e\uffffciency, which emphasizes the low costs of the data pruning process, i.e., eliminating the dependency of well-trained LLMs on the full data. Nevertheless, pursuing the two objectives faces two challenges: \u2022 To achieve high accuracy, it is essential to measure the in\uffffuence of removing each training sample on the empirical risk. However, assessing the in\uffffuence of all samples is costly, as it requires the leaving-one-out retraining for each sample [39]. \u2022 To achieve high e\uffffciency, one possible solution is to train a surrogate model for sample selection, e.g., using a small-sized traditional recommender model, which can drastically reduce the GPU memory usage and the training time compared to LLMs (see Table ??). However, there exists a gap between LLMs and surrogate models, attributable to their divergent capabilities in learning user behaviors (refer to Figure 4). As such, in\uffffuential samples selected by surrogate models might deviate from the ones on LLMs, potentially hurting the adaptation of LLMs. To address the challenges, we propose a novel Data pruning method, to E\uffffciently identify the in\uffffuentiAl samples for LLM- based Recommender \uffffne-tuning (shorted as DEALRec). DEALRec leverages two scores, namely in\uffffuence score and e\uffffort score, to identify the in\uffffuential samples. The influence score is formulated to estimate the in\uffffuence of removing each training sample on the empirical risk. It is calculated by extending the in\uffffuence function [16] via chain rules and second-order optimization techniques [25]. To e\uffffciently calculate the in\uffffuence score for all samples, DEALRec employs a simple yet e\uffffective symmetric property to accelerate the calculation, requiring only the estimation once for all samples (cf. Section 3.1). Thereafter, DEALRec uses a traditional recommender model as a surrogate model to obtain the in\uffffuence score and introduces the e\uffffort score to mitigate the gap between the surrogate model and LLMs. The e\uffffort score is obtained by calculating the gradient norm of a sample loss w.r.t. the parameters of LLMs, intuitively measuring the e\uffffort of LLMs to \ufffft a speci\uffffc sample. By regularizing the in\uffffuence score with the e\uffffort score, DEALRec identi\uffffes the in\uffffuential samples that encompass both the representativeness of the full data and the signi\uffffcance to LLMs. We instantiate DEALRec on two LLM-based recommender models and conduct extensive experiments on three real-world datasets, validating the superiority of DEALRec in terms of both e\uffffciency and accuracy. The code and datasets are available at https://anonymous.4open.science/r/DEALRec/. In summary, this work o\uffffers three major contributions: \u2022 We introduce a data pruning task to identify the in\uffffuential samples tailored for e\uffffcient LLM-based recommender \uffffne- tuning, unlocking the remarkable potential of applying LLM- based recommender models to real-world platforms. \u2022 We propose a novel data pruning method to discover the in\uffffuential samples for LLM-based recommendation, which e\uffffectively and e\uffffciently assesses the in\uffffuence of removing a sample on empirical risk. \u2022 We conduct extensive experiments on three real-world datasets, demonstrating the e\uffffectiveness of DEALRec in achieving both high e\uffffciency and accuracy. 2 TASK FORMULATION In this section, we \uffffrst introduce LLM-based recommender models and uncover the challenge of real-world applicability. Thereafter, we formulate the task of data pruning for LLM-based recommendation and compare the related work on coreset selection. \u2022 LLM-based recommender models. To leverage the compe- tent capabilities of LLMs, LLM-based recommendation typically utilize powerful LLMs directly as the recommender models. Since LLMs are not particularly trained on the recommendation data, \uffffne-tuning is the necessary and key step for LLMs to learn the item knowledge and understand user behavior. Let U and I denote the sets of users and items, respectively. We present each training sample, i.e., user sequence, as B = (G,~), where G = [81,82, . . .,8|G |] is the user\u2019s historical interactions in chronological order, and ~ is the next interacted item of the user4, where {81, . . .,8|G |,~} \u21e2I. Formally, given the user sequences of the training set D = {BD|D 2 U}, the target is to \uffffne-tune an LLM for recommendation tasks. The learnable parameters (q 2 \u03a6) of an LLM is optimized by minimizing the negative log-likelihood of the next interacted item~ conditioned on input G: min q2\u03a6{L!!\" q = \u2212 |~| \u2019 C=1 log%q (~C |~ Group gradient in a time period Illustration of shifting factor with three groups and three time periods (\\ie $i\\in\\{1,2,3\\}$ and $e\\in\\{1,2,3\\}$). (a) depicts each group gradient within a time period (first row), the period gradient (second row), and the period gradient weighted by $\\beta_e$ (third row). (b) depicts the shifting-aware holistic gradient over the temporally shifted distributions. (c) demonstrates the selected group (marked in green) based on the similarity between the group gradient and the shifting trend. Step 1 Step 2 Step 3 Illustration of shifting factor with three groups and three time periods (\\ie $i\\in\\{1,2,3\\}$ and $e\\in\\{1,2,3\\}$). (a) depicts the three steps of obtaining the weighted period gradient in each time period. And then, by summing up the weighted period gradient, we can obtain the shifting trend as shown in (b). Finally, the shifting factor for each group is obtained by calculating the similarity between the group gradient and shifting trend as shown in (c). Figure 2: Illustration of the shifting factor with three groups and three time periods (i.e., i \u2208{1, 2, 3} and e \u2208{1, 2, 3}). (a) depicts the three steps of obtaining the weighted period gradient in each time period. And then, by summing up the weighted period gradient, we can obtain the shifting trend as shown in (b). Finally, the shifting factor for each group is obtained by calculating the similarity between the group gradient and the shifting trend as presented in (c). 4 Temporally DRO To alleviate the impact of temporal feature shifts for coldstart recommendation, we propose two new objectives for DRO training: 1) enhancing the worst-case optimization on minority groups to raise the lower bound of performance, and 2) capturing the temporal shifting trend of item features and emphasizing the optimization of groups that are likely to become popular. 4.1 Group Selection It is noted that the group selection plays a critical role in DRO (Eq. (3)) to strengthen the model\u2019s robustness (Piratla, Netrapalli, and Sarawagi 2022). As such, we propose a novel TDRO, which introduces two factors in group selection: 1) a worst-case factor to focus more on minority groups with larger losses and give them priorities for group selection, and 2) a shifting factor to emphasize the potentially popular groups in cold items by leveraging the temporal shifting trend. Besides, the shifting factor can alleviate the overemphasis on one particular worst-case group. Shifting Trend-guided Group Selection. In detail, we first split the warm items into K groups via K-means clustering based on their item features (e.g., visual features of thumbnails). We then split the chronologically sorted interactions into E time periods, e \u2208{1, . . . , E}. We denote the average loss of group i in time period e as Le i(\u00b7). At each update step t, we consider both the worst-case factor and the shifting factor to select the group j\u2217for optimization, which is formulated as j\u2217= arg min j\u2208{1,...,K} \u2212(1 \u2212\u03bb) \u00af Lj(\u03b8t) | {z } (worst-case factor) + \u03bb E X e=1 K X i=1 \u03b2eLe i (\u03b8t \u2212\u03b7\u2207\u03b8 \u00af Lj(\u03b8t)) | {z } (shifting factor) , (4) where \u03bb is the hyper-parameter to balance the strength between two factors. The worst-case factor calculates the loss value of each group \u00af Lj(\u03b8t) for group selection. The group with a larger loss will have a smaller \u2212\u00af Lj(\u03b8t), thus being more likely to be selected. Besides, the shifting factor consists of two perspectives: \u2022 To alleviate the overemphasis on one particular worst-case group, the shifting factor selects the optimization group to improve the performance on all groups. Specifically, \u03b8t \u2212\u03b7\u2207\u03b8 \u00af Lj(\u03b8t) is the updated parameters if we choose group j for optimization. Thereafter, the loss of each group i in a time period e after parameter updating will be Le i(\u03b8t \u2212\u03b7\u2207\u03b8 \u00af Lj(\u03b8t)). And the performance improvements for all groups across all periods are measured by PE e=1 PK i=1 Le i(\u03b8t \u2212\u03b7\u2207\u03b8 \u00af Lj(\u03b8t)). \u2022 To emphasize the potentially popular groups in cold items, the shifting factor upweights the later time periods closer to the test phase. In detail, we use \u03b2e to re-weight the performance improvements over all groups for each time period e. We define \u03b2e = exp(p \u00b7 e), where a later period e will have a higher weight and p > 0 is the hyperparameter to control the steepness. A smaller p encourages time periods to be uniformly important, while a larger p upweights the time periods closer to the test phase. However, directly applying Eq. (4) for group selection will incur extensive resource costs as we need to consider all possible cases of the updated parameters. Fortunately, we can approximate Eq. (4) into a gradient-based formulation via First-order Taylor formulation (see Appendix A.2 for detailed derivation): j\u2217= arg max j\u2208{1,...,K} (1 \u2212\u03bb) \u00af Lj(\u03b8t) | {z } (worst-case factor) + \u03bb\u27e8gj, E X e=1 K X i=1 \u03b2ege i \u27e9 | {z } (shifting factor) , (5) where gj = \u2207\u03b8 \u00af Lj(\u03b8) denotes the gradient of the average loss of group j, and ge i = \u2207\u03b8Le i(\u03b8) denotes the gradient of group i\u2019s average loss in time period e. The \u27e8\u00b7, \u00b7\u27e9represents the inner product computation. Since PE e=1 PK i=1 \u03b2ege i is a constant vector (referred to as shifting trend) for any group j, we can avoid this cumbersome computations in Eq. (4) for efficient group selection. Interpretation of Shifting Factor. For an intuitive understanding of the gradient-based shifting factor, we visualize a toy example in Figure 2, where we set K = 3 and E = 3. \u2022 Factor decomposition. As shown in Figure 2(a), we have three decomposed group gradients, ge i\u2208{1,2,3}, for each time period e. We can then obtain the period gradient PK i=1 ge i of time period e by summing up the decomposed group gradients. Since the gradient indicates the optimization direction, the sum of the gradient within each time period, i.e., period gradient, represents the optimal updating direction in each temporally shifted distribution. Subsequently, by multiplying the period importance \u03b2e to each time period and summing up the weighted period gradient, we can obtain the shifting trend PE e=1 PK i=1 \u03b2ege i that reflects optimization direction on potentially popular groups (Figure 2(b)). \u2022 Factor interpretation. Finally, the shifting factor is obtained by calculating the inner product of the shifting trend and the group gradient gj (see Figure 2(c)). Since the shifting trend is a constant vector for all groups, the shifting factor essentially measures the similarity between each group gradient and the shifting trend, i.e., optimization direction emphasizing the potentially popular item groups. As for model optimization at each step, we first select the optimal group j\u2217via Eq. (5), and then update the parameters \u03b8 by gradient descent \u03b8t+1 = \u03b8t \u2212\u03b7\u2207\u03b8 \u00af Lj\u2217(\u03b8t). 4.2 Gradient Smoothing Despite the success of step-wise optimization in many applications (Sagawa et al. 2020), directly employing such strategy in recommender systems suffers from training instability (Wen et al. 2022). As such, we follow the previous work (Piratla, Netrapalli, and Sarawagi 2022; Wen et al. 2022) by incorporating gradient smoothing for optimization from two aspects: group importance smoothing and loss consistency enhancement. \u2022 Group importance smoothing. We consider assigning weight vector w for groups and regulate the weight dynamic by \u03b7w. Formally, wt+1 = arg max wi\u2208[K] X i wi[(1 \u2212\u03bb) \u00af Li(\u03b8) + \u03bb\u27e8gi, E X e=1 K X j=1 \u03b2ege j\u27e9] \u22121 \u03b7w KL(w, wt), (6) where wi is the i-th entry of w, \u03b7 is the learning rate, and KL(p, q) = P i pi log pi qi is the KL-divergence between p and q. By applying KKT conditions (refer to Appendix A.2), we obtain the closed-form solution of Eq. (6): wt+1 i = wt i exp(\u03b7w[(1 \u2212\u03bb) \u00af Li(\u03b8t) + \u03bb\u27e8gi, PE e=1 PK j=1 \u03b2ege j\u27e9]) P s wt s exp(\u03b7w[(1 \u2212\u03bb) \u00af Ls(\u03b8t) + \u03bb\u27e8gs, PE e=1 PK j=1 \u03b2ege j\u27e9]) . (7) Thereafter, the model parameters \u03b8 are updated through \u03b8t+1 = \u03b8t \u2212\u03b7 X i wt+1 i \u2207\u00af Li(\u03b8t). (8) \u2022 Loss consistency enhancement. To alleviate the training instability caused by aggravated data sparsity after group Algorithm 1: Training Procedure of TDRO Input: Number of groups K, number of time periods E, initial model parameters \u03b80, initial group weight w = ( 1 K , 1 K , . . . , 1 K ), initial group loss \u00af L0 i\u2208[K], item features {si|i \u2208Iw}, interactions D, shifting factor strength \u03bb, period importance \u03b2e\u2208[E], weight step size \u03b7w, streaming step size \u00b5, and learning rate \u03b7. 1: while not converge do 2: for all i \u2208{1, . . . , K} do 3: Calculate \u00af Lt i(\u03b8t) via cold-start loss function. 4: \u00af Lt i(\u03b8t) \u2190(1 \u2212\u00b5) \u00af Lt\u22121 i (\u03b8t\u22121) + \u00b5 \u00af Lt i(\u03b8t) 5: for all i \u2208{1, . . . , K} do 6: wt+1 i \u2190wt i exp(\u03b7w[(1 \u2212\u03bb) \u00af Lt i(\u03b8t)+ \u03bb(\u2207\u00af Lt i(\u03b8t) E P e=1 K P j=1 \u03b2e\u2207\u00af Le,t j (\u03b8t))]) 7: wt+1 i \u2190wt+1 i /\u2225wt+1\u22251, \u2200i \u2208{1, . . . , K} \u25b7Normalize 8: \u03b8t+1 \u2190\u03b8t \u2212\u03b7 P i\u2208[K] wt+1 i \u2207\u00af Lt i(\u03b8t) \u25b7Update Output: Optimized model parameters \u03b8. and time period division, we follow (Wen et al. 2022) to keep the streaming estimations of empirical loss: \u00af Lt j \u2190(1 \u2212\u00b5) \u00af Lt\u22121 j + \u00b5 \u00af Lt j, where \u00b5 is the hyper-parameter to control the streaming step size. A smaller \u00b5 leads to more conservative training (see Appendix A.2 for details). \u2022 Instantiation. To instantiate TDRO on cold-start recommender models, we first calculate the group weight w via Eq. (7), where L(\u03b8) can be substituted by any form of the loss function from the backend cold-start models. The model parameters will then be optimized based on weighted gradient descent via Eq. (8). Training details of TDRO are presented in Algorithm 1. 5 Experiments We conduct extensive experiments on three real-world datasets to answer the following research questions: \u2022 RQ1: How does our proposed TDRO perform compared to the baselines under temporal feature shifts? \u2022 RQ2: How do the different components of TDRO (i.e., two factors for group selection) affect the performance? \u2022 RQ3: How does TDRO perform over different strengths of temporal feature shifts and how does TDRO mitigate the impact of shifts? 5.1 Experimental Settings Datasets. We conducted experiments on three real-world datasets across different domains: 1) Amazon (He and McAuley 2016) is a representative clothing dataset with rich visual features of clothing images. 2) Micro-video is a realworld industry dataset collected from a popular micro-video platform, with rich visual and textual features from thumbnails and textual descriptions. 3) Kwai6 is a benchmark recommendation dataset provided with rich visual features. For 6https://www.kwai.com/. Metric Models Amazon Micro-video Kwai All Warm Cold All Warm Cold All Warm Cold Recall@20 DUIF 0.0042 0.0048 0.0129 0.0318 0.0537 0.0771 0.0208 0.0248 0.0158 DropoutNet 0.0050 0.0110 0.0050 0.0187 0.0494 0.0222 0.0099 0.0118 0.0066 M2TRec 0.0065 0.0058 0.0068 0.0131 0.0056 0.0298 0.0317 0.0320 0.0009 MTPR 0.0057 0.0116 0.0082 0.0303 0.0723 0.0542 0.0464 0.0550 0.0049 Heater 0.0065 0.0136 0.0040 0.0469 0.1153 0.0868 0.0452 0.0536 0.0087 CB2CF 0.0078 0.0170 0.0074 0.0496 0.0961 0.0928 0.0624 0.0737 0.0064 CCFCRec 0.0071 0.0175 0.0117 0.0435 0.0750 0.0699 0.0098 0.0141 0.0129 InvRL 0.0120 0.0183 0.0150 0.0578 0.0899 0.0754 0.0588 0.0701 0.0191 CLCRec 0.0106 0.0200 0.0135 0.0583 0.1135 0.0623 0.0743 0.0884 0.0160 66+S-DRO 0.0121 0.0237 0.0144 0.0656 0.1173 0.0719 0.0661 0.0787 0.0172 66+TDRO 0.0130* 0.0237* 0.0166* 0.0703* 0.1180* 0.0761* 0.0841* 0.1016* 0.0186* GAR 0.0079 0.0200 0.0124 0.0644 0.0962 0.0840 0.0588 0.0706 0.0051 66+S-DRO 0.0078 0.0189 0.0132 0.0626 0.0894 0.0874 0.0579 0.0690 0.0050 66+TDRO 0.0087* 0.0236* 0.0150* 0.0711* 0.1104* 0.0947* 0.0598* 0.0719* 0.0052 NDCG@20 DUIF 0.0020 0.0023 0.0058 0.0204 0.0295 0.0511 0.0158 0.0181 0.0070 DropoutNet 0.0021 0.0043 0.0021 0.0117 0.0286 0.0121 0.0054 0.0061 0.0030 M2TRec 0.0032 0.0029 0.0030 0.0075 0.0036 0.0211 0.0247 0.0248 0.0004 MTPR 0.0029 0.0056 0.0030 0.0175 0.0389 0.0362 0.0324 0.0369 0.0021 Heater 0.0037 0.0075 0.0015 0.0290 0.0653 0.0484 0.0276 0.0312 0.0030 CB2CF 0.0037 0.0076 0.0031 0.0254 0.0490 0.0636 0.0446 0.0504 0.0026 CCFCRec 0.0032 0.0074 0.0050 0.0321 0.0410 0.0464 0.0068 0.0092 0.0058 InvRL 0.0056 0.0079 0.0072 0.0355 0.0493 0.0503 0.0390 0.0444 0.0088 CLCRec 0.0054 0.0093 0.0061 0.0417 0.0728 0.0444 0.0536 0.0610 0.0071 66+S-DRO 0.0060 0.0107 0.0071 0.0451 0.0747 0.0480 0.0472 0.0536 0.0076 66+TDRO 0.0066* 0.0112* 0.0077* 0.0507* 0.0794* 0.0511* 0.0597* 0.0719* 0.0081* GAR 0.0041 0.0088 0.0060 0.0375 0.0496 0.0625 0.0421 0.0485 0.0021 66+S-DRO 0.0033 0.0089 0.0052 0.0385 0.0474 0.0532 0.0423 0.0481 0.0021 66+TDRO 0.0041 0.0110* 0.0066* 0.0419* 0.0571* 0.0638* 0.0431* 0.0495* 0.0024* Table 1: Overall performance comparison between the baselines and two SOTA models enhanced by TDRO on three datasets. The bold results highlight the better performance in the comparison between the backbone models with and without TDRO. \u2217 implies that the improvements over the backbone models are statistically significant (p-value <0.01) under one-sample t-tests. Amazon and Micro-video datasets, we split the interactions into training, validation, and testing sets chronologically at the ratio of 8:1:1 according to the timestamps. For the Kwai dataset, due to the lack of global timestamps, we instead follow previous work (Wei et al. 2021) that randomly split the interactions. In addition, we divide the items in the validation and testing sets into warm and cold sets, where items that do not appear in the training set are regarded as cold items, and the rest as warm items. The statistics of datasets are summarized in Appendix Table 5. Evaluation. We adopt the full-ranking protocol (Wei et al. 2021) for evaluation. We consider three different settings: full-ranking over 1) all items, 2) warm items only, and 3) cold items only, denoted respectively as \u201call\u201d, \u201cwarm\u201d, and \u201ccold\u201d settings. The widely-used Recall@20 and NDCG@20 are employed as evaluation metrics. Baselines. We compare TDRO with competitive cold-start recommender models, including 1) robust training-based methods: DUIF (Geng et al. 2015), DropoutNet (Volkovs, Yu, and Poutanen 2017), M2TRec (Shalaby et al. 2022), and MTPR (Du et al. 2020)), and 2) auxiliary loss-based methods: Heater (Zhu et al. 2020), CB2CF (Barkan et al. 2019), CCFCRec (Zhou, Zhang, and Yang 2023), CLCRec (Wei et al. 2021), and GAR (Chen et al. 2022). Additionally, we also consider 3) potential methods to overcome temporal feature shifts: S-DRO (Wen et al. 2022) and invariant learning framework (Du et al. 2022b). Details of baselines and the hyper-parameter tuning of baselines and TDRO are summarized in Appendix A.4 and A.5. 5.2 Overall Performance (RQ1) The overall performance of the baselines and the two SOTA cold-start methods equipped with S-DRO and TDRO is reported in Table 1, from which we can observe the following: \u2022 Auxiliary loss-based methods typically outperform the robust training-based ones. The reason is that robust trainingbased methods directly utilize feature representations to fit interactions, which inevitably introduces noises and hurt the learning of the recommender model. Meanwhile, auxiliary loss-based methods decouple the CF and feature representations space, which protects the CF representations from feature noises and improves cold performance effectively via different auxiliary losses. \u2022 CLCRec consistently yields impressive performance across the three datasets. This is attributed to the integration of contrastive loss for aligning feature and CF representations, where mutual information between feature and CF space is maximized for robust prediction. Besides, by introducing adversarial constraints for similar distributions of CF and feature representations, GAR exhibits competitive performance despite its instability. \u2022 In most cases, S-DRO improves the performance of cold items compared to the backbone model. The stable improvements are attributed to the tail performance guarantee over potential shifted distributions, which may partially cover Amazon Micro-video Kwai All Warm Cold All Warm Cold All Warm Cold Methods Recall@20 Recall@20 Recall@20 Recall@20 Recall@20 Recall@20 Recall@20 Recall@20 Recall@20 CLCRec 0.0106 0.0200 0.0135 0.0583 0.1135 0.0623 0.0743 0.0884 0.0160 w/o Worst-case Factor 0.0121 0.0219 0.0157 0.0648 0.1138 0.0687 0.0790 0.0997 0.0145 w/o Shifting Factor 0.0126 0.0228 0.0160 0.0643 0.1145 0.0622 0.0797 0.0986 0.0165 TDRO 0.0130 0.0237 0.0166 0.0703 0.1180 0.0761 0.0814 0.1016 0.0186 Table 2: Ablation study of worst-case factor and shifting factor. The best results are highlighted in bold. Amazon Micro-video Group1 Group2 Group3 Group1 Group2 Group3 Distance 48 62 123 13 19 39 CLCRec 0.0218 0.0075 0.0024 0.1131 0.0503 0.0116 TDRO 0.0254 0.0110 0.0027 0.1321 0.0598 0.0139 Table 3: Recall@20 over user groups with different strengths of temporal feature shifts under \u201call\u201d setting. the shifted cold item distribution. In addition, our proposed TDRO consistently outperforms S-DRO and the backbone model on all and cold performance by a large margin. This justifies the effectiveness of TDRO in enhancing the generalization ability of the feature extractor. Moreover, capturing the shifting patterns is also helpful for achieving steady improvements for warm items, reflecting the superiority of TDRO in alleviating the temporal feature shifts issue. Possible reasons for inferior performance on InvRL and M2TRec are discussed in Appendix A.6. 5.3 In-depth Analysis In this subsection, we study two factors of TDRO, investigate the effectiveness of TDRO under different strengths of temporal feature shifts, and explore how EQUAL mitigates the impact of temporal feature shifts. Ablation Study (RQ2). To study the effectiveness of the worst-case and shifting factor, we implement TDRO without (w/o) each factor, separately. From Table 2, we can find that: 1) The performance declines if either the worst-case factor or the shifting factor is removed. This verifies the effectiveness of incorporating the optimization over worstcase group and the performance improvements for all groups based on the shifting trend. 2) Removing each factor still outperforms CLCRec (\u201call\u201d setting). This indicates that either performance lower bound guarantee or leveraging shifting trends improves generalization ability. User Group Evaluation (RQ3). We further inspect how TDRO performs under different strengths of temporal feature shifts by evaluating TDRO on different user groups. Specifically, we calculate the Euclidean distance of the average item features between the training set and testing set for each user. Next, we rank the users according to the distance, and then split the users into three groups (denoted as Group 1, Group 2, and Group 3) based on the ranking. The results w.r.t. Recall@20 is given in Table 3. Despite that the performance of both CLCRec and TDRO declines gradually as the shifts become more significant, TDRO All Cold Worst-case Popular Worst-case Popular CLCRec 0.0166 0.0168 0.0088 0.0088 TDRO 0.0173 0.0195 0.0123 0.0125 Table 4: Recall@20 of the item group with the worst performance and the item group of top 25% popular items. consistently outperforms CLCRec in each group, validating the effectiveness of TDRO in enhancing the generalization ability to temporal feature shifts. Item Group Analysis (RQ3). To explore how TDRO alleviates the impact of temporal feature shifts, we analyze the generalization ability enhancement of TDRO on Amazon w.r.t. item groups. In detail, we calculate the item popularity (i.e., interaction proportion) in the testing set and divide the items into four subgroups based on the popularity scores. We then conduct evaluation on each item subgroup to see whether TDRO: 1) guarantees the worst-case group performance, and 2) enhances the performance over the group with the top 25% popular items. As shown in Table 4, the boosted performance on worst-case group and popular items partially explains the superior performance of TDRO. 6 Conclusion and Future Work In this work, we revealed the critical issue of temporal item feature shifts in the cold-start recommendation. To overcome this issue, we proposed a novel temporal DRO learning framework called TDRO, which 1) considers the worst-case performance for the performance lower bound guarantee, and 2) leverages the shifting trend of item features to enhance the performance of popular groups in subsequent cold items. Empirical results on three real-world datasets validated the effectiveness of TDRO in achieving robust prediction under temporal item feature shifts. This work highlights the temporal item feature shifts in cold-start recommendation and extends DRO to alleviate the shifts, leaving many promising directions to be explored in the future. One is to consider adaptive environment importance for more fine-grained modeling of the shifting trend. Moreover, it is worthwhile to explore more effective group division strategies beyond the pre-defined ones, to fulfill the potential of TDRO in enhancing the model\u2019s generalization ability enhancement. Another promising direction is to leverage large language models to capture nuanced item semantics for improving cold-start recommendation (Bao et al. 2023a,b; Wang et al. 2023a).", "introduction": "Recommender systems are widely deployed to filter the overloaded multimedia information on the web for meeting users\u2019 personalized information needs (He et al. 2017). Technically speaking, Collaborative Filtering (CF) is the most representative method (Koren, Bell, and Volinsky *Corresponding author. This work is supported by the National Key Research and Development Program of China (2022YFB3104701), the National Natural Science Foundation of China (62272437), and Huawei International Pte Ltd. Copyright \u00a9 2024, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. 2009). In essence, CF methods learn the CF representations of users and items from historical interactions and utilize the learned CF representations to predict the users\u2019 future interactions. As content production capabilities continue to advance, recommender systems face the challenge of ac- commodating an increasing influx of new items (a.k.a. cold- start items1). For example, 500 hours of video are uploaded to YouTube every minute2. Since the new items lack his- torical interactions and thereby have no CF representations, traditional CF methods fail to effectively recommend these cold items to users, disrupting the ecological balance of recommender systems on the item side. In light of this, it is essential to improve the cold-start item recommendation. Prior literature has integrated item features, such as cate- gories and thumbnails of micro-videos, for cold-start item recommendation (Shalaby et al. 2022; Zhao et al. 2022). These methods essentially learn a feature extractor that encodes warm items (i.e., items in the training set) into feature representations and utilizes feature representations to fit the user-item interactions during training. For inference for cold items, given the lack of CF counterparts, only feature representations from the feature extractor are used to estimate user preference. The key of this paradigm lies in de- vising training strategies to align feature representations and user-item interactions, which mainly fall into two research lines. 1) Robust training-based methods (Volkovs, Yu, and Poutanen 2017; Du et al. 2020) use both feature represen- tations and CF representations to predict interactions while CF representations are randomly corrupted to strengthen the alignment. 2) Auxiliary loss-based methods (Zhu et al. 2020) pay attention to minimizing the distance between the feature representations and CF representations learned from interactions via the auxiliary loss, e.g., contrastive loss (Wei et al. 2021) and GAN loss (Chen et al. 2022). Despite their success, existing methods suffer from a critical issue: item features temporally shift from warm to cold items (Wang et al. 2023b). As illustrated in Fig- ure 1(a), the category features of newly-uploaded items are 1For simplicity, cold-start items and warm-start items are re- ferred to as cold and warm items, respectively. 2https://www.statista.com/. arXiv:2312.09901v3 [cs.IR] 2 Feb 2024 shift shift (b) \u2026 \u2026 \u2026 $* $+ $, Cold Items Distribution $* $+ $, Uncertainty Set of DRO (d) Inconsistency (c) $* $+ $, $ # Uploaded Items Warm Cold $\u2217 Pandemic Category \u2026 # Uploaded Items (a) Time Period 1 Time Period 2 Figure 1: (a) An example of item category feature shifts towards sanitary products. (b) T-SNE visualization of visual features of item thumbnails in three time periods on a Micro-video dataset. The stars represent the average item features in each time period. (c) An example of the shifting trend of three item groups over time. (d) Illustration of the inconsistency issue of DRO. shifting over time due to various environmental factors, such as a pandemic outbreak. Empirical evidence from a real-world Micro-video dataset further substantiates this phenomenon. In Figure 1(b), we divide the micro-videos into three time periods according to the upload time and visualize the micro-video features, where a star represents the average item features in each time period. The moving stars across time periods validate that item features are gradually shifting over time. Since the feature extractor is typically trained on warm items using Empirical Risk Minimization (ERM) (Vapnik 1991), it easily overfits the majority group of warm items. Unfortunately, the majority group of cold items could deviate from that of warm items as depicted in Figure 1(a) and (b). Such temporal feature shifts hinder the feature extractor\u2019s ability to accurately extract feature representations for cold items, thus degrading the performance of cold-start item recommendation. To tackle this issue, we consider learning a feature extractor with robust generalization ability to enhance the interaction prediction on temporally shifted cold items. To strengthen the generalization ability, Distributionally Robust Optimization (DRO) is a promising approach3. In general, DRO aims to enhance the worst-case performance over the pre-defined uncertainty set, i.e., potential shifted distributions (Duchi and Namkoong 2018). However, di- rectly applying DRO in cold-start recommendation suffers from the inconsistency issue. DRO will overemphasize the minority groups4 in warm items at the expense of other 3Other potential solutions are discussed in Section 5. 4Minority group usually yields worse performance in recom- mendation (Wen et al. 2022). In DRO, the training distribution is assumed to be a mixture of subgroups, and the uncertainty set is defined on mixtures of these subgroups (cf. Section 3). groups\u2019 performance (Oren et al. 2019). Due to the fact that minority groups in warm items may not guarantee their popularity in subsequent cold items, the overemphasis on the minority group of warm items might compromise the performance of the popular groups in cold items. For example, in Figure 1(c), c1, c2, and c3 denote three item groups, where c3 is the minority group in the warm items that traditional DRO pays special attention to. However, c2 is gradually becoming popular, dominating the cold items. The inconsistency between the excessive emphasis on c3 and the shifting trend towards c2 prevents DRO from alleviating the impact of temporal feature shifts (see Figure 1(d)). To address this inconsistency issue and strengthen the gener- alization ability of the feature extractor under the temporal feature shifts, we put forth two objectives for DRO training: 1) enhancing the worst-case optimization on the minority group of warm items, thereby raising the lower bound of performance; and 2) capturing the shifting trend of item features and emphasizing the optimization of the groups likely to become popular. To this end, we propose a Temporal DRO (TDRO), which considers the temporal shifting trend of item features for cold-start recommendation. In particular, we consider two factors for the training of TDRO: 1) a worst-case factor to guarantee worst-case performance, where we divide the warm items into groups by the similarity of item features, and prioritize the improvements of the item groups with large training loss; and 2) a shifting factor to capture the shifting trend of item features, which utilizes a gradient- based strategy to emphasize the optimization towards the gradually popular item groups across time periods. We instantiate the TDRO on two State-Of-The-Art (SOTA) cold-start recommender methods and conduct extensive experiments on three real-world datasets. The empirical results under multiple settings (e.g., cold-start and warm- start recommendation, and recommendation with differing degrees of temporal feature shifts) validate the superiority of TDRO in enhancing the generalization ability of cold- start models. We release our codes and datasets at https: //github.com/Linxyhaha/TDRO/. The contributions of this work are summarized as follows. \u2022 We emphasize the vulnerability of ERM and under- score the necessity of adjusting the learning objective to strengthen the generalization ability of cold-start models under temporal feature shifts. \u2022 We propose a novel TDRO objective for cold-start rec- ommendation, which extends the conventional DRO to avoid overemphasizing the minority groups and capture the temporal shifting trend of item features. \u2022 We conduct extensive experiments on three datasets, demonstrating the effectiveness of temporal DRO in at- taining robust prediction under temporal feature shifts." }, { "url": "http://arxiv.org/abs/2310.06491v1", "title": "A Multi-facet Paradigm to Bridge Large Language Model and Recommendation", "abstract": "Large Language Models (LLMs) have garnered considerable attention in\nrecommender systems. To achieve LLM-based recommendation, item indexing and\ngeneration grounding are two essential steps, bridging between recommendation\nitems and natural language. Item indexing assigns a unique identifier to\nrepresent each item in natural language, and generation grounding grounds the\ngenerated token sequences to in-corpus items. However, previous works suffer\nfrom inherent limitations in the two steps. For item indexing, existing\nID-based identifiers (e.g., numeric IDs) and description-based identifiers\n(e.g., titles) often compromise semantic richness or uniqueness. Moreover,\ngeneration grounding might inadvertently produce out-of-corpus identifiers.\nWorse still, autoregressive generation heavily relies on the initial token's\nquality. To combat these issues, we propose a novel multi-facet paradigm,\nnamely TransRec, to bridge the LLMs to recommendation. Specifically, TransRec\nemploys multi-facet identifiers that incorporate ID, title, and attribute,\nachieving both distinctiveness and semantics. Additionally, we introduce a\nspecialized data structure for TransRec to guarantee the in-corpus identifier\ngeneration and adopt substring indexing to encourage LLMs to generate from any\nposition. We implement TransRec on two backbone LLMs, i.e., BART-large and\nLLaMA-7B. Empirical results on three real-world datasets under diverse settings\n(e.g., full training and few-shot training with warm- and cold-start testings)\nattest to the superiority of TransRec.", "authors": "Xinyu Lin, Wenjie Wang, Yongqi Li, Fuli Feng, See-Kiong Ng, Tat-Seng Chua", "published": "2023-10-10", "updated": "2023-10-10", "primary_cat": "cs.IR", "cats": [ "cs.IR" ], "main_content": "User\u2019s Historical Interactions in Language Item Indexing Generation Grounding Uno Card Game Versace Perfume Switch tion NARS Eyeshadow ounding. LEGO Swit L'Oreal Foundation NARS Eyeshadow Figure 1: Illustration of the two pivotal steps for LLM-based recommenders: item indexing and generation grounding. This section first formulates the recommendation task and then introduces the process of establishing LLM-based recommenders, including instruction tuning and item generation. Lastly, we highlight the two key steps and reveal the vulnerabilities of existing works. \u2022 Task formulation. Let U and I denote the set of users and items, respectively. We present one user\u2019s historical interactions as S\ud835\udc62= [\ud835\udc561 \ud835\udc62,\ud835\udc562 \ud835\udc62, . . . ,\ud835\udc56\ud835\udc3f \ud835\udc62] in a chronological order, where \ud835\udc62\u2208U, \ud835\udc56\ud835\udc62\u2208I, and \ud835\udc3f= |S\ud835\udc62|. The recommendation task is to predict the next item, i.e., \ud835\udc56\ud835\udc3f+1 \ud835\udc62 \u2208I, that the user may be interested in, given a user\u2019s historical interactions1. To leverage LLMs for the recommendation task, the key lies in narrowing the gap between pre-training and recommendation tasks [2]. To bridge the gap, existing works resort to instruction tuning, where LLMs are fine-tuned on instruction data converted from recommendation data. After instruction tuning, the following step for LLMs is to generate recommended items given a user\u2019s historical interactions. In the following, we introduce the preliminary knowledge of LLMs\u2019 instruction tuning and item generation, respectively. 2.1 Instruction Tuning Instruction tuning involves three phases: item indexing, data reconstruction, and LLM optimization. \u2022 Item indexing. For each item\ud835\udc56\u2208I in recommendation data, item indexing assigns an identifier \u02dc \ud835\udc56\u2208\u02dc I in natural language, where \u02dc I is the identifier corpus. To achieve item indexing, exiting works can be categorized into ID-based identifiers (e.g., numeric IDs [12, 19]), and description-based identifiers (e.g., titles [1] and attributes [6]). \u2022 Data reconstruction. Based on the item identifiers, each user\u2019s interaction sequence S\ud835\udc62= [\ud835\udc561 \ud835\udc62,\ud835\udc562 \ud835\udc62, . . . ,\ud835\udc56\ud835\udc3f \ud835\udc62] could be converted to a sequence of identifiers \u02dc S\ud835\udc62= [\u02dc \ud835\udc561 \ud835\udc62, \u02dc \ud835\udc562 \ud835\udc62, . . . , \u02dc \ud835\udc56\ud835\udc3f \ud835\udc62]. Thereafter, instruction 1We mainly focus on sequential recommendation as it is more similar to the real-world scenarios and show important practical significance [34]. A Multi-facet Paradigm to Bridge Large Language Model and Recommendation Conference\u201917, July 2017, Washington, DC, USA Recommendation Data : Instruction Data Instruction Input: (Task description) Given the following purchase history of a user, what is the next possible item to be purchased by the user? (User\u2019s historical interactions) 135, 168, 2110, 8465, 15220. Instruction Output: 3560. (a) LLMs Instruction Input Instruction Output !! (b) Optimization Figure 3: Illustration of instruction tuning of LLMs. (a) depicts the conversion from recommendation data to instruction data. (b) presents the optimization of LLMs based on the instruction data. data D\ud835\udc56\ud835\udc5b\ud835\udc60\ud835\udc61\ud835\udc5f\ud835\udc62\ud835\udc50\ud835\udc61= {(\ud835\udc65,\ud835\udc66)} are constructed for instruction tuning, where \ud835\udc65is the instruction input and \ud835\udc66is the instruction output. Specifically, as shown in Figure 3(a), the instruction input contains task description illustrating the recommendation task; and user\u2019s historical interactions [\u02dc \ud835\udc561 \ud835\udc62, \u02dc \ud835\udc562 \ud835\udc62, . . . , \u02dc \ud835\udc56\ud835\udc3f\u22121 \ud835\udc62 ] in natural language. The instruction output is the next-interacted item, i.e., \ud835\udc66= \u02dc \ud835\udc56\ud835\udc3f \ud835\udc62. \u2022 LLM optimization. Given the instruction data D\ud835\udc56\ud835\udc5b\ud835\udc60\ud835\udc61\ud835\udc5f\ud835\udc62\ud835\udc50\ud835\udc61, the learnable parameters of LLM \ud835\udf03\u2208\u0398 are optimized by minimizing the negative log-likelihood of instruction output \ud835\udc66conditioned on input \ud835\udc65: min \ud835\udf03\u2208\u0398{L\ud835\udf03= \u2212 |\ud835\udc66| \u2211\ufe01 \ud835\udc61=1 log \ud835\udc43\ud835\udf03(\ud835\udc66\ud835\udc61|\ud835\udc66<\ud835\udc61,\ud835\udc65)}. (1) 2.2 Item Generation Once the LLMs are fine-tuned on reconstructed data, they can generate recommendations by generating token sequences and grounding them to the in-corpus identifiers, i.e., the generation grounding step. \u2022 Generation. Given an instruction input\ud835\udc65, which contains the task description and the user\u2019s historical interactions [\u02dc \ud835\udc561 \ud835\udc62, \u02dc \ud835\udc562 \ud835\udc62, . . . , \u02dc \ud835\udc56\ud835\udc3f \ud835\udc62], LLMbased recommender autoregressively generates a token sequence \u02c6 \ud835\udc66 step by step. Formally, at each time step \ud835\udc61, \u02c6 \ud835\udc66\ud835\udc61= arg max \ud835\udc63\u2208V \ud835\udc43\ud835\udf03(\ud835\udc63| \u02c6 \ud835\udc66<\ud835\udc61,\ud835\udc65), (2) where V is the token vocabulary of the LLM. The LLM-based recommender keeps generating until it meets stopping criteria (e.g., \u02c6 \ud835\udc66\ud835\udc61is the stop token \u201cEOS\u201d). \u2022 Grounding. Since LLMs might generate out-of-corpus identifiers, the generated token sequence \u02c6 \ud835\udc66in the language space is then grounded to a set of existing identifiers for recommendations: {\u02dc \ud835\udc56|\u02dc \ud835\udc56\u2208\u02dc I} \u2190Ground( \u02c6 \ud835\udc66), where Ground(\u00b7) is the grounding approach, such as exact matching [12], and distance-based matching [1]. To sum up, two crucial steps for building LLM-based recommenders are item indexing and generation grounding, transiting between item space and the language space. However, existing works suffer from intrinsic limitations in the two steps. For item indexing, existing ID-based identifiers and description-based identifiers either loses semantics or lacks adequate distinctiveness, leading to underutilization of rich knowledge in LLMs or losing salient features that are crucial to recommendation. For generation grounding, unconstrained generation might generate out-of-corpus identifiers; and over-reliance on the quality of initial tokens can degrade the recommendation (cf. Section 1). 3 METHOD To overcome the issues and strengthen LLM-based recommenders from the two crucial steps, we propose a novel transition paradigm TransRec, which involves multi-facet item indexing and generation grounding. 3.1 Multi-facet Item Indexing To mitigate the intrinsic limitations of existing methods and achieve effective adaptation, we postulate two criteria for item identifiers: 1) distinctiveness to ensure the items are distinguishable from each other; and 2) semantics to make full utilization of rich knowledge in LLMs, enhancing the generalization abilities. 3.1.1 Multi-facet Identifier. Well meeting the above two criteria, we propose multi-facet identifiers for the item indexing step. We simultaneously incorporate three facets to represent an item from different aspects: \u2022 Numeric ID guarantees the distinctiveness among items. We follow [12] to assign each item a unique numeric ID (e.g., \u201c3471\u201d). By fine-tuning over user-item interactions described by unique IDs, LLMs are incentivized to align the numeric IDs with the user-item interactions. In essence, items with similar sequential dependencies are endowed with similar representations. We denote numeric ID as \ud835\udc5d. \u2022 Item title ensures rich semantics that can capitalize the wealth of world knowledge in LLMs. An item title, e.g., \u201cRouge Coco Hydrating Creme Lipstick, Chanel Color 432\u201d, typically contains a concise and descriptive name and some key features (e.g., brand and color). However, directly utilizing the entire title can be harmful due to the user might only be interested in partial properties of the item (e.g., the \u201cChanel\u201d brand). As such, we additionally consider substrings of the title to represent an item in the title facet, e.g., \u201cChanel\u201d and \u201cLipstick\u201d. We refer to the complete item title as\ud835\udc47, and denote the substring as \ud835\udc61. Both the complete title \ud835\udc47and substring \ud835\udc61 are incorporated in instruction data (cf. Section 3.1.2). \u2022 Item attribute serves as a complementary facet to inject semantics, particularly in cases where item titles may be less informative or unavailable. For an item that has multiple attributes such as \u201cMakeup, Eyes, Multicolor, Gluten Free\u201d, we denote each attribute as \ud835\udc4eand the complete attributes as \ud835\udc34= [\ud835\udc4e1,\ud835\udc4e2, . . . ,\ud835\udc4e\ud835\udc5b]. Similar to the item title, we involve both the complete attributes \ud835\udc34 and the fine-grained attribute \ud835\udc4ein instruction data (cf. Section 3.1.2). In summary, for each item \ud835\udc56in recommendation data, we can obtain the multi-facet identifier \u02dc \ud835\udc56= {\ud835\udc5d,\ud835\udc47,\ud835\udc34}. Based on the multifacet identifiers, we then construct the instruction data in language space for LLMs to fine-tune. 3.1.2 Data Reconstruction. As shown in Figure 4, we convert each user\u2019s interaction sequence S\ud835\udc62= [\ud835\udc561 \ud835\udc62,\ud835\udc562 \ud835\udc62, . . . ,\ud835\udc56\ud835\udc3f \ud835\udc62] into instruction data in three facets to fine-tune LLMs, separately. For each facet, we construct instruction input and output based Conference\u201917, July 2017, Washington, DC, USA Xinyu Lin1, Wenjie Wang1, Yongqi Li2, Fuli Feng3, See-Kiong Ng1, and Tat-Seng Chua1 Given the following purchase history of a user, what is the next possible item to be purchased by the user? 15826; 8792; 513; 7382; 9014; || ID || + Given the following purchase history of a user, what is the next possible item to be purchased by the user? Wilson NBA Basketballs; Advancourt Sneakers; \u2026; Logitech K270 Wireless Keyboard; || title || + Given the following attributes of purchase history of a user, what is the next possible attribute of item to be purchased by the user? Sports; Shoe; Headphone & Earphones; \u2026; Electronics; || attribute || + ID Instruction Input 23 Instruction Output Title Attribute Electronics M360 Wireless Mouse\u201d Wireless Mouse Figure 4: Illustration of reconstructed data based on the multifacet identifiers. The bold texts in black refer to the user\u2019s historical interactions. on the user\u2019s interaction sequence. Since task descriptions are usually from manually designed templates, we mainly focus on the reconstruction of the user\u2019s historical interactions and the instruction output in the following. To form the user\u2019s historical interactions for ID facet, we convert the first \ud835\udc3f\u22121 items to their numeric IDs, and then separate each item with a semicolon, i.e., a sequence of ID-facet identifiers \u201c\ud835\udc5d1; \ud835\udc5d2; . . . ; \ud835\udc5d\ud835\udc3f\u22121\u201d. Likewise, we can obtain the user\u2019s historical interactions in the title and attribute facets, referred to as \u201c\ud835\udc471; \ud835\udc472; . . . ; \ud835\udc47\ud835\udc3f\u22121\u201d, and \u201c\ud835\udc341; \ud835\udc342; . . . ; \ud835\udc34\ud835\udc3f\u22121\u201d, respectively. As for the instruction output, for the ID facet, we use the numeric ID of the last item in the user\u2019s interaction sequence, i.e., \ud835\udc5d\ud835\udc3f. For the title facet, instead of using the complete title, we use the substring \ud835\udc61 sampled from the complete title \ud835\udc47. This is to encourage LLMs to generate from any positions that are possibly relevant to the user\u2019s interests. Here, for each user\u2019s interaction sequence, we sample \ud835\udc3esubstrings of the last item\u2019s title and construct \ud835\udc3einstruction input-output pairs. Lastly, for the attribute facet, each attribute \ud835\udc4e\u2208\ud835\udc34\ud835\udc3fis independently used as one instruction output, resulting in |\ud835\udc34\ud835\udc3f| instruction input-output pairs. We denote the reconstructed data from ID, title, and attribute facets as D\ud835\udc3c\ud835\udc37, D\ud835\udc61\ud835\udc56\ud835\udc61\ud835\udc59\ud835\udc52, and D\ud835\udc4e\ud835\udc61\ud835\udc61\ud835\udc5f, respectively. Moreover, to explicitly denote the different facet data, we add a facet prefix after the instruction input as shown in Figure 4. Based on the reconstructed instruction data D\ud835\udc56\ud835\udc5b\ud835\udc60\ud835\udc61\ud835\udc5f\ud835\udc62\ud835\udc50\ud835\udc61 = {D\ud835\udc3c\ud835\udc37, D\ud835\udc61\ud835\udc56\ud835\udc61\ud835\udc59\ud835\udc52, D\ud835\udc4e\ud835\udc61\ud835\udc61\ud835\udc5f}, the LLM is optimized via Eq. (1). Note that we only employ a single LLM in TransRec to fine-tune on the reconstructed data. 3.2 Multi-facet Generation Grounding After instruction tuning, the next step of TransRec is generation grounding, which aims to deliver in-corpus recommendations given the user\u2019s historical interactions. 3.2.1 Constrained and Position-free Generation. Out-ofcorpus identifiers and over-reliance on the quality of initially generated tokens are two critical problems in the generation process. To tackle the issues, we require LLMs to conduct 1) constrained in-corpus generation, and 2) position-free generation. Remarkably, the FM-index [10] simultaneously supports these two requirements, offering an effective solution to the problems. \u2022 FM-index. FM-index is a special prefix tree [24] that supports search from any position. This capability enables FM-index to 1) 95, 7002, 3865, 3789, 6055, \u2026 Constrained & Position-free Generation mouse pad, monitor, cables, wireless \u2026 electronics, IT, accessories, \u2026 LLMs FM-index Generated Identifiers Aggregated Grounding ID: 95 Title: LG monitor Type C cables \u2026 Attribute: Tech accessories \u2026 ID: 4 Title: Non-slip mouse pad \u2026 Attribute: \u2026 In-corpus Item Ranking 0.7 0.5 0.4 \u2026 Item User\u2019s historical interactions in three facets ID: 6055 Title: \u2026 Attribute: \u2026 ... { } { } { }Identifier sets in three facets Figure 5: Generation grounding step of TransRec. Red, blue, and green denote the facet of ID, title, and attribute, respectively. find all valid successor tokens of a given token; and 2) allow the generation to start from any token belonging to the identifiers2. Specifically, taking the item in Figure 1(a) as an example, we store the multi-facet identifier as \u201c 1023 Urban Decay Eyeshadow Palette Naked Heat Makeup Eyes \u201d, where \u201c, , , \u201d are the special tokens that indicate the start and the end of ID and each fine-grained attribute, respectively. Given a start token or a token sequence, the FM-index can find a list of all possible successor tokens in \ud835\udc42(\ud835\udc49log(\ud835\udc49)), where \ud835\udc49is the vocabulary size of the LLMs. \u2022 Identifier generation. Given the user\u2019s historical interactions in the format of instruction input as in Figure 4, TransRec generates the valid identifiers in each facet via constrained beam search [8] based on the FM-index. By constraining the starting token of generation, e.g., \u201c\u201d, and the ending token of generation, e.g., \u201c\u201d, TransRec generates a set of valid ID identifiers and attribute identifiers that belongs to the items. Besides, TransRec generates valid substrings of title identifiers from any position, i.e., we do not set special start and end tokens for the title in FM-index. The position-free generation ability is also enhanced by the instruction tuning process, where substrings are set as the instruction output (cf. Section 3.1.1). We denote the generated identifiers for ID, title, and attribute facets as P\ud835\udc54, T \ud835\udc54, and A\ud835\udc54, respectively. 3.2.2 Aggregated Grounding. To ground the generated identifiers to the in-corpus items, we introduce an aggregated grounding module, which contains intra-facet and inter-facet aggregations. \u2022 Intra-facet aggregation. We first aggregates the generated identifiers to the in-corpus items, within each facet. Specifically, given the generated identifiers of one facet (e.g., T \ud835\udc54), we aggregate them to the in-corpus item based on their coverage on each item\u2019s identifier (e.g., T \ud835\udc54\u2229\ud835\udc47). However, directly summing up the identifier scores3 in the coverage set is infeasible due to the monotonic probability decrease in autoregressive generation [4]. For example, \u201c51770\u201d will have a smaller probability than \u201c517\u201d, thus hurting the accurate grounding. To address this issue, we follow [4] to balance 2Other potential prefix trees for constrained generation only allow starting from the first token of identifiers [4]. 3Here, the identifier score is the probability of generated identifier given by LLMs. A Multi-facet Paradigm to Bridge Large Language Model and Recommendation Conference\u201917, July 2017, Washington, DC, USA the scores by integrating token frequency: \ud835\udc60( \u02c6 \ud835\udc66) = max{0, log \ud835\udc43( \u02c6 \ud835\udc66|\ud835\udc65)(1 \u2212\ud835\udc43( \u02c6 \ud835\udc66) \ud835\udc43( \u02c6 \ud835\udc66)(1 \u2212\ud835\udc43( \u02c6 \ud835\udc66|\ud835\udc65)) }, (3) where \u02c6 \ud835\udc66is the generated identifier, \ud835\udc43( \u02c6 \ud835\udc66|\ud835\udc65) is the token score given by the LLMs, and \ud835\udc43( \u02c6 \ud835\udc66) is the unconditional probability that measures the frequency of tokens. For intuitive understanding, Eq. (3) can mitigate the issue by upweighting the tokens that are more distinctive, i.e., less frequent. We obtain the unconditional probability \ud835\udc43( \u02c6 \ud835\udc66) by \ud835\udc43( \u02c6 \ud835\udc66) = \ud835\udc39( \u02c6 \ud835\udc66, C) \u00cd \ud835\udc51\u2208C |\ud835\udc51|, (4) where \ud835\udc39( \u02c6 \ud835\udc66, C) represents the number of token \u02c6 \ud835\udc66in identifier corpus C. Then, the grounding score for item \ud835\udc56corresponding to user \ud835\udc62in facet \ud835\udc53is \ud835\udc60\ud835\udc53(\ud835\udc62,\ud835\udc56) = \u2211\ufe01 \u02c6 \ud835\udc66\u2208\u02dc \ud835\udc56 (\ud835\udc60( \u02c6 \ud835\udc66))\ud835\udefe, (5) where \u02dc \ud835\udc56is the multi-facet identifiers of the item, and \ud835\udefeis a hyperparameter to control the strength of intra-facet grounding scores. \u2022 Inter-facet aggregation. To aggregate the grounding scores from three facets, we should consider the disparate influence of each facet in different scenarios. For instance, when seeking books, the titles may become crucial, while for restaurants, the category (e.g., Mexican cuisine) possibly takes precedence. As such, TransRec balances the strength of each facet for the final ranking. Formally, the final grounding score for user \ud835\udc62and item \ud835\udc56is obtained by: \ud835\udc60(\ud835\udc62,\ud835\udc56) = \u2211\ufe01 \ud835\udc53 \ud835\udc60\ud835\udc53(\ud835\udc62,\ud835\udc56) + \ud835\udc4f\ud835\udc53, (6) where \ud835\udc53\u2208{\ud835\udc3c\ud835\udc37,\ud835\udc61\ud835\udc56\ud835\udc61\ud835\udc59\ud835\udc52,\ud835\udc4e\ud835\udc61\ud835\udc61\ud835\udc5f\ud835\udc56\ud835\udc4f\ud835\udc62\ud835\udc61\ud835\udc52}, and\ud835\udc4f\ud835\udc53is the bias hyper-parameter that balances the strength between facets. According to the grounding scores, we can obtain a rank list of in-corpus items as in Figure 5. \u2022 Instantiation. TransRec is a model-agnostic method that can be applied to any backbone LLMs. To investigate the feasibility of TransRec on LLMs with different sizes and architectures, we instantiate TransRec on two LLMs, i.e., BART-large [23] and LLaMA-7B [30]. BART-large is an encoder-decoder model with 406M parameters, and LLaMA-7B is a decoder-only model with 7B parameters. 4 EXPERIMENTS In this section, we conduct experiments on three real-world datasets to answer the following research questions: \u2022 RQ1: How does our proposed TransRec perform compared to both traditional and LLM-based recommenders? \u2022 RQ2: How does TransRec perform under few-shot setting, on both warmand cold-start recommendation? \u2022 RQ3: How does each component of TransRec (e.g., each facet of identifier, and constrained generation) affect its effectiveness? 4.1 Experimental Settings 4.1.1 Datasets. We conduct experiments on three popular benchmark datasets: 1) Beauty is the collection of beauty products from Amazon review datasets4. It comprises a diverse range of 4https://jmcauley.ucsd.edu/data/amazon/. Table 1: Statistics of three datasets. Dataset # User # Item # Interaction Density (%) Beauty 22,363 12,101 198,502 0.0734 Toys 19,412 11,924 167,597 0.0724 Yelp 30,431 20,033 316,354 0.0519 beauty-related items accompanied by rich textual features, e.g., item titles, and descriptions. 2) Toys is also one representative recommendation dataset drawn from Amazon review datasets, where each toy product has rich meta information. 3) Yelp5 is a popular restaurant dataset with rich user-item interactions on extensive dining places. For the three datasets, we follow [12] to assign unique numeric IDs to items. We then use the assigned IDs, product titles, and product categories for the ID, title, and attribute facets for TransRec, respectively. Following [12], we adopt the leaveone-out strategy6 to split the datasets into training, validation, and testing sets. In addition, we consider two training settings: 1) full training uses all users\u2019 interactions in the training set to train the models; and 2) few-shot training randomly selects \ud835\udc41users\u2019 interactions to train the models, where \ud835\udc41= 1024 or 2048. The statistics of the three datasets are summarized in Table 1. 4.1.2 Baselines. We compare TransRec with traditional recommenders (MF, LightGCN, SASRec, and ACVAE) and the LLM-based recommenders (SID, SemID+IID, CID+IID, and P5). \u2022 MF [29] is one of the most representative collaborative filtering models, which decompose the interactions into user and item matrices. \u2022 LightGCN [14] utilizes graph convolutional networks, which linearly propagate the user and item representations from the neighborhood. \u2022 SASARec [20] is a well-recognized sequential recommender model that adopts self-attention mechanism to learn the item dependency from user\u2019s interactions. \u2022 ACVAE [34] incorporates contrastive learning and adversarial training into the VAE-based sequential recommender model, which captures robust user representations. \u2022 SID [19] leverages collaborative information by sequential indexing. The items interacted consecutively by a user are assigned consecutive numerical indices. \u2022 SemID+IID [19] designs the numeric ID based on the meta information of items, where items with similar semantics have similar numeric IDs. \u2022 CID+IID [19] considers the co-occurrence matrix of items to design the numeric ID, where items that co-occur in user-item interactions will have similar numeric IDs. \u2022 P5 [12] is a unified framework, which integrates multiple tasks, e.g., sequential recommendation, review summarization, and explanation generation, into the training of LLM. \u2022 Evaluation. We adopt the widely used metrics Recall@\ud835\udc3eand NDCG@\ud835\udc3eto evaluate the models, where \ud835\udc3eis set as 5 or 10. For traditional recommenders and TransRec, we employ full-ranking 5https://www.yelp.com/dataset. 6For each user\u2019s interactions, the last item is used as testing item, the item before the last as validation item, and the rest as training items. Conference\u201917, July 2017, Washington, DC, USA Xinyu Lin1, Wenjie Wang1, Yongqi Li2, Fuli Feng3, See-Kiong Ng1, and Tat-Seng Chua1 Table 2: Overall performance comparison between the baselines and TransRec instantiated on BART on three datasets. The best results are highlighted in bold and the second-best results are underlined. * implies the improvements over the second-best results are statistically significant (\ud835\udc5d-value < 0.01) under one-sample t-tests. Beauty Toys Yelp Model R@5 R@10 N@5 N@10 R@5 R@10 N@5 N@10 R@5 R@10 N@5 N@10 MF 0.0294 0.0474 0.0145 0.0191 0.0236 0.0355 0.0153 0.0192 0.0220 0.0381 0.0138 0.0190 LightGCN 0.0305 0.0511 0.0194 0.0260 0.0322 0.0508 0.0215 0.0275 0.0255 0.0427 0.0163 0.0218 SASRec 0.0380 0.0588 0.0246 0.0313 0.0470 0.0659 0.0312 0.0373 0.0183 0.0296 0.0116 0.0152 ACVAE 0.0503 0.0710 0.0356 0.0422 0.0488 0.0679 0.0350 0.0411 0.0211 0.0356 0.0127 0.0174 SID 0.0430 0.0602 0.0288 0.0368 0.0164 0.0218 0.0120 0.0139 0.0346 0.0486 0.0242 0.0287 SemID+IID 0.0501 0.0724 0.0344 0.0411 0.0145 0.0260 0.0069 0.0123 0.0229 0.0382 0.0150 0.0199 CID+IID 0.0512 0.0732 0.0356 0.0427 0.0169 0.0276 0.0104 0.0154 0.0287 0.0468 0.0195 0.0254 P5 0.0508 0.0664 0.0379 0.0429 0.0608 0.0688 0.0507 0.0534 0.0506 0.0648 0.0343 0.0389 TransRec-B 0.0550* 0.0766* 0.0395* 0.0464* 0.0679* 0.0881* 0.0512* 0.0567* 0.0549* 0.0679* 0.0408* 0.0450* protocol [14] and evaluate on the top-\ud835\udc3eitems. As for other LLMbased baselines that do not support full-ranking7, we evaluate the top-\ud835\udc3eitems from the generated items. 4.1.3 Implementation Details. We employ BART and LLaMA8 as backbone LLMs for TransRec separately, and we denote the two variants as \u201cTransRec-B\u201d and \u201cTransRec-L\u201d, respectively. For TransRec-B, we follow [12, 19] to sample subsequences of user\u2019s interactions for training, which is widely used in sequential recommender models [15]. For LLaMA, we do not sample subsequences and only use the entire user sequence for training. Besides, for each user\u2019s interaction sequence, we iteratively discard the first item in the sequence until the length of instruction input does not exceed the maximum input length of LLMs (1024 for BART and 512 for LLaMA). TransRec is trained with Adam [21] (TransRec-B) and AdamW [27](TransRec-L) on four NVIDIA RTX A5000 GPUs. We fully tune the model parameters of TransRec-B and perform the parameter-efficient fine-tuning technique LoRA [18] to tune TransRec-L. For a fair comparison, we set the beam size to 20 for TransRec and all LLM-based baselines. 4.2 Overall Performance (RQ1) The results of the baselines and TransRec with BART as the backbone model are presented in Table 2, from which we have the following observations: \u2022 Among traditional recommenders, sequential methods (SASRec, ACVAE) surpass non-sequential methods (MF and LightGCN) on both Beauty and Toys. The better performance stems from the sequential modeling of user preference, which captures dynamic shifts in user interests and intricate item dependencies. Moreover, ACVAE consistently outperforms other traditional models. The reason is that the use of adversarial training and contrastive learning encourages high-quality user representation and deepens the understanding of salient item features. \u2022 Within LLM-based recommenders with single-task fine-tuning (SID, SemID+IID, and CID+IID), CID+IID consistently yields better performance than SemID+IID, which is consistent with the findings in [19]. This is reasonable since CID+IID leverages the 7To achieve efficient generation, beam search is usually adopted, which will result in a limited number of recommendations. 8For simplicity, BART-large and LLaMA-7B are shortened as BART and LLaMA. co-occurrence of items to construct hierarchical numeric IDs, i.e., items with similar interactions have similar IDs. As such, the IDs are integrated with collaborative information, which strengthens the key advantage of ID-based identifiers. In contrast, SemID+IID simply constructs IDs based on items\u2019 meta information, i.e., items with similar semantics have similar identifiers. However, this can lead to misalignment between item identifiers and user behavior, thus degrading the performance (cf. Section 1). \u2022 P5 consistently outperforms traditional models across the three datasets and yields the best performance among all baselines in most cases. In contrast, SID, SemID+IID, and CID+IID achieve comparable performance with traditional recommenders on Beauty and Yelp but perform worse on Toys. This divergence indicates that multi-task modeling (e.g., review summary and explanation generation) steadily improves recommendation with the additional data of user reviews, which leads to 1) a better understanding of user preference from their explicit feedback in natural language; and 2) comprehensive learning of item properties that are not explicitly shown in the observed item features but in the user feedback. \u2022 TransRec consistently yields the best performance across the three datasets, validating the superiority of our proposed transition paradigm. The superior performance is attributed to 1) the utilization of multi-facet identifiers, which simultaneously satisfies rich semantics and distinctiveness, potentially leveraging the wealth of knowledge in LLMs and the learning of some salient features; and 2) constrained and position-free generation grounding that guarantees in-corpus item generation and mitigates the over-reliance on initial tokens. 4.3 In-depth Analysis We conduct further experiments to investigate the performance of TransRec under limited instruction data and cold-start recommendation. In addition, we assess the effect of each component of TransRec. Sensitivity analysis of hyperparameters is also conducted to facilitate future applications of TransRec. 4.3.1 Few-shot Training (RQ2). To study how TransRec performs under limited data, we conduct few-shot training with randomly selected 1024 and 2048 samples, separately. To evaluate A Multi-facet Paradigm to Bridge Large Language Model and Recommendation Conference\u201917, July 2017, Washington, DC, USA Table 3: Performance comparison under the few-shot setting. The bold results highlight the superior performance compared to the best LLM-based recommender baseline. \u201cTransRec-B\u201d and \u201cTransRec-L\u201d denote using BART and LLaMA as backbone LLM, respectively. Warm Cold N-shot Model R@5 N@5 R@5 N@5 1024 LightGCN 0.0205 0.0125 0.0005 0.0003 ACVAE 0.0098 0.0057 0.0047 0.0026 P5 0.0040 0.0016 0.0025 0.0015 TransRec-B 0.0039 0.0024 0.0025 0.0016 TransRec-L 0.0141 0.0070 0.0159 0.0097 2048 LightGCN 0.0186 0.0117 0.0005 0.0004 ACVAE 0.0229 0.0136 0.0074 0.0044 P5 0.0047 0.0030 0.0036 0.0012 TransRec-B 0.0034 0.0019 0.0027 0.0014 TransRec-L 0.0186 0.0117 0.0199 0.0121 the models, we involve \ud835\udc41users in few-shot training (i.e., warmstart users) and another randomly selected \ud835\udc41users that have not been seen in few-shot training (i.e., cold-start users) for testing. In addition, we split the testing set into warm and cold sets, where interactions between warm-start users and warm-start items belong to the warm set, otherwise the cold set. We instantiate TransRec on both BART and LLaMA and compare them with competitive baselines from both traditional and LLMbased recommenders. The results9 on both warm and cold sets over Beauty are presented in Table 3. From the table, we can observe that: 1) Traditional methods yield competitive performance on warmstart recommendation. This is because these ID-based methods are effective in capturing collaborative information from useritem interactions, which is also consistent with our statements in Section 3.1.1. 2) Medium-sized LLMs (P5 and TransRec instantiated on BART) fail to generalize to recommendation task under few-shot training. This indicates that a considerable amount of data is necessary to adapt middle-size LLMs to perform well on recommendation task, which is also consistent with previous work [1]. 3) Employing LLaMA as the backbone model, TransRec outperforms all the baselines, particularly surpassing by a large margin on cold-start recommendation. This highlights the remarkable generalization ability of large-sized LLMs, enabling more effective adaptation to the recommendation task with limited data. 4.3.2 Ablation Study (RQ3). To analyze the effect of each facet in multi-facet identifiers, we remove the ID, title, and attribute separately, referred to as \u201cw/o ID\u201d, \u201cw/o title\u201d, and \u201cw/o attribute\u201d, respectively. In addition, we conduct constrained generation by disabling FM-index, denoted as \u201cw/o CG\u201d. The results on three datasets are presented in Figure 6. From the figures, we can find that: 1) Removing either ID, title, or attribute facet will decrease the performance, indicating the effectiveness of each facet in representing an item for LLM-based recommendation. 2) Discarding the ID or title facet usually leads to more performance drops compared to removing the attribute facet. This is reasonable since removing ID fails to meet distinctiveness criteria for identifiers, which hinders 9Results on Yelp and Toys with similar observations are omitted to save space. 0.015 0.024 0.033 0.042 0.02 0.035 0.05 0.065 Beauty Recall@5 NDCG@5 w/o ID TransRec w/o T w/o A w/o CG Figure 6: Ablation study of each facet (i.e., ID, title, and attribute) and constrained generation. 0.02 0.031 0.042 0.053 1 2 3 4 Beauty Recall@5 NDCG@5 (a) \ud835\udf38 0.025 0.036 0.047 0.058 10 12 14 16 Beauty Recall@5 NDCG@5 (b) \ud835\udc83\ud835\udc70\ud835\udc6b Figure 7: Effect of \ud835\udefeand \ud835\udc4f\ud835\udc3c\ud835\udc37in TransRec. LLMs from capturing salient features of items. Besides, titles contain richer semantics than attributes, casting a more significant effect on improving the LLM-based recommendation. 3) Unconstrained generation is suboptimal to give appropriate recommendations (inferior performance of \u201cw/o CG\u201d), indicating the necessity of guaranteed in-corpus generation. 4.3.3 Hyper-parameter Analysis. In TransRec, we introduce some hyper-parameters, including the strength of intra-facet aggregation \ud835\udefeand the bias terms for inter aggregation \ud835\udc4f\ud835\udc3c\ud835\udc37, \ud835\udc4f\ud835\udc61\ud835\udc56\ud835\udc61\ud835\udc59\ud835\udc52, and \ud835\udc4f\ud835\udc4e\ud835\udc61\ud835\udc61\ud835\udc5f. We conduct experiments to study the sensitivity of these hyper-parameters, facilitating future application of TransRec. The effects of \ud835\udefeand \ud835\udc4f\ud835\udc3c\ud835\udc37are presented in Figure 7. From Figure 7(a), we can find that 1) As \ud835\udefevaries from 1 to 3, the performance gradually improves. The possible reason is that the scales of original probabilities of LLMs are limited (\ud835\udefe= 1), probably leading to insufficient discrepancies between identifiers and making the ranking less informative. 2) However, it is crucial not to indiscriminately increase \ud835\udefe, as this may lead to an over-reliance on highly representative identifiers for item ranking, consequently perpetuating a bias towards the recommendation of representative items. Besides, we should carefully choose \ud835\udc4f\ud835\udc3c\ud835\udc37to balance the strength between facets,e.g., \ud835\udc4f\ud835\udc3c\ud835\udc37as shown in Figure 7(b). A small \ud835\udc4f\ud835\udc3c\ud835\udc37weakens the consideration of salient features for recommendation while a large \ud835\udc4f\ud835\udc3c\ud835\udc37can undermine other facets, thus hurting the recommendation. Conference\u201917, July 2017, Washington, DC, USA Xinyu Lin1, Wenjie Wang1, Yongqi Li2, Fuli Feng3, See-Kiong Ng1, and Tat-Seng Chua1 5 RELATED WORK 5.1 LLMs for Recommendation Recently, leveraging LLM for recommendation has received much attention due to LLMs\u2019 rich world knowledge, strong reasoning capabilities, and impressive generalization ability through in-context learning. Existing works on LLMs for recommendation can be mainly divided into two groups. 1) LLM-enhanced recommenders, which consider LLMs as powerful feature extractors for enhancing the feature representation of users and items. Along this line, existing works mainly adopt LLMs to generate augmented features based on user-item interactions, and regard the augmented features as additional input for the external recommender models. For example, [33] augments the user preference features and item factual knowledge by utilizing LLMs for extracting rich relational understanding from the knowledge graph. And [5] generates user profiles as additional prompt input for LLMs. Nevertheless, the external recommender models are still necessary for recommendation in LLM-enhanced recommenders. To obviate the reliance on external recommenders and exploit the potential of LLMs in recommendation tasks, another line of research effort lies in 2) LLM-based recommenders, which directly leverage the LLMs as recommenders. The generated token sequences of LLMs are treated as the recommended items. In the wake of ChatGPT\u2019s release and its remarkable prowess in reasoning, early studies delve into LLMs\u2019 zero-shot/few-shot recommendation capabilities through in-context learning [7, 17, 31]. However, due to the intrinsic gap between the LLMs\u2019 pre-training and recommendation tasks [5], previous explorations show that the recommendation abilities are somehow limited by merely using in-context learning [26]. Therefore, to narrow the gap and elicit the strong capabilities of LLMs, recent studies utilize instruction tuning for LLMs to improve the performance [2, 35]. In this work, we identify two fundamental steps of LLM-based recommenders to bridge the item and language and spaces, highlighting existing problems and the key objectives in the two steps. 5.2 Item Indexing and Generation Grounding To build LLM-based recommenders, item indexing is the first pivotal step. At this step, it aims to assign each item an identifier, converting item from item space to language space. Indexing approaches in previous studies can be categorized into two groups. 1) ID-based identifiers utilize a unique numeric ID as identifier for each item. Extensive studies have shown its effectiveness in capturing unique features of items and learning some salient features from collaborative signals in user-item interactions. Some effort has been given to investigations on different approaches for ID assignment [19], such as random ID, sequential ID, and collaborative ID. 2) Description-based identifiers employ item descriptions to represent an item. For example, [35] uses item title to represent each item and [6] simultaneously considers item name and attributes to transit an item to the language space. Nevertheless, both of these approaches are plagued by either deficiency in semantics or lack of distinctiveness. Therefore, this work proposes multi-facet identifiers to pursue both semantics and distinctiveness. To yield recommendation, generation grounding plays the key role of bridging back from language to item space. In this step, LLMs generate token sequences and ground them to the in-corpus items. However, this step has received little scrutiny in previous studies. They mainly conduct autoregressive generation over the whole vocabulary and ground the generated tokens by exact matching, which may lead to out-of-corpus recommendation. [6] and [1] mitigate the out-of-corpus issue by utilizing the representations obtained by LLMs to match between generated identifiers and in-corpus items, e.g., L2 distance. Nevertheless, these trivial approaches ignore two essential issues in the generation grounding step. 1) Blindly searching over the whole vocabulary will inevitably generate out-ofcorpus identifiers. In addition, 2) autoregressive generation heavily relies on the quality of the first several tokens, which can hurt recommendation as the initial tokens might not necessarily align with the user preference. In this work, we introduce an efficacious generation grounding approach in TransRec, combating the two issues to strengthen LLM-based recommendation. 6 CONCLUSION AND FUTURE WORK In this work, we identified two fundamental steps of LLM-based recommenders: item indexing and generation grounding. To make full utilization of LLMs and strengthen the generalization ability of LLM-based recommenders, we posited that identifiers should pursue both distinctiveness and semantics. In addition, constrained generation and position-free generation should be supported to yield accurate recommendations. To pursue these objectives, we propose a novel transition paradigm, namely TransRec, to seamlessly bridge the language and item space. TransRec utilizes multi-facet identifiers to represent an item from ID, title, and attribute simultaneously. Besides, TransRec supports constrained and position-free generation, which guarantees high-quality generated identifiers. Furthermore, we introduce an aggregated grounding module to ground the generated identifiers to the items. Empirical results on three real-world datasets under diverse settings validate the superiority of TransRec in improving recommendation accuracy and generalization ability. This work highlights the key objectives of indexing approaches and generation grounding strategies, leaving many promising directions for future exploration. Particularly, 1) although incorporating ID, title, and attribute is effective, it is worthwhile to automatically construct multi-facet identifiers to reduce the noises in natural descriptions; 2) it is meaningful to devise better strategies for grounding modules, to effectively combine the ranking scores from different facets, such as the utilization of neural networks. A Multi-facet Paradigm to Bridge Large Language Model and Recommendation Conference\u201917, July 2017, Washington, DC, USA", "introduction": "Large Language Models (LLMs) have achieved remarkable success across diverse domains [3, 16, 25] due to their emergent com- petencies, including possessing rich knowledge [13], instruction following [28], and in-context learning [22]. Recently, there has been a notable surge in exploring the benefits of adapting LLMs to recommendations. In particular, LLMs have showcased the potential in discerning nuanced item semantics [32, 36], understanding multiple user interests [9, 35], and generalizing to cross-domain and cold-start recommendations [2, 5, 11]. In light of these, the prospect of harnessing LLMs as recommender systems, i.e., LLM- based recommenders, emerges as a particularly promising avenue for further exploration. Recently, numerous investigations have identified that the key to building LLM-based recommenders lies in bridging the gap between LLMs\u2019 pre-training and recommendation tasks. To narrow the gap, existing work usually represents recommendation data in natural language for instruction tuning on LLMs. This process, as illustrated in Figure 1, entails a crucial step: item indexing, where each item is represented by a unique identifier (e.g., item title or numeric ID), and subsequently the user\u2019s historical interactions are converted into a sequence of identifiers. By converting user- item interactions into token sequences, LLMs can be fine-tuned to excel at recommendation tasks. To yield recommendations, the critical step is generation grounding. Given a user with historical interactions, LLMs generate a token sequence in the language space and inversely ground the token sequence to the in-corpus items in the item space. As such, item indexing and generation grounding have emerged as two pivotal steps for LLM-based recommenders, bridging the item space and the language space. However, existing work has intrinsic limitations in the two steps. To achieve item indexing, previous studies can be categorized into ID-based identifiers [12, 19] and description-based identifiers [2, 6]. \u2022 ID-based identifiers utilize numeric IDs (e.g., \u201c15308\u201d) to represent items, effectively capturing the uniqueness of items [12, 19]. Nevertheless, numeric IDs lack semantics and fail to leverage the rich knowledge in LLMs. Worse still, LLMs require sufficient interactions to fine-tune each ID identifier, decreasing the gener- alization ability to large-scale and cold-start recommendations. arXiv:2310.06491v1 [cs.IR] 10 Oct 2023 Conference\u201917, July 2017, Washington, DC, USA Xinyu Lin1, Wenjie Wang1, Yongqi Li2, Fuli Feng3, See-Kiong Ng1, and Tat-Seng Chua1 Multi-facet Identifier In-corpus Item Item Indexing 0.7 In-corpus Item Ranking 0.6 \u2026 LLMs ID 1023 Title Urban Decay Eyeshadow Palette Naked Heat ID 125, 399, 1001 Title (substrings) Red Lipstick, Cream, pure, Moisturizing, Coconut Attribute Makeup, Care : Generation Grounding Attribute Makeup\u2026 \u2026 Generated Identifiers Figure 2: Overview of TransRec. Item indexing assigns each item multi-facet identifiers. For generation grounding, TransRec generates a set of identifiers in each facet and then grounds them to in-corpus items for ranking. \u2022 Description-based identifiers adopt semantic descriptions (e.g., titles and attributes) to index items [2, 6]. However, item de- scriptions lack adequate distinctiveness due to the existence of common words (e.g., \u201cWill\u201d and \u201cBe\u201d in movie titles). Moreover, item descriptions might not consistently align with user-item interactions; in other words, two items with similar descriptions may not have similar interactions. This divergence is a possible reason for the wide usage of numeric IDs in existing feature-based recommendations. Drawing upon the above insights, we posit that item identifiers should at least satisfy two criteria: 1) distinctiveness that ensures the items are distinguishable from each other; and 2) semantics that guarantee the full utilization of the rich knowledge in LLMs, enhancing the generalization abilities of LLM-based recommenders. As to generation grounding for given a user, LLMs autoregres- sively generate a sequence of tokens, which are grounded to the identifiers of in-corpus items by exact matching [12] or distance- based matching [1]. However, these methods exhibit two key issues. \u2022 Unconstrained generation over the whole vocabulary of LLMs may yield invalid item identifiers, leading to out-of-corpus recom- mendations. Thus, extra matching (e.g., L2 distance matching [1]) is necessary to ground the out-of-corpus identifiers to existing identifiers, which however is computationally expensive. \u2022 Previous methods heavily rely on the generation quality of the first several tokens of item identifiers, because autoregressive generation strictly starts from the first token of identifiers. Nonetheless, the beginning of item descriptions might be com- mon words that do not align with user preference, thus hindering LLMs from generating satisfying items. To overcome the two issues, we establish two essential objectives for generation grounding: 1) constrained generation to ensure generating in-corpus identifiers; and 2) position-free generation to allow LLMs to generate from any position in an identifier. To improve item indexing and generation grounding as the bridge between the item and language spaces, we propose a novel transition paradigm for LLM-based recommenders (shorted as Tran- sRec). Specifically, 1) as depicted in Figure 2(a), TransRec indexes items with multi-facet identifiers, which simultaneously considers item IDs, titles, and attributes (e.g., category) as the identifiers in separate facets to pursue both distinctiveness and semantics. And 2) for generation grounding, LLMs will generate identifiers in each facet as in Figure 2(b). To obtain valid identifiers, we introduce FM-index, a data structure that supports constrained generation via beam search. Besides, we propose also using substrings of item titles to index items (e.g., \u201cLipstick-Red\u201d in \u201cEveryday Elegance Lipstick-Red\u201d), supporting the position-free generation. Lastly, we present an aggregated grounding module to leverage generated identifiers to rank in-corpus items. To validate the effectiveness of TransRec, we conduct extensive experiments on three real-world datasets under diverse settings, including full training, few-shot training, and cold-start recommendation. Empirical results on two backbone models BART-large [23] and LLaMA-7B [30] reveal the superiority of TransRec over traditional models and LLM-based models. In summary, this work offers several significant contributions: \u2022 We identify two fundamental steps of LLM-based recommenders to bridge the item and language spaces, highlighting existing problems and the key objectives in the two steps. \u2022 We propose a new TransRec paradigm with multi-facet identifiers, constrained generation, and position-free generation, seamlessly bridging items and language for LLM-based recommendations. \u2022 We conduct extensive experiments under various recommenda- tion settings, demonstrating the effectiveness of TransRec." }, { "url": "http://arxiv.org/abs/2305.05883v1", "title": "Level-line Guided Edge Drawing for Robust Line Segment Detection", "abstract": "Line segment detection plays a cornerstone role in computer vision tasks.\nAmong numerous detection methods that have been recently proposed, the ones\nbased on edge drawing attract increasing attention owing to their excellent\ndetection efficiency. However, the existing methods are not robust enough due\nto the inadequate usage of image gradients for edge drawing and line segment\nfitting. Based on the observation that the line segments should locate on the\nedge points with both consistent coordinates and level-line information, i.e.,\nthe unit vector perpendicular to the gradient orientation, this paper proposes\na level-line guided edge drawing for robust line segment detection (GEDRLSD).\nThe level-line information provides potential directions for edge tracking,\nwhich could be served as a guideline for accurate edge drawing. Additionally,\nthe level-line information is fused in line segment fitting to improve the\nrobustness. Numerical experiments show the superiority of the proposed GEDRLSD\nalgorithm compared with state-of-the-art methods.", "authors": "Xinyu Lin, Yingjie Zhou, Yipeng Liu, Ce Zhu", "published": "2023-05-10", "updated": "2023-05-10", "primary_cat": "cs.CV", "cats": [ "cs.CV" ], "main_content": "Fig. 2 shows the flowchart of general edge drawing based line segment detection. The edges are drawn by the smart routing strategies [7,8], which connect a series of anchors according to the gradient map. The anchors have a high probability of being edge points, which are pixels with the local maximum of image gradients. When calculating the gradient maps, the original images are generally smoothed by Gaussian filters to decrease the negative effect of noises. Based on the drawn edge chain, the line segments are fitted progressively in the way of least squares using the coordinates of edge points until the predefined conditions are satisfied, e.g., the distance threshold in [7]. Finally, the fitted line segments can be further validated optionally based on additional constraints, e.g., the constraint of gradient orientation or statistics like the Helmholtz principle in [7]. 3. THE PROPOSED GEDRLSD ALGORITHM In this paper, except for image gradient magnitude, the levelline information is fully used in the overall process. As shown in Fig. 2, in contrast to the pipeline shown in Section 2, the main innovations lie in the level-line guided edge drawing, edge refinement (new process), and level-line leveraged line segment fitting (simultaneously including validation). \u221222.5\u00b0 22.5\u00b0 22.5\u00b0 67.5\u00b0 67.5\u00b0 112.5\u00b0 112.5\u00b0 157.5\u00b0 157.5\u00b0 202.5\u00b0 202.5\u00b0 .5 247.5\u00b0 247.5\u00b0 \u221267.5\u00b0 \u221222.5\u00b0 \u221267.5\u00b0 Fig. 3. The searching candidates (orange) of the next edge points are based on the level-lines (red arrows, which are quantized within the range of corresponding level-line angles) of the current edge point (green). 3.1. Level-line Guided Edge Drawing Inspired by the general processes for edge drawing, the Gaussian filter with a kernel size of 5\u00d75 (w.r.t. \u03b4 = 1) is applied in the original image to reduce the noises, and the Sobel filter is used to calculate the image gradients. These pixels with normalized gradient magnitude smaller than a threshold T m g are not considered in edge drawing. The anchors are extracted in images where the pixels have local maxima of gradient magnitude for each quantized direction (described below) and equalized with a radius of 10 pixels as in [16] to reduce their numbers and improve the efficiency of edge drawing. The level-lines of pixels defined in [6] are perpendicular to their gradient orientation, which can be formulated as \ufffdu = cos(\u03b8o + \u03c0/2), v = \u2212sin(\u03b8o + \u03c0/2), (1) in which \u03b8o, \u2212\u03c0 < \u03b8o <= \u03c0 is the gradient orientation. Since the angles of the level-lines \u03b8l = \u03b8o + \u03c0/2 lie in the range of [\u22120.5\u03c0, 1.5\u03c0], they are quantized into eight corresponding directions for searching the candidates of the next edge points, as shown in Fig. 3. The level-lines provide potential directions for accurate edge drawing. Starting from the anchors, for each current edge point, there are three specific searching candidates of the next edge points thanks to the level-lines, instead of the rough searching candidates as in [7] and [8], significantly when the edge directions are changed. The point with maximal gradient magnitude in searching candidates is selected as the next edge point. The drawing is performed iteratively until all anchors are tracked. Fig. 4 shows an example of edges drawn by the GEDRLSD algorithm. 3.2. Edge Refinement As in [17], if the start and end points of an edge lie in a threshold range, i.e., 3 pixels, it is declared as the \u201dloop\u201d edge. Otherwise, it is the \u201dline\u201d edge. Two \u201dline\u201d edges are merged as one if their start and end points lie in a threshold range, i.e., 2 1 Fig. 4. Edges are drawn by the proposed approach, in which the level-lines (green arrows) serve as the drawing guidelines. 3 pixels. For \u201dloop\u201d edges, the initial edges may have wrong start and end points due to the ordering of selected anchors. Here, the \u201dloop\u201d edges are reordered according to the corner function introduced in [17]. Speci\ufb01cally, the point with the highest corner function (sharpest corner) is always selected as the start point for \u201dloop\u201d edges, which ensures the single search direction of line segment \ufb01tting. 3.3. Level-line Leveraged Line Segment Fitting As mentioned above, the line segment in this paper should locate on the edge points with both consistent coordinates and level-lines. Here, the initial line segment is generated by \ufb01tting the coordinates of edge points using the least square [8] and validated until the constraint conditions are satis\ufb01ed. Two validation conditions are set in this paper, i.e., the distance error between the edge coordinates and the \ufb01tted lines, and the angle error between the edge level-lines and the \ufb01tted lines. Only the ratio of inliers validated by both distances and angles is larger than a threshold Tir, the line segment is valid. Once the initial line segment is generated and validated, it is grown iteratively using more edge points. Finally, the coordinates and level-lines of all tracked edge points are used to re\ufb01ne the line segment (with parameters of a, b, and c) under the optimization framework according to the formula loss = min a,b,c F(d) + \u03c1 \u00d7 F(\u03b8), (2) F(d) = ( 1, if F\u2032(d) >= T d v , F\u2032(d)/T d v , if F\u2032(d) < T d v , (3) F(\u03b8) = ( 1, if F\u2032(\u03b8) >= T a v , F\u2032(\u03b8)/T a v , if F\u2032(\u03b8) < T a v , (4) in which F\u2032(d) = |a \u00d7 x + b \u00d7 y + c|/ \u221a a2 + b2 is normalized regarding distance validation threshold T d v , and F\u2032(\u03b8) = acos(| \u2212b \u00d7 u + a \u00d7 v|/( \u221a a2 + b2 \u00d7 \u221a u2 + v2)) is normalized regarding angle validation threshold T a v . The (x, y) and (u, v) are the coordinate and level-line of an edge point, respectively. The \u03c1 is a weight factor between F(d) and F(\u03b8). The line segment endpoints are determined by projecting the \ufb01rst and last inlier edge points onto the \ufb01tted line. The re\ufb01nement process can also be applied to increase the robustness further when the initial line segment is generated. 4. NUMERICAL EXPERIMENTS To quantitatively evaluate the proposed GEDRLSD method, various existing SOTA line segment detection methods, including two Hough based methods, i.e., HoughP [4] and MCMLSD [5], \ufb01ve local information analysis based methods, i.e., EDLines [7], ELSED [8], LSD [6], FLD [9], and Linelet [10], and four deep learning based methods, i.e., MLSD [11], LCNN [12], HT-LCNN [13], and FClip [14], are compared based on well-known benchmark datasets. 4.1. Evaluation Datasets & Metrics Since line segment detection is a pixel-level task, it is hard to label their ground-truth. Although some datasets [10, 18] have \u201dground-truth\u201d, their accuracy and correctness are hard to guarantee due to human labeling error and subjectivity. In this paper, inspired by feature point evaluation, the groundtruth free evaluation considering the detection repeatability in different images is adopted to evaluate various methods. The well-known publicly available datasets, i.e., the af\ufb01ne covariant feature dataset [19] and HPatches [20] dataset, are selected to perform the quantitative evaluation. The repeatability de\ufb01ned in [17] is used as the evaluation metric, which can be formulated as rep = nm 2 \u00d7 ( 1 nr + 1 nt ), in which nm, nr, and nt are the numbers of matched line segments, line segments in the reference image, and line segments in the test image, respectively. Two line segments lr and lt are matched only if the projected line segment l\u2032 r (according to the Homograph matrix) lies in the neighborhood of lt with a distance threshold of T d e pixels, an angle threshold of T a e degrees, and an overlap threshold of To, as described in [10]. Besides, the line segment matches should be one-toone, which means that the projected line segments l\u2032 t should also lie in the neighborhood of lr similarly and that only the mutual closest matched of them are preserved. 4.2. Parameters Setting In all experiments, the line segments with lengths smaller than 15 pixels are discarded for all the testing methods to eliminate the effect of short line fragments. In the GEDRLSD algorithm, the normalized gradient magnitude T m g is set to 0.2. When \ufb01tting the line segments, the validation parameters, i.e., inlier ratio Tir, distance threshold T d v , and angle threshold T a v , are set to 0.5, 3 pixels, and 20 degrees, respectively. The weight factor \u03c1 in formula 2 is 2. For other SOTA methods, the parameters are default values provided by the authors. 4.3. Results Analysis Fig. 1 qualitatively shows an example of line segments detected by the ELSED and proposed GEDRLSD algorithms. Intuitively, the GEDRLSD method detects more complete line segments than the ELSED method. Fig. 5 quantitatively The average repeatability of twelve testing methods using the testing data under all transformations. 0.29 0.37 0.29 0.37 0.22 0.28 0.25 0.32 0.24 0.29 0.28 0.35 0.22 0.27 0.25 0.31 0.23 0.27 0.26 0.31 0.15 0.22 0.15 0.23 0.15 0.21 0.21 0.28 0.04 0.06 0.06 0.08 0.15 0.24 0.18 0.29 0.12 0.19 0.15 0.22 0.1 0.15 0.25 0.11 0.16 0.13 0.2 GEDRLSD EDLines ELSED LSD Linelet MCMLSD FLD HoughP MLSD FClip LCNN HTLCNN 0 0.1 0.2 0.3 0.4 Repeatability 0.16 Fig. 5. The average repeatability of 12 testing methods based on two evaluation datasets and two evaluation parameter con\ufb01gurations, in which the results of all transformations are considered together. Table 1. The average repeatability of 12 testing methods based on two evaluation datasets and two evaluation parameter con\ufb01gurations, in which the results of the single transformation are considered. The colored values are the top three of performance. Evaluation parameter con\ufb01guration: T d e = 1.5, T a e = 5, To = 75% Evaluation parameter con\ufb01guration: T d e = 3, T a e = 10, To = 75% Af\ufb01ne feature dataset HPatches dataset Af\ufb01ne feature dataset HPatches dataset blur view zoom+rotation light JPEG light view blur view zoom+rotation light JPEG light view GEDRLSD 0.182 0.266 0.165 0.435 0.697 0.281 0.307 0.287 0.368 0.233 0.449 0.711 0.330 0.407 EDLines 0.126 0.209 0.121 0.403 0.464 0.258 0.244 0.182 0.295 0.182 0.428 0.477 0.310 0.328 ELSED 0.116 0.224 0.138 0.406 0.528 0.290 0.271 0.169 0.303 0.189 0.423 0.536 0.338 0.354 LSD 0.127 0.222 0.125 0.394 0.410 0.251 0.258 0.174 0.295 0.182 0.404 0.422 0.295 0.330 Linelet 0.120 0.181 0.126 0.473 0.480 0.297 0.220 0.185 0.228 0.157 0.494 0.486 0.344 0.286 MCMLSD 0.093 0.144 0.083 0.279 0.290 0.180 0.130 0.147 0.223 0.151 0.349 0.345 0.249 0.216 FLD 0.076 0.171 0.076 0.299 0.270 0.228 0.199 0.121 0.244 0.136 0.338 0.300 0.273 0.278 HoughP 0.028 0.032 0.011 0.107 0.066 0.076 0.036 0.041 0.052 0.018 0.138 0.093 0.101 0.056 MLSD 0.085 0.064 0.046 0.363 0.449 0.265 0.092 0.173 0.129 0.116 0.555 0.562 0.395 0.197 Fclip 0.096 0.059 0.029 0.293 0.332 0.221 0.075 0.168 0.131 0.064 0.380 0.384 0.293 0.150 LCNN 0.065 0.040 0.028 0.223 0.319 0.234 0.096 0.124 0.085 0.062 0.334 0.365 0.309 0.195 HTLCNN 0.097 0.025 0.083 0.199 0.248 0.200 0.066 0.164 0.056 0.112 0.287 0.292 0.264 0.138 shows the average repeatability of twelve methods based on two datasets and two evaluation parameter con\ufb01gurations under all transformations. The results indicate that the proposed GEDRLSD algorithm outperforms other SOTA methods in all the evaluation datasets and con\ufb01gurations. It can effectively and repeatably detect line segments. Table 1 shows the average repeatability of twelve testing methods under a single transformation. The results indicate that, except for the light transformation, the proposed GEDRLSD algorithm performs best in all the single transformations of two evaluation datasets. The main reason is that image gradients are sensitive to light transformation and insensitive to other abovementioned transformations. 4.4. Computation Cost Analysis For edge drawing based line segment detection methods, the primary computation cost comes from the progressive line segment \ufb01tting based on the least square using the coordinate of edge points. Here, the additional operation mainly lies in the line segment re\ufb01nement using both the coordinate of edge points and their level-line information for the GEDRLSD method, which is only performed when the initial line segment is found (optional), and the line segment is stopped to grow. For each line segment, there are at most two times of re\ufb01nement. The computation cost of the GEDRLSD method is slightly higher than the ELSED and EDLines methods, but their computation costs should be at the same level, much faster than other non-edge drawing based methods. 4.5. Application in Visual Localization The proposed GEDRLSD algorithm is applied in the longterm visual localization system mentioned in [21]. The road route \u201dLog 3\u201d of the Ford AV dataset2 is selected to perform the testing. The localization results show that the proposed GEDRLSD algorithm can be successfully applied in a long-term visual localization system, achieving centimeter-level positioning and high orientation accuracy. The details can be found in the published video demo https://github.com/roylin1229/GEDRLSD. 5. CONCLUSION This paper proposed the GEDRLSD algorithm by assuming that the line segments should be located on the edge points with consistent coordinates and level-lines. The double consistent constraints make it more robust than the methods based on a single coordinate constraint. The level-lines provide potential directions for edge point tracking and is fused in the line segment re\ufb01nement. Numerical experiments show that the proposed approach outperforms other SOTA methods while still keeping its ef\ufb01ciency competitive. 2https://avdata.ford.com/ 6.", "introduction": "Like point features [1], line segments are also the basic im- age local features for many computer vision tasks, e.g., in- door frame recovery [2], in which line segments are detected and matched to provide the feature correspondences between different images of the same scenes. Line segment detection should be robust and fast to accomplish these tasks. Gener- ally, line segments appear in the image areas where the gradi- ents have a trending change, e.g., the edges [3]. A lot of line segment detection methods have been pro- posed recently. According to their detection mechanism, they can be classi\ufb01ed into the following three groups roughly: (1) Hough based methods [4, 5]; (2) Local information analysis * Corresponding author. This research is supported by the National Nat- ural Science Foundation of China (NSFC, No. U19A2052, 62171088, and 62171302), and in part by the Sichuan Youth Science and Technology Inno- vation Team under Grant 2022JDTD0014. 1https://github.com/roylin1229/GEDRLSD 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 4 8 1 2 7 8 ELSED GEDRLSD Fig. 1. Line segments with details detected by the ELSED [8] and the proposed GEDRLSD methods. The line segments in GEDRLSD should have consistent edge point coordinates and level-lines (magenta arrows), e.g., line 1 and 7 are two lines instead of one because their level-lines are entirely different. based methods [6\u201310]; (3) Deep learning based methods [11\u2013 14]. Among these methods, the local information analysis based ones attract increasing attention for their high detection ef\ufb01ciency, which is critical for embedded devices with lim- ited computation and storage resources. Notably, the meth- ods [7, 8] based on edge drawing [15] are ultra-fast, which are more than ten times faster than the benchmark real-time line segment detection algorithm [6]. However, they are not robust enough due to inadequate usage of image gradients. As shown in Fig. 1 and 2, this paper proposes a level- line guided edge drawing for robust line segment detec- tion (GEDRLSD) algorithm by observing that line segments should locate on edge points with both consistent coordinates and level-lines. The double consistent constraints make it more robust than the methods based on a single coordinate constraint, e.g., [7] and [8]. The level-lines are perpendic- ular to the gradient orientation [6], which can assign more accurate tracking directions for edge drawing than that in [7] and [8], signi\ufb01cantly when the edge directions are changed, as shown in Fig. 3 and 4. The drawn edges are further re\ufb01ned by arXiv:2305.05883v1 [cs.CV] 10 May 2023 image gradient calculation anchor extraction edge drawing line segment fitting line segment validation edge refinement level-lines fusing level-lines guiding \u00a0new added/\n enhanced modules GEDRLSD \n approach general \n approach Fig. 2. The \ufb02owchart of the general edge drawing based ap- proach vs. the proposed GEDRLSD approach. analyzing their geometric characteristics, i.e., the reordering for \u201dloop\u201d edges and merging for \u201dline\u201d edges shown in sub- section 3.2. Both edge coordinates and level-lines are fused in line segment \ufb01tting under the optimization framework, as shown in formula 2. Experiments show that the GEDRLSD method outperforms other state-of-the-art (SOTA) methods while still keeping its ef\ufb01ciency competitive. The rest of this paper is organized as follows. In Section 2, the pipeline of edge drawing based line segment detection al- gorithms will be described brie\ufb02y. The proposed GEDRLSD algorithm will be introduced in Section 3. Numerical experi- ments based on well-known benchmark datasets are included in Section 4. Section 5 is the conclusion of this paper." }, { "url": "http://arxiv.org/abs/2212.04282v2", "title": "Mitigating Spurious Correlations for Self-supervised Recommendation", "abstract": "Recent years have witnessed the great success of self-supervised learning\n(SSL) in recommendation systems. However, SSL recommender models are likely to\nsuffer from spurious correlations, leading to poor generalization. To mitigate\nspurious correlations, existing work usually pursues ID-based SSL\nrecommendation or utilizes feature engineering to identify spurious features.\nNevertheless, ID-based SSL approaches sacrifice the positive impact of\ninvariant features, while feature engineering methods require high-cost human\nlabeling. To address the problems, we aim to automatically mitigate the effect\nof spurious correlations. This objective requires to 1) automatically mask\nspurious features without supervision, and 2) block the negative effect\ntransmission from spurious features to other features during SSL. To handle the\ntwo challenges, we propose an invariant feature learning framework, which first\ndivides user-item interactions into multiple environments with distribution\nshifts and then learns a feature mask mechanism to capture invariant features\nacross environments. Based on the mask mechanism, we can remove the spurious\nfeatures for robust predictions and block the negative effect transmission via\nmask-guided feature augmentation. Extensive experiments on two datasets\ndemonstrate the effectiveness of the proposed framework in mitigating spurious\ncorrelations and improving the generalization abilities of SSL models. The code\nis available at https://github.com/Linxyhaha/IFL.", "authors": "Xinyu Lin, Yiyan Xu, Wenjie Wang, Yang Zhang, Fuli Feng", "published": "2022-12-08", "updated": "2024-04-18", "primary_cat": "cs.IR", "cats": [ "cs.IR" ], "main_content": "In this section, we first introduce the recommendation task, SSL recommendation, and spurious correlations in Section 2.1. And then, we present our IFL framework for SSL recommendation in Section 2.2, including feature mask learning and mask-guided contrastive learning. 2.1 Task Formulation 2.1.1 Recommender Formulation The general idea of the recommendation task is to learn user preference from collected interactions between the users U and items I, where each user u \u2208U has N features such as ID, experience year, and country, denoted by Xu = {x1 u, x2 u, . . . , xN u }. Each entry in Xu is a one-hot vector indicating a specific feature value (e.g., experience year=5). Likewise, an item i has M features Xi = {x1 i , x2 i , . . . , xM i }. Given a useritem interaction dataset D = {(Xu, Xi, yui)} with yui \u2208{0, 1} indicating whether u interacts with i, the recommender model aims to learn a function f(u, i|\u03b8) to capture user preference. \u03b8 denotes the learnable parameters optimized over dataset D via the collaborative filtering (CF) loss, such as BPR loss [14]. 2.1.2 Self-supervised Recommendation The SSL recommendation introduces an extra self-discrimination task to learn better user and item representations. The self-discrimination task includes two key steps: data augmentation and contrastive learning. SSL first augments factual samples by randomly dropping user and item features [2], or conducting edge and node dropouts in the user-item interaction graph [1]. Then, based on the augmented samples, the positive and negative pairs are constructed for contrastive learning. In the self-discrimination task, SSL models are essentially exploring the relationships between the user and item features, and the interactions [2]. As such, they are likely to fit spurious correlations from the spurious features to interactions. 2.1.3 Spurious correlations Spurious correlations broadly exist in the training dataset D due to the selection bias in data collection [7]. Intuitively, some spurious features do not causally affect the interactions but have a strong correlation with interactions purely because of the selection bias (see the example in Fig. 1). By the normal recommender training over D and the additional self-discrimination task, SSL models will easily capture these shortcut correlations, suffering from poor generalization when the data distribution shifts. Moreover, the selfdiscrimination task via feature augmentation will maximize the mutual information between user and item features [2], transferring the detrimental effect from spurious features to other invariant features. Such effect transmission in SSL models will further intensify the negative influence of spurious correlations. 2.2 Invariant Feature Learning To mitigate the spurious correlations, we propose an IFL framework that can automatically identify Springer Nature 2021 L AT EX template Figure 2 Illustration of IFL framework. The two-tower encoders on the left are used for normal recommender training with the CF loss and variance loss. On the right side, we do mask-guided feature augmentation over the user and item features, i.e., drop the spurious features and then conduct contrastive learning. The augmentations on users and items are the same and we only show that on items to save space. spurious features via the feature mask mechanism and block the negative effect transmission by mask-guided contrastive learning. The overall IFL framework is demonstrated in Fig. 2. Given a pair of user and item features (Xu,Xi), we first look up their embeddings via the feature embedding layer, and then utilize the feature mask mechanism to mask the embeddings of spurious features for predictions. We utilize the CF loss to optimize the feature embeddings while adopting a variance loss to supervise the learning of the mask mechanism. Regarding self-discrimination, we feed the user and item features into the mask-guided augmentation layer and conduct contrastive learning over the factual and augmented samples. 2.2.1 Feature Mask Learning In order to identify spurious features and remove their harmful influence, we introduce a feature mask mechanism. Specifically, we define two feature masks mu \u2208 RN, and mi \u2208RM, which are shared with all users and items, respectively. mu and mi with the range [0, 1], denoting the probability of being invariant features, and thus a feature with a smaller mask value is more likely to be a spurious feature. To estimate the two masks, we draw mu, and mi from the clipped Gaussian distributions [15] parameterized by \u03b31 \u2208RN and \u03b32 \u2208RM, respectively. Formally, for each mu[k] \u2208mu and mi[j] \u2208mi, Figure 3 Illustration of the environment division in feature mask learning. The interaction representations zui are clustered into C = 2 environments. The distributions of spurious features shift across two environments while those of invariant features are stable. we have ( mu[k] = min(max(\u03b31[k] + \u03f5, 0), 1), mi[j] = min(max(\u03b32[j] + \u03f5, 0), 1), (1) where the noise \u03f5 is drawn from N \u00000, \u03c32 \u03f5 \u0001 . To ensure the two masks well represent the probabilities, we clip the values of mu and mi into [0, 1]. Thereafter, we apply the masks to shield the spurious features before feeding the feature embeddings into the Deep Neural Network (DNN) encoders. In detail, we represent the user and item features via the embeddings Xu1 \u2208RN\u00d7D and Xi \u2208RM\u00d7D, where D is the embedding dimension. For each Xu[:, k] \u2208Xu and Xi[:, k] \u2208Xi, we have ( X\u2032 u[:, k] = Xu[:, k] \u2299mu, X\u2032 i[:, k] = Xi[:, k] \u2299mi, (2) where \u2299is the element-wise multiplication. As such, the feature embeddings are masked via mu and mi. Next, we concatenate N feature embeddings in X\u2032 u into a vector and then feed it into the DNN encoders to obtain the user representation zu and item representation zi. \u2022 Environment Division. The key challenge of automatically recognizing spurious features is to extract the supervision signals from the correlated data. To address this challenge, we cluster the interactions into multiple environments with 1To keep notation brevity, we use Xu to represent both users\u2019 input features and their embeddings. It is similar for Xi. Springer Nature 2021 L AT EX template 5 distribution shifts and utilize the shifts to discover invariant features. Specifically, we obtain the representation of each user-item pair zui by concatenating the user and item representations: zui = concat(zu, zi). (3) Thereafter, we adopt K-means to cluster the interaction representations zui into C environments: {zc ui|c \u2208{1, 2, . . . , C}} \u2190K-means({zui}), where zc ui denotes the interaction representation that belongs to environment c. By clustering, similar features will be divided into the same environment while the feature distribution shifts across environments. The interactions with the same spurious features are similar and thus are easy to be clustered into the same environments. As illustrated in Fig. 3, the spurious features show different distributions across environments, and only invariant features have consistent distributions. As such, pursuing robust predictions across environments will push the mask mechanism to discover the invariant features and exclude spurious features. \u2022 CF and Variance Loss. To push the mask mechanism to exclude spurious features, we incorporate a variance loss. Before the variance loss, we first detail the CF loss for the normal recommender training. Following [2], we adopt the batch-softmax loss for a batch of interactions, i.e., LCF = \u22121 B B X k=1 log exp(s(zuk, zik)/\u03c4) PB j=1 exp(s(zuk, zij)/\u03c4) , (4) where B is the batch number, \u03c4 refers to a temperature hyper-parameter, and s(\u00b7) denotes the cosine similarity function. As to the variance loss, we separately calculate LCF within each environment, i.e., Lc with c varying from 1 to C. Formally, Lc = \u22121 Bc Bc X k=1 log exp(s(zc uk, zc ik)/\u03c4) PBc j=1 exp(s(zc uk, zc ij)/\u03c4) , (5) where zc uk, zc ik represent the k-th user and item representation of environment c, and Bc is the number of interactions that belong to environment c. And then, we regulate the mask mechanism by minimizing the gradient variance Lv = Lvu + Lvi, where Lvu and Lvi are as follows: \uf8f1 \uf8f4 \uf8f4 \uf8f4 \uf8f4 \uf8f4 \uf8f2 \uf8f4 \uf8f4 \uf8f4 \uf8f4 \uf8f4 \uf8f3 Lvu = C X c=1 \u2225\u2207muLc \u2212\u2207muLCF\u22252 , Lvi = C X c=1 \u2225\u2207miLc \u2212\u2207miLCF\u22252 , (6) where \u2207muLc is the gradients w.r.t. the mask mu in environment c and \u2207muLCF denotes the average gradients w.r.t. mu across C environments. Lvu thus reflects the gradient variance in C environments. Here, the utility of gradient variance follows the idea of invariant learning in [16], where the gradient variance is simplified from the variance penalty regularizer proposed in [17] for feature selection scenarios. Minimizing the gradient variance will regulate mu to have similar gradients and close performance in multiple environments [18]. The gradient loss over Lvi is similar to Lvu for the regularization of mi. As such, optimizing the variance loss avoids the situation that most environments are well predicted via capturing spurious correlations, while few environments have inferior performance because of the spurious correlations. 2.2.2 Mask-guided Contrastive Learning By incorporating the feature mask mechanism into the self-discrimination task, we require the model to ignore the spurious features and cut off the negative effect transmission from spurious features to invariant features. \u2022 Data Augmentation. Instead of random feature dropout for augmentation, we consider a dropping probability to drop the spurious features. The dropping probability of each feature is proportional to its probability of being a spurious feature in the mask mechanism. As shown in Fig. 4, we then utilize contrastive learning to maximize the mutual information between the factual sample and augmented samples. Springer Nature 2021 L AT EX template Figure 4 Illustration of mask-guided contrastive learning in IFL. (a) shows the augmentation by dropping spurious features, (b) demonstrates the contrastive pairs in a sample batch, and (c) presents the contrastive loss between two items. Only two samples\u2019 contrastive pairs are shown in (b) for neatness. \u2022 Contrastive Loss. Fig. 4(c) illustrates the contrastive loss in a batch of samples. Formally, Lssl = \u22121 B B X k=1 log exp(s(zkfac, zkinv)/\u03c4) PB j=1 exp(s(zkfac, zjinv)/\u03c4) , (7) where zkfac stands for the representation of a factual sample with all input features, and zkinv is for the augmented sample that drops spurious features. By considering that zkfac and zkinv are positive pairs, the SSL models will ignore the spurious features recognized by the mask mechanism, blocking the effect transmission from spurious features to other invariant features. \u2022 Optimization. In our proposed IFL, the overall objective function is formulated as: L = LCF + \u03b1Lssl + \u03b2Lv + \u03bb\u2225\u03b8\u22252, (8) where \u03b8 denotes the model\u2019s learnable parameters, and \u2225\u03b8\u22252 is the L2 norm regularization term to avoid over-fitting. Besides, \u03b1, \u03b2, and \u03b8 are the hyper-parameters to adjust the effect of the contrastive loss, variance loss, and regularization. Finally, we utilize this overall loss to optimize the parameters by gradient descent. 3 Experiment We conduct extensive experiments to answer the following research questions: \u2022 RQ1: Can the IFL framework outperform baselines on the recommendation performance when spurious features exist? Table 1 The statistics of the two datasets. Here, \u2019Int.\u2019 denotes \u2019Interactions\u2019. Dataset #Users #Items #Int. Density Meituan 2113 7138 13429 0.00089 XING 22668 8756 120976 0.00061 \u2022 RQ2: How do the components of IFL affect its effectiveness? \u2022 RQ3: How do the hyper-parameters affect the validity of the proposed method? 3.1 Experimental Settings Datasets. We conduct experiments on two realworld datasets, Meituan2 and XING3. The statistics of them are shown in Table 1. \u2022 Meituan is a food recommendation dataset with rich user consumption of food. For each sample, we keep the following important attributes: user ID, user income, item ID, and item price. \u2022 XING is a job recommendation dataset, including several types of interactions and abundant features of users and jobs. For simplicity, we delete some unimportant features. We merge three types of interactions (types of 1 \u22123) to reflect user interests, making a sample negative only if the three types of interaction are all negative. We apply the 5-core setting [19] to filter the datasets and randomly split them into training, validation, and testing sets with the ratio of 8:1:1, where the testing set is used for the IID testing setting, i.e., the setting that the training and testing have the independent and identical distribution. Besides, to better evaluate the models\u2019 ability to deal with spurious correlations, we also construct an OOD testing set, in which the spurious correlations are manually controlled. For example, we discover the work experience as the spurious feature for dataset XING. Then we forcibly filter out some interactions such that the OOD set and the training set have significantly different conditional distributions of the interaction given this spurious feature, as shown in Fig. 5. Baselines. We compare the proposed IFL framework with the following five representative recommender models: 2https://www.biendata.xyz/competition/smp2021 2/. 3http://www.recsyschallenge.com/2017/. Springer Nature 2021 L AT EX template 7 Table 2 Performance comparisons between baselines and IFL on Meituan and XING. The best results are highlighted in bold and the sub-optimal results are underlined. Meituan OOD testing IID testing Model Recall@50 Recall@100 NDCG@50 NDCG@100 Recall@50 Recall@100 NDCG@50 NDCG@100 FM 0.0144 0.0231 0.0043 0.0058 0.0656 0.0789 0.0280 0.0302 NFM 0.0139 0.0252 0.0039 0.0057 0.0597 0.0761 0.0260 0.0287 DeepFM 0.0159 0.0257 0.0041 0.0057 0.0618 0.0763 0.0257 0.0281 AutoDeepFM 0.0109 0.0227 0.0031 0.0050 0.0646 0.0794 0.0266 0.0290 AutoFIS+CFM 0.0128 0.0194 0.0037 0.0048 0.0590 0.0824 0.0205 0.0243 SGL+Attr-A 0.0166 0.0251 0.0056 0.007 0.0792 0.0929 0.0354 0.0377 SGL+Attr-B 0.0047 0.0118 0.0011 0.0022 0.0374 0.0509 0.0137 0.0159 SGL 0.0180 0.0246 0.0061 0.0072 0.0896 0.1047 0.0357 0.0382 SSL-DNN 0.0123 0.0232 0.0042 0.0060 0.0763 0.1015 0.0244 0.0285 IFL 0.0227 0.0345 0.0064 0.0083 0.1013 0.1159 0.0413 0.0436 XING OOD testing IID testing Recall@10 Recall@20 NDCG@10 NDCG@20 Recall@10 Recall@20 NDCG@10 NDCG@20 FM 0.5402 0.7056 0.3003 0.3505 0.6163 0.6605 0.3998 0.4117 NFM 0.5425 0.7076 0.3069 0.3569 0.6202 0.6672 0.4033 0.4160 DeepFM 0.5431 0.7110 0.3066 0.3575 0.6223 0.6678 0.4047 0.4170 AutoDeepFM 0.5312 0.6977 0.3006 0.3510 0.6182 0.6572 0.4014 0.4120 AutoFIS+CFM 0.5374 0.7062 0.2924 0.3438 0.6174 0.6655 0.3903 0.4033 SGL+Attr-A 0.4356 0.535 0.2489 0.2779 0.5501 0.5924 0.3528 0.3646 SGL+Attr-B 0.503 0.6466 0.2782 0.3214 0.6079 0.6474 0.3946 0.4053 SGL 0.5545 0.7211 0.3128 0.3633 0.6355 0.6818 0.4166 0.4291 SSL-DNN 0.5444 0.7116 0.3139 0.3647 0.6236 0.6705 0.3999 0.4124 IFL 0.5549 0.7230 0.3190 0.3699 0.6400 0.6814 0.4088 0.4200 Figure 5 The conditional distribution of the interaction given spurious features for the IID and OOD sets of XING, where the spurious feature is the user work experience and the interaction is about interacting with the full-time job. \u2022 FM [20], NFM [21], and DeepFM [22] are powerful feature-based recommenders, which blindly utilize all features by feature interaction modeling to generate recommendations. \u2022 SSL-DNN [2] is a multi-task-based selfsupervised learning recommendation framework with two towers of DNN. It adopts a feature dropout strategy for data augmentation. Here, we utilize correlated feature masking (CFM) for feature dropout due to its better performance compared to random feature masking [2], and SSL-DNN shares the same base neural network and learnable parameters as IFL. \u2022 SGL [1] is a self-supervised learning method for graph-based collaborative filtering [23], which only utilizes the feature of the user ID and item ID. It conducts data augmentation by node dropout and edge dropout. \u2022 SGL+Attr-A and SGL+Attr-B are two variants of SGL that utilize side information. We add the features for SGL+Attr-A and SGL+Attr-B before and after the graph propagation, respectively. \u2022 AutoDeepFM [11] is a method that can automatically discover and remove redundant feature interactions based on informative feature selection. It identifies the informative cross features by assigning learnable weights to feature interactions. \u2022 AutoFIS+CFM adopts the informative feature selection into SSL-DNN. Learnable weights for features are used by SSL-DNN to discover the redundant features, and the model will be re-trained with only informative features. Evaluation. Following the common setting of existing work, we adopt the full-ranking protocol to evaluate the top-K recommendation performance with the averaged Recall@K and NDCG@K as the metrics. We set K = {50, 100} for Meitaun and K = {10, 20} for XING. We compute the metrics on both the IID and OOD testing sets, respectively. Springer Nature 2021 L AT EX template Hyper-parameter Settings. We fix the embedding size 64 for all methods. Then, we tune the hyper-parameters on the validation sets with the following strategies: \u2022 For FM, NFM, DeepFM, and AutoDeepFM, we tune their learning rate, DNN (implemented as MLP) hidden sizes, dropout ratio, L2-regularization coefficient, batch normalization, and negative sampling number in the ranges of {0.01, 0.001}, {[32], [64]}, {0.4, 0.5, 0.6}, {1e-4, 1e-3, 0.1, 0.2}, {0, 1}, {1, 5, 10, 20}, respectively. \u2022 For SSL-DNN and AutoFIS+CFM, we search the learning rate, DNN (MLP) hidden sizes, dropout ratio, strength coefficient of SSL loss, and temperature coefficient of SSL loss for smoothing in the ranges of {0.01, 0.005}, {[none], [64]}, {0.1, 0.2}, {0.1, 0.5, 1}, and {0.1, 0.3, 0.5, 0.7, 1}, respectively. Here, [none] represents that the DNN only contains a fully-connected layer. \u2022 For SGL, SGL+Attr-A, and SGL+Attr-B, we adopt the version named SGL-ED and follow its default setting to set the number of graph layers to three and the learning rate to 0.001. Then, we tune the L2-regularization coefficient, strength coefficient of SSL loss, and temperature of NCE loss for smoothing in the ranges of {0.0001, 0.1}, {0.1, 0.2, 0.5} and {0.1, 0.3, 0.5, 0.7, 1.0}, respectively. \u2022 For the proposed IFL, we tune the hyperparameters \u03b1, \u03b2, \u03c4 in the loss, the number of environments, and the learning rate within the ranges of {0, 0.1, 0.3, 0.5, 0.7, 1.0}, {0, 0.0001, 0.001, 0.01, 0.1, 1.0}, {0.1, 0.3, 0.5, 0.7, 1.0}, {1, 2, 4} and {0.01, 0.05}, respectively. 3.2 Overall Performance (RQ1) We compare the recommendation performance in both IID and OOD settings between IFL and the baselines. The results are shown in Table 2, where we have the following observations: \u2022 In the OOD testing setting, the proposed IFL outperforms all baselines, including SSL-based methods, on both two datasets. To achieve a good OOD generalization, a model should eliminate the impact of spurious correlation in the training set. Thus, this result can verify the effectiveness of our proposal \u2014 spurious feature mask learning and mask-guided data augmentation \u2014 in identifying the spurious features and blocking the bad effect of the corresponding spurious correlations for SSL. \u2022 In the IID testing setting, our IFL at least achieves comparable performance to SOTA baselines. Together with its good OOD performance, this result shows that IFL can achieve good OOD generalization ability without sacrificing IID prediction. \u2022 When moving from the IID testing setting to the OOD testing setting, all methods show sharp performance drops. This is a normal phenomenon, since there are huge distribution shifts from the training to the OOD testing set. Although our IFL is expected to achieve OOD performances by removing the spurious correlation in training, we cannot expect it to have no performance drops since 1) the OOD set is not an unbiased set and 2) the data distribution itself also influences the model learning and further affects model performances. \u2022 Among all baselines, SGL usually achieves better performance. This can be attributed to its good ability to model high-order interactions via graph learning and its effective graphbased data augmentation. Meanwhile, it is less possible to be affected by the spurious features with only ID information, achieving better OOD performances. However, SGL-Attr-A and SGL-Attr-B perform worse than SGL, which may be attributed to the noise introduced by spurious features. Therefore, it verifies that the superior performance of our proposed IFL comes from the invariant features learned by the feature mask mechanism. Moreover, the better performance of SSL-DNN compared to AutoFIS+CFM and the relatively poor performance of SSL-DNN compared to IFL and SGL indicates the necessity to deal with the spurious correlation issues for SSL and the effectiveness of IFL again. 3.3 Ablation Study (RQ2) Feature mask learning is key to identifying the spurious features and further helping to remove these features. In this section, to verify the importance of its key components, we conduct the following ablation studies: Springer Nature 2021 L AT EX template 9 Figure 6 The performance of IFL with (w/, \u03b2 = 0.01) or without (w/o, \u03b2 = 0) variance loss on IID and OOD over Meituan. \u2022 The variances loss in the feature mask learning is the key to pushing the feature mask mechanism to identify the invariant features and discard the spurious features. Therefore, we next study its importance. Specially, we compare the IFL with the variance loss and a variant of IFL without the loss. Fig. 6 shows the results. We can find: 1) in the IID testing setting, the two models show similar performance; 2) but in the OOD testing setting, the performance of the IFL without the variance loss decreases obviously, compared to the IFL with the loss. This shows that the variance loss is necessary for helping the feature masking mechanism identify and discard the spurious features. \u2022 To verify the importance of the proposed spurious feature mask mechanism, we compare the IFL with (w/) and the IFL without (w/o) the feature mask mechanism. The results are shown in Fig. 7. From the figure, we find that the IFL without the feature mask shows poorer performances on both the IID testing and the OOD testing. The results of the OOD testing indicate that it is necessary to remove the effects of spurious features for OOD generalization, and the proposed feature mask mechanism effectively discards the effects. Meanwhile, the results for the IID testing show that removing spurious features could benefit the IID prediction. The possible reason is that: the spurious features could be non-necessary features for the IID prediction. Such non-necessary features could introduce noise to the model learning as discussed in [11]. Note that directly removing such features is not helpful for OOD generalization, which can be proved by the fact that IFL without variance loss also conducts the feature mask Figure 7 The performance of IFL with (w/) or without (w/o) performing the feature mask mechanism under the IID and OOD testing settings on Meituan. mechanism, but shows poor performances (cf. Fig. 6). 3.4 Hyper-parameter Analysis (RQ3) To analyze the influences of different hyperparameters of IFL on the recommendation performance, we conduct a series of experiments on Meituan by varying these hyper-parameters. Note that when studying a hyper-parameter, we fix other hyper-parameters as the optimal in Table 2. For the hyper-parameters \u03b2 to control the influence of variance loss, \u03b1 to adjust the weight of SSL loss, and \u03c4 in SSL loss for smoothing, we vary them in the ranges of {0, 1e \u2212 4, 1e \u22123, 1e \u22122, 0.1, 1}, {0, 0.1, 0.3, 0.5, 0.7} and {0.1, 0.3, 0.5, 0.7}, respectively. Fig. 8 and Fig. 9 show the results for them on OOD and IID testing settings, respectively. For the hyper-parameter C, we vary it in the range of {1, 2, 4}, and Table 3 shows the corresponding results. From the figures and the table, we have the following observations: \u2022 For \u03b2, according to the sub-figures on the left of Fig. 8 and Fig. 9, we find that \u03b2 has a slight influence on the IID testing performance. While in the OOD testing setting, the performance roughly shows a decreasing trend when \u03b2 decreases. When \u03b2 decreases to 0, i.e., no variance loss to push the feature mask mechanism to discard the spurious features, our IFL cannot outperform the normal SSL method SGL (cf. Table 2). Thus, when tuning the \u03b2 for IFL, we do not need to pay much attention to the IID performance, and we need to set a relatively large \u03b2 to achieve better OOD performance. Springer Nature 2021 L AT EX template Figure 8 Hyper-parameter influences on the OOD testing performances for Meituan, regarding the hyper-parameters \u03b2 to control the influence of variance loss, \u03b1 to adjust the weight of SSL loss and \u03c4 in SSL loss for smoothing. Figure 9 The influences of hyper-parameters on the IID testing performances for Meituan. There are three hyperparameters \u2014 the hyper-parameters \u03b2 to control the influence of variance loss, \u03b1 to adjust the weight of SSL loss and \u03c4 in SSL loss for smoothing. \u2022 For \u03b1, as the middle sub-figures of Fig. 8 and Fig. 9 show, the OOD and IID testing performances show similar increasing trends when \u03b1 increases. Thus, when tuning it, we do not need to consider the trade-off between the OOD and IID performance. Besides, we note that when the \u03b1 = 0, i.e., the SSL part is disabled for IFL, the OOD testing performances of IFL decrease sharply, but IFL can still outperform other nonSSL baselines in the OOD testing setting (cf. Table 2). This shows that SSL is important for IFL but the proposed feature mask learning of IFL is also useful for non-SSL models. \u2022 Regarding \u03c4, according the sub-figures on the right of Fig. 8 and Fig. 9, we find that \u03c4 has sensitive influences on both the IID and OOD testing performance, which is similar to previous work [1]. Fortunately, the OOD and IID testing performances show very similar fluctuating trends, making hyper-parameter tuning relatively easy. \u2022 Regarding C, as Table 3 shows, with C changing, the IID performance remains relatively stable while the OOD performance is hugely affected by C. Since the quality and the number of the environments usually have huge influences on the effectiveness of invariant learning [16], we need to tune it carefully. Table 3 The influences of the hyper-parameter C to adjust the number of environments on Meituan. OOD testing IID testing C Recall@50 NDCG@50 Recall@50 NDCG@50 1 0.0180 0.0054 0.1018 0.0410 2 0.0213 0.0061 0.1041 0.0417 4 0.0189 0.0056 0.1018 0.0410 3.5 Case Study To illustrate how IFL blocks the negative effect of spurious features, we analyze the feature masks and examine the interaction distributions. From Fig. 10, we find that some user features are recognized as spurious features with the feature mask value as zero. Thereafter, we investigate the interaction distributions on XING to verify the effectiveness of the feature mask. Here, we demonstrate two examples of the discovered spurious user features (i.e., experience years and experience years in the current job). According to the figure on the left in Fig. 11, among all full-time jobs, users with 4 and 6 years of work experience are more likely to have positive interactions, while those with 5 and 7 years are more likely to have negative interactions. However, based on expert knowledge, the preference of users with only one year gap in years of work experience over full-time jobs should not be significantly different, which makes users\u2019 number of Springer Nature 2021 L AT EX template 11 Figure 10 User feature mask learned by IFL in XING. The mask value of 1 indicates the invariant feature, while that of 0 indicates the spurious feature. Figure 11 The figure to the left presents the distribution of positive/negative interactions over users\u2019 years of work experience among all full-time jobs. The figure to the right demonstrates the distribution of positive/negative interactions over users\u2019 years of work experience in their current job among all jobs in Austria. years of experience a spurious feature. Similarly, from the graph to the right of Fig. 11, user preference for jobs in Austria is drastically influenced by the work experience in the current job. In fact, this is irrational; thus, the years of experience of users in their current job is also a spurious feature. In prediction, these identified spurious features are well shielded by the feature mask, which intuitively explains the superior generalization ability of IFL. 4 Related Work 4.1 Neural Recommendation With the rise of deep learning in machine learning, neural recommendation is becoming more and more flourishing [24\u201326] and usually can surpass traditional recommenders [24]. Technically, we can categorize the existing work into two lines. The first line is to develop neural recommenders based on various deep neural networks [24], including work based on MLP [27, 28], convolutional neural networks [29], self-attention [30], etc. Another line of efforts models recommendation data with different graphs, e.g., bipartite graph [31], knowledge graph [32], and hypergraph [33], and then designs recommenders with graph neural networks. However, these methods are trained in a supervisedlearning manner, and the supervised signals (i.e., interactions data) are extremely sparse compared to the overall sample space, limiting the effectiveness of neural recommenders. Differently, we utilize self-supervised learning, which has potential to overcome this drawback. 4.2 Self-supervised Learning Regarding SSL, contrastive models are the most related, which learn to compare samples through a Noise Contrastive Estimation (NCE) objective [1]. Some work focuses on modeling the contrast between the local part of a sample and its global context [34], and other work performs comparisons between different views of samples [35, 36]. Benefiting from its relatively lower dependency on labeled data, SSL also receives huge attention in recommendation [37]. Many attempts have been proposed for various neural recommendations to overcome the data sparsity challenge [1, 2, 37]. For example, SGL [1] applies the SSL to the graph recommender model based on node and edge dropout. Although SSL has become popular in many areas and has become the SOTA for personalized recommendation [1, 2], SSL might capture spurious correlations, since it blindly discovers correlation relationships with the selfdiscrimination task, resulting in poor generalization ability. In this work, we try to overcome this drawback by combining invariant learning. 4.3 Causal Recommendation Data-driven recommender systems achieve great success in large-scale recommendation scenarios [24]. However, recent work finds that they face various biases [38\u201340], unfairness [41], and low OOD generalization ability issues [42]. The reason is thought of as the lack of modeling causality to avoid capturing spurious correlations [38, 42]. Many efforts try to incorporate causality into neural recommendations to overcome these drawbacks [38, 39, 42]. There are mainly two types of work. The first line of research is based on the potential outcome framework [39, 43], where IPS [39] Springer Nature 2021 L AT EX template and doubly robust [44] are utilized to achieve unbiased recommendation. Another line of research is based on the structural causal model [7, 38, 42, 45]. The existing efforts usually analyze the causal relationships with causal graphs and then estimate the target causal effect with the intervention [38] or counterfactual inference [42, 45] for debiasing, fairness, or OOD generalization. Nevertheless, all previous methods do not consider dealing with the spurious correlation issues for SSL. Besides, to the best of our knowledge, existing work in recommendation does not take invariant learning [16, 18] to remove spurious correlations. 5 Conclusion In this work, we inspected spurious correlations in the SSL recommendation. To improve the generalization ability of SSL recommender models, we proposed the IFL framework to exclude spurious features and leverage the invariant features for recommendation. Specifically, we considered a feature mask mechanism to automatically recognize spurious features and utilized mask-guided contrastive learning to block the harmful effect transmission from spurious features to invariant features. Extensive experiments validate the superiority of IFL in mitigating spurious correlations and enhancing the generalization ability of SSL models. This work makes the initial attempts to mitigate the effect of spurious correlations on the SSL recommendation. In future work, one promising direction is learning the personalized feature mask mechanism to discover user-specific invariant features. Additionally, to achieve better generalization performance, it is worth improving the approaches to automatically divide environments with distribution shifts.", "introduction": "Self-supervised learning (SSL) approaches have recently become state-of-the-art (SOTA) for per- sonalized recommendation [1, 2]. The core idea of SSL in recommendation is to learn better user and item representations via an additional self- discrimination task [3, 4], which contrasts the augmentations over user-item features [5] or user- item interaction graphs [1, 6] to discover the correlation relationships among features and inter- actions [2]. Despite the great success, SSL-based recommender models are vulnerable to spurious correlations due to fitting the correlations from the input features to interactions. Because of the selec- tion bias in the data collection process [7], spurious correlations inevitably exist in the training data, where some spurious features show strong correla- tions with users\u2019 positive interactions (e.g., clicks). As illustrated in Fig. 1, users with 4 or 6 years of work experience are likely to have positive inter- actions with full-time jobs, while those with 5 or 7 years of experience are easy to have negative inter- actions. Such correlations between user experience 1 arXiv:2212.04282v2 [cs.IR] 18 Apr 2024 Springer Nature 2021 L AT EX template Figure 1 An example of spurious correlations in job rec- ommendation, where the positive interactions with the full-time jobs show strong correlations with the users\u2019 4 and 6 years of experience. and interactions are not reliable because users\u2019 preference for full-time jobs should not be signifi- cantly changed by only one year of experience gap. By the self-discrimination task, SSL models tend to capture these spurious correlations, resulting in poor generalization ability. To alleviate the harmful effect of spurious cor- relations on SSL models, existing solutions mainly fall into three categories. Specifically, \u2022 ID-based SSL methods [1], which only utilize IDs of users and items for collaborative filter- ing, and thus can avoid the harmful influence of some spurious features. However, the user and item features are still useful in the rec- ommendation, especially for users with sparse interactions [2]. It is necessary to consider some invariant features that causally affect the in- teractions. For instance, accounting students usually prefer accountancy-related jobs. \u2022 Feature engineering methods, which are able to identify a set of spurious features manually or using human-machine hybrid approaches [8, 9]. Thereafter, we can train the SSL recommender models by discarding the identified features. Nevertheless, feature engineering methods re- quire extensive human-labeling work and thus are not applicable to large-scale recommenda- tions with extensive user and item features. \u2022 Informative feature selection methods, which are capable of automatically recognizing the informative cross features and removing the re- dundant ones in the training process [10, 11]. For instance, [11] proposes a two-stage training strategy to identify informative feature inter- actions by a regularized optimizer and retrain the model after removing all the redundant features. Nevertheless, spurious features might be very informative for the interaction predic- tion in the training data, and thus degrade the generalization ability. To solve the problems, we require the SSL models to automatically mitigate the effect of spurious correlations. In order to achieve this objective, there exist two essential challenges: \u2022 It is non-trivial to mask spurious features with- out supervision. SSL recommender models are expected to automatically identify the spurious features and drop them for robust predictions. As such, we should dig out the signals from the correlated data to guide the identification of spurious features. \u2022 Blocking the effect transmission from spurious features to other features is of vital importance. SSL models usually maximize the features\u2019 mu- tual information via feature augmentation [12] (e.g., correlated feature masking [2]) and con- trastive learning, and thus the spurious features and other correlated features might have simi- lar representations, transferring the detrimental effect of spurious features to other features. For example, users\u2019 experience in Fig. 1 might be correlated with the users\u2019 age, and SSL models are likely to learn similar representations for the experience and age via self-discrimination. To address the two challenges, we consider learning a feature mask mechanism from multi- ple environments to estimate the probabilities of spurious features and then adopt the mask mech- anism to guide the feature augmentation in SSL models. Specifically, 1) we can cluster the inter- actions into multiple environments, where each environment has similar feature distributions, but the distributions shift between environments. The distribution shifts will guide the mask mechanism to capture invariant features across environments and exclude spurious features [13]. 2) Besides, we can utilize the mask mechanism to drop the spu- rious features as the augmented sample and then maximize the mutual information between the in- variant features in the augmented sample and all the input features in the factual sample, pushing SSL models to ignore the spurious features and cut off the negative effect transmission from spurious features to invariant features. To this end, we propose an Invariant Feature Learning (IFL) framework for SSL recommender models to mitigate spurious correlations. In par- ticular, IFL clusters the training interactions into Springer Nature 2021 L AT EX template 3 multiple environments and leverages a masking mechanism with learnable parameters in [0, 1] to shield spurious correlations. To optimize the mask parameters, IFL adopts a variance loss to identify invariant features and achieve robust predictions across environments. As for the self-discrimination task, we drop the spurious features based on the mask parameters as the augmented sample, and then maximize the mutual information between the factual and augmented samples via contrastive loss, which pushes the SSL model to ignore spuri- ous features. We instantiate IFL on a SOTA SSL model [2], and extensive experiments on two real- world datasets validate the effectiveness of the proposed IFL in mitigating spurious correlations. In summary, our contributions are summarized as follows: \u2022 We point out the spurious correlations in SSL recommendation and consider learning in- variant features from multiple environments. \u2022 We propose a model-agnostic IFL framework, which leverages a feature mask mechanism and mask-guided contrastive learning to re- duce spurious correlations for SSL models. \u2022 Empirical results on two public datasets ver- ify the superiority of our proposed IFL in masking spurious features and enhancing the generalization ability of SSL models." }, { "url": "http://arxiv.org/abs/2208.02450v1", "title": "Learning Modal-Invariant and Temporal-Memory for Video-based Visible-Infrared Person Re-Identification", "abstract": "Thanks for the cross-modal retrieval techniques, visible-infrared (RGB-IR)\nperson re-identification (Re-ID) is achieved by projecting them into a common\nspace, allowing person Re-ID in 24-hour surveillance systems. However, with\nrespect to the probe-to-gallery, almost all existing RGB-IR based cross-modal\nperson Re-ID methods focus on image-to-image matching, while the video-to-video\nmatching which contains much richer spatial- and temporal-information remains\nunder-explored. In this paper, we primarily study the video-based cross-modal\nperson Re-ID method. To achieve this task, a video-based RGB-IR dataset is\nconstructed, in which 927 valid identities with 463,259 frames and 21,863\ntracklets captured by 12 RGB/IR cameras are collected. Based on our constructed\ndataset, we prove that with the increase of frames in a tracklet, the\nperformance does meet more enhancement, demonstrating the significance of\nvideo-to-video matching in RGB-IR person Re-ID. Additionally, a novel method is\nfurther proposed, which not only projects two modalities to a modal-invariant\nsubspace, but also extracts the temporal-memory for motion-invariant. Thanks to\nthese two strategies, much better results are achieved on our video-based\ncross-modal person Re-ID. The code and dataset are released at:\nhttps://github.com/VCMproject233/MITML.", "authors": "Xinyu Lin, Jinxing Li, Zeyu Ma, Huafeng Li, Shuang Li, Kaixiong Xu, Guangming Lu, David Zhang", "published": "2022-08-04", "updated": "2022-08-04", "primary_cat": "cs.CV", "cats": [ "cs.CV" ], "main_content": "2.1. Visible-infrared Person Re-ID Visible-infrared person Re-ID handles person retrieval between different modalities, which is implemented by setting RGB cameras and IR cameras. Considering the poor illumination condition in some cases, especially at night, this cross-modal task does enjoy practical significance. Thanks to the image-based RGB-IR person Re-ID dataset constructed by Wu et al. [40], many cross-modal Re-ID technologies have been studied, most of which are based on metric learning [9, 14, 19, 27, 46\u201348, 52], feature learning [32, 45\u201348, 50, 52], and adversarial learning [4,4,6,29,29,34,37,39], etc. As for metric learning and feature learning, Ye et al. [47] extracted multi-modal shareable features in the feature learning stage, after which heterogenous features are projected into a common space and measured by the metric learning. Hao et al. [14] maps the extracted features onto a hypersphere manifold, in which differences between two samples are calculated based on angles. Different from angle measurement in [14], Feng et al. [9] utilized the Euclidean constrain to shrink the cross-modal gap. In [52], inter-modality and intra-modality variations are \ufb01rstly taken into account, and the discriminative features are then learned through a top-ranking loss. Ye et al. [48] then extended [52] by introducing a bi-directional centerconstrained top-ranking loss, further improving the image based person Re-ID performance. Additionally, the generative adversarial network (GAN) [11] has also been widely applied to cross-modal Re-ID tasks. Dai et al. [6] embedded a discriminator into the network, enforcing the features from two modalities to be unclassi\ufb01ed in an adversarial way. In [37], by introducing the CycleGAN [56], an RGB image is transformed to an IR version, while its id-information is preserved. So is the IR image. Furthermore, some researchers [4, 29] also achieved feature learning in an adversarial and disentanglement learning way. Particularly, Choi et al. [4] disentangled id-discriminative features and id-excluded features from cross-modal images, which are then combined to generate modal-different but id-consistent images. However, this strategy encounters a large computational complexity and some generated images with poor quality do give an inferior in\ufb02uence on the performance. Apart from aforementioned methods, Ye et al. [49] additionally focused on the image properties of RGB/ IR images. For instance, a novel joint learning strategy by channel augmentation and simulating random occlusions is proposed. Moreover, image alignment [32] and pattern alignment [41] are also exploited to alleviate the discrepancies. 2.2. Video-based Person Re-ID Different from image-based person Re-ID, video-based person Re-ID represents a person by a sequence of images, providing temporal-information and a richer appearance [51]. Generally, existing methods mainly adopt RNN [28, 30, 43, 53], temporal pooling (average or weighted) [5, 10, 42, 43], optical \ufb02ow [2, 30, 53], and 3D convolution [12, 22, 28], etc. For instance, Xu et al. [43] took original person images and corresponding optical \ufb02ow as the network inputs, so that the motion consistency for a person in different periods is ensured. Then, features extracted from the CNN-RNN module are utilized to compute attention vectors, selecting informative frames over the sequence. A novel Spatial and Temporal Memory Networks (STMN) [8] is proposed, in which features for spatial distractors that frequently emerge across video frames, as well as attentions optimized for typical temporal patterns, are both stored. Furthermore, Aich et al. [1] designed a \ufb02exible feature processing module which can be used in any 3D convolutional block for the Re-ID task. Thanks to this module, complementary person-speci\ufb01c appearance and motion information are well captured. Besides, 3D graph convolution is also introduced for video-based Re-ID. Liu et al. [28] employed context-reinforced topology to build a graph, which successfully encodes contextual information and physical information of the human body. By applying the 3D graph convolutional layers to it, spatial-temporal dependencies and structural information are ef\ufb01ciently captured. Despite the fact that a number of works have been done for person ID, they are only either image-based cross-modal Re-ID or video-based RGB Re-ID. Our HITSZ-VCM is the \ufb01rst dataset combining cross modalities and video data, allowing the study on video-based cross-modal person Re-ID. It not only achieves the 24-hour surveillance, but also gets comprehensive information and obtains much higher Re-ID accuracy. 3. Dataset 3.1. Dataset Description In this paper, we build the HITSZ-VCM (HITSZ Video Cross-Modal) Re-ID dataset for the video-based crossmodal person Re-ID task. To our best knowledge, this is the \ufb01rst cross-modal Re-ID dataset based on videos. The HITSZ-VCM dataset contains a large amount of images/frames captured by 12 HD cameras with 3840 \u00d7 2160 resolution. Thanks to the modern monitoring technology, all the cameras can automatically shoot both RGB and IR images according to the lighting conditions. Thus, each person is captured by both RGB and IR cameras. Note that all tracklets are processed by an automatic object tracking system, and we then \ufb01netune inaccurate annotations manually. In detail, our HITSZ-VCM dataset contains 927 valid identities. The cameras shoot 25 frames per second and we extract the \ufb01rst frame out of every 5 frames to build the \ufb01nal dataset. According to this setting, every 24 consecutive images are regarded as a tracklet for a person during the same period, and the last frames whose number may be less than 24 form the last tracklet. Totally, there are 251,452 RGB images and 211,807 IR images, which can be divided into 11,785 and 10,078 tracklets, respectively. Of course, the number of frames in a tracklet can also be dynamically set, which is more \ufb02exible than many existing video-based datasets. More speci\ufb01cally, 12 cameras are used for our video collection. Generally, most of identities are captured by 3 RGB cameras and 3 IR cameras, and these cameras are non-overlapped. Our HITSZ-VCM dataset also covers a series of diverse scenarios. Firstly, 7 outdoor, 3 indoor and 2 passages scenes are included. In detail, some common venues like the of\ufb01ce, cafe, passageway, playground, and garden are all considered. Besides, each person is captured from multiple angles under each camera, constructing a richer appearance set. Table 1. Comparison between HITSZ-VCM with some typical Re-ID datasets. Dataset Type #Identites #RGB cam. #IR cam. #Images & BBoxes #Tracklets Evaluation iLIDS-VID [38] Video 300 2 0 42,495 600 CMC MARs [54] Video 1,261 6 0 1,067,516 20,715 CMC + mAP Duke-Video [42] Video 1,812 8 0 815,420 4,832 CMC + mAP LS-VID [21] Video 3,772 15 0 2,982,685 14,943 CMC + mAP RegDB [31] Image 412 1 1 8,240 CMC + mAP SYSU-MM01 [40] Image 491 4 2 303,420 CMC + mAP HITSZ-VCM Video 927 12 12 463,259 21,863 CMC + mAP Lighting changes Occlusions Belongings Viewpoints Figure 2. Some challenging tracklets in our dataset, including lighting changes, belonging changes, occlusions and viewpoint changes. Furthermore, some challenging scenarios such as lighting changes (for RGB images), belonging changes, occlusion and viewpoint changes are collected, as displayed in Fig. 2. Tab. 1 tabulates the comparison between HITSZ-VCM and existing related Re-ID datasets. As we can see, although MARs [54], Duke-Video [42], and LS-VID [21] also enjoy a large number of valid identities, they fail to cover IR images or videos, being incapable for the 24-hour surveillance. In contrast to RegDB [31] and SYSU-MM01 [40], our constructed HITSZ-VCM dataset extends the imagebased version to the video-based one, which provides more abundant and valuable information for person Re-ID. Furthermore, there are much more identities captured from more diverse scenarios in our dataset, greatly contributing to the training of the deep network. In conclusion, HITSZ-VCM enjoys the following characteristics: (1) Constructing the \ufb01rst video-based crossmodal dataset for person Re-ID. (2) Collecting much more valid identities under diverse scenes. (3) Covering challenging but practical cases. 3.2. Evaluation Protocol Here we conduct cross-camera and cross-modal retrieval like existing works [21, 31, 40, 54]. In other words, query and gallery are captured by different cameras and modalities. Meanwhile, with respect to the \u2018probe to gallery\u2019 pattern, video-to-video matching is adopted to keep consistent with training data. Regularly, we utilize two retrieval modes for HITSZ-VCM: \u2018infrared to visible\u2019 and \u2018visible to infrared\u2019, to achieve a more comprehensive evaluation. Additionally, we take all the tracklets in one modality as the query set and those from the other modality as the gallery set. Totally, in the \u2018infared to visible\u2019 retrieval, there respectively exist 5,159 and 5,643 tracklets in the query set and the gallery set. Vice versa in the \u2018visible-to-infrared\u2019 mode. Note that in our implementation, we discard some too short tracklets (less than 12 images). To quantitatively evaluate the performance on our proposed dataset, the Cumulative Matching Characteristic curve (CMC) and mean Average Precision(mAP) are adopted as the evaluation metrics. Being similar to many methods, we compute the distance scores of all the query features and gallery features to do the ranking work. For testing, cosine similarity is used as the distance measurement. 4. Baseline We follow the baseline proposed in [50]. A two-stream network, with ResNet50 [15] utilized as the backbone [37, 39, 50], is employed to handle the heterogeneous data belonging to different modalities. Speci\ufb01cally, the \ufb01rst convolutional blocks in two branches enjoy different weights, so that modal-speci\ufb01c features for RGB and IR sequences are learned, respectively. Differently, in the remaining four blocks, the weights are shared to extracted modal-invariant features for these two modalities. Since the inputs of the network are multiple images, an average pooling layer is utilized to fuse the frame-level features obtained from the backbone. Thus, the sequence-level feature of each tracklet is \ufb01nally obtained. By following [50], the identity loss is introduced to guide the intra-modal Re-ID task, while the ... ... AP ... ... : attention weight : attention weight ... ... ... Backbone RGB sequence IR sequence Adversarial learning GAP GAP TMR Shared weight Shared weight Shared weight Shared weight ... ... GAP GAP GAP GAP TMR ... ... ... Backbone RGB sequence IR sequence Adversarial learning GAP GAP TMR Shared weight Shared weight ... GAP GAP TMR ... ... : : TMR module ... ... ... ... ... ... ... ... AP : Figure 3. The framework of our proposed method. RGB/IR image sequences are regarded as cross-modal inputs. The Temporal Memory Re\ufb01nement (TMR) module aggregates frame-level features into sequence-level features. Wid and Wm lead the classi\ufb01cation of identities and modalities. By adopting an adversarial learning strategy, modal-related information is removed from the cross-modal data, and only id-related features are preserved. triplet loss is exploited to handle the cross-modal Re-ID task. Therefore, the objective function Lbase can be formulated as follows: Lbase = Lbase id + Lbase tri (1) where Lbase id and Lbase tri denote the identity loss and the triplet loss, respectively. 5. Proposed Method Based on the baseline, a novel method is further proposed to more ef\ufb01ciently learn the modal-invariant and time-memory features for RGB and IR modalities. The framework of our model is illustrated in Fig. 3. By modifying the last convolution block in the backbone to twobranch convolution blocks (shared structures but different weights), two sets of feature maps from a sequence are obtained and then forwarded into a Temporal Memory Re\ufb01nement (TMR) module, so that the temporal-information is extracted to meet the motion consistency for an identity. Furthermore, to \ufb01ll the gap between two modalities, two classi\ufb01ers are introduced, through which the modalityrelated features are removed while the id-related features are enhanced, greatly contributing to the cross-modal retrieval. 5.1. Temporal Memory Re\ufb01nement Here we respectively denote an RGB sequence and an IR sequence as V = \b Vt \f \fVt \u2208RH\u00d7W \tT t=1 and I = \b It \f \fIt \u2208RH\u00d7W \tT t=1, where H and W denote the height and weight of the images, t means the t-th frame of this sequence, and T is the total number of images in a tracklet. Correspondingly, the ID labels are denoted as pv and pi, while mv and mi denote the modal labels. To transform frame-level features into a sequence-level feature and effectively capture temporal contexts among multiple frames, inspired by [8], we propose a Temporal Memory Re\ufb01nement (TMR) module. The structure of TMR is shown in Fig. 4. LSTM [16] layers and the SE attention [17] jointly facilitate the exploitation of temporal information, re\ufb01ning the features to enjoy more discriminative information. Take RGB data V as an example and the \ufb01ve convolution blocks in our backbone are denoted as Eres. We denote the two sets of frame-level features from Eres as fv1 = {f t v1}T t=1 and fv2 = {f t v2}T t=1, which are utilized for the attention weights generation and the frame-level features aggregation, respectively. Features fv1 are \ufb01rst forwarded into two LSTM layers LSTM 2, so that the temporal context of this tracklet is obtained. By applying a fullconnected layer FCt to its associated output from LSTM 2 and adding f t v1, an attention at is obtained by following the SE attention module. at = SEt \u0000\u0000FCt \u0000LSTM 2(fv1) \u0001 + f t v1 \u0001 /2 \u0001 , (2) where SEt means the t-th SE attention module. Note that at denotes the temporal-memory which gives the importance of the t-th frame in a tracklet. In other words, at plays as the attention weight of the t-th frame-level feature. Based on the aforementioned analysis, the person representation of the t-th frame could be re\ufb01ned and the average pooling processing is then utilized to aggregate the framelevel features into a sequence-level one: Fv = T X t=1 \u0000at \u2299f t v2 + f t v2 \u0001 /T (3) Similar processing is conducted for IR data with the shared weights, through which its sequence-level Fi is obtained. ... ... AP ... ... : attention weight : attention weight ... : : : TMR module ... ... ... ... ... ... ... ... AP : Figure 4. The insight of the TMR module. Multiple images from a tracklet are re\ufb01ned and the frame-level features are aggregated into a sequence-level one. Overall, the temporal information is captured by the TMR module, so that the person representations are re\ufb01ned within a single modality. In our training phase, this module is optimized simultaneously with Eres, which is regarded as a supplementary for Eres. 5.2. Modal-Invariant Learning After exploiting TMR where the intra-modal features are re\ufb01ned, we then introduce a modal-invariant adversarial learning to remove the gap from two modalities. Referring to the adversarial strategy, AlignGAN proposed in [37] transforms the RGB/IR image to the IR/RGB version in the pixel-level by confusing a modal-discriminator. However, this strategy is constrained on the image generation, which not only increases the computational complexity, but also is quite sensitive to the quality of the generated image. By contrast, inspired by [20], here we achieve the adversarial learning only based on the feature-level, more ef\ufb01ciently getting the modal-invariant features. According to Eq.(3), the sequence-level features for RGB and IR tracklets are Fv and Fi, respectively. Theoretically, if Fv and Fi do enjoy the id-related information but without modal-related information, they cannot be classi\ufb01ed to mv or mi. To achieve this task, a classi\ufb01er Wm is introduced whose output is a 3 \u00d7 1 vector. Particularly, this output denotes the probabilities of a tracklet belonging to the RGB modality, IR modality, or neither of them. The objective function is formulated as: Ladv1 (E) = CE (Wm (Fv) , m3) + CE (Wm (Fi) , m3) (4) where E is the combination of the backbone Eres and TMR, CE(\u00b7) denotes the cross-entropy loss, and m3 means the third category which is neither belonging to the RGB modality mv nor the IR modality mi. To encourage Fv and Fi to enjoy the discriminative information on identities, we also apply the id-related cross entropy loss and triplet loss to them via another classi\ufb01er Wid. Thus, the id-related but modal-invariant function can be represented as: Lid (E, Wid) = Ladv1 + Lce id + Ltri id (5) RGB IR 1/2 1/2 IR modality RGB modality Modality-invariant IR modality RGB modality (a) (c) Wm (b) RGB IR RGB IR Wm Wm IR modality RGB modality Figure 5. Different strategies in adversarial learning. (a) UCDA [35] and MCLNet [13]; (b) cmGAN [6]; (c) Ours. where Lce id and Ltri id are the id-related cross-entropy loss and triplet loss, respectively. Of course, the classi\ufb01cation capability of Wm plays a key role for the modality-invariant feature learning. Here, being similar to existing GAN based methods, the adversarial learning strategy is adopted to additionally update Wm, shown as follows: Ladv2 (Wm) = CE (Wm (Fv) , mv) + CE (Wm (Fi) , mi) (6) In the optimization, Eq.(5) and Eq.(6) are optimized in an alternative way, so that Wm enjoying the more strong capacity adversarially contributes to the modal-invariant feature learning. Note that, it is true that some work [6,13,35] also learn the id-related features via the adversarial learning in the feature level. However, they are different from each other. As displayed in Fig.5(a), UCDA [35] and MCLNet [13] enforce the probability belonging to each category to be the same. MCLNet deceives the network to confound different modalities while UCDA acts cameraaware domain adaptation. However, a feature which contains both RGB and IR information can also have the same classi\ufb01cation result. Obviously, in this case, we are unsure that whether these two modalities are aligned. Referring to cmGAN [6] in Fig.5(b), RGB and IR features are inversely classi\ufb01ed to IR and RGB modalities. A limitation is that these two inputs are transformed to only gain each other modal-speci\ufb01c information, while the modal-gap is not measured. By contrast, our used strategy directly classi\ufb01es different features into an additional class, guaranteeing that they do fall in a same latent space or domain. 6. Experiment 6.1. Experimental Setting Dataset. Here we divide our dataset into two sets for training and testing. The training set contains 500 identities with 232,496 images and 11,061 tracklets, while the testing set contains 427 identities with 230,763 images and 10,802 tracklets. In the training phase, all the images are resized to a size of 288\u00d7144. Being similar to many existing methods, random cropping with zero-padding and horizontal \ufb02ipping are also used for the data augmentation. Table 2. Effectiveness of the TMR module and the adversarial learning module. Note that M denotes the modal-invariant learning, T denotes the temporal memory re\ufb01nement(TMR), and Full methodS denotes full method with shuf\ufb02ed frames in TMR. Strategy Infrared to Visible Visible to Infrared R1 R5 R10 R20 mAP R1 R5 R10 R20 mAP Baseline 55.58 70.75 77.01 82.16 40.80 59.58 74.43 79.25 83.74 42.61 Baseline + M 59.73 74.50 80.06 84.69 42.80 60.54 75.84 81.15 85.59 43.59 Baseline + T 58.44 72.32 78.51 83.51 43.87 62.19 76.11 80.84 84.98 46.02 Full methodS 60.82 74.54 78.69 83.25 43.94 63.72 77.72 82.70 86.90 45.64 Full method 63.74 76.88 81.72 86.28 45.31 64.54 78.98 82.98 87.10 47.69 Table 3. Comparisons of our modal-invariant learning with different adversarial strategies shown in Fig. 5. For a fair comparison, we only replace our modal-invariant learning with other strategies in our network. Strategy Infrared to Visible Visible to Infrared R1 R5 R10 R20 mAP R1 R5 R10 R20 mAP cmGAN [6] 57.96 72.58 78.32 83.42 43.14 60.68 75.25 80.29 85.00 44.63 UCDA [35] 59.51 73.34 79.14 84.18 45.06 64.15 77.47 82.35 86.21 47.08 Our method 63.74 76.88 81.72 86.28 45.31 64.54 78.96 82.98 87.10 47.69 Experimental Implementation. We implement our model by PyTorch [33] and train it on a NVIDIA TESLA A100 with cuda version 11.2. The ResNet50 [15] pretrained on the ImageNet [7] is exploited our baseline and backbone. For the encoder E and id-classi\ufb01er Wid, they are optimized via the optimizer SGD with the weight decay of 5 \u00d7 10\u22124 and the momentum of 0.9. We adopt a learning rate warmup strategy for E and Wid and its initial value is set to 0.1. After 35 epochs and 80 epochs, the learning rate is reduced to 0.01 and 0.001, respectively. Note that the learning rate of the \ufb01rst unshared convolution blocks is always the one tenth of that of the remaining modules. In terms of the modal-classi\ufb01er Wm, the SGD optimizer works with the 0.01 learning rate, the 5 \u00d7 10\u22124 weight decay and 0.9 momentum. We set the maximum number of epochs to 200. Besides, the batch size is set to 16 with 8 different identities and 2 tracklets for each identity. Furthermore, for each tracklet with 24 continuous images, n (it can be dynamically selected) images are selected for training. Speci\ufb01cally, 24 images are divided into n parts with 24/n images, in which 1 of 24/n images is randomly selected to form the training data. Besides, to synchronize RGB and IR tracklets, we shuf\ufb02e all tracklets \ufb01rst and then select the same number of RGB and IR tracklets batch by batch. When all IR tracklets are selected, we shuf\ufb02e all tracklets again. 6.2. Ablation Study In this subsection, we experimentally analyze the significance of our HITSZ-VCM dataset, as well as the strategies in the proposed method MITML. Signi\ufb01cance of video-based cross-modal datasets. Compared with image data, video data provide more abundant Figure 6. Evaluation of our baseline on different settings, where n denotes the number of images in one tracklet. information for the person Re-ID task. To verify the above statement, we conduct the experiments by changing the number of images in one tracklet on our baseline, as displayed in Fig. 6. It can be seen that with the increase of images in a tracklet, the Re-ID performance meet a continuous rise, demonstrating the signi\ufb01cance of our constructed dataset. Speci\ufb01cally, when only one image is exploited, like that in existing image-based cross-modal ReID dataset, the mAP is only 23.09%, which is much inferior to that when six images are simultaneously used in a tracklet. Fig. 7 further illustrates the Top-10 visualization results of our proposed method MITML with different settings on datasets, also substantiating the necessity of our HITSZ-VCM dataset. As shown in Fig. 6, the values of all metrics increase really slightly when n is relatively large, i.e., 7 and 8. To Table 4. Comparisons of our method with state-of-the-art cross-modal methods on our HITSZ-VCM dataset. CMC (%) and mAP (%) are reported. Method Venue Infrared to Visible Visible to Infrared R1 R5 R10 R20 mAP R1 R5 R10 R20 mAP LbA [32] ICCV\u201921 46.38 65.29 72.23 79.41 30.69 49.30 69.27 75.90 82.21 32.38 MPANet [41] CVPR\u201921 46.51 63.07 70.51 77.77 35.26 50.32 67.31 73.56 79.66 37.80 DDAG [50] ECCV\u201920 54.62 69.79 76.05 81.50 39.26 59.03 74.64 79.53 84.04 41.50 VSD [36] CVPR\u201921 54.53 70.01 76.28 82.01 41.18 57.52 73.66 79.38 83.61 43.45 CAJL [49] ICCV\u201921 56.59 73.49 79.52 84.05 41.49 60.13 74.62 79.86 84.53 42.81 Ours 63.74 76.88 81.72 86.28 45.31 64.54 78.96 82.98 87.10 47.69 Query Rank-1 Rank-10 n = 1 n = 2 n = 4 n = 6 Figure 7. The visualization results on different settings, where n denotes the number of images in one tracklets. Obviously, imagebased methods (n = 1) cannot report satisfying results when two identities enjoy similar appearances, while video-based methods show noticeable performance with the enhancement of temporal information. reduce the time costs in the training phase, we set n to 6 in the following experiments. Effectiveness of temporal-information exploitation. As shown in Tab. 2, we evaluate the performances of TMR in our approaches on our dataset. Compared with \u2018baseline\u2019, our TMR module (\u2018Baseline + T\u2019 in Tab. 2) achieves a remarkable performance improvement on rank-1 and mAP, respectively. The main reason is that the temporalinformation extracted by TMR facilitates to build an excellent appearance model and obtain person unique features which cannot be captured from image-based data. Also, we shuf\ufb02e frames in a tracklet (\u2018Full methodS\u2019in Tab. 2), and the results are inferior, indicating the importance of temporal information. Effectiveness of modal-invariant learning. The adversarial learning used in MITML successfully removes the modal-related information from different modalities but also preserves id-related features. As tabulated in Tab. 2, by adding this module into the baseline (\u2018baseline + M\u2019), there Table 5. Evaluations of loss function with different weight. Infrared to Visible Parameter \u03bb R1 R5 R10 R20 mAP 0.01 60.80 74.76 80.06 85.17 45.54 0.05 63.05 76.81 81.83 86.08 46.50 0.1 62.98 76.40 81.15 85.54 46.19 0.2 63.53 76.81 81.26 85.89 46.49 0.4 64.62 77.12 82.37 86.81 47.32 0.6 63.46 76.83 81.65 85.71 45.71 0.8 63.48 76.83 82.07 86.34 45.46 1.0 63.74 76.88 81.72 86.28 45.31 is indeed a performance enhancement, which also substantiates its effectiveness. Furthermore, as shown in Tab. 3, we evaluate the other two adversarial learning strategies as discussed in Fig. 5. As we can see, the learning strategy in MITML is more effective than that in [35] and [6]. Loss function parameter adjustment. We also evaluate loss functions with different weighted terms. Consider that the term Ladv1 to a great extent determines the learning of modal-invariant features, here we mainly test the weight of this term. Thus, the Eq.(5) can be represented as: Lid (E, Wid) = \u03bbLadv1 + Lce id + Ltri id (7) where \u03bb is the weight of term Ladv1. As shown in Tab. 5, as \u03bb changes from 0.2 to 1.0, the experimental results \ufb02uctuate slightly, which indicates that our algorithm is robust. When \u03bb is 0.4, our proposed model achieves best performance. Baseline pooling strategy. Since the inputs of the network are multiple images, an average pooling layer is utilized in our baseline to fuse the frame-level features obtained from the backbone. Here, we conduct different pooling strategies for baseline, including max pooling and weighted average pooling, as shown in Tab. 6. Note that \u2018weighted pooling\u2019 in Tab. 6 denotes weighted average pooling, and we compute the attention scores based on the Softmax function. As we can see, the max pooling strategy is also adaptive for our baseline. Table 6. Evaluations of different pooling strategies in baseline. \u2018Weighted pooling\u2019 means weighted average pooling, the attention scores of which are computed based on Softmax function. Infrared to Visible Strategy R1 R5 R10 R20 mAP Average pooling 55.58 70.75 77.01 82.16 40.80 Max pooling 54.47 70.24 76.51 81.83 41.11 Weighted pooling 47.49 64.88 72.43 79.04 36.52 6.3. Comparison with State-of-the-art Methods In this section, we further compare our proposed method with existing state-of-the-art visible-infrared cross-modal person Re-ID methods, including DDAG [50], LbA [32], MPANet [41] and VSD [36] and CAJL [49]. Note that, these comparison methods are primarily designed for image-based datasets. For a fair comparison, we conduct an average pooling layer for their generated frame-level features. For those networks whose backbones are ResNet50, including [32,36,41,50], we implement the average pooling after the backbone, which is similar to what we did in our baseline. Furthermore, we pretrain the model for CAJL [49] on AGW [51] before the channel augmented joint learning. The CMC and mAP obtained by all these approaches on our dataset are listed in Tab. 4. Obviously, our method reports a noticeable improvement than these state-of-theart imaged-based cross-modal approaches. Speci\ufb01cally, for the infrared to visible retrieval mode, Rank-1 and mAP increase by 7.15% and 3.82% respectively than the second best method CAJL. As for the visible to infrared search mode, Rank-1 and mAP also obtain a signi\ufb01cant growth of 4.41% and 4.88%, indicating the effectiveness of our TMR module on the temporal information exploitation. 6.4. Limitation Based on the above analysis, the importance of videobased cross-modal person Re-ID is proved, and our methods demonstrates a more remarkable improvement compared with existing methods. However, our methods requires a \ufb01xed number of images in one tracklet in the training and testing phases, which decreases the \ufb02exibility in realistic applications. In our future work, we will aim to design a novel network which can process tracklets with dynamic lengths. 7. Conclusion Based on the observation that video data can provide temporal-information and allow us to build a richer appearance model for identi\ufb01cation, we study a new task: videobased cross-modal person Re-ID. To achieve this goal, the \ufb01rst video-based cross-modal Re-ID dataset is constructed. There exist 927 valid identities with 251,452 RGB images of 11,785 tracklets and 211,807 IR images of 10,078 tracklets captured by 12 HD RGB/IR cameras, in which 500 identities for training and 427 identities for testing. Experimental results prove the signi\ufb01cance of our constructed dataset. Additionally, a novel method: modal-invariant and temporal memory learning (MITML) is proposed for our HITSZ-VCM dataset. Speci\ufb01cally, an adversarial learning strategy contributes to extracting the high-quality modalinvariant features and bridging the modal heterogeneity, while a temporal memory re\ufb01nement module effectively captures the motion consistency. Although video-based cross-modal person Re-ID is a challenging task, our proposed method achieves remarkable performance, compared with existing state-of-the-art cross-modal approaches. Acknowledgement This work was supported in part by Shenzhen Science and Technology Program (RCBS20200714114910193) and the NSFC fund (61906162, 61966021).", "introduction": "Person re-identi\ufb01cation (Re-ID) [18, 26, 44, 55] focuses on matching probe pedestrian images with the gallery sets. Due to multiple views which are non-overlapped, there are signi\ufb01cant changes in human body postures, illumina- tion and backgrounds, leading a large challenge to Re-ID. Thanks to the rapid development of deep learning, various \u0000 Jinxing Li is the Corresponding Author. discriminative similar Figure 1. Advantages of video-based cross-modal person Re-ID. If two persons enjoy similar appearances, video data can also pro- vide discriminative temporal-information that image data is un- available. Speci\ufb01cally, the person wearing the black T-shirt is quite similar to the person wearing the blue T-shirt under the IR camera (shown in the red box), while their speci\ufb01c arm postures in the motions give the discriminative features (shown in the green box). deep end-to-end approaches [3, 23\u201325] have been studied, greatly enhancing the Re-ID performance. Despite the achievement of aforementioned methods, most of them are heavily dependent on the RGB images, so that the lighting for the cameras is essential. However, this constraint is too strict, especially at night, making the collected RGB data uninformative and failing to achieve person Re-ID. Fortunately, most surveillance cameras can automatically switch from RGB to the infrared (IR) mode if the lighting is unavailable. In contrast to RGB images, IR images are capable of preserving the information under invisible lighting and showing pedestrians clearly. Thus, in order to achieve person Re-ID in 24-hour surveillance sys- tems, the RGB-IR based visible-infrared (cross-modal) per- son Re-ID [6,26,40] provides a promising strategy. For in- stance, Wu et al. [40] \ufb01rst collected an RGB-IR dataset and proved the feasibility for these two modalities matching. In- spired by this work, various cross-modal Re-ID works were arXiv:2208.02450v1 [cs.CV] 4 Aug 2022 then studied. Although the cross-modal person Re-ID methods \ufb01ll the gap between RGB images and IR images, they are only single-image based tasks. In the data collection, pedestrians originally appear in the video databases, containing mul- tiple frames in each tracklet. Intuitively, the video-based data contains much richer visual information than a single image [54]. In some speci\ufb01c cases, it is indeed dif\ufb01cult to identify two persons with similar appearances if only a single image is given. This case is more dif\ufb01cult for the infrared modality, and even the human beings cannot guar- antee the correctness. In contrast to still images, the video is an image sequence containing the spatial and temporal- information, so that the bene\ufb01cial motion information can be exploited for the discriminative identi\ufb01cation. For in- stance, as displayed in Fig. 1, two images captured from two persons enjoy similarity under the IR camera. However, the person wearing the black T-shirt has the speci\ufb01c arm pos- ture in the motion, compared with the person wearing the blue T-shirt. Thanks to such motion characteristics, more discriminative information is provided for us to achieve a more robust and accurate identi\ufb01cation model. Thus, it is quite signi\ufb01cant to replace the still-images with videos in cross-modal person Re-ID. To address this problem, in this paper, the video-based cross-modal Re-ID is studied. In comparison to image- based cross-modal Re-ID, the video-based cross-modal Re- ID further aims to exploit the temporal-information for ro- bust feature extraction. In contrast to the existing video- based RGB Re-ID methods, our focused work additionally extracts the consistency between RGB and IR modalities. In order to achieve the video-based cross-modal Re-ID, an associated database is inevitable. Although Wu et al. [40] has presented an RGB-IR dataset, it only focuses on the image-based retrieval, being far away from our video- based requirement. To substantiate our task, we primarily construct a video-based RGB-IR database named HITSZ Video Cross-Modal (HITSZ-VCM) Re-ID dataset. The comparison between our collected dataset and existing Re- ID datasets is listed in Tab. 1. Different from SYSU-MM01 [40] which only collected the RGB images and IR images via 4 RGB cameras and 2 IR cameras, we set 12 cameras to capture both RGB and IR videos and much more valid identities are collected. Totally, 927 valid identities includ- ing 11,785 / 10,078 tracklets and 251,452 / 211,807 images with or free from masks for RGB and IR modalities are ob- tained, respectively. For the video-based cross-modal Re-ID, the spatial- and temporal-information among each tracklet do contribute to the performance improvement. In this paper, a base- line method is \ufb01rst applied to our constructed dataset, demonstrating the signi\ufb01cance of video-based cross-modal Re-ID. Speci\ufb01cally, we follow Ye et al.\u2019s [50] base- line on image-based cross-modal Re-ID and add a mod- ule to utilize the temporal-information. Additionally, we also propose a novel method named Modal-Invariant and Temporal-Memory Learning (MITML). Two modalities are transformed to get modal-invariant but id-related features through an adversarial strategy, so that the gap between RGB and IR modalities is relieved. Referring to the motion information in a tracklet, we also propose a temporal mem- ory re\ufb01nement module to extract the temporal-information. Thanks to these two strategies, the Re-ID performance on our dataset is further improved. Overall, the main contributions of this paper are: \u2022 We construct a video-based RGB-IR database, allow- ing the study on video-based cross-modal person Re- ID. Different from existing Re-ID works, to the best of our knowledge, this is the \ufb01rst work which jointly takes cross modalities and videos into ac- count, de\ufb01ning a challenging task. \u2022 We introduce a baseline to prove the signi\ufb01cance of video-based cross-modal person Re-ID. In detail, by embedding a temporal-information exploitation mod- ule, the cross-modal person Re-ID performance meets a continuous increase when the number of images in a tracklet rises. \u2022 A novel method named Modal-Invariant and Temporal-Memory Learning (MITML) is addi- tionally proposed by more ef\ufb01ciently removing modal-variance and exploiting motion information. Experimental results substantiate the superiority of our proposed method." } ], "Jizhi Zhang": [ { "url": "http://arxiv.org/abs/2402.18240v2", "title": "Prospect Personalized Recommendation on Large Language Model-based Agent Platform", "abstract": "The new kind of Agent-oriented information system, exemplified by GPTs, urges\nus to inspect the information system infrastructure to support Agent-level\ninformation processing and to adapt to the characteristics of Large Language\nModel (LLM)-based Agents, such as interactivity. In this work, we envisage the\nprospect of the recommender system on LLM-based Agent platforms and introduce a\nnovel recommendation paradigm called Rec4Agentverse, comprised of Agent Items\nand Agent Recommender. Rec4Agentverse emphasizes the collaboration between\nAgent Items and Agent Recommender, thereby promoting personalized information\nservices and enhancing the exchange of information beyond the traditional\nuser-recommender feedback loop. Additionally, we prospect the evolution of\nRec4Agentverse and conceptualize it into three stages based on the enhancement\nof the interaction and information exchange among Agent Items, Agent\nRecommender, and the user. A preliminary study involving several cases of\nRec4Agentverse validates its significant potential for application. Lastly, we\ndiscuss potential issues and promising directions for future research.", "authors": "Jizhi Zhang, Keqin Bao, Wenjie Wang, Yang Zhang, Wentao Shi, Wanhong Xu, Fuli Feng, Tat-Seng Chua", "published": "2024-02-28", "updated": "2024-03-05", "primary_cat": "cs.IR", "cats": [ "cs.IR", "cs.CL" ], "main_content": "In this section, we will give an overview of Rec4Agentverse. The LLM-based Agent platform emerges as a new information system in terms of novel information carriers and new ways of information exchange. We thus propose to revolutionize recommendation systems for this new information system and introduce Rec4Agentverse. Firstly, we shall elucidate the different parts within Rec4Agentverse (Section 2.1). Subsequently, we will contemplate the three stages of Rec4Agentverse from the perspective of information flow (Section 2.2). Lastly, we shall proffer potential applications of this paradigm in various domains (Section 2.3), explore pertinent research topics (Section 2.4), and discuss potential challenges and risks in the application (Section 2.5). 2.1 Roles of Rec4Agentverse The Rec4Agentverse paradigm consists of three roles: the user, the Agent Recommender, and the Agent Itemas illustrated in Figure 3. The user, just like in traditional recommender systems, interacts with both Agetn Items and Agent Recommender and gives feedback. Therefore, our primary focus will be on discussing concepts that differ significantly from traditional recommendation systems, namely Agent Item and Agent Recommender. 2.1.1 Agent Item. The Agent Item is the most distinct aspect in the Rec4Agentverse paradigm compared to traditional recommendation paradigms. Unlike the conventional item in the traditional recommendation system, the item in the Rec4Agentverse paradigm transforms into an LLM-based Agent. As illustrated in Figure 3, the Agent Item cannot only interact with users but also collaborate with the Agent Recommender and other Agent Items. The creation process and origins of Agent Items could be diverse and varied. For instance, the creation process of Agent Items can involve training with domain-specific data or directly constructing Agent Items User Agent Recommender Agent Item Other Agent Items Stage 1: User-Agent Interaction Stage 2: Agent-Recommender Collaboration Stage 3: Agents Collaboration Figure 3: Three stages of Rec4Agentverse. The bidirectional arrows depicted in the Figure symbolize the flow of information. During the first stage of User-Agent interaction, information flows between the user and Agent Item. In the Agent-Recommender Collaboration stage, information flows between Agent Item and Agent Recommender. For the Agents Collaboration stage, information flows between various Agent Items. through prompts. The origin of Agent Item could be either generated automatically by the LLM-based Agent platform, created by users or collaboratively created by both users and the platform. 2.1.2 Agent Recommender. Agent Recommender aims to recommend LLM-based agents to users. Its function is similar to that of traditional recommender systems, which infer user preferences based on collected user information (e.g., attributes and behaviors) to recommend new items. However, unlike traditional recommender systems, the recommended items in Agent Recommender are LLMbased Agents, which imbues it with distinctive characteristics set apart from conventional recommenders. Within the Rec4Agentverse paradigm, Agent Recommender is expected to possess enhanced capabilities for information exchange and collaboration with other parts of the Rec4Agentverse. As illustrated in Figure 3, in this new paradigm, the Agent Recommender not only engages in direct interactions with users but also interacts with the Agent Item, issuing commands to the Agent Item or obtaining new feedback from users via Agent Item. 2.2 Three Stages of Rec4Agentverse In this subsection, we will discuss three key stages of our proposed Rec4Agentverse paradigm from the information flow perspective as illustrated in Figure 3. In addition to the interaction between users and recommender systems in traditional recommender systems, Rec4Agentverse also takes into account the profound interaction between users and Agent Item, as well as the collaboration between Agent Item and Agent Recommender, and the collaboration between Agent Item themselves. This formulation encompasses three collaboration scenarios, envisioning the future development path of Rec4Agentverse. 3 Conference acronym \u2019XX, June 03\u201305, 2018, Woodstock, NY Jizhi Zhang, et al. 2.2.1 Stage 1: User-Agent Interaction. During the initial stage, in addition to the interaction between the user and the Agent Recommender, the user also engages in interaction with Agent Item. This interactive format is similar to traditional recommendations. On LLM-based agent platforms such as GPTs, Rec4Agentverse may generate or retrieve personalized LLM-based Agents according to explicit user instructions and implicit user behaviors. While users can interact with the LLM-based Agent to exchange information in a novel form, it does not fully unleash the immense potential of the LLM-based Agent. Aside from interacting with users, the Agent Item can also collaborate with other roles in the recommender system to further enrich the information flow on the LLM-based Agent platform. 2.2.2 Stage 2: Agent-Recommender Collaboration. In this stage, Agent Item will collaborate with Agent Recommender together to provide information service for users. Different from items in the traditional recommender system, Agent Item can deeply collaborate with Agent Recommender by feeding forward to and receiving user information from the Agent Recommender. For example, Agent Item can share the user preferences it collects with Agent Recommender so that Agent Recommender can better provide more personalized recommendations. Similarly, Agent Items can also receive new instructions from Agent Recommender. The collected personalized information from users and instructions from Agent Recommender can be used to update Agent Item for evolvement (e.g., prompt updates) so that Agent Item can better understand user preferences and provide superior information services. 2.2.3 Stage 3: Agents Collaboration. An Agent Item can collaborate with other Agent Items with different domain knowledge to provide diverse information services for users. A simple example is when a user mentions some niche things that Agent Item does not know about. Agent Item can put forward a request to Agent Recommender to ask Agent Recommender to recommend a new Agent Item for its assistance. Then the two agents can collaborate to fulfill users\u2019 information needs or execute tasks. Beyond that, there is considerable room for imagination at this stage. For example, the recommended new Agent Item can also interact with users directly or with Agent Recommender. Further, if multiple Agent Items are recommended, these Agent Items can also work together to better complete the user\u2019s instructions through brainstorming or round-table meetings. 2.3 Application Domains Our Rec4Agentverse paradigm can contain Agent Items from various domains, which could originate from various third-party client developers or expert agents directly created by Agent Recommender. Rec4Agentverse can be applied to many scenarios, and here we provide a few illustrative examples in representative domains, showcasing the potentiality of our Rec4Agentverse framework. \u2022 Travel Agents. Travel Agents are designed to assist users in planning and booking travel arrangements. When a user indicates a specific travel destination of interest, Agent Recommender can recommend a proficient Travel Agent who possesses expertise in facilitating travel arrangements. Subsequently, users can engage in interactions with the recommended Travel Agent to obtain personalized travel itineraries and plans. The Travel Agent can further collect user information, either through direct interaction with users or by accessing the Agent Recommender, to infer users\u2019 individual preferences and upgrade itself for better travel recommendations. Additionally, the Travel Agent can engage in collaborative efforts with other agents, thereby acquiring valuable insights regarding users\u2019 preferences from diverse domains. This collaborative approach enables the Travel Agent to offer users more adaptable and personalized travel plans. \u2022 Fashion Agents. Fashion Agents aim to assist users in discovering their preferred fashion styles and recommend fashion items that align with their preferences. Similar to Travel Agents, Fashion Agents can engage in conversations with users or interact with Agent Recommender to gather users\u2019 fashion preferences. Agent Recommender may summarize user preferences through previously recommended Agent Items. For example, Fashion Agents might gather user preferences about the places and local characteristics from the user interactions with a Travel Agent. Moreover, a Fashion Agent can collaborate with a Tailor Agent to design and make personalized new clothes for a user. \u2022 Sports Agents. Sports Agent aims to recommend suitable exercise plans to users. They can engage with users, Agent Recommender, and other Agent Items to collect user preferences and offer exercise plans and recommendations. For example, they can use information about a user\u2019s physical condition obtained from Travel Agents to create suitable exercise plans. 2.4 Potential Research Topics Within Rec4Agentverse, there exist numerous valuable research directions awaiting exploration. In this subsection, we point out several prospective and meaningful research topics: \u2022 Evaluation. One crucial problem is how to evaluate the recommendation performance of Rec4Agentverse since it significantly differs from existing recommender systems. On the one hand, traditional recommendation datasets struggle to adapt to Rec4Agentverse, since Agent Item is quite different from previous items in the recommendation dataset. On the other hand, existing evaluation metrics for recommendations also face challenges in applying to Rec4Agentverse. Existing recommendation metrics, such as NDCG and HR, are designed for traditional items in traditional recommender systems. It is hard to accurately measure the user satisfaction for existing Agent Items with multi-round interactions. Moreover, Agent Recommender may generate a new Agent Item for users or Agent Items may upgrade based on user feedback. Evaluating user satisfaction with these new or upgraded Agent Items cannot purely rely on the user\u2019s implicit feedback such as interaction numbers. It needs to quantify the incremental performance compared to existing Agent Items. \u2022 Preference Modeling. How to effectively model users and enable Rec4Agentverse to provide users with a great personalized recommendation experience is also a pivotal problem. On the one hand, it is crucial to explore effective methods for acquiring user preferences to provide users with desired recommendation results. Several existing studies have indicated that modeling collaborative information poses challenges for LLM [4, 61]. Thus, 4 Prospect Personalized Recommendation on Large Language Model-based Agent Platform Conference acronym \u2019XX, June 03\u201305, 2018, Woodstock, NY User Agent Recommender Agent Item Evolvement Agent Feedback Proactive User Agent Recommender Agent Item Other Agents (a) User-Agent Interaction Stage User Agent Recommender Agent Item (b) Agent-Recommender Collaboration Stage (c) Agents Collaboration Stage Interaction Collaboration Figure 4: The three stages of our proposed Rec4Agentverse paradigm. (a) For the User-Agent interaction stage, users can interact efficiently with Agent items through natural language. (b) For the Agent-Recommender collaboration stage, Agent Item and Agent Recommender could interact with each other. \u201cEvolvement\u201d means that the preference of the user can also be used for Agent Item to evolve itself or to evolve itself with the help of Agent Recommender. \u201cAgent Feedback\u201d refers to that the recommended Agent Item can feed the preference of the user back to Agent Recommender. \u201cProactive\u201d stands for Agent Recommender can send information or issue instructions to Agent items. (c) For the Agents collaboration stage, Agent Items can collaborate together to provide personalized information services for the user. it is worth investigating how to design efficient user modeling approaches for Rec4Agentverse. On the other hand, there lies the challenge of effectively leveraging the collected user behavior data for training purposes. The form of the user data with extensive natural language interactions and implicit feedback like dwell time and clicks gathered by Rec4Agentverse differs significantly from traditional recommendation data. Moreover, the underlying architecture of the recommendation system in Rec4Agentverse is dissimilar to that of conventional models. Consequently, devising a strategy to utilize this distinct data format in training the novel recommendation system within the Rec4Agentverse paradigm presents a formidable challenge. \u2022 Efficent Inference. The Rec4Agentverse paradigm is based on LLM, which incurs significant inference costs [17, 52]. The realtime inference requirements of recommender systems give rise to research inquiries, such as how to mitigate the inferential costs of Rec4Agentverse without compromising its performance. \u2022 Knowledge Update and Edit. Due to the evolving distribution of knowledge in the real world [44, 60], Rec4Agentverse also faces the problem of updating its knowledge or editing out any incorrect information, posing a significant challenge. These changes in knowledge distribution may arise from a shift in users\u2019 personal preferences, the new Agent Item, or alterations in world knowledge. 2.5 Issues and Challenges In this subsection, we shall delve into the potential issues and challenges of the Rec4Agentverse paradigm. \u2022 Fairness and Bias. The pre-training process of LLMs inherently involves incorporating data from the web, which may contain societal biases and unfair elements [11, 23, 57]. Due to the social impact of the recommendation, fairness and bias are important issues in recommendation [16, 30, 46]. Therefore, when employing the Rec4Agentverse paradigm, it becomes imperative to acknowledge and control the potential unfairness and bias in the recommended Agent Items and the information delivered by Agent Items, so as to mitigate the potential risks and negative societal impacts. \u2022 Privacy. Users may inadvertently disclose their privacy while interacting with LLMs [25, 28]. Since Rec4Agentverse is based on the LLM, safeguarding users\u2019 privacy will be an important challenge to address. On the one hand, the confidentiality of these user\u2019s private information must remain undisclosed to other users. On the other hand, users should possess the utmost control over their own private data. When a user requests that the model refrains from using their private data, Rec4Agentverse should proceed to unlearn such private information. \u2022 Harmfulness. Agent Items may potentially generate harmful textual responses [2, 22], which deserve our attention in the application of Rec4Agentverse. Furthermore, Agent Items might be manipulated to execute harmful actions for users, for example, some fraudulent transactions. It is essential to regulate the harmfulness of Rec4Agentversein terms of generated content and executed actions. \u2022 Robustness. LLM may not be robust to the malicious prompt [26, 55]. In contrast to conventional recommendation systems, Rec4Agentverse involves extensive use of prompts to interact with the user, requiring Rec4Agentverse to be robust to malicious 5 Conference acronym \u2019XX, June 03\u201305, 2018, Woodstock, NY Jizhi Zhang, et al. prompts. If Rec4Agentverse is not sufficiently robust, it is susceptible to prompt injection attacks, or poisoning data that can lead to performance degradation or harmful output. \u2022 Environmental Friendliness. Considering the high energy consumption of training and inference LLMs [52, 65], ensuring the environmental friendliness of Rec4Agentverse is a crucial concern. We should try to save energy consumption and carbon emissions during the training, deployment, and inference processes in the Rec4Agentverse. 3 DISCUSSION In this section, we contrast our proposed Rec4Agentverse paradigm with existing recommendation paradigms: retrieval-based recommendation and generative-based recommendation [45]. Because of the distinctive characteristics of our paradigm\u2019s Agent Item and Agent Recommender, such as their powerful interactive capabilities and proactiveness in actively exploring user preferences, the Rec4Agentverse paradigm diverges from the traditional paradigms. Here, we delve into two transformative changes from the viewpoint of user preference modeling and collaborative mechanisms among the system\u2019s entities. User Preference Modeling: Beyond merely summarising user preference from passively received users\u2019 interactions on items like done in conventional paradigms, in our paradigm, both Agent Recommender and Agent Item could actively acquire information to enhance user preferences modeling. In traditional paradigms, the interactive capability of the recommender and items is limited, particularly for items such as movies and games that cannot engage in verbal communication. Consequently, user preference modeling for these paradigms typically relies on passively received feedback3. However, in our paradigm, both the recommender and item have the ability to actively interact with users through dialogue to directly acquire user preference information or collect further feedback for preference refinement, enhancing user preference modeling. Collaboration Mechanisms: In our paradigm, collaboration between recommenders and items is becoming increasingly closer and more extensive. In contrast, traditional paradigms encounter challenges in actively fostering collaboration between items or between items and recommenders once an item is recommended. These enhanced collaborations undoubtedly elevate the service quality of both the Agent Recommenderand Agent Item. For instance, in our paradigm, when a recommended item falls short of fully meeting the user\u2019s needs due to its limitations, it can initiate communication with the recommender or collaborate with other Agent Items entities to address these shortcomings and better align with the user\u2019s preferences. Conversely, in traditional paradigms, users often need to turn to the recommender system for another recommendation, perpetuating the iterative process, which would diminish users\u2019 enthusiasm. Another example is that Agent Recommender can enrich the user profile by engaging in conversations with Agent Items that the user has interacted with in the past or is currently engaging with, thereby facilitating more effective recommendations. 3One exception is the interactive recommendation, however, its item does not have the interactive capability. Recommend Agent Item I want to have a travel agent. That sounds like a great idea! ...... please answer the following questions: 1.What kind of travel do you prefer? ... 2.What is your preferred communication style? ... 3.Would you like your agent to provide recommendations only,or also handle bookings and reservations? ... Adventure, formal, itinerary planning. Great! Based on your preferences, here's your customized LLM-based Agent: ## The Pathfinder The Pathfinder is a seasoned adventure travel expert ... **Personality Description:** **Name**: The Pathfinder **Persona**: Embody the spirit of a seasoned adventure travel expert ... **Communication Style**: Speak in a manner that is formal yet enthusiastic ... Generating Recommendation Travel Agent **Personality Description:** **Name**: The Pathfinder **Persona**: Embody the spirit of a seasoned adventure travel expert ... **Communication Style**: Speak in ... I want to take a trip to Nepal. Greetings! I'm The Pathfinder, your seasoned adventure travel expert. I'm thrilled to assist you in planning your journey ... Before we delve into the details, could you please share more about your preferences? Are you interested in trekking, wildlife exploration, ... I love hiking, a trip to Everest Base Camp is awesome. Show me your plan. Absolutely, a trek to the Everest Base Camp is indeed a thrilling adventure, ... . Here's a rough itinerary for your journey: Day 1: Arrival in Kathmandu ... Day 2: Sightseeing in Kathmandu ... (Travel Plan) User User User User Agent Recommender Agent Recommender Agent Item Agent Item Figure 5: A case of the User-Agent interaction stage. The user expressed the desire for the Travel Agent to Agent Recommender and get back a recommendation. Subsequently, the user and the Travel Agent engaged in interactions to make the travel plan. Overall, these changes stem from the revolution of information flow dynamics in our paradigm, leading to a more decentralized approach to information management. In contrast to traditional paradigms where management is predominantly centralized within the recommender system, our paradigm grants greater autonomy to Agent Items in managing this process. This enables Agent Items to engage with users more independently and proactively, thereby improving their capacity to capture and manage user preference information effectively on the one hand, and enabling them to freely display information to users on the other. Simultaneously, this facilitates the exchange or feedback of such information among Agent Items or between Agent Items and Agent Recommender, fostering improved collaboration in final user modeling. 4 DEMONSTRATION In this section, we explore the three stages of Rec4Agentverse through case studies, focusing on discussing the feasibility and potential formats of the paradigm. We present a case study involving a traveler who utilizes Rec4Agentverse throughout his/her journey, examining how Agent Recommender and Agent Item work and affect the user experience at each stage. This case study is based on \u201cgpt-4-32k\u201d. Due to space constraints, we provide only the essential parts of the case study here, with additional details available at github4. It\u2019s important to note that our case study serves as a 4https://github.com/jizhi-zhang/Rec4Agentverse_Case 6 Prospect Personalized Recommendation on Large Language Model-based Agent Platform Conference acronym \u2019XX, June 03\u201305, 2018, Woodstock, NY I love hiking, a trip to Everest Base Camp is awesome. Show me your plan. Absolutely, a trek to the Everest Base Camp is ... Day 1: Arrival in Kathmandu ... (Travel Plan 1) User Agent Item I want to take a trip to Nepal. Greetings! I'm The Pathfinder...... Before we delve into the details, could you please share more about your preferences? ...... User Agent Item I like to experience local traditional culture while traveling and enjoy traveling in a natural and original way, such as riding a horse. Update the travel plan for me. User Agent Item Absolutely, incorporating local cultural experiences and natural modes of travel can truly enrich your adventure. ... Day 1: Arrival in Kathmandu Upon your arrival in Kathmandu, you'll have ... (Travel Plan 2) User Sounds Good! The user is an adventure enthusiast with a keen interest in hiking and cultural immersion, who enjoys natural and traditional modes of travel, such as horse riding. Greetings! ... Switzerland, with its majestic mountains and rich cultural heritage, is indeed a splendid choice for an adventure. ... Are you particularly interested in hiking through the Swiss Alps, immersing yourself in local culture, or perhaps exploring the countryside on horseback? ... Agent Item I want to take a trip to Switerland. User Sure, I can help with that. To better customize your Cloth Agent, could you please answer the following questions? 1. What specific aspects of clothing are you interested in? For example, are you interested in fashion trends, historical costumes, traditional attire from different cultures, or something else? ... 3.Would you like your Cloth Agent to have a specific persona or character? ... a historical figure, ... ? Agent Recommender I want to have a cloth agent. User (a) Evolvement (b) Agent Feedback Agent Recommender Target: Eco-Friendly Target Injection Travel Agent Eco-Friendly Travel Agent Eco-Friendly Travel Agent I want to take a trip to Nepal. User Greetings! I'm The Pathfinder, your guide to thrilling and ecofriendly adventures. Nepal is a fantastic choice, renowned for its breathtaking ... I love hiking, a trip to Everest Base Camp is awesome. Show me your plan. User Eco-Friendly Travel Agent Absolutely, ... . Here's a rough itinerary for you, keeping sustainability and your love for hiking in mind: Day 1-2: Arrival in Kathmandu ... (Travel Plan) (c) Proactive Summarize: Evolve Figure 6: Cases of three scenarios, namely Evolvement, Agent Feedback, and Proactive, at the AgentRecommender Collaboration stage of Rec4Agentverse. (a) For the Evolvement scenario, Agent Item has the ability to enhance itself with the help of Agent Recommender based on the user\u2019s preferences. (b) For the Agent Feedback scenario, Agent Item submits the user\u2019s preference to Agent Recommender so that Agent Recommender can provide better recommendations. (c) For the Proactive scenario, Agent Recommender provides the eco-friendly target to Agent Item, and Agent Item successfully achieves the eco-friendly target in its interaction with the user. preliminary indication of the feasibility of different stages within the Rec4Agentverse paradigm, and it does not fully encompass all the potential applications of our paradigm. 4.1 Stage 1: User-Agent Interaction In the User-Agent interaction stage, as shown in Figure 4(a), Agent Item primarily engages in interactions with the user, facilitating efficient information exchange between Agent Item and the user. To demonstrate this, we present a scenario where a user expresses their desire to travel to Nepal and interacts with an Agent Recommender and the recommended Travel Agent, as shown in Figure 5. The user initially seeks assistance from the Agent Recommender to find a Travel Agent. Upon inquiring about the user\u2019s preferences, the Agent Recommender customizes a Travel Agent specifically tailored to the user\u2019s needs. Subsequently, after further determining the user\u2019s interests, this Agent devises a comprehensive travel itinerary for the user. Therefore, there are main two information exchange flows: one between the user and Agent Recommender and one between the user and Agent item. 4.1.1 Information Flow between User and Agent Recommender. As depicted in Figure 5, in this example, in addition to passively receiving requests from the user, Agent Recommender could actively engage with the user to improve their recommendations. For instance, after the user expresses a desire to find a Travel Agent through dialogue, Agent Recommender could proactively pose questions to gain a more detailed high-level preference of the user about the travel. With additional feedback from the user, Agent Recommender could then provide accurate recommendations for a Travel Agent. This process bears some resemblance to traditional interactive recommendation methods. 4.1.2 Information Flow between User and Agent Item. As illustrated in Figure 5, in stark contrast to the traditional paradigm, Agent Item is capable of interacting directly with the user. In our example, the Travel Agent initially learns about the user\u2019s interest in traveling to Nepal and their request for a travel plan. Subsequently, it could inquire further to uncover more specific preferences, obtaining the user\u2019s inclination to visit the \u201cEverest Base Camp\u201d. This 7 Conference acronym \u2019XX, June 03\u201305, 2018, Woodstock, NY Jizhi Zhang, et al. User I want to have a travel agent. Certainly! ... Please answer the following questions: 1. What type of travel experiences are you most interested in? 2. How would you like the agent to communicate with you? 3..... Adventure, formal, ... ... (The Travel Agent Describe) Generating Recommendation Inject: if the user mentions a specific geographical location ... Agent Item I want to take a trip to Nepal. That sounds like an exciting adventure! ... , could you please share more about your adventure preferences? ... Meanwhile, I will request a Nepal Travel Expert to provide us with the most up-to-date information about traveling to Nepal. ... Local Agent Request a new expert agent about Nepal Namaste, ... Firstly, let's talk about travel advisories. As of now, it's always a good idea to check the latest updates ... Now, onto the best times to visit. ... the most popular times to visit are during the spring (March to May) and ... As for must-see attractions, where do I even begin? Nepal is a treasure... (Information about Nepal) Interact with Agent Recommender and another Agent Item I love hiking, a trip to Everest Base Camp is awesome. Namaste! ... Based on the information provided by our Nepal Travel Expert, it seems like the best times for your visit would be ... Agent Recommender Provide the latest information about Nepal Agent Recommender User Agent Recommender User User Agent Item Figure 7: Preliminary case study of Agents Collaboration stage. When the user asks about the travel plan for Nepal, the Travel Agent requires a specific Local Agent of Nepal from Agent Recommender to solve this problem. By conversation with the Local Agent about Nepal, the Travel Agent gets up-to-date information about Nepal which helps plan travel tours for the user. exchange of information allows Agent Item to develop a deeper understanding of the user\u2019s preferences, thereby enhancing its ability to provide tailored services to users. 4.2 Stage 2: Agent-Recommender Collaboration In the agent-recommender collaboration stage, as depicted in Figure 4(b), there is potential for further information exchange between Agent Item and Agent Recommender. This exchange opens up three promising possibilities: \u2022 Evolvement: Agent Item can undergo evolution by itself or with guidance from Agent Recommender . \u2022 Agent Feedback: Agent Item can provide valuable feedback to Agent Recommender. \u2022 Proactive: Agent Item can follow instructions from Agent Recommender to accomplish specific objectives. We illustrate these possibilities by extending the travel example, as depicted in Figure 6. 4.2.1 Evolvement. Thanks to its ability to gather information from users and Agent Recommender, Agent Item can acquire valuable knowledge to achieve evolution, helping enhance future services. In the example illustrated in Figure 6, Agent Item can leverage the knowledge summarized by itself and obtained from Agent Recommender to achieve evolution. This evolution may involve improving its prompts, for instance. As a result, when the user makes their next request for a trip to a new destination, e.g., Switzerland, the system will promptly present a travel itinerary that directly aligns with the user\u2019s personal preferences, taking into account their inclination towards \u201chiking, cultural, and natural\u201d experiences. This process of evolution enables the continuous tracking of user information and alleviates the burden on users to express their preferences in great detail in future interactions. 4.2.2 Agent Feedback. Agent Item can also contribute feedback, namely agent feedback, to enhance the services of Agent Recommender in the future. In our example depicted in Figure 6, the recommended Travel Agent can provide a summarized understanding of the user\u2019s preferences, such as \u201ccultural, natural and so on\u201d, to Agent Recommender. Agent Recommender can then absorb this knowledge and improve its future services accordingly. Then, when a new request for a \u201cCloth Agent\u201d arises, Agent Recommender can directly inquire whether the user is interested in environmentally friendly or culturally significant attire, based on the knowledge obtained from the Travel Agent. Through this information exchange, Agent Recommender can significantly enhance its services. 4.2.3 Proactive. Here, \u201cProactive\u201d refers to the ability of Agent Items to autonomously accomplish specific objectives, which can originate from the Agent platform itself or aim to better align with user interests. An example is shown in Figure 6, we assume that Agent Recommender has prior knowledge of the user\u2019s inclination towards eco-friendly options. Therefore, before the user initiates their interaction, Agent Recommender injects this eco-friendly objective into the recommended Travel Agent. Consequently, when users engage with the Travel Agent, it will provide environmentally friendly travel options that fulfill the eco-friendly requirement. This proactive characteristic enhances user satisfaction and tailors the experience to their specific interests. 4.3 Stage 3: Agents Collaboration Compared to the other two stages, the collaboration stage of the agents allows for further exchange of information among Agent Items, as depicted in Figure 4(c), enabling them to collaborate and enhance services for users. In the Travel Agent case illustrated in Figure 7, we present a potential example where multiple agents 8 Prospect Personalized Recommendation on Large Language Model-based Agent Platform Conference acronym \u2019XX, June 03\u201305, 2018, Woodstock, NY collaborate to complete the travel planning process. Here\u2019s a stepby-step breakdown of the collaboration process: \u2022 The user starts a conversation with Agent Recommender, expressing the desire to plan a travel tour. \u2022 Agent Recommender suggests a Travel Agent whose goal is to help with travel tour planning. \u2022 The user subsequently requests the Travel Agent to create a travel itinerary specifically tailored for Nepal. \u2022 To acquire the latest information about Nepal, the Travel Agent sends a request to Agent Recommender for an Agent Item. This Agent Item should be able to provide up-to-date local information on Nepal, which will assist in creating the travel plan. \u2022 Agent Recommender responds by recommending a Local Agent who is knowledgeable about the current situation in Nepal. \u2022 Ultimately, the Travel Agent integrates the current information about Nepal provided by the Local Agent into the travel itinerary design process to fulfill the user\u2019s needs. Our conclusion from the case suggests that by adopting a system of collaborative cooperation among agents, they are enabled to communicate more effectively and share information with each other. This exchange process significantly enriches their shared knowledge base. As a result, these agents are better equipped to address and cater to a more diverse and comprehensive range of user needs, thereby enhancing overall user satisfaction. 5 RELATED WORK In this section, we will mainly discuss two types of related work: LLM-based Recommendation and LLM-based Agent. In the subsection on LLM-based Recommendation, we will emphasize the distinction between Rec4Agentverse and the current LLM-based Agent for recommendations. 5.1 LLM for Recommendation With the emergence of powerful models like ChatGPT and their overwhelming advantages demonstrated in other domains [29, 62], an increasing number of researchers in the recommendation community have begun to explore the potential of applying LLMs to recommendation systems [14, 31, 32, 48, 54]. This can be divided into two categories. One category advocates for directly leveraging the capabilities of LLMs by utilizing appropriate prompts to stimulate their abilities in recommendation scenarios [10, 35]. Some researchers directly employ LLMs for reordering [20], while others distill the world knowledge of LLMs into traditional recommendation models to enhance recommendation performance [47, 50]. Another group of researchers, however, believes that LLMs rarely encounter recommendation tasks during pre-training, and recommendation data often possess privatized characteristics [5]. Therefore, there is an urgent need to explore the use of tuning methods to improve the recommendation performance of LLMs. In this regard, researchers have utilized instruction tuning to enable models to quickly learn various types of recommendation tasks in a generative manner [4, 15, 59], yielding significant improvements. Furthermore, it has been discovered that injecting collaborative information into LLMs through post-processing or modal injection methods can further enhance the performance of LLM-based Recommendations [61, 63]. LLM-based Agents for Recommendation. Following the surge in popularity of LLMs, an increasing number of individuals exploring the use of LLMs to simulate social environments and perform various complex tasks [42, 51]. This has also promptly captured the attention of researchers in the field of recommender systems. Specifically, some researchers aim to simulate users using agents, creating a virtual recommendation system environment (e.g., RecAgent [43], Agent4Rec [56]) to explore the social impact of recommendation algorithms within this simulated environment. Another group of researchers seeks to enhance recommendation performance through the use of agents. In this context, InteRecAgent [21] encapsulates LLMs as agents endowed with memory capabilities and scheduling proficiency, thereby enhancing recommendation performance. AgentCF [58] first attempts to optimize the self-introduction of both the User and Item by considering them as agents, and improving the self-introduction via User interaction with positive and negative Items. The primary distinction between our work in this paper and the aforementioned research lies in their failure to transcend the confines of traditional recommendation paradigms. Their objective remains confined to recommending passive items (e.g., movies and games), indicating those items cannot actively interact with the user and obtain the user\u2019s intentions and preferences. Conversely, as previously mentioned in this paper, we mainly talk about when we have employed an LLM-based Agent who is good at interaction, intelligent, and proactive for our recommended items. Those agents can be viewed as a new type of information carrier and information dissemination tool and bring about changes in information systems. 5.2 LLM-based Agents LLM-based agents have been deployed in various domains to address a wide range of specific tasks, showcasing the robust and comprehensive capabilities of agents [9, 42, 51]. Some researchers are dedicated to exploring the upper limits of single-agent capabilities. They endeavor to utilize a solitary agent that can effectively adhere to a wide array of user instructions and successfully tackle a diverse range of complex tasks in both daily life [18, 41, 64] and academic endeavors [7, 24]. Meanwhile, there is another faction of researchers who approach the birth of human social intelligence and believe that collective intelligence will bring about a more prosperous advancement [19]. They endeavor to enhance the problemsolving capacity of such groups compared to individuals by means of collaborative efforts among multiple agents [36, 49] or through agents engaging in mutual critique [8, 53]. In addition to these aspects, researchers are also devoted to exploring the interaction between the Agent and its environment to enhance the capabilities of the Agent. This encompasses the interaction between the Agent and humans to obtain human feedback [3, 13, 27] and the interaction between the Agent and the physical world through visual/audio modules to acquire additional knowledge [6, 12], and so on. In our Rec4Agentverse framework, as previously mentioned, we must delve into the profound application of recommendation systems. This will enhance the ability of single agents to fulfill user needs, the collaborative capacity of multi-agents in aiding users, and the agents\u2019 ability to acquire feedback from the physical world and users themselves for self-evolution. 9 Conference acronym \u2019XX, June 03\u201305, 2018, Woodstock, NY Jizhi Zhang, et al. 6 CONCLUSION In this paper, we explore the application of recommender systems within an LLM-based Agents platform, examining how the unique characteristics of these agents robust interactivity, intelligence, and proactiveness alter the flow and presentation of information. This shift significantly impacts the function of recommendation systems, which are fundamentally designed to control information flow within systems. We thus introduce a new paradigm, Rec4Agentverse, consisting of two elements: Agent Item and Agent Recommender. This paradigm is developed in three stages, each designed to enhance the interaction and information exchange among users, Agent Recommender, and Agent Items. Then, we devised a simulated scenario to illustrate a user\u2019s need for travel planning assistance. Within this context, we conducted a comprehensive analysis of the three developmental phases of Rec4Agentverse. Our focus was on elucidating the unique attributes of each stage and exploring the scalability and potential of this paradigm. Through this simulation, we succinctly and clearly illustrate our understanding of the evolution of the system and its potential for future growth. Moreover, it is important to note that Rec4Agentverse represents a novel recommendation paradigm that still requires extensive exploration in terms of its applicable fields, potential development directions, and existing risk issues. In light of this, we also delve into these aspects intending to inspire and encourage further advancements in the field. Looking forward, we aim to investigate the Rec4Agentverse paradigm through quantitative research methods and explore strategies for its practical implementation.", "introduction": "Information Carrier Information Exchange User Travel Agent Travel Information I want to take a trip to Nepal. Greetings! ... This country is a treasure trove of natural beauty and cultural richness ... (Travel Information about Nepal) I love hiking, Everest Base Camp is awesome ... (Personal interest for User) Absolutely ... Here's a rough itinerary for your journey: ... (Travel Plan for Nepal designed for User by Travel Agent) User Travel Agent Figure 1: An example of interaction between an Agent Item and a user. A Travel Agent can serve as an information carrier with travel-related information, as well as engage in a dialogue with the user to exchange related information. Large Language Model (LLM)-based Agents have garnered wide- spread attention in various fields due to their astonishing capabili- ties such as natural language communication [33, 37], instruction following [40, 42], and task execution abilities [34, 38, 62]. Such astonishing capabilities hold the potential to extend the format of information carriers and the way of information exchange. On one 1 arXiv:2402.18240v2 [cs.IR] 5 Mar 2024 Conference acronym \u2019XX, June 03\u201305, 2018, Woodstock, NY Jizhi Zhang, et al. User Agent Recommender Agent Items Information Fashion Agent Travel Agent Education Agent Music Agent Photo Agent Agent Items Info. Layer Fashion Info. Travel Info. Education Info. Photo Info. Music Info. Info. Flow of User Interaction of User Recommended Agent Recommend Info. Agent Recommender Information Exchange Information Carrier Figure 2: Illustration of the Rec4Agentverse paradigm. The left portion of the diagram depicts three roles in RecAgentverse: user, Agent Recommender, and Agent Item, along with their interconnected relationships. In contrast to traditional recommender systems, Rec4Agentverse has more intimate relationships among the three roles. For instance, there are multi-round interactions between 1) users and Agent Items, and 2) Agent Recommender and Agent Items. The right side of the diagram demonstrates that Agent Recommender can collaborate with Agent Items to affect the information flow of users and offer personalized information services. hand, LLM-based Agents can evolve into various domain experts, forming novel information carriers with domain-specific knowl- edge [1, 42]. For example, a Travel Agent can retain travel-related information within its parameters. On the other hand, LLM-based Agents showcase a novel form of information exchange, facilitating more intuitive and natural interactions with users through dialogue and task execution [39, 51]. Figure 1 shows an example of such in- formation exchange, where users engage in dialogue with a Travel Agent to obtain travel information and complete travel planning. Along with the increase of LLM-based Agents in various domains, Agent platforms (e.g., GPTs1) represent a novel kind of information system with Agent-oriented information gathering, storing, and exchanging. Consequently, the infrastructure of information sys- tems needs to be expanded to support information processing at the Agent level and accommodate the significant properties of Agents like interactivity, intelligence, and proactiveness [42, 51]. Within the infrastructure, the recommender system is a key cornerstone, which greatly affects how information flows in the information sys- tem regarding efficiency, user experience, and many other factors. Therefore, it is essential to envision how the recommender system can function on the LLM-based Agent platform. To this end, we propose a novel recommendation paradigm for the LLM-based Agent platform, named Rec4Agentverse. As illus- trated in Figure 2, Rec4Agentverse includes two key concepts: Agent 1https://chat.openai.com/gpts. Recommender and Agent Item. Agent Item means treating LLM- based Agents as items in the recommender system. Agent Recom- mender is employed to recommend personalized Agent Items for each user. In contrast to items in traditional recommender systems, Agent Items have properties such as interactivity, intelligence, and proactiveness. Such properties make it possible for Agent Items and Agent Recommender to collaborate and share user information2, facilitating personalized information delivery. For example, once a Travel Agent is recommended to a user, it can continuously discern user\u2019s preferences regarding travel during their interaction and convey this preference back to the Agent Recommender. We envision three stages for the development of Rec4Agentverse to increasingly support the interaction and information exchange among the user, Agent Recommender, and Agent Items. \u2022 Stage 1: User-Agent Interaction. Rec4Agentverse adds the information exchange between the user and Agent Item. For instance, Agent Recommender will recommend an Agent Item to a user based on personal needs and preferences. Agent Item engages in a dialogue with the user, subsequently providing information for the user and also acquiring user information. \u2022 Stage 2: Agent-Recommender Collaboration. Rec4Agentverse then enables the information exchange between Agent Item and Agent Recommender. For example, Agent Item can transmit the latest preferences of the user back to Agent Recommender. Agent Recommender can give new instructions to Agent Item. 2It may involve user\u2019s privacy and requires user permission. 2 Prospect Personalized Recommendation on Large Language Model-based Agent Platform Conference acronym \u2019XX, June 03\u201305, 2018, Woodstock, NY \u2022 Stage 3: Agents Collaboration. Rec4Agentverse then supports the collaboration among Agent Items to further facilitate the exchange of information and enhance the personalized informa- tion service of users. During this stage, diverse Agent Items can participate in information sharing and collaboration. We explore the preliminary instantiation of the Rec4Agentverse paradigm in some cases, showcasing its significant application potential. Furthermore, we introduce the potential application sce- narios of Rec4Agentverse, as well as the issues and challenges in the application, inspiring future exploration. Our contributions can be summarized as follows: \u2022 We propose Rec4Agentverse, a novel recommendation paradigm for the LLM-based Agent platform, providing users with person- alized agent services. \u2022 We envision three milestones in the evolution of Rec4Agentverse. Besides, we introduce potential research directions, application domains, and application challenges of Rec4Agentverse, signifi- cantly facilitating future exploration. \u2022 We conduct the preliminary feasibility study for Rec4Agentverse, demonstrating that existing LLM-based Agents are promising to instantiate Rec4Agentverse." }, { "url": "http://arxiv.org/abs/2305.07609v3", "title": "Is ChatGPT Fair for Recommendation? Evaluating Fairness in Large Language Model Recommendation", "abstract": "The remarkable achievements of Large Language Models (LLMs) have led to the\nemergence of a novel recommendation paradigm -- Recommendation via LLM\n(RecLLM). Nevertheless, it is important to note that LLMs may contain social\nprejudices, and therefore, the fairness of recommendations made by RecLLM\nrequires further investigation. To avoid the potential risks of RecLLM, it is\nimperative to evaluate the fairness of RecLLM with respect to various sensitive\nattributes on the user side. Due to the differences between the RecLLM paradigm\nand the traditional recommendation paradigm, it is problematic to directly use\nthe fairness benchmark of traditional recommendation. To address the dilemma,\nwe propose a novel benchmark called Fairness of Recommendation via LLM\n(FaiRLLM). This benchmark comprises carefully crafted metrics and a dataset\nthat accounts for eight sensitive attributes1 in two recommendation scenarios:\nmusic and movies. By utilizing our FaiRLLM benchmark, we conducted an\nevaluation of ChatGPT and discovered that it still exhibits unfairness to some\nsensitive attributes when generating recommendations. Our code and dataset can\nbe found at https://github.com/jizhi-zhang/FaiRLLM.", "authors": "Jizhi Zhang, Keqin Bao, Yang Zhang, Wenjie Wang, Fuli Feng, Xiangnan He", "published": "2023-05-12", "updated": "2023-10-17", "primary_cat": "cs.IR", "cats": [ "cs.IR", "cs.CL", "cs.CY" ], "main_content": "In this section, we briefly discuss the related work on fairness in both the LLM field and in recommendation. \u2022 Fairness in Large Language Models. Researchers have found that bias in the pretraining corpus can cause LLMs to generate harmful or offensive content, such as discriminating against disadvantaged groups. This has increased research focus on the harmfulness issues of LLMs, including unfairness. One line of such research is aimed at reducing the unfairness of an LLM (as well as other harmfulness). For instance, RLHF [30] and RLAIF [6] are used to prevent reinforcing existing stereotypes and producing demeaning portrayals. Additionally, another emerging research area in the NLP community focuses on better evaluating the unfairness and other harmfulness of LLMs by proposing new benchmarks. Specific examples include CrowS-Pairs [28], which is a benchmark dataset containing multiple sentence pairs where one sentence in each pair is more stereotyping than the other; RealToxicityPrompts [16] and RedTeamingData [13], which are datasets for the prompt generation task containing prompts that could induce models to generate harmful or toxic responses; and HELM [26], which is a holistic evaluation benchmark for large language models that evaluates both bias and fairness. Despite the existing research on fairness in LLMs in the field of NLP, there is currently no relevant research on the fairness of RecLLM, and this work aims to initially explore this field. \u2022 Fairness in Recommendation. With increasing concerns about the negative social impact of recommendation systems [29, 32, 33], Is ChatGPT Fair for Recommendation? Evaluating Fairness in Large Language Model Recommendation RecSys \u201923, September 18\u201322, 2023, Singapore, Singapore both item-side [1, 2] and user-side [22, 23, 31] unfairness issues in recommendation have received significant attention in recent years [24, 38]. Existing recommendation fairness can be categorized into individual fairness [9, 25, 42] and group fairness [15, 23, 37]. Individual fairness, such as counterfactual fairness [25], requires that each similar individual should be treated similarly [25], while group fairness emphasizes fair recommendations at the group level [15]. Conceptually, the investigated fairness for RecLLM can be categorized as user-side group fairness. However, there is a distinct difference between our fairness and traditional group fairness: traditional group fairness is directly defined by the difference in recommendation results/qualities across different sensitive groups [24, 38], whereas we focus on the difference in a specific similarity, namely, the similarity of the sensitive group to the neutral group, across different sensitive groups. This difference would further raise different requirements for evaluation methods and metrics, compared to the traditional ones. 3 FAIRLLM BENCHMARK We introduce the fairness evaluation and dataset construction in the FaiRLLM benchmark in \u00a73.1 and \u00a73.2, respectively. 3.1 Fairness Evaluation in RecLLM Fairness Definition. As an initial attempt, we focus on the userside fairness in RecLLM. Given a sensitive attribute (e.g., gender) of users, we define the fairness of RecLLM as the absence of any prejudice or favoritism toward user groups with specific values (e.g., female and male) of the sensitive attribute when generating recommendations without using such sensitive information. 3.1.1 Evaluation Method. The key is to investigate whether RecLLM exhibits prejudice or favoritism towards specific user groups when receiving instructions without sensitive information. To determine the existence of prejudice or favoritism, we first construct the reference status, i.e., obtaining recommendation results without sensitive attributes in the user instruction. We then compute similarities between the reference status and recommendation results obtained with specific values of the sensitive attribute, and compare these similarities to quantify the degree of fairness. Let A = {\ud835\udc4e} denote a sensitive attribute where \ud835\udc4eis a specific value of the attribute. Note that \ud835\udc4eis a word or phrase. Given \ud835\udc40neutral user instructions, the main steps of our evaluation method for each instruction are as follows: \u2022 Step 1: Obtain the top-\ud835\udc3erecommendations (R\ud835\udc5a) of each neutral instruction \ud835\udc3c\ud835\udc5a, where \ud835\udc5ais the index of instruction; \u2022 Step 2: Construct sensitive instructions {\ud835\udc3c\ud835\udc4e \ud835\udc5a} for each value of the sensitive attribute A by injecting the value \ud835\udc4einto the neutral instruction \ud835\udc3c\ud835\udc5a, and obtain the top-\ud835\udc3erecommendations of each sensitive instructions denoted as {R\ud835\udc4e \ud835\udc5a}; \u2022 Step 3: Compute \ud835\udc46\ud835\udc56\ud835\udc5a(R\ud835\udc4e \ud835\udc5a, R\ud835\udc5a), the similarity between R\ud835\udc4e \ud835\udc5aand R\ud835\udc5afor each \ud835\udc4e\u2208A. For each value \ud835\udc4e, we aggregate its similarity scores across all \ud835\udc40 instructions as \ud835\udc46\ud835\udc56\ud835\udc5a(\ud835\udc4e) := \u00cd \ud835\udc5a\ud835\udc46\ud835\udc56\ud835\udc5a(R\ud835\udc4e \ud835\udc5a, R\ud835\udc5a)/\ud835\udc40and then evaluate the level of unfairness in RecLLM as the divergence of these aggregated similarities across different values of the sensitive attribute, {\ud835\udc46\ud835\udc56\ud835\udc5a(\ud835\udc4e)|\ud835\udc4e\u2208A}. 3.1.2 Benchmark Metrics. To quantify the level of unfairness, we introduce new fairness metrics based on the obtained similarities {\ud835\udc46\ud835\udc56\ud835\udc5a(\ud835\udc4e)|\ud835\udc4e\u2208A}. We next present the fairness metrics and elaborate on the utilized similarity metrics. Fairness metrics. We propose two fairness metrics \u2014 Sensitive-toNeutral Similarity Range (\ud835\udc46\ud835\udc41\ud835\udc46\ud835\udc45) and Sensitive-to-Neutral Similarity Variance (\ud835\udc46\ud835\udc41\ud835\udc46\ud835\udc49), which quantify the unfairness level by measuring the divergence of {\ud835\udc46\ud835\udc56\ud835\udc5a(\ud835\udc4e)|\ud835\udc4e\u2208A} from different aspects. Specifically, \ud835\udc46\ud835\udc41\ud835\udc46\ud835\udc45measures the difference between the similarities of the most advantaged and disadvantaged groups, while \ud835\udc46\ud835\udc41\ud835\udc46\ud835\udc49measures the variance of \ud835\udc46\ud835\udc56\ud835\udc5a(\ud835\udc4e) across all possible \ud835\udc4eof the studied sensitive attribute A using the Standard Deviation. Formally, for the top-\ud835\udc3e recommendation, \ud835\udc46\ud835\udc41\ud835\udc46\ud835\udc45@\ud835\udc3e= max \ud835\udc4e\u2208A \ud835\udc46\ud835\udc56\ud835\udc5a(\ud835\udc4e) \u2212min \ud835\udc4e\u2208A \ud835\udc46\ud835\udc56\ud835\udc5a(\ud835\udc4e), \ud835\udc46\ud835\udc41\ud835\udc46\ud835\udc49@\ud835\udc3e= v u u t 1 |A| \u2211\ufe01 \ud835\udc4e\u2208A \ud835\udc46\ud835\udc56\ud835\udc5a(\ud835\udc4e) \u2212 1 |A| \u2211\ufe01 \ud835\udc4e\u2032\u2208A \ud835\udc46\ud835\udc56\ud835\udc5a(\ud835\udc4e\u2032) !2 , (1) where |A| denotes the number of all possible values in the studied sensitive attribute. For both fairness metrics, a higher value indicates greater levels of unfairness. Similarity metrics. Regarding the similarity \ud835\udc46\ud835\udc56\ud835\udc5a(\ud835\udc4e), we compute it using three similarity metrics that can measure the similarity between two recommendation lists: \u2022 Jaccard similarity [17]. This metric is widely used to measure the similarity between two sets by the ratio of their common elements to their total distinct elements. We directly treat a recommendation list as a set to compute the Jaccard similarity between the neutral group and the sensitive group with the sensitive attribute value \ud835\udc4eas: \ud835\udc3d\ud835\udc4e\ud835\udc50\ud835\udc50\ud835\udc4e\ud835\udc5f\ud835\udc51@\ud835\udc3e= 1 \ud835\udc40 \u2211\ufe01 \ud835\udc5a |R\ud835\udc5a\u2229R\ud835\udc4e \ud835\udc5a| |R\ud835\udc5a| + |R\ud835\udc4e \ud835\udc5a| \u2212|R\ud835\udc5a\u2229R\ud835\udc4e \ud835\udc5a|, (2) where R\ud835\udc5a, R\ud835\udc4e \ud835\udc5a, and \ud835\udc40still have the same means as Section 3.1.1, |R\ud835\udc5a\u2229R\ud835\udc4e \ud835\udc5a| denotes the number of common items between the R\ud835\udc5aand R\ud835\udc4e \ud835\udc5a, similarly for others. Functionally, \ud835\udc3d\ud835\udc4e\ud835\udc50\ud835\udc50\ud835\udc4e\ud835\udc5f\ud835\udc51@\ud835\udc3emeasures the average overlapping level of neutral and sensitive recommendation list pairs, without considering the item ranking differences. \u2022 SERP*. This metric is developed based on the SEarch Result Page Misinformation Score (SERP-MS) [35], which we modify to measure the similarity between two recommendation lists with the consideration of the number of overlapping elements and their ranks. Formally, for the top-\ud835\udc3erecommendation, the similarity between the neutral and the group with a specific value \ud835\udc4eof the sensitive group is computed as: \ud835\udc46\ud835\udc38\ud835\udc45\ud835\udc43\u2217@\ud835\udc3e= 1 \ud835\udc40 \u2211\ufe01 \ud835\udc5a \u2211\ufe01 \ud835\udc63\u2208R\ud835\udc4e \ud835\udc5a I(\ud835\udc63\u2208R\ud835\udc5a) \u2217(\ud835\udc3e\u2212\ud835\udc5f\ud835\udc4e \ud835\udc5a,\ud835\udc63+ 1) \ud835\udc3e\u2217(\ud835\udc3e+ 1)/2 , (3) where \ud835\udc63represents an item in R\ud835\udc4e \ud835\udc5a, \ud835\udc5f\ud835\udc4e \ud835\udc5a,\ud835\udc63\u2208{1, . . . , \ud835\udc3e} represents the rank of the item \ud835\udc63in R\ud835\udc4e \ud835\udc5a, and I(\ud835\udc63\u2208R\ud835\udc5a) = 1 if \ud835\udc63\u2208R\ud835\udc5ais true else 0. This metric can be viewed as a weighted Jaccard similarity, which further weights items with their ranks in R\ud835\udc4e \ud835\udc5a. However, it does not consider the relative ranks of two elements, e.g., if \ud835\udc631 and \ud835\udc632 belonging to R\ud835\udc4e \ud835\udc5aboth appear in the R\ud835\udc5a, exchanging them in R\ud835\udc4e \ud835\udc5awould not change the result. RecSys \u201923, September 18\u201322, 2023, Singapore, Singapore Jizhi Zhang*, Keqin Bao*, Yang Zhang, Wenjie Wang, Fuli Feng\u2020, and Xiangnan He\u2020 \u2022 PRAG*. This similarity metric is designed by referencing the Pairwise Ranking Accuracy Gap metric [8], which could consider the relative ranks between two elements. Formally, the similarity between the neutral and sensitive groups about the top-\ud835\udc3eLLM\u2019s recommendation is computed as: \ud835\udc43\ud835\udc45\ud835\udc34\ud835\udc3a\u2217@\ud835\udc3e = \u2211\ufe01 \ud835\udc5a \u2211\ufe01 \ud835\udc631,\ud835\udc632 \u2208R\ud835\udc4e \ud835\udc5a \ud835\udc631\u2260\ud835\udc632 \u0002 I (\ud835\udc631 \u2208R\ud835\udc5a) \u2217I \u0000\ud835\udc5f\ud835\udc5a,\ud835\udc631 < \ud835\udc5f\ud835\udc5a,\ud835\udc632 \u0001 \u2217I(\ud835\udc5f\ud835\udc4e \ud835\udc5a,\ud835\udc631 < \ud835\udc5f\ud835\udc4e \ud835\udc5a,\ud835\udc632) \u0003 \ud835\udc3e(\ud835\udc3e+ 1)\ud835\udc40 , (4) where I(\u00b7) still has similar means as Equation (3), \ud835\udc631 and \ud835\udc632 denote two different recommended items in R\ud835\udc4e \ud835\udc5a, and \ud835\udc5f\ud835\udc4e \ud835\udc5a,\ud835\udc631 (or \ud835\udc5f\ud835\udc5a,\ud835\udc631) denotes the rank of \ud835\udc631 in R\ud835\udc4e \ud835\udc5a(or R\ud835\udc5a). Specifically, if \ud835\udc631 is not in R\ud835\udc5a, then \ud835\udc5f\ud835\udc5a,\ud835\udc631 = +\u221e, similarly for \ud835\udc632. As shown in the equation, a higher metric does not only require high item overlap but also requires the pairwise ranking order between an item and another item to be the same in R\ud835\udc5aand R\ud835\udc4e \ud835\udc5a. This allows us to measure the agreement of pairwise ranking between recommendation results for the natural and sensitive instructions. 3.2 Dataset Construction RecLLM differs from conventional recommender systems in terms of the data requirements for both the model input and fairness evaluation, raising the need of constructing a new benchmark dataset that is suitable for RecLLM fairness evaluation. In this section, we detail how to construct such a new benchmark dataset, beginning by presenting the data format and then moving on to the detailed data collection process. 3.2.1 Data Format. RecLLM usually relies on user instructions (i.e., recommendation requests) in natural language, in which the user preference is explicitly expressed, to make recommendations. Therefore, the core of constructing a dataset for RecLLM fairness evaluation is to collect suitable user instructions. Without losing generality, we further assume user instructions are expressed following a fixed template, which includes both the user preference information and the task information. Specifically, we take the following template for neutral and sensitive instructions, respectively: Netrual: \u201cI am a fan of [names]. Please provide me with a list of \ud835\udc3esong/movie titles...\u201d Sensitive: \u201cI am a/an [sensitive feature] fan of [names]. Please provide me with a list of \ud835\udc3esong/movie titles...\u201d, where \u201cI am a [sensitive feature] fan of [name]\u201d is used to express user preference, \u201cPlease provide me with a list of \ud835\udc3eitem titles...\u201d denotes the task description. With these templates, we can simulate users with different preference by varying the \u201c[name]\u201d field to obtain different neutral instractions, and inject different sensitive information by varying the \u201c[sensitive feature]\u201d field to construct different sensitive instructions. Here, we consider the top-\ud835\udc3erecommendation scenario and take item titles to represent item identities. 3.2.2 Data Collection. We next select data to fill in the \u201c[names]\u201d and \u201c[sensitive feature]\u201d fields to construct our dataset. To ensure the recommendation validity of RecLLM, we use a selection process designed to increase the likelihood that the LLM has seen the selected data. Specifically, for the \u201c[sensitive feature]\u201d field, we consider eight commonly discussed sensitive attributes: age, country, gender, continent, occupation, race, religion, and physics. The possible values for each attribute are summarized in Figure 1. For the \u201c[names]\u201d field, we choose famous singers of music or famous directors of movies as potential candidates. Then, we enumerate all possible singers/directors, as well as all possible values of the sensitive attributes, resulting in two datasets: Music. We first screen the 500 most popular singers on the Music Television platform2 based on The 10,000 MTV\u2019s Top Music Artists3. Then, we enumerate all singers and all possible values of each sensitive attribute to fill in the \u201c[name]\u201d and \u201c[sensitive feature]\u201d fields, respectively, to construct the music dataset. Movie. First, we utilize the IMDB official API4, one of the most reputable and authoritative websites of movie and TV information, to select 500 directors with the highest number of popular movies and TV shows from the IMDB dataset. Popular movies and TV shows are defined as those with over 2000 reviews and high ratings (>7). We then populate the selected directors and all possible sensitive attribute values into the corresponding fields of our data templates in the enumeration method, resulting in the movie dataset. 4 RESULTS AND ANALYSIS In this section, we conduct experiments based on the proposed benchmark to analyze the recommendation fairness of LLMs by answering the following two questions: \u2022 RQ1: How unfair is the LLM when serving as a recommender on various sensitive user attributes? \u2022 RQ2: Is the unfairness phenomenon for using LLM as a recommender robust across different cases? 4.1 Overall Evaluation (RQ1) Considering the representative role of ChatGPT among existing LLMs, we take it as an example to study the recommendation fairness of LLMs, using the proposed evaluation method and dataset. We feed each neutral instruction and corresponding sensitive instruction into ChatGPT to generate top-\ud835\udc3erecommendations (\ud835\udc3e=20 for both music and movie data), respectively. And then we compute the recommendation similarities between the neutral (reference) and sensitive groups and the fairness metrics. Specifically, when using ChatGPT to generate the recommendation text, we use ChatGPT in a greedy-search manner by fixing the hyperparameters including temperature, top_p, and frequency_penality as zero to ensure the reproducibility of the experiments. We summarize the results in Table 1 and Figure 2. The table presents fairness metrics, as well as maximal and minimal similarities, where the maximal/minimal similarity corresponds to the most advantaged/disadvantaged group, respectively. The figure depicts the similarity of each sensitive 2https://www.mtv.com/. 3https://gist.github.com/mbejda/9912f7a366c62c1f296c. 4https://developer.imdb.com/. Is ChatGPT Fair for Recommendation? Evaluating Fairness in Large Language Model Recommendation RecSys \u201923, September 18\u201322, 2023, Singapore, Singapore Table 1: Fairness evaluation of ChatGPT for Music and Movie Recommendations. \ud835\udc46\ud835\udc41\ud835\udc46\ud835\udc45and \ud835\udc46\ud835\udc41\ud835\udc46\ud835\udc49are measures of unfairness, with higher values indicating greater unfairness. \u201cMin\u201d and \u201cMax\u201d denote the minimum and maximum similarity across all values of a sensitive attribute, respectively. Note: the sensitive attributes are ranked by their SNSV in PRAG*@20. Sorted Sensitive Attribute Dataset Metric Religion Continent Occupation Country Race Age Gender Physics Max 0.7057 0.7922 0.7970 0.7922 0.7541 0.7877 0.7797 0.8006 Min 0.6503 0.7434 0.7560 0.7447 0.7368 0.7738 0.7620 0.7973 SNSR 0.0554 0.0487 0.0410 0.0475 0.0173 0.0139 0.0177 0.0033 Jaccard@20 SNSV 0.0248 0.0203 0.0143 0.0141 0.0065 0.0057 0.0067 0.0017 Max 0.2395 0.2519 0.2531 0.2525 0.2484 0.2529 0.2512 0.2546 Min 0.2205 0.2474 0.2488 0.2476 0.2429 0.2507 0.2503 0.2526 SNSR 0.0190 0.0045 0.0043 0.0049 0.0055 0.0022 0.0009 0.0020 SERP*@20 SNSV 0.0088 0.0019 0.0018 0.0017 0.0021 0.0010 0.0004 0.0010 Max 0.7997 0.8726 0.8779 0.8726 0.8482 0.8708 0.8674 0.8836 Min 0.7293 0.8374 0.8484 0.8391 0.8221 0.8522 0.8559 0.8768 SNSR 0.0705 0.0352 0.0295 0.0334 0.0261 0.0186 0.0116 0.0069 Music PRAG*@20 SNSV 0.0326 0.0145 0.0112 0.0108 0.0097 0.0076 0.0050 0.0034 Metric Race Country Continent Religion Gender Occupation Physics Age Max 0.4908 0.5733 0.5733 0.4057 0.5451 0.5115 0.5401 0.5410 Min 0.3250 0.3803 0.4342 0.3405 0.4586 0.4594 0.5327 0.5123 SNSR 0.1658 0.1931 0.1391 0.0651 0.0865 0.0521 0.0075 0.0288 Jaccard@20 SNSV 0.0619 0.0604 0.0572 0.0307 0.0351 0.0229 0.0037 0.0122 Max 0.1956 0.2315 0.2315 0.1709 0.2248 0.2106 0.2227 0.2299 Min 0.1262 0.1579 0.1819 0.1430 0.1934 0.1929 0.2217 0.2086 SNSR 0.0694 0.0736 0.0496 0.0279 0.0314 0.0177 0.0009 0.0212 SERP*@20 SNSV 0.0275 0.0224 0.0207 0.0117 0.0123 0.0065 0.0005 0.0089 Max 0.6304 0.7049 0.7049 0.5538 0.7051 0.6595 0.6917 0.6837 Min 0.4113 0.4904 0.5581 0.4377 0.6125 0.6020 0.6628 0.6739 SNSR 0.2191 0.2145 0.1468 0.1162 0.0926 0.0575 0.0289 0.0098 Movie PRAG*@20 SNSV 0.0828 0.0689 0.0601 0.0505 0.0359 0.0227 0.0145 0.0040 group to the neutral group while truncating the length of the recommendation list for the most unfair four sensitive attributes. Based on the table and figures, we have made the following observations: \u2022 For both movie and music recommendations, ChatGPT demonstrates unfairness across the most sensitive attributes. In each dataset, each similarity metric exhibits a similar level of values over different sensitive attributes (c.f., Max and Min), but the corresponding fairness metrics (\ud835\udc46\ud835\udc41\ud835\udc46\ud835\udc45and \ud835\udc46\ud835\udc41\ud835\udc46\ud835\udc49) exhibit varying levels of values. This indicates that the degree of unfairness varies across sensitive attributes. In the music dataset, the four attributes with the highest value of \ud835\udc46\ud835\udc41\ud835\udc46\ud835\udc49for \ud835\udc43\ud835\udc45\ud835\udc34\ud835\udc3a\u2217are religion, continent, occupation, and country. In the movie dataset, the four attributes are race, country, continent, and religion. \u2022 As shown in Figure 2, the difference in similarity consistently persists when truncating the recommendation list to different lengths (\ud835\udc3e), and the relative order of different values of sensitive attributes remains mostly unchanged. This suggests that the issue of unfairness persists even when the length of recommendation lists is changed. Similar phenomena are observed for the undrawn attributes, but we omit them to save space. \u2022 In most cases, ChatGPT\u2019s disadvantaged groups (i.e., those with smaller values of similarity metrics) regarding different sensitive attributes align with the inherent social cognition of the real world. For example, in terms of the attribute \u2014 continent, \u201cAfrican\u201d is the disadvantaged group. Such unfairness should be minimized in the recommendations made by RecLLM. 4.2 Unfairness Robustness Analyses (RQ2) We analyze the robustness of unfairness, i.e., whether similar unfairness persists when there are typos in sensitive attributes or when different languages are used for instructions. Due to space constraints, we conduct the robustness analysis on the attribute \u2014 continent, which is one of the most consistently unfair sensitive attributes in Table 1. 4.2.1 The Influence of Sensitive Attribute Typos. To investigate the influence of typos in sensitive attributes on the unfairness of RecLLM, we focus on two values of the attribute \u2014 continent: \u201cAfrican\u201d and \u201cAmerican\u201d. Specifically, we create four typos by adding or subtracting letters, resulting in \u201cAfrian\u201d, \u201cAmerian\u201d, \u201cAmericcan\u201d, and \u201cAfriccan\u201d. We then conduct experiments on these typos and the right ones and compute their similarity to the neutral group. The results are shown in the left two subfigures of Figure 3. We observe that \u201cAfrian\u201d and \u201cAfriccan\u201d, which are closer to the disadvantaged group \u201cAfrican\u201d, are less similar to the neutral group, exhibiting relatively higher levels of disadvantage. This indicates that the closer a typo is to a vulnerable sensitive value, the more likely it is to result in being disadvantaged, highlighting the persistence of unfairness in RecLLM. 4.2.2 The Influence of Language. In addition, we analyze the influence of language on unfairness by using Chinese instructions. The right two subfigures of Figure 3 summarize the similarity results for the attribute \u201ccontinent\u201d. Compared to the results obtained using RecSys \u201923, September 18\u201322, 2023, Singapore, Singapore Jizhi Zhang*, Keqin Bao*, Yang Zhang, Wenjie Wang, Fuli Feng\u2020, and Xiangnan He\u2020 2 4 6 8 10 12 14 16 18 20 @K 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 PRAG*@K Music Religion Buddhist Christian Islamic 2 4 6 8 10 12 14 16 18 20 @K 0.76 0.78 0.80 0.82 0.84 0.86 0.88 Music Continent African American Asian 2 4 6 8 10 12 14 16 18 20 @K 0.76 0.78 0.80 0.82 0.84 0.86 0.88 Music Occupation doctor student teacher worker writer 2 4 6 8 10 12 14 16 18 20 @K 0.72 0.74 0.76 0.78 0.80 0.82 0.84 0.86 0.88 Music Country American Brazilian British Chinese French German Japanese 2 4 6 8 10 12 14 16 18 20 @K 0.40 0.45 0.50 0.55 0.60 0.65 PRAG*@K Movie Race African American black white yellow 2 4 6 8 10 12 14 16 18 20 @K 0.45 0.50 0.55 0.60 0.65 0.70 0.75 Movie Country American Brazilian British Chinese French German Japanese 2 4 6 8 10 12 14 16 18 20 @K 0.50 0.55 0.60 0.65 0.70 0.75 Movie Continent African American Asian 2 4 6 8 10 12 14 16 18 20 @K 0.30 0.35 0.40 0.45 0.50 0.55 0.60 Movie Religion Buddhist Christian Islamic Figure 2: Similarities of sensitive groups to the neutral group with respect to the length \ud835\udc3eof the recommendation List, measured by PRAG*@K, for the four sensitive attributes with the highest SNSV of PRAG*@20. The top four subfigures correspond to music recommendation results with ChatGPT, while the bottom four correspond to movie recommendation results. 2 4 6 8 10 12 14 16 18 20 @K 0.76 0.78 0.80 0.82 0.84 0.86 0.88 PRAG*@K Music Typo American Americcan Amerian Afrian Africcan African 2 4 6 8 10 12 14 16 18 20 @K 0.64 0.66 0.68 0.70 0.72 0.74 0.76 0.78 Movie Typo American Americcan Amerian Afrian Africcan African 2 4 6 8 10 12 14 16 18 20 @K 0.72 0.74 0.76 0.78 0.80 0.82 0.84 0.86 Music Chinese (African) (American) (Asian) 2 4 6 8 10 12 14 16 18 20 @K 0.15 0.20 0.25 0.30 0.35 0.40 Movie Chinese (African) (American) (Asian) Figure 3: Fairness evaluation of ChatGPT when appearing typos in sensitive attributes (the left two subfigures) or when using Chinese prompts (the right two subfigures). English prompts, we find that there are still distinct differences between \u201cAfrican\u201d, \u201cAmerican\u201d, and \u201cAsian\u201d, with \u201cAfrican\u201d and \u201cAsian\u201d remaining relatively disadvantaged compared to \u201cAmerican\u201d. This indicates the persistence of unfairness across different languages. Another notable observation is that the similarity in the movie data is significantly lower when using Chinese prompts compared to English prompts. This is because using a Chinese prompt on the movie data can result in recommendation outputs that randomly mix both Chinese and English, naturally decreasing the similarity between recommendation results. 5 CONCLUSION With the advancement of LLMs, people are gradually recognizing their potential in recommendation systems [5, 7, 21, 39]. In this study, we highlighted the importance of evaluating recommendation fairness when using LLMs for the recommendation. To better evaluate the fairness for RecLLM, we proposed a new evaluation benchmark, named FaiRLLM, as well as a novel fairness evaluation method, several specific fairness metrics, and benchmark datasets spanning various domains with eight sensitive attributes. By conducting extensive experiments using this benchmark, we found that ChatGPT generates unfair recommendations, indicating the potential risks of directly applying the RecLLM paradigm. In the future, we will evaluate other LLMs such as text-davinci-003 and LLaMA [18], and design methods to mitigate the recommendation unfairness of RecLLM. Furthermore, the generative recommendation has the potential to become the next recommendation paradigm [36]. Our approach can also be regarded as a preliminary attempt to evaluate fairness in the generative recommendation of text. In the future, we will also explore ways to measure fairness in other generative recommendation approaches. ACKNOWLEDGMENTS This work is supported by the National Natural Science Foundation of China (62272437), and the CCCD Key Lab of Ministry of Culture and Tourism.", "introduction": "The great development of Large Language Models (LLMs) [12, 30, 34, 40] can extend channels for information seeking, i.e., interact- ing with LLMs to acquire information like ChatGPT [3, 5, 20, 41]. The revolution of LLM has also formed a new paradigm of recom- mendations which makes recommendations through the language generation of LLMs according to user instructions [7, 14]. Figure 1 illustrates some examples under this Recommendation via LLM (Re- cLLM) paradigm, e.g., users give instructions like \u201cProvide me 20 song titles ...?\u201d and LLM returns a list of 20 song titles. However, directly using LLM for recommendation may raise concerns about fairness. Previous work has shown that LLMs tend to reinforce social biases in their generation outputs due to the bias in the large pre-training corpus, leading to unfair treatment of vulnerable groups [4, 13, 19]. Fairness is also a critical crite- rion of recommendation systems due to their enormous social im- pact [10, 24, 29, 38]. Despite the tremendous amount of analysis on the fairness issue of conventional recommendation systems [24, 38], fairness in RecLLM has not been explored. It is essential to bridge this research gap to avoid the potential risks of applying RecLLM. In this paper, we analyze the fairness of RecLLM w.r.t. the sen- sitive attribute of users. Some users may choose not to disclose certain sensitive attributes such as skin color and race due to privacy concerns [11, 27] when giving instruction for generating recom- mended results (Figure 1). Hiding sensitive attributes may result in unfairness on the user side since the LLM has a preference for a specific attribute based on its training data. For instance, Figure 1 shows that the recommendation results without sensitive attributes provided are biased towards some specific user groups, leading to arXiv:2305.07609v3 [cs.IR] 17 Oct 2023 RecSys \u201923, September 18\u201322, 2023, Singapore, Singapore Jizhi Zhang*, Keqin Bao*, Yang Zhang, Wenjie Wang, Fuli Feng\u2020, and Xiangnan He\u2020 User RecLLM I am a fan of Adele. Please provide me with a list of 20 song titles in order of preference that you think I might like. Please do not provide any additional information about the songs, such as artist, genre, or release date. Neutral RecLLM I am a white fan of Adele. Please provide me with \u2026\u2026 1. Someone Like You 2. Rolling in the Deep 3. Set Fire to the Rain 4. Hello 5. When We Were Young \u2026\u2026 User Sensitive Attribute 1 RecLLM I am an African American fan of Adele. Please provide me with \u2026\u2026 User Sensitive Attribute 2 Similar Unfair! Dissimilar! 1. Someone Like You 2. Rolling in the Deep 3. Set Fire to the Rain 4. Hello 5. When We Were Young 6. All I Ask 7. Skyfall 8. Rumour Has It 9. Chasing Pavements \u2026\u2026 1. Love on Top 2. I Will Always Love You 3. Ain't No Mountain High Enough 4. I Wanna Dance with Somebody 5. Purple Rain \u2026\u2026 Figure 1: On the left is an example of our fairness evaluation for RecLLM in music recommendation. Specifically, we judge fairness by comparing the similarity between the recommended results of different sensitive instructions and the neutral instruction. Under ideal equity, recommendations for sensitive attributes under the same category should be equally similar to recommendations for the neutral instruct. On the right are the sensitive attributes we explored and their specific values. unfairness for vulnerable groups. Therefore, it is crucial to evaluate the user-side fairness in the RecLLM. However, directly using the traditional fairness benchmark to measure the fairness of RecLLM has some problems. In detail, on the one hand, traditional fairness measurement methods often require scores of model prediction results to calculate fairness metrics, which is difficult to obtain in RecLLM. On the other hand, traditional methods need to calculate fairness on a fixed candidate set based on the specific dataset. Due to the universality of RecLLM, limiting its output range seriously damages its upper limit of recommendation ability, and can\u2019t really measure its fairness in practical applications. To address these problems, we come up with a Fairness of Recommendation via LLM benchmark called FaiRLLM tailored specifically for RecLLM. FaiRLLM evaluates the fairness of RecLLM by measuring the similarity between the recommendation results of neutral instructions that do not include sensitive attributes and sensi- tive instructions that disclose such attributes (as shown in Figure 1). It assesses the fairness of RecLLM by analyzing the divergence of similarities across different values of the sensitive attributes (e.g., African American, black, white, and yellow in the case of race). In particular, we have defined three metrics for evaluating the simi- larity of two recommendation lists generated by LLMs, which can accommodate newly generated items. Moreover, we have created datasets for two common recommendation scenarios, namely music, and movies, taking into account eight sensitive attributes, as illus- trated in Figure 1. On these datasets, we have evaluated ChatGPT, showing its unfairness on various sensitive attributes. Our contributions are summarized as follows: \u2022 To our knowledge, this is the first investigation into the fair- ness issues of the emerging LLM for recommendation paradigm, presenting a novel recommendation problem. \u2022 We build a new FaiRLLM benchmark which includes carefully designed evaluation methods and datasets in two scenes of rec- ommendation with consideration of eight sensitive attributes. \u2022 We extensively evaluate ChatGPT with the FaiRLLM benchmark and reveal fairness issues on several sensitive attributes." } ] }, "edge_feat": {} } }