An Instability in Variational Inference for Topic Models

Behrooz Ghorbani, Hamid Javadi, Andrea Montanari

Introduction

In fully Bayesian topic models, the parameters of the Dirichlet distribution, as well as the topic distributions are themselves unknown and to be learned from data. Here we will work in an idealized setting in which they are known. We will also assume that data are in fact distributed according to the postulated generative model. Since we are interested in studying some limitations of current approaches, our main point is only reinforced by assuming this idealized scenario.

As is common with Bayesian approaches, computing the posterior distribution of the factors H{\boldsymbol{H}}, W{\boldsymbol{W}} given the data X\boldsymbol{X} is computationally challenging. Since the seminal work of Blei, Ng and Jordan [BNJ03], variational inference is the method of choice for addressing this problem within topic models. The term ‘variational inference’ refers to a broad class of methods that aim at approximating the posterior computation by solving an optimization problem, see [JGJS99, WJ08, BKM17] for background. A popular starting point is the Gibbs variational principle, namely the fact that the posterior solves the following convex optimization problem:

Even for W,H{\boldsymbol{W}},{\boldsymbol{H}} discrete, the Gibbs principle has exponentially many decision variables. Variational methods differ in the way the problem (1.3) is approximated. The main approach within topic modeling is naive mean field, which restricts the optimization problem to the space of probability measures that factorize over the rows of W,H{\boldsymbol{W}},{\boldsymbol{H}}:

The main result of this paper is that naive mean field presents an instability for learning Latent Dirichlet Allocations. We will focus on the limit n,d→∞n,d\to\infty with n/d=δn/d=\delta fixed. Hence, an LDA distribution is determined by the parameters (k,δ,ν,β)(k,\delta,\nu,\beta). We will show that there are regions in this parameter space such that the following two findings hold simultaneously:

Any estimator H^{\widehat{\boldsymbol{H}}}, W^\widehat{\boldsymbol{W}} of the topic or weight matrices is asymptotically uncorrelated with the real model parameters H,W{\boldsymbol{H}},{\boldsymbol{W}}. In other words, the data do not contain enough signal to perform any strong inference.

Given the above, one would hope the Bayesian posterior to be centered on an unbiased estimate. In particular, p(wa∣X)p({\boldsymbol{w}}_{a}|\boldsymbol{X}) (the posterior distribution over weights of document aa) should be centered around the uniform distribution wa=(1/k,…,1/k){\boldsymbol{w}}_{a}=(1/k,\dots,1/k). In contrast, we will show that the posterior produced by naive mean field is centered around a random distribution that is uncorrelated with the actual weights. Similarly, the posterior over topic vectors is centered around random vectors uncorrelated with the true topics.

One key argument in support of Bayesian methods is the hope that they provide a measure of uncertainty of the estimated variables. In view of this, the failure just described is particularly dangerous because it suggests some measure of certainty, although the estimates are essentially random.

Is there a way to eliminate this instability by using a better mean field approximation? We show that a promising approach is provided by a classical idea in statistical physics, the Thouless-Anderson-Palmer (TAP) free energy [TAP77, OW01]. This suggests a variational principle that is analogous in form to naive mean field, but provides a more accurate approximation of the Gibbs principle:

We show that the instability of naive mean field is remedied by using the TAP free energy instead of the naive mean field free energy. The latter can be optimized using an iterative scheme that is analogous to the naive mean field iteration and is known as approximate message passing (AMP).

While the TAP approach is promising –at least for synthetic data– we believe that further work is needed to develop a reliable inference scheme.

Over the last fifteen years, topic models have been generalized to cover an impressive number of applications. A short list includes mixed membership models [EFL04, ABFX08], dynamic topic models [BL06], correlated topic models [LB06, BL07], spatial LDA [WG08], relational topic models [CB09], Bayesian tensor models [ZBHD15]. While other approaches have been used (e.g. Gibbs sampling), variational algorithms are among the most popular methods for Bayesian inference in these models. Variational methods provide a fairly complete and interpretable description of the posterior, while allowing to leverage advances in optimization algorithms and architectures towards this goal (see [HBB10, BBW+13]).

Despite this broad empirical success, little is rigorously known about the accuracy of variational inference in concrete statistical problems. Wang and Titterington [WT04, WT06] prove local convergence of naive mean field estimate to the true parameters for exponential families with missing data and Gaussian mixture models. In the context of Gaussian mixtures, the same authors prove that the covariance of the variational posterior is asymptotically smaller (in the positive semidefinite order) than the inverse of the Fisher information matrix [WT05]. All of these results are established in the classical large sample asymptotics n→∞n\to\infty with dd fixed. In the present paper we focus instead on the high-dimensional limit n=Θ(d)n=\Theta(d) and prove that also the mode (or mean) of the variational posterior is incorrect. Notice that the high-dimensional regime is particularly relevant for the analysis of Bayesian methods. Indeed, in the classical low-dimensional asymptotics Bayesian approaches do not outperform maximum likelihood.

In order to correct for the underestimation of covariances, [WT05] suggest replacing its variational estimate by the inverse Fisher information matrix. A different approach is developed in [GBJ15], building on linear response theory.

Naive mean field variational inference was used in [CDP+12, BCCZ13] to estimate the parameters of the stochastic block model. These works establish consistency and asymptotic normality of the variational estimates in a large signal-to-noise ratio regime. Our work focuses on estimating the latent factors: it would be interesting to consider implications on parameter estimation as well.

The recent paper [ZZ17] also studies variational inference in the context of the stochastic block model, but focuses on reconstructing the latent vertex labels. The authors prove that naive mean field achieves minimax optimal statistical rates. Let us emphasize that this problem is closely related to topic models: both are models for approximately low-rank matrices, with a probabilistic prior on the factors. The results of [ZZ17] are complementary to ours, in the sense that [ZZ17] establishes positive results at large signal-to-noise ratio (albeit for a different model), while we prove inconsistency at low signal-to-noise ratio. General conditions for consistency of variational Bayes methods are proposed in [PBY17].

Our work also builds on recent theoretical advances in high-dimensional low-rank models, that were mainly driven by techniques from mathematical statistical physics (more specifically, spin glass theory). An incomplete list of relevant references includes [KM09, DM14, DAM17, KXZ16, BDM+16, LM16, Mio17, LKZ17, AK18]. These papers prove asymptotically exact characterizations of the Bayes optimal estimation error in low-rank models, to an increasing degree of generality, under the high-dimensional scaling n,d→∞n,d\to\infty with n/d→δ∈(0,∞)n/d\to\delta\in(0,\infty).

Related ideas also suggest an iterative algorithm for Bayesian estimation, namely Bayes Approximate Message Passing [DMM09, DMM10]. As mentioned above, Bayes AMP can be regarded as minimizing a different variational approximation known as the TAP free energy. An important advantage over naive mean field is that AMP can be rigorously analyzed using a method known as state evolution [BM11, JM13, BMN17].

Let us finally mention that a parallel line of work develops polynomial-time algorithms to construct non-negative matrix factorizations under certain structural assumptions on the data matrix X\boldsymbol{X}, such as separability [AGM12, AGKM12, RRTB12]. It should be emphasized that the objective of these algorithms is different from the one of Bayesian methods: they return a factorization that is guaranteed to be unique under separability. In contrast, variational methods attempt to approximate the posterior distribution, when the data are generated according to the LDA model.

2 Notations

It is known that for λ≤1\lambda\leq 1 no algorithm can estimate σ{\boldsymbol{\sigma}} from data X\boldsymbol{X} with positive correlation in the limit n→∞n\to\infty. The following is an immediate consequence of [KM09, DAM17], see Appendix C.1.

How does variational inference perform on this problem? Any product probability distribution q^(σ)=∏i=1nqi(σi)\hat{q}({\boldsymbol{\sigma}})=\prod_{i=1}^{n}q_{i}(\sigma_{i}) can be parametrized by the means mi=∑σi∈{+1,−1}qi(σi) σim_{i}=\sum_{\sigma_{i}\in\{+1,-1\}}q_{i}(\sigma_{i})\,\sigma_{i}, and it is immediate to get

Here X0\boldsymbol{X}_{0} is obtained from X\boldsymbol{X} by setting the diagonal entries to , and h(x)=−(1+x)2log⁡(1+x)2−(1−x)2log⁡(1−x)2{\sf h}(x)=-\frac{(1+x)}{2}\log\frac{(1+x)}{2}-\frac{(1-x)}{2}\log\frac{(1-x)}{2} is the binary entropy function. In view of Lemma 2.1, the correct posterior distribution should be essentially uniform, resulting in m{\boldsymbol{m}} vanishing. Indeed, m∗=0{\boldsymbol{m}}_{*}=0 is a stationary point of the mean field free energy F(m){\cal F}({\boldsymbol{m}}): ∇F(m)∣m=m∗=0\left.\nabla{\cal F}({\boldsymbol{m}})\right|_{{\boldsymbol{m}}={\boldsymbol{m}}_{*}}=0. We refer to this as the ‘uninformative fixed point’.

Is m∗{\boldsymbol{m}}_{*} a local minimum? Computing the Hessian at the uninformative fixed point yields

