# DTGCF: Diversified Tag-Aware Recommendation with Graph Collaborative Filtering
## 4 Methodology
### Personalized Category-Boosted Negative Sampling  
One of the core issues of training recommendation models is to obtain an effective and reasonable training data set, which contains a positive sample set and a negative sample set. However, in the recommendation task, we are only accessible to the positive sample from the implicit feedback, such as click and annotation [52]. Those items that have not been interacted with by a given user are presumed to be negative samples. In other words, the negative instance set can be composed of all unobserved interactions. It is unnecessary and rather time-consuming to use all negative samples for training. To tackle this problem, negative samples are mostly generated by randomly selecting from unobserved interactions in practice. This process is also known as negative sampling. Most studies are devoted to modification of the negative sampling strategy, thus improving the recommendation accuracy [53; 54]. However, only a few works attempted to leverage this strategy to promote the item diversity. For instance, a diversity-promoted negative sampler is proposed in the recent work [23], where those similar but negative samples are selected with a boosted higher probability. By twisting the distribution of negative samples, the trained recommendation model can discriminate the user preferences among similar items. In addition, a tunable hyper-parameter \(\alpha\) is utilized to control the proportion of selecting similar negative items. It assumes that every user has the same tendency on item diversity, so the same value of \(\alpha\) is applied in the negative sampler for all users. However, we argue that different users might have different tendencies on diversity. Some users are willing to explore new and unknown things, while others will conservatively choose their favorite fields. Inspired by this, we design a personalized category-boosted negative sampling, which can adaptively determine the strength of sampling the similar negative items for each user. The procedure of the proposed personalized category-boosted negative sampling is presented in Algorithm 1. Specifically, we first compute the diversity score for each user by:  
\[d_{u}=\frac{|C_{u}|}{|C_{all}|}, \tag{8}\]  
where \(|C_{u}|\) represents the number of categories covered by the interacted items of user \(u\), and \(|C_{all}|\) is the number of categories totally in the system. After performing normalization, we can obtain the diversity score table \(Du\) for all users. According to the diversity score, we then set the strength parameter for each user as:  
\[\alpha_{u}=\alpha_{0}\times d_{u}, \tag{9}\]  
where \(\alpha_{0}\) is a shared parameter to control similar sampling for all users, which has the same function of \(\alpha\) used in [23]. Finally, we choose the negative samples for each user from the same category or the whole item set according to the strength parameter \(\alpha_{u}\). For those users that have higher diversity scores, more items from positive categories will be selected as negative samples, which enables the positive items from negative categories to be easier to be recommended than those from positive categories, thus providing more diverse recommendations. On the contrary, more negative samples are randomly chosen from all categories for users with small diversity scores, which makes the recommendation model pay more attention on relevance.