Source-linked AI summary

Relational Collaborative Filtering:Modeling Multiple Item Relations for Recommendation

Xin Xin, Xiangnan He, Yongfeng Zhang, Yongdong Zhang, Joemon Jose

arXiv:1904.12796v3cs.IRcs.AI

TL;DR

Existing ICF methods use only coarse collaborative similarity despite the fine-grained relations connecting real-world items. RCF models relation types and values with hierarchical attention, preserves relational structure in item embeddings, and jointly trains these objectives; experiments on two real datasets show strong performance and explanation benefits.

  • Problem

    Existing ICF methods leverage only collaborative similarity, while incorporating multiple fine-grained item relations remains less explored.

  • Method

    RCF uses two-level attention over relation types and values and jointly optimizes recommendation with relational-structure preservation.

  • Results

    Experiments on two real datasets show that RCF outperforms several recently proposed methods and supports recommendation explanations using multiple item relations.

  • Takeaways & Limitations

    Modeling both relation types and values helps capture user preference while making relational information available for recommendation explanations.

  • Takeaways & Limitations

    The relational setting must account for multiple relations between item pairs and shared values across relation types, increasing modeling complexity.

Abstract

from arXiv · show

Existing item-based collaborative filtering (ICF) methods leverage only the relation of collaborative similarity. Nevertheless, there exist multiple relations between items in real-world scenarios. Distinct from the collaborative similarity that implies co-interact patterns from the user perspective, these relations reveal fine-grained knowledge on items from different perspectives of meta-data, functionality, etc. However, how to incorporate multiple item relations is less explored in recommendation research. In this work, we propose Relational Collaborative Filtering (RCF), a general framework to exploit multiple relations between items in recommender system. We find that both the relation type and the relation value are crucial in inferring user preference. To this end, we develop a two-level hierarchical attention mechanism to model user preference. The first-level attention discriminates which types of relations are more important, and the second-level attention considers the specific relation values to estimate the contribution of a historical item in recommending the target item. To make the item embeddings be reflective of the relational structure between items, we further formulate a task to preserve the item relations, and jointly train it with the recommendation task of preference modeling. Empirical results on two real datasets demonstrate the strong performance of RCF. Furthermore, we also conduct qualitative analyses to show the benefits of explanations brought by the modeling of multiple item relations.

1 INTRODUCTION

Existing item-based collaborative filtering relies on coarse collaborative similarity, while real-world items have multiple fine-grained relations with concrete semantics. RCF integrates these relations through hierarchical modeling and relational-structure preservation.

  • Existing ICF methods consider only collaborative similarity, which is macro-level, coarse-grained, and semantically limited.
  • Real-world items can be related through attributes such as shared directors, genres, functionality, or visual similarity, and these relations may affect users differently.
  • RCF represents each item relation with a two-level hierarchy consisting of relation type and relation value.
  • Multiple relations may connect the same item pair, and the same value may appear across different relation types, complicating relational modeling.
  • A two-level attention mechanism first weighs relation types and then estimates the contribution of interacted items under each type.
  • RCF jointly trains preference modeling with a task that preserves item relational structure, and experiments on two datasets report stronger performance and explanations.

2 METHODOLOGY

The paper introduces the multiple-item-relation collaborative-filtering problem before presenting RCF.

  • The methodology section first introduces collaborative filtering with multiple item relations.
  • It then elaborates the proposed Relational Collaborative Filtering method.
  • The section proceeds from problem introduction to method description.

2.1 Problem Formulation

RCF formulates recommendation using both user–item interaction history and explicit multiple item relations represented as heterogeneous item-item edges.

  • Conventional ICF generates recommendations from collaborative similarity encoding co-interaction patterns between items.
  • An item pair’s relation is defined as r = <t,v>, where t denotes the relation type and v denotes the relation value.
  • RCF generates recommendations from both user–item interaction history and item relational data.
  • RCF’s interaction graph contains implicit collaborative-similarity links and explicit multiple item relations represented by heterogeneous edges.
  • The methodology models user–item preference, relational structure between item embeddings, and their end-to-end integration through multi-task learning.

2.2 User-Item Preference Modeling

