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

Tensorized Embedding Layers

Oleksii Hrinchuk, Valentin Khrulkov, Leyla Mirvakhabova, Elena Orlova, Ivan V. Oseledets

Abstract

In modern Natural Language Processing (NLP), embedding layers often constitute the majority of a model's parameters, hindering deployment on resource-constrained devices. This paper proposes TT-embedding, a novel approach using Tensor Train (TT) decomposition to compress these layers by up to 2000x. Unlike traditional low-rank matrix factorization, TT-embeddings maintain a full-rank matrix, effectively bypassing the "softmax bottleneck" and preserving model expressivity. Experimental results across sentiment analysis, machine translation, and language modeling demonstrate that TT-embeddings can match or even exceed the performance of full-sized models while significantly reducing memory footprint.

Introduction

The rapid advancement of NLP has led to increasingly large models. A significant portion of these models' memory footprint is occupied by embedding layers—large lookup tables that map vocabulary tokens to continuous vectors. For massive vocabularies, these tables can contain millions of parameters.

While low-rank matrix factorization is a common compression technique, it suffers from a fundamental theoretical limitation: it drastically reduces the mathematical rank of the embedding matrix. This leads to the "softmax bottleneck," where the model's ability to represent complex probability distributions is capped. This paper introduces a tensorized approach that decouples parameter count from matrix rank, offering a "free lunch" of high compression and high expressivity.

Methodology

The core of the proposed method is the replacement of the standard dense $I \times J$ embedding matrix with a Tensor Train (TT) decomposition.

The Decomposition Process

The process begins by reshaping the vocabulary size $I$ and embedding dimension $J$ into multi-dimensional tensors. These tensors are then decomposed into a sequence of smaller 2D and 3D "TT-cores." This transformation allows for massive parameter reduction while retaining the structural information of the original matrix.

Visualization of the reshaping and Tensor Train (TT) decomposition process.

Full-Rank Expressivity and Initialization

A key theoretical contribution of this work is proving that the matrix reconstructed from TT-cores remains almost always full-rank, even under extreme compression. This property is vital for maintaining the expressivity required for complex language tasks. Additionally, the authors developed a specialized initialization scheme to stabilize the variance of matrix elements, which otherwise grows exponentially with the number of cores, ensuring training stability.

Experimental Evaluation

The authors evaluated TT-embeddings across several diverse tasks, including sentiment analysis (IMDB, SST), Neural Machine Translation (WMT’14), and Language Modeling (WikiText-103).

Key Results and Insights

The experimental results highlight the efficiency and effectiveness of the TT-embedding layer. In sentiment analysis on the IMDB dataset, a 441x compression led to an accuracy increase from 0.886 to 0.897, suggesting that the tensorial structure may act as a beneficial regularizer.

In Machine Translation, the TT-approach significantly outperformed standard low-rank (LR) methods. As shown in the table below, TT-embeddings maintained higher BLEU scores at comparable compression levels, demonstrating that the preservation of rank is critical for high-performance translation.

Comparison of TT-embeddings against standard low-rank (LR) factorization on Neural Machine Translation.

Conclusion and Future Work

TT-embeddings provide a powerful tool for compressing large-scale NLP models without sacrificing performance. By maintaining full-rank expressivity, they overcome the limitations of traditional low-rank methods. Future work includes optimizing the token ordering within the decomposition and developing dedicated CUDA kernels to eliminate the current 8% training time overhead associated with multiple small matrix multiplications.

Summary updated

BibTeX
@inproceedings{hrinchuk2020tensorized,
  author = {Oleksii Hrinchuk and Valentin Khrulkov and Leyla Mirvakhabova and Elena Orlova and Ivan V. Oseledets},
  title = {{Tensorized Embedding Layers}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.findings-emnlp.436},
}
Figure