Abstract
With the advent of deep learning, neural network-based recommendation models have emerged as an important tool for tackling personalization and recommendation tasks. These networks differ significantly from other deep learning networks due to their need to handle categorical features and are not well studied or understood. In this paper, we develop a state-of-the-art deep learning recommendation model (DLRM) and provide its implementation in both PyTorch and Caffe2 frameworks. In addition, we design a specialized parallelization scheme utilizing model parallelism on the embedding tables to mitigate memory constraints while exploiting data parallelism to scale-out compute from the fully-connected layers. We compare DLRM against existing recommendation models and characterize its performance on the Big Basin AI platform, demonstrating its usefulness as a benchmark for future algorithmic experimentation and system co-design.
Introduction
Recommendation systems and personalization models, such as ad click-through rate predictors, are foundational to the modern internet economy. Despite their importance, they have historically received less attention in academic deep learning research compared to computer vision or natural language processing. This discrepancy is largely due to the unique architectural requirements of recommendation models: they must simultaneously process massive amounts of sparse, categorical data and dense, continuous data.
Processing categorical data requires enormous memory capacity for embedding tables, while continuous data demands heavy computation. Standard deep learning frameworks often struggle with the hybrid parallelization necessary to train these models at scale. Furthermore, the lack of public industry datasets due to privacy concerns has hindered academic progress. To bridge this gap, this work introduces the Deep Learning Recommendation Model (DLRM) and tools for generating synthetic data that mimics real-world memory access patterns.
DLRM Architecture and Methods
The DLRM architecture combines principles from traditional recommendation systems, like Factorization Machines, with modern deep learning components.
Feature Handling and Interactions
Continuous (dense) features are processed through a "bottom" Multi-Layer Perceptron (MLP). Categorical (sparse) features are mapped to dense representations using embedding tables. Unlike models that rely solely on deep layers to find feature interactions, DLRM explicitly computes the dot product between all pairs of embedding vectors and the processed dense features. This captures second-order interactions efficiently, keeping computational complexity linear while maintaining high predictive power.
Hybrid Parallelization
To address the memory and compute dichotomy, DLRM employs a novel hybrid parallelization scheme. Model parallelism is used to distribute large embedding tables across multiple devices, overcoming the memory limits of a single GPU. Simultaneously, data parallelism is used to replicate the MLPs across devices to scale computation. A "butterfly shuffle" (all-to-all communication) is implemented to transfer data between the model-parallel embeddings and the data-parallel MLPs.
Datasets
The model was evaluated using three distinct data sources:
- Public Datasets: The Criteo AI Labs Ad Kaggle and Terabyte datasets were used to measure real-world model accuracy.
- Random Data: Uniform or Gaussian distributions were used to stress-test hardware and identify system bottlenecks without storage overhead.
- Synthetic Data: A new method profiles the stack distances of real categorical accesses to generate synthetic traces. This preserves the cache locality and memory behavior of real data without exposing private user information, enabling privacy-preserving systems research.
Key Insights
- Structured Interactions: By treating each feature vector as a single unit and only taking dot products between distinct pairs, DLRM avoids the dimensionality explosion seen in models like Deep & Cross Networks (DCN).
- Hardware Challenges: DLRMs are uniquely bound by both memory capacity (embeddings) and compute (MLPs), proving that standard data-parallel training is insufficient for these workloads.
- Synthetic Benchmarking: The synthetic trace generation allows researchers to simulate cache hit/miss rates and memory bandwidth bottlenecks accurately using proprietary-like patterns without needing access to sensitive production logs.
Results
On the Criteo Ad Kaggle dataset, DLRM achieved slightly higher training and validation accuracy (~79%) compared to a Deep and Cross Network (DCN) of similar size (540 million parameters). Performance profiling on the Big Basin AI platform (Intel Xeon CPU + 8x Nvidia V100 GPUs) showed that training a sample model took approximately 62 seconds on the GPU compared to 256 seconds on the CPU. Profiling confirmed that execution time is dominated by embedding lookups and fully connected layers, justifying the specialized hybrid parallelization.
Conclusion
DLRM serves as a state-of-the-art benchmark for the recommendation system community. While the current implementation relies on explicit memory copies for all-to-all communication, future work will focus on optimizing these paths using native communication primitives like all-gather. By open-sourcing DLRM, the authors provide a foundation for future algorithmic experimentation and hardware-software co-design in personalization systems.
Summary updated