Kernel quadrature with DPPs
Ayoub Belhadji, Rémi Bardenet, Pierre Chainais
Introduction
Numerical integration is an important tool for Bayesian methods and model-based machine learning . Formally, numerical integration consists in approximating
In this paper, we propose a new quadrature rule for functions in a given RKHS. Our nearest scientific neighbour is , but instead of sampling nodes independently, we leverage dependence and use a repulsive distribution called a projection determinantal point process (DPP), while the weights are obtained through a simple quadratic optimization problem. DPPs were originally introduced by as probabilistic models for beams of fermions in quantum optics. Since then, DPPs have been thoroughly studied in random matrix theory , and have more recently been adopted in machine learning and Monte Carlo methods .
Related work on kernel-based quadrature
When the integrand belongs to the RKHS of kernel , the quadrature error reads
Bayesian Quadrature initially considered a fixed set of nodes and put a Gaussian process prior on the integrand . Then, the weights were chosen to minimize the posterior variance of the integral of . If the kernel of the Gaussian process is chosen to be , this amounts to minimizing the RHS of (2). The case of the Gaussian reference measure was later investigated in detail , while parametric integrands were considered in . Rates of convergence were provided in for specific kernels on compact spaces, under a fill-in condition that encapsulates that the nodes must progressively fill up the (compact) space.
2 Leverage-score quadrature
In , the author proposed to sample the nodes i.i.d. from some proposal distribution , and then pick weights in (1) that solve the optimization problem
for some regularization parameter . Proposition 1 gives a bound on the resulting approximation error of the mean element for a specific choice of proposal pdf, namely the leverage scores
Let , and . Assume that , then
Projection determinantal point processes
not to be mistaken for the RKHS kernel . One can show [25, Lemma 21] that
The probability of co-occurrence is thus always smaller than that of a Poisson process with the same intensity. In this sense, a projection DPP with symmetric kernel is a repulsive distribution, and encodes its repulsiveness.
One advantage of DPPs is that they can be sampled exactly. Because of the orthonormality of , one can write the chain rule for (9); see . Sampling each conditional in turn, using e.g. rejection sampling , then yields an exact sampling algorithm. Rejection sampling aside, the cost of this algorithm is cubic in without further assumptions on the kernel. Simplifying assumptions can take many forms. In particular, when , and is a Gaussian, gamma , or beta pdf, and are the orthonormal polynomials with respect to , the corresponding DPP can be sampled by tridiagonalizing a matrix with independent entries, which takes the cost to and bypasses the need for rejection sampling. For further information on DPPs see .
Kernel quadrature with projection DPPs
where we recall that are the normalized eigenfunctions of the integral operator . The weights are obtained by solving the optimization problem
is the reconstruction operatorThe reconstruction operator depends on the nodes , although our notation doesn’t reflect it for simplicity.. In Section 4.1 we prove that (11) almost surely has a unique solution and state our main result, an upper bound on the expected approximation error under the proposed Projection DPP. Section 4.2 gives a sketch of the proof of this bound.
Assuming that nodes are known, we first need to solve the optimization problem (11) that relates to problem (5) without regularization (). Let , then
where . The right-hand side of (13) is quadratic in , so that the optimization problem (11) admits a unique solution if and only if is invertible. In this case, the solution is given by . A sufficient condition for the invertibility of is given in the following proposition.
Assume that the matrix is invertible, then is invertible.
The proof of Proposition 2 is given in Appendix D.1. Since the pdf (9) of the projection DPP with kernel (10) is proportional to , the following corollary immediately follows.
We now give our main result that uses nodes drawn from a well-chosen projection DPP.
This compares favourably with herding, for instance, which comes with a rate in for the quadrature based on herding with uniform weights .
2 Bounding the approximation error under the DPP
In this section, we give the skeleton of the proof of Theorem 1, referring to the appendices for technical details. The proof is in two steps. First, we give an upper bound for the approximation error that involves the maximal principal angle between the functional subspaces of
DPPs allow closed form expressions for the expectation of trigonometric functions of such angles; see and Appendix E.1 for the geometric intuition behind the proof. The second step thus consists in developing the expectation of the bound under the DPP.
Let be such that . By Proposition 2, is non singular and . The optimal approximation error writes
In other words, (16) equates the approximation error to , where is the orthogonal projection onto . Now we have the following lemma.
Similarly, we can define the principal angles for between the subspaces and . These angles quantify the relative position of the two subspaces. See Appendix C.3 for more details about principal angles. Now, we have the following lemma.
Let such that . Then
To sum up, we have so far bounded the approximation error by the geometric quantity in the right-hand side of (19). Where projection DPPs shine is in taking expectations of such geometric quantities.
2.2 Taking the expectation under the DPP
The analysis in Section 4.2.1 is valid whenever . As seen in Corollary 1, this condition is satisfied almost surely when is drawn from the projection DPP of Theorem 1. Furthermore, the expectation of the right-hand side of (19) can be written in terms of the eigenvalues of the kernel .
3 Discussion
In comparison with , we emphasize that the dependence of our bound on the eigenvalues of the kernel , via , is explicit. This is in contrast with Proposition 1 that depends on the eigenvalues of through the degree of freedom so that the necessary number of samples diverges when . On the contrary, our quadrature requires a finite number of points for . It would be interesting to extend the analysis of our quadrature in the regime .
Numerical simulations
so that is the Sobolev space of order on $k_{s}g\equiv 1\mu_{g}\equiv 1(i)(ii)(iii)\lambda\in\{0,0.1,0.2\}q_{\lambda}^{*}\equiv 1(iv)(v)(vi)N\inNs\in\{1,3\}$.
We observe that the approximation errors of all first four quadratures converge to with different rates. Both UGBQ and DPPKQ converge to with a rate of , which indicates that our bound in Theorem 1 is not tight in the Sobolev case. Meanwhile, the rate of DPPUQ is across the three values of : it does not adapt to the regularity of the integrands. This corresponds to the CLT proven in . LVSQ without regularization converges to slightly slower than . Augmenting further slows down convergence. Herding converges at an empirical rate of , which is faster than the rate predicted by the theoretical analysis in . SBQ is the only one that seems to plateau for , although it consistently has the best performance for low . Overall, in the Sobolev case, DPPKQ and UGBQ have the best convergence rate. UGBQ – known to be optimal in this case – has a better constant.
Now, for a multidimensional example, consider the “Korobov" kernel defined on by
We still take in (1) so that . We compare our DPPKQ, LVSQ without regularization (), the kernel quadrature based on the uniform grid UGBQ, the kernel quadrature SGBQ based on the sparse grid from , the kernel quadrature based on the Halton sequence HaltonBQ . We take and . The results are shown in Figure 1(c). This time, UGBQ suffers from the dimension with a rate in , while DPPKQ, HaltonBQ and LVSQ all perform similarly well. They scale as , which is a tight upper bound on , see and Appendix B. SGBQ seems to lag slightly behind with a rate .
2 The Gaussian kernel
Conclusion
In this article, we proposed a quadrature rule for functions living in a RKHS. The nodes are drawn from a DPP tailored to the RKHS kernel, while the weights are the solution to a tractable, non-regularized optimization problem. We proved that the expected value of the squared worst case error is bounded by a quantity that depends on the eigenvalues of the integral operator associated to the RKHS kernel, thus preserving the natural feel and the generality of the bounds for kernel quadrature . Key intermediate quantities further have clear geometric interpretations in the ambient RKHS. Experimental comparisons suggest that DPP quadrature favourably compares with existing kernel-based quadratures. In specific cases where an optimal quadrature is known, such as the uniform grid for 1D periodic Sobolev spaces, DPPKQ seems to have the optimal convergence rate. However, our generic error bound does not reflect this optimality in the Sobolev case, and must thus be sharpened.
We have discussed room for improvement in our proofs. Further work should also address exact sampling algorithms, which do not exist yet when the spectral decomposition of the integral operator is not known. Approximate algorithms would also suffice, as long as the error bound is preserved.
We acknowledge support from ANR grant BoB (ANR-16-CE23-0003) and région Hauts-de-France. We also thank Adrien Hardy and the reviewers for their detailed and insightful comments.
References
Appendix A Implementation details
In this section, we give details on the repulsion kernels in each example of the main paper, and explain how we sampled from the corresponding DPPs. In short, we relied on matrix models for univariate cases, and vanilla DPP sampling for multivariate settings.
A.2 The one-dimensional Gaussian kernel
For notational convenience, we further let
Now, the Mercer decomposition of reads
and is the -th Hermite polynomial (i.e., orthonormal polynomials for the pdf of a unit Gaussian). Now, denote
A.3 The case of a tensor product of RKHSs
We consider the case where writes as a tensor product of RKHSs, with the associated kernel
A.3.2 Fixing an order on multi-indices
The definition of the projection DPP and its kernel now require that we fix an order on multi-indices. We choose an order that keeps eigenvalues decreasing, as in the univariate case where . Whenever the univariate eigenvalues take the form with , such as in the Korobov case, it holds
Now, if the eigenvalues takes the form , with , as in the Gaussian case,
In the multivariate Korobov and the Gaussian cases, we thus define in this work as (44) or (47), respectively.
We sampled from the corresponding DPP using the generic sampling algorithm in , using the uniform and Gaussian distributions as proposal in the successive rejection sampling steps for the Korobov and Gaussian cases, respectively.
Appendix B Supplementary simulations
For the Gaussian RKHS in dimension , it holds
We consider the case of Korobov spaces with and and compare the quadrature error of the same algorithms as in 5.1. The results are compiled in Figure 3. The numerical simulations confirm the dependencies of the theoretical bounds of the different algorithms to the dimension and the regularity . In particular, UGBQ have better performance for high values of and low values of while its asymptotic behaviour is still the same . Moreover, the empirical rate of SGBQ is similar to its theoretical rate . Finally, the rate is confirmed also for the algorithms DPPKQ, LVSQ and HaltonBQ.
B.2 The multi Gaussian ensemble
We consider the case of Gaussian spaces with . The kernel and the reference measure are the tensor product of respectively the same kernel and the same measure used in Section 5.2. We compare DPPKQ and Bayesian quadrature based on the tensor product of Gauss-Hermite nodes noted GHBQ. Note that a variant of this algorithm was proposed in : the quadrature nodes are the tensor product of the Gauss-Hermite nodes however the weights were calculated differently. The authors proved under an assumption on the stability of the weights (that was verified empirically) that the rate of convergence is , where is a constant that quantify the stability of the weights, and are constants that depend simultaneously on the the stability of the weights and length scales of the kernel and the measure. The results are compiled in Figure 4.
The numerical simulations shows that the empirical rate of DPPKQ is that is slightly better than its theoretical rate . Moreover, we observe that the empirical rate of DPPKQ is better than the empirical rate of HGBQ.
Appendix C Mercer’s theorem, leverage scores, and principal angles
For the sake of completeness, this section gathers some known results, which will be used to prove our own. We will need a general version of Mercer’s theorem, as usual for kernel methods, see Section C.1. On a more technical ground, we will also need formulas for leverage score changes under rank 1 updates, see Section C.2. Finally, Section C.3 covers principal angles between subspaces of a Hilbert space, which bridge the gap between pairs of Hilbert subspaces and determinants, and facilitate taking expectations in Theorem 1.
where the convergence is absolute and uniform.
is compact. A sufficient condition for this assumption is the integrability of the diagonal (Lemma 2.3, ):
Note that this condition is not necessary (Example 2.9, ). Now, under the compact embedding assumption, the pointwise convergence of the Mercer decomposition to the kernel is equivalent to the injectivity of the embedding (Theorem 3.1, ).
C.2 Leverage score changes under rank 1 updates
In this section we prove a lemma inspired from Lemma 5 in . This lemma concerns the changes of leverage scores under rank 1 updates.
while the cross-leverage score between the -th column and the -th column is defined by
The proof of this lemma is similar to Lemma 5 in . We recall the proof for completeness.
(Adapted from ) The Sherman-Morrison formula applied to and the vector yields
By definition of
Now let . By definition of
C.3 Principal angles between subspaces in Hilbert spaces
We recall in this section the definition of principal angles between subspaces in Hilbert spaces and connect them to the determinant of the Gramian matrix of their orthonormal bases.
Let be a Hilbert space. Let and be two finite-dimensional subspaces of with . Denote and the orthogonal projections of onto these two subspaces. There exist two orthonormal bases for and denoted and , and a set of angles such that
We refer to for the proof in the finite-dimensional case and for the general case. The following result shows that the principal angles are somewhat independent of the choice of orthonormal bases. It can be found in for the finite dimensional case. We give here the proof for the general case, for the sake of completeness.
Let be any orthonormal basis of and be any orthonormal basis of , and let and . Then the eigenvalues of are the . In particular, .
where . Then
Thus the eigenvalues of are the eigenvalues of . By Proposition 5, the diagonal elements of are
We finish the proof by showing that the anti-diagonal elements satisfy
Finally, is a diagonal matrix and the eigenvalues of are the . ∎
Appendix D Proofs of our results
The rest of Section D deals with Theorem 1, our upper bound on the approximation error of DPP-based kernel quadrature. The proof is rather long, but can be decomposed in four steps, which we now introduce for ease of reading.
First, we prove Lemma 1, which separates the search for an upper bound into examining the contribution of the three terms in (17); this is Section D.2. The first two terms of (17) only depend on the function in (1), and we leave them be. The third term is more geometric, and relates to the approximation error of the space spanned by by the (random) subspace .
Second, in Section D.3, we bound this geometric term for a fixed DPP realization . We pay attention to obtain a bound that will later yield a tractable expectation under that DPP. This is done in Proposition 4, which in turn requires two intermediate results, Lemma 4 and Proposition 6.
Third, we take the expectation of the bound in Proposition 4 under the proposed DPP. This is done in Proposition 3, which is proven thanks to Proposition 2, Lemmas 2, 5 & 6. This is Section D.4.
Fourth, Theorem 1 is obtained in Section D.5, using the results of the previous steps, and an argument to reduce the proof to RKHSs with flat initial spectrum.
Let such that , and define
Thus to prove that , it is enough to prove that the is larger than a positive real number for large enough. We write
with and is a diagonal matrix containing the first eigenvalues . The Cauchy-Binet identity yields
so that is a.s. invertible. ∎
D.2 Proof of Lemma 1
Note that and
Now, recall that the is orthonormal. Moreover for , is an eigenfunction of and the corresponding eigenvalue is . Thus
D.3 Proof of Proposition 4
Proposition 4 gives an upper bound to the term that appears in Lemma 1. We first prove a technical result, Lemma 4, and then combine it with Proposition 6 to finish the proof. We conclude with the proof of Proposition 6.
Indeed, since . Thus it is sufficient to prove that . This boils down to showing that is the matrix of the inner product restricted to .
We give the proof of (108); the proof of (109) follows the same lines.
where the are the elements of the vector . Then
Combining (112) and (113) along with the definition of the vector yields
D.3.2 End of the proof of Proposition 4
By Lemma 4, the inequality (22) in Proposition 4 is equivalent to
As an intermediate remark, note that in the special case , by construction
where is the Loewner order, the partial order defined by the convex cone of positive semi-definite matrices. Thus
For , the proof is much more subtle. Indeed, a naive application of the inequality (117) would lead to the following inequality
Now we have the following useful proposition.
For , we have
For ease of reading, we first show that inequality (115) and therefore Proposition 4 is easily deduced from this Proposition 6 and then give its proof.
Then we use (125) that is connected to the rank-one update from the kernel to so that
Then we apply (126) to the r.h.s. again times to finally get:
D.3.3 Proof of Proposition 6
which prepares the use of Lemma 3 in Section C.2. By definition of the -th leverage score of the matrix , see (54) in Section C.2,
where . Thus
As above, we conclude the proof by considering the limit
This proves inequality (126) and concludes the proof of Proposition 6. ∎
D.4 Proof of Proposition 3
We first prove two lemmas that are necessary to prove Proposition 3.
Let such that . Then,
The condition yields by Proposition 2 that is non singular. Thus . Let an orthonormal basis of with respect to . Using Corollary 2, and the fact that is an orthonormal basis of according to ,
Now, let the columns of the matrix . is an orthonormal basis of with respect to , then by (147)
Combining (146), (152) and (155) concludes the proof of Lemma 5:
Let . From (79)
Then by monotone convergence theorem, is mesurable and
D.4.2 End of the proof of Proposition 3
Then by Lemma 5 and the fact that
Then, taking the expectation with respect to resulting from a DPP of kernel ,
D.5 Proof of Theorem 1
As a consequence, by writing ,
which can be plugged in Lemma 1 to conclude the proof. ∎
Appendix E The intuitions behind the algorithm
The algorithm presented in this article is based on several intuitions. In this section, we summarize these intuitions.
which has a tractable expectation under the projection DPP that we consider in this paper. As an illustration of (180), Figure 6 compares the quality of approximation of a mean element using kernel interpolation based on two configurations of nodes: the first configuration (top) is well spread and the second configuration (bottom) is not. Observe that the largest principal angle for the first configuration is around , so that ; while it is around for the second configuration so that . Now observe that the first design of nodes gives the best reconstruction. This observation is consistent with (180).
E.2 The inclusion probability of DPPs and the Christoffel functions
The optimal distribution , see section 2.2, can be linked to the so-called Christoffel functions . These functions are rooted in the literature on orthogonal polynomials . To make it simpler, we introduce them in dimension . They are defined by
Christoffel functions have a more explicit form that can be used for pointwise evaluation
The authors derived an asymptotic equivalent of the function in the regime under some assumptions on the kernel. Furthermore, they proved that is tied to by the following relationship (Lemma 5, ):
In other words, the inclusion probability of the corresponding projection DPP is related to the inverse of the Christoffel function as defined in (183). Figure 7 illustrates the evaluations of the inclusion probability of the projection DPP in the case of RKHS defined by the Gaussian kernel along with the Gaussian measure in the real line. Recall that in this case the eigenfunctions are given by