Source-linked AI summary

A Spectral Algorithm for Latent Dirichlet Allocation

Animashree Anandkumar, Dean P. Foster, Daniel Hsu, Sham M. Kakade, Yi-Kai Liu

arXiv:1204.6703v4cs.LGstat.ML

TL;DR

Topic modeling requires estimating topic distributions when documents mix multiple hidden topics and only words are observed. The paper introduces ECA, a two-SVD spectral method using low-order moments, and shows guaranteed recovery for broad mixture models including LDA. For LDA, it recovers topic distributions and the Dirichlet prior from third-order statistics, while operating on k × k matrices.

  • Problem

    Estimating topic probability vectors is challenging when documents contain multiple hidden topics and only words are observed.

  • Method

    ECA applies two singular value decompositions to low-order moments from exchangeable or multi-view observations.

  • Results

    ECA is guaranteed to recover parameters for a wide class of mixture models, including LDA, and LDA recovery uses third-order moments obtainable from documents containing just 3 words.

  • Takeaways & Limitations

    The algorithm is scalable because its SVD operations use k × k matrices rather than the typically larger d-dimensional observed space.

  • Takeaways & Limitations

    ECA does not recover a direction when its skewness is 0, although it succeeds for directions with non-zero skewness.

Abstract

from arXiv · show

The problem of topic modeling can be seen as a generalization of the clustering problem, in that it posits that observations are generated due to multiple latent factors (e.g., the words in each document are generated as a mixture of several active topics, as opposed to just one). This increased representational power comes at the cost of a more challenging unsupervised learning problem of estimating the topic probability vectors (the distributions over words for each topic), when only the words are observed and the corresponding topics are hidden. We provide a simple and efficient learning procedure that is guaranteed to recover the parameters for a wide class of mixture models, including the popular latent Dirichlet allocation (LDA) model. For LDA, the procedure correctly recovers both the topic probability vectors and the prior over the topics, using only trigram statistics (i.e., third order moments, which may be estimated with documents containing just three words). The method, termed Excess Correlation Analysis (ECA), is based on a spectral decomposition of low order moments (third and fourth order) via two singular value decompositions (SVDs). Moreover, the algorithm is scalable since the SVD operations are carried out on $k\times k$ matrices, where $k$ is the number of latent factors (e.g. the number of topics), rather than in the $d$-dimensional observed space (typically $d \gg k$).

1 Introduction

The paper addresses the harder estimation problem created when documents combine multiple hidden topics. It introduces ECA, a spectral method that recovers mixture-model parameters, including LDA parameters, from low-order moments.

  • Contributions: ECA provides a simple, efficient method-of-moments approach with guaranteed parameter recovery for a wide class of mixture models, including LDA.It matches observed moments to model moments and uses two singular value decompositions.
  • Method: ECA uses two SVDs: the first whitens data, while the second extracts directions with excess third- or fourth-order moments.Both decompositions operate on k × k matrices rather than the observed d-dimensional space.
  • Method: Both SVDs use k × k matrices, where k is the number of latent factors and typically d ≫ k, making the algorithm scalable.The computational operations avoid direct decomposition in the higher-dimensional observed space.
  • Contributions: For LDA, a modified third-order moment exactly recovers topic word distributions and the Dirichlet prior, with documents containing just 3 words sufficient for third-order moments.The result applies to documents whose words are generated from multiple active topics.
  • Novelty: The approach requires no separation condition for the LDA learning problem described by the authors.Its underlying strategy is diagonalization of observed moments.
  • Novelty: The method exploits exchangeable or multi-view observations drawn independently from a shared hidden state and simplifies related eigenvector-based approaches.The paper connects this structure to topic models, hidden Markov models, and other mixture settings.

2 The Exchangeable and Multi-view Models

The paper formulates exchangeable and multi-view observations as conditionally independent variables generated from latent factors. It then instantiates this framework for independent-factor, Dirichlet, and multiview models.

  • Exchangeable model: The framework uses at most the first four moments and makes no assumptions that the noise is additive or independent of h.The full-rank assumption on O supports identifiability of the topic matrix.
  • Exchangeable model: The exchangeable model uses observed vectors x_v that are conditionally independent given a latent vector h, with E[x_v|h] = Oh.The topic matrix O is assumed full rank so its columns are identifiable.
  • Independent latent factors: Independent latent-factor examples include multiple Gaussian mixtures and multiple Poisson mixtures, with O encoding component means or topic-related rates.The Poisson example models word counts in document sentences and satisfies E[x_v|h] = Oh.
  • Dirichlet model: As α0 → 0, the Dirichlet distribution approaches pure topics in which one coordinate of h equals 1 and the others equal 0.Here α0 is the sum of the Dirichlet pseudo-counts and measures distribution uniformity crudely.
  • Dirichlet model: In LDA, h follows a Dirichlet distribution, each column of O is a distribution over outcomes, and words are sampled independently according to h and the corresponding topic distributions.The observed variables use hot encoding, yielding E[x_v|h] = Oh.
  • Multi-view model: The multi-view extension allows observations with different dimensions and separate full-rank matrices O_v, while retaining related statistical structure.A factorial HMM can be embedded into this setting using three observations and a shared hidden state.

