TL;DR
This paper introduces AdaRec, a novel framework that combines knowledge distillation (KD) and differentiable neural architecture search (NAS) to create efficient, yet accurate, sequential recommendation models. AdaRec adaptively searches for optimal student model architectures tailored to specific recommendation scenarios, significantly reducing inference latency without sacrificing performance.
What Problem Does This Paper Address?
Modern sequential recommendation systems (SRSs) often rely on deep and complex neural network architectures to capture intricate user behavior patterns. While these models achieve high accuracy, their substantial size and computational demands lead to high latency, making them impractical for real-time online recommendations. The challenge is to compress these powerful models into lightweight versions that are efficient for deployment without a significant drop in recommendation quality. Existing knowledge distillation methods typically distill knowledge into pre-defined, fixed student architectures, which may not be optimal for diverse recommendation scenarios.
Methods
AdaRec tackles this problem by integrating two key techniques:
- Knowledge Distillation (KD): AdaRec transfers knowledge from a large, pre-trained "teacher" model to a smaller "student" model. It employs a multi-faceted distillation approach:
- Embedding Layer Distillation: Minimizes the Mean Squared Error (MSE) between teacher and student item embedding matrices.
- Prediction Layer Distillation: Uses KL divergence to match the output logits of the teacher and student models.
- Hidden Layer Distillation: Leverages Earth Mover's Distance (EMD) to enable flexible many-to-many mapping between intermediate layers of the teacher and student models, allowing student layers to learn from multiple teacher layers adaptively.
- Differentiable Neural Architecture Search (NAS): Instead of using a fixed student architecture, AdaRec uses NAS to automatically discover an optimal, compact architecture.
- Target-Oriented Distillation Loss: This loss guides the NAS process by providing supervision for learning the student network's architecture, ensuring it aligns with the teacher's knowledge.
- Cost-Sensitive Loss: This constraint explicitly considers the parameter size and estimated inference time (FLOPs) of operations, promoting the search for efficient architectures.
- Differentiable Search: By relaxing discrete architectural choices into continuous variables (using Gumbel-Softmax), the entire search and distillation process can be optimized end-to-end using gradient descent.
Datasets
The authors evaluated AdaRec on three real-world datasets from different domains:
- RetailRocket: E-commerce domain, focusing on short-range sequences (t=10).
- 30Music: Music domain, representing middle-range sequences (t=20).
- MovieLens-2K (ML-2K): Movie domain, used for long-range sequences (t=50).
Key Insights and Ideas
- Scene-Adaptivity is Crucial: The paper strongly advocates that optimal model architectures are scenario-dependent. AdaRec's ability to discover different student architectures for different datasets highlights this.
- EMD for Flexible Layer Mapping: Using Earth Mover's Distance for hidden layer distillation is a key innovation, allowing for more robust knowledge transfer when teacher and student models have different numbers of layers.
- Balancing Effectiveness and Efficiency: The cost-sensitive loss is critical for achieving a good trade-off between recommendation accuracy and computational efficiency, preventing the NAS from solely optimizing for accuracy at the expense of size.
- Combining KD and NAS is Powerful: Integrating KD with NAS allows for the simultaneous optimization of model compression and architectural design, leading to superior results compared to using either technique in isolation.
Key Results
- Competitive or Better Accuracy: AdaRec consistently achieved competitive or even slightly better recommendation accuracy (MRR, HR, NDCG) compared to its teacher models (NextItNet, SASRec, BERT4Rec) across all three datasets. For example, on RetailRocket and 30Music, AdaRec with NextItNet as teacher showed improvements of 2.9% and 3.2% in MRR@5, respectively.
- Significant Speedup and Parameter Reduction: AdaRec models were substantially smaller and significantly faster in inference. For instance, AdaRec-SASRec achieved a 6.59x speedup on RetailRocket with a drastically reduced parameter count.
- Scene-Specific Architectures: The NAS process discovered distinct architectures for each dataset, visualized in Figure 2, demonstrating AdaRec's ability to tailor models to specific recommendation scenarios.
- Ablation Studies Confirm Effectiveness: Removing any component of AdaRec's loss function (KD losses or cross-entropy) led to a degradation in performance, underscoring the importance of each element. The cost-sensitive loss with a well-tuned coefficient (β=8) provided the best balance between effectiveness and efficiency.
Limitations and Future Work
- Cross-Scenario Validation: While AdaRec performs best on its trained scenario, applying a student architecture trained for one scenario to another resulted in slightly degraded performance (Table 3). This suggests that while AdaRec finds optimal architectures for specific scenes, these architectures are not universally optimal.
- Future Work: The authors suggest that AdaRec's scene-adaptive nature could be further leveraged. The framework is model-agnostic and could be applied to a wider range of sequential recommendation models and potentially other deep learning tasks requiring model compression. Further exploration into more sophisticated NAS search spaces and efficiency constraints could yield even better results.
Summary updated