Exploring Large Feature Spaces with Hierarchical Multiple Kernel Learning
Francis Bach
Introduction
In the last two decades, kernel methods have been a prolific theoretical and algorithmic machine learning framework. By using appropriate regularization by Hilbertian norms, representer theorems enable to consider large and potentially infinite-dimensional feature spaces while working within an implicit feature space no larger than the number of observations. This has led to numerous works on kernel design adapted to specific data types and generic kernel-based algorithms for many learning tasks (see, e.g., ).
More precisely, we consider a positive definite kernel that can be expressed as a large sum of positive definite basis or local kernels. This exactly corresponds to the situation where a large feature space is the concatenation of smaller feature spaces, and we aim to do selection among these many kernels, which may be done through multiple kernel learning . One major difficulty however is that the number of these smaller kernels is usually exponential in the dimension of the input space and applying multiple kernel learning directly in this decomposition would be intractable.
Finally, we extend in Section 4 some of the known consistency results of the Lasso and multiple kernel learning , and give a partial answer to the model selection capabilities of our regularization framework by giving necessary and sufficient conditions for model consistency. In particular, we show that our framework is adapted to estimating consistently only the hull of the relevant variables. Hence, by restricting the statistical power of our method, we gain computational efficiency.
Hierarchical multiple kernel learning (HKL)
Our sum assumption corresponds to a situation where the feature map and feature space for is the concatenation of the feature maps for each kernel , i.e, and . Thus, looking for a certain and a predictor function is equivalent to looking jointly for , for all , and .
As mentioned earlier, we make the assumption that the set can be embedded into a directed acyclic graph. Directed acyclic graphs (referred to as DAGs) allow to naturally define the notions of parents, children, descendants and ancestors. Given a node , we denote by the set of its ancestors, and by , the set of its descendants. We use the convention that any is a descendant and an ancestor of itself, i.e., and . Moreover, for , we let denote the set of sources of the graph restricted to (i.e., nodes in with no parents belonging to ). Given a subset of nodes , we can define the hull of as the union of all ancestors of , i.e., . Given a set , we define the set of extreme points of as the smallest subset such that (note that it is always well defined, as ). See Figure 1 for examples of these notions.
The goal of this paper is to perform kernel selection among the kernels , . We essentially use the graph to limit the search to specific subsets of . Namely, instead of considering all possible subsets of active (relevant) vertices, we are only interested in estimating correctly the hull of these relevant vertices; in Section 2.2, we design a specific sparsity-inducing norms adapted to hulls.
In this paper, we primarily focus on kernels that can be expressed as “products of sums”, and on the associated -dimensional directed grids, while noting that our framework is applicable to many other kernels. Namely, we assume that the input space factorizes into components and that we are given sequences of length of kernels , , , such that . We thus have a sum of kernels, that can be computed efficiently as a product of sums. A natural DAG on is defined by connecting each to , , . As shown in Section 2.2, this DAG will correspond to the constraint of selecting a given product of kernels only after all the subproducts are selected. Those DAGs are especially suited to nonlinear variable selection, in particular with the polynomial and Gaussian kernels. In this context, products of kernels correspond to interactions between certain variables, and our DAG implies that we select an interaction only after all sub-interactions were already selected.
where , , and is the -th Hermite polynomial. By appropriately truncating the sum, i.e, by considering that the first basis kernels are obtained from the first single Hermite polynomials, and the -th kernel is summing over all other kernels, we obtain a decomposition of a uni-dimensional Gaussian kernel into components ( of them are one-dimensional, the last one is infinite-dimensional, but can be computed by differencing). The decomposition ends up being close to a polynomial kernel of infinite degree, modulated by an exponential . One may also use an adaptive decomposition using kernel PCA (see, e.g., ), which is equivalent to using the eigenvectors of the empirical covariance operator associated with the data (and not the population one associated with the Gaussian distribution with same variance). In simulations, we tried both with no significant differences.
Finally, by taking product over all variables, we obtain a decomposition of the -dimensional Gaussian kernel into components, that are adapted to nonlinear variable selection. Note that for , we obtain ANOVA-like decompositions .
2 Graph-based structured regularization
Given , the natural Hilbertian norm is defined through . Penalizing with this norm is efficient because summing all kernels is assumed feasible in polynomial time and we can bring to bear the usual kernel machinery; however, it does not lead to sparse solutions, where many will be exactly equal to zero.
As said earlier, we are only interested in the hull of the selected elements , ; the hull of a set is characterized by the set of , such that , i.e., such that all descendants of are in the complement : . Thus, if we try to estimate , we need to determine which are such that . In our context, we are hence looking at selecting vertices for which .
where are positive weights. Penalizing by such a norm will indeed impose that some of the vectors are exactly zero. We thus consider the following minimization problemFollowing , we consider the square of the norm, which does not change the regularization properties, but allow simple links with multiple kernel learning.:
Finally, note that in certain settings (finite dimensional Hilbert spaces and distributions with absolutely continuous densities), these norms have the effect of selecting a given kernel only after all of its ancestors . This is another explanation why hulls end up being selected, since to include a given vertex in the models, the entire set of ancestors must also be selected.
Optimization problem
In this section, we give optimality conditions for the problems in Eq. (1), as well as optimization algorithms with polynomial time complexity in the number of selected kernels. In simulations we consider total numbers of kernels larger than , and thus such efficient algorithms are essential to the success of hierarchical multiple kernel learning (HKL).
The problem in Eq. (1) is thus equivalent to
The pair is optimal for Eq. (1), with , if and only if given , is optimal for the single kernel learning problem with kernel matrix , and given , maximizes
Moreover, the total duality gap can be upperbounded as the sum of the two separate duality gaps for the two optimization problems, which will be useful in Section 3.2 (see Appendix for more details). Note that in the case of “flat” regular multiple kernel learning, where the DAG has no edges, we obtain back usual optimality conditions .
Following a common practice for convex sparsity problems , we will try to solve a small problem where we assume we know the set of such that is equal to zero (Section 3.3). We then “simply” need to check that variables in that set may indeed be left out of the solution. In the next section, we show that this can be done in polynomial time although the number of kernels to consider leaving out is exponential (Section 3.2).
2 Conditions for global optimality of reduced problem
We let denote the complement of the set of norms which are set to zero. We thus consider the optimal solution of the reduced problem (on ), namely,
with optimal primal variables , dual variables and optimal pair . We now consider necessary conditions and sufficient conditions for this solution (augmented with zeros for non active variables, i.e., variables in ) to be optimal with respect to the full problem in Eq. (1). We denote by the optimal value of the norm for the reduced problem.
If the reduced solution is optimal for the full problem in Eq. (1) and all kernels in the extreme points of are active, then we have
If , then the total duality gap is less than .
The proof is fairly technical and can be found in the Appendix; this result constitutes the main technical contribution of the paper: it essentially allows to solve a very large optimization problem over exponentially many dimensions in polynomial time.
The necessary condition does not cause any computational problems. However, the sufficient condition requires to sum over all descendants of the active kernels, which is impossible in practice (as shown in Section 5, we consider of cardinal often greater than ). Here, we need to bring to bear the specific structure of the kernel . In the context of directed grids we consider in this paper, if can also be decomposed as a product, then is also factorized, and we can compute the sum over all in linear time in . Moreover we can cache the sums in order to save running time.
3 Dual optimization for reduced or small problems
4 Kernel search algorithm
We are now ready to present the detailed algorithm which extends the feature search algorithm of . Note that the kernel matrices are never all needed explicitly, i.e., we only need them (a) explicitly to solve the small problems (but we need only a few of those) and (b) implicitly to compute the sufficient condition , which requires to sum over all kernels, as shown in Section 3.2.
Initialization: set , compute solutions of Eq. (3), obtained using Section 3.3
while and are not satisfied and
If is not satisfied, add violating variables in to else, add violating variables in of to
Recompute optimal solutions of Eq. (3)
The previous algorithm will stop either when the duality gap is less than or when the maximal number of kernels has been reached. In practice, when the weights increase with the depth of in the DAG (which we use in simulations), the small duality gap generally occurs before we reach a problem larger than . Note that some of the iterations only increase the size of the active sets to check the sufficient condition for optimality; forgetting those does not change the solution, only the fact that we may actually know that we have an -optimal solution.
In the directed -grid case, the total running time complexity is a function of the number of observations , and the number of selected kernels; with proper caching, we obtain the following complexity, assuming for the single kernel learning problem, which is conservative: , which decomposes into solving single kernel learning problems, caching kernels, and computing quadratic forms for the sufficient conditions. Note that the kernel search algorithm is also an efficient algorithm for unstructured MKL.
Consistency conditions
As said earlier, the sparsity pattern of the solution of Eq. (1) will be equal to its hull, and thus we can only hope to obtain consistency of the hull of the pattern, which we consider in this section.
Following , we make the following assumptions on the underlying joint distribution of : (a) the joint covariance matrix of (defined with appropriate blocks of size ) is invertible, (b) with and almost surely. With these simple assumptions, we obtain (see proof in the Appendix):
then and the hull of are consistently estimated when and .
If the and the hull of are consistently estimated for some sequence , then
Note that the last two propositions are not consequences of the similar results for flat MKL , because the groups that we consider are overlapping. Moreover, the last propositions show that we indeed can estimate the correct hull of the sparsity pattern if the sufficient condition is satisfied. In particular, if we can make the groups such that the between-group correlation is as small as possible, we can ensure correct hull selection. Finally, it is worth noting that if the ratios tend to infinity slowly with , then we always consistently estimate the depth of the hull, i.e., the optimal interaction complexity. We are currently investigating extensions to the non parametric case , in terms of pattern selection and universal consistency.
Simulations
We can see from Table 1, that HKL outperforms other methods, in particular for the datasets bank-32nm, bank-32nh, pumadyn-32nm, pumadyn-32nh, which are datasets dedicated to non linear regression. Note also, that we efficiently explore DAGs with very large numbers of vertices .
For binary classification datasets, we compare HKL (with the logistic loss) to two other methods (L2, greedy) in Table 2. For some datasets (e.g., spambase), HKL works better, but for some others, in particular when the generating problem is known to be non sparse (ringnorm, twonorm), it performs slightly worse than other approaches.
Conclusion
Appendix A Optimization results
with equality if and only if .
When the DAG is a tree (i.e., when each vertex has at most one parent), then, without loss of generality we may consider that only one vertex has no parent (the root ) while all others have exactly one parent . In this situation, we have for all , . Moreover, for all leaves , . This implies that the constraint is equivalent to and for all , . The final constraint , may then be written as:
which is clearly convex . When the DAG is not a tree, we conjecture that the set is not convex.
A.2 Fenchel conjugates
In particular, we have for the following standard examples:
for least-squares regression, we have and ,
for logistic regression, we have , where , and if , otherwise.
for support vector machine classification, we have , where , and if , otherwise.
A.3 Preliminary propositions
and the optimal can be found from an optimal as .
Proof We introduce auxiliary variables and consider the Lagrangian:
Minimizing with respect to the primal variables , we get the dual problem.
We will use the following simple result, which implies that each component is a concave function of :
The minimum of subject to is equal to and is attained at .
The following proposition derives the dual of the problem in :
which can be minimized in closed form with respect to and , and leads to (using Lemma 1):
A.4 Duality gaps
This function is convex in (because of Lemma 1) and concave in , standard arguments (e.g., primal and dual strict feasibilities) show that there is no duality gap to the variational problems:
We can decompose the duality gap, given a pair as
We thus get the desired upper bound from which proposition 1 (of the main paper) follows, as well as the upper bound on the duality gap.
A.5 Necessary and sufficient conditions - truncated problem
We assume that we know the optimal solution of a truncated problem where the entire set of decendants of some nodes have been removed. We let denote the hull of the set of active variables. We now consider necessary conditions and sufficient conditions for this solution to be optimal with respect to the full problem. This will lead to Proposition 2 and 3 of the main paper.
We first use Proposition 2 of the Appendix, to get a set of for for the reduced problem; the goal here is to get necessary conditions by relaxing the dual problem defining and find an approximate solution, while for the sufficient condition, any candidate leads to a sufficient condition. It turns out that we will use the solution of the relaxed solution required for the necessary condition for the sufficient condition.
If we assume that all variables in are indeed active, then any optimal must be such that if and . We then let free for in . Our goal is to find good candidates for those free dual parameters.
We first derive necessary conditions by lowerbounding the sums by maxima:
which can be minimized in closed form with respect to leading to
For sufficient conditions, we simply take the value obtained before for , which leads to
A.6 Optimality conditions for the primal formulation
We know derive optimality conditions for the problem in the paper, which we will need in Section B, i.e.:
and thus if optimal if and ony if, we have, with :
Note that when regularizing by instead of , we have the same optimality condition with .
Appendix B Consistency conditions
The consistency condition is then obtained by studying when the first order expansion indeed has the correct sparsity pattern (for more precise statements and arguments, see ). We let denote the solution of the previous problem, restricted to . We have:
Following the previous section, it is optimal if and only for all ,
The condition for good pattern selection is that for all ,