Rates of Convergence for Sparse Variational Gaussian Process Regression

David R. Burt, Carl E. Rasmussen, Mark van der Wilk

Introduction

Gaussian processes (GPs) [Rasmussen & Williams, 2006] are distributions over functions that are convenient priors in Bayesian models. They can be seen as infinitely wide neural networks [Neal, 1996], and are particularly popular in regression models, as they produce good uncertainty estimates, and have closed-form expressions for the posterior and marginal likelihood. The most well known drawback of GP regression is the computational cost of the exact calculation of these quantities, which scales as \mathcal{O}\mathopen{}\mathclose{{}\left(N^{3}}\right) in time and \mathcal{O}\mathopen{}\mathclose{{}\left(N^{2}}\right) in memory where NN is the number of training examples. Low-rank approximations [Quiñonero Candela & Rasmussen, 2005] choose MM inducing variables which summarise the entire posterior, reducing the cost to \mathcal{O}\mathopen{}\mathclose{{}\left(NM^{2}+M^{3}}\right) time and \mathcal{O}\mathopen{}\mathclose{{}\left(NM+M^{2}}\right) memory.

While the computational cost of adding inducing variables is well understood, results on how many are needed to achieve a good approximation are lacking. As the dataset size increases, we cannot expect to keep the capacity of the approximation constant without the quality deteriorating. Taking into account the rate at which MM must increase with NN to achieve a particular approximation accuracy, as well as the cost of initializing or optimizing the inducing points, determines a more realistic sense of the costs of scaling Gaussian processes.

Approximate GPs are often trained using variational inference [Titsias, 2009], which minimizes the KL divergence from an approximate posterior to the full posterior process [Matthews et al., 2016]. We use this KL divergence as our metric for the approximate posterior’s quality. We show that under intuitive assumptions the number of inducing variables only needs to grow at a sublinear rate for the KL between the approximation and the posterior to go to zero. This shows that very sparse approximations can be used for large datasets, without introducing much bias into hyperparameter selection through evidence lower bound (ELBO) maximisation, and with approximate posteriors that are accurate in terms of their prediction and uncertainty.

The core idea of our proof is to use upper bounds on the KL divergence that depend on the quality of a Nyström approximation to the data covariance matrix. Using existing results, we show this error can be understood in terms of the spectrum of an infinite-dimensional integral operator. In the case of stationary kernels, our main result proves that priors with smoother sample functions, and datasets with more concentrated inputs admit sparser approximations.

We assume that training inputs are drawn i.i.d. from a fixed distribution, and prove bounds of the form

with probability at least 1−δ1-\delta, where P^\hat{P} is the posterior Gaussian process, QQ is a variational approximation, and y\mathbf{y} are the training targets. The function g(M,N)g(M,N) depends on both the kernel and input distribution, and grows linearly in NN and generally decays rapidly in MM. The quality of the initialization determines ϵ\epsilon, which can be made arbitrarily small (e.g. an inverse power of NN) at some additional computational cost. Theorems 1 and 2 give results of this form for a collection of inducing variables defined using spectral information, theorems 3 and 4 hold for inducing points.

Background and notation

where Kn=Kff+σn2I{\bf K}_{n}=\mathbf{K}_{\bf ff}+\sigma_{n}^{2}\mathbf{I}, and \mathopen{}\mathclose{{}\left[\mathbf{K}_{\bf ff}}\right]_{i,j}=k(\mathbf{x}_{i},\mathbf{x}_{j}).

2 Sparse variational Gaussian process regression

While all quantities of interest have analytic expressions, their computation is infeasible for large datasets due to the \mathcal{O}\mathopen{}\mathclose{{}\left(N^{3}}\right) time complexity of the determinant and inverse. Many approaches have been proposed that rely on a low-rank approximation to Kff\mathbf{K}_{\bf ff} [Quiñonero Candela & Rasmussen, 2005; Rahimi & Recht, 2008], which allow the determinant and inverse to be computed in \mathcal{O}\mathopen{}\mathclose{{}\left(NM^{2}}\right), where MM is the rank of the approximating matrix.

We consider the variational framework developed by Titsias , which minimizes the KL divergence from the posterior process to an approximate GP

Titsias suggests jointly maximizing the ELBO (eq. 3) w.r.t. the variational and hyperparameters. This comes at the cost of introducing bias in hyperparameter estimation [Turner & Sahani, 2011], notably the overestimation of the σn2\sigma_{n}^{2} [Bauer et al., 2016]. Adding inducing points reduces the KL gap [Titsias, 2009], and the bias is practically eliminated when enough inducing variables are used.

3 Interdomain inducing features

Lázaro-Gredilla & Figueiras-Vidal showed that one can specify the distribution q(u),q(\mathbf{u}), on integral transformations of f(⋅).f(\cdot). Using these interdomain inducing variables can lead to sparser representations, or computational benefits [Hensman et al., 2018]. Interdomain inducing variables are defined by

When g(x;zm)=δ(x−zm)g(\mathbf{x};\mathbf{z}_{m})=\delta(\mathbf{x}-\mathbf{z}_{m}) the umu_{m} are inducing points. Interdomain features require replacing ku⋅\mathbf{k}_{\mathbf{u}\cdot} and Kuu\mathbf{K}_{\bf uu} in eq. 2 with integral transforms of the kernel. In later sections, we investigate particular interdomain transformations with interesting convergence properties.

