Fine-Grained Embedding Dimension Optimization During Training for Recommender Systems

Qinyi Luo, Penghan Wang, Wei Zhang, Fan Lai, Jiachen Mao, Xiaohan Wei, Jun Song, Wei-Yu Tsai, Shuai Yang, Yuxi Hu, Xuehai Qian · DOI

Abstract

Modern recommendation systems utilize Deep Learning Recommendation Models (DLRMs) with massive embedding tables that frequently exceed GPU memory limits. We introduce FIITED (Fine-grained In-Training Embedding Dimension pruning), a novel framework that dynamically optimizes memory footprint during training. FIITED partitions embedding vectors into chunks and employs a utility-based pruning strategy driven by access frequency and gradient norms. Supported by a custom Virtually-Hashed Physically-Indexed (VHPI) storage system, FIITED achieves up to 800x compression on public benchmarks and over 65% reduction in industry-scale models with minimal impact on accuracy and a 1.41x training speedup.

Introduction

High-dimensional embedding vectors are essential for capturing categorical feature relationships in DLRMs. However, the sheer scale of these tables—often reaching terabytes—presents significant infrastructure challenges. Existing Embedding Dimension Search (EDS) methods typically operate as pre- or post-processing steps and fail to alleviate memory pressure during the critical training phase, which is when memory constraints are most acute.

Methodology

FIITED addresses these limitations through three core components: fine-grained utility scoring, dynamic re-allocation, and the VHPI storage system. Unlike coarse-grained methods that assign a single dimension to an entire table, FIITED manages embeddings at the chunk level.

Overview of embedding lookup and the FIITED storage architecture compared to existing EDS methods.

As illustrated in the figure above, FIITED divides every embedding vector into $K$ chunks. It tracks a utility score for each chunk based on its access frequency and gradient norms. If a chunk’s utility falls below a threshold, it is evicted to save memory. The custom VHPI system uses a bitmask to track active chunks and a free address stack to recycle memory from pruned dimensions immediately, ensuring that theoretical savings translate into actual training-time memory reduction. To maintain compatibility with model interaction layers, pruned vectors are simply zero-padded.

Key Insights: Heterogeneity and Dynamics

A fundamental observation driving FIITED is the heterogeneity of feature importance. Not all users or items require the same dimensionality; "power users" may benefit from high-dimensional representations, while infrequent items can be represented compactly.

Analysis of embedding importance across tables and time, highlighting the need for fine-grained, dynamic optimization.

Furthermore, importance is dynamic. As shown in the empirical analysis above, importance rankings can shift over time. FIITED’s ability to "un-prune" (re-allocate) chunks allows it to adapt to these temporal shifts, ensuring that as a "cold" item becomes "hot," its representation can expand to capture more complexity.

Evaluation and Results

The researchers evaluated FIITED on public benchmarks (Criteo Kaggle, Criteo Terabyte, Avazu, MovieLens-20M) and massive production models at Meta.

  • Massive Compression: On public datasets, FIITED achieved between 2.1x and 800x reduction in embedding table size.
  • Industry Success: On Meta's production models (180GB to 430GB), it reduced embedding size by over 65% while maintaining model quality (measured by Normalized Entropy).
  • Performance Gains: Because smaller tables fit better in fast memory, FIITED achieved a 1.41x training speedup compared to standard unpruned models.
  • Accuracy: In almost all cases, the accuracy drop was kept within the 0.1% threshold, the industry standard for negligible change.

Conclusion

FIITED demonstrates that fine-grained, dynamic pruning is a viable path toward training massive recommendation models on constrained hardware. By focusing on in-training memory reduction through the VHPI architecture, it bridges the gap between theoretical dimension search and practical systems engineering. Future work includes optimizing hyperparameter selection for chunk sizes and extending the architecture to geographically distributed parameter servers.

Summary updated

BibTeX
@misc{luo2024fine,
  author = {Qinyi Luo and Penghan Wang and Wei Zhang and Fan Lai and Jiachen Mao and Xiaohan Wei and Jun Song and Wei-Yu Tsai and Shuai Yang and Yuxi Hu and Xuehai Qian},
  title = {{Fine-Grained Embedding Dimension Optimization During Training for Recommender Systems}},
  year = {2024},
  eprint = {2401.04408},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.04408},
}
Figure