Skip to main content
QUICK REVIEW

[Paper Review] Encoding word order in complex embeddings

Benyou Wang, Donghao Zhao|arXiv (Cornell University)|Dec 27, 2019
Topic ModelingComputer Science39 references56 citations
TL;DR

The paper introduces continuous complex-valued word embeddings that model both global word positions and their order relations, extends CNN/RNN/Transformer to complex-valued forms, and demonstrates improvements in text classification, machine translation, and language modeling.

ABSTRACT

Sequential word order is important when processing text. Currently, neural networks (NNs) address this by modeling word position using position embeddings. The problem is that position embeddings capture the position of individual words, but not the ordered relationship (e.g., adjacency or precedence) between individual word positions. We present a novel and principled solution for modeling both the global absolute positions of words and their order relationships. Our solution generalizes word embeddings, previously defined as independent vectors, to continuous word functions over a variable (position). The benefit of continuous functions over variable positions is that word representations shift smoothly with increasing positions. Hence, word representations in different positions can correlate with each other in a continuous function. The general solution of these functions is extended to complex-valued domain due to richer representations. We extend CNN, RNN and Transformer NNs to complex-valued versions to incorporate our complex embedding (we make all code available). Experiments on text classification, machine translation and language modeling show gains over both classical word embeddings and position-enriched word embeddings. To our knowledge, this is the first work in NLP to link imaginary numbers in complex-valued representations to concrete meanings (i.e., word order).

Motivation & Objective

  • Motivate the need to model both global absolute positions and inner sequential relationships in text.
  • Propose a novel embedding that treats word representations as continuous functions over position.
  • Extend embeddings to the complex domain to capture richer position-dependent structure.
  • Integrate complex-order embeddings into CNNs, RNNs, and Transformers and evaluate across tasks.

Proposed method

  • Extend each word embedding from a vector to a function over the position index, enabling position-dependent representations.
  • Define complex-valued embeddings f(j,pos) = g_we(j) ⊙ g_pe(j,pos), where g_pe uses complex exponentials to encode position.
  • Impose properties like position-free offset transformation and boundedness; prove a unique bounded, linearly witnessed solution g(pos) = z2 z1^pos with |z1| ≤ 1.
  • Parameterize the complex embedding per word as f(j,pos) = r_j,d e^{i(ω_j,d pos + θ_j,d)} across D dimensions (amplitudes, frequencies, phases).
  • Show that Vaswani et al.’s positional encoding is a degraded special case of this approach.

Experimental results

Research questions

  • RQ1Can a continuous, complex-valued embedding over position capture both absolute word positions and relative ordering?
  • RQ2Do complex-order embeddings improve performance across diverse NN architectures (CNN, RNN, Transformer) compared to vanilla and traditional position-augmented embeddings?
  • RQ3Are the proposed embeddings effective for text classification, machine translation, and language modeling?

Key findings

  • Complex-order embeddings outperform vanilla and other position-enriched embeddings across text classification, MT, and language modeling.
  • Transformer variants benefit significantly from order-aware complex embeddings, with competitive or superior performance while maintaining similar efficiency.
  • The approach provides a concrete interpretation of imaginary components as word-order information, linking complex-valued representations to linguistic structure.
  • Ablation studies show that certain design choices (e.g., initial phases, sharing schemes) influence performance and parameter efficiency.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.