Skip to main content
QUICK REVIEW

[Paper Review] Bayesian Paragraph Vectors

Geng Ji, Robert Bamler|arXiv (Cornell University)|Nov 10, 2017
Topic ModelingComputer Science17 references4 citations
TL;DR

This paper proposes Bayesian Paragraph Vectors (BPV), a probabilistic generative model that extends paragraph vectors by incorporating Bayesian inference to quantify uncertainty in paragraph embeddings. By modeling paragraph vectors as random variables with posterior distributions, the method shows that entropy decreases with document length and that using variational inference to capture uncertainty improves performance in sentiment analysis and paraphrase detection over traditional MAP estimation.

ABSTRACT

Word2vec (Mikolov et al., 2013) has proven to be successful in natural language processing by capturing the semantic relationships between different words. Built on top of single-word embeddings, paragraph vectors (Le and Mikolov, 2014) find fixed-length representations for pieces of text with arbitrary lengths, such as documents, paragraphs, and sentences. In this work, we propose a novel interpretation for neural-network-based paragraph vectors by developing an unsupervised generative model whose maximum likelihood solution corresponds to traditional paragraph vectors. This probabilistic formulation allows us to go beyond point estimates of parameters and to perform Bayesian posterior inference. We find that the entropy of paragraph vectors decreases with the length of documents, and that information about posterior uncertainty improves performance in supervised learning tasks such as sentiment analysis and paraphrase detection.

Motivation & Objective

  • To develop a Bayesian interpretation of paragraph vectors that enables principled uncertainty quantification in text embeddings.
  • To address the limitation of point estimates in paragraph vectors, especially for short documents with high uncertainty.
  • To improve downstream supervised learning performance by incorporating posterior uncertainty into feature representations.
  • To validate that uncertainty in paragraph vectors decreases with increasing document length.
  • To compare variational inference and MAP estimation in the context of paragraph vector embeddings.

Proposed method

  • Extends the Bayesian skip-gram model (Barkan, 2017) to include document-specific paragraph vectors as latent variables with Gaussian priors.
  • Models the likelihood of word pairs in a document as a sigmoid function of the dot product between word embeddings and context vectors augmented by the paragraph vector.
  • Uses variational inference (VI) to approximate the posterior distribution over paragraph vectors, capturing both mean and variance.
  • Employs stochastic optimization with a decreasing learning rate and negative sampling to scale to large corpora.
  • Constructs positive pairs from local word co-occurrences within a context window and negative pairs via a noise distribution based on word frequency.
  • Uses the concatenation of variational mean and standard deviation of paragraph vectors as input features for downstream classification.

Experimental results

Research questions

  • RQ1Does modeling paragraph vectors as random variables with posterior distributions lead to more robust representations than point estimates?
  • RQ2How does the uncertainty (entropy) of paragraph vectors vary with document length?
  • RQ3Can incorporating posterior uncertainty improve performance in supervised NLP tasks such as sentiment analysis and paraphrase detection?
  • RQ4How do different inference methods—MAP, VI, and HMC—compare in terms of downstream task accuracy?
  • RQ5Does the generative probabilistic formulation of paragraph vectors align with empirical intuition about uncertainty in short texts?

Key findings

  • The entropy of paragraph vectors decreases with increasing document length, confirming that longer texts yield more confident embeddings.
  • Variational inference (VI) outperforms maximum a posteriori (MAP) estimation in both sentiment analysis and paraphrase detection tasks.
  • On the IMDB dataset, VI achieved 87.0% test accuracy compared to 86.9% for MAP in sentiment analysis.
  • On the MSR Paraphrase Corpus, VI achieved 71.0% accuracy versus 70.0% for MAP in paraphrase detection.
  • The posterior variance of paragraph vectors is higher for shorter documents, validating the model's ability to capture uncertainty.
  • Hamiltonian Monte Carlo (HMC) inference performed worse than VI, likely due to overfitting from fixed negative examples during sampling.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.