Encoding word order in complex embeddings
arXiv:1912.12333
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).
15 pages, 3 figures, ICLR 2020 spotlight paper. A typo on Ablation Table was revised thanks to Jingquan Zeng from SCUT
References in corpus (9)
- Efficient Estimation of Word Representations in Vector Space
- An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling
- Convolutional Sequence to Sequence Learning
- Unsupervised Learning of Sentence Embeddings using Compositional n-Gram Features
- An efficient framework for learning sentence representations
- Hierarchical Multiscale Recurrent Neural Networks
- A Tensorized Transformer for Language Modeling
- Multiplicative LSTM for sequence modelling
- Semantic Hilbert Space for Text Representation Learning
Cited by in corpus (15)
- RoFormer: Enhanced Transformer with Rotary Position Embedding
- Rethinking Positional Encoding in Language Pre-training
- Quantum Language Model with Entanglement Embedding for Question Answering
- Pre-trained Language Models in Biomedical Domain: A Systematic Survey
- Investigating the Limitations of Transformers with Simple Arithmetic Tasks
- Learnable Fourier Features for Multi-Dimensional Spatial Positional Encoding
- Building Blocks for a Complex-Valued Transformer Architecture
- Neural Proof Nets
- CAPE: Encoding Relative Positions with Continuous Augmented Positional Embeddings
- Denmark's Participation in the Search Engine TREC COVID-19 Challenge: Lessons Learned about Searching for Precise Biomedical Scientific Information on COVID-19
- What Do Position Embeddings Learn? An Empirical Study of Pre-Trained Language Model Positional Encoding
- Self-Attention Networks Can Process Bounded Hierarchical Languages
- TE-ESN: Time Encoding Echo State Network for Prediction Based on Irregularly Sampled Time Series Data
- Semantic Representation and Inference for NLP
- Multi-Head Self-Attention with Role-Guided Masks