Skip to main content
QUICK REVIEW

[Paper Review] Mixed Dimension Embeddings with Application to Memory-Efficient Recommendation Systems

Antonio Ginart, Maxim Naumov|arXiv (Cornell University)|Sep 25, 2019
Recommender Systems and TechniquesComputer Science77 references32 citations
TL;DR

This paper proposes mixed dimension (MD) embeddings for recommendation systems, where embedding vector dimensions scale with feature popularity rather than being uniformly fixed. By allocating more parameters to frequently queried items and fewer to rare ones, MD embeddings reduce memory usage by up to 16× with no accuracy loss on the Criteo dataset, while also accelerating training by over 2× on GPU.

ABSTRACT

Embedding representations power machine intelligence in many applications, including recommendation systems, but they are space intensive -- potentially occupying hundreds of gigabytes in large-scale settings. To help manage this outsized memory consumption, we explore mixed dimension embeddings, an embedding layer architecture in which a particular embedding vector's dimension scales with its query frequency. Through theoretical analysis and systematic experiments, we demonstrate that using mixed dimensions can drastically reduce the memory usage, while maintaining and even improving the ML performance. Empirically, we show that the proposed mixed dimension layers improve accuracy by 0.1% using half as many parameters or maintain it using 16X fewer parameters for click-through rate prediction task on the Criteo Kaggle dataset.

Motivation & Objective

  • Address the high memory consumption of embedding layers in large-scale recommendation systems, which can exceed 99.9% of model storage.
  • Overcome the inefficiency of uniform embedding dimensions that waste parameters on low-frequency features while underfitting high-frequency ones.
  • Develop a parameter-efficient embedding architecture that dynamically sizes embedding dimensions based on feature query frequency.
  • Theoretical and empirical validation is sought to show that MD embeddings improve both memory efficiency and model generalization under skewed data distributions.
  • Achieve faster training and reduced tuning complexity compared to existing non-uniform embedding methods.

Proposed method

  • Propose a mixed dimension (MD) embedding layer where each embedding vector's dimension is set based on its query frequency, rather than a fixed uniform dimension.
  • Formulate the embedding dimension selection as a convex optimization problem to minimize reconstruction distortion under a total parameter budget.
  • Use a low-rank approximation framework to model the embedding matrix as a sum of blocks, each corresponding to a pair of categorical features.
  • Derive an optimal dimension allocation rule using Lagrangian relaxation, where the optimal dimension for each feature pair is determined by its popularity, spectral decay, and parameter budget.
  • For power-law spectral decay, derive a closed-form solution: $ d^{*}_{ij} = \lambda \zeta_{ij} \Pi_{ij}^{1/(2\beta)} $, where $ \lambda $ is a Lagrange multiplier and $ \zeta_{ij} $ depends on feature sizes and spectral decay.
  • Round down the continuous optimal dimensions to integers to ensure feasibility, with provably small approximation error (typically <1–10% spectral mass loss).
Figure 1 : Matrix Architecture for UD and MD Embedding Layers.
Figure 1 : Matrix Architecture for UD and MD Embedding Layers.

Experimental results

Research questions

  • RQ1Can embedding dimensions be dynamically allocated based on feature popularity to reduce memory usage without sacrificing model performance?
  • RQ2Does mixed dimension embedding outperform uniform dimension embedding in terms of reconstruction distortion and generalization under memory constraints?
  • RQ3What is the optimal embedding dimension for each feature given its popularity and the overall parameter budget?
  • RQ4How does the proposed method compare in training speed and tuning complexity to existing non-uniform embedding architectures?
  • RQ5Under what conditions (e.g., spectral decay, popularity skew) does MD embedding yield provable improvements over uniform embedding?

Key findings

  • On the Criteo Kaggle dataset, MD embeddings achieve 0.1% higher accuracy than uniform embeddings while using only half the number of parameters.
  • MD embeddings maintain the same accuracy as uniform embeddings while reducing parameter count by up to 16×, demonstrating strong parameter efficiency.
  • Training with MD embeddings is over 2× faster on GPU due to reduced memory bandwidth pressure and more efficient computation.
  • Theoretical analysis proves that MD embeddings incur lower reconstruction distortion than uniform embeddings when the data is memory-limited and the popularity distribution is sufficiently skewed.
  • For power-law spectral decay, the optimal embedding dimension scales as $ \Pi_{ij}^{1/(2\beta)} $, where $ \Pi_{ij} $ is the popularity of the feature pair.
  • The approximation error from rounding continuous optimal dimensions to integers is small (typically <1–10% spectral mass loss), ensuring practical feasibility.
Figure 2 : CTR prediction results for MD embeddings on Criteo dataset using DLRM. Implementation is available as part of an open-source project on GitHub: facebookresearch/dlrm . Fig. 2a (left): Learning curves for selected emb. arch. Fig. 2b (center): Loss vs. # param. for varying $\alpha$ . Fig 2c
Figure 2 : CTR prediction results for MD embeddings on Criteo dataset using DLRM. Implementation is available as part of an open-source project on GitHub: facebookresearch/dlrm . Fig. 2a (left): Learning curves for selected emb. arch. Fig. 2b (center): Loss vs. # param. for varying $\alpha$ . Fig 2c

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.