4 Upper bounds on the marginal likelihood

Combined with eq. 3, an upper bound on eq. 1 can show when the KL divergence is small, which indicates inference has been successful and hyperparameter estimates are likely to have little bias. Titsias introduced an upper bound that can be computed in \mathcal{O}\mathopen{}\mathclose{{}\left(NM^{2}}\right):

This gives a data-dependent upper bound, that can be computed after seeing the data, and for given inducing inputs.

5 Spectral properties of the covariance matrix

While for small datasets spectral properties of the covariance matrix can be analyzed numerically, we need a different approach for understanding these properties for a typical large dataset. The covariance operator, K,\mathcal{K}, captures the limiting properties of Kff\mathbf{K}_{\bf ff} for large NN. It is defined by

where p(x)p(\mathbf{x}) is a probability density from which the inputs are assumed to be drawn. We assume that K\mathcal{K} is compact, which is the case if k(x,x′)k(\mathbf{x},\mathbf{x}^{\prime}) is bounded. Under this assumption, the spectral theorem tells us that K\mathcal{K} has a discrete spectrum. The (finite) sequence of eigenvalues of 1NKff\frac{1}{N}\mathbf{K}_{\bf ff} converges to the (infinite) sequence of eigenvalues of K\mathcal{K} [Koltchinskii & Giné, 2000]. Mercer’s Theorem [Mercer, 1909] tells us that for continuous kernel functions,

where the \mathopen{}\mathclose{{}\left(\lambda_{m},\phi_{m}}\right)_{i=1}^{\infty} are eigenvalue-eigenfunction pairs of the operator K,\mathcal{K}, with the eigenfunctions orthonormal in L2(X)p.L^{2}(\mathcal{X})_{p}. Additionally, ∑m=1∞λm<∞\sum_{m=1}^{\infty}\lambda_{m}<\infty.

6 Selecting the number of inducing variables

Ideally, the number of inducing variables should be selected to make the KL(Q∣∣P^)KL(Q||\hat{P}) small. Currently, the most common advice is to increase the number of inducing variables MM until the lower bound (eq. 3) no longer improves. This is a necessary, but not a sufficient condition for the ELBO to be tight and the KL to be small. Taking the upper bound (eq. 4) into consideration, we can guarantee a good approximation when difference between the upper and lower bounds converges to zero, as this upper bounds the KL.

Both these procedures rely on bounds computed for a given dataset, and a specific setting of variational parameters. While practically useful, they do not tell us how many inducing variables we should expect to use before observing any data. In this work, we focus on a priori bounds, and asymptotic behavior as N→∞N\to\infty and MM grows as a function of NN. These bounds guarantee how the variational method scales computationally for any dataset satisfying intuitive conditions. This is particularly important for continual learning scenarios, where we incrementally observe more data. With our a priori results we can guarantee that the growth in required computation will not exceed a certain rate.

Bounds on the KL divergence for eigenfunction inducing features

In this section, we prove a priori bounds on the KL divergence using inducing features that rely on spectral information about the covariance matrix or the associated operator. The results in this section form the basis for bounds on the KL divergence for inducing points (section 4).

We first consider a posteriori bounds on the KL divergence that hold for any y,\mathbf{y}, derived by looking at the difference between Lupper\mathcal{L}_{\text{upper}} and Llower.\mathcal{L}_{\text{lower}}. We will use these bounds in later sections to analyze asymptotic convergence properties.

Let K~ff=Kff−Qff,\widetilde{\mathbf{K}}_{\bf ff}=\mathbf{K}_{\bf ff}-\mathbf{Q}_{\bf ff}, t=Tr⁡(K~ff)t=\operatorname{Tr}(\widetilde{\mathbf{K}}_{\bf ff}) and λ~max\widetilde{\lambda}_{max} denote the largest eigenvalue of K~ff\widetilde{\mathbf{K}}_{\bf ff}. Then,

The proof bounds the difference between a refinement of Lupper\mathcal{L}_{\text{upper}} also proven by Titsias and Llower\mathcal{L}_{\text{lower}} through an algebraic manipulation and is given in appendix A. The second inequality is a consequence of t≥λ~max.t\geq\widetilde{\lambda}_{max}. We typically expect ∥y∥22=O(N)\|\mathbf{y}\|_{2}^{2}=\mathcal{O}(N), which is the case when the variance of the observed yys is bounded, so if t≪1/Nt\ll 1/N the KL divergence will be small.

2 A priori bounds: averaging over 𝐲𝐲\mathbf{y}

Lemma 1 is typically overly pessimistic, as it assumes y\mathbf{y} can be parallel to the largest eigenvector of K~ff.\widetilde{\mathbf{K}}_{\bf ff}. In this section, we consider a bound that holds a priori over the training outputs, when they are drawn from the model. This allows us to bound the KL divergence for a ‘typical’ dataset.

For any set of {xi}i=1N\{\mathbf{x}_{i}\}_{i=1}^{N}, if the outputs {yi}i=1N\{y_{i}\}_{i=1}^{N} are generated according to our generative model, then

