Exploring phrase-compositionality in skip-gram models

Xiaochang Peng, Daniel GildeaarXiv 2016

This paper from researchers at the University of Rochester explores a fundamental challenge in Natural Language Processing (NLP): how do we represent the meaning of phrases when most of our models are built to understand individual words?

TL;DR

The authors propose a variation of the skip-gram (word2vec) model that jointly learns word embeddings and the rules for combining them into phrases. By incorporating a compositionality function directly into the training objective, the model produces vectors that perform significantly better on semantic similarity and syntactic tasks like dependency parsing.

What Problem Does This Paper Address?

Distributed word representations (like skip-gram) are the bedrock of modern NLP, but they struggle to scale to larger units like phrases. The primary issue is data sparsity: while the word "apple" appears millions of times in a corpus, the specific phrase "crisp Fuji apple" appears much less frequently, making it hard to learn a robust, independent vector for it.

Previous approaches tried to solve this by either:

  1. Treating phrases as single "tokens" (which worsens sparsity).
  2. Learning composition functions (like recursive neural networks) on small, labeled datasets like the Penn Treebank.
  3. Composing word vectors after they are already trained.

The authors argue that these methods miss out on the rich contextual information available in massive, unlabeled datasets. They aim to learn word meanings and phrase-building rules simultaneously.

Methods

The core innovation is a joint skip-gram model. Instead of just predicting context words given a center word, the model also predicts context phrases given a center phrase.

The Joint Objective

The model optimizes a combined objective function: $$E = E_{word} + \beta E_{phrase}$$ where $E_{word}$ is the standard skip-gram loss and $E_{phrase}$ is the phrase-level loss. The parameter $\beta$ controls the relative importance of phrase information.

Compositionality-Aware Architecture

To represent a phrase, the model doesn't just look up a vector. It computes a phrase vector $v_p$ from its component word vectors using a composition function. The authors experiment with a linear combination of word vectors passed through a component-wise power function to adjust dimensional values.

Figure 1: Architecture of the skip-gram model.

As shown in Figure 1, the phrase-level model (b) projects component words into a composition layer to predict surrounding phrases. They also incorporate positional information, using different weight matrices for context words depending on their relative distance from the center, capturing word order more effectively.

Datasets

  • Training: An April 2010 snapshot of Wikipedia (~990 million tokens).
  • Evaluation:
    • Intransitive Verb Disambiguation: A dataset by Mitchell and Lapata (2008) for testing phrase composition.
  • Word Similarity: WordSim-353 and MEN datasets.
  • Word Analogy: The SYN (syntactic) and MIXED (semantic + syntactic) datasets.
  • Dependency Parsing: The English Penn Treebank (PTB) using Stanford Dependencies.

Key Insights and Ideas

  • Joint Learning as Regularization: By forcing word vectors to be able to compose into meaningful phrases during training, the model learns higher-quality word vectors. The compositionality constraint acts as a form of structural regularization.
  • Separation of Spaces: The authors found it beneficial to use a separate "output" space for phrase composition. This prevents word-level updates from distorting the compositionality information needed for phrases.
  • Syntax via Phrases: Modeling phrases explicitly allows the skip-gram model to capture syntactic structures that are often lost in bag-of-words approaches. This is why the model shows marked improvements in dependency parsing.

Key Results

The joint model consistently outperformed the standard word2vec baseline across multiple benchmarks:

  • Phrase Composition: On the Mitchell and Lapata task, the joint "compositional + positional" model achieved a Spearman’s correlation of 0.26, compared to 0.23 for standard word2vec (see Figure 4).
  • Word Analogy: The model showed significant gains in syntactic analogies (SYN), rising from 69.9% (baseline) to 72.0% (joint model).
  • Dependency Parsing: Using the learned embeddings in a neural parser improved both Labeled Attachment Score (LAS) and Unlabeled Attachment Score (UAS). The joint model reached a Test UAS of 92.19, outperforming the word2vec baseline of 91.91 (see Figure 5).
Table 1: Spearman’s correlation results.

Limitations and Future Work

  • Simple Composition: The authors primarily tested a linear composition function. While effective, more complex non-linear functions or recursive structures might yield even better results.
  • Chunking Dependency: The model relies on the senna toolkit to identify phrase chunks (NP, VP, etc.) before training. The quality of the embeddings is therefore somewhat tied to the quality of the initial chunker.
  • Future Directions: The authors suggest exploring different variations of the composition function for specific downstream applications.

Summary updated

BibTeX
@misc{peng2016exploring,
  author = {Xiaochang Peng and Daniel Gildea},
  title = {{Exploring phrase-compositionality in skip-gram models}},
  year = {2016},
  eprint = {1607.06208},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1607.06208},
}
Figure