TL;DR
Match4Rec improves sequential recommendation systems by combining bidirectional context learning (like BERT) with a global matching task. By introducing a dedicated user token ([UID]) and a multi-task training strategy, it successfully captures both short-term local intent and long-term global user preferences, outperforming state-of-the-art baselines.
What Problem Does This Paper Address?
Sequential recommender systems predict a user's next action based on their history. Unidirectional models (like RNNs or SASRec) look strictly left-to-right, while bidirectional models (like BERT4Rec) use a "Cloze" or masking task to look at both left and right context.
However, existing bidirectional models suffer from a major limitation: they focus heavily on local item-to-item transitions (local purposes) and lack a cohesive, global representation of the user's overall preference. This limitation becomes glaringly obvious when interaction histories are short or contain noisy, aimless clicks, leading to a "mask dilemma" where missing context makes local prediction highly inaccurate. Match4Rec bridges this gap by explicitly modeling global user preferences alongside local item dependencies.
Methods
Match4Rec builds upon the Transformer-based bidirectional architecture popularized by BERT, but introduces a dual-task learning framework to capture both local and global semantics:
- Explicit User Representation: Inspired by paragraph embedding techniques (
doc2vec), the authors prepend a special[UID]token to the beginning of the user behavior sequence. The final hidden state of this token serves as the user's global semantic vector. - Dual-Task Objective:
- Mask Task: Randomly masks a proportion ($\rho$) of items in the sequence and forces the model to predict their IDs using surrounding context.
- Matching Task: Computes a matching score (via dot product) between the
[UID]vector and item embeddings (one positive target item and $n$ sampled negative items) to capture global alignment. - Mitigating Mask Noise: Because masking items introduces artificial noise that can distort the global user representation, the authors propose a novel sample production method. During training, they mix three types of instances: full Mask+Matching, Last-item Masking only, and pure Matching (using the original unmasked sequence).
Datasets
The model was evaluated on four real-world benchmark datasets varying in domain and sparsity:
- Amazon Beauty: Highly sparse, short user interaction sequences (average length of 6.88).
- Amazon Video Games: Sparse, short sequences (average length of 7.54).
- Steam: Large-scale video game review dataset with moderate sequence lengths.
- MovieLens-1M (ML-1M): A dense, widely used benchmark dataset with long user interaction histories (average length of 163.5).
Key Insights and Ideas
- The Power of Global Supervision: Simply relying on self-attention to aggregate item sequences isn't enough to build a robust user profile. Explicitly supervising the first token (
[UID]) with a matching loss forces the network to compress global preferences into a single vector. - Solving the Mask Dilemma: In short sequences, masking too many items leaves insufficient context for the model to learn. By mixing unmasked sequences (pure matching samples) into the training batch, the model learns stable global representations even when local context is heavily disrupted by masks.
- Attention Behavior: Attention weight visualizations reveal that the user representation is heavily influenced by recent actions (aligning with human intuition), while item representations successfully leverage bidirectional context from both sides.
Key Results
The authors evaluated Match4Rec using a leave-one-out strategy, comparing it against standard baselines (POP, NCF, FPMC) and strong sequential models (GRU4Rec+, Caser, SASRec, BERT4Rec).
- Consistent Superiority: Match4Rec outperformed all baselines across all four datasets on Normalized Discounted Cumulative Gain (NDCG@10) and Hit Ratio (HR@10).
- Substantial MRR Gains: The model achieved an average 9.93% improvement in Mean Reciprocal Rank (MRR) against the strongest baselines, showing it is significantly better at ranking the true next item higher up in the recommendation list.
- Ablation Validation: Removing the matching task (
w/o Matching Task) led to a noticeable performance drop, especially on sparse datasets like Amazon Beauty, proving that global matching supervision is vital when local sequence data is scarce.
Limitations and Future Work
While Match4Rec shows strong performance by combining sequence modeling with matching, it currently treats all interactions as uniform implicit feedback (e.g., treating all reviews or clicks as a binary interaction). The authors note that real-world platforms contain heterogeneous interaction types (clicks, adds-to-cart, reviews, purchases). Future work will focus on fusing these multi-typed, heterogeneous behaviors into the Match4Rec framework to further refine the global user representation.
Summary updated