Dissecting Contextual Word Embeddings: Architecture and Representation

Matthew E. Peters, Mark E Neumann, Luke Zettlemoyer, Wen-tau Yih

2018 · 436 citations · 45 references

DOIFull text

Open access

Concepts

TL;DR

Contextual word representations from pre‑trained bidirectional language models have improved NLP performance, yet their underlying effectiveness remains poorly understood. The study aims to empirically examine how different neural architectures—LSTM, CNN, or self‑attention—affect task accuracy and the qualitative characteristics of learned representations. The authors conduct experiments comparing LSTM, CNN, and self‑attention architectures on multiple NLP tasks, analyzing both performance metrics and representation properties across network depths. They find a speed–accuracy tradeoff, but all architectures produce high‑quality contextual embeddings that outperform static word vectors on four challenging NLP tasks, with representations evolving from morphology at the embedding layer to syntax in lower layers and coreference‑level semantics in upper layers, indicating that biLMs capture rich linguistic structure regardless of architecture.

Abstract

Contextual word representations derived from pre-trained bidirectional language models (biLMs) have recently been shown to provide significant improvements to the state of the art for a wide range of NLP tasks. However, many questions remain as to how and why these models are so effective. In this paper, we present a detailed empirical study of how the choice of neural architecture (e.g. LSTM, CNN, or self attention) influences both end task accuracy and qualitative properties of the representations that are learned. We show there is a tradeoff between speed and accuracy, but all architectures learn high quality contextual representations that outperform word embeddings for four challenging NLP tasks. Additionally, all architectures learn representations that vary with network depth, from exclusively morphological based at the word embedding layer through local syntax based in the lower contextual layers to longer range semantics such coreference at the upper layers. Together, these results suggest that unsupervised biLMs, independent of architecture, are learning much more about the structure of language than previously appreciated.

References

45