The matrix X0\boldsymbol{X}_{0} is a rank-one deformation of a Wigner matrix and its spectrum is well understood [BBAP05, FP07, BGN11]. For λ≤1\lambda\leq 1, its eigenvalues are contained with high probability in the interval $,with, with\lambda_{\min}(\boldsymbol{X})\to-2,,\lambda_{\max}(\boldsymbol{X})\to 2asasn\to\infty.For. For\lambda>1,,\lambda_{\max}(\boldsymbol{X})\to\lambda+\lambda^{-1},whiletheothereigenvaluesarecontainedin, while the other eigenvalues are contained in$. This implies

In other words, m∗=0{\boldsymbol{m}}_{*}=0 is a local minimum for λ<1/2\lambda<1/2, but becomes a saddle point for λ>1/2\lambda>1/2. In particular, for λ∈(1/2,1)\lambda\in(1/2,1), variational inference will produce an estimate m^≠0\hat{\boldsymbol{m}}\neq 0, although the posterior should be essentially uniform. In fact, it is possible to make this conclusion more quantitative.

In other words, although no estimator is positively correlated with the true signal σ{\boldsymbol{\sigma}}, variational inference outputs biases m^i\hat{m}_{i} that are non-zero (and indeed of order one, for a positive fraction of them).

The last statement immediately implies that naive mean field leads to incorrect inferential statements for λ∈(1/2,1)\lambda\in(1/2,1). In order to formalize this point, given any estimators {q^i( ⋅ )}i≤n\{\hat{q}_{i}(\,\cdot\,)\}_{i\leq n} of the posterior marginals, we define the per-coordinate expected coverage as

This is the expected fraction of coordinates that are estimated correctly by choosing σ{\boldsymbol{\sigma}} according to the estimated posterior. Since the prior is assumed to be correct, it can be interpreted either as the expectation (with respect to the parameters) of the frequentist coverage, or as the expectation (with respect to the data) of the Bayesian coverage. On the other hand, if the q^i\hat{q}_{i} were accurate, Bayesian theory would suggest claiming the coverage

The following corollary is a direct consequence of Proposition 2.2, and formalizes the claim that naive mean field leads to incorrect inferential statements. More precisely, it overestimates the coverage achieved.

While similar formal coverage statements can be obtained also for the more complex case of topic models, we will not make them explicit, since they are relatively straightforward consequences of our analysis.

Instability of variational inference for topic models

Let In(X;W,H){\rm I}_{n}(\boldsymbol{X};{\boldsymbol{W}},{\boldsymbol{H}}) denote the mutual information between the data X\boldsymbol{X} and the factors H,W{\boldsymbol{H}},{\boldsymbol{W}} under the LDA model (1.2). Then, the following limit holds almost surely

It is also shown in Appendix C.2 that M∗=(δβ/k2)Jk{\boldsymbol{M}}^{*}=(\delta\beta/k^{2}){\boldsymbol{J}}_{k} is a stationary point of the free energy RS(M;k,δ,ν){\sf RS}({\boldsymbol{M}};k,\delta,\nu). We shall refer to M∗{\boldsymbol{M}}^{*} as the uninformative point. Let β\mboxBayes=β\mboxBayes(k,δ,ν)\beta_{\mbox{\tiny\rm Bayes}}=\beta_{\mbox{\tiny\rm Bayes}}(k,\delta,\nu) be the supremum value of β\beta such that the infimum in Eq. (3.1) is uniquely achieved at M∗{\boldsymbol{M}}^{*}:

As formalized below, for β<β\mboxBayes\beta<\beta_{\mbox{\tiny\rm Bayes}} the data X\boldsymbol{X} do not contain sufficient information for estimating H{\boldsymbol{H}}, W{\boldsymbol{W}} in a non-trivial manner.

Let M∗=δβJk/k2{\boldsymbol{M}}_{*}=\delta\beta{\boldsymbol{J}}_{k}/k^{2}. Then M∗{\boldsymbol{M}}^{*} is a stationary point of the function M↦RS(M;β,k,δ,ν){\boldsymbol{M}}\mapsto{\sf RS}({\boldsymbol{M}};\beta,k,\delta,\nu). Further, it is a local minimum provided β<β\mboxspect(k,δ,ν)\beta<\beta_{\mbox{\tiny\rm spect}}(k,\delta,\nu) where the spectral threshold is given by

Finally, if β<β\mboxBayes(k,δ,ν)\beta<\beta_{\mbox{\tiny\rm Bayes}}(k,\delta,\nu), for any estimator X↦F^n(X)\boldsymbol{X}\mapsto\widehat{\boldsymbol{F}}_{n}(\boldsymbol{X}), we have

for c≡β/(k+βδ)c\equiv\sqrt{\beta}/(k+\beta\delta) a constant.

We refer to Appendix C for a proof of this statement.

Note that Eq. (3.4) compares the mean square error of an arbitrary estimator F^n\widehat{\boldsymbol{F}}_{n}, to the mean square error of the trivial estimator that replaces each column of X\boldsymbol{X} by its average. This is equivalent to estimating all the weights wi{\boldsymbol{w}}_{i} by the uniform distribution 1k/k{\boldsymbol{1}}_{k}/k. Of course, β\mboxBayes≤β\mboxspect\beta_{\mbox{\tiny\rm Bayes}}\leq\beta_{\mbox{\tiny\rm spect}}. However, this upper bound appears to be tight for small kk.

Solving numerically the k(k+1)/2k(k+1)/2-dimensional problem (3.1) indicates that β\mboxBayes(k,ν,δ)=β\mboxspect(k,ν,δ)\beta_{\mbox{\tiny\rm Bayes}}(k,\nu,\delta)=\beta_{\mbox{\tiny\rm spect}}(k,\nu,\delta) for k∈{2,3}k\in\{2,3\} and ν=1\nu=1.

2 Naive mean field free energy

We consider a trial joint distribution that factorizes according to rows of W{\boldsymbol{W}} and H{\boldsymbol{H}} according to Eq. (1.5). It turns out (see Appendix D.2) that, for any stationary point of KL(q^∥pH,W∣X){\rm KL}(\hat{q}\|p_{{\boldsymbol{H}},{\boldsymbol{W}}|\boldsymbol{X}}) over such product distributions, the marginals take the form

When restricted to a product-form ansatz with parametrization (3.5), the mean field free energy takes the form (see Appendix D.3)

(Such a solution always exists.) Further define

Then the naive mean field free energy of Eq. (3.9) admits a stationary point whereby, for all i∈[d]i\in[d], a∈[n]a\in[n],

The proof of this lemma is deferred to Appendix D.4. We note that Eq. (3.13) appears to always have a unique solution. Although we do not have a proof of uniqueness, in Appendix J we prove that the solution is unique conditional on a certain inequality that can be easily checked numerically.

3 Naive mean field iteration

4 Instability

A minimum consistency condition for variational inference is that the uninformative stationary point is a local minimum of the posterior for β<β\mboxBayes\beta<\beta_{\mbox{\tiny\rm Bayes}}. The next theorem provides a necessary condition for stability of the uninformative point, which we expect to be tight. As discussed below, it implies that this point is a saddle in an interval of β\beta below β\mboxBayes\beta_{\mbox{\tiny\rm Bayes}}. We recall that the index of a smooth function ff at stationary point x∗{\boldsymbol{x}}_{*} is the number of the negative eigenvalues of the Hessian ∇2f(x∗)\nabla^{2}f({\boldsymbol{x}}_{*}).

Define q1∗q_{1}^{*}, q2∗q_{2}^{*} as in Eqs. (3.13), (3.14), and let

Correspondingly (m∗,Q∗)({\boldsymbol{m}}^{*},{\boldsymbol{Q}}^{*}) is an unstable critical point of the mapping MX{\mathcal{M}}_{\boldsymbol{X}} in the sense that the Jacobian DMX{\boldsymbol{D}}{\mathcal{M}}_{\boldsymbol{X}} has spectral radius larger than one at (m∗,Q∗)({\boldsymbol{m}}^{*},{\boldsymbol{Q}}^{*}).

In the following, we will say that a fixed point (m∗,Q∗)({\boldsymbol{m}}^{*},{\boldsymbol{Q}}^{*}) is stable if the linearization of MX( ⋅ ){\mathcal{M}}_{\boldsymbol{X}}(\,\cdot\,) at (m∗,Q∗)({\boldsymbol{m}}^{*},{\boldsymbol{Q}}^{*}) (i.e. the Jacobian matrix DMX(m∗,Q∗){\boldsymbol{D}}{\mathcal{M}}_{\boldsymbol{X}}({\boldsymbol{m}}^{*},{\boldsymbol{Q}}^{*})) has spectral radius smaller than one. By the Hartman-Grobman linearization theorem [Per13], this implies that (m∗,Q∗)({\boldsymbol{m}}^{*},{\boldsymbol{Q}}^{*}) is an attractive fixed point. Namely, there exists a neighborhood O{\mathcal{O}} of (m∗,Q∗)({\boldsymbol{m}}^{*},{\boldsymbol{Q}}^{*}) such that, initializing the naive mean field iteration within that neighborhood, results in (mt,Qt)→(m∗,Q∗)({\boldsymbol{m}}^{t},{\boldsymbol{Q}}^{t})\to({\boldsymbol{m}}^{*},{\boldsymbol{Q}}^{*}) as t→∞t\to\infty. Vice-versa, we say that (m∗,Q∗)({\boldsymbol{m}}^{*},{\boldsymbol{Q}}^{*}) is unstable if the Jacobian DMX(m∗,Q∗){\boldsymbol{D}}{\mathcal{M}}_{\boldsymbol{X}}({\boldsymbol{m}}^{*},{\boldsymbol{Q}}^{*}) has spectral radius larger than one. In this case, for any neighborhood of (m∗,Q∗)({\boldsymbol{m}}^{*},{\boldsymbol{Q}}^{*}), and a generic initialization in that neighborhood, (mt,Qt)({\boldsymbol{m}}^{t},{\boldsymbol{Q}}^{t}) does not converge to the fixed point.

