Skip to main content
QUICK REVIEW

[Paper Review] Deep Hash Embedding for Large-Vocab Categorical Feature Representations.

Wang-Cheng Kang, Derek Zhiyuan Cheng|arXiv (Cornell University)|Oct 21, 2020
Caching and Content DeliveryComputer Science50 references4 citations
TL;DR

This paper proposes Deep Hash Embedding (DHE), a collision-free, storage-free framework that uses a deep neural network to generate embeddings on the fly via deterministic, non-one-hot hashing encodings. DHE achieves state-of-the-art performance on large-vocabulary categorical features with significantly smaller model sizes and comparable AUC to one-hot encoding.

ABSTRACT

Embedding learning for large-vocabulary categorical features (e.g. user/item IDs, and words) is crucial for deep learning, and especially neural models for recommendation systems and natural language understanding tasks. Typically, the model creates a huge embedding table that each row represents a dedicated embedding vector for every feature value. In practice, to handle new (i.e., out-of-vocab) feature values and reduce the storage cost, the hashing trick is often adopted, that randomly maps feature values to a smaller number of hashing buckets. Essentially, thess embedding methods can be viewed as 1-layer wide neural networks with one-hot encodings. In this paper, we propose an alternative embedding framework Deep Hash Embedding (DHE), with non-one-hot encodings and a deep neural network (embedding network) to compute embeddings on the fly without having to store them. DHE first encodes the feature value to a dense vector with multiple hashing functions and then applies a DNN to generate the embedding. DHE is collision-free as the dense hashing encodings are unique identifiers for both in-vocab and out-of-vocab feature values. The encoding module is deterministic, non-learnable, and free of storage, while the embedding network is updated during the training time to memorize embedding information. Empirical results show that DHE outperforms state-of-the-art hashing-based embedding learning algorithms, and achieves comparable AUC against the standard one-hot encoding, with significantly smaller model sizes. Our work sheds light on design of DNN-based alternative embedding schemes for categorical features without using embedding table lookup.

Motivation & Objective

  • To address the high storage cost and out-of-vocabulary (OOV) challenges in traditional embedding tables for large-vocabulary categorical features.
  • To eliminate the need for storing large embedding tables while maintaining high model performance.
  • To design a framework that generates embeddings dynamically without lookup tables, using deep learning and hashing.
  • To achieve comparable performance to one-hot encoding with drastically reduced model size.

Proposed method

  • DHE uses multiple hashing functions to encode feature values into unique dense vectors, serving as non-one-hot identifiers.
  • These dense hash encodings are fed into a deep neural network (embedding network) that learns to produce final embeddings during training.
  • The encoding module is deterministic and non-learnable, ensuring collision-free representations for both in-vocab and out-of-vocab values.
  • The embedding network is trained end-to-end to memorize and generate accurate embeddings based on the hash-encoded inputs.
  • The framework avoids embedding table storage by computing embeddings on the fly, reducing memory footprint.
  • The method is designed to be compatible with existing deep learning models, especially in recommendation and NLP systems.

Experimental results

Research questions

  • RQ1Can a hashing-based framework generate embeddings without storing large embedding tables while maintaining performance?
  • RQ2How does a deep neural network trained on deterministic hash encodings compare to standard one-hot or hashing-based baselines in terms of accuracy and efficiency?
  • RQ3Can the proposed method effectively handle out-of-vocabulary feature values without performance degradation?
  • RQ4To what extent can the model size be reduced using this approach without sacrificing predictive performance?

Key findings

  • DHE achieves comparable AUC performance to standard one-hot encoding, demonstrating strong representation quality despite no embedding table storage.
  • DHE significantly reduces model size compared to traditional embedding tables and hashing-based baselines.
  • The framework is collision-free, ensuring unique representations for all feature values, including out-of-vocabulary ones.
  • Empirical results show DHE outperforms state-of-the-art hashing-based embedding learning algorithms on benchmark tasks.
  • The deterministic, non-learnable encoding module enables efficient and scalable embedding generation without lookup overhead.
  • The end-to-end training of the embedding network allows effective memorization of embedding information without precomputed tables.

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.