EasyRec: An Easy-to-Use, Extendable and Efficient Framework for Building Industrial Recommendation Systems

Mengli Cheng, Yue Gao, Guoqiang Liu, Hongsheng JinAAAI 2023 · DOI

Abstract

Building industrial-grade recommendation systems involves complex multi-stage pipelines and deep learning models that are often difficult to develop, maintain, and scale. EasyRec is an open-source framework developed by Alibaba designed to streamline this lifecycle. By employing a modular, "pluggable" architecture, EasyRec automates hyper-parameter tuning and feature selection while ensuring consistency between offline training and online serving. This paper describes the framework's design principles and demonstrates its efficiency in large-scale production environments.

Introduction

Industrial recommendation systems typically follow a "funnel" architecture consisting of candidate matching, pre-ranking, and ranking stages. Each stage requires sophisticated deep learning models tailored to specific tasks. However, engineers face significant challenges: high development overhead due to boilerplate code, training-serving skew where feature logic differs between environments, and the need for sub-second latency at massive scales. EasyRec addresses these issues by providing a unified, efficient, and extendable framework.

Framework Architecture

EasyRec is built on a modular design where every component—from data loading to loss functions—is a plug-and-play module. These components are configured via Protobuf text files, enabling rapid experimentation without code changes.

Architecture of the EasyRec framework, illustrating the modular components of EasyRecEstimator and the deployment workflow.

Core Components

  1. EasyRecEstimator: An extension of the TensorFlow Estimator, it supports distributed training across Kubernetes and Hadoop/Yarn. It encapsulates the input_fn for data ingestion and model_fn for feature generation and model logic.
  2. Unified Feature Generation: To eliminate training-serving skew, feature logic is implemented in C++ and exposed as TensorFlow operators. This ensures that the exact same transformations are applied during both training and real-time inference.
  3. Automated Optimization: The framework integrates Microsoft’s NNI for hyper-parameter optimization (HPO) and utilizes variational dropout for automated feature selection. This helps in identifying and removing redundant features that increase computational costs without improving accuracy.
  4. Incremental Online Learning: EasyRec supports real-time model updates via a Flink-based pipeline. Instead of full redeployments, it streams updates for volatile parameters, significantly improving model freshness.

Evaluation and Results

The framework's performance was validated using the standard Criteo CTR benchmark and internal Alibaba production datasets.

Key Performance Metrics

  • Training Efficiency: By integrating NVIDIA’s Sparse Operation Kit (SOK), EasyRec achieved a 3x speedup in training on the Criteo dataset.
  • Inference Latency: Optimizations such as LRU caching and vector instructions reduced online request time (RT) to 25% of the original implementation.
  • Feature Selection: In production environments with over 1,000 features, the automated selection module successfully removed approximately 50% of features, doubling inference speed with negligible impact on model performance.
  • Model Freshness: The incremental update mechanism reduced the delay for adapting to new user behavior from over 10 minutes to under 10 seconds.

Conclusion

EasyRec provides a robust solution for the complexities of industrial recommendation systems. By prioritizing modularity, consistency, and efficiency, it allows engineers to focus on model innovation rather than infrastructure overhead. Future developments will include the integration of more diverse state-of-the-art models and broader support for distributed computing environments.

The EasyRec framework is open-source and available at https://github.com/alibaba/EasyRec.

Summary updated

BibTeX
@inproceedings{cheng2023easyrec,
  author = {Mengli Cheng and Yue Gao and Guoqiang Liu and Hongsheng Jin},
  title = {{EasyRec: An Easy-to-Use, Extendable and Efficient Framework for Building Industrial Recommendation Systems}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i13.27065},
}
Figure