Augmenting Sequential Recommendation with Pseudo-Prior Items via Reversely Pre-training Transformer

Zhiwei Liu, Ziwei Fan, Yu Wang, Philip S. Yu

TL;DR

ASReP (Augmenting Sequential Recommendation with Pseudo-prior items) tackles the "cold-start" problem for short user histories by literally inventing a past for them. By training a Transformer to predict items in reverse chronological order, the authors generate "pseudo-prior" items to lengthen short sequences, providing the necessary context for standard recommendation models to perform significantly better.

What Problem Does This Paper Address?

Sequential Recommendation (SR) is the backbone of modern e-commerce, predicting what a user wants next based on their history. While Transformer-based models like SASRec and BERT4Rec have set new benchmarks, they have a glaring weakness: they are data-hungry.

When a user has only interacted with a few items (a "short sequence"), these models struggle to capture meaningful transition patterns. As shown in the paper's analysis of the Amazon Beauty dataset, nearly 75% of user sequences consist of fewer than 7 items, and the performance (Recall@5) for these short sequences is drastically lower than for longer ones. This discrepancy, illustrated in Figure 1, highlights a critical context gap that limits the effectiveness of self-attention mechanisms in cold-start scenarios.

Figure 1: Sequence length distribution vs. performance

Methods

The authors propose a three-stage framework called ASReP:

  1. Reversely Pre-training: Instead of predicting the next item, they train a Transformer to predict the previous item in a sequence (right-to-left). This allows the model to learn the underlying correlations of item transitions in reverse.
  2. Short Sequence Augmentation: For any sequence shorter than a threshold $M$, the reversely pre-trained model is used to recursively generate $k$ "pseudo-prior" items. These fabricated items are prepended to the start of the original sequence.
  3. Left-to-Right Fine-tuning: Finally, the model is fine-tuned using these augmented sequences in the standard chronological direction (left-to-right) to predict the actual next item.

The core idea is that even if these "pseudo-prior" items aren't real historical actions, they represent plausible states that provide the Transformer with the "warm-up" context it needs to make better forward-looking predictions. The framework is visualized in Figure 2.

Figure 2: The ASReP Framework

Datasets

The model was evaluated on two widely used, sparse, real-world datasets from Amazon:

  • Amazon Beauty: 22,363 users and 12,101 items. Over 75% of sequences are shorter than 9 items.
  • Amazon Cell Phones and Accessories: 27,879 users and 10,429 items. Over 75% of sequences are shorter than 7 items.

Key Insights and Ideas

  • Reverse Correlation is Valuable: The paper demonstrates that item transition patterns are informative in both directions. A model that understands what usually comes before a product can effectively synthesize a "synthetic history."
  • Context Matters More Than "Truth": Interestingly, the "fabricated" items don't need to be real historical actions to be useful. Their primary role is to provide a richer embedding space and more attention points for the Transformer during the final prediction task.
  • Fine-tuning > Re-training: The authors tested a variant that re-trained a new model from scratch on augmented data. It performed worse than fine-tuning the reversely pre-trained model, suggesting that the weights learned during the reverse task carry over useful structural knowledge about item relationships.
  • Temporal Logic Beats Simple Similarity: An ablation study (ItemCor) showed that simply prepending items that are "similar" to the first item in a sequence is less effective than using the reverse Transformer. The specific sequential logic of the reverse model is key.

Key Results

ASReP significantly outperformed state-of-the-art baselines like SASRec and BERT4Rec across all metrics (Recall@5, NDCG@5, and MRR).

  • Overall Boost: On the Beauty dataset, ASReP improved Recall@5 by 18.1% over SASRec. On the Phones dataset, the improvement was 19.9%.
  • Short Sequence Mastery: As shown in Figure 4, the most dramatic gains occurred in the shortest sequence buckets (length $\le 3$ and $3 < \text{length} \le 7$).
  • Hyperparameter Sensitivity: The model's performance is sensitive to the number of items added ($k$) and the threshold for augmentation ($M$). Generally, increasing these values improves performance until a plateau is reached, as seen in Figure 3.

Figure 4: Performance by sequence length Figure 3: Impact of k and M

Limitations and Future Work

  • Computational Overhead: Generating pseudo-items recursively and performing a two-stage training process (reverse pre-training then fine-tuning) adds to the training time and complexity.
  • Fixed Backbone: The current study uses SASRec as the underlying Transformer. The authors suggest that using a bi-directional fine-tuning strategy (similar to BERT4Rec) on the augmented sequences might yield even better results for longer sequences.
  • Item Attributes: The current model relies solely on item IDs. Integrating item metadata (categories, brands) into the reverse pre-training could potentially make the pseudo-prior items even more accurate and helpful.

Summary updated

BibTeX
@inproceedings{liu2021augmenting,
  author = {Zhiwei Liu and Ziwei Fan and Yu Wang and Philip S. Yu},
  title = {{Augmenting Sequential Recommendation with Pseudo-Prior Items via Reversely Pre-training Transformer}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2021},
  url = {https://openreview.net/forum?id=9Mj6DcK4bX},
}
Figure