Motivated by Theorem 2, we define the instability threshold β\mboxinst=β\mboxinst(k,δ,ν)\beta_{\mbox{\tiny\rm inst}}=\beta_{\mbox{\tiny\rm inst}}(k,\delta,\nu) by

Let us emphasize that, while we discuss the consequences of the instability at β\mboxinst\beta_{\mbox{\tiny\rm inst}} on the naive mean field iteration, this is a problem of the variational free energy (3.9) and not of the specific optimization algorithm.

5 Numerical results for naive mean field

In order to investigate the impact of the instability described above, we carried out extensive numerical simulations with the variational algorithm (3.19), (3.20). After any number of iterations tt, estimates of the factors H{\boldsymbol{H}}, W{\boldsymbol{W}} are obtained by computing expectations with respect to the marginals (3.5). This results in

Note that (H^t,Q^t)({\widehat{\boldsymbol{H}}}^{t},\widehat{\boldsymbol{Q}}^{t}) can be used as the state of the naive mean-field iteration instead of (mt,Qt)({\boldsymbol{m}}^{t},{\boldsymbol{Q}}^{t}).

We select a two-dimensional grid of (δ,β)(\delta,\beta)’s and generate 400400 different instances according to the LDA model for each grid point. We report various statistics of the estimates aggregated over the 400400 instances. We have performed the simulations for ν=1\nu=1 and k∈{2,3}k\in\{2,3\}. For space considerations, we focus here on the case ν=1\nu=1, k=2k=2, and discuss other results in Appendix E. (Simulations for other values of ν\nu also yield similar results.)

We initialize both the naive mean field iteration near the uninformative fixed-point as follows:

Here G{\boldsymbol{G}} has entries (Gij)i≤d,j≤k∼iidN(0,1)(G_{ij})_{i\leq d,j\leq k}\sim_{iid}{\sf N}(0,1) and ϵ=0.01\epsilon=0.01 and H∗=F(m∗,Q∗)/β{\boldsymbol{H}}_{*}={\sf F}({\boldsymbol{m}}_{*},{\boldsymbol{Q}}_{*})/\sqrt{\beta} is the estimate at the uninformative fixed point. We run a maximum of 300300 and a minimum of 4040 iterations, and assess convergence at iteration tt by evaluating

where the minimum is over the set Sk{\sf S}_{k} of k×kk\times k permutation matrices. We declare convergence when Δt<0.005\Delta_{t}<0.005. We denote by H^{\widehat{\boldsymbol{H}}}, W^\widehat{\boldsymbol{W}} the estimates obtained at convergence.

Recall the definition P⊥=Ik−1k1kT/k{\boldsymbol{P}}_{\perp}={\boldsymbol{I}}_{k}-{\boldsymbol{1}}_{k}{\boldsymbol{1}}_{k}^{{\sf T}}/k. In order to investigate the instability of Theorem 2, we define the quantities

It is clear from Figures 1, 2, that variational inference stops converging to the uninformative fixed point (although we initialize close to it) when β\beta is still significantly smaller than the Bayes threshold β\mboxBayes\beta_{\mbox{\tiny\rm Bayes}} (i.e. in a regime in which the uninformative fixed point would a reasonable output). The data are consistent with the hypothesis that variational inference becomes unstable at β\mboxinst\beta_{\mbox{\tiny\rm inst}}, as predicted by Theorem 2.

In contrast, for large β\beta, we expect h^⊥\widehat{\boldsymbol{h}}_{\perp} to be positively correlated with h⊥{\boldsymbol{h}}_{\perp}, and Cη(H,H^){\sf C}_{\eta}({\boldsymbol{H}},{\widehat{\boldsymbol{H}}}) should concentrate around a non-random positive value. As a consequence, BH≈1{\sf B}_{{\boldsymbol{H}}}\approx 1.

In Figures 3 we report our empirical results for BH{\sf B}_{{\boldsymbol{H}}} and BW{\sf B}_{{\boldsymbol{W}}} for four different values of δ\delta, and several values of dd. As expected, these quantities grow from to 11 as β\beta grows, and the transition is centered around β\mboxBayes\beta_{\mbox{\tiny\rm Bayes}}. Figure 4 reports the results on a grid of (β,δ)(\beta,\delta) values. Again, the transition is well predicted by the analytical curve β\mboxBayes\beta_{\mbox{\tiny\rm Bayes}}. These data support our claim that, for β\mboxinst<β<β\mboxBayes\beta_{\mbox{\tiny\rm inst}}<\beta<\beta_{\mbox{\tiny\rm Bayes}}, the output of variational inference is non-uniform but uncorrelated with the true signal.

Fixing the instability

The fact that naive mean field is not accurate for certain classes of random high-dimensional probability distributions is well understood within statistical physics. In particular, in the context of mean field spin glasses [MPV87], naive mean field is known to lead to an asymptotically incorrect expression for the free energy. We expect the same mechanism to be relevant in the context of topic models.

where Q(m)≡∥m∥22/nQ({\boldsymbol{m}})\equiv\|{\boldsymbol{m}}\|_{2}^{2}/n.

We can now repeat the analysis of Section 2 with this new free energy approximation. It is easy to see that m∗=0{\boldsymbol{m}}_{*}={\boldsymbol{0}} is again a stationary point. However, the Hessian is now

In particular, for λ<1\lambda<1, λmin(∇2F∣m=m∗)\lambda_{\rm min}(\left.\nabla^{2}{\cal F}\right|_{{\boldsymbol{m}}={\boldsymbol{m}}_{*}}) converges to (1−λ)2>0(1-\lambda)^{2}>0: the uninformative stationary point is (with high probability) a local minimum.

2 TAP free energy for topic models

We now turn to topic models. The TAP approach replaces the free energy (3.9) with the following (see Appendix F.1 for a derivation)

When substituting in Eq. (4.3), the supremum of Eq. (4.4) is achieved at

Calculus shows that stationary points of this free energy are in one-to-one correspondence (via Eq. (4.5)) with the fixed points of the following iteration:

The stationarity conditions for the TAP free energy (4.3) are known as TAP equations, and the corresponding iterative algorithm (4.7), (4.8) is a special case of approximate message passing (AMP), with Bayesian updates. Note that the specific choice of time indices in Eqs. (4.7), (4.8) is instrumental for the analysis in the next section to hold. We also note that the general AMP analysis of [BM11, JM13] allows for quite general choices of the sequence of matrices Qt,Q~t{\boldsymbol{Q}}_{t},\widetilde{\boldsymbol{Q}}_{t}. However, stationarity of the TAP free energy (4.3) requires that at convergence the condition (4.9) holds at the fixed point

It is not hard to see that the AMP iteration admits an uninformative fixed point, which is a stationary point of the TAP free energy, see proof in Appendix F.3.

This corresponds to a stationary point of the TAP free energy (4.3), via Eq. (4.5):

Further, this is the only stationary point that is unchanged under permutations of the topics.

3 State evolution analysis

State evolution provides an asymptotically exact characterization of the behavior of AMP, as formalized by the next theorem (which is a direct application of [JM13]).

where it is understood that n,d→∞n,d\to\infty with n/d→δn/d\to\delta. In particular

Further lim⁡n→∞Qt=Mt\lim_{n\to\infty}{\boldsymbol{Q}}^{t}={\boldsymbol{M}}_{t}, lim⁡n→∞Q~t=M~t\lim_{n\to\infty}\widetilde{\boldsymbol{Q}}^{t}=\widetilde{\boldsymbol{M}}_{t}.

Using state evolution, we can establish a stability result for AMP. First of all, notice that the state evolution iteration (4.16), (4.17) admits a fixed point of the form M∗=(δβ/k2)Jk{\boldsymbol{M}}^{*}=(\delta\beta/k^{2}){\boldsymbol{J}}_{k}, M~∗=ρ0Jk\widetilde{\boldsymbol{M}}^{*}=\rho_{0}{\boldsymbol{J}}_{k}, for ρ0=δβ2/(kδβ+k2)\rho_{0}=\delta\beta^{2}/(k\delta\beta+k^{2}), see Appendix G.2. This is an uninformative fixed point, in the sense that the kk topics are asymptotically identical. The next theorem is proved in Appendix G.3.

