Experimental Analysis of Large-scale Learnable Vector Storage Compression

Hailin Zhang, Penghao Zhao, Xupeng Miao, Yingxia Shao, Zirui Liu, Tong Yang, Bin Cui

TL;DR

This paper presents a comprehensive benchmark and a new taxonomy for embedding compression techniques, which are essential for managing the massive memory footprints of modern recommendation and retrieval models. By evaluating 14 representative methods across diverse metrics like AUC, memory usage, and latency, the authors reveal that no single method is a "silver bullet," providing a critical roadmap for engineers to navigate complex performance trade-offs.

What Problem Does This Paper Address?

Modern machine learning, particularly in recommendation systems (like those at Meta or Tencent) and document retrieval, relies heavily on learnable embedding vectors. These vectors map categorical features (like User ID or Item ID) into dense numerical spaces. However, as the number of unique features grows into the billions, these embedding tables can swell to terabytes in size—Meta has reported models requiring 96 terabytes of memory just for embeddings.

This massive scale creates a bottleneck for both training and deployment, especially on memory-constrained hardware like GPUs. While many compression techniques (hashing, quantization, pruning, etc.) have been proposed, they are often evaluated in isolation using different baselines and metrics. This paper addresses the lack of a unified, fair comparison, making it difficult for practitioners to choose the right tool for their specific memory budget and latency requirements.

Methods

The authors introduce a new taxonomy to categorize embedding compression into two main paradigms:

  1. Inter-feature Compression: Multiple features are forced to share the same underlying embedding parameters. This includes static encoding (fixed mappings like hashing or tensor-train decomposition) and dynamic encoding (mappings that evolve during training).
  2. Intra-feature Compression: Each feature maintains its own embedding, but the vector itself is compressed. This includes quantization (using fewer bits per value), dimension reduction (assigning smaller vectors to less important features), and pruning (removing individual weights to create sparse vectors).
Figure 2: (a) A typical DLRM. (b) A typical retrieval-augmented LLM. (c) An example of inter-feature compression, the original 8 features now share 4 embeddings. (d) An example of intra-feature compression, each embedding is compressed individually.

To evaluate these, they built a unified, modular framework implemented on the Hetu deep learning system. This framework breaks down the compression pipeline into four interchangeable modules: the encoding function, the embedding layer, a scheduler for training stages, and an auxiliary module for tracking feature statistics.

Figure 3: Overview of the evaluation framework.

Datasets

The study evaluates 14 representative methods across two primary scenarios:

  • DLRM (Deep Learning Recommendation Models): Tested on three large-scale click-through rate (CTR) datasets: Avazu, Criteo, and a commercial dataset from Tencent (Company) containing over 66 million features.
  • Retrieval-Augmented LLM (RAG): Tested on the Natural Questions (NQ) dataset using a corpus of 21 million Wikipedia articles to evaluate how compression affects the quality of retrieved documents for large language models.

Key Insights and Ideas

  • The "No Free Lunch" Theorem for Embeddings: There is no single best method. The "winner" changes depending on whether you prioritize model accuracy (AUC), inference speed, or training time.
  • Pruning as a Denoiser: Surprisingly, at moderate compression levels, pruning methods (like AutoSrh) can actually improve model quality (AUC) by removing redundant, noisy parameters from the long-tail of infrequent features.
  • The Latency Trap: Methods like TT-Rec and DHE achieve impressive compression and accuracy but suffer from massive inference latency—sometimes over 100x slower than uncompressed baselines—due to complex matrix multiplications required to reconstruct vectors.
  • Quantization is the "Low-Hanging Fruit": Simple INT8/16 quantization provides a reliable 2x-4x memory reduction with negligible impact on accuracy and almost zero latency overhead, making it a robust first choice for most applications.

Key Results

  • Best for Accuracy: Static encoding (Dedup), quantization (ALPT), and pruning (AutoSrh) consistently achieved the highest AUC across datasets.
  • Best for Extreme Compression: Pruning and hash-based methods (CompoEmb, ROBE) were the most capable, maintaining functional models even at 0.1% of the original memory budget (1000x compression).
  • Inference Latency: Dedup, ROBE, and Quantization methods showed the lowest latency, often matching the speed of uncompressed tables. In contrast, TT-Rec latency on the Criteo dataset jumped from ~1ms to over 80ms.
  • RAG Performance: In retrieval tasks, INT8/16 and MagSVD (a magnitude-aware dimension reduction) performed best under large memory budgets, while MagPQ (quantization) was superior for very tight memory constraints.

Limitations and Future Work

The authors note that while their taxonomy covers the "how" of implementation, the relationship between specific dataset distributions and method performance remains somewhat opaque. It is currently difficult to predict which method will work best for a new dataset without empirical testing.

Future research directions include:

  • Hybrid Methods: Combining the strengths of different paradigms, such as using quantization as a "plug-in" for pruning or dimension reduction.
  • Dynamic Adaptation: Developing methods that can automatically adjust compression levels for online learning scenarios where feature distributions shift over time.
  • RAG-Specific Design: Creating compression techniques specifically tailored for the high-dimensional, generated embeddings used in retrieval-augmented LLMs, which currently rely on general-purpose methods.

Summary updated

BibTeX
@article{zhang2023experimental,
  author = {Hailin Zhang and Penghao Zhao and Xupeng Miao and Yingxia Shao and Zirui Liu and Tong Yang and Bin Cui},
  title = {{Experimental Analysis of Large-scale Learnable Vector Storage Compression}},
  journal = {Proc. VLDB Endow.},
  year = {2023},
  doi = {10.14778/3636218.3636234},
}
Figure