Genetic Programming for Kernel-based Learning with Co-evolving Subsets Selection

Support Vector Machines (SVMs) are well-established Machine Learning (ML) algorithms. They rely on the fact that i) linear learning can be formalized as a well-posed optimization problem; ii) non-linear learning can be brought into linear learning thanks to the kernel trick and the mapping of the initial search space onto a high dimensional feature space. The kernel is designed by the ML expert and it governs the efficiency of the SVM approach. In this paper, a new approach for the automatic design of kernels by Genetic Programming, called the Evolutionary Kernel Machine (EKM), is presented. EKM combines a well-founded fitness function inspired from the margin criterion, and a co-evolution framework ensuring the computational scalability of the approach. Empirical validation on standard ML benchmark demonstrates that EKM is competitive using state-of-the-art SVMs with tuned hyper-parameters.


Introduction
Kernel methods, including the so-called Support Vector Machines (SVMs), are well-established learning approaches with both strong theoretical foundations and successful practical applications [1]. SVMs rely on two main advances in statistical learning. First, the linear supervised machine learning task is set as a well-posed (quadratic) optimization problem. Second, the above setting is extended to non-linear learning via the kernel trick : given a (manually designed) change of representation Φ mapping the initial space onto the so-called feature space, linear hypotheses are characterized in terms of the scalar product in the feature space, or kernel. These hypotheses correspond to non-linear hypotheses in the initial space. Although many specific kernels have been proposed in the literature, designing a kernel well suited for an application domain or a dataset so far remains an art more than a science. This paper proposes a system, the Evolutionary Kernel Machine (EKM), for the automatic design of data-specific kernels. EKM applies Genetic Programming (GP) [2] to construct symmetric functions (kernels), and optimizes a fitness function inspired from the margin criterion [3]. Kernels are assessed within a Nearest Neighbor classification process [4,5]. In order to cope with computational complexity, a cooperative co-evolution governs the prototype subset selection and the GP kernel design, while the fitness case subset selection undergoes a competitive co-evolution.
The paper is organized as follows. Section 2 introduces the formal background and notations on kernel methods. Sections 3 and 4 respectively describe the GP representation and the fitness function proposed for the EKM. Scalability issues are addressed in the co-evolutionary framework introduced in Section 5.
Results on benchmark problems are given in Section 6. Finally, related works are discussed in Section 7 before concluding the paper in Section 8.

Formal Background and Notations
Supervised machine learning takes as input a dataset E = {(x i , y i ), i = 1 . . . n, x i ∈ X, y i ∈ Y }, made of n examples; x i and y i respectively stand for the description and the label of the i-th example. The goal is to construct a hypothesis h(x) mapping X onto Y with minimal generalization error. Only vectorial domains (X = IR d ) are considered throughout this paper; further, only binary classification problems (Y = {1, −1}) are considered in the rest of this section.
Due to space limitations, the reader is referred to [6] for a comprehensive presentation of SVMs. In the simplest (linear separable) case, the hyper-plane h(x) maximizing the geometrical margin (distance to the closest examples) is constructed. The label associated to example x is the sign of h(x), with: where < x, x i > denotes the scalar product of x and x i . Let Φ denotes a mapping from the instance space X onto the feature space and let the kernel K(x, x ′ ) be defined as: Under some conditions (the kernel trick), non-linear classifiers on X are constructed as in the linear case, and characterized as h( Besides SVMs, the kernel trick can be used to revisit all learning methods involving a distance measure. In the paper, the kernel nearest neighbor (Kernel-NN) algorithm [5], which revisits the k-nearest neighbors (k-NN) [4], is considered. Given a distance (or dissimilarity) function d(x, x ′ ) defined on the instance space X, given a set of labelled examples E = {(x 1 , y 1 ), . . . , (x n , y n )} and an instance x to be classified, the k-NN algorithm: i) determines the k examples closest to x according to d(x, x ′ ); ii) outputs the majority class of these k examples. Kernel-NN proceeds as k-NN, where distance d K (x, x ′ ) is defined after the kernel K(x, x ′ ) (more on this in Section 4).
Standard kernels on X = IR d include Gaussian and polynomial kernels 3 . It must be noted that the addition, multiplication and compositions of kernels are kernels, and therefore the standard SVM machinery can find the optimal value of hyper-parameters (e.g. σ, c or k) among a finite set. Quite the opposite, the functional (symbolic) optimization of K(x, x ′ ) cannot be tackled to our best knowledge except by Genetic Programming.

