Abstract
Sequential Recommendation (SR) models typically rely on the chronological order of user interactions to predict future behavior. However, standard Transformer-based architectures often overlook the rich auxiliary relationships between items, such as shared brands or categories, which are critical for addressing data sparsity. This paper introduces MT4SR (Multi-relational Transformer for Sequential Recommendation), a framework that integrates these multi-relational signals directly into the self-attention mechanism. By combining high-order temporal transitions with semantic item affinities and cross-sequence regularization, MT4SR achieves significant performance gains, particularly in cold-start scenarios where user history is limited.
Introduction
Modern Sequential Recommendation (SR) aims to capture the evolving preferences of users by modeling their interaction history. While state-of-the-art models like SASRec utilize Transformers to identify temporal patterns, they primarily treat item sequences as isolated chronological events. This approach ignores the "semantic bridges" provided by auxiliary item relationships—such as "also bought," "same brand," or "similar category."
These auxiliary relationships are vital for two reasons. First, they help mitigate the cold-start problem: when a user has a very short history, temporal patterns alone are insufficient for accurate prediction. Second, they facilitate the learning of more robust item embeddings by incorporating domain knowledge that simple interaction data might miss. MT4SR addresses these challenges by mathematically integrating multi-relational signals into the Transformer’s high-order transition modeling.
Methodology
The MT4SR framework introduces three primary innovations designed to leverage item metadata within the self-attention architecture.
1. Multi-Relational Self-Attention (MRSA)
Standard self-attention mechanisms use a scaled dot-product ($QK^T$) to calculate correlation scores between items in a sequence. MT4SR expands this by incorporating relationship-specific scoring terms. Drawing inspiration from knowledge graph embedding techniques (specifically the ANALOGY model), the authors treat the attention mechanism as a variant of a knowledge scoring function. This allows the model to learn unique weight matrices for different types of item relationships, effectively transforming the Transformer into a multi-relational reasoning engine.
2. Intra-Sequence Regularization ($L_{intra}$)
To ensure that the added relational parameters align with ground-truth metadata, MT4SR employs Intra-Sequence Regularization. This module supervises the attention weights: if two items within a user’s history share a known relationship (e.g., they belong to the same brand), the model is penalized if the attention score between them is low. This forces the model to prioritize semantically related items during the encoding process.
3. Inter-Sequence Related Items Modeling ($L_{inter}$)
A key observation in this research is that over 90% of related item pairs never appear within the same user sequence. To capture these "hidden" collaborative signals, the $L_{inter}$ module regularizes the model based on related items across different sequences. By modeling these inter-sequence dependencies, MT4SR can connect users with similar behavioral patterns even if their specific purchase histories do not overlap perfectly.
Experimental Evaluation
Datasets and Setup
The model was evaluated using four sub-categories from the Amazon review dataset: Beauty, Toys, Tools, and Office. These datasets are characterized by high sparsity but contain rich metadata. The authors utilized four specific auxiliary relationship types: 'also viewed,' 'also bought,' 'bought together,' and 'buy after viewing.'
Performance Metrics
MT4SR was compared against several state-of-the-art baselines, including SASRec, STOSA, and MoHR. Performance was measured using standard recommendation metrics: Recall@N, Normalized Discounted Cumulative Gain (NDCG@N), and Mean Reciprocal Rank (MRR).
Key Insights and Results
- Superior Predictive Accuracy: MT4SR demonstrated significant improvements over all baselines, with performance gains ranging from 3.56% to 21.87% across the tested datasets.
- Solving the Cold-Start Challenge: The model's most striking success occurred with "cold-start" users (those with sequence lengths $\le 3$). In these cases, MT4SR showed relative improvements of nearly 200% compared to standard sequential models, proving that auxiliary relationships can effectively compensate for a lack of interaction history.
- The Importance of Inter-Sequence Signals: The discovery that the vast majority of related items are spread across different sequences highlights a major limitation in previous SR models. By incorporating $L_{inter}$, MT4SR successfully taps into a massive pool of previously unused relational data.
- Ablation Studies: Robustness tests confirmed that both $L_{intra}$ and $L_{inter}$ are essential. Removing either regularization module resulted in a measurable decline in accuracy, indicating that both local (intra-sequence) and global (inter-sequence) relational signals are necessary for optimal performance.
Conclusion and Future Work
MT4SR represents a significant step forward in integrating knowledge graph concepts with sequential Transformers. By treating attention as a multi-relational embedding task, the model captures complex item affinities that temporal-only models miss.
While the model introduces some computational overhead due to relationship-specific matrices, the trade-off is justified by the massive gains in recommendation quality, especially for sparse datasets. Future research may focus on automating the weighting of different relationship types through gating mechanisms and exploring the model's scalability to even larger, more complex metadata environments.
Summary updated