3 Identifiability

Identifiability depends on assumptions about the latent distribution: without them, the observation matrix may be recoverable only up to permutation or its range, while non-Gaussian structure is required for column recovery.

  • With observable distributions alone, the columns of O are recoverable at best up to permutation.
  • Without a priori knowledge of the latent distribution, only the range of O may be recoverable.If the latent factors are multivariate Gaussian, O and OM are observationally indistinguishable for any invertible k × k matrix M.
  • Identifying the columns of O requires non-Gaussian statistical properties in the latent distribution.The considered cases include skewed independent factors, excess kurtosis, and Dirichlet-distributed factors.

4 Excess Correlation Analysis (ECA)

ECA recovers latent-factor parameters by applying two SVDs to low-order moments: whitening pairwise correlations, then decomposing third- or fourth-order moments. Under stated nonzero-skewness or nonzero-kurtosis conditions, it provides exact recovery guarantees, including for LDA and multi-view extensions.

  • Overview: ECA uses two SVDs: the first whitens pairwise correlations, while the second decomposes third- or fourth-order moments.The approach targets exchangeable or multi-view mixture models and uses higher-order moments to identify latent directions.
  • 4.1 Independent and Skewed Latent Factors: For independent skewed factors, ECA returns only columns of O and exactly recovers all columns with probability 1 when every γ_i is nonzero.The exact-recovery guarantee uses a direction θ sampled uniformly from the sphere and returns O in canonical form.
  • 4.2 Independent and Kurtotic Latent Factors: For independent kurtotic factors, ECA has no false positives and exactly recovers all columns of O with probability 1 when every κ_i is nonzero.Algorithm 2 uses independently sampled directions and returns O in canonical form.
  • Combining moment conditions: If each latent direction has either nonzero skewness or nonzero excess kurtosis, running both ECA algorithms recovers O without incorrectly returning columns.The two guarantees complement one another when one of the moment conditions fails for some factors.
  • 4.3 Latent Dirichlet Allocation: For LDA, Algorithm 3 recovers all topic columns with probability 1 and also recovers the parameter vector α, up to topic-column permutation.The method requires knowledge of α_0 for parameter recovery; the topic columns represent word distributions for topics.
  • 4.4 The Multi-View Extension: The multi-view extension retains exact recovery under the analogous nonzero-skewness condition and returns columns of O_3 in canonical form.Algorithm 4 guarantees no false positives and exact recovery with probability 1 for a random direction when every γ_i is nonzero.

5 Sample Complexity

The empirical ECA algorithm estimates LDA topics from sampled document moments using averaging, whitening, SVD, and reconstruction. Its theorem provides probabilistic ℓ2 accuracy guarantees, while ℓ1 accuracy can require dimension-dependent samples in general.

  • Guarantees: Each run succeeds with probability greater than 3/4, allowing repeated runs, and the sample-complexity theorem gives probability greater than 1−δ for the stated accuracy guarantee.The theorem concerns estimates matched to the true topic columns up to permutation.
  • Algorithm: Empirical ECA computes first, second, and third moments from N independent document samples before forming the paired and triple statistics used by the algorithm.The procedure then whitens the paired moments, applies an SVD, and reconstructs and scales the topic estimates.
  • Guarantees: The theorem guarantees ℓ2 norm accuracy for each topic column, with its sample requirement depending on model quantities including pmin and the smallest non-zero singular value of O.The supplied theorem statement introduces δ, pmin, and the smallest non-zero singular value as parameters of the bound.
  • Accuracy and normalization: Explicit normalization may require clipping the smallest estimated entries first, because this supports obtaining low ℓ1 error when the vocabulary dimension d is large.The algorithm’s theoretical rescaling procedure avoids directly normalizing the estimates.
  • Accuracy and normalization: In general, dimension-independent sample complexity for fixed-target ℓ1 error is impossible, since even k = 1 may require Ω(d) samples when estimating a near-uniform distribution.When topic probability mass is concentrated in the most frequent effective words, the ℓ2 guarantee can instead be translated into an ℓ1 guarantee in terms of that effective dimension.

6 Discussion: Sparsity

The discussion finds no direct computational dependence on sparsity for the plug-in empirical algorithm, although sparsity affects skewness and therefore sample complexity. As LDA becomes less sparse, error increases as α0 grows.

  • Statistical effects: Sparsity implicitly affects sample complexity through skewness and whitening, with skewness tending to 0 as the model becomes less sparse.Thus sparsity can matter statistically even though it does not directly alter the plug-in algorithm’s computational cost.
  • Statistical effects: For LDA, error increases as α0 →∞, the regime associated here with decreasing skewness as the model becomes less sparse.The passage explicitly connects this trend to Theorem 5.1.
  • Computational requirements: Sparsity has no direct impact on the computational requirements of the plug-in empirical algorithm beyond the linear time needed to read data and construct empirical statistics.The analysis does not include sparsity explicitly in its computational requirements.