RCF models user preference from multiple item relations using hierarchical attention. It groups historical items by relation type, then weights specific items using target, historical-item, and relation-value information.

  • User-Item Preference Modeling: RCF uses hierarchical attention to model user preference from multiple item relations.The framework includes first-level attention over relation types and second-level attention over historical items.
  • User-Item Preference Modeling: Historical items are divided into relation-specific sets, and one item may appear in multiple sets when multiple relations connect it to the target.Items without explicit relations are assigned a latent relation representing collaborative similarity.
  • User-Item Preference Modeling: The first-level attention estimates how important each relation type is for a user.Its attention score is computed for different relation types before aggregating their associated historical-item representations.
  • User-Item Preference Modeling: The second-level attention weights historical items using the target item, historical item, and relation value.Relation values matter because users may prefer particular values within the same relation type.
  • User-Item Preference Modeling: A smoothed softmax replaces standard softmax because relation-specific item sets can differ greatly in size.The paper states that standard softmax can create very large denominators and cause gradient vanishing for corresponding item embeddings.
  • User-Item Preference Modeling: The resulting target-aware user embedding feeds an MLP for prediction, and BPR ranks positive items above negative items.The predicted score is produced after preference modeling, while the BPR framework defines pairwise learning over positive and negative items.

2.3 Item-Item Relational Data Modeling

RCF models item relations as knowledge-graph-like relational data while addressing the two-level structure of relation type and relation value and the reversibility of item relations. It uses relation embeddings and a commutative scoring function to preserve these structures.

  • Item relational data: RCF treats item relational data as triplets in a knowledge graph, with items as entities and relation types connecting them.Knowledge graph embedding methods learn signals from these relational structures in a continuous vector space.
  • Challenges: The relation r=<t,v> contains both a relation type and relation value, so one embedding cannot represent it without losing either abstraction or detail.For example, a shared genre relation can have the value fiction.
  • Challenges: Item relations are reversible, making the relational graph undirected and causing translation-based objectives such as TransE to admit trivial solutions.Applying both e1 + r ≈ e2 and e2 + r ≈ e1 can encourage r ≈ 0 and e1 ≈ e2.
  • Relation representation: RCF represents a relation by combining embeddings for its type and value, preserving type-level similarity while retaining value-specific fidelity.This also handles the same value appearing in relations with different types.
  • Relation scoring: For an item triplet, RCF uses a diagonal relation matrix and a commutative scoring design, then contrasts observed and unobserved relation triplets.The objective ranks a positive item above a negative item given the head item and relation; the latent relation is excluded from this process.

2.4 Multi-Task Learning

RCF jointly trains recommendation and relation-modeling objectives so item embeddings support both user-preference prediction and relational-structure preservation. Unit-norm constraints prevent the joint objectives from being reduced through embedding rescaling.

  • Multi-task objective: RCF combines the recommendation loss Lrec and relation loss Lrel end to end through multi-task learning.The combined objective is Lrec + γLrel.
  • Parameter constraints: RCF constrains user, item, relation-type, and relation-value embeddings to unit-norm vectors during training.These constraints prevent either loss from being reduced simply by scaling embedding norms.
  • Training procedure: The learning algorithm samples interaction and relation mini-batches, computes both losses, and updates all parameters using their weighted sum.The procedure includes separate batches for user-item data and relation triplets.

2.5 Discussion

RCF extends collaborative filtering with explicit, fine-grained item relations and differs from knowledge-graph and path-based recommendation methods in how it models preference and scales. It also generalizes conventional collaborative-filtering models under restricted settings.

  • Conventional collaborative filtering: RCF generalizes conventional collaborative filtering by reducing to a matrix-factorization and item-attention ensemble when only collaborative similarity and inner products are retained.Its broader model explicitly captures multiple item relations at a fine-grained level.
  • Knowledge-graph methods: Unlike embedding-based knowledge-graph recommenders, RCF directly models item similarity from collaborative and multiple concrete relations.The paper distinguishes this preference-modeling focus from using a knowledge graph only to guide item representations.
  • Path-based methods: RCF avoids the user-item path construction, sampling, and pruning required by path-based methods when the number of users and items is very large.Its recommendation model is described as different from path-based methods.
  • Relation-aware methods: MCF models only the special “also-viewed” collaborative relation, while MoHR handles heterogeneous relations only for sequential recommendation.The paper positions RCF as covering multiple semantic relations beyond these settings.

3 EXPERIMENTS