The lower bound tells us that even if the training data is contained in an interval of fixed length, we need to use more inducing points for problems with large NN if we want to ensure the sparse approximation has converged. This is shown in Figure 1 for data uniformly sampled on the interval $$ with 15 inducing points.

The second term on the right is a KL divergence between centered Gaussian distributions. The lower bound follows from Jensen’s inequality. The proof of the upper bound (appendix B) bounds this KL divergence above by t/(2σn2).t/(2\sigma_{n}^{2}). ∎

3 Minimizing the upper bound: an idealized case

We now consider the set of MM interdomain inducing features that minimize the upper bounds in Lemmas 1 and 2. Taking into account the lower bound in Lemma 2, they must be within a factor of two of the optimal features defined without reference to training outputs under the assumption of Lemma 2. Consider

where wi(m)w_{i}^{(m)} is the ithi^{th} entry in the mthm^{th} eigenvector of Kff.\mathbf{K}_{\bf ff}. That is, umu_{m} is a linear combination of inducing points placed at each data point, with weights coming from the entries of the mthm^{th} eigenvector of Kff.\mathbf{K}_{\bf ff}. We show in appendix C that

Inference with these features can be seen as the variational equivalent of the optimal parametric projection of the model derived by Ferrari-Trecate et al. .

4 Eigenfunction inducing features

We now modify the construction given in section 3.3 to no longer depend on Kff\mathbf{K}_{\bf ff} explicitly (which depends on the specific training inputs) and instead depend on assumptions about the training data. This construction is the a priori counterpart of the eigenvector inducing features, as it is defined prior to observing a specific set of training inputs.

Consider the limit as we have observed a large amount of data, so that 1NKff→K.\frac{1}{N}\mathbf{K}_{\bf ff}\to\mathcal{K}. This leads us to replace the eigenvalues, {λm(Kff)}m=1M,\{\lambda_{m}(\mathbf{K}_{\bf ff})\}_{m=1}^{M}, with the operator eigenvalues, {λm}m=1M,\{\lambda_{m}\}_{m=1}^{M}, and the eigenvectors, {w(m)}m=1M,\{\mathbf{w^{(m)}}\}_{m=1}^{M}, with the eigenfunctions, {ϕm}m=1M,\{\phi_{m}\}_{m=1}^{M}, yielding

Note that p(x)p(\mathbf{x}) influences umu_{m}. In appendix C, we show

These features can be seen as the variational equivalent of methods utilizing truncated priors proposed in Zhu et al. , which are the optimal linear MM dimensional parametric GP approximation defined a priori, in terms of minimizing expected mean square error.

In the case of the SE kernel and Gaussian inputs, closed form expressions for eigenfunctions and values are known [Zhu et al., 1997]. For Matérn kernels with inputs uniform on [a,b][a,b], expressions for the eigenfunctions and eigenvalues needed in order to compute Kuf\mathbf{K}_{\bf uf} and Kuu\mathbf{K}_{\bf uu} can be found in Youla . However, the formulas involve solving systems of transcendental equations limiting the practical applicability of these features for Matérn kernels.

5 A priori bounds on the KL divergence for eigenfunction features

Having developed the necessary preliminary results, we now prove the first a priori bounds on the KL divergence. We start with eigenfunction features, which can be implemented practically in certain instances discussed above.

Suppose NN training inputs are drawn i.i.d. according to input density p(x).p(\mathbf{x}). For inference with MM eigenfunction inducing variables defined with respect to the prior kernel and p(x),p(\mathbf{x}), with probability at least 1−δ,1-\delta,

where we have defined C=N∑m=M+1∞λm,C=N\sum_{m=M+1}^{\infty}\lambda_{m}, and the λm\lambda_{m} are the eigenvalues of the integral operator K\mathcal{K} associated to the prior kernel and p(x).p(\mathbf{x}).

With the assumptions and notation of Theorem 1 if y\mathbf{y} is distributed according to a sample from the prior generative model, with probability at least 1−δ,1-\delta,

We first prove a bound on tt that holds in expectation over input data matrices of size NN with entries drawn i.i.d. from p(x).p(\mathbf{x}). A direct computation of Qff\mathbf{Q}_{\bf ff} shows that \mathopen{}\mathclose{{}\left[\mathbf{Q}_{\bf ff}}\right]_{i,j}=\sum_{m=1}^{M}\lambda_{m}\phi_{m}(\mathbf{x}_{i})\phi_{m}(\mathbf{x}_{j}). Using the Mercer expansion of the kernel matrix and subtracting,

The second equality follows from the eigenfunctions having norm 1. Applying Markov’s inequality and Lemmas 1 and 2 yields Theorems 1 and 2 respectively. ∎

6 Squared exponential kernel and Gaussian inputs

Using this bound with Theorems 1 and 2, we see that by choosing M=O(log⁡N),M=\mathcal{O}(\log N), under the assumptions of either theorem, we can obtain a bound on the KL divergence that tends to as NN tends to infinity.

7 Matérn kernels and uniform measure

