DNS-Rec: Data-aware Neural Architecture Search for Recommender Systems

Sheng Zhang, Maolin Wang, Xiangyu Zhao, Ruocheng Guo, Yao Zhao, Chenyi Zhuang, Jinjie Gu, Zijian Zhang, Hongzhi Yin

Abstract

In the era of data proliferation, efficiently sifting through vast information to extract meaningful insights has become increasingly crucial. This paper addresses the computational overhead and resource inefficiency prevalent in existing Sequential Recommender Systems (SRSs). We introduce an innovative approach combining pruning methods with advanced model designs. Furthermore, we delve into resource-constrained Neural Architecture Search (NAS), an emerging technique in recommender systems, to optimize models in terms of FLOPs, latency, and energy consumption while maintaining or enhancing accuracy. Our principal contribution is the development of a Data-aware Neural Architecture Search for Recommender System (DNS-Rec). DNS-Rec is specifically designed to tailor compact network architectures for attention-based SRS models, thereby ensuring accuracy retention. It incorporates data-aware gates to enhance the performance of the recommendation network by learning information from historical user-item interactions. Moreover, DNS-Rec employs a dynamic resource constraint strategy, stabilizing the search process and yielding more suitable architectural solutions. We demonstrate the effectiveness of our approach through rigorous experiments conducted on three benchmark datasets, which highlight the superiority of DNS-Rec in SRSs. Our findings set a new standard for future research in efficient and accurate recommendation systems, marking a significant step forward in this rapidly evolving field.

Introduction

Sequential Recommender Systems (SRSs) are essential for predicting a user's next move based on their history. While attention-based models (like SASRec) offer high accuracy, they are computationally "heavy," leading to high latency and massive memory footprints during inference. Existing solutions like manual model pruning or standard Neural Architecture Search (NAS) often fall into two traps: they either prune too aggressively and destroy accuracy, or they focus so much on architectural accuracy that they produce models too large for real-world, resource-constrained devices. Furthermore, most NAS methods create a static architecture that doesn't account for the specific characteristics of the data flowing through it.

Methodology

The proposed DNS-Rec (Data-aware Neural Architecture Search for Recommender Systems) framework operates in two distinct stages: a search stage and a retraining stage. Its core innovations include:

  • Data-aware Gates: Unlike traditional transformers, DNS-Rec incorporates dual-layer gates that "perceive" the input data batch. These gates learn features from historical user-item interactions and adaptively inject this information into the transformer layers, helping compact models retain high performance.
  • Bilevel Controllers: The framework uses two controllers to automatically optimize the network. One manages width (using "zero-masks" to prune hidden and inner dimensions), and the other manages depth (deciding how many transformer layers to keep or skip).
  • Linearized Attention: To further slash overhead, standard dot-product attention is replaced with a linearized version using $L_2$ normalization and ELU mapping, reducing computational complexity from quadratic to linear relative to sequence length.
  • Dynamic Resource Constraint: During the search, the loss function includes a penalty for FLOPs (Floating Point Operations). This penalty is adjusted dynamically across training epochs to stabilize the search process and prevent the model from converging on impractical extremes.
Overview of the DNS-Rec framework, illustrating the Search Stage with bilevel controllers and the subsequent Retraining Stage.

Experimental Setup

The researchers evaluated DNS-Rec on three widely used benchmark datasets: ML-1M (MovieLens) with 1 million movie ratings, Gowalla with ~2 million check-ins, and Douban with ~2.1 million movie short-comment interactions. Efficiency trade-offs were further validated at scale using the ML-10M dataset.

Results and Discussion

DNS-Rec consistently outperformed both manually designed models and other NAS methods (like DARTS and RecNAS) across all metrics.

  • Inference Speedup: On the Douban dataset, DNS-Rec achieved an 87.6% reduction in inference time compared to standard attention-based models. On ML-1M, inference time dropped from 54.2s to 14.8s.
  • Memory Efficiency: The framework reduced GPU memory occupation by up to 91.1% on the Douban dataset.
  • Accuracy Gains: Despite being much smaller, DNS-Rec improved Recall@10 and NDCG@10 across all three datasets. For example, on Gowalla, it achieved a Test Recall@10 of 0.9199, outperforming the SASRec baseline.
  • Search Efficiency: The search process is remarkably fast; for ML-1M, the search takes roughly 814 seconds per epoch, which is faster than the popular ProxylessNAS.
Performance comparison of DNS-Rec against state-of-the-art baselines, demonstrating superior accuracy across multiple evaluation metrics and datasets.

The "secret sauce" of DNS-Rec is its data perception capability. By making the architecture aware of the data batch, the model allows for much deeper pruning while preserving critical user-item interaction signals. Furthermore, the dynamic resource constraint strategy ensures search stability, avoiding the selection of overly simplistic components early in training.

Conclusion

DNS-Rec demonstrates that structural optimization via NAS, when combined with efficient operators like linear attention and data-aware mechanisms, provides a multiplicative benefit for inference speed and memory usage without sacrificing accuracy. While the tradeoff parameter $\lambda$ requires tuning for specific hardware, the results mark a significant step forward in efficient recommendation. Future work may involve expanding the search space to include hybrid architectures or exploring the generalization of data-aware gates to other domains like computer vision.

Summary updated

BibTeX
@inproceedings{zhang2024dns,
  author = {Sheng Zhang and Maolin Wang and Xiangyu Zhao and Ruocheng Guo and Yao Zhao and Chenyi Zhuang and Jinjie Gu and Zijian Zhang and Hongzhi Yin},
  title = {{DNS-Rec: Data-aware Neural Architecture Search for Recommender Systems}},
  booktitle = {RecSys},
  year = {2024},
  doi = {10.1145/3640457.3688117},
}
Figure