N OT -S O -R ANDOM F EATURES
A BSTRACT
We propose a principled method for kernel learning, which relies on a Fourieranalytic characterization of translation-invariant or rotation-invariant kernels.
Our method produces a sequence of feature maps, iteratively reﬁning the SVM margin.
We provide rigorous guarantees for optimality and generalization, interpreting our algorithm as online equilibrium-ﬁnding dynamics in a certain two-player min-max game.
Evaluations on synthetic and real-world datasets demonstrate scalability and consistent improvements over related random features-based methods
I NTRODUCTION
Choosing the right kernel is a classic question that has riddled machine learning practitioners and theorists alike.
Conventional wisdom instructs the user to select a kernel which captures the structure and geometric invariances in the data.
Efforts to formulate this principle have inspired vibrant areas of study, going by names from feature selection to multiple kernel learning (MKL).
We present a new, principled approach for selecting a translation-invariant or rotation-invariant kernel to maximize the SVM classiﬁcation margin.
We ﬁrst describe a kernel-alignment subroutine, which ﬁnds a peak in the Fourier transform of an adversarially chosen data-dependent measure.
Then, we deﬁne an iterative procedure that produces a sequence of feature maps, progressively improving the margin.
The resulting algorithm is strikingly simple and scalable.
Intriguingly, our analysis interprets the main algorithm as no-regret learning dynamics in a zero-sum min-max game, whose value is the classiﬁcation margin.
Thus, we are able to quantify convergence guarantees towards the largest margin realizable by a kernel with the assumed invariance.
Finally, we exhibit experiments on synthetic and benchmark datasets, demonstrating consistent improvements over related random features-based kernel methods.
1. R ELATED W ORK
There is a vast literature on MKL, from which we use the key concept of kernel alignment (Cristianini et al., 2002).
Otherwise, our work bears few similarities to traditional MKL; this and much related work (e.g. Cortes et al.
(2012); G¨onen & Alpaydın (2011); Lanckriet et al.
(2004)) are concerned with selecting a kernel by combining a collection of base kernels, chosen beforehand.
Our method allows for greater expressivity and even better generalization guarantees.
Instead, we take inspiration from the method of random features (Rahimi & Recht, 2007).
In this pioneering work, originally motivated by scalability, feature maps are sampled according to the
Fourier transform of a chosen kernel.
The idea of optimizing a kernel in random feature space was studied by Sinha & Duchi (2016).
In this work, which is most similar to ours, kernel alignment is optimized via importance sampling on a ﬁxed, ﬁnitely supported proposal measure.
However, the proposal can fail to contain informative features, especially in high dimension; indeed, they highlight efﬁciency, rather than showing performance improvements over RBF features.
Learning a kernel in the Fourier domain (without the primal feature maps) has also been considered previously: Oliva et al.
(2016) and Yang et al.
(2015b) model the Fourier spectrum parametrically, which limits expressivity; the former also require complicated posterior inference procedures.
B˘az˘avan et al.
(2012) study learning a kernel in the Fourier domain jointly with regression parameters.
They show experimentally that this locates informative frequencies in the data, without theoretical guarantees.
Our visualizations suggest this approach can get stuck in poor local minima, even in 2 dimensions.
Crammer et al.
(2003) also use boosting to build a kernel sequentially; however, they only consider a basis of linear feature maps, and require costly generalized eigenvector computations.
From a statistical view, Fukumizu et al.
(2009) bound the SVM margin in terms of maximum mean discrepancy, which is equivalent to (unweighted) kernel alignment.
Notably, their bound can be loose if the number of support vectors is small; in such situations, our theory provides a tighter characterization.
Moreover, our attention to the margin goes beyond the usual objective of kernel alignment.
1. O UR C ONTRIBUTIONS
We present an algorithm that outputs a sequence of Fourier features, converging to the maximum realizable SVM classiﬁcation margin on a labeled dataset.
At each iteration, a pair of features is produced, which maximizes kernel alignment with a changing, adversarially chosen measure.
As this measure changes slowly, the algorithm builds a diverse and informative feature representation.
Our main theorem can be seen as a case of von Neumann’s min-max theorem for a zero-sum concave-linear game; indeed, our method bears a deep connection to boosting (Freund & Schapire, 1996; Schapire, 1999).
In particular, both the theory and empirical evidence suggest that the generalization error of our method decreases as the number of random features increases.
In traditional
MKL methods, generalization bounds worsen as base kernels are added.
Other methods in the framework of Fourier random features take the approach of approximating a kernel by sampling feature maps from a continuous distribution.
In contrast, our method constructs a measure with small ﬁnite support, and realizes the kernel exactly by enumerating the associated ﬁnite-dimensional feature map; there is no randomness in the features.
P RELIMINARIES 2.
T HE F OURIER
D UAL M EASURE OF A K ERNEL
We focus on two natural families of kernels k ( x , x (cid:48) ) : translation-invariant kernels on X = R d , which depend only on x − x (cid:48) , and rotation-invariant kernels on the hypersphere X =
S
d − 1 , which depend only on (cid:104) x , x (cid:48) (cid:105) .
These invariance assumptions subsume most widely-used classes of kernels; notably, the Gaussian (RBF) kernel satisﬁes both.
For the former invariance, Bochner’s theorem provides a Fourier-analytic characterization:
Theorem 2.1 (e.g. Eq.
(1), Sec. 1.4.3 in Rudin (2011)) .
A translation-invariant continuous function k : R d × R d → R is positive semideﬁnite if and only if k ( x − x (cid:48) ) is the Fourier transform of a symmetric non-negative measure (where the Fourier domain is Ω = R d ).
That is,
[Equation] [Equation]
) for some λ ∈ L 1 (Ω) , satisfying λ ( ω ) ≥ 0 and λ ( ω ) =
λ ( − ω ) for all ω ∈ Ω .
A similar characterization is available for rotation-invariant kernels, where the Fourier basis functions are the spherical harmonics , a countably inﬁnite family of complex polynomials which form an orthonormal basis for square-integrable functions X → C .
To unify notation, let Ω ⊂ N ×
Z be the set of valid index pairs ω
= ( (cid:96), m ) , and let ω (cid:55)→ − ω denote a certain involution on Ω ; we supply details and references in Appendix B.1.
Theorem 2.2.
A rotation-invariant continuous function k : S d − 1 × S d − 1 → R is positive semideﬁnite if and only if it has a symmetric non-negative expansion into spherical harmonics Y d
[Equation]
,m , i.e.
[Equation]
for some λ ∈ L 1 (Ω) , with λ ( ω ) ≥ 0 and λ ( ω ) =
λ ( − ω ) for all valid index pairs ω
= ( (cid:96), m ) ∈ Ω .
In each of these cases, we call this Fourier transform λ k ( ω ) the dual measure of k .
This measure decomposes k into a non-negative combination of Fourier basis kernels.
Furthermore, this decomposition gives us a feature map φ : X → L 2 (Ω , λ k ) whose image realizes the kernel under the codomain’s inner product; 2 that is, for all x , x (cid:48) ∈ X ,
[Equation]
Respectively, these feature maps are φ x ( ω ) =
e i (cid:104) ω, x (cid:105) and φ x ( (cid:96), m ) =
Y d(cid:96),m ( x ) .
Although they are complex-valued, symmetry of λ k allows us to apply the transformation { φ x ( ω ) , φ x ( − ω ) }
(cid:55)→ { Re φ x ( ω ) , Im φ x ( ω ) } to yield real features, preserving the inner product.
The analogous result holds for spherical harmonics.
2. K ERNEL A LIGNMENT
In a binary classiﬁcation task with n training samples ( x i ∈ X , y i ∈ {± 1 } ) , a widely-used quantity for measuring the quality of a kernel k :
X ×X → R is its alignment (Cristianini et al., 2002;
Cortes et al., 2012), 3 deﬁned by
[Equation]
where y is the vector of labels and G k is the Gram matrix.
Here, we let P =
(cid:80) i : y i =
δ x i and Q =
[Equation]
i :
[Equation]
i = − 1 δ x i denote the (unnormalized) empirical measures of each class, where δ x is the
Dirac measure at x .
When P , Q are arbitrary measures on X , this deﬁnition generalizes to γ k ( P , Q ) def =
[Equation]
In terms of the dual measure λ k ( ω ) , kernel alignment takes a useful alternate form, noted by Sriperumbudur et al.
Let µ denote the signed measure P − Q .
Then, when k is translationinvariant, we have
[Equation]
Analogously, when k is rotation-invariant, we have
[Equation]
P
[Equation]
, m ) .
It can also be veriﬁed that (cid:107) λ k (cid:107) L 1 (Ω) =
k ( x , x ) , which is of course the same for all x ∈ X .
In each case, the alignment is linear in λ k .
We call v ( ω ) the Fourier potential , which is the squared magnitude of the Fourier transform of the signed measure µ = P − Q .
This function is clearly bounded pointwise by ( P ( X ) + Q ( X )) 2 .
A LGORITHMS 3. M AXIMIZING K ERNEL A LIGNMENT IN THE F OURIER D OMAIN
First, we consider the problem of ﬁnding a kernel k (subject to either invariance) that maximizes alignment γ k ( P , Q ) ; we optimize the dual measure λ k ( ω ) .
Aside from the non-negativity and symmetry constraints from Theorems 2.1 and 2.2, we constrain (cid:107) λ k (cid:107) 1 = 1 , as this quantity appears as a normalization constant in our generalization bounds (see Theorem 4.3).
Maximizing γ k ( P , Q ) in this constraint set, which we call L ⊂ L 1 (Ω) , takes the form of a linear program on an inﬁnitedimensional simplex.
Noting that v ( ω ) = v ( − ω ) ≥ 0 , γ k is maximized by placing a Dirac mass at any pair of opposite modes ± ω ∗ ∈ argmax ω v ( ω ) .
At ﬁrst, P and Q will be the empirical distributions of the classes, speciﬁed in Section 2.2.
However, as Algorithm 2 proceeds, it will reweight each data point x i in the measures by α ( i ) .
Explicitly, the reweighted Fourier potential takes the form
[Equation]
Due to its non-convexity, maximizing v α ( ω ) , which can be interpreted as ﬁnding a global Fourier peak in the data, is theoretically challenging.
However, we ﬁnd that it is easy to ﬁnd such peaks in our experiments, even in hundreds of dimensions.
This arises from the empirical phenomenon that realistic data tend to be band-limited, a cornerstone hypothesis in data compression.
An (cid:96) 2 constraint (or equivalently, (cid:96) 2 regularization; see Kakade et al.
(2009)) can be explicitly enforced to promote band-limitedness; we ﬁnd that this is not necessary in practice.
When a gradient is available (in the translation-invariant case), we use Langevin dynamics (Algorithm 1) to ﬁnd the peaks of v ( ω ) , which enjoys mild theoretical hitting-time guarantees (see
Theorem 4.5).
See Appendix A.3 for a discussion of the (discrete) rotation-invariant case.
It is useful in practice to use parallel initialization, running m concurrent copies of the diffusion process and returning the best single ω encountered.
This admits a very efﬁcient GPU implementation: the multi-point evaluations v α ( ω 1 ..m ) and ∇ v α ( ω 1 ..m ) can be computed from an ( m, d ) by ( d, n ) matrix product and pointwise trigonometric functions.
We ﬁnd that Algorithm 1 typically ﬁnds a reasonable peak within ∼ 100 steps.
3. L EARNING THE M ARGIN -M AXIMIZING K ERNEL FOR SVM
Support vector machines (SVMs) are perhaps the most ubiquitous use case of kernels in practice.
To this end, we propose a method that boosts Algorithm 1, building a kernel that maximizes the classiﬁcation margin.
Let k be a kernel with dual λ k , and Y def = diag ( y ) .
Write the dual l 1 -SVM objective, 5 parameterizing the kernel by λ k :
[Equation]
Thus, for a ﬁxed α , F is equivalent to kernel alignment, and can be minimized by Algorithm 1.
However, the support vector weights α are of course not ﬁxed; given a kernel k , α is chosen to maximize F , giving the (reciprocal) SVM margin.
In all, to ﬁnd a kernel k which maximizes the margin under an adversarial choice of α , one must consider a two-player zero-sum game:
[Equation]
where L is the same constraint set as in Section 3.1, and K is the usual dual feasible set { 0 (cid:52) α (cid:52)
C, y T α = 0 } with box parameter C .
In this view, we make some key observations.
First, Algorithm 1 allows the min-player to play a pure-strategy best response to the max-player.
Furthermore, a mixed strategy ¯ λ for the min-player is simply a translation- or rotation-invariant kernel, realized by the feature map corresponding to its support.
Finally, since the objective is linear in λ and concave in α , there exists a Nash equilibrium ( λ ∗ , α ∗ ) for this game, from which λ ∗ gives the margin-maximizing kernel.
We can use no-regret learning dynamics to approximate this equilibrium.
Algorithm 2 runs Algorithm 1 for the min-player, and online gradient ascent (Zinkevich, 2003) for the max-player.
Intuitively (and as is visualized in our synthetic experiments), this process slowly morphs the landscape of v α to emphasize the margin, causing Algorithm 1 to ﬁnd progressively more informative features.
At the end, we simply concatenate these features; contingent on the success of the kernel alignment steps, we have approximated the Nash equilibrium.
do 6:
Use Algorithm 1 (or other v α maximizer) on S with weights α t , returning ω t .
Append two features { Re φ x (cid:48) ( ω t ) , Im φ x (cid:48) ( − ω t ) } to each x i ’s representation Φ( x i ) .
Compute gradient g t := ∇ α F ( α t , λ t ) , where λ t = δ ω t + δ − ω t .
Update α t +1 ← Proj K
[ α t + η t
g
t ] .
10: end for 11: return features { Φ( x i ) ∈ R 2 T } ni =1 , or dual measure ¯ λ := 12 T (cid:80) Tt =1 δ ω t + δ − ω t .
We provide a theoretical analysis in Section 4.1, and detailed discussion on heuristics, hyperparameters, and implementation details in depth in Appendix A. One important note is that the online gradient g t = 1 − 2 Y Re( (cid:104)
Φ t , Y α t (cid:105) Φ t ) is computed very efﬁciently, where Φ t ( i ) =
φ x i ( ω t ) ∈
C m is the vector of the most recently appended features.
Langevin dynamics, easily implemented on a
GPU, comprise the primary time bottleneck.
T HEORY 4. C ONVERGENCE OF N O -R EGRET L EARNING D YNAMICS
We ﬁrst state the main theoretical result, which quantiﬁes the convergence properties of Algorithm 2.
Theorem 4.1 (Main) .
Assume that at each step t , Algorithm 1 returns an ε t -approximate global maximizer ω t (i.e., v α t ( ω t ) ≥ sup ω ∈ Ω v α t ( ω ) − ε t ).
Then, with a certain choice of step sizes η t ,
Algorithm 2 produces a dual measure ¯ λ ∈ L which satisﬁes
[Equation]
(Alternate form.)
Suppose instead that v α t ( ω t ) ≥ ρ at each time t .
Then, ¯ λ satisﬁes
[Equation]
4 √ T .
We prove Theorem 4.1 in Appendix C. For convenience, we state the ﬁrst version as an explicit margin bound (in terms of competitive ratio M/M ∗ ):
Corollary 4.2.
Let M be the margin obtained by training an (cid:96) 1 linear SVM with the same C as in
Algorithm 2, on the transformed samples { (Φ( x i ) , y i ) } .
Then, M is (1 − δ ) -competitive with M ∗ , the maximally achievable margin by a kernel with the assumed invariance, with
[Equation]
This bound arises from the regret analysis of online gradient ascent (Zinkevich, 2003); our analysis is similar to the approach of Freund & Schapire (1996), where they present a boosting perspective.
When using an (cid:96) 2 -SVM, the ﬁnal term can be improved to O ( log TT ) (Hazan et al., 2007).
For a general overview of results in the ﬁeld, refer to Hazan (2016).
G ENERALIZATION B OUNDS
Finally, we state two (rather distinct) generalization guarantees.
Both depend mildly on a bandwidth assumption (cid:107) ω (cid:107) 2 ≤ R ω and the norm of the data R x def = max i (cid:107) x i (cid:107) .
First, we state a margin- dependent SVM generalization bound, due to Koltchinskii & Panchenko (2002).
Notice the appearance of (cid:107) λ k (cid:107) 1 = R λ , justifying our choice of normalization constant for Algorithm 1.
Intriguingly, the end-to-end generalization error of our method decreases with an increasing number of random features, since the margin bound is being reﬁned during Algorithm 2.
Theorem 4.3 (Generalization via margin) .
For any SVM decision function f : X → R with a kernel k λ constrained by (cid:107) λ (cid:107) 1 ≤ R λ trained on samples S drawn i.i.d.
from distribution D , the generalization error is bounded by
[Equation]
The proof can be found in Appendix D. Note that this improves on the generic result for MKL, from
Theorem 2 in (Cortes et al., 2010), which has a √ log T dependence on the number of base kernels
T . This improvement stems from the rank-one property of each component kernel. Next, we address another concern entirely: the sample size required for v ( ω ) to approximate the ideal Fourier potential v ideal ( ω ) , the squared magnitude of the Fourier transform of the signed measure P − Q arising from the true distribution.
For the shift-invariant case:
Theorem 4.4 (Generalization of the potential) .
Let S be a set of i.i.d.
training samples on D , with n ≥ O (cid:16) d log
[Equation]
+log
[Equation]
(cid:17) .
We have that for all ω : (cid:107) ω (cid:107) ≤ R ω , with probability at least 1 − δ ,
[Equation]
The O ( · ) suppresses factors polynomial in R x and R ω .
The full statement and proof are standard, and deferred to Appendix E. In particular, this result allows for a mild guarantee of polynomial hitting-time on the locus of approximate local maxima of v ideal (as opposed to the empirical v ).
Adapting the main result from Zhang et al.
Theorem 4.5 (Langevin hitting time) .
Let ω τ be the output of Algorithm 1 on v α ( ω ) , after τ steps.
Algorithm 1 ﬁnds an approximate local maximum of v ideal in polynomial time.
That is, with U being the set of ε -approximate local maxima of v ideal ( ω ) , some ω t satisﬁes
[Equation]
for some τ ≤ O ( poly ( R x , R ω , d, ζ, ξ, ε − 1 , ∆ − 1 , log(1 /δ )) , with probability at least 1 − δ .
Of course, one should not expect polynomial hitting time on approximate global maxima; Roberts & Tweedie (1996) give asymptotic mixing guarantees.
E XPERIMENTS
In this section, we highlight the most important and illustrative parts of our experimental results.
For further details, we provide an extended addendum to the experimental section in Appendix A.
The
RBF(baseline,92.1%test)
D a t a { ( x i , y i ) } ; dua l w e i gh t s α t
T =100 (98.6%test)
T =300 (99.1%test)
T =1000 (99.3%test)
F ea t u r e s { ± ω i } T i = 1 ; po t
en t i a l v α ( ω )
SV M de c i s i on f un c t i on
[Figure]
First, we exhibit two simple binary classiﬁcation tasks, one in R 2 and the other on S 2 , to demonstrate the power of our kernel selection method.
As depicted in Figure 1, we create datasets with sharp boundaries, which are difﬁcult for the standard RBF and arccosine (Cho & Saul, 2009) kernel.
In both cases, n train = 2000 and n test = 50000 .
6 Used on a (cid:96) 1 -SVM classiﬁer, these baseline kernels saturate at 92.1% and 95.1% test accuracy, respectively; they are not expressive enough.
On the R 2 “windmill” task, Algorithm 2 chooses random features that progressively reﬁne the decision boundary at the margin.
By T = 1000 , it exhibits almost perfect classiﬁcation (99.7% training, 99.3% test).
Similarly, on the S 2 “checkerboard” task, Algorithm 2 (with some adaptations described in Appendix A.3) reaches almost perfect classiﬁcation (99.7% training, 99.1% test) at T = 100 , supported on only 29 spherical harmonics as features.
We provide some illuminating visualizations.
Figures 1a and 1b show the evolution of the dual weights, random features, and classiﬁer.
As the theory suggests, the objective evolves to assign higher weight to points near the margin, and successive features improve the classiﬁer’s decisiveness in challenging regions (1a, bottom).
Figure 1c visualizes some features from the S 2 experiment.
Next, we evaluate our kernel on standard benchmark binary classiﬁcation tasks.
Challenging label pairs are chosen from the MNIST (LeCun et al., 1998) and CIFAR-10 (Krizhevsky, 2009) datasets; each task consists of ∼ 10000 training and ∼ 2000 test examples; this is considered to be large-scale for kernel methods.
Following the standard protocol from Yu et al.
(2016), 512-dimensional HoG features (Dalal & Triggs, 2005) are used for the CIFAR-10 tasks instead of raw images.
Of course, our intent is not to show state-of-the-art results on these tasks, on which deep neural networks easily dominate.
Instead, the aim is to demonstrate viability as a scalable, principled kernel method.
We compare our results to baseline random features-based kernel machines: the standard RBF random features (RBF-RF for short), and the method of Sinha & Duchi (2016) (LKRF), 7 using the same (cid:96) 1 -SVM throughout.
As shown by Table 1, our method reliably outperforms these baselines, most signiﬁcantly in the regime of few features.
Intuitively, this lines up with the expectation that isotropic random sampling becomes exponentially unlikely to hit a good peak in high dimension; our method searches for these peaks. [Figure] [Table] [Figure]
[Table]
[Figure] [Table] [Figure] [Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
[Table]
Furthermore
[Table]
our theory predicts that the margin keeps improving, regardless of the dimensionality of the feature maps.
Indeed, as our classiﬁer saturates on the training data [Table] test accuracy continues increasing [Table]
without overﬁtting.
This decoupling of generalization from model complexity is characteristic of boosting methods.
In practice, our method is robust with respect to hyperparameter settings.
As well, to outperform both RBF-RF and LKRF with 5000 features, our method only needs ∼ 100 features.
Our GPU implementation reaches this point in ∼ 30 seconds.
See Appendix A.1 for more tuning guidelines.
C ONCLUSION
We have presented an efﬁcient kernel learning method that uses tools from Fourier analysis and online learning to optimize over two natural inﬁnite families of kernels.
With this method, we show meaningful improvements on benchmark tasks, compared to related random features-based methods.
Many theoretical questions remain, such as accelerating the search for Fourier peaks (e.g.
Hassanieh et al.
; Kapralov (2016)).
These, in addition to applying our learned kernels to state-of-the-art methods (e.g. convolutional kernel networks (Mairal et al., 2014; Yang et al., 2015a;
Mairal, 2016)), prove to be exciting directions for future work.
A CKNOWLEDGMENTS
We are grateful to Sanjeev Arora, Roi Livni, Pravesh Kothari, Holden Lee, Karan Singh, and Naman
Agarwal for helpful discussions.
This research was supported by the National Science Foundation (NSF), the Ofﬁce of Naval Research (ONR), and the Simons Foundation.
The ﬁrst two authors are supported in part by Elad Hazan’s NSF grant IIS-1523815.
A A PPENDIX FOR E XPERIMENTS
Algorithm 2 gives a high-level outline of the essential components of our method.
However, it conceals several hyperparameter choices and algorithmic heuristics, which are pertinent when applying our method in practice.
We discuss a few more details in this section.
A. H YPERPARAMETER T UNING G UIDE
Throughout all experiments presented, we use hinge-loss SVM classiﬁers with C = 1 .
Note that the convergence of Algorithm 2 depends quadratically on C .
With regard to Langevin diffusion (Algorithm 1), we observe that the best samples arise from using high temperatures and Gaussian parallel initialization.
For the latter, a rule-of-thumb is to initialize 500 parallel copies of Langevin dynamics, drawing the initial position { ω 0 } from a centered isotropic Gaussian with 1 . 5 × the variance of the optimal RBF random features.
(In turn, a common rule-of-thumb for this bandwidth is the median of pairwise Euclidean distances between data points.)
The step size in Algorithm 1 is tuned based on the magnitude of the gradient on v ( ω ) , which can be signiﬁcantly smaller than the upper bound derived in Section E. As is standard practice in Langevin
Monte Carlo methods, the temperature is chosen so that the pertubation is roughly at the same magnitude as the gradient step.
Empirically, running Langevin dynamics for ∼ 100 steps sufﬁces to locate a reasonably good peak.
To further improve efﬁciency, one can modify Algorithm 1 to pick the top k ≈ 10 samples, a k -fold speedup which does not degrade the features much.
The step size of online gradient ascent is set to balance between being conservative and promoting diverse samples; these steps should not saturate (thereby solving the dual SVM problem), in order to have the strongest regret bound.
In our experiments, we ﬁnd that the step size achieving the standard regret guarantee (scaling as 1 / √ T ) tends to be a little too conservative.
On the other hand, it never hurts (and seems important in practice) to saturate the peak-ﬁnding routine (Algorithm 1), since this contributes an additive improvement to the margin bound.
Noting that the objective is very smooth (the k -th derivative scales as R kx ), it may be beneﬁcial to reﬁne the samples using a few steps of gradient descent with a very small learning rate, or an accelerated algorithm for ﬁnding approximate local minima of smooth non-convex functions; see, e.g. Agarwal et al.
A. P ROJECTION ONTO THE SVM D UAL F EASIBLE S ET
A quick note on projection onto the feasible set K = { 0 (cid:52) α (cid:52) C, y T α = 0 } of the SVM dual convex program: it typically sufﬁces in practice to use alternating projection.
This feasible set is the intersection of a hyperplane and a hypercube; both of which admit a simple projection step.
The alternation projection onto the intersection of two non-empty convex sets was originally proposed by von Neumann (1949).
The convergence rate can be shown to be linear.
To obtain the dual variables in our experiments, we use 10 such alternating projections.
This results in a dual feasible solution up to hardware precision, and is a negligible component of the total running time (for which the parallel gradient computations are the bottleneck).
Algorithm
Alternating Projection for SVM Dual Constraints
Input: α ∈ R n
Parameters: box constraint C , label vector y .
repeat
Project onto the box: α = clip ( α , 0 , C )
Project onto the hyperplane: α ← α − y T α n y until convergence return α
A. S AMPLING S PHERICAL H ARMONICS
As we note in Section 3.1, it is unclear how to deﬁne gradient Langevin dynamics on v ( l, m ) in the inner-product case, since no topology is available on the indices ( l, m ) of the spherical harmonics.
One option is to emulate Langevin dynamics, by constructing a discrete Markov chain which mixes to λ ( l, m ) ∝ e βv ( l,m ) .
However, we ﬁnd in our experiments that it sufﬁces to compute λ ( l, m ) by examining all values of v ( l, m ) with j no more than some threshold J .
One should view this as approximating the kerneltarget alignment objective function via Fourier truncation.
This is highly parallelizable: it involves approximately N ( m, d )
degree- J polynomial evaluations on the same sample data, which can be expressed using matrix multiplication.
In our experiments, it sufﬁced to examine the ﬁrstcoefﬁcients; we remark that it is unnatural in any real-world datasets to expect that v ( ω ) only has large values outside the threshold J .
Under Fourier truncation, the domain of λ becomes a ﬁnite-dimensional simplex.
In the gametheoretic view of 4.1, an approximate Nash equilibrium becomes concretely achievable via Nesterov’s excessive gap technique (Nesterov, 2005; Daskalakis et al., 2015), given that the kernel player’s actions are restricted to a mixed strategy over a ﬁnite set of basis kernels.
Finally, we note a signiﬁcant advantage to this setting, where we have a discrete set of Fourier coefﬁcients: the same feature might be found multiple times.
When a duplicate feature is found, it need not be concatenated to the representation; instead, the existing feature is scaled appropriately.
This accounts for the drastically smaller support of features required to achieve near-perfect classiﬁcation accuracy.
B M ORE ON S PHERICAL H ARMONICS
In this section, we go into more detail about the spherical harmonics in d dimensions.
Although all of this material is standard in harmonic analysis, we provide this section for convenience, isolating only the relevant facts.
B. S PHERICAL H ARMONIC E XPANSION OF A R OTATION -I NVARIANT K ERNEL
First, we provide a proof sketch for Theorem 2.2.
We rely on the following theorem, an analogue of
Bochner’s theorem on the sphere, which characterizes rotation-invariant kernels:
Theorem B.1 (Schoenberg (1942)) .
A continuous rotation-invariant function k ( x , x (cid:48) )
=
k ( (cid:104) x , x (cid:48) (cid:105) ) on S d − 1 × S d − 1 is positive semi-deﬁnite if and only if its expansion into Gegenbauer polynomials
P di has only non-negative coefﬁcients, i.e.
[Equation]
with λ m ≥ 0 , ∀ m ∈ N + .
The Gegenbauer polynomials P dm : [ − 1 , 1] → R are a generalization of the Legendre and Chebyshev polynomials; they form an orthogonal basis on [ − 1 , 1] under a certain weighting function (see Stein & Weiss (2016);
Gallier (2009); M¨uller (2012) for details).
Note that we adopt a different notation from Schoenberg (1942), which denotes our P dm by P ( d − 1) / 2 m .
Unlike Theorem 2.1, Theorem B.1 alone does not provide a clear path for constructing a feature map for inner-product kernel, because the inputs x , x (cid:48) of the kernel are still coupled after the expansion into P d m , which acts on the inner product (cid:104)
x , x (cid:48) (cid:105) instead of on x and x (cid:48) separately.
Fortunately, (see, e.g., Proposition 1.18 in Gallier (2009)), the Gegenbauer polynomials evaluated on an inner product admits a decomposition into spherical harmonics Y d(cid:96),m :
[Equation]
where | S d − 1 | denotes the surface area of S d − 1 , and N ( d, (cid:96) )
= (cid:0) d − 1+ (cid:96) (cid:96) (cid:1) − (cid:0) d − 1+ (cid:96) (cid:96) − 2 (cid:1) .
Here, we use the normalization convention that (cid:82) S d − 1 | Y d(cid:96),m
( x ) | 2 d x = 1 .
From the existence of this expansion follows the claim from Theorem 2.2.
For a detailed reference, see M¨uller (2012).
B. P AIRING THE S PHERICAL H ARMONICS
We now specify the involution ω (cid:55)→ − ω on indices of spherical harmonics, which gives a pairing that takes the role of opposite Fourier coefﬁcients in the X = R d case.
In particular, the Fourier transform λ of a real-valued function k : R n → R satisﬁes λ ( ω ) =
λ ( − ω ) , so that the dual measure can be constrained to be symmetric.
Now, consider the X = S d − 1 case, where the Fourier coefﬁcients are on the set Ω of valid indices of spherical harmonics.
We would like a permutation on the indices σ so that σ ( σ ( ω ))
= ω , and λ ( ω ) =
λ ( σ ( ω )) whenever λ is the spherical harmonic expansion of a real kernel.
For a ﬁxed dimension d and degree (cid:96) , the spherical harmonics form an N := N ( d, (cid:96) )
-dimensional orthogonal basis for a vector space V of complex polynomials from S d − 1 to C , namely the (cid:96) - homogeneous polynomials (with domain extended to R n ) which are harmonic (eigenfunctions of the Laplace-Beltrami operator ∆ S d − 1 ).
This basis is not unique; an arbitrary choice of basis may not contain pairs of conjugate functions.
Fortunately, such a basis exists constructively, by separating the Laplace-Beltrami operator over spherical coordinates ( θ 1 , . .
. , θ d − 1 ).
Concretely, for a ﬁxed d and (cid:96) , the d -dimensional spherical harmonic, indexed by | (cid:96) 1 | ≤ (cid:96) 2 ≤ (cid:96) 3 ≤ . . .
≤ (cid:96) d − 1 , is deﬁned as:
[Equation]
where the functions in the product come from a certain family of associated Legendre functions in sin θ .
For a detailed treatment, we adopt the construction and conventions from Higuchi (1987).
In the scope of this paper, the relevant fact is that the desired involution is well-deﬁned in all dimensions.
Namely, consider the permutation σ that sends a spherical harmonic indexed by ω
= ( d, (cid:96), (cid:96) 1 , (cid:96) 2 , . . .
, (cid:96) d − 1 ) to σ ( ω ) =
( d, (cid:96), − (cid:96) 1 , (cid:96) 2 , . . .
, (cid:96) d − 1 ) .
Then, Y − ω ( x ) def =
Y σ ( ω ) ( x )
=
Y ω ( x ) for all ω, x .
The symmetry condition in Theorem 2.2 follows straightforwardly.
By orthonormality, we know that every square-integrable function f : R n → C has a unique decomposition into spherical harmonics, with coefﬁcients λ
ω = (cid:104) f, Y ω (cid:105) , so that λ − ω
=
(cid:10) f, Y ω (cid:11) = λ ω .
When f is real-valued, we conclude that λ − ω = − λ ω , as claimed.
C P ROOF OF THE M AIN T HEOREM
In this section, we prove the main theorem, which quantiﬁes convergence of Algorithm 2 to the Nash equilibrium.
We restate it here:
Theorem 4.1.
Assume that during each timestep t , the call to Algorithm 1 returns an ε t -approximate global maximizer ω t (i.e. ˆ v α t ( ω t ) ≥ max ω ∈K ˆ v α t ( ω ) − ε t ).
Then, Algorithm 2 returns a dual measure ¯ λ , which satisﬁes
[Equation]
Alternatively with the assumption that at each timestep t , ˆ v α t ( ω t ) ≥ ρ , ¯ λ , satisﬁes
[Equation]
If Algorithm 2 is used on a l 2 -SVM, the regret bound can be improved to be O ( log TT ) .
Proof.
We will make use of the regret bound of online gradient ascent (see, e.g., (Hazan, 2016)).
Here we only prove the theorem in the case for l 1 -SVM with box constraint C , under the assumption of ε t -approximate optimality of Algorithm 1.
Extending the proof to other cases is straightfoward.
Lemma C.1 (Regret bound for online gradient ascent) .
Let D be the diameter of the constraint set
K , and G a Lipschitz constant for an arbitrary sequence of concave functions f t ( α ) def = F ( α , λ t ) on K .
Online gradient ascent on f t ( α ) , with step size schedule η t =
GD √ t , guarantees the following for all T ≥ 1 :
[Equation]
Here, D ≤ C √ n by the box constraint, and we have
[Equation]
Thus, our regret bound is 3 n ( C +2 C 2 ) 2 √ T ; that is, for all T ≥ 1 ,
[Equation]
Since at each timestep t , ˆ v α t [Equation] ω t ) ≥ max [Equation]
ˆ
[Equation]
ω
[Equation]
− ε t , we have by assumption
[Equation]
and by concavity of F in α , we know that, for any ﬁxed sequence α 1 , α
[Equation]
. . . , α T ,
[Equation]
it follows that
[Equation]
To complete the proof, note that for a given α ∈ K , 12 T (cid:80) Tt =1 F ( α , δ ω t + δ − ω t )
=
F ( α , ¯ λ ) by linearity of F in the dual measure; here, ¯ λ = 12 T (cid:80) Tt =1 δ ω t + δ − ω t is the approximate Nash equilibrium found by the no-regret learning dynamics. D P ROOF OF T HEOREM 4.
In this section, we compute the Rademacher complexity of the composition of the learned kernel and the classiﬁer, proving Theorem 4.3.
Theorem 4.3. For any SVM decision function f : X → R with a kernel k λ constrained by (cid:107) λ (cid:107) 1 ≤ R λ trained on samples S drawn i.i.d. from distribution D , the generalization error is bounded by [Equation]
Proof.
For a ﬁxed sample S = { x i } ni =1 , we compute the empirical Rademacher complexity of the composite hypothesis class.
Below, σ ∈ R n is a vector of i.i.d.
Rademacher random variables.
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
Note that each term in the formula is the empirical Rademacher complexity of the composition of a 1-Lipschitz function (cosine or sine) with a linear function with (cid:96) 2 norm bounded by R ω .
By the composition property of Rademacher complexity, we have the following:
[Equation]
and because sin( · ) is an odd function,
[Equation]
Putting everything together, we ﬁnally obtain that
[Equation]
from which we apply the result from Koltchinskii & Panchenko (2002) to conclude the theorem.
E S AMPLE C OMPLEXITY FOR THE F OURIER P OTENTIAL
In this section, we prove the following theorem about concentration of the Fourier potential.
It sufﬁces to disregard the reweighting vector α ; to recover a guarantee in this case, simply replace ε with ε/C 2 .
Note that we only argue this in the translation-invariant case.
Theorem 4.4.
Let S = { ( x i , y i ) } ni =1 be a set of i.i.d.
training samples.
Then, if
[Equation]
we have that with probability at least 1 − δ , (cid:12)(cid:12) 1 n 2 v ( n ) ( ω ) − v ideal ( ω ) (cid:12)(cid:12) ≤ ε for all ω ∈ Ω such that (cid:107) ω (cid:107) ≤ R ω .
Let P ( n ) , Q ( n ) denote the empirical measures from a sample S of size n , arising from i.i.d.
samples from the true distribution, whose classes have measures P , Q , adopting the convention P ( X ) + Q ( X ) = 1 .
Then, in expectation over the sampling, and adopting the same normalization conventions as in the paper, we have E [ P ( n ) /n ]
= P and E [ Q ( n ) /n ]
= Q for every n .
Let v ( n ) ( ω ) denote the empirical Fourier potential, computed from P ( n ) , Q ( n ) , so that we have
E [ v ( n ) ( ω ) /n 2 ]
= v ideal ( ω ) .
The result follows from a concentration bound on v ( n ) ( ω ) /n 2 .
We ﬁrst show that it is Lipschitz:
Lemma E.1 (Lipschitzness of v ( n ) in ω ) .
The function
[Equation]
is 2 n 2 R x -Lipschitz with respect to ω .
Proof.
We have
[Equation]
Thus, the Lipschitz constant of v ( n ) ( ω ) /n 2 scales linearly with the norm of the data, a safe assumption.
Next, we show Lipschitzness with respect to a single data point:
Lemma E.2 (Lipschitzness of v ( n ) in x i ) .
v ( n ) ( ω ) is 2 nR ω -Lipschitz with respect to any x i .
Proof.
Similarly as above:
[Equation]
Now, we complete the proof.
By Lemma E.2, replacing one x i with another x (cid:48) i (whose norm is also bounded by R x ) changes v ( n ) ( ω ) /n 2 by at most 4 R x R ω /n .
Then, by McDiarmid’s inequality (McDiarmid, 1989), we have the following fact:
Lemma E.3 (Pointwise concentration of v ( n ) ) .
For all ω ∈ Ω and ε > 0 ,
[Equation]
Now, let W be an ( ε/R ω ) -net of the set { ω ∈ Ω : (cid:107) ω (cid:107) ≤ R ω } .
Applying the union bound on Lemma E.3 with ω ranging over each element of W , we have
[Equation]
To make the LHS smaller than δ , it sufﬁces to choose
[Equation]
which is the claimed sample complexity.