Generalization Properties of Learning with Random Features
Alessandro Rudi, Lorenzo Rosasco
Introduction
Supervised learning is a basic machine learning problem where the goal is estimating a function from random noisy samples . The function to be learned is fixed, but unknown, and flexible non-parametric models are needed for good results. A general class of models is based on functions of the form,
Most popular approaches to tackle these limitations are randomized and include sampling the centers at random, either in a data-dependent or in a data-independent way. Notable examples include Nyström and random features approaches. Given random centers, computations still reduce to convex optimization with potential big memory gains, provided that the centers are fewer than the data-points. In practice, the choice of the number of centers is based on heuristics or memory constraints, and the question arises of characterizing theoretically which choices provide optimal learning bounds. Answering this question allows to understand the statistical and computational trade-offs in using these randomized approximations. For Nyström methods, partial results in this direction were derived for example in and improved in , but only for a simplified setting where the input points are fixed. Results in the statistical learning setting were given in for ridge regression, showing in particular that random centers uniformly sampled from training points suffices to yield learning bounds, the same as full kernel ridge regression.
A question motivating our study is whether similar results hold for random features approaches. While several papers consider the properties of random features for approximating the kernel function, see and references therein, fewer results consider their generalization properties.
Several papers considered the properties of random features for approximating the kernel function, see and references therein, an interesting line of research with connections to sketching and non-linear (one-bit) compressed sensing . However, only a few results consider the generalization properties of learning with random features.
An exception is one of the original random features papers, which provides learning bounds for a general class of loss functions . These results show that random features are needed for learning bounds and choosing less random features leads to worse bounds. In other words, these results suggest that that computational gains come at the expense of learning accuracy. Later results, see e.g. , essentially confirm these considerations, albeit the analysis in suggests that fewer random features could suffice if sampled in a problem dependent way.
In this paper, we focus on the least squares loss, considering random features within a ridge regression approach. Our main result shows, under standard assumptions, that the estimator obtained with a number of random features proportional to achieves learning error, that is the same prediction accuracy of the exact kernel ridge regression estimator. In other words, there are problems for which random features can allow to drastically reduce computational costs without any loss of prediction accuracy. To the best of our knowledge this is the first result showing that such an effect is possible. Our study improves on previous results by taking advantage of analytic and probabilistic results developed to provide sharp analyses of kernel ridge regression. We further present a second set of more refined results deriving fast convergence rates. We show that indeed fast rates are possible, but, depending on the problem at hand, a larger number of features might be needed. We then discuss how the requirement on the number of random features can be weakened at the expense of typically more complex sampling schemes. Indeed, in this latter case either some knowledge of the data-generating distribution or some potentially data-driven sampling scheme is needed. For this latter case, we borrow and extend ideas from and inspired from the theory of statical leverage scores . Theoretical findings are complemented by numerical simulation validating the bounds.
The rest of the paper is organized as follows. In Section 2, we review relevant results on learning with kernels, least squares and learning with random features. In Section 3, we present and discuss our main results, while proofs are deferred to the appendix. Finally, numerical experiments are presented in Section 4.
Learning with random features and ridge regression
We begin recalling basics ideas in kernel methods and their approximation via random features.
where is the by data matrix. In this case, the complexity becomes in space, and in time. Beyond the linear case, the above reasoning extends to inner product kernels
The basic idea of random features is to relax Eq. (4) assuming it holds only approximately,
Clearly, if one such approximation exists the approach described in the previous section can still be used. A first question is then for which kernels an approximation of the form (5) can be derived. A simple manipulation of the Gaussian kernel provides one basic example.
If we write the Gaussian kernel as , with , for a , then since the inverse Fourier transform of is a Gaussian, and using a basic symmetry argument, it is easy to show that
where is a normalizing factor. Then, the Gaussian kernel has an approximation of the form (5) with and and sampled independently from and uniformly in , respectively.
The above example can be abstracted to a general strategy. Assume the kernel to have an integral representation,
We note that specific examples of random features can be seen as form of sketching . This latter term typically refers to reducing data dimensionality by random projection, e.g. considering
where (or suitable bounded measures). From a random feature perspective, we are defining an approximation of the linear kernel since
More general non-linear sketching can also be considered. For example in one-bit compressed sensing the following random features are relevant,
with and if and otherwise. Deriving the corresponding kernel is more involved and we refer to (see Section E in the appendixes).
Back to supervised learning, combining random features with ridge regression leads to,
for , and .
Then, random features can be used to reduce the computational costs of full kernel ridge regression as soon as (see Sec. 2). However, since random features rely on an approximation (5), the question is whether there is a loss of prediction accuracy. This is the question we analyze in the rest of the paper.
Main Results
In this section, we present our main results characterizing the generalization properties of random features with ridge regression. We begin considering a basic setting and then discuss fast learning rates and the possible benefits of problem dependent sampling schemes.
since this implies that will generalize/predict well new data. Since we consider estimators of the form (2), (7) we are potentially restricting the space of possible solutions. Indeed, estimators of this form can be naturally related to the so called reproducing kernel Hilbert space (RKHS) corresponding to the PD kernel . Recall that, the latter is the function space defined as as the completion of the linear span of with respect to the inner product . In this view, the best possible solution is solving
We will assume throughout that exists. We add one technical remark useful in the following.
Existence of is not ensured, since we consider a potentially infinite dimensional RKHS , possibly universal . The situation is different if is replaced by with fixed a priori. In this case a minimizer of risk always exists, but needs to be fixed a priori and can’t be universal. Clearly, assuming to exist, implies it belongs to a ball of radius . However, our results do not require prior knowledge of and hold uniformly over all finite radii.
The following is our first result on the learning properties of random features with ridge regression.
Assume that is a kernel with an integral representation (6). Assume continuous, such that almost surely, with and almost surely, with . Let . If and , then a number of random features equal to
is enough to guarantee, with probability at least , that
In particular the constants do not depend on , and does not depends on .
The above result is presented with some simplifications (e.g. the assumption of bounded output) for sake of presentation, while it is proved and presented in full generality in the Appendix. In particular, the values of all the constants are given explicitly. Here, we make a few comments. The learning bound is the same achieved by the exact kernel ridge regression estimator (2) choosing , see e.g. . The theorem derives a bound in a worst case situation, where no assumption is made besides existence of , and is optimal in a minmax sense . This means that, in this setting, as soon as the number of features is order , the corresponding ridge regression estimator has optimal generalization properties. This is remarkable considering the corresponding gain from a computational perspective: from roughly and in time and space for kernel ridge regression to and for ridge regression with random features (see Section 2). Consider that taking changes only the constants and allows to derive bounds in expectation and almost sure convergence (see Cor. 1 in the appendix, for the result in expectation). The above result shows that there is a whole set of problems where computational gains are achieved without having to trade-off statistical accuracy. In the next sections we consider what happens under more benign assumptions, which are standard, but also somewhat more technical. We first compare with previous works since the above setting is the one more closely related.
This is one of the original random features paper and considers the question of generalization properties. In particular they study the estimator
rather than a RKHS, where is fixed a priori. The best possible solution is solving and the main result in provides the bound
This is the first and still one the main results providing a statistical analysis for an estimator based on random features for a wide class of loss functions. There are a few elements of comparison with the result in this paper, but the main one is that to get learning bounds, the above result requires random features, while a smaller number leads to worse bounds. This shows the main novelty of our analysis. Indeed we prove that, considering the square loss, fewer random features are sufficient, hence allowing computational gains without loss of accuracy. We add a few more tehcnical comments explaining : 1) how the setting we consider covers a wider range of problems, and 2) why the bounds we obtain are sharper. First, note that the functional setting in our paper is more general in the following sense. It is easy to see that considering the RKHS is equivalent to consider and the following inclusions hold . Clearly, assuming a minimizer of the expected risk to exists in does not imply it belongs to or , while the converse is true. In this view, our results cover a wider range of problems. Second, note that, this gap is not easy to bridge. Indeed, even if we were to consider in place of , the results in could be used to derive the bound
where and is a minimizer of the expected risk on . In this case we would have to balance the various terms in (11), which would lead to a worse bound. For example, we could consider , obtaining a bound with an extra logarithmic term, but the result would hold only for larger than a number of examples at least exponential with respect to the norm of . Moreover, to derive results uniform with respect to , we would have to keep into account the decay rate of and this would get bounds slower than .
Several other papers study the generalization properties of random features, see and references therein. For example, generalization bounds are derived in from very general arguments. However, the corresponding generalization bound requires a number of random features much larger than the number of training examples to give bounds. The basic results in are analogous to those in with the set replaced by . These results are closer, albeit more restrictive then ours (see Remark 8) and especially like the bounds in suggest random features are needed for learning bounds. A novelty in is the introduction of more complex problem dependent sampling that can reduce the number of random features. In Section 3.3, we show that using possibly-data dependent random features can lead to rates much faster than , and using much less than features.
2 Refined Results: Fast Learning Rates
Faster rates can be achieved under favorable conditions. Such conditions for kernel ridge regression are standard, but somewhat technical. Roughly speaking they characterize the “size” of the considered RKHS and the regularity of . The key quantity needed to make this precise is the integral operator defined by the kernel and the marginal distribution of on , that is
For , let the effective dimension be defined as and assume, there exists and such that,
Moreover, assume there exists and such that
Let . Under Asm. 1 and the same assumptions of Thm. 1, if , and , then a number of random features equal to
is enough to guarantee, with probability at least , that
for , and where do not depend on , while does not depends on .
The above bound is the same as the one obtained by the full kernel ridge regression estimator and is optimal in a minimax sense . For large and small it approaches a bound. When and the worst case bound of the previous section is recovered. Interestingly, the number of random features in different regimes is typically smaller than but can be larger than . Figure. 1 provides a pictorial representation of the number of random features needed for optimal rates in different regimes. In particular random features are enough when and . For example for (higher regularity/sparsity and a small RKHS) are sufficient to get a rate . But, for example, if (not too much regularity/sparsity but a small RKHS) are needed for error. The proof suggests that this effect can be a byproduct of sampling features in a data-independent way. Indeed, in the next section we show how much fewer features can be used considering problem dependent sampling schemes.
3 Refined Results: Beyond uniform sampling
We show next that fast learning rates can be achieved with fewer random features if they are somewhat compatible with the data distribution. This is made precise by the following condition.
Define the maximum random features dimension as
Assume there exists , and such that
The above assumption is abstract and we comment on it before showing how it affects the results. The maximum random features dimension (14) relates the random features to the data-generating distribution through the operator . It is always satisfied for ands . e.g. considering any random feature satisfying (6). The favorable situation corresponds to random features such that case . The following theoretical construction borrowed from gives an example.
Assume is a kernel with an integral representation (6). For and , consider the random features with distribution . We show in the Appendix that these random features provide an integral representation of and satisfy Asm. 2 with .
We next show how random features satisfying Asm. 2 can lead to better resuts.
Let . Under Asm. 2 and the same assumptions of Thm. 1, 2, if , and , then a number of random features equal to
is enough to guarantee, with probability at least , that
where do not depend on , while does not depends on .
The above learning bound is the same as Thm. 2, but the number of random features is given by a more complex expression depending on . In particular, in the slow rates scenario, that is , , we see that are needed, recovering , since . On the contrary, for a small RKHS, that is and random features with , a constant (!) number of feature is sufficient. A similar trend is seen considering fast rates. For and , if then the number of random features is always smaller, and potentially much smaller, then the number of random features sampled in a problem independent way, that is . For and , the number of number of features is and can be again just constant if . Figure 1 depicts the number of random features required if . The above result shows the potentially dramatic effect of problem dependent random features. However the construction in Ex. 2 is theoretical. We comment on this in the next remark.
This question was recently considered in and our results offer new insights. In particular, recalling the results in , we see that in the slow rate setting there is essentially no difference between random features and Nyström approaches, neither from a statistical nor from a computational point of view. In the case of fast rates, Nyström methods with uniform sampling requires random centers, which compared to Thm. 2, suggests Nyström methods can be advantageous in this regime. While problem dependent random features provide a further improvement, it should be compared with the number of centers needed for Nyström with leverage scores, which is and hence again better, see Thm. 3. In summary, both random features and Nyström methods achieve optimal statistical guarantees while reducing computations. They are essentially the same in the worst case, while Nyström can be better for benign problems. Finally we add a few words about the main steps in the proof.
The proofs are quite technical and long and are collected in the appendices. They use a battery of tools developed to analyze KRR and related methods. The key challenges in the analysis include analyzing the bias of the estimator, the effect of noise in the outputs, the effect of random sampling in the data, the approximation due to random features and a notion of orthogonality between the function space corresponding to random features and the full RKHS. The last two points are the main elements on novelty in the proof. In particular, compared to other studies, we identify and study the quantity needed to assess the effect of the random feature approximation if the goal is prediction rather than the kernel approximation itself.
Numerical results
While the learning bounds we present are optimal, there are no lower bounds on the number of random features, hence we present numerical experiments validating our bounds. Consider a spline kernel of order (see Eq. 2.1.7 when integer), defined as
Conclusion
In this paper, we provide a thorough analyses of the generalization properties of random features with ridge regression. We consider a statistical learning theory setting where data are noisy and sampled at random. Our main results show that there are large classes of learning problems where random features allow to reduce computations while preserving optimal statistical accuracy of exact kernel ridge regression. This in contrast with previous state of the art results suggesting computational gains needs to be traded-off with statistical accuracy. Our results open several venues for both theoretical and empirical work. As mentioned in the paper, it would be interesting to analyze random features with empirical leverage scores. This is immediate if input points are fixed, but our approach should allow to also consider the statistical learning setting. Beyond KRR, it would be interesting to analyze random features together with other approaches, in particular accelerated and stochastic gradient methods, or distributed techniques. It should be possible to extend the results in the paper to consider these cases. A more substantial generalization would be to consider loss functions other than quadratic loss, since this require different techniques from empirical process theory.
The authors gratefully acknowledge the contribution of Raffaello Camoriano who was involved in the initial phase of this project. These preliminary result appeared in the 2016 NIPS workshop “Adaptive and Scalable Nonparametric Methods in ML”. This work is funded by the Air Force project FA9550-17-1-0390 (European Office of Aerospace Research and Development) and by the FIRB project RBFR12M3AC (Italian Ministry of Education, University and Research).
References
Appendix A Proofs
In Sect. A.1, the notation is introduced and some standard identities are recalled. In Sect. A.2, the excess risk is decomposed in five terms (Eq. (17)-(21)) that are further simplified in Lemma 2, 3, 4, 5. The complete decomposition is presented in Thm. 4. In Sect. A.3, the terms in decomposition are bounded in probability, in particular Lemma 7 bounds the variance term, Lemma 8 the computational error term, while Lemma 10 controls the constants. Finally the proofs of the main results are presented in Section A.4 together with the more general results of Thm. 5.
First we recall the assumptions needed to derive the results. They are already presented or implied in the main text, here we collect and number them.
Assumption 2 (Compatibility condition) There exists and such that
The kernel has an integral representation as in Eq. 6, with continuous in both variables and bounded, that is, there exists such that for any and . The associated RKHS is separable.
Moreover there exists such that .
Note that the above assumption on is satisfied when is bounded, sub-gaussian or sub-exponential. In particular, if almost surely, with then the assumption above is satisfied with .
Let . There exists and such that, for any
It is the first part of Asm. 1, for the sake of clarity we need to split it in two, since many results depend either on the first or on the second part.
There exists and such that
We denote with the quantity .
We now recall a useful characterization of the excess risk, in term of the quantities defined above.
When is finite, then and is the minimizer of over all the measurable functions. When is finite, the range of and of is the closure of in . When both conditions hold, for any the following hold
The latter term is zero if , but we will also see that it is zero for all the functions defined by random features. Moreover if there exists minimizing , then Asm. 6 is equivalent to requiring the existence of , such that
with .
In the following we define analogous operators for the approximated kernel , with
Under Asm. 3 and the fact that is a finite measure, almost surely.
Now we are ready for defining the following operators, depending on or .
.
Note that the operators above satisfy the properties in the following remark.
Under Asm. 3 the linear operators is trace class and the linear operators are finite dimensional. Moreover we have that , , and . Finally are self-adjoint and positive operators, with spectrum is .
In the next remark we rewrite in terms of the operators introduced above.
Let defined as in Eq. 7. Under Assumption 3, almost surely, since is in almost surely (Rem. 7) and is a linear combination of . In particular,
A.2 Analytic Result
In this subsection we decompose analytically the excess risks in different terms, that will be bounded, via concentration inequalities, in the next section. Under Asm. 3, since almost surely, we have
(for more details see Rem. 6, 9). In our analysis we decompose the first term considering,
We comment on the role of the various terms in the decomposition. The first controls the variance of the outputs , the second the interaction between the space of models spanned by and , the third the approximation of the inverse covariance operator , the fourth controls how close is the integral operator to , while the last controls the approximation error of the models in . The norm of is bounded by the sum of the norms of the terms, that are further bounded in Lemma. 2, 3, 4, 5. The final analytical decomposition is given in Thm. 4. First we need a preliminary result.
Under Asm. 3, the operator is characterized by
By Asm. 3, we have that almost surely and uniformly bounded. By using the kernel expansion of Eq. (6), the linearity of the Bochner integral and of the dot product, we have that for any the following holds
Now we are ready to prove that the second term of the expansion in Eq. 17 is zero. We obtain this result by proving that almost everywhere.
where the latter result holds more generally for any
Note that, since is the projection operator on the range of and is trace class, then , this implies that . By the characterization of given in Lemma 1, the linearity of the bounded operator and of the trace, we have that
where the last step is due to the fact that for any and almost surely, since are distributed according to and almost surely on the support of . Now
First of all we recall that for any continuous spectral function and any compact operator . By the characterization of in Rem. 8 under Asm. 3, we have
since is a continuos spectral function on , which contains the spectrum of that is in . Equivalently, the equation above could be proven algebraically via the Woodbury identity. Now we have
where the last step is due to the identity valid for any bounded invertible linear operator . In particular by multiplying and dividing by we have the following decomposition
The result is given by bounding the norm of the lhs of the identity above, by the product of the norms of the parentheses on the rhs (see Rem. 5). Note that by applying Eq. (15), we have that there exists , such that and by dividing and multiplying for , we have
Now note that, by Asm. 6, we have , and since is compact with the spectrum in and . By the fact that is a continuous spectral function on containing the spectrum of , we have that and so for any
By the algebraic identities valid for any bounded positive operator and valid for any invertible bounded operators, we have
By applying Eq. (15), we have that there exists , such that , so by multiplying and dividing by , we preform the following decomposition
The result is given by bounding the norm of the lhs of the identity above, by the product of the norms of the parentheses on the rhs (see Rem. 5). Note that and for any and . Now we apply Proposition 9 on , indeed note that , so by setting , , and applying the proposition, we have
Under Asm. 3, and Eq. (15) the following holds for any ,
By the identity valid for and any bounded self-adjoint positive operator and by Eq. (15) for which there exists such that , we have
The result is given by bounding the norm of the lhs of Eq. 22, by the product of the norms of the parentheses on the rhs (see Rem. 5). Note that and , while according to Eq. (15). ∎
,
,
, with and .
Under Asm. 3, the excess risk is characterized by Eq. 16 as we recalled at the beginning of this subsection. We decomposed the quantity according to the terms in Eq. 17-21. The norm of is bounded by the sum of the norms of the terms, that are further bounded in Lemma. 2, 3, 4, 5. In particular, for the first term, by writing in terms of the linear operators in Def. 2 (see Rem. 9) and by multipling and dividing by we have
then we bound the norm of the term with the norm of the parenthesis in the decomposition above (see Rem. 5). By collecting the result above with the bounds in Lemma. 2, 3, 4, 5, we have
where , , , , and . Now note that for any since, for any , bounded linear operators, with positive, by multiplying and dividing for the following holds
and , for any . Since will contribute to the rates of the bound, while are responsible for the numerical constants, we are going to bound the excess risk in order to collect in a multiplicative term as follows
Finally, we further simplify , in particular we apply Prop. 8 in the appendix, obtaining . For note that,
since, for the same reasoning in Eq. (24). Then we apply Prop. 8 in the appendix, obtaining . ∎
In the next subsection, we are going to find probabilistic estimates for terms in the analytic decomposition of the excess risk in Thm. 4.
A.3 Probabilistic Estimates
The next lemma bounds the first term of and use a similar technique to the one in , while Lemma 7 bounds the whole . First we need to introduce that is the effective dimension induced by the kernel . For any define as follows,
In Prop. 10 in the appendix, we bound in terms of the effective dimension that is the one associated to the kernel . Prop. 10 refines the result of Prop. 1 of , with simpler proof and slightly improved constants.
In this proof we bound the quantity under study, by using the Bernstein inequality for sum of zero-mean random vectors (see Prop. 2 in the appendix). Since (see Def. 2) we have
So, by linearity of the expectation the ,
which implies that is a zero-mean random variable for . Let be another random variable independent and identically distributed as the ’s. To apply the Bernstein inequality for random vectors, we need to bound their moments. First of all note that for any
In particular, by applying Asm. 3 and Asm. 4, we have
where , while a.s. is given by
where the last step is due to Asm. 3. Finally, to concentrate the sum of random vectors, we apply Prop. 2. To conclude the proof we need to prove that . Note that, by Rem. 8, we have that and , so
since and . By the the ciclicity of the trace and the definition of in Def. 2, we have
when and .
First of all we need to define four other events. Define the event , as the event satisfying
A.3.2 Estimates for 𝒞(λ,M)𝒞𝜆𝑀{\cal C}(\lambda,M)
Let as in Thm. 4, point 2. Let and . Under Asm. 3, following holds with probability at least
when and .
We now study that is
where the last steps are due to the identity valid for any vector and any bounded self-adjoint positive operator on a Hilbert space.
Define the event satisfying
Define the event satisfying
Now set . When holds and under the assumption that , we have that the right hand side of Eq. (32) is smaller than and , so
A.3.3 Estimates for β𝛽\beta
Let . Under Asm. 3, the following holds with probability at least ,
when .
Define the event as the one satisfying
Note that when and , we have and, by using the characterization of in Rem. 8 and the fact that , we have
Let , and be as in Thm. 4, point 3. Under Asm. 3, the following holds with probability at least ,
when , and
Let be defined as in Thm. 4, point 3. To bound in probability, we first bound and in probability, and then, under the intersection of the events, we control . First of all, denote with the condition on , with the condition on and with the condition , while with the condition . Define the event as the one satisfying . To bound the probability of we need an auxiliary event that is the one satisfying . The specific choice of will be made clear later. We have
A.4 Proof of the Main Result
Here we prove Thm. 1, 2, 3 that are the main results of the paper. In particular the following Thm. 5 is a general version of the three theorem above, without the need of Assumptions 5, 2 and valid for a wide range of . In Thm. 6, we specialize the result of Thm. 5, selecting in terms of such that the upper bound of the excess risk depends only on and is proportional to the same upper bound for kernel ridge regression that leads to optimal generalization bounds. Note that Thm. 6 is again independent of Asm. 5, 2. Finally, Thm. 7 is obtained by Thm. 6, by adding Asm. 5, 2 and has all the constant explicit. Then Thm. 1 is a specification of Thm. 7, for the simple scenario where it is only required the existence of (that is Asm. 5 satisfied with , Asm. 6 satisfied with and Asm. 2 with , see discussion after the introduction of the assumptions). Thm. 2 is a specification of Thm. 7 for the fast rates (Asm. 2 is satisfied with ), while Thm. 3 is a simplified version of Thm. 7 where the constants have been hidden.
Let . Let be as in Eq. (7). Under Asm. 3, 6, 4 when and
with , then the following holds with probability at least ,
where , ,
and .
Under Asm. 3, the existence of in Asm. 4 and Asm. 6, plus Rem. 6, we have the following analytical decomposition of the excess risk, by Thm, 4
where the quantities , and are defined in the statement of Thm. 4. Under the same assumptions, Lemma 7, 8 and 10 are devoted to bound in probability the three quantities, with the help of the concentration inequalities recalled in Section B, plus some auxiliary results in Section D, of the appendixes.
Define the event as the one satisfying
Define the event as the one satisfying
Finally Eq. (35) is obtained from Eq. (37), by bounding with , with Eq. (38) and by . So by definition, Eq. (35) holds under the event and the conditions on , on and on . The event has probability
Finally note that the conditions on in the statement of this theorem imply, respectively, conditions on , on , and on . ∎
Let . Let be as in Eq. (7). Under Asm. 3, 6, 4, when and
with , then the following holds with probability at least ,
Here , .
First we apply Thm. 5, then we add a condition on with respect to such that we can bound with . The condition we will consider is the following
Indeed lower bounding with the occurrences of in , we have
where the second step is due to and for , while the last step is due to the following three facts. First, that , since on and, by denoting with the eigenvalues of , with , and recalling that , we have
Second, that , since on and , since . Third, that and , since and on . ∎
The following theorem is a specialization of the previous one, under 5, 2 and an explicit relation of with respect to .
Let . Under Asm. 3 and 5, 6, 2, 4, let , and
with , then the following holds with probability at least ,
and .
Let in Thm. 6 and substitute and by their bounds given in Asm. 5, 2. Note that to guarantee that satisfies the associated constraint with respect to , in Thm. 6, and that is in we need that and
Note that the theorems in Sect 3 are corollaries of the theorem above. For the sake of readability, in contrast to Thm. 7, the results in Thm. 1, 2, 3 are expressed with respect to . Moreover in the statement of Thm. 1, 2, 3 the constants and the logarithmic terms are omitted. They can be recovered by plugging the coefficients detailed in the following proofs in the statement of Thm. 7.
This is an application of Thm. 7, with minimum number of assumptions. Indeed the existence of and the fact that a. s. satisfies Asm. 4 with . The fact that is a Polish space and that is bounded continuous satisfy Asm. 3, and so the kernel is bounded by . Since the kernel is bounded, we have that Asm. 5 is always satisfied with ; Asm. 6 is always satisfied with ; Asm. 2 is always satisfied with . In particular we have the following constants ,
with and . ∎
Under the same assumptions of Thm. 1, if and , then a number of random features equal to
In particular the constants are as in Thm. 1 and .
In the rest we will denote , with and will use the notation of Sect. A.3. Fix . Denote with , the event satisfying , with .
First, note that , satisfies and any satisfies with as in Thm. 1. So, we can apply Thm. 1, from which we know that holds with probability smaller than .
Second, by Rem. 6 and Rem. 9, we have that
Now, by denoting with the indicator function for , we have
This is an application of Thm. 7, where assumption Asm. 2 is satisfied with and . Indeed the existence of and the fact that a. s. satisfies Asm. 4 with . The fact that is a Polish space and that is bounded continuous satisfy, Asm. 3, and so the kernel is bounded by . Since the kernel is bounded, we have that Asm. 2 is always satisfied with . Asm. 4 and Asm. 6 are directly satisfied by Asm. 1. In particular we obtain ,
with and . ∎
By definition of we have
Now we show that achieves . By recalling that , we have
We recall that . Denoting with the function and considering that for any bounded symmetrix linear operator and vector , and that the trace is linear,
where the fact that is due to Lemma 1. ∎
This is a version of Thm. 7, with simplified set of assumptions. Indeed the existence of and the fact that a. s. satisfies Asm. 4 with . The fact that is a Polish space and that is bounded continuous, satisfy Asm. 3, and so the kernel is bounded by . Asm. 4 and Asm. 6 are directly satisfied by Asm. 1.In particular we obtain ,
with and . ∎
Appendix B Concentration Inequalities
Here we recall some standard concentration inequalities that will be used in Sect. A.3. The following inequality is from Thm.3 of and will be used in Lemma 10, together with other inequalities, to concentrate the empirical effective dimension to the true effective dimension.
If there exists almost everywhere, then the same bound, with instead of , holds for the for the absolute value of the left hand side, with probability at least .
The following inequality is and adaptation of Thm. 3.3.4 in and is a generalization of the previous one to random vectors. It is used primarily in Lemma 6, to control the sample error. Moreover it is used in Prop. 10, Lemma 10, to control the empirical effective dimension and to bound the term of Thm. 4, in the main theorem. Finally it is used to prove the inequality in Prop. 5.
for any . Then for any :
The following inequality is essentially Thm. 7.3.1 in (generalized to separable Hilbert spaces by the technique in Section 4 of ). It is a generalization of the Bernstein inequality to random operators. It is mainly used to prove the inequality in Prop. 6.
with probability at least . Here .
If there exists such that almost everywhere, then the same bound holds with instead of for the operator norm, with probability at least .
The theorem is a restatement of Theorem 7.3.1 of generalized to the separable Hilbert space case by means of the technique in Section 4 of . ∎
Appendix C Operator Inequalities
Let be separable Hilbert spaces and bounded linear operators.
The following inequality is needed to prove the interpolation inequality in Prop. 9, that is needed to perform a fine split of the computational error.
If are self-adjoint and positive, then
Appendix D Auxiliary Results
The next proposition is used in Lemma 7 to control the sample error. It is based on the Bernstein inequality for random vectors, Prop. 2.
with probability at least , where denotes the essential supremum and
for any . Therefore for any we have
The following inequality, together with Prop. 8, is used in Prop. 10, Lemmas 10, 8. A similar technique can be found in .
where . Moreover, with the same probability
Let . Here we apply Prop. 3 on the random variables with for . Note that the expectation of is . The random vectors are bounded by
almost everywhere, for any . The second order moment is
for . Now we can apply Prop. 3. Now some considerations on . It is , now . We need a lower bound for where is the biggest eigenvalue of , now thus and so .
For the second bound of this proposition we use the second bound of Prop. 3, the analysis remains the same except for uniform bound on , that now is
In the following remark, we start from the result of the previous proposition, expressing the conditions on and with respect to a given value for the bound.
With the same notation of Prop. 6, assume that almost everywhereOr equivalently define with respect to as ., then we have that
for any , when and , we have
The equation above holds with the same probability with , when and .
The equation above holds with the same probability with , when and .
The next proposition, together with Prop. 10 are a restatement of Prop. 1 of . In particular the next proposition performs the analytic decomposition of the difference between the empirical and the true effective dimension, while Prop. 10, bounds the decomposition in probability.
Let be an Hilbert space. Let be two bounded positive linear operators, that are trace class. Given , let
Considering that for any bounded symmetric linear operator the following identity holds
The next result is essentially Prop. 7 of , while a similar technique can be found in . It is used, mainly together with Prop. 6, to give multiplicative bounds to empirical operators. It is used in the analytic decomposition of the excess risk, in Prop. 7, Thm. 4.
Let be a separable Hilbert space, let two bounded self-adjoint positive linear operators on and . Then
Note that by definition.
Let . First of all note that for any . Indeed, by exploiting the variational formulation of the biggest eigenvalue, we have
since is a positive operator and thus for any . Now note that
Now let . We have that,
because for any bounded operator . Note that
Finally let , we have seen that , then
since with for , and is positive and monotonically increasing on the domain. ∎
The following proposition is used to give a fine analytical decomposition of the excess risk in Prop. 7, Thm. 4. A similar interpolation inequality for finite dimensional matrices, can be found in . Here we prove it for bounded linear operators on separable Hilbert spaces.
Let be two separable Hilbert spaces and be bounded linear operators, with and be positive semidefinite.
where the last inequality is due to Cordes (see Proposition 4). Then we have that (where is the Löwner partial ordering on positive operators) and so
In the next proposition, we bound in terms of the effective dimension that is the one associated to the kernel . The proof of Prop. 10 analogous to the one of Prop. 1 of , with simpler proof and slightly improved constants.
with and .
By noting that is upper bounded by , we can apply the Bernstein inequality (Prop. 1) where and are
with probability at least . Then, by taking a union bound for the three events we have
with probability at least , where . Finally, if , then we have . Noting that , we have that
Appendix E Examples of Random feature maps
A lot of works have been devoted to develop random feature maps in the the setting introduced above, or slight variations (see for example and references therein). In the rest of the section, we give several examples.
with proportional to , and . Note that satisfy Assumption 3. In , they further randomize the construction above, by using results from locally sensitive hashing, to obtain a feature map which is a binary code. It can be shown that their methods satisfy Assumption 3 for an appropriate choice of and the probability distribution . consider the setting of , but selects by means of the fast Welsh-Hadamard transform in order to improve the computational complexity for the algorithm computing , while selects them by using low-discrepancy sequences for quasi-random sampling to improve the statistical accuracy of with respect to .
where is the normalization factor . Indeed by Taylor expansion of the exponential function and of the power of a multinomial, we have
Note that it is possible to sample from in the following way. By the steps above it is clear that a sample from can be obtained by first sampling from a Poisson distribution with parameter and then sampling from a multinomial distribution with probability and number of trials .
and can be approximated by with and a matrix of independent random variables with probability at least . Indeed it holds,
where is the -th row of with . Now note that Eq. (6) is satisfied, indeed for any
Now note that Assumption 3 is satisfied when . Indeed, considering that for any and , we have
approximate the construction above by using randomized tensor sketching and Johnson-Lindenstrauss random projections. It can be shown that even their methods satisfy Assumption 3 for an appropriate choice of and the probability distribution .
The considered input space is and the considered kernels are of the form
In this work they focus on and on additive homogeneous kernels, that are of the form
As pointed out in , this family of kernels is particularly useful on histograms. Exploiting the homogeneous property, the kernel is rewritten as follows
In this work a generalization of the ReLU activation function for one layer neural networks is considered, that is
where is defined in Eq. 4 of and is the angle between the two vectors and . Examples of are the following