Computing Word Classes Using Spectral Clustering

Effi Levi, Saggy Herman, Ari RappoportarXiv 2018

TL;DR

This paper explores the application of spectral clustering—a technique common in computer vision but rare in NLP—to the problem of word clustering. The authors demonstrate that spectral clustering performs nearly as well as the industry-standard Brown clustering on downstream tasks like Semantic Role Labeling (SRL) and dependency parsing, while capturing complementary information that could significantly boost performance if combined.

What Problem Does This Paper Address?

In Natural Language Processing (NLP), word clustering is a vital tool for combatting data sparsity. By grouping words into "classes" based on their distribution, models can generalize better to rare or unseen words.

For decades, Brown clustering has been the dominant method. It is a linguistically motivated, hierarchical approach based on maximizing the quality of a class-based language model. However, the authors note that spectral clustering—which treats data as a graph and finds optimal "cuts" to partition it—has been largely ignored for general word lexicons. They set out to determine if this purely mathematical, graph-theoretic approach can compete with the language-specific logic of Brown clustering.

Methods

The authors represent words using a window-based count model. Each word is a vector based on how often it appears near the 5,000 most frequent "descriptor" words in a large corpus. They also experiment with word2vec embeddings as an alternative representation.

The core of their approach is the Modified Ncut algorithm. Unlike standard spectral clustering that uses a Gaussian kernel, they utilize symmetrized skew-divergence to build their affinity matrix, as it better captures the distributional similarity between words.

The clustering process follows these steps:

  1. Construct an affinity matrix using skew-divergence.
  2. Compute the eigenvectors of the normalized similarity matrix.
  3. Project the words into a low-dimensional space defined by these eigenvectors.
  4. Run K-means in this new space to produce the final clusters.

Datasets

  • ukWaC corpus: A 2-billion-word crawl of the .uk domain used to generate the initial word representations and clusters.
  • PropBank annotated WSJ corpus (CoNLL-2005): Used for evaluating the clusters on the Semantic Role Labeling (SRL) task.
  • WSJ corpus (CoNLL-2007): Used for evaluating the clusters on the Dependency Parsing task.

Key Insights and Ideas

  • Mathematical vs. Linguistic Grounding: The most surprising finding is that spectral clustering, which has no inherent "knowledge" of language modeling, achieves results virtually identical to Brown clustering. This suggests that the underlying graph structure of word distributions is just as informative as explicit language models.
  • Complementary Information: The authors performed an "Oracle" analysis, where a hypothetical model chooses the better prediction between the spectral and Brown models for every sample. This Oracle significantly outperformed both individual models.
  • The "Aha" Moment: The models only agreed on about 61% of the test sentences in the SRL task. The spectral model won on 18.8% of cases, and the Brown model won on 19.8%. This proves the two methods are capturing different types of semantic or syntactic relationships, making them excellent candidates for ensemble methods.
  • Representation Surprises: Interestingly, simple count-based window models outperformed dense word2vec embeddings for this specific clustering task. The authors suspect the high density of word2vec might obscure some clustering-relevant information.

Key Results

The authors evaluated their clusters as features in structured-prediction tasks. As shown in the results for SRL (Figure 2), spectral clustering (F1: 0.596) is highly competitive with Brown clustering (F1: 0.599) and significantly beats the K-means baseline.

Table 1: Results for the SRL experiments.

In dependency parsing (Figure 1), the gap was slightly wider but still narrow, with Brown clustering leading by only 0.014 in Unlabeled Attachment Score (UAS).

Table 2: Results for the dependency parsing experiments.

The most dramatic result came from the Oracle model for SRL, which achieved an F1 of 0.664—a 12.5% improvement over using either clustering method alone.

Limitations and Future Work

  • Lack of Hierarchy: Unlike Brown clustering, the spectral method used here does not produce a hierarchy (e.g., bit-prefixes), which is often useful for varying the granularity of features in NLP models.
  • Lexicon Size: Due to the computational intensity of eigenvector decomposition on large matrices, the lexicon was limited to roughly 12,000 words.
  • Future Directions: The authors suggest that the low-dimensional vector representations produced as a by-product of spectral clustering could be used for "soft clustering" (assigning words to multiple groups) or as a unique form of word embedding for other NLP tasks.

Summary updated

BibTeX
@misc{levi2018computing,
  author = {Effi Levi and Saggy Herman and Ari Rappoport},
  title = {{Computing Word Classes Using Spectral Clustering}},
  year = {2018},
  eprint = {1808.05374},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1808.05374},
}
Figure