A Analysis with Independent Factors

The analysis derives hidden-state moment identities under independent latent factors and uses conditional independence of observed views to establish the moment relationships underlying the method.

  • Hidden-state moments: The hidden-state analysis centers on the centered variable z = h − E[h] and moment expressions involving vectors u and v.These identities provide the algebraic quantities used in the subsequent moment analysis.
  • Hidden-state moments: Independence and zero means of the centered hidden components allow the relevant fourth-order expressions to be evaluated by separating diagonal and non-diagonal entries.The proof explicitly computes these two classes of entries separately.
  • Proof structure: The resulting componentwise agreement completes the proof of the stated hidden-state moment identity.The proof checks that the entries of E[zz⊤⟨u, z⟩⟨v, z⟩] match the derived expressions.
  • Proof structure: The proofs of Lemmas 4.1 and 4.2 use conditional independence of x1, x2, and x3 given h.This conditional-independence step links observed multi-view moments to latent-factor moments.
  • Proof structure: The proof for Lemma 4.4 follows the same pattern as the preceding arguments.The text characterizes it as analogous rather than introducing a distinct proof strategy.

B Analysis with Dirichlet Factors

The Dirichlet-factor analysis establishes the required first-, second-, and third-moment forms using scalar, bivariate, and trivariate Dirichlet moments. These identities support the corresponding moment matrix and tensor results.

  • Moment derivation: The analysis first provides functional forms for the first, second, and third moments before proving Lemma 4.3.This organizes the Dirichlet-factor derivation around the moments needed by the spectral method.
  • Dirichlet moments: Univariate Dirichlet moments are obtained by shifting α by p·e_i for a fixed component and positive integer p.The notation defines α′ := α + p · e_i.
  • Dirichlet moments: Bivariate moments use distinct components i and j with the shifted parameter α′ := α + p·e_i + q·e_j.The shifts use positive integers p and q.
  • Dirichlet moments: Trivariate moments are defined for three distinct components by shifting α to α + e_i + e_j + e_κ.This supplies the three-component case used in the third-moment analysis.
  • Proof completion: The second-moment matrix and third-moment tensor results follow by matching their components to the derived scalar moment expressions.The proof concludes after this componentwise identification.

B.2 The proof of Lemma 4.3

The proof proceeds by defining analogous quantities, handling each term separately, and concluding the first claim.

  • The argument introduces an analogous quantity before completing the proof.
  • The resulting bound proves the first claim.
  • Each term is treated separately to establish the required bound.

C Sample Complexity Analysis

The sample-complexity analysis controls whitening, singular-vector estimation, and reconstruction through perturbation bounds under a spectral-error assumption.

  • The analysis assumes EP ≤ σk(Pairsα0)/2 to control the estimated whitening subspace.Sampling error can make range(W) differ from range(Pairsα0).
  • Whitening yields MM⊤ = I, enabling the projected moment matrices to be expressed in the latent k-dimensional space.The analysis uses M = W⊤˜O and the diagonal topic-related factors γi.
  • Weyl’s and Wedin’s theorems bound singular-value and singular-vector perturbations between population and estimated matrices.The proof translates subspace-angle control into projection error via canonical angles.
  • Lemma C.3 states a high-probability SVD accuracy guarantee for all singular components when the spectral-error condition holds.The guarantee holds with probability greater than 1 − δ′.
  • The projected third-order moment has the factorization M diag(M⊤θ) diag(γ1, γ2, . . . , γk) M⊤.
  • The reconstruction analysis compares estimated and population terms, with remaining terms characterized as lower order.

C.4 Completing the proof

The proof of Theorem 5.1 combines empirical moment concentration with perturbation lemmas and standard matrix singular-subspace results.

  • Theorem 5.1 uses concentration bounds for empirical first-, second-, and third-order moment estimates.
  • The sampling errors EP and ET are chosen using a common bound so the combined failure probability is δ.
  • A spherical concentration lemma controls random-vector projections with high probability.
  • Weyl’s theorem supplies singular-value perturbation control for matrices differing by an error term.
  • Wedin’s theorems control canonical angles between singular subspaces under a singular-value separation condition.The projection difference is related to the sine of the canonical-angle matrix.
  • The projection identity in Lemma E.4 converts canonical-angle control into a bound on orthogonal projection differences.

F Illustrative empirical results

The empirical illustration applies Algorithm 5 to a large New York Times bag-of-words dataset and displays the highest-probability words estimated for each topic.

  • The experiment uses 300000 New York Times articles with vocabulary size d = 102660, setting k = 50 and α0 = 0.
  • Instead of one random θ, the implementation uses power iteration to obtain the k estimated singular vectors.
  • The display lists the top 25 words for each topic, ordered by estimated conditional probability.
Loading 1204.6703v4…