Abstract
Session-based recommendation (SBR) is a critical task in e-commerce and streaming, where systems must predict a user's next action based on short-term, often anonymous, session data. Traditional methods frequently suffer from the "isolation trap," treating sessions independently, and the "static representation trap," using fixed item embeddings that ignore context. This paper presents the Collaborative Self-Attention Network (CoSAN), which dynamically represents items by aggregating information from similar neighborhood sessions. By integrating these collaborative representations with a multi-head self-attention mechanism, CoSAN captures both global trends and complex intra-session dependencies. Experimental results on the Retailrocket and Yoochoose datasets demonstrate that CoSAN significantly outperforms state-of-the-art baselines.
Introduction
In many real-world recommendation scenarios, user history is unavailable, forcing engines to rely solely on the current session. Existing session-based recommendation (SBR) models often ignore "collaborative" information—the patterns of behavior from other users who interacted with similar items. Furthermore, they typically treat items as static mathematical vectors, failing to account for how an item's relevance might shift based on the user's current intent.
CoSAN addresses these challenges by moving beyond looking at sessions in isolation. It introduces a method to inject collaborative wisdom into item representations, ensuring they are dynamic and context-aware.
Methodology
The CoSAN framework utilizes a three-stage pipeline to generate informed recommendations.
1. Neighborhood Session Search
For every item in the current session, the model identifies the $M$ most recent sessions containing that item. It then selects the top $K$ most similar "neighbor" sessions based on their overlap with the current session's items.
2. Collaborative Item Representation
Instead of a static embedding, CoSAN creates a complementary feature vector by aggregating the embeddings of the identified $K$ neighbor sessions. This collaborative vector is merged with the original item embedding, resulting in a representation that is "aware" of how other similar users have recently interacted with the item.
3. Self-Attention Layers
These dynamic representations are fed into a Transformer-style Multi-Head Self-Attention network. This allows the model to weigh the importance of different items in the session regardless of their temporal distance, effectively capturing the user's primary intent from a sequence of clicks.
Experimental Results
The authors evaluated CoSAN on two major benchmarks: Retailrocket (e-commerce browsing) and Yoochoose (click-stream data).
Performance Gains
CoSAN consistently outperformed state-of-the-art baselines, including GRU4Rec and NARM. On the Retailrocket dataset, CoSAN achieved a 9.22% improvement in Hit Rate (HR@5) and a 5.34% improvement in Mean Reciprocal Rank (MRR@5) over the best-performing baseline.
Ablation Study
To confirm the value of the collaborative component, the authors tested CoSAN-CI, a variant with the collaborative information removed. As shown in the results, performance dropped significantly without neighborhood data, proving that cross-session collaborative signals are a critical driver of accuracy.
Conclusion
CoSAN demonstrates that incorporating granular, item-level collaborative information significantly enhances session-based recommendations. By combining dynamic item representations with self-attention, the model effectively captures both global trends and local session intent. Future research may focus on optimizing the computational overhead of neighborhood searches and addressing cold-start challenges for new items.
Reference: Luo, A., et al. (2020). Collaborative Self-Attention Network for Session-based Recommendation. Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence (IJCAI-20).
Summary updated