For the Matérn k+1/2k+1/2 kernel in one dimension, λm≍m−2k−2\lambda_{m}\asymp m^{-2k-2} [Ritter et al., 1995; Seeger et al., 2008], so ∑m=M+1∞λm=O(M−2k−1).\sum_{m=M+1}^{\infty}\lambda_{m}=\mathcal{O}(M^{-2k-1}). In order for the bound in Theorem 2 to converge to 0,0, we need lim⁡N→∞NM2k+1→0.\lim\limits_{N\to\infty}\frac{N}{M^{2k+1}}\to 0. This holds if M=NαM=N^{\alpha} for α>12k+1.\alpha>\frac{1}{2k+1}. For k>0,k>0, this bound indicates the number of inducing features can grow sublinearly with the amount of data.

Bounds for inducing points

We have shown that using spectral knowledge of either Kff\mathbf{K}_{\bf ff} or K\mathcal{K} we obtain bounds on the KL divergence indicating that the number of inducing features can be much smaller than the number of data points. While mathematically convenient, the practical applicability of the interdomain features used is limited by computational considerations in the case of the eigenvector features and by the lack of analytic expressions for Kuf\mathbf{K}_{\bf uf} in most cases for the eigenfunction features, as well not knowing the true input density, p(x)p(\mathbf{x}).

In contrast, inducing points can be efficiently applied to any kernel. In this section, we show that with a good initialization based on the empirical input data distribution, inducing points lead to bounds that are only slightly weaker than the interdomain approaches suggested so far.

[Belabbas & Wolfe, 2009] Given a symmetric positive semidefinite matrix, Kff,\mathbf{K}_{\bf ff}, if MM columns are selected to form a Nyström approximation such that the probability of selecting a subset of columns, Z,Z, is proportional to the determinant of the principal submatrix formed by these columns and the matching rows, then,

This means that on average well-initialized inducing points lead to bounds within a factor of M+1M+1 of eigenvector inducing features.

The selection scheme described introduces negative correlations between inducing points locations, leading the zi\mathbf{z}_{i} to be well-dispersed amongst the training data, as shown in fig. 2. The strength of these negative correlations is determined by the particular kernel.

The proposed initialization scheme is equivalent to sampling ZZ according to a discrete k-Determinantal Point Process (k-DPP), defined over Kff\mathbf{K}_{\bf ff}. Belabbas & Wolfe suggested that sampling from this distribution, which has support over (NM)\binom{N}{M} subsets of columns, may be computationally infeasible. Kulesza & Taskar provided an exact algorithm for sampling from k-DPPs given an eigendecomposition of the kernel matrix. In our setting, we require our initialisation scheme to have similar computational cost to computing the sparse GP bounds, which prohibits us from performing eigendecomposition. Instead, we rely on cheaper “ϵ\epsilon close” sampling methods. We therefore provide the following corollary of lemma 3, proven in appendix D.

Suppose the inducing points, Z,Z, are sampled from an ϵ\epsilon k-DPP, ν,\nu, i.e a distribution over subsets of X\mathbf{X} of size MM satisfying, d(μ,ν)TV≤ϵd(\mu,\nu)_{TV}\leq\epsilon where d(⋅,⋅)TVd(\cdot,\cdot)_{TV} denotes total variation distance and μ\mu is a k-DPP on Kff\mathbf{K}_{\bf ff}. Suppose the k(x,x)<vk(\mathbf{x},\mathbf{x})<v for all x∈X.\mathbf{x}\in\mathcal{X}. Then

We show analogues of theorems 1 and 2 for inducing points.

Suppose NN training inputs are drawn i.i.d according to input density p(x),p(\mathbf{x}), and k(x,x)<vk(\mathbf{x},\mathbf{x})<v for all x∈X.\mathbf{x}\in\mathcal{X}. Sample MM inducing points from the training data with the probability assigned to any set of size MM equal to the probability assigned to the corresponding subset by an ϵ\epsilon k-DPP with k=Mk=M. With probability at least 1−δ,1-\delta,

where C=N∑m=M+1∞λm,C=N\sum_{m=M+1}^{\infty}\lambda_{m}, and λm\lambda_{m} are the eigenvalues of the integral operator K\mathcal{K} associated to kernel, k,k, and p(x).p(\mathbf{x}).

With the assumptions and notation of theorem 3 and if y\mathbf{y} is distributed according to a sample from the prior generative model, with probability at least 1−δ,1-\delta,

We prove theorem 4. Theorem 3 follows the same argument, replacing the expectation over y\mathbf{y} with the bound given by lemma 1.

The first two inequalities use lemma 2 and corollary 1. The third follows from noting that the sum inside the expectation is the error in trace norm of the optimal rank MM approximation to the covariance matrix for any given X\mathbf{X}, and is bounded above by the error from the rank MM approximation due to eigenfunction features. We showed that this error is in expectation equal to N∑m=M+1∞λmN\sum_{m=M+1}^{\infty}\lambda_{m} so this must be an upper bound on the expectation in the second to last line. Shawe-Taylor et al. [2005, Proposition 4] gives a different proof of the final inequality.

We apply Markov’s inequality, yielding for any δ∈(0,1)\delta\in(0,1) with probability at least 1−δ,1-\delta,

Figure 3 compares the actual KL divergence, the a posteriori bound derived by Lupper−Llower,\mathcal{L}_{\text{upper}}-\mathcal{L}_{\text{lower}}, and the bounds proven in theorems 3 and 4 on a dataset with normally distributed training inputs and y\mathbf{y} drawn from the generative model.

