TL;DR
This paper tackles the challenge of recommending the single most relevant item to users based on their recent, anonymous browsing history (session-based recommendation). They introduce a novel objective function, RRLC, that combines a specialized reciprocal rank loss for better top-one prediction and a listwise contrastive loss to handle short, sparse user sessions, leading to significant performance improvements.
What Problem Does This Paper Address?
In today's privacy-conscious world, recommender systems are increasingly moving towards using anonymous user behavior, often referred to as Session-Based Recommendation (SBR). This presents two major hurdles:
- Top-One Ranking: The goal is to predict just one item, and the standard evaluation metric, Mean Reciprocal Rank (MRR), is notoriously difficult to optimize directly. Traditional gradient-based methods struggle because the gradients for lower ranks (e.g., 100th or 1000th) are very small, leading to slow convergence. Many existing methods use surrogate losses like Binary Cross-Entropy (BCE), which don't perfectly align with the MRR objective.
- Short Sequences: User sessions are often very brief, sometimes containing fewer than five items. This sparsity makes it hard for models to accurately infer user intent. While contrastive learning with data augmentation can help with short sequences, augmenting them too aggressively can lead to inconsistencies that break the core assumptions of traditional contrastive methods.
Methods
The authors propose a new objective function called RRLC (Reciprocal Rank Loss + Listwise Contrastive Loss) to address these challenges.
- Reciprocal Rank Loss (LRR): To directly optimize for top-one ranking, they introduce a modified reciprocal rank loss. This loss function uses a "flexibility factor" ($\sigma$) to adjust the shape of the loss curve. This allows for larger gradients for lower-ranked items during training, helping the model learn more effectively, while still maintaining consistency with the exact reciprocal rank objective for top ranks. By tuning $\sigma$, they can balance optimization ease with adherence to the target metric.
- Listwise Contrastive Loss (LLC): To handle short sequences, they employ a listwise contrastive approach. This involves:
- Frequent Pattern Mining: Identifying common item sequences ("patterns") within the training data to understand typical user navigation.
- Augmented Session Generation: Creating an "augmented" version of a user's session by inserting items based on these mined patterns. This process is iteratively applied to ensure consistency.
- Ranked List Comparison: Feeding both the original and augmented sessions into a recommender model to generate two ranked lists of potential next items.
- Consistency Measurement: Using an approximate version of Rank-Biased Overlap (RBO) to measure the similarity between these two ranked lists. This approximate RBO is designed to be differentiable, allowing for direct optimization. The contrastive loss then encourages these two lists to be similar.
The final RRLC objective is a weighted sum of the LRR and LLC components.
Datasets
The paper evaluates their approach on two publicly available datasets:
- Diginetica: A dataset commonly used for session-based recommendation.
- Tmall: Another widely used dataset for this task.
No new datasets were introduced.
Key Insights and Ideas
- Directly optimizing for top-one is hard, but not impossible: The paper demonstrates that by carefully designing a loss function that approximates the target metric (MRR) with tunable parameters, significant improvements can be achieved over surrogate losses.
- Augmentation needs to be "smart" for short sequences: Simply augmenting short sequences can be counterproductive. Using mined frequent patterns to guide augmentation helps create more meaningful and consistent variations, making contrastive learning more effective.
- Combining ranking and consistency is powerful: The synergy between optimizing for the top-one metric (LRR) and ensuring consistency across augmented sessions (LLC) is key to the proposed method's success.
Key Results
- When applied to three popular SBR baselines (NARM, SRGNN, and ATTMIX), optimizing with the RRLC objective consistently improved performance on both the Diginetica and Tmall datasets.
- On average, RRLC achieved an improvement of 7.38% in HR (Hit Ratio) and 6.78% in MRR across all baselines and datasets.
- An ablation study showed that both the reciprocal rank loss and the listwise contrastive loss components were crucial for achieving these gains, with RRLC outperforming variants that omitted either part.
Limitations and Future Work
- Limitations: The paper focuses on "top-one" recommendation. While they address short sequences, the effectiveness of the augmentation strategy on extremely short or sparse sessions might still be a point of further investigation. The computational cost of frequent pattern mining and session augmentation is not explicitly detailed, which could be a practical consideration.
- Future Work: The authors suggest that their RRLC objective can be integrated with various SBR models, implying potential for further exploration with different architectures. The flexibility of the reciprocal rank loss parameter $\sigma$ could also be explored further, perhaps through adaptive learning.
Summary updated