Adversarial Collaborative Filtering for Free

Huiyuan Chen,Xiaoting Li,Vivian Lai,Chin-Chia Michael Yeh,Yujie Fan,Yan Zheng,Mahashweta Das,Hao Yang
DOI: https://doi.org/10.1145/3604915.3608771
2023-08-21
Abstract:Collaborative Filtering (CF) has been successfully used to help users discover the items of interest. Nevertheless, existing CF methods suffer from noisy data issue, which negatively impacts the quality of recommendation. To tackle this problem, many prior studies leverage adversarial learning to regularize the representations of users/items, which improves both generalizability and robustness. Those methods often learn adversarial perturbations and model parameters under min-max optimization framework. However, there still have two major drawbacks: 1) Existing methods lack theoretical guarantees of why adding perturbations improve the model generalizability and robustness; 2) Solving min-max optimization is time-consuming. In addition to updating the model parameters, each iteration requires additional computations to update the perturbations, making them not scalable for industry-scale datasets. In this paper, we present Sharpness-aware Collaborative Filtering (SharpCF), a simple yet effective method that conducts adversarial training without extra computational cost over the base optimizer. To achieve this goal, we first revisit the existing adversarial collaborative filtering and discuss its connection with recent Sharpness-aware Minimization. This analysis shows that adversarial training actually seeks model parameters that lie in neighborhoods around the optimal model parameters having uniformly low loss values, resulting in better generalizability. To reduce the computational overhead, SharpCF introduces a novel trajectory loss to measure the alignment between current weights and past weights. Experimental results on real-world datasets demonstrate that our SharpCF achieves superior performance with almost zero additional computational cost comparing to adversarial training.
Information Retrieval,Machine Learning
What problem does this paper attempt to address?
The problems that this paper attempts to solve mainly focus on two aspects: 1. **Insufficient theoretical explanation**: Existing adversarial collaborative filtering methods lack theoretical guarantees, that is, why adding adversarial perturbations can improve the generalization ability and robustness of the model. Specifically, these methods do not clearly explain why adversarial training enables the model to perform better in the face of noisy data. 2. **High computational cost**: Existing adversarial collaborative filtering methods usually adopt a min - max optimization framework to alternately learn adversarial perturbations and model parameters. This optimization process not only has a large amount of computation, but also requires additional computation to update the perturbations in each iteration, resulting in the inefficiency of these methods when dealing with large - scale industrial data sets. To overcome the above problems, the authors propose the **Sharpness - aware Collaborative Filtering (SharpCF)** method, which can achieve adversarial training without increasing additional computational costs. Specifically, SharpCF introduces a new trajectory loss function, which measures the alignment degree between the current model state and the past model state, thereby avoiding the need to solve the min - max optimization problem and being able to be trained by standard stochastic gradient descent (SGD). ### Main contributions of the paper: 1. **Theoretical connection**: Re - examine the existing adversarial collaborative filtering methods and establish their connection with the recently proposed **Sharpness - aware Minimization**. Through this analysis, it is revealed that adversarial training actually seeks those model parameters with uniformly low loss values near the optimal model parameters, which makes the model more inclined to flat minima rather than sharp minima, thereby improving the model's generalization ability. 2. **New trajectory loss**: Propose a new trajectory loss function, which measures the alignment degree between the current model state and the past model state. Therefore, SharpCF can avoid solving the min - max optimization problem and achieve adversarial training with almost no increase in computational cost. 3. **Experimental verification**: Experimental results on multiple real - world data sets show that SharpCF not only outperforms existing collaborative filtering methods in performance, but also has a time complexity comparable to BPR and is even twice as fast as APR. ### Summary of mathematical formulas: - **BPR loss**: \[ L_{\text{BPR}}(\Theta)=-\sum_{(u, i, j) \in O} \ln \sigma(\hat{y}_{ui}-\hat{y}_{uj}) \] where \(O = \{(u, i, j) | u \in U \land i \in I^+_u \land j \in I^-_u\}\), \(\sigma\) is the sigmoid function, and \(\Theta\) represents the model parameters. - **APR loss**: \[ L_{\text{APR}}(\Theta)=L_{\text{BPR}}(\Theta)+\alpha \cdot L_{\text{BPR}}(\Theta+\Delta_{\text{adv}}) \] where \(\Delta_{\text{adv}}=\arg \max_{\|\Delta\|_2 \leq \rho} L_{\text{BPR}}(\hat{\Theta}+\Delta)\), and \(\alpha\) controls the influence of adversarial perturbations on model optimization. - **Sharpness - aware Minimization**: \[ R(\Theta)=\max_{\|\Delta\|_2 \leq \rho} L(\Theta+\Delta)-L(\Theta) \] where \(L\) is the short form of \(L_{\text{BPR}}\). - **Trajectory loss**