NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Tensorized Embedding Layers for Efficient Model Compression

Valentin Khrulkov, Oleksii Hrinchuk, Leyla Mirvakhabova, Ivan V. OseledetsarXiv 2019

Introduction

Modern Natural Language Processing (NLP) models have achieved remarkable performance, but often at the cost of massive parameter counts. A significant portion of these parameters resides in the embedding layers—large lookup tables mapping vocabulary to dense vectors. As vocabularies scale, these layers become a bottleneck for deployment on edge devices and training on hardware with limited memory. This paper introduces TT-embeddings, a method using Tensor Train (TT) decomposition to compress embedding layers by orders of magnitude while maintaining or even improving model performance.

The Bottleneck of Large Embeddings

In typical architectures, the embedding matrix $E \in \mathbb{R}^{V \times D}$ grows linearly with the vocabulary size $V$. For large-scale applications, this matrix can consume the majority of a model's memory. Previous attempts at compression, such as low-rank matrix factorization ($E = UV^T$), often suffer from the softmax bottleneck. By restricting the rank of the embedding matrix, these methods limit the model's ability to represent the complex nuances of natural language. Furthermore, many techniques are applied post-training, failing to alleviate memory constraints during the training phase itself.

Methodology: Tensor Train Decomposition

The proposed approach replaces the standard embedding matrix with a series of small, interconnected "TT-cores." This transformation involves three primary steps:

  1. Reshaping: The 2D embedding matrix is treated as a high-dimensional tensor. For instance, a vocabulary of 25,000 can be reshaped into a $25 \times 25 \times 40$ structure.
  2. Factorization: This high-dimensional tensor is decomposed into TT-cores—small 3D tensors. Instead of storing millions of parameters, the model only stores these compact cores.
  3. End-to-End Training: The mapping from cores to embedding vectors is fully differentiable, allowing for training from scratch via standard backpropagation.
Overview of the TT-embedding layer construction through reshaping and TT decomposition.

To ensure convergence, the authors developed a specialized initialization scheme for TT-cores, maintaining stable variance in the reconstructed embeddings.

Experimental Results

The researchers evaluated TT-embeddings across sentiment analysis, machine translation, language modeling, and click-through rate (CTR) prediction.

Sentiment Analysis and Compression

On the IMDB and SST datasets, TT-embeddings achieved staggering compression ratios. For IMDB, the embedding layer was compressed by 441x while actually increasing test accuracy by 1%. This suggests that the tensor structure may provide a form of implicit regularization, preventing the model from over-fitting to noise in individual word embeddings.

Performance and compression ratios for IMDB and SST datasets.

Large-Scale Tasks

  • Neural Machine Translation: On WMT'14 (English-German), the method achieved 15x compression with a negligible 0.3 drop in BLEU score.
  • Language Modeling: Using Transformer-XL on WikiText-103, the authors saved 100 million parameters (3.8x compression) with a modest perplexity increase of 1.3.
  • CTR Prediction: On the Criteo dataset, which features extremely high cardinality, they achieved a 2011x compression with a slight improvement in test loss.

Discussion and Future Work

A key theoretical insight of this work is that TT-embeddings can produce a full-rank reconstructed matrix despite having very few parameters. This allows the model to bypass the softmax bottleneck that plagues standard low-rank methods.

While TT-embeddings significantly reduce memory usage, they currently introduce a small computational overhead (approximately 8% slower training iterations) due to unoptimized tensor operations in standard frameworks. Future work includes developing custom CUDA kernels to eliminate this "tax," exploring Tensor Ring (TR) decompositions for better robustness to dimension ordering, and incorporating non-linearities directly into the tensor cores.

Summary updated

BibTeX
@misc{khrulkov2019tensorized,
  author = {Valentin Khrulkov and Oleksii Hrinchuk and Leyla Mirvakhabova and Ivan V. Oseledets},
  title = {{Tensorized Embedding Layers for Efficient Model Compression}},
  year = {2019},
  eprint = {1901.10787},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1901.10787},
}
Figure