If β<β\mboxspect(k,ν,δ)\beta<\beta_{\mbox{\tiny\rm spect}}(k,\nu,\delta), then the uninformative fixed point is stable under the state evolution iteration (4.16), (4.17).

In particular, for β<β\mboxspect(k,ν,δ)\beta<\beta_{\mbox{\tiny\rm spect}}(k,\nu,\delta), there exists c0=c0(β,kν,δ)c_{0}=c_{0}(\beta,k\nu,\delta) such that, if we initialize AMP as in Theorem 3 with ∥M0−M∗∥F≤c0\|{\boldsymbol{M}}_{0}-{\boldsymbol{M}}^{*}\|_{F}\leq c_{0}, then (recalling P⊥=Ik−1k1k/k{\boldsymbol{P}}_{\perp}={\boldsymbol{I}}_{k}-{\boldsymbol{1}}_{k}{\boldsymbol{1}}_{k}/k)

4 Stability of the uninformative fixed point

The next theorem establishes that the uninformative fixed point of the TAP free energy is a local minimum for all β\beta below the spectral threshold β\mboxspect(k,ν,δ)\beta_{\mbox{\tiny\rm spect}}(k,\nu,\delta). Since β\mboxBayes(k,ν,δ)≤β\mboxspect(k,ν,δ)\beta_{\mbox{\tiny\rm Bayes}}(k,\nu,\delta)\leq\beta_{\mbox{\tiny\rm spect}}(k,\nu,\delta), this shows that the instability we discovered in the case of naive mean field is corrected by the TAP free energy.

Let us emphasize that this result is not implied by the state evolution result of Theorem 4, which only establishes stability in a certain asymptotic sense. Vice-versa, Theorem 5 does not directly imply Theorem 4.

5 Numerical results for TAP free energy

In order to confirm the stability analysis at the previous section, we carried out numerical simulations analogous to the ones of Section 3.5. We found that the AMP iteration of Eqs. (4.7), (4.8) is somewhat unstable when β≈β\mboxspect\beta\approx\beta_{\mbox{\tiny\rm spect}}. In order to remedy this problem, we used a damped version of the same iteration, see Appendix H.1. Notice that damping does not change the stability of a local minimum or saddle, it merely reduces oscillations due to aggressive step sizes.

We initialize the iteration as for naive mean field, and monitor the same quantities, as in Section 3.5. In particular, here we report results on the distance from the uninformative subspace V(H^){\sf V}({\widehat{\boldsymbol{H}}}), V(W^){\sf V}(\widehat{\boldsymbol{W}}), in Figures 6 and 7, and the Binder cumulants BH{\sf B}_{{\boldsymbol{H}}} and BW{\sf B}_{{\boldsymbol{W}}}, measuring the correlation between AMP estimates and the true factors W,H{\boldsymbol{W}},{\boldsymbol{H}}, in Figures 8, 9. We focus on the case k=2k=2, deferring k=3k=3 to the appendices.

In the intermediate regime β∈(β\mboxinst,β\mboxspect)\beta\in(\beta_{\mbox{\tiny\rm inst}},\beta_{\mbox{\tiny\rm spect}}), the behavior of AMP is strikingly different from the one of naive mean field. AMP remains close to the uninformative fixed point, confirming that this is a local minimum of the TAP free energy. The distance from the uninformative subspace starts growing only at the spectral threshold β\mboxspect\beta_{\mbox{\tiny\rm spect}} (which coincides, in the present cases, with the Bayes threshold β\mboxBayes\beta_{\mbox{\tiny\rm Bayes}}). At the same point, the correlation with the true factors W{\boldsymbol{W}}, H{\boldsymbol{H}} also becomes strictly positive.

Discussion

Bayesian methods are particularly attractive in unsupervised learning problems such as topic modeling. Faced with a collection of documents x1{\boldsymbol{x}}_{1},…xn{\boldsymbol{x}}_{n}, it is not clear a priori whether they should be modeled as convex combinations of topics, or how many topics should be used. Even after a low-rank factorization X≈WHT\boldsymbol{X}\approx{\boldsymbol{W}}{\boldsymbol{H}}^{{\sf T}} is computed, it is still unclear how to evaluate it, or to which extent it should be trusted.

Bayesian approaches provide estimates of the factors W{\boldsymbol{W}}, H{\boldsymbol{H}}, but also a probabilistic measure of how much these estimates should be trusted. To the extent that the posterior concentrates around its mean, this can be considered as a good estimate of a true underlying signal.

It is well understood that Bayesian estimates can be unreliable if the prior is not chosen carefully. Our work points at a second reason for caution. When variational inference is used for approximating the posterior, the result can be incorrect even if the data are generated according to the prior. More precisely, we showed that for a certain regime of parameters, naive mean field ‘believes’ that there is a signal, even if it is information-theoretically impossible to extract any non-trivial estimate from the data.

Given that naive mean field is the method of choice for inference with topic models [BNJ03], it would be of great interest to remedy this instability. We showed that the TAP free energy provides a better mean field approximation, and in particular does not have the same instability. However, this approximation is also based on the correctness of the generative model, and further investigation is warranted on its robustness.

Acknowledgements

H.J. and A.M. were partially supported by grants NSF CCF-1714305 and NSF IIS-1741162. B.G. was supported by Stanford’s Caroline and Fabian Pease Graduate Fellowship.

References

Appendix A Some remarks on alternating minimization

We then define the alternating minimization iteration

If d=nd=n and h:Ω1→Ω2h:\Omega_{1}\to\Omega_{2}, g:Ω2→Ω1g:\Omega_{2}\to\Omega_{1} are bijective, we also define the dual iteration

The Hessian {\boldsymbol{H}}=\nabla^{2}_{({\boldsymbol{x}},{\boldsymbol{y}})}f\big{|}_{({\boldsymbol{x}},{\boldsymbol{y}})=({\boldsymbol{x}}^{*},{\boldsymbol{y}}^{*})} is strictly positive definite.

(x∗,y∗)({\boldsymbol{x}}^{*},{\boldsymbol{y}}^{*}) is a stable fixed point of the alternate minimization algorithm (A.3).

f1(x)≡min⁡y∈Ω2f(x,y)f_{1}({\boldsymbol{x}})\equiv\min_{{\boldsymbol{y}}\in\Omega_{2}}f({\boldsymbol{x}},{\boldsymbol{y}}) is strongly convex in a neighborhood of x∗{\boldsymbol{x}}^{*} (and in particular, x∗{\boldsymbol{x}}^{*} is a local minimum of f1f_{1}).

Further, if n=dn=d and the matrix ∂f∂x∂y∣x∗,y∗\left.\frac{\partial f}{\partial{\boldsymbol{x}}\partial{\boldsymbol{y}}}\right|_{{\boldsymbol{x}}^{*},{\boldsymbol{y}}^{*}} is invertible, then the following are equivalent:

(x∗,y∗)({\boldsymbol{x}}^{*},{\boldsymbol{y}}^{*}) is a stable fixed point of the dual algorithm (A.4).

f1(x)≡min⁡y∈Ω2f(x,y)f_{1}({\boldsymbol{x}})\equiv\min_{{\boldsymbol{y}}\in\Omega_{2}}f({\boldsymbol{x}},{\boldsymbol{y}}) is strongly concave in a neighborhood of x∗{\boldsymbol{x}}^{*} (and in particular, x∗{\boldsymbol{x}}^{*} is a local maximum).

(A1)≡\equiv(A2) We compute the linearization of the iterations in (A.3) around the fixed point (x∗,y∗)({\boldsymbol{x}}^{*},{\boldsymbol{y}}^{*}). Note that since x∗{\boldsymbol{x}}^{*} is a minimizer of f( ⋅ ,y∗)f(\,\cdot\,,{\boldsymbol{y}}^{*}), using the implicit function theorem for the Jacobian of the update rule for x{\boldsymbol{x}} in (A.3) we have

Similarly, for the Jacobian of the update rule for y{\boldsymbol{y}} in (A.3) we have

Hence, (x∗,y∗)({\boldsymbol{x}}^{*},{\boldsymbol{y}}^{*}) is stable if and only if the operator

Since f( ⋅ ,x∗)f(\,\cdot\,,{\boldsymbol{x}}^{*}) is strongly convex, the matrices Hxx,Hxx−1{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{x}}},{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{x}}}^{-1} are positive definite. Hence, the eigenvalues of Hxx−1HxyHyy−1HxyT{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{x}}}^{-1}{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{y}}}{\boldsymbol{H}}_{{\boldsymbol{y}}{\boldsymbol{y}}}^{-1}{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{y}}}^{\sf T} are real and equal to the eigenvalues of the symmetric positive semi-definite matrix Hxx−1/2HxyHyy−1HxyTHxx−1/2{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{x}}}^{-1/2}{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{y}}}{\boldsymbol{H}}_{{\boldsymbol{y}}{\boldsymbol{y}}}^{-1}{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{y}}}^{\sf T}{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{x}}}^{-1/2}. Therefore, σ(L)<1\sigma({\boldsymbol{L}})<1 if and only if