Genetic Programming of Kernels
The Evolutionary Kernel Machine applies GP to determine symmetric functions K(x, x ′ ) on IR d × IR d best suited to the dataset at hand. As shown in Table 1, the main difference compared to standard symbolic regression is that terminals are symmetric expressions of x and x ′ (e.g. , enforcing the symmetry of the kernels (K(x, x ′ ) = K(x ′ , x)).
The initialization of GP individuals is done using a ramped half and half procedure [2]. The selection probability of terminals A i , M i , I i and S i (respectively C i,j ) is divided by 1/d (resp. 2/d(d + 1)), where d is the dimension of the initial instance space (X = IR d ).
Indeed the kernel functions built after Table 1 might not satisfy Mercer's condition (K(x, x) ≤ 0 ⇒ x = 0) required for SVM optimization [6]. However these kernels will be assessed along a Kernel-NN classification rule [5]; therefore the fact that they are not necessarily positive is not a limitation. Quite the contrary, EKM kernels can achieve feature selection; typically, terminals associated to non-informative features should disappear along evolution. The use of EKM for feature selection will be examined in a future work.

Fitness Measure
Every kernel K(x, x ′ ) is assessed after the Kernel-NN classification rule, using the dissimilarity d K defined as Given a prototype set E p = {(x 1 , y 1 ), . . . , (x ℓ , y ℓ )} and a training example e = (x, y), let us assuming that E p is ordered by increasing dissimilarity to ). Let p(e) denotes the minimum rank over all prototype examples in the same class as e (p(e) = min{i, y i = y, i = 1 . . . ℓ}); let n(e) denotes the minimum rank over all other prototype examples (not belonging to the same class as e, n(e) = min{i, y i = y, i = 1 . . . ℓ}).
As noted by [3], the quality of the Kernel-NN classification of e can be assessed from δ K (e) = n(e) − p(e). The higher δ K (e), the more confident the classification of e is, e.g. with respect to perturbations of E p or d K ; δ K (e) measures the margin of e with respect to Kernel-NN.
Crossed multiplication-addition between the i th and j th com- Accordingly, given a prototype set E p = {(x 1 , y 1 ), . . . , (x ℓ , y ℓ )} and a fit- The computation of F has linear complexity in the number ℓ of prototypes and in the number m of fitness cases. In a standard setting, E p and E s both coincide with the whole training set E (ℓ = m = n). However the quadratic complexity of the fitness computation with respect to the number n of training examples is incompatible with the scalability of the approach.

Tractability Through Co-evolution
EKM scalability is obtained along two directions, by i) reducing the number ℓ of prototypes used for classification, and ii) reducing the size m of the fitness case subset considered during each generation. ; set E t p to the best offspring; (d) Generate λs offsprings of E t−1 s , by replacing a fraction ρs of the fitness case (uniform stratified sampling); assess these offsprings after h t, * and E t p ; set E t s to the best offspring. 5. Output h * * , selected among h t, * , t = 0 . . . T as the one minimizing the 1-NN error rate on the whole training set E using the associated E t p prototype subset. More precisely, a co-evolutionary framework involving three species is considered, as detailed in Figure 1. The first species includes the GP kernels. The second species includes the prototype subset (fixed-size subsets of the training set), subject to a cooperative co-evolution [7] with the GP kernels. The third species includes the fitness case subset (fixed-size subsets of the training set), subject to a competitive host-parasite co-evolution [8] with the GP kernels.
The prototype species is evolved to find good prototypes such that they maximize the fitness of the GP kernels. The fitness case species is evolved to find hard and challenging examples, such that they minimize the kernel fitness. Of course there is a danger that the fitness case subset ultimately capture the noisy examples, as observed in the boosting framework [9] (see Section 6.2).
Both prototype and selection species are initialized using a stratified uniform sampling with no replacement (the class distribution in the sample is the same as in the whole dataset and all examples are distinct). Both species are evolved using a (1, λ) evolution strategy; in each generation, λ offsprings are generated using a uniform stratified replacement of a given fraction of the parent subset, and assessed after the best kernel in the current kernel population. The parent subset is replaced by the best offspring. In each generation, the kernels are assessed after the current prototype and fitness case individuals.

Experimental Validation
This section reports on the experimental validation of EKM, on a standard set of benchmark problems [10], detailed in Table 2. The system is implemented using the Open BEAGLE framework 4 for evolutionary computation [11].

Experimental Setting
The parameters used in EKM are reported in Table 3. The average evolution time for one run is less than one hour (AMD Athlon 2800+). On each problem, EKM has been evaluated along the standard 10-fold cross validation methodology. The whole data set is partitioned into 10 (stratified) subsets; the training set is made of all subsets but one; the best hypothesis learned from this training set is evaluated on the remaining subset, or test set. The accuracy is averaged over the 10 folds (as the test set ranges over the 10 subsets of the whole dataset); for each fold, EKM is launched 10 times; the 5 best hypotheses (after their accuracy on the training set) are assessed on the test set; the reported accuracy is the average over the 10 folds of these 5 best hypotheses on the test set. In total, EKM is launched 100 times on each problem.
EKM is compared to state of the art algorithms, including k-nearest neighbor and SVMs with Gaussian kernels, similarly assessed using 10-fold cross validation. For k-NN, the underlying distance is the Euclidean one, and scaling Table 3. Tableau of the evolutions parameters.

