Enhancing User Intent Capture in Session-Based Recommendation with Attribute Patterns

Xin Liu, Zheng Li, Yifan Gao, Jingfeng Yang, Tianyu Cao, Zhengyang Wang, Bing Yin, Yangqiu Song

Abstract

Session-based recommendation (SBR) aims to predict a user's next interaction based solely on their current, often anonymous, browsing session. Traditional methods struggle with short sessions and noisy data, leading to a loss of user intent. This paper introduces FAPAT (Frequent Attribute Pattern Augmented Transformer), a framework that leverages frequent patterns in item attributes—such as brand, category, or color—to augment Transformer-based architectures. By treating these patterns as external memory, FAPAT effectively captures stable user intent even in brief or erratic sessions. Experimental results on public and large-scale industrial datasets demonstrate that FAPAT outperforms state-of-the-art models by an average of 4.5%.

Introduction

In modern E-commerce, session-based recommendation is critical for providing personalized experiences to anonymous users. Unlike traditional recommendation systems that rely on long-term user history, SBR must infer preferences from a sequence of clicks within a single session. This task faces two primary challenges:

  1. The Short Session Problem: Many sessions contain only a few clicks, providing insufficient data to establish a clear temporal trend or preference profile.
  2. Noise and Intent Vanishing: User behavior is often non-linear or random. Graph-based models that attempt to solve this by building global transition graphs often suffer from "over-smoothing," where the unique intent of a session is lost in a dense web of global item transitions.

While items possess rich metadata (attributes), existing models often underutilize this information. FAPAT addresses these issues by mining "motifs" or frequent attribute patterns that serve as semantic anchors, providing a more stable representation of user intent than raw item IDs alone.

Methodology: The FAPAT Framework

FAPAT bridges the gap between sequence-based modeling (Transformers) and graph-based modeling (GNNs) through a three-stage workflow:

1. Frequent Pattern Mining

Using the gSpan algorithm, the system analyzes training data to identify frequent, compact attribute subgraphs (graphlets) consisting of no more than four nodes. These patterns represent common behavioral transitions, such as a user comparing different brands within the same category or sticking to a specific aesthetic (e.g., color palette).

2. Relevant Pattern Retrieval

When a new session begins, the model converts the current sequence into an attribute graph. It then employs Jaccard similarity to retrieve the most relevant pre-mined patterns from an "external memory" bank. This allows the model to map specific, potentially noisy clicks to broader, well-established behavioral patterns.

3. Intent-Aware Encoding

The encoding process involves several sophisticated components:

  • Graph-Nested Attention: The model utilizes multi-head relational graph attention to learn high-quality representations of the retrieved attribute patterns.
  • Memory Augmentation and Gating: These pattern representations are integrated into a Transformer block. A gating mechanism dynamically determines the balance between the specific item sequence and the broader attribute patterns, allowing the model to rely more on patterns when the session is short or noisy.
  • Relative Position Bias: To maintain temporal awareness, the model incorporates T5-style relative position biases, ensuring that recent user actions are prioritized over earlier ones.

Key Insights: Attributes as Semantic Anchors

A core contribution of FAPAT is the conceptualization of attributes as "hyper-edges." By focusing on patterns like {cell phone, tablet, notebook}, the model identifies a user's high-level intent (e.g., "electronics shopping") which remains consistent even if the specific item clicks appear random.

Furthermore, FAPAT significantly mitigates the over-smoothing problem. By using filtered, frequent patterns instead of a raw global transition graph, the authors reduced graph density from approximately 114 to 1.1 on industrial datasets. This sparsity prevents session embeddings from becoming indistinguishable averages, preserving the unique signal of the user's current intent.

Experimental Results

FAPAT was evaluated against 13 baseline models (including NARM, SR-GNN, and GCE-GNN) using both public benchmarks (diginetica, Tmall) and three massive Amazon industrial datasets (Beauty, Books, Electronics) totaling 100 million clicks.

  • Performance Gains: FAPAT achieved an average improvement of 4.5% across metrics such as Hits@10, NDCG@10, and MRR@10 on public datasets.
  • Industrial Robustness: The model showed significant gains on Amazon's large-scale data, particularly in categories like Electronics, where attribute patterns are highly descriptive of user needs.
  • Intent Accuracy: In "Attribute Estimation" tests—predicting the category or brand of the next item even if the exact item ID is missed—FAPAT significantly outperformed models that do not utilize attribute patterns.
  • Prediction Horizon: FAPAT maintained superior performance in long-term predictions (next 3, 5, or 10 items) compared to RNN-based models, which typically degrade as the prediction horizon expands.

Conclusion and Future Work

FAPAT demonstrates that frequent attribute patterns are a powerful tool for stabilizing intent capture in session-based recommendation. By augmenting Transformers with an external memory of these patterns, the model overcomes the limitations of short and noisy sessions.

Future research will address the challenge of attribute sparsity and "dirty" metadata in real-world production environments. Additionally, the authors plan to explore unified processing of different attribute types and the integration of pre-training techniques to further refine ranking accuracy.

Summary updated

BibTeX
@inproceedings{liu2023enhancing,
  author = {Xin Liu and Zheng Li and Yifan Gao and Jingfeng Yang and Tianyu Cao and Zhengyang Wang and Bing Yin and Yangqiu Song},
  title = {{Enhancing User Intent Capture in Session-Based Recommendation with Attribute Patterns}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=AV3iZlDrzF},
}
Figure