Skip to main content
QUICK REVIEW

[Paper Review] Saec: Similarity-Aware Embedding Compression in Recommendation Systems

Xiaorui Wu, Hong Xu|arXiv (Cornell University)|Feb 26, 2019
Recommender Systems and TechniquesComputer Science18 references4 citations
TL;DR

Saec proposes a similarity-aware, field-aware embedding compression method for recommendation systems that clusters high-frequency features using k-means and assigns low-frequency features to nearest centroids, achieving ~27x effective compression with no performance drop in AUC and log loss on real-world production data from Tencent's QQ mobile browser.

ABSTRACT

Production recommendation systems rely on embedding methods to represent various features. An impeding challenge in practice is that the large embedding matrix incurs substantial memory footprint in serving as the number of features grows over time. We propose a similarity-aware embedding matrix compression method called Saec to address this challenge. Saec clusters similar features within a field to reduce the embedding matrix size. Saec also adopts a fast clustering optimization based on feature frequency to drastically improve clustering time. We implement and evaluate Saec on Numerous, the production distributed machine learning system in Tencent, with 10-day worth of feature data from QQ mobile browser. Testbed experiments show that Saec reduces the number of embedding vectors by two orders of magnitude, compresses the embedding size by ~27x, and delivers the same AUC and log loss performance.

Motivation & Objective

  • Address the growing memory footprint of large embedding matrices in production recommendation systems, which can reach hundreds of GBs due to billions of features.
  • Overcome limitations of existing model compression techniques that are not suited for recommendation systems due to dynamic feature growth and variable embedding vector lengths.
  • Leverage feature similarity and frequency to compress embedding matrices effectively while preserving model performance.
  • Design a scalable clustering method that processes only the most frequent features to drastically reduce clustering time without sacrificing accuracy.
  • Enable practical deployment in large-scale production systems by minimizing computational overhead and maintaining high inference efficiency.

Proposed method

  • Apply k-means clustering separately within each feature field to handle variable-length embedding vectors, ensuring field-aware compression.
  • Use only the top-k most frequent features per field as cluster representatives to reduce clustering computation time.
  • Assign low-frequency features to the nearest centroid based on embedding vector similarity, minimizing information loss.
  • Optimize clustering speed by leveraging the heavy-tailed distribution of feature frequencies, reducing processing time by over 32x.
  • Retrain the model after compression to compensate for accuracy loss, especially for compressed clusters.
  • Integrate the compressed embedding matrix into a production deep learning system for end-to-end evaluation.

Experimental results

Research questions

  • RQ1Can clustering similar features within fields reduce the embedding matrix size without degrading model performance in recommendation systems?
  • RQ2How does using only high-frequency features for clustering affect the accuracy and scalability of the compression process?
  • RQ3To what extent can fast clustering based on feature frequency reduce computational cost while maintaining compression effectiveness?
  • RQ4What is the optimal number of clusters (k) that balances compression ratio and model performance in real-world recommendation workloads?
  • RQ5How does the proposed method compare to existing embedding compression techniques in terms of memory reduction and inference quality?

Key findings

  • Saec reduces the number of embedding vectors by two orders of magnitude, achieving an effective compression ratio of approximately 27x.
  • The compressed model maintains the same AUC and log loss performance as the original model, demonstrating no degradation in predictive accuracy.
  • Fast clustering optimization reduces clustering time by over 32x, bringing it down to under 2 minutes per field, making the method practical for hourly retraining.
  • The optimal number of clusters (k) is 100, as higher values (e.g., k=1000) lead to performance degradation due to poor initialization and reduced retraining data per cluster.
  • k=50 leads to inferior performance due to overly coarse-grained compression, indicating that k=100 strikes the best balance between compression and information retention.
  • The method is deployable in production systems, with ongoing efforts to integrate Saec into Tencent’s full-scale recommendation pipeline.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.