Sequential Tag Recommendation

Bing Liu, Pengyu Xu, Sijin Lu, Shijing Wang, Hongjian Sun, Liping JingarXiv 2023 · DOI

Abstract

Traditional tag recommendation systems primarily analyze the content of a current post, often overlooking the unique historical context of the user. This paper presents MLP4STR, a novel sequential tag recommendation model built on a pure Multi-Layer Perceptron (MLP) architecture. By integrating historical post content with previous tagging behavior, MLP4STR effectively captures a user’s evolving interests. Experimental results across four real-world datasets demonstrate that this approach improves recommendation accuracy by nearly 5% compared to existing state-of-the-art methods.

Introduction

Most tag recommendation systems treat the task as a static multi-label classification problem. However, tagging is inherently subjective and influenced by a user's specific background and habits. MLP4STR addresses this by treating tag recommendation as a sequential task, leveraging the chronological sequence of a user's behavior to provide more personalized and accurate suggestions.

The Problem: Subjectivity in Tagging

In large-scale Q&A platforms like Stack Overflow, tags are vital for content categorization. Yet, two users writing about the same topic might choose different tags based on their perspective. For instance, a post about "Dalton’s Law" might be tagged with "physics" by one user and "chemistry" by another.

Figure 1: Examples of how different users (Ebrahim, Salem, Lucas) apply different tags to similar scientific topics based on their personal context.

Current algorithms often ignore this "user" dimension, failing to account for dynamic interests that shift over time. To bridge this gap, a system must understand the historical trajectory of a user's tagging habits.

Methodology: The MLP4STR Architecture

The authors propose MLP4STR (MLP for Sequential Tag Recommendation), which avoids the computational complexity of Transformers and RNNs in favor of a streamlined MLP-based structure.

Figure 2: The MLP4STR architecture, featuring BERT-based representation learning and a specialized MLP-Mixer for sequence, channel, and fusion modeling.

The workflow is divided into three primary stages:

  1. Representation Learning: A pre-trained BERT encoder converts post text into dense vectors. Simultaneously, "tag embeddings" are learned by aggregating features from posts that previously utilized those tags.
  2. Sequence Modeling (The Mixer Approach): Inspired by MLP-Mixer, the model employs three specialized layers:
  3. Sequence-mixer: Captures temporal dependencies and interest shifts.
  4. Channel-mixer: Learns correlations between embedding features.
  5. Fusion-mixer: A novel component that models the interaction between historical post content and historical tags.
  6. Prediction: The model integrates current post features with learned user preferences to rank and recommend the most relevant tags.

Experimental Setup and Datasets

The model was evaluated using four datasets from StackExchange: Physics, Academia, Cooking, and Android. The researchers employed a "leave-one-out" evaluation strategy, using a user's most recent post for testing and the preceding history for training and validation. This setup ensures that the model's ability to leverage sequential data is accurately measured.

Key Results and Insights

MLP4STR consistently outperformed six representative baseline models, including deep learning architectures like HAN and PTM4Tag.

  • Performance Gains: The model achieved an average improvement of 4.8% in the F1@5 metric.
  • Ablation Studies: Removing the sequential MLP module resulted in a performance drop of up to 2.4%, confirming that historical context is critical for recommendation accuracy.
  • Personalization in Practice: In a case study from the Android dataset, the model correctly recommended a specific device tag (huawei-u8160) because it recognized the user's previous history with that device, even when the current post text was ambiguous.

Conclusion and Future Directions

MLP4STR demonstrates that a "pure MLP" architecture can be highly effective for modeling user history without the overhead of Transformers. While the model shows significant promise, challenges remain regarding the "cold start" problem for new users and determining the optimal history length for different domains. Future work may also look into optimizing the BERT-based encoding stage to improve real-time performance in high-traffic production environments.

Summary updated

BibTeX
@misc{liu2023sequential,
  author = {Bing Liu and Pengyu Xu and Sijin Lu and Shijing Wang and Hongjian Sun and Liping Jing},
  title = {{Sequential Tag Recommendation}},
  year = {2023},
  eprint = {2310.05423},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.05423},
}
Figure