Note that since f(x∗, ⋅ )f({\boldsymbol{x}}^{*},\,\cdot\,) is convex, Hyy≻0{\boldsymbol{H}}_{{\boldsymbol{y}}{\boldsymbol{y}}}\succ 0. Therefore, Hxx−HxyHyy−1HxyT≻0{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{x}}}-{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{y}}}{\boldsymbol{H}}_{{\boldsymbol{y}}{\boldsymbol{y}}}^{-1}{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{y}}}^{\sf T}\succ 0 if and only if H≻0{\boldsymbol{H}}\succ 0. Hence, the fixed point is stable if and only if H≻0{\boldsymbol{H}}\succ 0 and this completes the proof.

(A1)≡\equiv (A3) By differentiating f1(z)=f(x,g(x))f_{1}({\boldsymbol{z}})=f({\boldsymbol{x}},g({\boldsymbol{x}})), we obtain

(B1)≡\equiv (B2) Linearizing the iteration (A.4), we get that (x∗,y∗)({\boldsymbol{x}}^{*},{\boldsymbol{y}}^{*}) is a stable fixed point if and only if the operator

Using the fact that Hxx≻0{\boldsymbol{H}}_{{\boldsymbol{x}}{\boldsymbol{x}}}\succ{\boldsymbol{0}}, we have that σ(L−1)<1\sigma({\boldsymbol{L}}^{-1})<1 if and only if

As shown above, the last condition is equivalent to ∂2f1∂x2∣x∗≺0\left.\frac{\partial^{2}f_{1}}{\partial{\boldsymbol{x}}^{2}}\right|_{{\boldsymbol{x}}^{*}}\prec{\boldsymbol{0}}, and by continuity of the Hessian, this is equivalent to f1f_{1} being strongly concave in a neighborhood of x∗{\boldsymbol{x}}^{*}. ∎

Appendix B Proof of Proposition 2.2

It is useful to first prove a simple random matrix theory remark.

For S⊆[n]S\subseteq[n], let XS,S\boldsymbol{X}_{S,S} be the submatrix of X\boldsymbol{X} with rows and columns with index in SS. Then, for any ε∈[0,1){\varepsilon}\in[0,1), the following holds with high probability:

Without loss of generality we can assume X∼GOE(n)\boldsymbol{X}\sim{\sf GOE}(n) (because the rank-one deformation cannot decrease the maximum eigenvalue), and ∣S∣=n(1−ε)|S|=n(1-{\varepsilon}) (because λmax⁡(XS,S)\lambda_{\max}(\boldsymbol{X}_{S,S}) is non-decreasing in SS). Note that XS,S\boldsymbol{X}_{S,S} is distributed as 1−ε\sqrt{1-{\varepsilon}} times a GOE(n(1−ε)){\sf GOE}(n(1-{\varepsilon})) matrix. Large deviation bounds on the eigenvalues of GOE{\sf GOE} matrices imply that, for any δ>0\delta>0, there exists c(δ)>0c(\delta)>0 such that

for all nn large enough. The claim follows by union bound since there is at most 2n2^{n} such sets SS. ∎

