Learning Elastic Embeddings for Customizing On-Device Recommenders

Tong Chen, Hongzhi Yin, Yujia Zheng, Zi Huang, Yang Wang, Meng Wang

Introduction

As recommendation services transition from cloud-based infrastructures to the "edge" (user devices), they offer significant advantages in terms of user privacy and reduced latency. However, a primary challenge in this transition is the extreme memory heterogeneity of edge devices. While high-end smartphones may possess gigabytes of RAM, budget phones and IoT devices are often constrained to a few megabytes.

Existing memory-efficient recommendation models are typically "static," meaning they are optimized for a specific, fixed memory budget. A model designed for a 10MB budget will underperform on a 5MB device and fail to utilize the additional resources of a 25MB device. Currently, supporting a diverse fleet of hardware requires retraining separate models for every possible memory constraint—a process that is both computationally expensive and difficult to scale.

Proposed Method: RULE

To address these limitations, we introduce RULE (Recommendation with Universally Learned Elastic Embeddings), a "train-once, deploy-anywhere" framework. RULE enables the instant customization of recommender systems for any device's memory budget without the need for retraining.

Elastic Embeddings and Item Grouping

The core of RULE is the concept of "elastic embeddings." Instead of representing an item with a single high-dimensional vector, each item is represented by a set of $N$ smaller "embedding blocks." An item's active embedding is formed by concatenating a subset of these blocks. To manage the search space, items are partitioned into $G$ groups (e.g., based on popularity). All items within a group share the same elastic structure, meaning they utilize the same block indices.

Architecture of RULE showing item grouping and elastic embedding block selection.

Diversity-Driven Learning

During the initial training phase, the model must ensure that different embedding blocks capture non-redundant information. We employ a diversity-driven regularization term based on the Frobenius norm to force different blocks to encode distinct features. This ensures that even when a device can only accommodate a few blocks, those blocks are as expressive as possible.

Once the "once-for-all" model is trained, its weights are frozen. To adapt to a specific memory budget $M$, RULE employs an evolutionary search algorithm to find the optimal combination of blocks for each item group. To accelerate this process, we utilize a Performance Estimator based on Factorization Machines, which predicts the performance of candidate architectures nearly instantaneously.

Experimental Evaluation

We evaluated RULE on two large-scale benchmarks: Amazon-Book and Yelp2020. These datasets represent different interaction densities, with Yelp2020 being significantly sparser than Amazon-Book. Standard preprocessing was applied to filter inactive users and unpopular items following standard research protocols.

Performance Results

RULE consistently outperformed state-of-the-art baselines, including LightGCN, DLRM-CE, and AutoEmb, across memory budgets of 5MB, 10MB, and 25MB. Notably, on the sparse Yelp2020 dataset with a minimal 5MB budget, RULE maintained high accuracy (NDCG@50) while other compressed models experienced significant performance degradation.

Comparative performance (NDCG@50) of RULE against baselines on Amazon-Book and Yelp2020 across various memory budgets.

Key Insights

  • Decoupling Training from Deployment: By training a superset of embeddings with diversity constraints, the model becomes a flexible "menu" of options for post-hoc sub-selection.
  • Popularity-Aware Scaling: Popular items benefit more from higher-dimensional embeddings, whereas long-tail items can be effectively represented with fewer blocks.
  • Efficiency: RULE achieves low latency, generating recommendation lists in under 50ms on quad-core mobile setups. The search process itself is negligible in time, allowing for real-time customization upon a download request.

Conclusion and Future Work

RULE provides a robust solution for deploying recommendation models on heterogeneous edge devices. Future work will explore extending this approach to user embeddings, which may become a bottleneck in systems with massive user bases. Additionally, optimizing item grouping heuristics and addressing cold-start scenarios for new items remain important areas for further research.

Summary updated

BibTeX
@inproceedings{chen2021learning,
  author = {Tong Chen and Hongzhi Yin and Yujia Zheng and Zi Huang and Yang Wang and Meng Wang},
  title = {{Learning Elastic Embeddings for Customizing On-Device Recommenders}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2021},
  doi = {10.1145/3447548.3467220},
}
Figure