The experiments evaluate RCF on MovieLens and KKBox using leave-one-out top-k recommendation metrics against several baselines. RCF achieves the best performance across both datasets and all reported top-k values, with the authors attributing the gains to explicit multiple-item-relation modeling.

  • Experimental setting: Experiments use MovieLens and KKBox, representing movie and music recommendation, respectively.MovieLens contains 943 users and 1,682 movies; the processed KKBox data contains 24,613 users, 61,877 items, and 2,170,690 interactions.
  • Experimental setting: Leave-one-out evaluation holds out two interactions per user for validation and testing, using chronological splits for MovieLens and random splits for KKBox.The remaining interactions are used for training.
  • Evaluation: Recommendation quality is measured with HR, MRR, and NDCG at top-k positions, where MRR and NDCG weight higher-ranked items more strongly.The baselines include MF, FISM, NAIS, FM, NFM, CKE, and MoHR where applicable.
  • Model comparison: RCF achieves the best performance among all methods on both datasets for every reported top-k value.Table 3 compares k = 5, 10, and 20; its final column reports average relative improvement over the baseline.
  • Model comparison: Compared with FISM and NAIS, RCF’s gains are associated by the authors with modeling multiple concrete item relations rather than collaborative similarity alone.The results are presented as evidence for the importance of multiple item relations in user-preference modeling.
  • Model comparison: RCF also outperforms FM and NFM, which use auxiliary information without explicitly modeling item relations.The comparison reports higher performance for RCF under the same MLP settings.
  • Model comparison: RCF outperforms CKE and MoHR, with the paper attributing the latter comparison partly to RCF capturing long-term dependencies beyond the last historical item.MoHR is relation-aware but considers only the relation between the last historical item and the target item.

3.3 Studies of Item Relations (RQ2)

RCF’s ablations show that both hierarchical attention levels and both relation components contribute to recommendation quality. Joint relational training also improves performance, while attention visualizations provide interpretable user- and domain-level patterns.

  • Effect of the hierarchy attention.: Both first-level and second-level attentions are necessary to capture user preference, with the second level especially improving expressiveness by weighting each historical item.The second-level attention calculates a specific weight for every historical item.
  • Ablation studies on relation modeling.: RCF-type outperforms the single-relation model, demonstrating that relation types help model preferences across item classes sharing macro-level similarities.Relation types describe item relations at an abstract level.
  • Ablation studies on relation modeling.: RCF-value also outperforms the single-relation model, showing that relation values capture fine-grained preferences and increase model fidelity and expressiveness.Relation values describe relations between specific items from a micro perspective.
  • Ablation studies on relation modeling.: RCF achieves the best ablation performance, indicating that relation types and relation values are jointly necessary for modeling user preference.The result also supports the proposed two-level attention for hierarchical item relations.
  • Effect of multi-task learning.: Increasing γ above zero improves MRR@10 and NDCG@10 on both datasets, although performance later decreases as γ becomes larger.Jointly training recommendation and relation-preservation objectives helps, but recommendation must remain the primary loss component.
  • Qualitative analyses.: MovieLens users attend most to genres, followed by actors and directors, while music users prioritize artists, composers, and lyricists.The music-domain relation attention is smaller than in the movie domain, and RCF shows a larger improvement on KKBox.
  • Qualitative analyses.: For MovieLens user u54, the strongest relation type is shared genres, with crime and sci-fic receiving the largest relation-value attention.The reported attention weights are 0.4003 for shared genres, 0.4477 for crime, and 0.3928 for sci-fic.

4 RELATED WORK

Prior ICF methods infer preference from collaborative similarity and have incorporated attention, but they remain limited by coarse, semantically weak item relations. Related approaches also include feature- and relation-aware methods with narrower relation coverage or sequential assumptions.

  • Collaborative filtering: Item-based collaborative filtering infers preference for a target item from its similarity to items in the user’s interaction history.FISM represents the user by mean-aggregating embeddings of historically interacted items.
  • Limitations of existing ICF: Existing ICF methods rely solely on collaborative similarity, which is coarse-grained and lacks semantic meaning, limiting model performance and convincing explanations.The relation measures co-occurrence patterns in user interaction histories.
  • Attention-based recommendation: Attention-based methods replace mean aggregation with weighted summation, motivated by the idea that different parts of the input receive different importance.The cited related work applies attention to improve FISM and generate user representations.

5 CONCLUSION

The paper concludes that RCF models multiple item relations through hierarchical attention and relationally structured embeddings, achieving stronger recommendation performance and more convincing behavioral interpretation. Future work targets more complex item relations and dynamic user relations.

  • Conclusion: RCF extends ICF from collaborative similarity to fine-grained item relations and uses hierarchical attention to construct user representations.The framework models both relation types and relation values.
  • Conclusion: RCF jointly optimizes recommendation and relational-structure-preservation tasks in an end-to-end multi-task framework.This uses relational data both for target-aware user embeddings and for structuring item embeddings.
  • Conclusion: Experiments on two real-world datasets show significant improvement over state-of-the-art baselines, while qualitative analyses support more convincing explanations of user behavior.The conclusion presents recommendation performance and behavioral comprehension as the paper’s main outcomes.
  • Future work: Future work includes deploying RCF on datasets with more complex item relations and extending it to dynamic user relations and adaptive pairwise-ranking samplers.These directions define the stated scope beyond the current static item-relation setting.
Loading 1904.12796v3…