Hyperkernels: Cheng Soon Ong, Alexander J. Smola, Robert C. Williamson
Hyperkernels: Cheng Soon Ong, Alexander J. Smola, Robert C. Williamson
Abstract
1 Introduction
Choosing suitable kernel functions for estimation using Gaussian Processes and Support
Vector Machines is an important step in the inference process. To date, there are few if
any systematic techniques to assist in this choice. Even the restricted problem of choosing
the “width” of a parameterized family of kernels (e.g. Gaussian) has not had a simple and
elegant solution.
A recent development [1] which solves the above problem in a restricted sense involves
the use of semidefinite programming to learn an arbitrary positive semidefinite matrix ,
subject to minimization of criteria such as the kernel target alignment [1], the maximum of
the posterior probability [2], the minimization of a learning-theoretical bound [3], or subject
to cross-validation settings [4]. The restriction mentioned is that the methods work with the
kernel matrix, rather than the kernel itself. Furthermore, whilst demonstrably improving the
performance of estimators to some degree, they require clever parameterization and design
to make the method work in the particular situations. There are still no general principles to
guide the choice of a) which family of kernels to choose, b) efficient parameterizations over
this space, and c) suitable penalty terms to combat overfitting. (The last point is particularly
an issue when we have a very large set of semidefinite matrices at our disposal).
Whilst not yet providing a complete solution to these problems, this paper presents a frame-
work that allows the optimization within a parameterized family relatively simply, and cru-
cially, intrinsically captures the tradeoff between the size of the family of kernels and the
sample size available. Furthermore, the solution presented is for optimizing kernels them-
selves, rather than the kernel matrix as in [1]. Other approaches on learning the kernel
include using boosting [5] and by bounding the Rademacher complexity [6].
Outline of the Paper We show (Section 2) that for most kernel-based learning methods
there exists a functional, the quality functional1, which plays a similar role to the empiri-
cal risk functional, and that subsequently (Section 3) the introduction of a kernel on ker-
nels, a so-called hyperkernel, in conjunction with regularization on the Reproducing Ker-
nel Hilbert Space formed on kernels leads to a systematic way of parameterizing function
classes whilst managing overfitting. We give several examples of hyperkernels (Section 4)
and show (Section 5) how they can be used practically. Due to space constraints we only
consider Support Vector classification.
2 Quality Functionals
Let
denote the set of training data and the
"#%$
!
set of corresponding labels, jointly drawn iid from some probability distribution
on &('*) /0$
. Furthermore, let and +-, +-,.
denote the corresponding test sets (drawn from
the same ! ). Let 1
2 43 +-,.
and . 5
6 7 83 7+-,.
9
; %7 $
We introduce a new class of functionals on data which we call quality functionals. Their
:
purpose is to indicate, given a kernel and the training data , how suitable
the kernel is for explaining the training data.
:
Definition 1 (Empirical Quality Functional) Given a kernel , and data
9<+-=?>%@ : C # D;< E A
, define
: :B BC# 0D$$
to be an empirical quality functional if it depends on only via
F
9 +-=?> @ : <AGHF0
IJ@ :B C # D $ A CK D
where ; i.e. if there exists a function such that
9 +-=?>
9!@ :RA/
2SUT K V @ 9L+-=?>R@ : < AWA
Definition 2 (Expected Quality Functional) Suppose is an empirical quality func-
tional. Then (1)
is the expected quality functional, where the expectation is taken with respect to .
between
X +-=?>%@ Y similarity
Note the <AL [ Z CW\"] C9 #+-=?C > YG@ : C^$#$ <(where
A and ] the empirical risk of an estimator
cases we/compute
is a suitable loss function): indrawn
both
from !
#%$ and a function, and in both cases we have
the value of a functional which depends on some sample
9!@ :RAP2S_T K V @ 9<+-=?>%@ : <A`A and X @ YAP6S_T K V @ X +-=?>%@ Y <A`A (2)
X
Here @ YA is known as the expected risk. We now present some examples of quality func-
tionals, and derive their exact minimizers whenever possible.
Example 1 (Kernel Target Alignment) This quality functional was introduced in [7] to
assess the “alignment” of a kernel with training labels. It is defined by
%g
9 +-=?a b> =?+- c @ : A/
Jdfe hijhk h h
k k
(3)
Z C,K D hjh Ck k D denotes the l k norm of , and h h k
which case
The minimizer of (6) is more difficult to find, since we R g have to carry out a double mini-
mization over and . First, note that for
# "
g +"-, . Thus 9 +-b ., @ : A< k / $ . For sufficiently large " , we and and $&%(')%(* , 6
d ] C C @ jA C $
g ] C C 2 C 7$
8h 2 h kk
CW\"
CW\"
Choosing each 2 98o;:4<=
C k
] CC ? >7$ /k > yields the minimum with respect to 2 . The
proof that is the global minimizer of this quality functional is omitted for brevity.
d G G
, Y DE : !
(7)
Note that any G G
which does not have full rank will send (7) to I H , and thus such cases e
J
d
which leads to C
G G
d . UnderC the assumption
minimum of 9 +-=?>
Other examples, such as cross-validation, leave-one-out estimators, the Luckiness frame-
work, the Radius-Margin bound also have empirical quality functionals which can be arbi-
trarily minimized.
The above examples illustrate how many existing methods for assessing the quality of a
kernel fit within the quality functional framework. We also saw that given a rich enough
class of kernels , optimization of N 9 +-=?>
over would result in a kernel that would be N
useless for prediction purposes. This is yet another example of the danger of optimizing
too much — there is (still) no free lunch.
3 A Hyper Reproducing Kernel Hilbert Space
We now introduce a method for optimizing quality functionals in an effective way. The
method we propose involves the introduction of a Reproducing Kernel Hilbert Space on
:
the kernel itself — a “Hyper”-RKHS. We begin with the basic properties of an RKHS
(see Def 2.9 and Thm 4.2 in [8] and citations for more details).
The advantage of optimization in an RKHS is that under certain conditions the optimal
solutions can be found as the linear combination of a finite number of basis functions,
regardless of the dimensionality of the space , as can be seen in the theorem below.
5
The above definition allows us to define an RKHS on kernels & 5 ' & Q , simply by
introducing &
6& ' & and by treating : as functions :
& Q :
Definition 5 (Hyper Reproducing Kernel Hilbert Space) Let & be a nonempty set and
let &
5& ' & (the compounded index set). Then the Hilbert space of functions
:
& Q , endowed with a dot product W
(and the norm h : h : : ) is called5
a Hyper Reproducing Kernel Hilbert Space if there exists a hyperkernel :
& ' & Q
: :
$ :B $ for all : E , in particular,
with the following properties:
1. : has
$
the
$
reproducing
$
property
:
:
: .
$ G E & .
2. : spans , i.e. E
8) :
E & , the& function : is a kernel in its second argument, i.e. for
:B /# $
: / $#$ with "# E & is a kernel.
What distinguishes from a normal RKHS is the particular form of its index set ( & & )
k
and the additional condition on : to be a kernel in its second argument for any fixed first
argument. This condition somewhat limits the choice of possible kernels. On
hand, it allows for simple optimization algorithms which consider kernels :
E the, which
other
are in the convex cone of : . Analogously to the definition of the regularized risk functional
(5), we define the regularized quality functional:
9 +-b @ : <A/
69 +-=?> @ : LA
h : h k (10)
where
is a regularization constant and :
h h k denotes the RKHS norm in . Mini-
mization of 9<+-b is less prone to overfitting than minimizing 9M+-=?> , since the regularization
h h k effectively controls the complexity of the class of kernels under consideration.
term /k :
Regularizers other than / k :
h h k are also possible. The question arising immediately from
(10) is how to minimize the regularized quality functional efficiently. In the following we
show that the minimum can be found as a linear combination of hyperkernels.
@ $
5 Theorem for Hyper-RKHS) Let be a hyper-RKHS and de-
Corollary 6 (Representer
H Q & 9
: E
note by a strictly monotonic increasing function, by a set, and by
an arbitrary quality functional. Then each minimizer of the regularized quality
functional
9!@ : <A
h: hk (11)
admits a representation of the form :B
/
#
$
CK D\" " CD : # PC#0D $ /# #$ $ .
C D
PC#0D $ 9 D @ : _A
Proof All we need to do is rewrite (11) so that it satisfies the conditions of Theorem 4. Let
:
. Then
on via its values at
C
;
. Furthermore, / k h: hk
has the properties of a loss function, as it only depends
is an RKHS regularizer, so the representer
theorem applies and the expansion of follows. :
This result shows that even though we are optimizing over an entire (potentially infinite
dimensional) Hilbert space of kernels, we are able to find the optimal solution by choosing
among a finite dimensional subspace. The dimension required ( ) is, not surprisingly, sig-
k
nificantly larger than the number of kernels required in a kernel function expansion which
makes a direct approach possible only for small problems. However, sparse expansion
techniques, such as [9, 8], can be used to make the problem tractable in practice.
4 Examples of Hyperkernels
Having introduced the theoretical basis of the Hyper-RKHS, we need to answer the ques-
:
tion whether practically useful exist which satisfy the conditions of Definition 5. We
address this question by giving a set of general recipes for building such kernels.
: C
5 4 (Power
5
B $ Z C`\ /] C
Example Series Construction) Denote by a positive semidefinite kernel, and
Q
X : k / $ X
by a function with positive Taylor
expansion coefficients and
convergence radius . Then for we have that
C
: # $
B7:j $ :B $#$ WC \ ] C :B $ :B $#$
(12)
@ d A
Example 5 (Harmonic Hyperkernel) A special case of (12) is the harmonic hyperkernel:
set
] C
H d : e $ C #Q :
&(';&
for some . Then we have
Denote by a kernel with (e.g., RBF kernels satisfy this property), and
d
C
: # $ dfe $ C`\ :B $ :B $ $ fd e dfe:B $ :j $
(13)
: # /# $i # $$ dfe Le k h dfe e h k hi e h k $#$ (14)
For Q d , : converges to
K ; that is, the expression h : h k converges to the Frobenius
norm of : on 1' .
B $
Power
series expansion
2 2
X We can find further hyperkernels,
d
H simply by consulting tables on
6 * 2
k K
power series of functions. Ta-
;<
H ble 1 contains a list of suitable
* 2 *
[
E
d k k H
expansions. Recall that expan-
[ *
6 sions such as (12) were mainly
8o m )8
k K 1 chosen for computational conve-
$ * [
2
e D / dfe
k 1
nience, in particular whenever it
is not clear which particular class
of kernels would be useful for the
Table 1: Examples of Hyperkernels
expansion.
:
kernels could be potentially relevant (e.g., a range of scales of kernel width, polynomial
degrees, etc.), we may begin with a set of candidate kernels, say , . . . , and define :
: #
$ ] C C $ C $
`C \" : : : C $
(15)
] : : $i is ] k a: k hyperkernel,
Clearly $ ] : since
$ $ : W$ $ . $ ,
where
$
.
For Y
Z C C :B C #$ , the second term h Y h k is a linear function of : . Given a convex
]
loss function , the regularized quality functional (16) is convex in : . The corresponding
regularized quality functional is:
:
For fixed , the problem can be formulated as a constrained minimization problem in , and Y
subsequently expressed in terms of the Lagrange multipliers . However, this minimum
:
depends on , and for efficient minimization we would like to compute the derivatives with
:
respect to . The following lemma tells us how (it is an extension of a result in [3] and we
omit the proof for brevity):
E 5 YG / $i ] C
5
5
Y
Lemma 7 Let and denote by Q convex functions, where is X $
parameterized
denote by
by . Let
its minimizer):
be the minimum $
of the following optimization problem (and
Then $ % '& k YG $ $ , where ( E*) and & k denotes the derivative with respect to
the second argument of Y .
Since the minimizer of (17) can be written as a kernel expansion (by the representer theo-
rem for Hyper-RKHS), the optimal regularized quality functional can be written as (using
CD
: # C#0D$i %# $$ :
the soft margin loss and
9 +-+-bb ,
@ " MA CW\" 8 d
fd e DK K \" D " C
D
C
(19)
C D CD
C
D CD
CK DK K \" "
Minimization of (19) is achieved by alternating between minimization over for fixed "
C
D
is a quadratic optimization problem), and subsequently minimization over " (with
(this
" to ensure positivity of the kernel matrix) for fixed .
Low Rank Approximation While being finite in the number of parameters (despite the
optimization over two possibly infinite dimensional Hilbert spaces and ), (19) still
presents a formidable optimization problem in practice (we have coefficients for " ).
k
: C $:C $ lk
For an explicit
expansion of type (15) we can optimize in the expansion coefficients of
directly, which means that we simply have a quality functional with an
penalty on the expansion coefficients. Such an approach is recommended if there are few
"
), we resort to a low-rank approximation, as
: BC#0D $ $ c
terms in (15). In the general case (or if
described in [9, 8]. This means that we pick from
with
(
a small d
fraction of terms which approximate on :
sufficiently well. '
6 Experimental Results and Summary
Experimental Setup To test our claims of kernel adaptation via regularized quality func-
tionals we performed preliminary tests on datasets from the UCI repository (Pima, Iono-
sphere, Wisconsin diagnostic breast cancer)
and the USPS database of handwritten digits
(’6’ vs. ’9’). The datasets were split into training data and test data, except for
the USPS data, where the provided split was used. The experiments were repeated over
200 random 60/40 splits. We deliberately did not attempt to tune parameters and instead
made the following choices uniformly for all four sets:
The kernel width was set to , 5d
, where is the dimensionality of the
data. We deliberately chose a too large value in comparison with the usual rules
of thumb [8] to avoid good default
kernels. 4
was adjusted so that d
(that is Hd
in the Vapnik-style parameter-
ization of SVMs). This/ has commonly been reported to yield good results.
for the Gaussian Harmonic Hyperkernel was chosen to be throughout, giv-
ing adequate coverage over various kernel widths in (13) (small focus almost
exclusively on wide kernels, close to will treat d
all widths equally).
The hyperkernel regularization was set to , . d
We compared the results with the performance of a generic Support Vector Machine with
the same values chosen for and and one for which had been hand-tuned using cross
validation.
Results Despite the fact that we did not try to tune the parameters we were able to achieve
highly competitive results as shown in Table 2. It is also worth noticing that the number of
hyperkernels required after a low-rank decomposition of the hyperkernel matrix contained
typically less than 10 hyperkernels, thus rendering the optimization problem not much
more costly than a standard Support Vector Machine (even with a very high quality , d
approximation of ) and that after the optimization of (19), typically less than were being
only rather than ). Results based on 9M+-b
are comparable to hand tuned SVMs
(right most column), except for the ionosphere data. We suspect that this is due to the small
training sample.
Summary and Outlook The regularized quality functional allows the systematic solu-
tion of problems associated with the choice of a kernel. Quality criteria that can be used
include target alignment, regularized risk and the log posterior. The regularization implicit
in our approach allows the control of overfitting that occurs if one optimizes over a too
large a choice of kernels.
A very promising aspect of the current work is that it opens the way to theoretical analyses
of the price one pays by optimizing over a larger set N
of kernels. Current and future
research is devoted to working through this analysis and subsequently developing methods
for the design of good hyperkernels.
Acknowledgements This work was supported by a grant of the Australian Research
Council. The authors thank Grace Wahba for helpful comments and suggestions.
References
[1] G. Lanckriet, N. Cristianini, P. Bartlett, L. El Ghaoui, and M. Jordan. Learning the
kernel matrix with semidefinite programming. In ICML. Morgan Kaufmann, 2002.
[2] C. K. I. Williams. Prediction with Gaussian processes: From linear regression to
linear prediction and beyond. In M. I. Jordan, editor, Learning and Inference in
Graphical Models. Kluwer Academic, 1998.
[3] O. Chapelle, V. Vapnik, O. Bousquet, and S. Mukherjee. Choosing kernel parameters
for support vector machines. Machine Learning, 2002. Forthcoming.
[4] G. Wahba. Spline Models for Observational Data, volume 59 of CBMS-NSF Regional
Conference Series in Applied Mathematics. SIAM, Philadelphia, 1990.
[5] K. Crammer, J. Keshet, and Y. Singer. Kernel design using boosting. In Advances in
Neural Information Processing Systems 15, 2002. In press.
[6] O. Bousquet and D. Herrmann. On the complexity of learning the kernel matrix. In
Advances in Neural Information Processing Systems 15, 2002. In press.
[7] N. Cristianini, A. Elisseeff, and J. Shawe-Taylor. On optimizing kernel alignment.
Technical Report NC2-TR-2001-087, NeuroCOLT, http://www.neurocolt.com, 2001.
[8] B. Schölkopf and A. J. Smola. Learning with Kernels. MIT Press, 2002.
[9] S. Fine and K. Scheinberg. Efficient SVM training using low-rank kernel representa-
tion. Technical report, IBM Watson Research Center, New York, 2000.
[10] Y. Freund and R. E. Schapire. Experiments with a new boosting algorithm. In ICML,
pages 148–146. Morgan Kaufmann Publishers, 1996.
[11] G. Rätsch, T. Onoda, and K. R. Müller. Soft margins for adaboost. Machine Learning,
42(3):287–320, 2001.