Introduction
Sequential recommendation systems are pivotal in modern digital platforms, aiming to predict a user's next interaction based on their historical behavior. However, traditional approaches often struggle with behavior uncertainty—the non-deterministic nature of human interest—and the ensemble gap, where simple model averaging fails to capture the potential synergies between parallel learners.
To address these challenges, we present EMKD (Ensemble Modeling with contrastive Knowledge Distillation). This framework leverages an ensemble of bidirectional Transformers that engage in a collaborative learning process, sharing insights at both the representation and prediction levels to achieve state-of-the-art performance.
The EMKD Framework
The core of EMKD lies in its use of $N$ parallel bidirectional Transformers. Unlike standard ensemble methods that train models in isolation, EMKD facilitates a "peer-learning" environment where each network acts as both a teacher and a student. This is achieved through three primary mechanisms:
- Multi-Task Learning: Each encoder is trained on two auxiliary tasks: Masked Item Prediction (reconstructing hidden items) and Attribute Prediction (predicting metadata like brand or category). This dual focus ensures the model captures both sequential dependencies and item-specific characteristics.
- Contrastive Knowledge Distillation (CKD): This is the framework's central innovation. It aligns the internal representations of different networks using Intra-network (ICL) and Cross-network Contrastive Learning (CCL). By forcing different networks to reach a consensus on the same user data, the model becomes more robust to noise.
- Logits-Level Distillation: Using Kullback-Leibler (KL) divergence, the final probability distributions of the parallel networks are synchronized, ensuring consistent and high-quality predictions across the ensemble.
Experimental Evaluation
We evaluated EMKD on three diverse benchmarks: Amazon Beauty, Amazon Toys, and MovieLens-1M (ML-1M). These datasets represent varying levels of sparsity and different item attributes, providing a rigorous test for the framework's generalizability.
Key Results and Insights
- Superior Performance: EMKD consistently outperformed top-tier baselines like DuoRec and MMInfoRec, showing relative improvements in NDCG@10 ranging from 13.05% to 33.48%.
- Collaborative vs. Raw Scaling: A critical finding was that the collaborative ensemble structure is more effective than simply increasing model depth. An EMKD ensemble with fewer total parameters outperformed a single 10-layer Transformer, proving that diversity in initialization and collaborative learning are the primary drivers of success.
- Efficiency: Despite the overhead of training multiple models, EMKD reached peak performance quickly, requiring only about 30% more time per epoch than single-model baselines while delivering significantly higher accuracy.
Sensitivity and Robustness
While EMKD is highly effective, its performance is influenced by several hyperparameters, including the number of masked sequences, the distillation temperature $\tau$, and the weights for various loss functions ($\lambda$ and $\mu$).
As shown in the sensitivity analysis, the model generally benefits from a moderate number of masked sequences and a hidden dimensionality of 256 or 512. However, the sensitivity to parameters like $\mu$ suggests that careful tuning is required for optimal performance on specific datasets.
Conclusion and Future Work
EMKD demonstrates that ensemble modeling, when combined with sophisticated contrastive distillation, can significantly overcome the limitations of single-encoder sequential recommenders. While the current framework introduces some inference overhead, future research will focus on compressing these ensembles into single, high-performance models to maintain accuracy while meeting the low-latency requirements of production environments.
Summary updated