The Minority Matters: A Diversity-Promoting Collaborative Metric Learning Algorithm
Abstract
Collaborative Metric Learning (CML) has recently emerged as a popular method in recommendation systems (RS), closing the gap between metric learning and
Collaborative Filtering.
Following the convention of RS, existing methods exploit unique user representation in their model design.
This paper focuses on a challenging scenario where a user has multiple categories of interests.
Under this setting, we argue that the unique user representation might induce preference bias, especially when the item category distribution is imbalanced.
To address this issue, we propose a novel method called Diversity-Promoting Collaborative Metric
Learning (DPCML), with the hope of considering the commonly ignored minority interest of the user.
The key idea behind DPCML is to include a multiple set of representations for each user in the system.
Based on this embedding paradigm, user preference toward an item is aggregated from different embeddings by taking the minimum item-user distance among the user embedding set.
Furthermore, we observe that the diversity of the embeddings for the same user also plays an essential role in the model.
To this end, we propose a Diversity Control Regularization Scheme (DCRS) to accommodate the multi-vector representation strategy better.
Theoretically, we show that DPCML could generalize well to unseen test data by tackling the challenge of the annoying operation that comes from the minimum value.
Experiments over a range of benchmark datasets speak to the efficacy of DPCML
Introduction
Recommender system (RS) is a well-known building block in eCommerce, which can assist buyers to find products they wish to purchase by giving them the relevant recommendations.
The key recipe behind RS is to learn from user-item interaction records [45, 30, 31, 29, 19].
In practice, since user preferences are hard to collect, such records often exist as implicit feedback [48, 1, 42] where only indirect actions are provided (say clicks, collections, reposts, and etc.).
Such a property of implicit feedback raises a great challenge to RS-targeted machine learning methods and thus stimulates a wave of relevant studies along this course [56, 63, 51].
Over the past two decades, most literature follows a typical paradigm known as the One-Class
Collaborative Filtering (OCCF) [35], where the items not being observed are usually assumed to be of less interest for the user and labeled as negative instances.
In the early days, the vast majority of studies in the OCCF community focus on Matrix Factorization (MF) based algorithms, where the preference of a specific user to an item is conveyed by the inner product between their embeddings [60, 6].
Recently, a milestone study known as Collaborative Metric Learning (CML) [18] pointed out that the inner product involved in MF violates the triangle inequality, resulting in a sub-optimal topological embedding space.
To fix this, CML proposes a novel framework to overcome such a problem by borrowing the strength from metric learning.
Practically, CML has achieved promising performance over a series of RS benchmark datasets.
Hereafter, many efforts have been made along the research direction to improve CML [44, 41, 36, 2, 54, 47, 65, 62, 43].
More discussions of the related work are presented in Appendix.
A.
However, through the lens of a critical example in the practical scenarios (shown in Sec.2.2), we notice that users usually have multiple categories of preferences in real-world RS.
Moreover, such interest groups are often not equally distributed, where the amount of some groups dominates the others.
Unfortunately, as shown in Fig.3, in this case, the existing studies might induce preference bias since they tend to meet the majority interest while missing the other potential preference.
Therefore, in this paper, we ask:
How to develop an effective CML-based algorithm to accommodate the diversity of user preferences?
Contributions.
In search of an answer, we propose a novel algorithm called Diversity-Promoting
Collaborative Metric Learning (DPCML) .
The key idea is to explore the diversity of user interest which spans multiple groups of items.
To this end, we propose a multi-vector user representation strategy, where each user has a set of C embeddings.
To find out the score of a given item embedding g v , we aggregate the results from the user embeddings g 1 u , g 2 u , · · · , g Cu by taking the minimum distance s ( u, v ) =
min c ∥
g cu − g v ∥ 2 .
Then we will recommend the item with the smallest s value.
In this way, we can focus on all potential items that fit one of the users’ interests well, both for the majority and the minority interests.
Meanwhile, we observe that the diversity of the embeddings among the same user representation set also plays an important role in better achieving our goal.
Therefore, we further present a novel diversity control regularization scheme.
Taking a step further, we continue to ask the following question:
Could CML generalize well under the multi-vector representation strategy?
To the best of our knowledge, such a problem remains barely explored in the existing literature.
To solve the problem, we then proceed to explore the generalization bound for DPCML algorithm.
Here the major challenges fall into two aspects: 1)
The risk of DPCML could not be expressed as a sum of independently identically distributed (i.i.d.)
loss terms, making the standard Rademacher
Complexity-based [3, 33] theoretical arguments unavailable; 2)
The annoying minimum operation are not continuous, which cannot be analyzed easily in the Rademacher complexity framework.
Facing these challenges, we employ the covering number and ϵ -net arguments to derive the generalization bound.
On top of this, we show that DPCML could induce a small generalization error with high probability.
This supports the effectiveness of DPCML from a theoretical perspective.
Finally, we conduct empirical studies over a range of RS benchmark datasets that demonstrate the superiority of DPCML.
Methodology 2.1 Preliminary
In this paper, we focus on how to develop an effective CML-based recommendation system on top of the implicit feedback signals (say clicks, browses, and bookmarks).
Assume there are a pool of users and items in the system, denoted by U
= { u 1 , u 2 , . .
, u |U| }
and I = { v 1 , v 2 . .
. , v |I| } , [Figure]     [Figure]
U
[Figure] [Figure] respectively. For each user u i ∈ U , i = 1 , 2 , . .
. , |U| , let D + u i = { v +1 , v +2 , . .
. , v + n + i } denote the set of items that user u i has interacted with (i.e., observed user-item interactions) and the rest of the items (i.e., unobserved interactions) are denoted by D − u i
= { v − 1 , v − 2 , . .
. , v − n − i } , where n + i , n − i are the number of observed/unobserved interactions of user u i .
We have I =
D u
i
=
D + u i ∪ D
− u i and |I| = n + i + n − i .
In the standard settings of OCCF, one usually assumes that users tend to have a higher preference for the items contained in D + u i than the items in D − u
i .
Therefore, given a target user u i ∈ U and his/her historical interaction records, the goal of RS is to discover the most interested N items by recommending the items with the top- N (bottom- N ) score.
The top- N item list is denoted as I u i N .
2.2 Motivating Example
We start by a definition of the preference diversity of users.
Definition (Preference
Diversity) .
Assume that there exists an attribute set
T =
{T ( v 1 ) , T ( v 2 ) , . . .
, T ( v |I | ) } in a typical RS, where T ( v j ) = { t 1 , t 2 , . . , t T j } contains the attribute information of item v j (e.g., the genres of a movie) and T j is the number of attributes.
Given a user u i and interaction records D + u i , the preference diversity is defined as follows:
[Equation]
where I ( x ) is an indicator function, i.e., returns 1 if the condition x holds, otherwise 0 is returned.
Remark 1.
Intuitively, the range of Div ( u i ) is among [0 , 1] , and its value measures the diversity of u i ’s preference to a certain extent.
That is to say, if items among the historical interaction records of users are irrelevant, there should induce a large value (e.g., Div ( u i ) = 1 ), implying the diversity of their preferences.
If the opposite is the case, the value is small.
This means users may have narrow interests where only some unique attributes appeal to them.
Based on Def.1, we visualize the user preferences on two real-world benchmark datasets, including
MovieLens-1m and MovieLens-10m .
The detailed information of datasets is listed in Tab.1 in
Appendix.C.
Here we adopt the movie genres as the attribute set T because such information is easy to obtain.
The results are shown in Fig.1.
From the results, we can make the following observations.
First, only a few users have limited interest.
Moreover, most of the users have a diversity value spaning (0 , 0 . 8] , suggesting that they have multiple categories of interests.
Finally, one can notice that there are very few users with high preference diversity (at the lower-right corner) in both figures.
This is a convincing case in the real-world recommendation since most users usually have interests in a couple of movie genres but not all.
Motivation and Discussion .
Through the above example, the key information is that users usually have multiple categories of preference in real-world recommendations.
This poses a critical challenge to the current CML framework.
Specifically, following the convention of RS, the existing
CML-based methods leverage unique representations of users to model their preferences.
Facing the multiplicity of user intentions, such a paradigm may induce preference bias due to the limited expressiveness, especially when the item category distribution is imbalanced.
Fig.2 visualizes the item distribution on MovieLens-1m and MovieLens-10m datasets.
We see that both of them are imbalanced.
In this case, as shown in Fig.3-(b), CML would pay more attention to the majority interest of users making the unique user embedding close to the items with the science fiction (Sci-Fi) category.
In this way, the minority interest of the user (i.e., Horror movies) would be ignored by the method, inducing performance degradation.
This motivates us to explore diversity-promoting strategies on top of CML.
2.3 Diversity-Promoting Collaborative Metric Learning
Recall that the critical recipe behind CML-based algorithms is to seek a metric space (usually adopting the Euclidean space) such that user preferences could be naturally specified by their distance toward different items.
To do this, the traditional CML-based methods usually represent each user and each item as a vector, respectively.
Different from them, taking the preference diversity of users into account, we propose to adopt C ( C > 1 ) different embeddings for each user and represent each item as one single vector in a joint Euclidean space.
Concretely, each user u i is projected into the metric space via the following lookup transformations [49, 50, 55]:
[Equation]
where g cu i ∈ R d is a representation vector of user u
i ; [ C ] is the set { 1 , 2 , . . .
, C } ; P c ∈ R |U|× d is a learned transformation weight; d is the dimension of space and u i ∈ R |U | is a one-hot encoding that the nonzero elements correspond to its index of a particular user u i .
Similarly, we apply the following transformation to each item v j :
[Equation]
where g v j ∈ R d is the embedding of item v j ; Q ∈ R |I|× d is the learned transformation weight and v j ∈ R |I| is a one-hot embedding of item v j .
In what follows, given a target user u i , we need to find out a score function to express the user preference toward an item in the context of multiple representations of users.
Here we define the score function by taking the minimum item-user Euclidean distance among the user embedding set:
[Equation]
Equipped with this formulation, we focus on the potential items that fit one of the user preferences.
If user u i has interacted with item v j , there should be a small value with respect to s ( u i , v j ) .
If the opposite is the case, we then expect to see a large s ( u i , v j ) .
Mathematically, the following inequality should be satisfied to reflect the relative preference of u i in the learned Euclidean space:
[Equation]
Therefore, given the whole sample set D = ∪ u i ∈U D u i , we adopt the following pairwise learning problems [18, 44, 24, 57] to achieve such goal:
[Equation]
where, ∀ v + j ∈ D + u i , ∀ v
− k ∈ D − u i , we have
[Equation] [Equation]
and λ > 0 is a safe margin.
According to (5), we have the following explanations.
At first, optimizing the above problem could pull the observed items close to the users and push the unobserved items apart from the observed items.
This achieves our goal of preserving user preferences in the Euclidean space.
Then, as shown in Fig.3-(c), equipped with a multiple set of representations for each user, DPCML would exploit different user vectors to focus on different interest groups.
In this sense, the minority interest groups can also be modeled well.
Last but not least, one appealing property is that, DPCML also preserves the triangle inequality for the items falling into the same interest group.
2.4 Diversity Control Regularization Scheme
In practice, we note that a proper regularization scheme is crucial to accommodate the multi-vector representation strategy.
Here we focus on the diversity within the embedding sets of a given user.
Such diversity is defined as the average pairwise distance among the C user embeddings for user u i , i.e.,
[Equation]
Based on the definition, we argue that one should attain a proper δ g ,u i to get a good performance since extremely large/small values of δ g ,u i might be harmful for the generalization error. It is easy to see that if δ g ,u i is extremely small, the embeddings for a given user are very close to each other such that the multi-vector representation strategy degenerates to the original single-vector representation. This increases the model complexity with few performance gains and obviously will induce overfitting.
On the other hand, a too large diversity might also induce overfitting.
It might be a bit confusing at first glance. But, imagine that when some noise observations or extremely rare interests far away from the normal patterns exist in the data, having a large diversity will make it easier to overfit such data. Moreover, it is also a natural assumption that a user’s interests should not be too different, as validated in Fig.1.
In this sense, the distance across different user embeddings should remain at a moderate magnitude.
Therefore, controlling a proper diversity is essential for the multi-vector representation.
To do this, we put forward the following diversity control regularization scheme (DCRS):
[Equation]
where, we have
[Equation]
and δ 1 , δ 2 are two threshold parameters with δ 1 ≤ δ 2 .
Intuitively, optimizing (7) ensures that the diversity of user’s vectors lies between δ 1 and δ 2 .
2.5 Optimization
Finally, we arrive at the following optimization problem for our proposed DPCML:
[Equation]
where η is a trade-off hyper-parameter.
When the training is completed, one can easily carry out recommendations by choosing the items with the smallest s ( u i , v j ) , ∀ v j , v j ∈
I .
2.6 General Framework of Joint Accessibility
Now, we expect to provide another intriguing perspective of our proposed method.
As we discussed in Sec.
A.2, equipped with a multiple set of representations for each user, our proposed algorithm could be treated as a generalized framework against the joint accessibility issue.
To see this, if we restrict the user and item embeddings within a unit sphere, then the score function (3) degenerates to :
[Equation]
where ˆ g cu i ∈ R 1 × d represents the transpose vector of g cu i ∈ R d .
Therefore, to minimize (9), one only needs to maximize the following equivalent problem:
[Equation]
which is exactly the original form of the joint accessibility model.
Generalization Analysis
In this section, we present a systematic theoretical analysis of the generalization ability of our proposed algorithm.
Following the standard learning theory, deriving a uniform upper bound of the generalization error relies on the proper measure of its complexity over the given hypothesis space
H .
The most common complexity to achieve this is the Rademacher complexity [3, 33, 23], which is derived from the symmetrization technique as an upper bound for the largest deviation over a given hypothesis space H :
[Equation]
However, the standard symmetrization technique requires the empirical risk ˆ R D to be a sum of independent terms, which is not applicable for the CML-based methods since they usually involve a sum of pairwise terms in (5).
For instance, with respect to (5), the terms ℓ ( i ) g ( v + j , v − k ) and ℓ ( i ) g (˜ v + j , ˜ v − k ) are interdependent as long as one of them is the same (i.e., v + j = ˜ v + j or v − k
=
˜ v − k ).
Therefore, we turn to leverage another complexity measure, i.e., covering number, to overcome this difficulty.
The necessary notations are summarized as follows.
Definition 2 ( ϵ -Covering) .
[21] Let ( F , ρ ) be a (pseudo) metric space, and G ⊆ F . { f 1 , . . .
, f K } is said to be an ϵ -covering of G if G ⊆ K ∪ i =1 B
( f i , ϵ ) , i.e., ∀ g ∈ G , ∃ i such that ρ ( g, f i ) ≤ ϵ .
Definition 3 (Covering Number) .
According to the notations in Def.2, the covering number of
G with radius ϵ is defined as:
[Equation]
With the above definitions, we further have the following assumption and lemma to help us derive the generalization bound.
Assumption 1 (Basic Assumptions) .
We assume that all the embeddings of users and items are chosen from the following embedding hypothesis space:
[Equation]
where g cu i ∈ H R , u
i ∈ U , c ∈
[ C ] and g v j ∈ H R , v j ∈
I .
Lemma 1.
The covering number of the hypothesis class H R has the following upper bound:
[Equation]
where d is the dimension of embedding space.
Based on the above introductions, we have the following results.
Due to space limitations, please refer to Appendix.
B for all proofs in detail.
Theorem 1 (Generalization Upper Bound of DPCML) .
Let E [ ˆ L D ( g )] be the population risk of ˆ L D ( g ) .
Then, ∀ g ∈ H R , with high probability, the following inequation holds:
[Equation]
where we have
[Equation]
Intriguingly, we see that our derived bound does not depend on C .
This is consistent with the over-parameterization phenomenon [8, 34].
On top of Thm.1, we have the following corollary.
Corollary 1.
DPCML could enjoy a smaller generalization error than CML.
Therefore, we can conclude that DPCML generalizes to unseen data better than single-vector CML and thus improves the recommendation performance.
This supports the superiority of our proposed
DPCML from a theoretical perspective.
In addition, we also empirically demonstrate this in the experiment Sec.4.3 and Appendix. C.6.4. [Table] [Table]
Experiments
In this section, our proposed method is applied to a wide range of real-world recommendation datasets to show its superiority.
Please refer to Appendix.
C for more results about experiments .
4.1 Experimental Setups
To begin with, we perform empirical experiments on several common recommendation benchmarks:
MovieLens-1m , Steam-200k , CiteULike and MovieLens-10m .
The detailed statistics in terms of these datasets are summarized in Tab.1.
For the datasets with explicit feedbacks, we follow the previous works [14, 44] and transfer them into implicit feedback.
Secondly, we evaluate the performance with five metrics, including Precision (P@ N ), Recall (R@ N ), Normalized Discounted Cumulative Gain (NDCG@ N ), Mean Average Precision (MAP), and Mean Reciprocal Rank (MRR).
Moreover, we compared our proposed method with 14 competitive competitors: a) Item-based CF method, itemKNN [27]; b) MF-based algorithms, including the combination of MF and deep learning models and multi-vector MF-based approaches: GMF , MLP , NeuMF [14], M2F [12] and MGMF [12]; c) CML-based methods, including UniS [35], PopS [53], 2stS [44], HarS [18, 11], TransCF [36], LRML [41], AdaCML [62] and HLR [43].
4.2 Overall Performance
The experimental results of all the involved competitors are shown in Tab.2 and Tab.5 (in Appendix.
C.5).
Consequently, we can draw the following conclusions: 1)
In most cases, the best
[Table]
12.24 31.89 AdaCML 23.02 13.
19.88 42.03 HLR 20.30 11.
Ours
DPCML1 25.39 14.
22.26 46.79 DPCML2 29.88 17.
D r a m a C o m e d y A c t i o n T h
r ill e
r
A
d v e n t u r e R o m a n c e C r i m e S c i − F i F a n t
a s y C h il d r e n M y s t e r y W a r H o rr o r A n i m a t i o n M u s i c a l W e s t e r n F il m − N o i r D
o c u m e n t a r y
I M
A X
[Figure]
DPCML
DPCML performance of CML-based methods consistently surpasses the best MF-based competitors.
This suggests that it is necessary to develop CML-based RS algorithms.
Our proposed method consistently surpasses all the competitors significantly on all datasets, except the results for MAP and
MRR on CiteULike.
Even for the failure results, the performance is fairly competitive compared with the competitors.
This shows the effectiveness of our proposed algorithm.
Compared with studies targeting joint accessibility (i.e., M2F and MGMF), our proposed method significantly outperforms M2F and MGMF on all benchmark datasets.
This shows the advantage of the CML-based paradigm that deserves more attention along this direction in future work.
4.3 Quantitative Analysis
Fine-grained Performance Comparison.
Fig.4 presents the MAP metric over each interest group (movie genre) on MovieLens-10m. We can observe that our proposed framework could not only significantly outperform their single-vector counterparts in the majority interests but also improve the performance of minority groups in most cases.
Especially, compared with HarS, the performance [Table] improvement of DPCML2 on minority interests is sharp.
This shows that DPCML could reasonably focus on potentially interesting items even with the imbalanced item distribution.
Recommendation Diversity Evaluation. We test the performance of DPCML against CMLbased competitors with max-sum diversification (MaxDiv) [4]. The diversity results are shown in Tab.3.
We observe that: a) For methods within the same negative sampling strategy (i
[Table]
e., UniS and DPCML1, HarS and DPCML2), our proposed DPCML could achieve relatively higher max-sum values. This suggests the improvement of DPCML in terms of promoting recommendation diversity. b) In most cases (except for DPCML1 w/o DCRS on the MovieLens-1m dataset), DPCML outperforms other competitors even without regularization.
c) Most importantly, equipped with the regularization term DCRS, DPCML could achieve better diversification results against w/o DCRS.
Effect of the Diversity Control Regularization.
Fig.5 illustrates a 3 D-barplot based on the results of grid search on Steam-200k.
From the results, we can observe that the proposed regularization scheme could significantly boost performance on all metrics.
Moreover, there would induce different performances with different diversity values.
This suggests that controlling a proper diversity of the embeddings for the same user is essential to accommodate their preferences better.
Empirical Justification of Corol.1.
Fig.7 shows the empirical results on Steam-200k dataset.
Based on these results, we can see that, with the increase of C , the empirical risk (i.e., training loss) of DPCML ( C > 1 ) is significantly smaller than CML ( C = 1 ).
In addition, DPCML could substantially improve the performance of the validation/test set.
Thus, we can conclude that DPCML could induce a smaller generalization error than traditional CML.
This is consistent with Corol.1.
Sensitive Analysis of C .
Fig.8 demonstrates the performance of DPCML methods with different C on Steam-200k dataset.
We observe that a proper C could significantly improve the performance.
Besides, leveraging C too aggressively for DPCML2 may adversely hurt the performance since models optimized with hard samples are more likely to lead to the over-fitting problem with the increasing parameters. Sensitivity analysis of η .
We investigate the sensitivity of η ∈ { 0 , 1 , 3 , 5 , 10 , 20 , 30 } for recommendation results on the Steam-200k dataset.
The experimental results are listed in Tab.6 and Tab.7.
We can conclude that a proper η (roughly 10 ) could significantly improve the performance, suggesting the essential role of the proposed diversity control regularization scheme.
Training Efficiency.
Since DPCML includes multiple user representations, it will inevitably introduce extra complexity to the overall optimization.
We further investigate the efficiency of our proposed algorithm, presented in Fig.6.
This trend suggests that our proposed algorithm could achieve competitive performance with acceptable efficiency.
Ablation Studies of DCRS.
In order to show the effectiveness of our proposed DCRS, we compare its performance with the its three variants: a) w/o DCRS .
b) DCRS − δ 1 and c)
DCRS − δ 2 .
Please refer to Appendix.
C.6.8 to the details of each variant.
The empircal results on Steam-200k dataset are provided in Tab.8 and Tab.9.
From the above results, we can see that: In most cases, only [Figure] [Figure]
[Figure]
[Figure]
employing one of the two terms of DCRS could still improve the recommendation performance.
However, none of them could outperform our proposed method.
This strengthens the effectiveness of our proposed regularization scheme.
DCRS for MF-based Systems.
We attempt to apply the proposed diversity control regularization scheme (DCRS) for M2F [52, 12].
In addition, we further explore the effectiveness of DCRS for the general framework of joint accessibility (GFJA, Eq.(9) in the main paper).
The experimental results are summarized in Tab.10.
The overall performance suggests the superiority of our proposed method against the current multi-vector-based competitors.
Conclusion & Future Remarks
This paper pays attention to developing an effective CML-based algorithm when users have multiple categories of interests.
First, we point out that the current CML framework might induce preference bias, especially when the item category distribution is imbalanced.
To this end, we propose a novel algorithm called DPCML.
The key idea is to include multiple representations for each user in the model design.
Meanwhile, a novel diversity control regularization scheme is specifically tailored to serve our purpose better.
To see the generalization ability of DPCML on unseen test data, we also provide high probability upper bounds for the generalization error.
Finally, the experiments over a range of benchmark datasets speak to the efficacy of DPCML.
However, following the paradigm of CML, a possible limitation of DPCML is that it generally applies to implicit feedback but not explicit feedback since CML only cares about the relative preference ranking instead of concrete magnitude.
In the future, we will explore how to improve the recommendation diversity based on explicit feedback.
Acknowledgements
This work was supported in part by the National Key R&D Program of China under Grant 2018AAA0102000, in part by National Natural Science Foundation of China: U21B2038, 61931008, 62025604, 61971016, 6212200758 and 61976202, in part by the Fundamental Research Funds for the Central Universities, in part by Youth Innovation Promotion Association
CAS, in part by the Strategic Priority Research Program of Chinese Academy of Sciences, Grant
No.XDB28000000, in part by the China National Postdoctoral Program for Innovative Talents