Hash Embeddings for Efficient Word Representations

By Dan Svenstrup, Jonas Meinertz Hansen, Ole Winther. 2017

99 citations recorded by the source corpus.

We present hash embeddings, an efficient method for representing words in a continuous vector form. A hash embedding may be seen as an interpolation between a standard word embedding and a word embedding created using a random hash function (the hashing trick). In hash embeddings each token is represented by $k$ $d$-dimensional embeddings vectors and one $k$ dimensional weight vector. The final $d$ dimensional representation of the token is the product of the two. Rather than fitting the embedding vectors for each token these are selected by the hashing trick from a shared pool of $B$ embedding vectors. Our experiments show that hash embeddings can easily deal with huge vocabularies consisting of millions of tokens. When using a hash embedding there is no need to create a dictionary before training nor to perform any kind of vocabulary pruning after training. We show that models trained using hash embeddings exhibit at least the same level of performance as models trained using regular embeddings across a wide range of tasks. Furthermore, the number of parameters needed by such an embedding is only a fraction of what is required by a regular embedding. Since standard embeddings and embeddings constructed using the hashing trick are actually just special cases of a hash embedding, hash embeddings can be considered an extension and improvement over the existing regular embedding types.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Natural Language Processing, Efficiency & Compression

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Andrew Zisserman
  2. Quoc V. Le
  3. Mohit Bansal
  4. Trevor Darrell
  5. Sergey Levine
  6. Jianfeng Gao
  7. Yoshua Bengio
  8. Cordelia Schmid

In Computer Vision and Pattern Recognition

  1. Luc Van Gool
  2. Andrew Zisserman
  3. Dacheng Tao
  4. Trevor Darrell
  5. Jitendra Malik
  6. Cordelia Schmid
  7. Ming-Hsuan Yang
  8. Andrea Vedaldi

In Natural Language Processing

  1. Colin Raffel
  2. Graham Neubig
  3. John Wieting
  4. Andrew Zisserman
  5. Mohit Bansal
  6. Ed H. Chi
  7. Benoît Sagot
  8. Luke S. Zettlemoyer

In Efficiency & Compression

  1. Andrew Zisserman
  2. Colin Raffel
  3. Iulia Turc
  4. Ed H. Chi
  5. Olivier J. H'enaff
  6. John T. Hancock
  7. Ting-Li Chen
  8. Sebastian Borgeaud

Citations in the corpus