Consequences of theorem 3 and theorem 4

We now investigate implications of our main results for sparse GP regression. Our first two corollaries consider Gaussian inputs and the squared exponential (SE) kernel, and show that in DD dimensions, choosing M=O(log⁡D(N))M=\mathcal{O}(\log^{D}(N)) is sufficient in order for the KL divergence to converge with high probability. We then briefly summarize convergence rates for other stationary kernels. Finally we point out consequences of our definition of convergence for the quality of the pointwise posterior mean and uncertainty.

Using the explicit formula for the eigenvalues given in section 3.6, we arrive at the following corollary:

Suppose that ∥y∥22≤RN.\|\mathbf{y}\|_{2}^{2}\leq RN. Fix γ>0,\gamma>0, and take ϵ=δσn2vNγ+2.\epsilon=\frac{\delta\sigma_{n}^{2}}{vN^{\gamma+2}}. Assume the input data is normally distributed and regression in performed with a SE kernel. Under the assumptions of theorem 3, with probability 1−δ,1-\delta,

when inference is performed with M=(3+γ)log⁡(N)+log⁡Dlog⁡(B−1),M=\frac{(3+\gamma)\log(N)+\log D}{\log(B^{-1})}, where D=v2a2Aσn2δ(1−B).D=\frac{v\sqrt{2a}}{2\sqrt{A}\sigma_{n}^{2}\delta(1-B)}.

The proof is given in appendix E. If the lengthscale is much shorter than the standard deviation of the data then BB will be near 1, implying that MM will need to be large in order for the bound to converge.

The assumption ∥y∥22≤RN\|\mathbf{y}\|_{2}^{2}\leq RN for some RR is very weak. For example, if y\mathbf{y} is a realization of an integrable function with constant noise,

The first sum is asymptotically N∫f(x)p(x)dx,N\int f(\mathbf{x})p(\mathbf{x})dx, and the second is asymptotically Nσn2.N\sigma_{n}^{2}.

The consequence of corollary 2 is shown in fig. 4, in which we gradually increase N,N, choosing M=Clog⁡(N)+C0,M=C\log(N)+C_{0}, and see the KL divergence converges as an inverse power of N.N. The training outputs are generated from a sample from the prior generative model. Note that as theorem 4 assumes y\mathbf{y} is sampled from the prior and is not derived using the upper bound (eq. 4); it may be tighter than the a posteriori bound in cases when this upper bound is not tight.

For the SE kernel and Gaussian inputs, the rate that we prove MM must increase for inducing points and eigenfunction features differs by a constant factor. For the Matérn k+1/2k+1/2 kernel in one dimension, we need to choose M=NαM=N^{\alpha} with α>1/(2k)\alpha>1/(2k) instead of α>1/(2k+1).\alpha>1/(2k+1). This difference is particularly stark in the case of the Matérn 3/23/2 kernel, for which our bounds tell us that inference with inducing points requires α>1/2\alpha>1/2 as opposed to α>1/3\alpha>1/3 for the eigenfunction features. Whether this is an artifact of the proof, the initialization scheme, or an inherent limitation for inducing points is an interesting area for future work.

2 Multidimensional data, effect of input density and other kernels

The proof uses ideas from Seeger et al. and is given in appendix E. While for the SE kernel and Gaussian input density MM can grow polylogarithmically in N,N, and the KL divergence still converges, this is not the case for regression with other kernels or input distribution.

Closed form expressions for the eigenvalues of operators associated to many kernels and input distributions are not known. For stationary kernels and compactly supported input distributions, the asymptotic rate of decay of the eigenvalues of K\mathcal{K} is well-understood [Widom, 1963, 1964; Ritter et al., 1995]. The intuitive summary of these results is that smooth kernels, with concentrated input distributions have rapidly decaying eigenvalues. In contrast, kernels such as the Matérn-1/2 that define processes that are not smooth have slowly decaying eigenvalues. For Lebesgue measure on [a,b][a,b] the Sacks-Ylivasker conditions of order rr (appendix F), which can be roughly thought of as meaning that realizations of the process are rr times differentiable with probability 1 [Ritter et al., 1995], implies an eigendecay of λm≍m−2r−2.\lambda_{m}\asymp m^{-2r-2}. Table 1 summarizes the spectral decay of several stationary kernels, as well as the implications for the number of inducing points needed for inference to provably converge with our bounds.

3 Computational complexity