Parameter
Description and parameter values GP kernel functions evolution parameters Primitives See Table 1 normalization option has been considered; the k parameter has been varied in {1, 3, 5}; the best setting has been kept. For Gaussian SVMs, the Torch3 implementation has been used [12]; the error cost (parameter C) has been varied in {10 i , i = −3 . . . 4}, the σ parameter is set to 10, and the best setting has been similarly retained. Table 4 shows the results obtained by EKM compared with k-NN and Gaussian SVM, together with the optimal parameters for the latter algorithms. The size of the best GP kernel (last column) shows that no bloat occurred, thanks to the lexicographic parsimony pressure. Each algorithm is shown to be the best performing on the half or more of the tested datasets, with frequent ties according to a paired Student's t-test.

Results
Typically, the problems where Gaussian SVMs perform well are those where the optimal C value for cost error is high, suggesting that the noise level in these datasets is high too. Indeed, the fitness case subset selection embedded in EKM might favor the selection of noisy examples, as those are more challenging to GP Table 4. Comparative 10-fold results of k-NN, Gaussian SVM and EKM on the UCI data sets, with optimal settings (k and scaling for k-NN, C for SVM). The reported test error is averaged over the 10 folds. For each fold tested with the EKM, the 5 solutions out of 10 runs with best training error are assessed on the test set, and their error is averaged. Test error rates in bold denotes the statistically best results according to a 95% two-tails paired Student's t-test. "Average rank" column gives the test error ranking obtained for EKM compared to k-NN and SVM averaged over the 10 folds. kernels. A more progressive selection mechanism, taking into account all kernels in the GP population to better filter out noisy examples and outliers, will be considered in further research.
The k-NN outperforms SVM and EKM on the bos problem, where the noise level appears to be very low. Indeed, the optimal value for the number k of nearest neighbors is k = 1, while the optimal cost error is 10 −3 , suggesting that the error rate is also low. Still, the fact that the error rate is close to 23% might be explained as the target concept is complex and/or many examples lie close to its frontier. On bcw, the differences between the three algorithms are not statistically different and the test error rate is about 2%, suggesting that the problem is rather easy.
EKM is found to outperform the other algorithms on bld, demonstrating that Kernel-based dissimilarity can improve on Euclidean distance with and without rescaling. Last, EKM behaves like k-NN on the pid problems. Further, it must be noted that EKM classifies the test examples using a 50-examples prototype set, whereas k-NN uses the whole training set (above 300 examples in the bld problem and 690 in the pid problem).
As the well-known No Free Lunch theorem applies to Machine Learning too, no learning method is expected to be universally competent. Rather, the above experimental validation demonstrates that the GP-evolved kernels can improve on standard kernels in some cases.
The most relevant work to EKM is the Genetic Kernel Support Vector Machine (GK-SVM) [13]. GK-SVM similarly uses GP within an SVM-based approach, with two main differences compared to EKM. On one hand, GK-SVM focuses on feature construction, using GP to optimize mapping Φ (instead of the kernel). On the other hand, the fitness function used in GK-SVM suffers from a quadratic complexity in the number of training examples. Accordingly, all datasets but one considered in the experimentations are small (less than 200 examples). On a larger dataset, the authors acknowledge that their approach does not improve on a standard SVM with well chosen parameters. Another related work similarly uses GP for feature construction, in order to classify time series [14]. The set of features (GP trees) is further evolved using a GA, where the fitness function is based on the accuracy of an SVM classifier. Most other works related to evolutionary optimization within SVMs (see [15]) actually focus on parametric optimization, e.g. achieving features selection or tuning some parameters.
Another related work is proposed by Weinberger et al. [16], optimizing a Mahalanobis distance based on the k-NN margin criterion inspired from [3] and also used in EKM. However, restricted to linear changes of representation, the optimization problem is tackled by semi-definite programming in [16]. Lastly, EKM is also inspired by the Dynamic Subset Selection first proposed by Gathercole and Ross [17] and further developed by [18] to address scalability issues in EC-based Machine Learning.

Conclusion
The Evolutionary Kernel Machine proposed in this paper aims to improve kernelbased nearest neighbor classification [5], combining two original aspects. First, EKM implicitly addresses the feature construction problem by designing a new representation of the application domain better suited to the dataset at hand. However, in contrast with [13,14], EKM takes advantage of the kernel trick, using GP to optimize the kernel function. Secondly, EKM proposes a co-evolution framework to ensure the scalability of the approach and control the computational complexity of the fitness computation. The empirical validation demonstrates that this new approach is competitive with well-founded learning algorithms such as SVM and k-NN using tuned hyper-parameters.
A limitation of the approach, also observed in the well-known boosting algorithm [9], is that the competitive co-evolution of kernels and examples tends to favor noisy validation examples. A perspective for further research is to exploit the evolution archive, to estimate the probability for an example to be noisy and achieve a sensitivity analysis. Another perspective is to incorporate ensemble learning, typically bagging and boosting, within EKM. Indeed the diversity of the solutions constructed along population-based optimization enables ensemble learning almost for free.