High-Performance Training by Exploiting Hot-Embeddings in Recommendation Systems

Muhammad Adnan, Yassaman Ebrahimzadeh Maboud, Divya Mahajan, Prashant J. Nair · DOI

Abstract

Recommender models are commonly used to suggest relevant items to a user for e-commerce and online advertisement-based applications. These models use massive embedding tables to store numerical representation of items' and users' categorical variables (memory intensive) and employ neural networks (compute intensive) to generate final recommendations. Training these large-scale recommendation models is evolving to require increasing data and compute resources. The highly parallel neural networks portion of these models can benefit from GPU acceleration however, large embedding tables often cannot fit in the limited-capacity GPU device memory. Hence, this paper deep dives into the semantics of training data and obtains insights about the feature access, transfer, and usage patterns of these models. We observe that, due to the popularity of certain inputs, the accesses to the embeddings are highly skewed with a few embedding entries being accessed up to 10000x more. This paper leverages this asymmetrical access pattern to offer a framework, called FAE, and proposes a hot-embedding aware data layout for training recommender models. This layout utilizes the scarce GPU memory for storing the highly accessed embeddings, thus reduces the data transfers from CPU to GPU. At the same time, FAE engages the GPU to accelerate the executions of these hot embedding entries. Experiments on production-scale recommendation models with real datasets show that FAE reduces the overall training time by 2.3x and 1.52x in comparison to XDL CPU-only and XDL CPU-GPU execution while maintaining baseline accuracy.

Introduction: The Memory-Compute Gap

Modern recommendation systems, such as those powering Netflix or Facebook, rely on a dual-component architecture. First, Embedding Tables map categorical data (like user IDs or item tags) into dense numerical vectors. Second, Neural Networks process these vectors to predict user preferences.

Figure 1: Architecture of recommendation models highlighting compute-intensive neural networks and memory-intensive embedding lookups.

This architecture creates a significant hardware mismatch. While neural networks are compute-intensive and thrive on GPU acceleration, embedding tables are memory-intensive. These tables often reach hundreds of gigabytes, far exceeding the VRAM capacity of modern GPUs. Current hybrid solutions typically store embeddings in CPU main memory and transfer them to the GPU via the PCIe bus as needed. However, this creates a communication bottleneck where the time spent moving data often outweighs the computation time, leaving expensive GPUs underutilized.

Exploiting Data Skew: The "Hot-Embedding" Insight

The core insight of this research is that embedding access in real-world recommendation datasets is not uniform; it is highly skewed. Due to the inherent popularity of certain items or active users, a tiny fraction of embedding entries receives the vast majority of clicks and views.

Figure 2: Analysis of embedding table access skew across production datasets, showing that a small fraction of 'hot' entries accounts for the majority of accesses.

As shown in Figure 2, for the Criteo Terabyte dataset, "hot" embeddings representing just 0.7% of the total table size (approximately 400MB) account for a staggering 81.6% of all data accesses. FAE (Frequently Accessed Embeddings) leverages this asymmetry by caching these high-frequency entries directly on the GPU, effectively eliminating the PCIe transfer overhead for the majority of training operations.

The FAE Framework

FAE optimizes the data layout and training pipeline through three primary mechanisms:

  1. Hot-Cold Classification: FAE identifies "hot" entries and replicates them across the memory of every GPU in a cluster. "Cold" entries, which are rarely accessed, remain in the high-capacity CPU main memory.
  2. Statistical Profiling: To avoid the overhead of scanning terabytes of raw data, FAE employs an Input Sampler and a Statistical Optimizer. By sampling just 5% of the dataset and applying the Central Limit Theorem, the system accurately predicts which embeddings will be "hot" for a specific memory budget.
  3. The Shuffle Scheduler: Training exclusively on hot items would bias the model and degrade accuracy. FAE organizes data into "hot-only" and "cold-only" mini-batches. The Shuffle Scheduler interleaves these batches during training, ensuring the model maintains its predictive fidelity while allowing hot batches to execute entirely on-device without CPU communication.

Experimental Evaluation

The authors evaluated FAE using four production-scale datasets (Criteo Kaggle, Criteo Terabyte, Taobao Alibaba, and Avazu) and two state-of-the-art models (DLRM and TBSM).

Key Results

  • Performance Speedup: FAE achieved an average speedup of 2.3x compared to CPU-only training and 1.52x compared to XDL, a high-performance industry baseline for hybrid CPU-GPU training.
  • Communication Efficiency: The framework reduced the total volume of data transferred between the CPU and GPU by 1.54x.
  • Model Fidelity: Across all benchmarks, FAE maintained the same baseline accuracy (AUC/Logloss) as standard training methods, proving that the interleaved scheduling successfully prevents model bias.
  • Power Efficiency: By reducing the time the GPU spends idling for data transfers, FAE lowered GPU power consumption by nearly 10%.

Conclusion and Future Work

FAE demonstrates that the "memory-compute gap" in recommendation systems can be bridged by exploiting the semantic properties of the data itself. By treating embedding tables as non-uniform entities, FAE achieves significant speedups without requiring massive increases in GPU memory.

Future work may address the limitations of static thresholding. Currently, "hotness" is determined in a pre-processing phase. In online learning scenarios where popularity trends shift dynamically, a real-time re-classification mechanism would be beneficial. Additionally, combining FAE with quantization or sparsity techniques could further reduce the memory footprint of the "cold" tables residing on the CPU.

Summary updated

BibTeX
@article{adnan2021high,
  author = {Muhammad Adnan and Yassaman Ebrahimzadeh Maboud and Divya Mahajan and Prashant J. Nair},
  title = {{High-Performance Training by Exploiting Hot-Embeddings in Recommendation Systems}},
  journal = {Proc. VLDB Endow.},
  year = {2021},
}
Figure