We now have all the components necessary for analyzing the overall computational complexity of finding an arbitrarily good GP approximation. To understand the full computational complexity, we must consider the cost of initializing the inducing points using an exact or approximate k-DPP, as well as the O(NM2)\mathcal{O}(NM^{2}) time complexity of variational inference. Recent work of Dereziǹski et al. indicate that an exact algorithm for sampling a k-DPP can be implemented in O(Nlog⁡(N)poly(M)).\mathcal{O}(N\log(N)\text{poly}(M)). We base our method on Anari et al. , who show that an ϵ\epsilon k-DPP can be sampled via MCMC methods in O(NM4log⁡(N) ⁣+ ⁣NM3log⁡(1ϵ))\mathcal{O}(NM^{4}\log(N)\!+\!NM^{3}\log(\frac{1}{\epsilon})) time with memory O(N ⁣+ ⁣M2)\mathcal{O}(N\!+\!M^{2}) (see appendix D).Open source implementations of approximate k-DPPs are available (e.g. [Gautier et al., 2018]). We can choose ϵ\epsilon to be any inverse power of NN which only adds a constant factor to the complexity. For the SE kernel, taking M ⁣= ⁣O(log⁡D ⁣N)M\!=\!\mathcal{O}(\log^{D}\!N) inducing points leads to a complexity of O(Nlog⁡4D+1N),\mathcal{O}(N\log^{4D+1}N), a large computational saving compared to the O(N3)\mathcal{O}(N^{3}) cost of exact inference. For the Matérn k ⁣+ ⁣12k\!+\!\frac{1}{2} kernel in one-dimension and the average case analysis of theorem 4 we need to take M ⁣= ⁣O(N1/(2k)+ϵ′)M\!=\!\mathcal{O}(N^{1/(2k)+\epsilon^{\prime}}) implying a computational complexity of O(N1+2/k+4ϵ′log⁡(N))\mathcal{O}(N^{1+2/k+4\epsilon^{\prime}}\log(N)) which is an improvement over the cost of full inference for k ⁣> ⁣1.k\!>\!1. Improvements in methods for sampling exact or approximate k-DPPs (e.g. recent bounds on mixing time [Hermon & Salez, 2019]) or bounds on other selection schemes for Nyström approximations directly translate to improved bounds on the computational cost of convergent sparse Gaussian process approximations through this framework.

4 Pointwise approximate posterior

In many applications, pointwise estimates of the posterior mean and variance are of interest. It is therefore desirable that the approximate variational posterior gives similar estimates of these quantities as the true posterior. Huggins et al. derived an approximation method for sparse GP inference with provable guarantees about pointwise mean and variance estimates of the posterior process and showed that approximations with moderate KL divergences can still have large deviations in mean and variance estimates. However, if the KL divergence converges to zero, estimates of mean and variance converge to the posterior values. By the chain rule of KL divergence [Matthews et al., 2016],

Therefore, bounds on the mean and variance of a one-dimensional Gaussian with a small KL divergence imply pointwise guarantees about posterior inference when the KL divergence between processes is small.

The proof is in appendix B. If ϵ→0,\epsilon\to 0, proposition 1 implies μ1→μ2\mu_{1}\to\mu_{2} and σ1→σ2.\sigma_{1}\to\sigma_{2}. Using this and theorems 3 and 4, the posterior mean and variance converge pointwise to those of the full model using M≪NM\ll N inducing features.

Related work

Statistical guarantees for convergence of parametric GP approximations [Zhu et al., 1997; Ferrari-Trecate et al., 1999], lead to similar conclusions about the choice of approximating rank. Ferrari-Trecate et al. showed that given NN data points, using a rank MM truncated SVD of the prior covariance matrix, such that λM≪σn2/N\lambda_{M}\ll\sigma_{n}^{2}/N results in almost no change in the model, in terms of expected mean squared error. Our results can be considered the equivalent for variational inference, showing that theoretical guarantees can be established for non-parametric approximate inference.

Guarantees on the quality Nyström approximations have been used to bound the error of approximate kernel methods, notably for kernel ridge regression [Alaoui & Mahoney, 2015; Li et al., 2016]. The specific method for selecting columns in the Nyström approximation plays a large role in these analyses. Li et al. use an approximate k-DPP, nearly identical to the initialization we analyze; Alaoui & Mahoney sample columns according to ridge leverage scores. The substantial literature on bounds for Nyström approximations [e.g. Gittens & Mahoney, 2013] motivates considering other initialization schemes for inducing points in the context of Gaussian process regression.

Conclusion

We proved bounds on the KL divergence between the variational approximation of sparse GP regression to the posterior, that depend only on the decay of the eigenvalues of the covariance operator. These bounds prove the intuitive result that smooth kernels with training data concentrated in a small region admit high quality, very sparse approximations. These bounds prove that truly sparse non-parametric inference, with M≪N,M\ll N, can provide reliable estimates of the marginal likelihood and pointwise posterior.

Extensions to models with non-conjugate likelihoods, especially within the framework of Hensman et al. , pose a promising direction for future research.

Acknowledgements

We would like to thank James Hensman for providing an excellent research environment, and the reviewers for their helpful feedback and suggestions. We would also particularly like to thank Guillaume Gautier, for pointing out an error in the exact k-DPP sampling algorithm cited in an earlier version of this work, and for guiding us through recent work on sampling k-DPPs.

References

Appendix A Proof Of Lemma 1

We can rewrite the second term (ignoring the factor of one half) in Appendix A as,

The last inequality comes from noting that the fraction in the sum attains a maximum when γi\gamma_{i} is minimized. Since σn2\sigma_{n}^{2} is a lower bound on the smallest eigenvalue of Qn,{\bf Q}_{n}, we have,

Appendix B KL Divergence Gaussian Distributions

We make use of the formula for KL divergences between multivariate Gaussian distributions in our proof of lemma 2, and the univariate case in proposition 1.

