TL;DR
This paper introduces FuXi-Linear, a novel recommendation model that tackles the efficiency bottleneck of traditional attention mechanisms for long user sequences. By employing linear attention with specialized temporal and positional channels, FuXi-Linear achieves significant speedups in both training and inference while maintaining or improving recommendation quality, especially for users with extensive interaction histories.
What Problem Does This Paper Address?
Modern recommendation systems often rely on attention mechanisms, which, while powerful, suffer from quadratic complexity with respect to sequence length. This makes them computationally expensive and slow for users with long interaction histories (thousands of items). Existing linear attention models, while more efficient, often struggle to effectively integrate temporal information, leading to interference between temporal and semantic signals and neglecting behavioral periodicity. Furthermore, they often lack granular positional information and are primarily tested on short sequences, leaving their scalability for ultra-long sequences unverified. This paper aims to bridge this gap by proposing an efficient, linear-complexity model that excels at long-term, time-aware sequential recommendation.
Methods
FuXi-Linear is built upon a linear attention framework and introduces two key novel components:
- Temporal Retention Channel: This channel independently processes temporal signals using period-aware queries and keys derived solely from timestamps. This design prevents interference between temporal and semantic information and explicitly models behavioral periodicity, a crucial aspect often overlooked.
- Linear Positional Channel: This channel integrates positional information using learnable kernels. This approach approximates the effectiveness of relative positional encoding (known for its expressiveness) while maintaining linear complexity, overcoming the limitations of existing linear models that offer insufficient positional granularity.
The model is structured into stacked FuXi-Linear blocks, each containing the Linear Multi-Channel Attention (LMCA) layer and a Multi-stage Feed-forward Network (MFFN). The LMCA layer combines the outputs from the Temporal Retention Channel, Linear Positional Channel, and a standard retention mechanism (for semantic information) through a gating mechanism. The model supports recurrent, parallel, and chunkwise recurrent forms for efficient inference and training.
Datasets
The paper evaluates FuXi-Linear on three public datasets:
- MovieLens-20M: A well-known benchmark for movie recommendations, containing user ratings and tagging activities.
- Kuairand-27K: A dataset collected from a video-sharing app, notable for its long user interaction sequences.
- KuaiRec: Another dataset from a video-sharing platform, also featuring long sequences, suitable for evaluating user preference modeling.
The authors mention using similar preprocessing methods as existing works for these datasets, with specific filtering for Kuairand-27K and KuaiRec to retain relevant interaction records.
Key Insights and Ideas
- Decoupling Temporal and Semantic Signals: The Temporal Retention Channel's independent processing of temporal data is crucial for preventing interference and effectively capturing periodic user behavior.
- Linear Positional Encoding: Using learnable kernels for positional information offers a powerful alternative to traditional, often quadratic, positional encoding methods in a linear setting.
- Power-Law Scaling: FuXi-Linear demonstrates a robust power-law scaling property with respect to model size, indicating its strong scalability for handling increasingly complex recommendation tasks and larger models.
- Efficiency for Long Sequences: The core innovation lies in achieving significant speedups (up to 10x in prefill and 21x in decode) without sacrificing recommendation quality, making it practical for real-world applications with long user histories.
Key Results
- Performance: FuXi-Linear consistently outperforms state-of-the-art baselines across all evaluation metrics (NDCG@10, NDCG@50, HR@10, HR@50, MRR) on the three public datasets, with particularly substantial improvements on long-sequence datasets like Kuairand-27K and KuaiRec.
- Efficiency: The model achieves significant speedups: up to 10x in the prefill stage and up to 21x in the decode stage compared to competitive baselines, especially as sequence length increases.
- Ablation Study: The temporal channel is identified as the most critical component for performance, followed by the positional channel. Removing either leads to a significant performance drop.
- Hyperparameter Sensitivity: The study shows that the model is robust to hyperparameter choices, with optimal performance achieved within reasonable ranges for temporal heads, retention heads, and positional embedding dimensions.
Limitations and Future Work
- Limitations: While FuXi-Linear demonstrates impressive efficiency and performance, the paper acknowledges that existing linear models are often constrained to shallow architectures and short sequences, and their scalability in ultra-long scenarios was largely unverified before this work. The paper also notes that while FuXi-Linear's temporal channel decouples signals, the retention channel still handles semantic information, and further exploration into more sophisticated semantic modeling could be beneficial.
- Future Work: The authors plan to further optimize the model's efficiency and extend its application to more diverse and complex multi-behavior user sequences. They also suggest exploring more advanced temporal modeling techniques and integrating them into the linear framework.
Summary updated