Introduction
Modern machine learning systems, particularly in recommendation and retrieval, rely heavily on "embeddings" to map categorical features to dense numerical vectors. As feature sets scale to billions of unique entries, embedding tables have become massive, creating a "memory wall." This paper presents the first comprehensive "apples-to-apples" comparison of 14 major embedding compression techniques, introducing a unified taxonomy and benchmarking framework.
The Memory Wall in Modern ML
Recommendation models (DLRMs) used by industry leaders like Meta can require up to 96 terabytes of memory solely for embedding storage. This scale makes training and deployment on standard hardware nearly impossible. While numerous compression methods—from hashing to pruning—have been proposed, the lack of a unified evaluation has left practitioners without clear guidance on which techniques best suit specific memory and latency constraints.
A Unified Taxonomy for Compression
The authors categorize compression techniques into two primary groups based on their operational level:
- Inter-feature Compression: This approach forces different features to share physical memory.
- Static Encoding: Uses fixed hash functions (e.g., CompoEmb, ROBE).
- Dynamic Encoding: Adjusts mappings during training based on feature frequency (e.g., MGQE).
- Intra-feature Compression: This approach compresses individual embedding vectors.
- Quantization: Reduces numerical precision (e.g., INT8).
- Dimension Reduction: Assigns shorter vectors to less critical features (e.g., AutoDim).
- Pruning: Removes unimportant values from vectors (e.g., AutoSrh).
Benchmarking Across DLRM and RAG
The study evaluates these methods using the Hetu deep learning system across two distinct scenarios:
- Recommendation (DLRM): Tested on massive Click-Through Rate (CTR) datasets like Avazu and Criteo.
- Retrieval (RAG): Evaluated using the Natural Questions (NQ) dataset with a corpus of 21 million Wikipedia articles to see how compression affects Retrieval-Augmented Generation in Large Language Models.
Key Insights: No Free Lunch and the Power Law
The benchmarking reveals several critical findings:
- No Universal Winner: The "best" method depends on the specific trade-off between training time, inference speed, and accuracy (AUC).
- The Power Law Advantage: Datasets typically follow a power law where a few features appear frequently. "Frequency-aware" methods that allocate more memory to these high-traffic features consistently outperform uniform approaches.
- Robustness of Static Methods: Simple hash-based methods like Dedup and ROBE are surprisingly effective, achieving high compression ratios without the complex training overhead of dynamic methods.
Performance Trade-offs: Accuracy vs. Latency
- Capability: Static encoding and pruning are the most versatile, scaling effectively from 50% down to 0.1% of original memory size.
- Accuracy: Quantization (INT8/16) is excellent for moderate compression (50-75%). For aggressive compression (1%), DHE and Dedup maintain the highest AUC in DLRM tasks.
- Latency: Simple lookup methods (Dedup, ROBE, Quantization) have the lowest inference latency. In contrast, methods involving heavy matrix operations (TT-Rec, DHE) can significantly slow down models.
Conclusion
While sophisticated methods like NAS-based dimension reduction offer high accuracy, they are often difficult to tune. The authors suggest that future research should focus on making these techniques more "plug-and-play" and exploring their performance in distributed, multi-GPU environments.
Summary updated