Recall the KL divergence from p_{1}\sim\mathcal{N}\mathopen{}\mathclose{{}\left(\mathbf{m_{1}},\mathbf{S_{1}}}\right) to p_{2}\sim\mathcal{N}\mathopen{}\mathclose{{}\left(\mathbf{m_{2}},\mathbf{S_{2}}}\right) both of dimension NN is given by

The inequality is a special case of Jensen’s inequality.

B.2 Proof of Upper Bound in lemma 2

In order to complete the proof, we need to show that the second term on the right hand side is bounded above by t/(2σn2)t/(2\sigma_{n}^{2}). Using Equation 19:

The inequality follows from noting the log determinant term is negative, as Kn≻Qn{\bf K}_{n}\succ{\bf Q}_{n} (i.e. Kn−Qn{\bf K}_{n}-{\bf Q}_{n} is positive definite). Simplifying the last term,

The first inequality uses that for positive semi-definite symmetric matrices Tr⁡(AB)≤Tr⁡(A)λ1(B)\operatorname{Tr}(AB)\leq\operatorname{Tr}(A)\lambda_{1}(B) which is a special case of Hölder’s inequality for Schatten norms. The final line uses that the largest eigenvalue of Qn−1{\bf Q}_{n}^{-1} is bounded above by σn−2.\sigma_{n}^{-2}. Using this in Equation 20 finishes the proof.

B.3 Proof of Proposition 1

where we have defined x=σ12σ22.x=\frac{\sigma^{2}_{1}}{\sigma^{2}_{2}}.

Applying the lower bound x−log⁡(x)−1≥(x−1)2/2−(x−1)3/3,x-\log(x)-1\geq(x-1)^{2}/2-(x-1)^{3}/3,

A bound on ∣x−1∣\lvert x-1\rvert that holds for all ϵ\epsilon can then be found with the cubic formula. Under the assumption that ϵ<15,\epsilon<\frac{1}{5}, we have x−log⁡(x)<1.2x-\log(x)<1.2 which implies x∈[0.493,1.77].x\in[0.493,1.77]. For xx in this range, we have

Using our bound on the ratio of the variances completes the proof of proposition 1.

Appendix C Covariances for Interdomain Features

We compute the covariances for eigenvector and eigenfunction inducing features.

Recall we have defined eigenvector inducing features by,

This is the ithi^{th} entry of the matrix vector product Kffw(m)=λm(Kff)wi(m).\mathbf{K}_{\bf ff}\mathbf{w}^{(m)}=\lambda_{m}(\mathbf{K}_{\bf ff})\mathbf{w}^{(m)}_{i}.

C.2 Eigenfunction inducing features

Recall we have defined eigenfunction inducing features by,

The expectation and integration may be interchanged by Fubini’s theorem, as both integrals converge absolutely since p(x)p(\mathbf{x}) is a probability density, the ϕm(x)\phi_{m}(\mathbf{x}) are in L2(X)p⊂L1(X)pL^{2}(\mathcal{X})_{p}\subset L^{1}(\mathcal{X})_{p} and kk is bounded.

We may then apply the eigenfunction property to the inner integral and orthonormality of eigenfunctions to the result yielding,

Appendix D Discrete k-DPPs

The first inequality follows from lemma 3. The second uses the triangle inequality replace t(Z)t(Z) with a bound on its maximum. The final line uses one of the definitions of total variation distance for discrete random variables.

D.2 Sampling Approximate k-DPPs

Belabbas & Wolfe proposed using the Metropolis method for approximate sampling from a k-DPP. Several recent works have shown that a natural Metropolis algorithm on k-DPPs mixes quickly. In particular, Anari et al. considers the following algorithm:

Let A denote algorithm 1. Let νR\nu^{R} denote the distribution induced by RR steps of A. Let R(ϵ)R(\epsilon) denote the minimum RR such that ∥μ−νR∥TV<ϵ,\|\mu-\nu^{R}\|_{TV}<\epsilon, where μ\mu is a k-DPP on some kernel matrix Kff.\mathbf{K}_{\bf ff}. Then

Taking ϵ\epsilon to be any fixed inverse power of N,N, (i.e. ϵ=N−γ,\epsilon=N^{-\gamma}, will make the second term O(NMlog⁡(N)),\mathcal{O}(NM\log(N)), while by taking γ\gamma large (e.g. greater than 2), we can make 2Nvϵ2Nv\epsilon small.

The computation of LTL_{T} proceeds in two steps: first we compute LS∖i\mathbf{L}_{S\setminus i} using LS.\mathbf{L}_{S}.

We now need to extend a Cholesky factorization from S∖iS\setminus i to T,T, which involves adding a row.

Appendix E Proof of Corollaries

From theorem 3, with probability 1−δ1-\delta and this choice of ϵ\epsilon

Take M=(3+γ)log⁡(N)+log⁡Dlog⁡(B−1).M=\frac{(3+\gamma)\log(N)+\log D}{\log(B^{-1})}. If M≥NM\geq N the KL-divergence is zero and we are done. Otherwise, C(M+1)<N2∑i=M+1∞λi.C(M+1)<N^{2}\sum_{i=M+1}^{\infty}\lambda_{i}. By the geometric series formula,

implying C(M+1)2δσn2<N−1−γ.\frac{C(M+1)}{2\delta\sigma_{n}^{2}}<N^{-1-\gamma}. Using this in section E.1 completes the proof.

E.2 Corollary 3

It is sufficient to consider the case of isotropic kernels and input distributions.For the general case, the eigenvalues can be bounded above by constant times the eigenvalues of an operator with an isotropic kernel with all lengthscales equal to the shortest kernel lengthscale and the input density standard deviation set to the largest standard deviation of any one-dimensional marginal of p(x).p(\mathbf{x}). From [Seeger et al., 2008] in the isotropic case (i.e. Bi=Bj=:BB_{i}=B_{j}=:B for all i,j≤D),i,j\leq D),

