Timezone: »
Poster
Hash Embeddings for Efficient Word Representations
Dan Tito Svenstrup · Jonas Hansen · Ole Winther
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 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.
Author Information
Dan Tito Svenstrup (DTU)
Jonas Hansen (Findzebra)
Ole Winther (Technical University of Denmark)
More from the Same Authors
-
2020 Meetup: MeetUp: Copenhagen, Denmark »
Ole Winther -
2021 : Hierarchical Few-Shot Generative Models »
Giorgio Giannone · Ole Winther -
2022 : Identifying endogenous peptide receptors by combining structure and transmembrane topology prediction »
Felix Teufel · Jan Christian Refsgaard · Christian Toft Madsen · Carsten Stahlhut · Mads Grønborg · Dennis Madsen · Ole Winther -
2022 : Few-Shot Diffusion Models »
Giorgio Giannone · Didrik Nielsen · Ole Winther -
2023 Poster: Diffusion Optimization Models with Trajectory Alignment for Constrained Design Generation »
Giorgio Giannone · Akash Srivastava · Ole Winther · Faez Ahmed -
2023 Poster: Implicit Transfer Operator Learning: Multiple Time-Resolution Models for Molecular Dynamics »
Mathias Schreiner · Ole Winther · Simon Olsson -
2019 Poster: BIVA: A Very Deep Hierarchy of Latent Variables for Generative Modeling »
Lars Maaløe · Marco Fraccaro · Valentin Liévin · Ole Winther -
2018 Poster: Recurrent Relational Networks »
Rasmus Berg Palm · Ulrich Paquet · Ole Winther -
2017 : Panel Session »
Neil Lawrence · Finale Doshi-Velez · Zoubin Ghahramani · Yann LeCun · Max Welling · Yee Whye Teh · Ole Winther -
2017 Poster: A Disentangled Recognition and Nonlinear Dynamics Model for Unsupervised Learning »
Marco Fraccaro · Simon Kamronn · Ulrich Paquet · Ole Winther -
2017 Spotlight: A Disentangled Recognition and Nonlinear Dynamics Model for Unsupervised Learning »
Marco Fraccaro · Simon Kamronn · Ulrich Paquet · Ole Winther