A Simple and Debiased Sampling Method for Personalized Ranking

1 INTRODUCTION . Offering personalized service to users is outstanding as an important task , for example , ranking the top-N items that a user may like . Solutions to such kind of problems are usually designed on a bipartite graph G = ( V , E ) , where vertex set V = U ∪ I contains user set U and item set I , and E denotes the edge set . Each edge eui ∈ E denotes an observed interaction between user u and item i. Users ’ preference on items is modeled by pairwise loss functions with the assumption that items with interactions from a user are of more interest to this user than those without interactions . The loss function thus involves pairwise comparison between an observed ( positive ) edge eui ∈ E and an unobserved ( negative ) edge euj /∈ E. The optimization process thus suffers from the classimbalance issue , because in practical scenario , the number of observed ( positive ) edges are always much less than the unobserved ( negative ) ones . The imbalance between eui ∈ E and euj /∈ E can be regarded as the edge-level imbalance issue . Pioneering works dealing with the class-imbalance problem can be categorized into two main families : using stationary sampling or using dynamic sampling . Approaches in the former family usually start from the edge-level class-imbalance issue through under-sampling negative edges from a pre-defined stationary distribution ( Rendle et al. , 2009 ; Rendle and Freudenthaler , 2014 ) , or oversampling positive edges by creating instances through the social connection ( Chen et al. , 2019 ) . However , they ignore that class-imbalance issue also exists in vertex side because each vertex can appear in both positive and negative edges . Through some basic statistical analysis , we acquire some interesting findings , that is , the vertex degree has positive impact on vertex-level imbalance problem . If we sample negative instances from a stationary distribution , those popularity vertexes with degree greater than average vertex degree are under-sampled as negative samples , while “ coldstart ” vertexes with degree less than average degree are over-sampled . Moreover , they can ’ t capture the dynamics of relative ranking order between positive and negative samples , as shown in Figure 1 ( a ) and 1 ( b ) . From Figure 1 ( a ) we can see that it ’ s easy to find an order-violated item for pairwise loss optimization at the initial state , because there are many negative items ranking higher than the positive item . However , as the learning process moves forward , massive number of negative items are distinguished well from the positive item , shown in Figure 1 ( b ) . At this time , a large portion of the negative items are useless for pairwise loss optimization , because they already rank lower than the positive item . Recently dynamic sampling approaches ( Weston et al. , 2011 ; Yuan et al. , 2016 ; Wang et al. , 2020 ) have shown their significant contribution to negative instances selection by considering the hardness of sampling a negative sample . However , existing dynamic methods have several drawbacks : 1 ) they lack systematically understanding their connection to class-imbalance issue , leading to only sampling candidate from uniform distribution ; 2 ) they have to find a violated negative sample through searching massive candidates , causing high computation complexity ( over ten times higher than sampling from stationary distribution ) . In this work , we aim at finding clues that can help to design a faster dynamic negative sampler for the personalized ranking task . We find that sampling from uniform distribution can be regarded as a random walk with a transition probability matrix P for arbitrary node pair in a fully connected item-item graph , which is presented in Figure 1 ( c ) . Intuitively , nodes ( items ) are different in their nature ( e.g. , degree , betweenness ) . A biased transition matrix P∗ might be more helpful on finding the desired negative items , than a uniform random P , as shown in Figure 1 ( d ) . Through theoretical analysis , we find that one of the potential solutions to decode the biased transition process and walking with a biased transition matrix P∗ is to tackle the class-imbalance issue . To achieve this goal , it is essential to first dissect the impact of class-imbalance issue . More specifically , we mainly investigate the three questions : Q1 ) how the class-imbalance problem is reflected in current sampling-based pairwise ranking approaches ? Q2 ) what is the impact of the imbalance problem on learning optimal pairwise ranking model ? Q3 ) how can we resolve the class-imbalance issue and design a faster dynamic sampling approach to boost ranking quality ? We answer the above questions with theoretical analysis in Section 3 . The brief summary is , to Q1 , if negative instances are sampled from a uniform distribution ( e.g. , in ( Rendle et al. , 2009 ) ) , vertexes with high degrees are under-sampled as negative samples , while “ cold-start ” vertexes with low degrees are over-sampled . To Q2 , we theoretically show that the class-imbalance issue will result in frequency gathering phenomenon where the learned embeddings of items with close popularity will gather together , and cause gradient vanishment at the output loss . Based on the above insights , for Q3 , we propose an efficient Vital Negative Sampler ( VINS ) , which explicitly considers both edge- and vertex-level class-imbalance issue . In summary , our contributions of this work are as follows : • We indicate out edge- and vertex-level imbalance problem raised in pairwise learning loss , and provide theoretical analysis that the imbalance issue could lead to frequency gathering phenomenon and vanishing gradient at the output loss . • To address the class-imbalance and vanishing gradient problem , we design an adaptive negative sampling method with a reject probability based on items ’ degree differences . • Thoroughly experimental results demonstrate that the proposed method can speed up the training procedure 30 % to 50 % for shallow and deep ranking models , compared with the state-of-the-art dynamic sampling methods . 2 RELATED WORK . Pairwise comparison usually happens between an observed ( positive ) and an unobserved ( negative ) edge , when the interactions between users and items are represented as a bipartite graph . Such an idea results in a serious class-imbalance issue due to the pairwise comparison between a small set of interacted items ( positive as minority class ) and a very large set of all remaining items ( negative as majority class ) . Pioneering work proposed in ( Rendle et al. , 2009 ) presented an under-sampling approach via uniformly sampling a negative edge for a given positive edge . Following the idea in ( Rendle et al. , 2009 ) , ( Zhao et al. , 2014 ) proposed an over-sampling method by employing social theory to create synthetic positive instances . ( Ding et al. , 2019 ) augmented pairwise samples with view data . However , these sampling strategies discard a fact that each item has its own properties , e.g. , degree , betweenness . ( Rendle and Freudenthaler , 2014 ) considered vertex properties and proposed to sample a negative instance from an exponential function over the order of vertex degree . Despite of the effectiveness and efficiency of sampling from a stationary distribution ( e.g. , uniform , or power function over vertex popularity ) , they ignore the impact of relative order between positive and negative samples during the learning processes , as shown in Figure 1 ( a ) and 1 ( b ) . Recently dynamic sampling approaches ( Weston et al. , 2011 ; Yuan et al. , 2016 ; Chen et al. , 2018 ) aiming at estimating the rank order of positive samples have shown significant contribution of selecting vital negative instances . As a pioneering work , ( Weston et al. , 2011 ) proposed the WARP loss aiming at playing less attention to well-learned positives , but more emphasis on the low-rank ones . However , along with the growing of iterations , sampling a violated negative items become very difficult ( Hsiao et al. , 2014 ) . WARP inspires lots of recent works to estimate rank-aware weight from a uniform distribution As the state-of-the-art variant of WARP loss , LFM-W ( Yuan et al. , 2016 ) advances WARP with a normalization term . However , estimating the rank-aware weight from a uniform distribution makes LFM-W need lots of steps to find a violated sample . Moreover , LFMW might find sub-optimal negative sample without considering the class-imbalance issue . Besides considering ranking order , ( Wang et al. , 2019 ) regarded dynamic sampling as a minmax game . VINS also inherits the basic ideas from WARP but modifies the target distribution and proposes to estimate it through an importance sampling method after theoretically investigating the existing class-imbalance issue and its potential influence . LFM-W can be regarded as a special case of the proposed VINS with a proper setting . 3 CLASS IMBALANCED ANALYSIS . Let ’ s use G = ( V , E ) to represent a user-item interaction graph , where vertex set V = U ∪ I contains users U and items I , and eui ∈ E denotes an observed interaction ( e.g . click , purchase behaviors ) between user u and item i . The relationship between user u and item i can be measured by a factorization focused method , known as xui = Pu · Pi , where Pu = f ( u|θu ) ∈ Rd and Pi = g ( i|θi ) ∈ Rd are the representation of user u and item i generated by deep neural network f ( · ) and g ( · ) with parameters θu and θi , respectively . To learn vertex representation that can be used to accurately infer users ’ preferences on items , pairwise ranking approaches usually regard the observed edges eui as positive pairs , and all the other combinations euj ∈ ( U × I \ E ) as negative ones . Then a set of triplets D = { ( u , i , j ) |eui ∈ E , euj ∈ ( U × I \ E ) } can be constructed base on a general assumption that the induced relevance of an observed user-item pair should be larger than the unobserved one , that is , xui > xuj . To model such contrastive relation , one popular solution is to induce pairwise loss function as follows : L ( G ) = ∑ ( u , i , j ) ∈D wui · ` uij ( xui , xuj ) , ( 1 ) where ` uij ( · ) can be hinge , logistic or cross entropy function that raises an effective loss for any triplet with incorrect prediction ( i.e . xuj > xui ) that violates the pairwise assumption . wui is the a weight factor which shows the complexity to discriminate the given comparison sample . The optimization of Equation ( 1 ) involves an extreme class-imbalance issue , because in practical scenario , the number of unobserved interactions euj /∈ E ( negative ) is usually extremely larger than the observed eui ∈ E ( positive ) . The imbalance between eui ∈ E and euj /∈ E in pairwise loss can be regarded as the edge-level imbalance issue . Since the class-imbalance problem is caused by the majority of negative edges , under-sampling majority is a practical solution for it ( Rendle et al. , 2009 ; Mikolov et al. , 2013 ) . Let ’ s take the most popular strategy of under-sampling negative edges as an example . For a given positive edge eui ∈ E , we can sample a negative edge by fixing user u ∈ U , then sample one item j ∈ I , euj /∈ E with replacement from a static distribution π = { π ( i ) , i ∈ I } , where π ( i ) = dβi , β ∈ [ 0 , 1 ] denotes a weight function of item degree di . Then we can optimize the objective function in Equation ( 1 ) with the constructed pairwise samples D̃ ∈ D. In most of pairwise ranking models , how to select effective pairwise comparison samples plays an indispensable role in boosting the ranking performance . In the following , we ’ d like to present the challenges raised by the class-imbalance issue on selecting pairwise comparison samples , and how to address these challenges with an adaptive sampling method .

Summary: For pair-wise learning-to-rank problems, it often suffers from class imbalance problem when constructing training data where negative class examples are much more frequent then positive class examples. Negative example sampling is an important differentiator on training and classifier performance. this paper proposed a method on negative class sampling by considering the degree of vertexes. It proposed a rejection function in order to sample with higher probability from high degree vertex instead of using edge level random sampling. It provided both theoretical analysis and experiments on real world datasets to demonstrate the effectiveness on the proposed sampling approach.