In the second line, we use that B<1,B<1, so Bs1/DB^{s^{1/D}} obtains its minimum on the interval s∈[s′,s′+1]s\in[s^{\prime},s^{\prime}+1] at the right endpoint (i.e. monotonicity). We now define α=−log⁡(B).\alpha=-\log(B). So,

In the second line we made the substitution t=αs1/D,t=\alpha s^{1/D}, so ds=α−DDtD−1.ds=\alpha^{-D}Dt^{D-1}. We now recognize,

as an incomplete gamma function, Γ(D,αM1/D).\Gamma(D,\alpha M^{1/D}). From Gradshteyn & Ryzhik [2014, 8.352],

As MM grows as a function of NN and DD is fixed, for NN large D≤αM1/D.D\leq\alpha M^{1/D}. This implies that that the largest term in the sum on the right hand side is the final term, so

Choose M=\frac{1}{\alpha}\log\mathopen{}\mathclose{{}\left(N^{\gamma^{\prime}}\mathopen{}\mathclose{{}\left(\frac{2a}{A}}\right)^{D/2}D^{2}\alpha^{-1}}\right)^{D}. Then

For any fixed D,D, for this choice of MM for any ε>0\varepsilon>0 for NN large,

By choosing γ′>3+ϵ′,\gamma^{\prime}>3+\epsilon^{\prime}, for some fixed ϵ′>0\epsilon^{\prime}>0 the proof is complete, using a similar argument as the one used in the proof of the previous corollary.

Note that using the bound proven in Theorem 2 (the tightest of our bounds) the exponential scaling in dimension is unavoidable. If both kk and p(x)p(\mathbf{x}) are isotropic, then the eigenvalue (2aA)DBm(\frac{2a}{A})^{D}B^{m} appears (m+D−1D−1)\binom{m+D-1}{D-1} times. This follows from noting that this is the number of ways to write mm as a sum of DD non-negative integers. Using an identity and standard lower bound for binomial coefficients \sum_{i=1}^{K}\binom{m+D-1}{D-1}=\binom{K+D}{D}\geq\mathopen{}\mathclose{{}\left(\frac{K+D}{D}}\right)^{D}>C(D)K^{D}. for some constant depending on D, C(D).C(D). Using Theorem 2 we need to choose MM such that λM=O(1/N).\lambda_{M}=\mathcal{O}(1/N). This means choosing K≫log⁡(N)K\gg\log(N) in the sum above, leading to at least αlog⁡D(N)\alpha\log^{D}(N) features being needed for some constant α\alpha. The constant in this lower bound decays rapidly with D,D, while the constant in the upper bound does not. Better understanding this gap is important for understanding the performance of sparse Gaussian process approximations in high dimensions.

If the data actually lies on a lower dimensional manifold, we conjecture the scaling depends mainly on the dimensionality of the manifold. In particular, if the manifold is linear and axis-aligned, then the kernel matrix only depends on distances along the manifold (not in the space it is embedded in) so the eigenvalues will not be effected by the higher dimensional embedding. We conjecture that similar properties are exhibited when the data manifold is nonlinear.

Appendix F Smoothness and Sacks-Ylivasker Conditions

In many instances the precise eigenvalues of the covariance operator are not available, but the asymptotic properties are well understood. A notable example is when the data is distributed uniformly on the unit interval. If the kernel satisfies the Sacks-Ylivasker conditions of order rr:

k(x,x′)k(x,x^{\prime}) is rr-times continuously differentiable on 2^{2} Moreover, k(x,x′)k(x,x^{\prime}) has continuous partial derivatives up to order r+2r+2 times on (0,1)2∩(x>x′)(0,1)^{2}\cap(x>x^{\prime}) and (0,1)2∩(x<x′).(0,1)^{2}\cap(x<x^{\prime}). These partial derivatives can be continuously extended to the closure of both regions.

Let LL denote k(r,r)(x,x′)k^{(r,r)}(x,x^{\prime}), L+L_{+} denote the restriction of LL to the upper triangle and L−L_{-} the restriction to the lower triangle, then L+(1,0)<L−(1,0)L_{+}^{(1,0)}<L_{-}^{(1,0)} on the diagonal x=x′.x=x^{\prime}.

L+(2,0)(s,⋅)L^{(2,0)}_{+}(s,\cdot) is an element of the RKHS associated to LL and has norm bounded independent of s.s.

Notably, Matérn half integer kernels of order r+1/2r+1/2 meet the S-Y condition of order r.r. See Ritter et al. for a more detailed explanation of these conditions and extensions to the multivariate case.