Spherical Paragraph Model

Ruqing Zhang, Jiafeng Guo, Yanyan Lan, Jun Xu, Xueqi Cheng

TL;DR

The Spherical Paragraph Model (SPM) is a novel generative framework that represents text by modeling word embeddings on a unit hypersphere. By using the von Mises-Fisher (vMF) distribution, SPM provides a sound probabilistic foundation for text representation that outperforms traditional topic models and heuristic embedding-averaging techniques.

What Problem Does This Paper Address?

In natural language processing, representing a document as a fixed-length vector is a fundamental challenge. Historically, we relied on Bag-of-Words (BoW), which treats words as discrete tokens and ignores their semantic relationships (e.g., "king" and "queen" are just different indices).

Recent "word embeddings" (like Word2Vec) have solved the word-level problem by mapping words to dense vectors where distance represents meaning. However, moving from word embeddings to text representations remains tricky. Existing methods often fall into two camps:

  1. Heuristic/Simple: Averaging word vectors (cBow) or using Fisher Kernels. These lack a formal probabilistic "story" for how the text was generated.
  2. Optimization-based: Paragraph Vector (PV) learns representations through direct optimization but lacks a Bayesian framework, making it hard to leverage corpus-wide information or handle unseen text elegantly.

The authors identify a "missing link": a model that combines the interpretability of probabilistic topic models (like LDA) with the rich semantic power of word embeddings.

Methods

The authors introduce the Spherical Paragraph Model (SPM). The "Spherical" part comes from the fact that word embeddings are typically compared using cosine similarity, which effectively treats them as points on a unit hypersphere.

The Generative Process

SPM assumes a hierarchical generation process for a corpus:

  1. Corpus Level: A global "mean direction" ($\mu_0$) and concentration ($\kappa_0$) define the general theme of the entire corpus.
  2. Paragraph Level: For each document, a paragraph vector ($d_n$) is sampled from a von Mises-Fisher (vMF) distribution centered around the corpus mean. This $d_n$ represents the "topic" or "essence" of that specific text.
  3. Word Level: For every word in that document, a word vector ($w_i^n$) is sampled from another vMF distribution, this time centered around the paragraph vector ($d_n$).

Why vMF?

While most generative models use Gaussian (Normal) distributions, Gaussians rely on Euclidean distance. In high-dimensional embedding spaces, directional similarity (cosine similarity) is a much more robust measure of meaning. The vMF distribution is essentially the "Gaussian of the sphere," making it the perfect mathematical tool for this task.

To learn the parameters, the authors developed an efficient Variational EM algorithm, allowing the model to infer paragraph vectors by maximizing the likelihood of the observed word vectors.

Datasets

The model was evaluated on several standard NLP benchmarks:

  • Topical Classification: 20Newsgroups (split into "different," "similar," and "same" subsets to test granularity) and the Reuters-21578 dataset.
  • Sentiment Analysis: The Subjectivity (Subj) dataset and the Movie Reviews (MR) dataset.

Key Insights and Ideas

  • The Power of Priors: Unlike Paragraph Vector (PV), which treats each document independently, SPM uses a corpus-wide prior. This allows the model to "smooth" representations based on the global context, which is particularly helpful for shorter or noisier texts.
  • Unlimited "Topics": Traditional models like LDA require you to pre-define a fixed number of topics (e.g., $k=50$). SPM bypasses this by operating in the continuous embedding space. It treats the paragraph vector itself as a latent topic, allowing for infinite "hidden topics" based on the underlying word clusters.
  • Efficiency vs. Complexity: SPM achieves state-of-the-art results using only 50-dimensional vectors, outperforming much "heavier" models like skip-thought, which uses 2400-dimensional vectors. This suggests that a better probabilistic structure is more important than sheer vector size.

Key Results

  • Topical Classification: SPM achieved the highest accuracy on the 20Newsgroups "different" (91.8%) and "similar" (82.0%) subsets, outperforming BoW, LDA, and PV-DM.
  • Sentiment Analysis: On the Subjectivity dataset, SPM reached 92.5% accuracy, setting a new state-of-the-art at the time of publication and significantly beating standard averaging (cBow) and Paragraph Vector.
  • Robustness: As dimensionality increased (from 50 to 300), SPM consistently improved and maintained a lead over other models, proving it scales well.

Limitations and Future Work

  • Static Embeddings: Currently, SPM uses pre-trained word embeddings (like Word2Vec) as a fixed input. The authors suggest that jointly learning the word and paragraph vectors within the SPM framework could yield even better results.
  • Word Order: Like most "bag-of-embedding" models, SPM ignores the sequence of words. Incorporating n-grams or sequential dependencies into the generative process is a noted area for future research.
  • Task Generalization: While successful in classification and sentiment analysis, the authors aim to test SPM on other tasks like document clustering or information retrieval.

Summary updated

BibTeX
@inproceedings{zhang2018spherical,
  author = {Ruqing Zhang and Jiafeng Guo and Yanyan Lan and Jun Xu and Xueqi Cheng},
  title = {{Spherical Paragraph Model}},
  booktitle = {ECIR},
  year = {2018},
  doi = {10.1007/978-3-319-76941-7\_22},
}
Figure