First notice that Lemma B.1 continues to hold if X\boldsymbol{X} is replaced by X0\boldsymbol{X}_{0} since ∥XS,S−(X0)S,S∥\mboxop≤max⁡i≤n∣Xii∣≤4log⁡n/n\|\boldsymbol{X}_{S,S}-(\boldsymbol{X}_{0})_{S,S}\|_{\mbox{\tiny\rm op}}\leq\max_{i\leq n}|X_{ii}|\leq 4\sqrt{\log n/n} (where the last bound holds with high probability since (Xii)i≤n∼N(0,2/n)(X_{ii})_{i\leq n}\sim{\sf N}(0,2/n).

Note that ∇F(m)i=±∞\nabla{\cal F}({\boldsymbol{m}})_{i}=\pm\infty if mi=±1m_{i}=\pm 1, whence any local minimum must be in the interior of [−1,+1]n[-1,+1]^{n}. Let m∈(−1,−1)n{\boldsymbol{m}}\in(-1,-1)^{n} be a local minimum of F( ⋅ ){\cal F}(\,\cdot\,). By the second-order minimality conditions, we must have

The last inequality holds with high probability by Lemma B.1. Inverting it, we get

The claim follows by taking ε=c1{\varepsilon}=c_{1} a small constant (for which the right-hand side is lower bounded by c0c_{0} for all λ≥1\lambda\geq 1), or ε=c2(2λ−1){\varepsilon}=c_{2}(2\lambda-1) (for which the right-hand side is lower bounded by c0(2λ−1)2c_{0}(2\lambda-1)^{2}). ∎

Appendix C Information-theoretic limits

C.2 Proof of Proposition 3.1

where expectations are with respect to z∼N(0,Ik){\boldsymbol{z}}\sim{\sf N}(0,{\boldsymbol{I}}_{k}) independent of h∼N(0,Ik){\boldsymbol{h}}\sim{\sf N}(0,{\boldsymbol{I}}_{k}) and w∼Dir(ν;k){\boldsymbol{w}}\sim{\rm Dir}(\nu;k). We then have

Further, the function RS0(M,M~;k,δ,ν){\sf RS}_{0}({\boldsymbol{M}},\widetilde{\boldsymbol{M}};k,\delta,\nu) on Eq. (C.4) is separately strictly concave in M{\boldsymbol{M}} and M~\widetilde{\boldsymbol{M}}, and in particular the last supremum is uniquely achieved at a point M~=M~(M)\widetilde{\boldsymbol{M}}=\widetilde{\boldsymbol{M}}({\boldsymbol{M}}).

By Lemma D.1, for M=aJk{\boldsymbol{M}}=a{\boldsymbol{J}}_{k}, M~=bJk\widetilde{\boldsymbol{M}}=b{\boldsymbol{J}}_{k}, we have

Therefore, this is a stationary point of RS0{\sf RS}_{0} provided a=βδ/k2a=\beta\delta/k^{2} and b=β2δ/(k(k+βδ))b=\beta^{2}\delta/(k(k+\beta\delta)) (in particular, M=M∗{\boldsymbol{M}}={\boldsymbol{M}}^{*}). Since RS(M;k,δ,ν)=RS0(M,M~(M);k,δ,ν){\sf RS}({\boldsymbol{M}};k,\delta,\nu)={\sf RS}_{0}({\boldsymbol{M}},\widetilde{\boldsymbol{M}}({\boldsymbol{M}});k,\delta,\nu), for M~( ⋅ )\widetilde{\boldsymbol{M}}(\,\cdot\,) a differentiable function, it also follows that M∗{\boldsymbol{M}}_{*} is a stationary point of RS{\sf RS}.

In order to prove that M∗{\boldsymbol{M}}^{*} is a local minimum of RS{\sf RS} for β<β\mboxspect\beta<\beta_{\mbox{\tiny\rm spect}}, we apply Lemma A.1 to the function f(x,y)=−RS0(x,y;k,δ,ν)f({\boldsymbol{x}},{\boldsymbol{y}})=-{\sf RS}_{0}({\boldsymbol{x}},{\boldsymbol{y}};k,\delta,\nu), whence f1(x)=−RS(x;k,δ,ν)f_{1}({\boldsymbol{x}})=-{\sf RS}({\boldsymbol{x}};k,\delta,\nu). It follows from Eqs. (C.6) and (C.7) that the dynamics (A.4) then coincides with the state evolution dynamics discussed in Section 4.3, namely

Hence, the claim follows immediately from Theorem 4 and Lemma A.1.

(where we used WT1n/n→1k/k{\boldsymbol{W}}^{{\sf T}}{\boldsymbol{1}}_{n}/n\to{\boldsymbol{1}}_{k}/k and HTH/d→Ik{\boldsymbol{H}}^{{\sf T}}{\boldsymbol{H}}/d\to{\boldsymbol{I}}_{k} by the law of large numbers) and

Setting c=A/Bc=A/B, and substituting in Eq. (C.14), we obtain

which coincides with Eq. (C.13) as claimed.

Appendix D Naive Mean Field: Analytical results

Again, G( ⋯ ){\sf G}(\,\cdots\,) can be written explicitly as

D.2 Derivation of the iteration (3.19), (3.20)

Let D\mathcal{D}, the set of joint distributions q^(W,H)\hat{q}\left({\boldsymbol{W}},{\boldsymbol{H}}\right) that factorize over the rows of W,H{\boldsymbol{W}},{\boldsymbol{H}}, namely

The goal in variational inference is to find the distribution in D{\mathcal{D}} that minimizes the Kullback-Leibler (KL) divergence with respect to the actual posterior distribution of X,W\boldsymbol{X},{\boldsymbol{W}} given X\boldsymbol{X}

The function F(q^){\cal F}(\hat{q}) is known as Gibbs free energy or –within the topic models literature– as the opposite of the evidence lower bound F(q^)=−ELBO(q^){\cal F}(\hat{q})=-{\rm ELBO}(\hat{q}) [BKM17]. Since log⁡p(X)\log p\left(\boldsymbol{X}\right) does not depend on q^\hat{q}, minimizing the KL divergence is equivalent to minimizing the Gibbs free energy.

Similarly, by taking q(H)q\left({\boldsymbol{H}}\right) fixed, we have

Therefore, the naive mean field iterations have the form

where F~( ⋅ ; ⋅ ),G~( ⋅ ; ⋅ )\widetilde{\sf F}(\,\cdot\,;\,\cdot\,),\widetilde{\sf G}(\,\cdot\,;\,\cdot\,) are given in (D.2), (D.7) and

where F( ⋅ ; ⋅ ),G( ⋅ ; ⋅ ){\sf F}(\,\cdot\,;\,\cdot\,),{\sf G}(\,\cdot\,;\,\cdot\,) are given in (D.1), (D.6) and

D.3 Derivation of the variational free energy (3.9)

where F(q^){\cal F}(\hat{q}) is the Gibbs free energy. In this appendix we derive an explicit form for F(q^){\cal F}(\hat{q}) when q^\hat{q} is factorized. We have

(The last term is the KL divergence between q^\hat{q} and the prior.)

Since both q^\hat{q} and q0q_{0} have product form, their KL divergence is just a sum of KL divergences for each row of W{\boldsymbol{W}} and each row of H{\boldsymbol{H}}:

and the claim (3.10) follows by strong duality.

Putting together Eqs. (D.46), (D.47), and (D.48)-(D.49), we obtain the desired expression (3.9).

Using (3.10), we get the following expressions for the gradients of ψ∗\psi_{*}

D.4 Proof of Lemma 3.2

Therefore, the right hand side of (3.13) is non-negative, continuous, bounded for q1∗∈[0,∞)q_{1}^{*}\in[0,\infty). Hence, using intermediate value theorem, (3.13) has a solution in [0,∞)[0,\infty).

Now we consider the first equation in (3.20). Using Lemma D.1, we have

For the second equation in (3.19), note that using Lemma D.1, we have

Finally, we check the second equation in (3.20). Using Lemma D.1, we have

D.5 Proof of Theorem 2

Since Ik+Q~∗{\boldsymbol{I}}_{k}+\widetilde{\boldsymbol{Q}}^{*} is positive definite, ∇2G⪰0\nabla^{2}\mathcal{G}\succeq 0 if and only if

Hence, ∇2G1\nabla^{2}\mathcal{G}_{1} has a negative eigenvalue if and only if

As explained above, ∇2G2\nabla^{2}{\cal G}_{2} has rank at most kk. Therefore, by Cauchy’s interlacing inequality, if L(β,k,δ,ν)>1L(\beta,k,\delta,\nu)>1,

Hence, for L(β,δ)>1L(\beta,\delta)>1, ∇2F∗\nabla^{2}{\cal F}_{*} has a negative eigenvalue.

Appendix E Naive Mean Field: Further numerical results

In this section we report on additional numerical simulations using the alternate minimization to minimize the naive mean field free energy. These results confirm the one presented in the main text in Section 3.5.

In Figures 10 and 11 we plot Bayesian credible intervals for the weights wi,1w_{i,1} as computed within naive mean field, for k=2k=2, d=5000d=5000. These simulations are analogous to the one reported in the main text in Figure 5, but we use n=2500n=2500 (δ=0.5\delta=0.5) in Figure 10 and n=10000n=10000 (δ=2\delta=2) in Figure 10.

The nominal coverage of these intervals is 0.90.9, but we obtain a smaller empirical coverage. For δ=0.5\delta=0.5, the empirical coverage was 0.870.87 (for β=2<β\mboxinst\beta=2<\beta_{\mbox{\tiny\rm inst}}), 0.610.61 (for β=5.7∈(β\mboxinst,β\mboxBayes)\beta=5.7\in(\beta_{\mbox{\tiny\rm inst}},\beta_{\mbox{\tiny\rm Bayes}})), and 0.640.64 (for β=8.5≈β\mboxBayes\beta=8.5\approx\beta_{\mbox{\tiny\rm Bayes}}). For δ=2\delta=2, the empirical coverage was 0.890.89 (for β=1<β\mboxinst\beta=1<\beta_{\mbox{\tiny\rm inst}}), 0.690.69 (for β=3∈(β\mboxinst,β\mboxBayes)\beta=3\in(\beta_{\mbox{\tiny\rm inst}},\beta_{\mbox{\tiny\rm Bayes}})), and 0.650.65 (for β=4.2≈β\mboxBayes\beta=4.2\approx\beta_{\mbox{\tiny\rm Bayes}}).

E.2 Results for k=3𝑘3k=3 topics

In Figures 12 to 15 we report our results using alternating minimization to minimize the naive mean field free energy for k=3k=3.

In Figures 14, 15 we consider the correlation between the estimates H^,W^{\widehat{\boldsymbol{H}}},\widehat{\boldsymbol{W}} and the true factorization H,W{\boldsymbol{H}},{\boldsymbol{W}}, and define a Binder cumulant as follows for k≥3k\geq 3. Let Cη(H,H^){\sf C}_{\eta}({\boldsymbol{H}},{\widehat{\boldsymbol{H}}}) be the k×kk\times k matrix with entries

Figures 14, 15 are consistent with the prediction that the correlation between the AMP estimates and the true factors W,H{\boldsymbol{W}},{\boldsymbol{H}} starts to be non-negligible at the Bayes threshold.

Appendix F TAP free energy and approximate message passing

The posterior pH,W∣Xp_{{\boldsymbol{H}},{\boldsymbol{W}}|\boldsymbol{X}} takes the form

The stationarity conditions for F\mboxBethe(q,q~){\cal F}_{\mbox{\tiny\rm Bethe}}(\boldsymbol{q},\widetilde{\boldsymbol{q}}) correspond to the belief propagation fixed point equations

Using the expression (F.10) in Eq. (F.4), and repeating a similar calculation for (F.3), we get

We can similarly expand ZaiZ_{ai} for large n,dn,d:

Therefore, using again the central limit theorem,

Putting together Eqs. (F.11), (F.12), and (F.15), we obtain

Substituting the last two expressions in Eq. (F.20), we obtain

F.2 Gradient of the TAP free energy

Using these derivatives we can compute the gradient of the free energy

These coincide with the fixed point of the AMP algorithm in Section 4.2.

F.3 Uninformative critical point: Proof of Lemma 4.1

Substituting this in Eqs. (4.10), (4.11), and using again Lemma D.1, we get

Appendix G State evolution analysis

G.2 Uninformative fixed point

The state evolution recursion in (4.16), (4.17) admit uninformative fixed point of the form

First note that for this value of M~∗\widetilde{\boldsymbol{M}}^{*}, M~∗w+M~∗1/2z=y1k\widetilde{\boldsymbol{M}}^{*}{\boldsymbol{w}}+\widetilde{\boldsymbol{M}}^{*^{1/2}}{\boldsymbol{z}}=y{\boldsymbol{1}}_{k} for some (random) yy. Hence, using Eq. (D.58)

In addition, using the explicit form (D.5)

Hence, the pair M∗,M~∗{\boldsymbol{M}}^{*},\widetilde{\boldsymbol{M}}^{*} in (G.4) is a fixed point for the iterations in (4.16), (4.17). ∎

G.3 Stability of state evolution and proof of Theorem 4

The following theorem characterizes the region of parameters in which the uninformative fixed point of the state evolution iterations in Lemma G.1 is stable.

Consider the state evolution equations in (4.16), (4.17). The uninformative symmetric fixed point of these equations is stable if and only if

We linearize Eqs. (4.16), (4.17) around the fixed point in (G.4) by setting Mt=M∗+Δt{\boldsymbol{M}}_{t}={\boldsymbol{M}}_{*}+{\boldsymbol{\Delta}}_{t}, M~t=M~∗+Δ~t\widetilde{\boldsymbol{M}}_{t}=\widetilde{\boldsymbol{M}}_{*}+\widetilde{\boldsymbol{\Delta}}_{t} and expanding Eqs. (4.16), (4.17) to first order in Δ,Δ~t{\boldsymbol{\Delta}},\widetilde{\boldsymbol{\Delta}}_{t}. First note that Eq. (4.17) takes the explicit form

In the following, we shall decompose Δt{\boldsymbol{\Delta}}_{t} and Δ~t\widetilde{\boldsymbol{\Delta}}_{t} in the components along 1k{\boldsymbol{1}}_{k} and the ones orthogonal

and similarly for Δ~t\widetilde{\boldsymbol{\Delta}}_{t}. Note that the linearization (G.9) preserves these subspaces

Next we consider Eq. (4.16). We compute the value of

for w∈P1(k){\boldsymbol{w}}\in{\sf P}_{1}(k). We have

where CΔt≡(ρ0Jk+Δ~t)1/2−(ρ0/k)1/2Jk{\boldsymbol{C}}_{\boldsymbol{\Delta}}^{t}\equiv\left(\rho_{0}{\boldsymbol{J}}_{k}+\widetilde{\boldsymbol{\Delta}}^{t}\right)^{1/2}-(\rho_{0}/k)^{1/2}{\boldsymbol{J}}_{k}. Therefore, we have

where a=exp⁡{ρ0/2+ρ0/k⟨z,1k⟩}a=\exp\left\{\rho_{0}/2+\sqrt{\rho_{0}/k}\left\langle{\boldsymbol{z}},{\boldsymbol{1}}_{k}\right\rangle\right\}. Expanding the exponential, we get

Therefore, linearizing Eq. ((4.16)), we get (below, we denote by [A]s[{\boldsymbol{A}}]_{s} the symmetric part of matrix A{\boldsymbol{A}}, namely [A]s=(A+AT)/2[{\boldsymbol{A}}]_{s}=({\boldsymbol{A}}+{\boldsymbol{A}}^{{\sf T}})/2)

We next decompose Δ~t\widetilde{\boldsymbol{\Delta}}_{t} in the component along Jk{\boldsymbol{J}}_{k} and the one orthogonal, as per Eq. (G.10), and note that

Using this identity together with Eqs. (G.24), (G.25) in Eq. (G.31) we get

Together with Eqs. (G.11) to (G.13), these yield

Hence the uninformative fixed point is stable if and only if

Note that this is the same condition as the spectral threshold. ∎

G.4 Stability of the uninformative point: Proof of Theorem 5

We will establish an expansion of the form

Setting variables as per Eq. (G.44), we have

Considering next the second term in Eq. (G.53), we get

Setting variables as per Eq. (G.44), we have

where b0=(β/d)∑i=1d(ris)2b_{0}=(\beta/d)\sum_{i=1}^{d}(r^{s}_{i})^{2}.

Let Q~=(β/d)∑i=1dri⊗2\widetilde{\boldsymbol{Q}}=(\beta/d)\sum_{i=1}^{d}{\boldsymbol{r}}_{i}^{\otimes 2} and, as in the previous proof, define the orthogonal decomposition Q~=Q~0+Q~1+Q~2\widetilde{\boldsymbol{Q}}=\widetilde{\boldsymbol{Q}}_{0}+\widetilde{\boldsymbol{Q}}_{1}+\widetilde{\boldsymbol{Q}}_{2}, where Q~0=PQ~P\widetilde{\boldsymbol{Q}}_{0}={\boldsymbol{P}}\widetilde{\boldsymbol{Q}}{\boldsymbol{P}}, Q~1=PQ~P⊥+P⊥Q~P\widetilde{\boldsymbol{Q}}_{1}={\boldsymbol{P}}\widetilde{\boldsymbol{Q}}{\boldsymbol{P}}_{\perp}+{\boldsymbol{P}}_{\perp}\widetilde{\boldsymbol{Q}}{\boldsymbol{P}}, Q~2=P⊥Q~P⊥\widetilde{\boldsymbol{Q}}_{2}={\boldsymbol{P}}_{\perp}\widetilde{\boldsymbol{Q}}{\boldsymbol{P}}_{\perp}. Using the representation (G.44), we get

Hence, we obtain immediately the claim. ∎

Setting variables as per Eq. (G.44), we have

Since ϕ( ⋅ ,Q)\phi(\,\cdot\,,{\boldsymbol{Q}}) is strongly convex, the maximum is realized when ηis,ηi=O(δ)\eta_{i}^{s},{\boldsymbol{\eta}}_{i}=O(\delta) and can be computed order-by-order in δ\delta. Hence, substituting (G.49) we obtain the claim. ∎

Setting variables as per Eq. (G.44), we have

where b0=(β/d)∑i=1d(ris)2b_{0}=(\beta/d)\sum_{i=1}^{d}(r^{s}_{i})^{2}.

We are left with the task of proving that Ω≻0{\boldsymbol{\Omega}}\succ{\boldsymbol{0}} for β<β\mboxspect(k,δ,ν)\beta<\beta_{\mbox{\tiny\rm spect}}(k,\delta,\nu). We will use the following random matrix theory lemma.

Finally define γ∗2≡(1+δ)α⊥2−α∥2\gamma_{*}^{2}\equiv(1+\sqrt{\delta})\alpha_{\perp}^{2}-\alpha_{\|}^{2}, and

Then, denoting by smax⁡(M)s_{\max}({\boldsymbol{M}}) the largest singular value of M{\boldsymbol{M}}, we have lim⁡n→∞smax⁡(M)=λ∗\lim_{n\to\infty}s_{\max}({\boldsymbol{M}})=\lambda_{*} in probability.

Note that, almost surely, lim⁡n→∞λmax⁡(Z~Z~T)=(1+δ)2\lim_{n\to\infty}\lambda_{\max}(\widetilde{\boldsymbol{Z}}\widetilde{\boldsymbol{Z}}^{{\sf T}})=(1+\sqrt{\delta})^{2} [BS10], and therefore lim⁡inf⁡n→∞smax⁡(M)2≥α⊥2(1+δ)2\lim\inf_{n\to\infty}s_{\max}({\boldsymbol{M}})^{2}\geq\alpha_{\perp}^{2}(1+\sqrt{\delta})^{2} almost surely.

Recall that, as long as sn2s_{n}^{2} is not an eigenvalue of α⊥2Z~Z~T\alpha_{\perp}^{2}\widetilde{\boldsymbol{Z}}\widetilde{\boldsymbol{Z}}^{{\sf T}}, we have

It is immediate to see that (unless α⊥=0\alpha_{\perp}=0 or v=0{\boldsymbol{v}}=0), sn2>λmax⁡(α⊥2Z~Z~T)s_{n}^{2}>\lambda_{\max}(\alpha_{\perp}^{2}\widetilde{\boldsymbol{Z}}\widetilde{\boldsymbol{Z}}^{{\sf T}}) almost surely, and therefore sns_{n} is given by the largest solution of the equation

where R(t)R(t) is the Stieltjes transform of the limit eigenvalues distribution of a Wishart matrix, which is given by the Marcenko-Pastur law [BS10]

Recall that z↦R(z)z\mapsto R(z) is increasing on [zv,∞)[z_{v},\infty), zc≡(1+δ)2z_{c}\equiv(1+\sqrt{\delta})^{2}, with R(zc+u)=R(zc)−cu+O(u)R(z_{c}+u)=R(z_{c})-c\sqrt{u}+O(u) (for a constant c>0c>0) as u↓0u\downarrow 0, and R(z)=−1/z+O(1/z2)R(z)=-1/z+O(1/z^{2}) as z→∞z\to\infty. We therefore can consider the following asymptotic version of Eq. (G.79):

We next state a general lemma that can be used to check whether a matrix of the form (G.74) is positive semidefinite.

Assume that one of the following two conditions holds:

(1−b)2(1+ξ2)/(r−s)≥(1+δ)/r(1-b)^{2}(1+\xi^{2})/(r-s)\geq(1+\sqrt{\delta})/r and

(1−b)2(1+ξ2)/(r−s)<(1+δ)/r(1-b)^{2}(1+\xi^{2})/(r-s)<(1+\sqrt{\delta})/r and

Then, there exists a constant ε>0{\varepsilon}>0 such that, almost surely, Ω⪰εI{\boldsymbol{\Omega}}\succeq{\varepsilon}{\boldsymbol{I}} for all nn large enough.

Let us first prove that, under the stated conditions, Ω⪰0{\boldsymbol{\Omega}}\succeq{\boldsymbol{0}}. Since rIn−sPu≻0r{\boldsymbol{I}}_{n}-s{\boldsymbol{P}}_{{\boldsymbol{u}}}\succ{\boldsymbol{0}}, we have Ω≻0{\boldsymbol{\Omega}}\succ{\boldsymbol{0}} if and only if

Hence, condition (G.90) is equivalent to a>λmax⁡(MTM)=smax⁡(M)2a>\lambda_{\max}({\boldsymbol{M}}^{{\sf T}}{\boldsymbol{M}})=s_{\max}({\boldsymbol{M}})^{2}, where

Note that M{\boldsymbol{M}} is of the form of Lemma G.7, with

The claim that Ω≻0{\boldsymbol{\Omega}}\succ{\boldsymbol{0}} then follows by using the asymptotic characterization of smax⁡(M)s_{\max}({\boldsymbol{M}}) in Lemma G.7.

We next prove that in fact Ω⪰εI{\boldsymbol{\Omega}}\succeq{\varepsilon}{\boldsymbol{I}}. If the stated conditions hold, there exists ε{\varepsilon} small enough such that they hold also after replacing aa with a′=a−εa^{\prime}=a-{\varepsilon} and rr with r′=r−εr^{\prime}=r-{\varepsilon}. Let us write Ω(a,r){\boldsymbol{\Omega}}(a,r) for the matrix of Eq. (G.87), where we emphasized the dependence on the parameters a,ra,r. We have Ω(a,r)=Ω(a′,r′)+εI{\boldsymbol{\Omega}}(a,r)={\boldsymbol{\Omega}}(a^{\prime},r^{\prime})+{\varepsilon}{\boldsymbol{I}}, and hence the thesis follows since Ω(a′,b′)⪰0{\boldsymbol{\Omega}}(a^{\prime},b^{\prime})\succeq{\boldsymbol{0}}. ∎

In order to apply the last lemma, we will show that, for β<β\mboxspect\beta<\beta_{\mbox{\tiny\rm spect}}, the LDA model of Eq. (1.2) is equivalent for our purposes to a simpler model.

Recalling that P=1k1kT/k{\boldsymbol{P}}={\boldsymbol{1}}_{k}{\boldsymbol{1}}_{k}^{{\sf T}}/k, P⊥=IkP{\boldsymbol{P}}_{\perp}={\boldsymbol{I}}_{k}{\boldsymbol{P}}, and letting v0=H1k/dk{\boldsymbol{v}}_{0}={\boldsymbol{H}}{\boldsymbol{1}}_{k}/\sqrt{dk}, we have

where W⊥=WP⊥{\boldsymbol{W}}_{\perp}={\boldsymbol{W}}{\boldsymbol{P}}_{\perp} and H⊥=HP⊥{\boldsymbol{H}}_{\perp}={\boldsymbol{H}}{\boldsymbol{P}}_{\perp}. Since v0{\boldsymbol{v}}_{0} is distributes as v{\boldsymbol{v}}, and independent of Z~\widetilde{\boldsymbol{Z}}, it is sufficient to prove that the law of Z~R=R1Z~R2\widetilde{\boldsymbol{Z}}_{R}={\boldsymbol{R}}_{1}\widetilde{\boldsymbol{Z}}{\boldsymbol{R}}_{2} is contiguous to the law of Z{\boldsymbol{Z}}.

Note that by the law of large numbers, almost surely (see Eq. (G.23))

For β<β\mboxspect\beta<\beta_{\mbox{\tiny\rm spect}}, we have β⊥<δ\beta_{\perp}<\sqrt{\delta}, and therefore the rank-kk perturbation in Z~\widetilde{\boldsymbol{Z}} does not produce an outlier eigenvalue [BGN12].

Let Xˉ\bar{\boldsymbol{X}} as per Eq. (G.86), with u=1n/n{\boldsymbol{u}}={\boldsymbol{1}}_{n}/\sqrt{n}, v{\boldsymbol{v}} be a vector with i.i.d. entries vi∼N(0,1/d)v_{i}\sim{\sf N}(0,1/d), independent of Z{\boldsymbol{Z}}, and ξ=βδ/k\xi=\sqrt{\beta\delta/k}, and define

If β<β\mboxspect(k,ν,δ)\beta<\beta_{\mbox{\tiny\rm spect}}(k,\nu,\delta), then the law of the eigenvalues of the Hessian Ω{\boldsymbol{\Omega}} defined in Eq. (G.74) is contiguous to the law of the eigenvalues of Ωˉ\bar{\boldsymbol{\Omega}}.

where XR=R1XR2\boldsymbol{X}_{R}={\boldsymbol{R}}_{1}\boldsymbol{X}{\boldsymbol{R}}_{2} is defined as in the statement of Lemma G.9. Applying that lemma, we obtain that the law of RΩRT{\boldsymbol{R}}{\boldsymbol{\Omega}}{\boldsymbol{R}}^{{\sf T}} is contiguous to the one of Ωˉ\bar{\boldsymbol{\Omega}}, and therefore we obtain the desired contiguity for the laws of eigenvalues. ∎

The next lemma establishes that the simplified Hessian Ωˉ\bar{\boldsymbol{\Omega}} is positive semidefinite.

Let Ωˉ\bar{\boldsymbol{\Omega}} be defined as per Eq. (G.98) where Xˉ=ξ uvT+Z\bar{\boldsymbol{X}}=\xi\,{\boldsymbol{u}}{\boldsymbol{v}}^{{\sf T}}+{\boldsymbol{Z}} with u=1n/n{\boldsymbol{u}}={\boldsymbol{1}}_{n}/\sqrt{n}, v{\boldsymbol{v}} be a vector with i.i.d. entries vi∼N(0,1/d)v_{i}\sim{\sf N}(0,1/d), independent of (Zij)i≤n,j≤d∼i.i.d.N(0,1/d)(Z_{ij})_{i\leq n,j\leq d}\sim_{i.i.d.}{\sf N}(0,1/d), and ξ=βδ/k\xi=\sqrt{\beta\delta/k}.

If β<β\mboxspect(k,δ,ν)\beta<\beta_{\mbox{\tiny\rm spect}}(k,\delta,\nu), then there exists ε>0{\varepsilon}>0 such that, almost surely, Ωˉ⪰ε I\bar{\boldsymbol{\Omega}}\succeq{\varepsilon}\,{\boldsymbol{I}} for all nn large enough.

The matrix Xˉ\bar{\boldsymbol{X}} fits the setting of Lemma G.8 with

The claim follows by checking that condition 2 in Lemma G.8 holds. Indeed we have

Hence A<(1+δ/r)A<(1+\sqrt{\delta}/r). Further, setting q=k(kν+1)q=k(k\nu+1), we have

(The last inequality follows since β\mboxspect=q/δ\beta_{\mbox{\tiny\rm spect}}=q/\sqrt{\delta}.) This completes the proof. ∎

The proof of Theorem 5 follows immediately from the above lemmas. Since the law of the eigenvalues of Ω{\boldsymbol{\Omega}} is contiguous to the law of the eigenvalues of Ωˉ\bar{\boldsymbol{\Omega}} (by Lemma G.10), and Ωˉ⪰εI\bar{\boldsymbol{\Omega}}\succeq{\varepsilon}{\boldsymbol{I}} with high probability, we have

Appendix H TAP free energy: Numerical results

AMP turns out to converge poorly near the spectral threshold, i.e. for β≈β\mboxspect\beta\approx\beta_{\mbox{\tiny\rm spect}}. Note that this appears to be an algorithmic problem, rather than a problem related to the free energy approximation. To alleviate this issue, we used damped AMP for our numerical simulations. Damped AMP iterations are as follows

The matrices KHt{\boldsymbol{K}}_{H}^{t} and KWt{\boldsymbol{K}}_{W}^{t} are smoothed sum of Jacobian matrices and are computed as

In these calculations, γ\gamma is the smoothing parameter that throughout our simulations is fixed to γ=0.8\gamma=0.8.

The specific choice of this damping scheme (and –in particular– the construction of matrices KHt+1{\boldsymbol{K}}_{H}^{t+1}, KWt+1{\boldsymbol{K}}_{W}^{t+1}) is dictated by the fact that this specific choice admits a state evolution analysis, analogous to the one holding on the undamped case.

Appendix I Approximate Message Passing: Numerical results for k=3𝑘3k=3

In Figures 16 to 19 we report our numerical results using damped AMP for the case of k=3k=3 topics. These simulations are analogous to the one presented in the main text for k=2k=2, cf. Section 4.5.

Figures 16 and 17 report results on the normalized distance from the uninformative subspace V(H^){\sf V}({\widehat{\boldsymbol{H}}}), V(W^){\sf V}(\widehat{\boldsymbol{W}}). These are consistent with the claim that AMP converges to a fixed point that is significantly distant from this subspace only if β>β\mboxBayes(k,ν,δ)=β\mboxspect(k,ν,δ)\beta>\beta_{\mbox{\tiny\rm Bayes}}(k,\nu,\delta)=\beta_{\mbox{\tiny\rm spect}}(k,\nu,\delta). In Figures 18 and 19 we present our results on the correlation between the AMP estimates H^{\widehat{\boldsymbol{H}}}, W^\widehat{\boldsymbol{W}} and the true factors H{\boldsymbol{H}}, W{\boldsymbol{W}}. We measure this correlation through the same Binder parameter introduced in Section E.2.

Appendix J Uniqueness of the solution to (3.13)

In this appendix, we prove that the solution to (3.13) is unique under the following conjecture

where σ(q)\sigma(q) and γ(q)\gamma(q) are the standard deviation and skewness of ∥w∥22\left\|{\boldsymbol{w}}\right\|_{2}^{2}.

For a Gaussian random vector z∼N(0,(2q)−1Ik){\boldsymbol{z}}\sim\mathcal{N}(0,(2q)^{-1}{\boldsymbol{I}}_{k}) so that p(z)∝exp⁡{−q∥z∥22}p({\boldsymbol{z}})\propto\exp\left\{-q\left\|{\boldsymbol{z}}\right\|_{2}^{2}\right\},

Using the above conjecture, it can be shown that the solution to (3.13) is unique.

Note that using the proof of Lemma (3.2), f(q)f(q) is non-negative, continuous and monotone increasing for q>0q>0. Further,

Since f(0)>0f(0)>0, if we show that f′(q)f^{\prime}(q) is decreasing, then for q>q∗q>q^{*} where q∗q^{*} is the smallest solution to f(q)=qf(q)=q, f′(q)<1f^{\prime}(q)<1. This will imply that f(q)<qf(q)<q for q>q∗q>q^{*} that proves the uniqueness. We have

Hence, f′(q)f^{\prime}(q) is decreasing if and only if

Therefore, it is sufficient to show that for q>0q>0,

Note that if we let X=∥w∥22X=\|{\boldsymbol{w}}\|_{2}^{2} where w{\boldsymbol{w}} is as in Conjecture J.1, we have

using Conjecture J.1. Therefore, f(q)f(q) is concave and (3.13) has a unique solution in q∈(0,∞)q\in(0,\infty).