Learnable Embedding sizes for Recommender Systems

Siyi Liu, Chen Gao, Yihong Chen, Depeng Jin, Yong Li

In the world of deep learning-based recommendation systems, bigger isn't always better. While these models power everything from your video feed to e-commerce product suggestions, they harbor a massive secret: gigantic embedding tables that swallow memory and invite overfitting. The paper "Learnable Embedding Sizes for Recommender Systems" introduces a clever way to put these models on a diet without losing their predictive intelligence.

The Efficiency Bottleneck

Modern recommendation models rely heavily on embeddings—dense mathematical vectors that represent categorical features like User IDs, Movie IDs, or Locations. Because real-world platforms have millions of users and items, these embedding tables become the primary efficiency bottleneck of the entire system.

This architecture creates two major headaches:

  1. Memory Bloat: These tables can require tens of gigabytes of RAM, making them expensive to deploy on edge devices or standard servers.
  2. The Overfitting Trap: Traditionally, models assign the same vector size (e.g., 64 dimensions) to every feature. However, a highly popular item might need all 64 dimensions to capture its nuances, while a rare item seen by only two people does not. Giving rare features too much "representation capacity" leads the model to memorize noise rather than learning generalizable patterns.

Existing solutions either use human-designed rules (which are clunky and suboptimal) or Neural Architecture Search (NAS), which is so computationally expensive it’s often unaffordable for real-world training.

The Solution: Plug-in Embedding Pruning (PEP)

To address this, the authors introduce PEP (Plug-in Embedding Pruning). Instead of manually picking an embedding size or relying on heavy search algorithms, PEP makes the embedding size learnable during standard training.

Illustration of the PEP pruning process, where embedding values below a learned threshold are zeroed out.
  • Learnable Thresholds: PEP introduces a threshold parameter ($s$) for each embedding. During training, the model learns which parts of an embedding vector are actually useful. If an absolute value falls below the threshold (e.g., $g(s) = 0.15$), it gets pruned and set to zero.
  • Soft Thresholding: The authors use a re-parameterization trick—specifically a modified ReLU function—to ensure the pruning process is differentiable. This allows the thresholds to be updated via standard gradient descent alongside the model's weights.
  • Granularity Options: PEP is highly flexible and can be applied at different levels: pruning the whole table globally, specific dimensions, specific features, or even individual elements within a vector.
  • The Lottery Ticket Strategy: Once the "unimportant" parameters are pruned, the authors draw inspiration from the Lottery Ticket Hypothesis. They reset the remaining "winning" parameters to their original starting values and retrain. This second pass ensures the pruned model reaches its maximum potential.

Key Results and Insights

The researchers evaluated PEP on three industry-standard benchmarks for click-through rate (CTR) prediction: MovieLens-1M, Criteo, and Avazu.

Performance comparison of PEP against baselines across FM, DeepFM, and AutoInt architectures on the MovieLens 1M dataset.
  • Winning the Trade-off: As shown in the performance curves above, PEP (the red line) forms a "frontier curve" that consistently beats previous baselines like NAS-based DartsEmb or Mixed Dimension Embeddings (MDE). It achieves higher AUC (Area Under the ROC Curve) while requiring significantly fewer parameters.
  • Massive Compression: On massive datasets like Criteo and Avazu, PEP reduced parameter counts by up to 97-99.9% in certain configurations, shrinking memory footprints from gigabytes to megabytes.
  • Denoising as a Feature: Pruning isn't just about saving space; it acts as a powerful form of regularization. By automatically cutting out the noise in low-frequency features, the model generalizes better to new data. This explains why accuracy often increases after aggressive pruning.
  • Computational Efficiency: Unlike NAS methods that can double or triple training time, PEP only adds about 20-30% more time to the base model's training.

Limitations and Future Work

While PEP is a powerful, lightweight plug-in, the paper primarily focuses on standard CTR prediction architectures (like FM, DeepFM, and AutoInt). Additionally, while the thresholds are learnable, the initial threshold value still requires some manual tuning.

Future research could explore applying PEP to more complex graph-based recommenders or developing sophisticated threshold functions that eliminate the need for manual initialization entirely. For now, PEP stands as a highly practical, "once-for-all" tool for any machine learning engineer looking to deploy massive recommendation models on a strict memory budget.

Summary updated

BibTeX
@inproceedings{liu2021learnable,
  author = {Siyi Liu and Chen Gao and Yihong Chen and Depeng Jin and Yong Li},
  title = {{Learnable Embedding sizes for Recommender Systems}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
}
Figure