Source-linked AI summary
Latent Relational Metric Learning via Memory-based Attention for Collaborative Ranking
Yi Tay, Anh Tuan Luu, Siu Cheung Hui
TL;DR
Collaborative filtering from implicit feedback must model many user-item interactions despite geometric restrictions in existing metric-learning approaches. LRML learns interaction-specific latent relation vectors through memory-based attention, achieving state-of-the-art benchmark performance and revealing latent rating, temporal, and attribute information.
Problem
Existing metric learning for implicit collaborative filtering can be geometrically restrictive, especially when many interactions force user-item pairs toward the same point.
Method
LRML uses memory-based neural attention to construct adaptive latent relation vectors specific to each user-item interaction.
Results
LRML achieves state-of-the-art performance on ten benchmark datasets, with 6%-7.5% gains over CML and other models on large datasets.
Takeaways & Limitations
Attention analysis indicates that LRML can infer explicit rating, temporal, and item-attribute information from implicit interaction data.
Takeaways & Limitations
CML’s algebraic formulation is ill-posed when interaction counts greatly exceed the available user and item variables.
Abstract
from arXiv · showhide
This paper proposes a new neural architecture for collaborative ranking with implicit feedback. Our model, LRML (\textit{Latent Relational Metric Learning}) is a novel metric learning approach for recommendation. More specifically, instead of simple push-pull mechanisms between user and item pairs, we propose to learn latent relations that describe each user item interaction. This helps to alleviate the potential geometric inflexibility of existing metric learing approaches. This enables not only better performance but also a greater extent of modeling capability, allowing our model to scale to a larger number of interactions. In order to do so, we employ a augmented memory module and learn to attend over these memory blocks to construct latent relations. The memory-based attention module is controlled by the user-item interaction, making the learned relation vector specific to each user-item pair. Hence, this can be interpreted as learning an exclusive and optimal relational translation for each user-item interaction. The proposed architecture demonstrates the state-of-the-art performance across multiple recommendation benchmarks. LRML outperforms other metric learning models by $6\%-7.5\%$ in terms of Hits@10 and nDCG@10 on large datasets such as Netflix and MovieLens20M. Moreover, qualitative studies also demonstrate evidence that our proposed model is able to infer and encode explicit sentiment, temporal and attribute information despite being only trained on implicit feedback. As such, this ascertains the ability of LRML to uncover hidden relational structure within implicit datasets.
1 INTRODUCTION
The paper targets implicit-feedback collaborative filtering, where conventional inner-product and metric-learning approaches face representational and geometric limitations. LRML addresses these limitations by learning user-item-specific latent relations with memory-based attention and reports strong benchmark performance and qualitative interpretability.
- Motivation: Implicit-feedback recommender systems use clicks, likes, and bookmarks to help users navigate excessive content choices.The paper frames recommendation as selecting relevant content from very large collections.
- Background: Matrix Factorization represents users and items through latent components whose inner product models their relationships.MF is presented as a widely used baseline for implicit collaborative filtering.
- Problem: CML improves on inner-product modeling with metric learning but geometrically constrains many-to-many interactions by fitting users and interacted items toward one point.This congestion makes precise ranking difficult, particularly as interaction density grows.
- Approach: LRML learns an adaptive relation vector for each user-item interaction, using an auxiliary memory module and neural attention to construct pair-specific translations.The relation vector is intended to capture hidden semantics in implicit interactions.
- Approach: LRML introduces the Latent Relational Attentive Memory module to generate latent relation vectors and increase flexibility, modeling capability, and interpretability.The module is described as a memory store of concepts combined through attention.
- Results: On ten benchmark datasets, LRML outperforms CML and other baselines, with 6%-7.5% gains on large datasets such as Netflix Prize and MovieLens20M.Qualitative attention analysis also indicates inferred rating, temporal, and item-attribute information from implicit binary training data.
2 BACKGROUND
The paper studies implicit collaborative filtering, where observed interactions identify user-item relationships but unobserved entries do not necessarily represent negative feedback. The recommendation task is to estimate scores for those unobserved entries.
- Problem formulation: Implicit collaborative filtering learns from interactions such as clicks, bookmarks, and likes.Users and items are represented as sets P and Q in the problem formulation.
- Problem formulation: A zero entry does not necessarily indicate negative feedback because the user may simply be unaware of the item.The central prediction task is estimating scores for unobserved entries in Y.
- Existing approaches: The background section positions Matrix Factorization among the popular algorithms for implicit collaborative filtering.MF is introduced as a prominent family of existing approaches after the problem formulation.
2.2 Collaborative Metric Learning (CML)
CML models user-item interactions by minimizing Euclidean distance, but its same-point geometry becomes restrictive for many interactions. The paper further characterizes CML as an ill-posed algebraic system in common large-scale settings.
- CML formulation: CML minimizes Euclidean distance between user and item vectors for each interaction.Its scoring function is based on the distance between p and q, with pairwise hinge-loss training.
- Geometric restriction: CML’s scoring objective tries to fit each user-item pair into the same point in vector space.This geometric restriction is problematic because users interact with many items.
- Geometric restriction: Large or dense datasets expose adverse effects because CML forces all of a user’s item interactions toward one point.The paper links this behavior to geometric inflexibility and ranking difficulty.
- Algebraic limitation: CML can be considered an ill-posed algebraic system when the number of interactions is large.The paper presents this as a theoretical limitation of the objective function.
- Algebraic limitation: With N interactions, the objective yields N×d equations but only (|P|+|Q|)×d free variables.Because N ≫ d(|P|+|Q|) in most settings, the system is overconstrained according to the paper’s proof.
2.3 Translating in Vector Space
The paper extends user-item modeling from a two-dimensional interaction structure to a latent relational structure represented through translations in vector space. LRML uses adaptive, trainable relation vectors rather than placing users and items at the same point.
- Adaptive translation: LRML uses adaptive translation learned as a weighted representation over augmented memory through neural attention.The attention vector forms a continuous weighted representation of the memory.
- Motivation: Translation-based modeling draws on semantic relations represented by relation vectors in word and knowledge-graph embeddings.The paper connects its approach to TransE and semantic translation in NLP.
- Latent relational structure: LRML assumes a latent relational 3D structure extending the 2D user-item collaborative-filtering graph.The authors interpret this structure as inducing a latent knowledge graph from the interaction graph.
- Comparison with CML: Unlike CML’s same-point placement, LRML fits users and items using adaptive trainable latent vectors and an optimal translation for each interaction.This design is intended to alleviate CML’s instability and geometric inflexibility.
- Comparison with TransRec: LRML differs from TransRec because it models user-item relations rather than sequential transitions between items.Both use translation principles, but their recommendation objectives differ.
2.4 Deep Learning
Deep learning has produced neural recommendation models for diverse tasks, including sequence-aware, review-based, and collaborative filtering systems. LRML uses neural attention over an augmented memory module to generate latent relational vectors, differing from content-based attention models.
- Neural networks have been applied to sequence-aware recommendation using recurrent and convolutional architectures.
- Review-based recommendation is another emerging direction within neural collaborative filtering.
- NeuMF combines inner-product matrix factorization with a multilayer perceptron to model user-item interactions.
- LRML applies neural attention over an augmented memory module to generate latent relation vectors.
- Unlike content-based attention, LRML uses attention to uncover hidden relational structure rather than attend over features for prediction.
3 OUR PROPOSED MODEL
LRML models each user-item pair with a relation vector, using the translational principle p + r ≈ q rather than directly matching user and item vectors. The model generates and learns these vectors through memory-based attention and pairwise ranking.
- LRML represents users and items with vectors and models their interaction through the translational principle p + r ≈ q.
- Users and items are converted into dense vector representations by an embedding layer.
- A neural attention mechanism over augmented memory matrix M generates a user-item-dependent relation vector r.
- The model optimizes ∥p + r − q∥≈0 with pairwise ranking using hinge loss and negative sampling.
- Figure 2 illustrates LRML as an end-to-end differentiable architecture with a key-addressed LRAM module and six memory slices in the example.
3.1 Embedding Layer
LRML converts one-hot user and item identifiers into low-dimensional dense vectors using separate embedding matrices.
- One-hot user and item identifiers are mapped to low-dimensional dense vectors through embedding matrices P and Q.
3.2 LRAM - Latent Relational Attentive Memory Module
LRAM builds user-item-specific latent relations from a trainable memory matrix. It forms joint embeddings, computes attention over memory keys, and produces a weighted relation vector while preserving end-to-end differentiability with modest parameter cost.
- LRAM is a centralized memory store whose N memory slices provide capacity and expressiveness for latent user-item relations.
- The module receives a user-item pair and returns a relation vector r with the same dimensionality as the user and item vectors.
- LRAM first constructs a joint user-item embedding before learning attention over memory keys.
- A Hadamard product forms the joint embedding, and the paper reports that it performs better than an MLP alternative.
- Attention scores are computed from the joint embedding and key matrix K, then normalized into a probability distribution with Softmax.
- Softmax makes the attention mechanism end-to-end differentiable.
- The attention vector produces r by adaptively selecting relevant information from memory matrix M as a weighted representation.
- LRAM adds 2 × N × d parameters, with N typically below 100 in the experiments, making its parameter cost negligible.
3.3 Optimization and Learning
LRML scores user-item pairs by penalizing the distance between a user vector translated by a learned relation vector and the item vector. It is trained with pairwise hinge loss and regularized by constraining embeddings to the unit ball.
- Optimization: Soft attention over LRAM makes LRML end-to-end differentiable and trainable with stochastic gradient descent.The model uses soft attention over the memory module in its final network layer.
- Scoring function: LRML scores each user-item pair by the L2 distance between p + r and q, where r is constructed by the LRAM module.The score penalizes deviation of the translated user vector from the item vector.
- Objective function: Pairwise hinge loss compares each positive pair with a corrupted user-item pair and separates them using margin λ.The loss applies max(0, s(p,q) + λ − s(p′,q′)).
- Objective function: The same generated latent relation vector is used for the negative example because early empirical results showed better performance than generating a separate vector.This design choice is explicitly motivated by the authors’ empirical observation.
- Regularization: User and item embeddings are projected into the unit Euclidean ball after each mini-batch to regularize training and prevent overfitting.The constraints are ∥p*∥2 ≤ 1 and ∥q*∥2 ≤ 1.
4 PERFORMANCE EVALUATION
LRML is evaluated against established collaborative-filtering and neural baselines across ten benchmark datasets using leave-one-out ranking. It achieves the best reported ranking performance on every dataset, with especially large gains on large datasets and only slight additional runtime over CML.
- 4.1 Datasets: The evaluation covers Netflix Prize, MovieLens1M, MovieLens20M, IMDb, LastFM, Books, and Delicious among a broad set of benchmark datasets.Netflix Prize uses a subset restricted to 2005 ratings and users with fewer than 100 interactions.
- 4.3 Evaluation Protocol: The leave-one-out protocol uses each user’s last item for testing, with random test sampling when timestamps are unavailable and 100 non-interacted items sampled for ranking.A separate item per user forms the development set.
- 4.5.1 Comparison against CML: LRML achieves the best nDCG@10 and H@10 performance on all ten benchmark datasets.The comparison includes multiple collaborative-filtering and neural baselines.
- 4.5.1 Comparison against CML: On Netflix Prize and MovieLens20M, LRML outperforms CML by about 6% and 7.5%, respectively, on nDCG@10.The gains on H@10 are described as similarly high.
- 4.5.1 Comparison against CML: On smaller datasets, LRML performs at least equally well as CML or improves by roughly 1%–4%.The reported range includes marginal gains on Books and Delicious and larger gains on Meetup or Twitter (WW).
- 4.5.3 Comparison on Runtime: LRML adds approximately 10–15 seconds per epoch, or 5%–10% runtime, over CML on Netflix Prize and MovieLens20M.It remains faster than NeuMF and MLP, while changing LRAM size from N = 50 to N = 100 has minimal runtime impact.
5 DISCUSSION AND ANALYSIS
The analysis shows that LRAM attention and relation vectors encode rating, temporal, and user-item attribute structure that is not supplied during training. These patterns support LRML’s ability to uncover hidden relational structure in implicit interactions.
- 5.1 RQ4: What is the LRAM module learning?: LRML visualizes mean LRAM attention by attribute class, making memory-slice importance interpretable for user-item interactions.The procedure groups pairs by an attribute, averages their attention vectors, and compares the resulting patterns across classes.
- 5.1.1 LRAM Encodes Explicit Rating Information.: Explicit ratings are encoded in LRAM despite not being provided during training.On MovieLens1M, attention patterns differ across rating classes from 1 to 5.
- 5.1.1 LRAM Encodes Explicit Rating Information.: M2-M4 are mostly associated with bad ratings, whereas high attention to M6, M7, and M9 signifies good ratings.The amount of attention to M6, M7, and M9 correlates with explicit rating score.
- 5.1.2 LRAM encodes temporal information.: LRAM encodes temporal information even though timestamps are not used during training.After timestamps are divided into 10 ascending bins, attention to M8 increases and attention to M6 decreases across time.
- 5.2 RQ5: What do the relation vectors represent? Are they meaningful?: Similar relation vectors often correspond to matching user or item attributes more frequently than random chance.Item category improves over random chance by 7.32%, while 15.07% of pairs exactly match on item category and job, 9.51% above random chance.
- 5.2 RQ5: What do the relation vectors represent? Are they meaningful?: These findings suggest that architectural bias helps LRML capture fine-grained user behavior from simple implicit feedback.The reported hidden structure includes ratings, temporal information, and item or user attributes.
6 CONCLUSION
LRML is an attention-based, memory-augmented architecture that models user-item relationships with latent relation vectors. It achieves state-of-the-art performance across 10 implicit collaborative-ranking benchmarks and encodes additional relational information absent from training.
- 6 CONCLUSION: LRML models user-item relationships in metric space with latent relation vectors generated by an attention-based memory architecture.The model is designed for implicit collaborative ranking.
- 6 CONCLUSION: LRML demonstrates state-of-the-art performance on 10 publicly available benchmark datasets for implicit collaborative ranking.The conclusion reports larger relative improvements on large datasets such as Netflix Prize and MovieLens20M.
- 6 CONCLUSION: Attention analysis finds that LRAM and the relation vectors encode ratings, temporal information, and item attributes absent during training.These findings indicate hidden relational structure in the implicit user-item interaction matrix.