Stochastic Communication Avoidance for Recommendation Systems

Lutfi Eren Erdogan, Vijay Anand Raghava Kanakagiri, Kurt Keutzer, Zhen DongarXiv 2024 · DOI

Training modern Deep Learning Recommendation Models (DLRMs) is increasingly bottlenecked by a "memory wall." While these models power essential internet services like content feeds and ad-targeting, their massive embedding tables—which map categorical features to dense vectors—frequently exceed the memory capacity of high-end GPUs. This research introduces SCARS (Stochastic Communication Avoidance for Recommendation Systems), a theoretical framework designed to minimize the overhead of CPU-GPU communication in hybrid training environments.

The Memory Bottleneck in Recommendation Systems

Unlike compute-heavy models in Computer Vision or Natural Language Processing, DLRMs are primarily memory-intensive. Embedding tables can reach terabyte scales, far surpassing the 24GB–80GB limits of modern GPUs. Standard solutions often involve either slow CPU-only training or CPU-GPU hybrid approaches where the GPU handles neural network computation while the CPU stores the embeddings. The latter creates a significant bottleneck as sparse embedding lookups must be constantly transferred across the relatively slow PCIe bus.

Methodology: The SCARS Framework

SCARS addresses this bottleneck through a multi-pillared approach focused on communication efficiency and intelligent memory management:

  1. Coalescing on Device: In a typical training batch, multiple samples often reference the same popular items (e.g., trending videos). SCARS "coalesces" these lookups on the GPU, sending only unique embeddings and a list of indices to the CPU, rather than redundant data.
  2. Stochastic Caching: Leveraging the power-law distribution of embedding access, the system caches the most frequently accessed ("hot") embeddings directly in GPU memory.
  3. Mathematical Optimization: The core contribution is a framework that calculates expected communication costs based on data probability distributions. This allows SCARS to solve the trade-off between batch size (which increases lookup overlap) and cache size (which competes for GPU memory) using binary search to find the optimal bandwidth configuration.
SCARS architecture overview showing the separation of cold embedding tables in main memory and cached hot embedding tables on GPUs.

Key Insights and Performance

The researchers evaluated SCARS using the Criteo Terabyte Dataset and Alibaba User Behavior Analysis (UBA) dataset. Several critical insights emerged:

  • The "Hot" Embedding Advantage: Caching even a small amount of data (e.g., 256MB) can eliminate a vast majority of CPU-GPU traffic due to the high skew in real-world data access patterns.
  • The Forward Pass Trade-off: There is a point of diminishing returns; as the on-GPU cache grows, the time required for the GPU to perform lookups (the forward pass) can eventually outweigh the communication savings.
  • DRAM Write Efficiency: By caching embeddings, the system significantly reduces the number of writes to main system memory during optimization steps, a common hidden source of latency.

Results and Impact

SCARS demonstrates substantial improvements over standard baselines. On the Criteo dataset, the framework achieved up to a 6x increase in training throughput. Furthermore, the ability to handle larger batch sizes efficiently allowed models to reach target accuracy levels much faster in wall-clock time.

Performance comparison showing SCARS achieving significantly lower iteration and epoch times compared to CPU-only and CPU-GPU baselines.

As shown in the experimental results, SCARS completed a training epoch in just 27.12 minutes, a significant improvement over the 46.12 minutes required by the standard CPU-GPU baseline.

Limitations and Future Directions

While SCARS provides a robust framework for static distributions, future work is needed to address dynamic "online" settings where item popularity shifts rapidly. Additionally, the researchers noted that current deep learning platforms like PyTorch often allocate memory greedily, suggesting that reaching theoretical maximum efficiency may require more granular, low-level control over GPU memory management. Future studies may also explore how high-speed interconnects like NVLink influence the optimal balance between caching and coalescing strategies.

Summary updated

BibTeX
@misc{erdogan2024stochastic,
  author = {Lutfi Eren Erdogan and Vijay Anand Raghava Kanakagiri and Kurt Keutzer and Zhen Dong},
  title = {{Stochastic Communication Avoidance for Recommendation Systems}},
  year = {2024},
  eprint = {2411.01611},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.01611},
}
Figure