Skip to main content
QUICK REVIEW

[Paper Review] word2ket: Space-efficient Word Embeddings inspired by Quantum Entanglement

Aliakbar Panahi, Seyran Saeedi|arXiv (Cornell University)|Nov 12, 2019
Quantum Computing Algorithms and ArchitectureComputer Science10 citations
TL;DR

This paper proposes word2ket and word2ketXS, space-efficient word embedding methods inspired by quantum tensor product spaces that reduce embedding storage by up to 100,000-fold with minimal accuracy loss. By representing word embeddings as low-rank tensor products of smaller vectors, the approach enables significant memory savings during training and inference while maintaining high performance on NLP tasks.

ABSTRACT

Deep learning natural language processing models often use vector word embeddings, such as word2vec or GloVe, to represent words. A discrete sequence of words can be much more easily integrated with downstream neural layers if it is represented as a sequence of continuous vectors. Also, semantic relationships between words, learned from a text corpus, can be encoded in the relative configurations of the embedding vectors. However, storing and accessing embedding vectors for all words in a dictionary requires large amount of space, and may stain systems with limited GPU memory. Here, we used approaches inspired by quantum computing to propose two related methods, {\\em word2ket} and {\\em word2ketXS}, for storing word embedding matrix during training and inference in a highly efficient way. Our approach achieves a hundred-fold or more reduction in the space required to store the embeddings with almost no relative drop in accuracy in practical natural language processing tasks.

Motivation & Objective

  • Address the high memory footprint of large-scale word embedding matrices in deep learning NLP models.
  • Reduce the storage and GPU memory requirements for word embeddings without significant accuracy degradation.
  • Explore quantum-inspired tensor product representations to compress dense embedding matrices efficiently.
  • Enable efficient training and inference on resource-constrained hardware by minimizing embedding matrix size.
  • Evaluate the trade-off between memory savings and model performance across multiple NLP benchmarks.

Proposed method

  • Represent the full $d \times p$ word embedding matrix as a tensor product of smaller, low-rank component vectors using quantum-inspired Hilbert space constructions.
  • Use rank-1 and rank-2 tensor decompositions (word2ket) to compress embeddings into $O(\log d)$ parameters per word.
  • Introduce word2ketXS, a higher-order tensor decomposition (up to order 4) that enables even greater compression by jointly encoding all word embeddings.
  • Encode the full embedding matrix using only a few small matrices $F_{jk}$, reducing the number of parameters from $d \times p$ to $O(\log d)$.
  • Apply the tensor product decomposition to approximate the original embedding matrix during both training and inference.
  • Leverage the structure of tensor product spaces to maintain semantic relationships between words while drastically reducing storage.

Experimental results

Research questions

  • RQ1Can quantum-inspired tensor product decompositions achieve substantial memory savings for word embedding matrices without significant accuracy loss?
  • RQ2How does the performance of NLP models using word2ket and word2ketXS compare to standard word embeddings across multiple benchmarks?
  • RQ3What is the trade-off between compression ratio and model accuracy when increasing tensor order in word2ketXS?
  • RQ4How does the computational overhead of the new embedding methods compare to standard training and inference?
  • RQ5Can the proposed method scale to large vocabulary sizes (e.g., $d = 10^5$) while maintaining semantic fidelity in downstream tasks?

Key findings

  • word2ketXS achieved up to 100,000-fold reduction in embedding storage space with less than a 3% relative drop in F1 score on the SQuAD dataset.
  • On the IMDB sentiment classification task, word2ketXS maintained a test accuracy within 0.5% of the baseline model despite a 1,000-fold reduction in embedding parameters.
  • The training time increased from 5.8 hours (baseline) to 9 hours for order-4 word2ketXS, but model training dynamics remained largely unchanged.
  • For the SQuAD task, a 1000-fold space reduction led to only a 0.5-point drop in F1 score, demonstrating strong robustness to compression.
  • The method achieved high compression efficiency even at large vocabulary sizes, with the order-4 tensor decomposition enabling near-10^5-fold savings.
  • The proposed method outperforms existing compression techniques such as quantization, pruning, and bit encoding in terms of space-saving efficiency.

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.