MorphTE: Injecting Morphology in Tensorized Embeddings

Guobing Gan, Peng Zhang, Sunzhu Li, Xiuqing Lu, Benyou Wang

In the world of Natural Language Processing (NLP), bigger is often better—until you try to deploy a model on a smartphone or edge device. Large-scale models rely on massive word embedding matrices that map hundreds of thousands of words into high-dimensional vectors. For a vocabulary of 800,000 words, a standard embedding layer can easily consume gigabytes of memory, creating a severe bottleneck for resource-constrained environments.

MorphTE (Morphologically-enhanced Tensorized Embeddings) offers a clever solution to this problem: stop treating words as atomic units and start looking at their internal structure. By combining linguistic morphology with the mathematical power of tensor products, MorphTE achieves massive compression without sacrificing accuracy.

The Embedding Bottleneck

Standard embedding layers are essentially giant lookup tables. To reduce their size, researchers typically turn to mathematical tricks like matrix factorization (used in ALBERT) or tensor decomposition (used in Word2ket).

However, these methods often treat the underlying data as a black box. They decompose a word vector into smaller, arbitrary vectors that have no inherent meaning. This lack of interpretability often leads to a performance drop in complex tasks like machine translation. The authors of MorphTE argue that we should instead leverage the fact that language is naturally compositional.

The MorphTE Solution

MorphTE introduces a two-step process to generate embeddings that injects prior linguistic knowledge directly into the model's architecture:

  1. Morpheme Segmentation: Instead of storing a massive, unique vector for a word like "unkindly," the model breaks it down into its smallest meaningful units (morphemes): un (prefix), kind (root), and ly (suffix).
  2. Tensor Product Composition: To reconstruct the word vector, MorphTE uses the tensor product (Kronecker product) to "entangle" these smaller morpheme vectors. Unlike simple addition, the tensor product is non-commutative ($A \otimes B \neq B \otimes A$). This mathematical property is crucial for language, as it allows the model to distinguish between words with identical components but different structures (e.g., "houseboat" vs. "boathouse").

The final word embedding is a sum of these entangled tensors across different "ranks" (subspaces), similar to the multi-head mechanism in Transformers.

The workflow of MorphTE

Key Insights and Advantages

  • Morphology as Compression: There are far fewer morphemes in a language than there are whole words. By storing a small vocabulary of morpheme vectors instead of a massive word vocabulary, the parameter count plummets.
  • Linguistic Inductive Bias: By forcing the model to share parameters across words with the same morphemes (e.g., "unkindly" and "unkindness" both share the "un" and "kind" vectors), the model learns semantic relationships more efficiently.
  • Superiority over Random Sharing: Previous state-of-the-art compression techniques like Word2ket shared "small vectors" randomly. MorphTE proves that sharing vectors based on actual linguistic structure is significantly more effective.
Comparison between Word2ket and MorphTE

Experimental Results

The authors evaluated MorphTE across several demanding benchmarks, including Machine Translation (IWSLT’14, OPUS-100), Question Answering (WikiQA), and Natural Language Inference (SNLI).

  • 20x Compression, Zero Loss: On four different translation datasets, MorphTE compressed the embedding layer by approximately 20x without any loss in BLEU score. In some cases, like German-to-English translation, it actually improved performance by 0.4 BLEU.
  • Robustness at High Compression: MorphTE consistently beat other compression methods. At extreme compression ratios (40x), while other methods' performance tanked, MorphTE remained robust.
  • Parameter Efficiency: On the German-to-English task, MorphTE reduced the embedding's share of total model parameters from 20.1% down to just 1.2%.

Limitations and Future Work

While highly effective, MorphTE does have a few limitations. Calculating tensor products on the fly is more computationally expensive than a simple table lookup, which could impact inference latency in extremely high-throughput environments. Additionally, the model's success relies heavily on the quality of the initial morpheme segmentation provided by external tools; errors in segmentation can propagate through the embedding layer. Finally, the current implementation uses a fixed number of morphemes per word, relying on padding or concatenation. Future work could explore dynamic lengths to better handle highly polysynthetic languages.

Summary updated

BibTeX
@inproceedings{gan2022morphte,
  author = {Guobing Gan and Peng Zhang and Sunzhu Li and Xiuqing Lu and Benyou Wang},
  title = {{MorphTE: Injecting Morphology in Tensorized Embeddings}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=7ilJhkpm1H},
}
Figure