Structured variable selection in support vector machines

When applying the support vector machine (SVM) to high-dimensional classification problems, we often impose a sparse structure in the SVM to eliminate the influences of the irrelevant predictors. The lasso and other variable selection techniques have been successfully used in the SVM to perform automatic variable selection. In some problems, there is a natural hierarchical structure among the variables. Thus, in order to have an interpretable SVM classifier, it is important to respect the heredity principle when enforcing the sparsity in the SVM. Many variable selection methods, however, do not respect the heredity principle. In this paper we enforce both sparsity and the heredity principle in the SVM by using the so-called structured variable selection (SVS) framework originally proposed in Yuan, Joseph and Zou (2007). We minimize the empirical hinge loss under a set of linear inequality constraints and a lasso-type penalty. The solution always obeys the desired heredity principle and enjoys sparsity. The new SVM classifier can be efficiently fitted, because the optimization problem is a linear program. Another contribution of this work is to present a nonparametric extension of the SVS framework, and we propose nonparametric heredity SVMs. Simulated and real data are used to illustrate the merits of the proposed method.


Introduction
The support vector machine (SVM) is a widely used classification method.Let x denote a generic feature vector.The class labels, y, are coded as {1, −1}.For a given training data set {x i , y i }, i = 1, 2, . . ., n, the SVM can be expressed in a penalized hinge loss formulation (cf.[11] and [15]) ( β, β0 ) = arg min where the subscript "+" means the positive part (z + = max(z, 0)).The SVM classifier is Sign( β0 +x T β).It is now well known that by imposing some structure in the SVM, we could significantly enhance its classification performance and obtain a more interpretable model [11].For example, when the dimension of the predictors is high and there are many irrelevant predictors, imposing sparsity in β via an automatic variable selection procedure can significantly enhance classification performance of the SVM.Various variable selection proposals have been introduced in recent years to encourage sparsity in β for the SVM.See [25] and references therein.In particular, Bradley and Mangasarian [1] and Zhu et al. [24] suggested to replace the quadratic penalty in (1.1) with the lasso (or l 1 ) penalty: Similar to the lasso [13] for linear regression, the lasso penalty encourages some of the β coefficients to exact zero and therefore perform variable selection.Despite their successes, these general-purpose variable selection methods do not take advantage of the possible interrelationship among features.Consider for example a quadratic classifier with explanatory variables z 1 , z 2 ,. .., z q : β 1 z 1 + . . .+ β q z q + β 11 z 2 1 + β 12 z 1 z 2 + . . .+ β q,q−1 z q z q−1 + β qq z 2 q . (1.3) In employing the l 1 SVM to learn the β coefficients, one may consider using x ≡ (z 1 , . . ., z q , z 1 z 2 , . . ., z q−1 z q , z 2 1 , . . ., z 2 q ) as the derived variables in (1.2).In doing so, we neglect the difference between quadratic effects and linear effects.In situations like this, it is desirable to invoke the effect heredity principle [18].There are two popular versions of the effect heredity [3].Under the strong heredity, for a two-factor interaction effect z i z j to be active both its parent effects, z i and z j , should be active, whereas under the weak heredity only one of its parent effects needs to be active.Likewise, one may also require that z 2 j is allowed to be active only if z j is active.In this paper we develop a new method that can simultaneously impose the sparse structure and the heredity structure in the SVM model.
Earlier interests in the heredity principle came from the analysis of designed experiments where heredity principle had proven to be powerful tools in resolving complex aliasing patterns (cf.[3], [4] and [9]).The heredity principle was routinely followed in general regression problems as well.Efron et al. [7] and Turlach [14] discussed how to enforce the strong heredity principle in the efficient Lars algorithm.Later, Yuan, Joseph and Lin [19] proposed more flexible ways of incorporating the strong and weak heredity principles in linear regression.Zhao, Rocha and Yu [23] presented the Composite Absolute Penalties which can produce a hierarchical model.Choi and Zhu [5] proposed a penalization method for enforcing the strong heredity principle in fitting a regression model.However, these earlier methods are primarily designed for the linear regression model.It is not clear how to generalize them to handle other models such as the SVM considered in the present paper and still retain their computational efficiency.
More recently, Yuan, Joseph and Zou [20] formalized the concept of structure variable selection to describe general hierarchical structures among variables with traditional heredity principles as special cases when doing variable selection.They argue that appropriately accounting for the general hierarchical structure among variables not only enhances the model interpretability but also leads to improved estimation and prediction.The SVS framework gives a unified treatment of the linear regression model and generalized linear models.In addition, the SVS framework permits a very efficient implementation and enjoys nice theoretical properties.
In this paper, we propose to adopt the SVS framework to simultaneously incorporate the heredity principle and sparsity into the support vector machine in a way that retains the computational advantages of the SVM.The main idea is to introduce a scaling parameter to each effect and then enforce the hierarchical relationships among predictors and sparsity by a set of linear inequality constraints on the corresponding scaling parameters.As a result, the optimization problem is a linear program and can be very efficiently solved using standard linear programming techniques.Our approach can handle both strong and weak heredity principles.Furthermore, we propose a nonparametric extension of the SVS framework based on which we develop nonparametric heredity SVMs.
The rest of the paper is organized as follows.In the next section, we describe how to employ the SVS idea to incorporate the strong heredity principle into the SVM.The weak heredity principle can be implemented in a similar fashion with an additional convex relaxation step, in order to preserve the computational efficiency.In Section 3 we propose the nonparametric heredity SVMs.Section 4 contains some discussion.

Method
Breiman's nonnegative garrote [2] is perhaps the first method in the literature that uses an l 1 constraint to perform variable selection in linear regression models.As an extension of the original nonnegative garrote, the generalized garrote is first introduced in [20] to build the SVS framework.Here we show that the generalized garrote idea can be used in the support vector machine as well.To provide the readers a complete picture, we first introduce the basic idea of the garrote in the context of the SVM.Suppose we have computed the l 2 SVM coefficients β, then we introduce a scaling parameter θ j for each predictor x j and then solve the following optimization problem min {θj},β0 where M is the garrote shrinkage parameter.The new classifier is Sign( β0 + p j=1 x j βj θj ).To compare it with the l 1 SVM, we consider another equivalent formulation of (2.1) When M or λ is properly chosen, some θj s will be shrunk to zero, and thus the corresponding predictors (x j s) will be deleted from the classifier.Therefore, the garrote performs variable selection in a way similar to the lasso.The garrote received little attention in the literature compared to the enormous popularity of the lasso.Recently, Yuan and Lin [22] showed the garrote enjoys excellent finite sample performance if we use some regularized estimators as the initial estimator.The biggest advantage of the garrote, however, is its flexibility.We can easily modify the garrote by adding other linear constraints on the scaling parameters to meet some special requirements, such as the heredity principle.
We adopt some notation from [20] to formally describe general hierarchical structures among variables.Suppose the dimension of the predictor set is p.The hierarchical relationships among predictors can be represented by sets {D j : j = 1, . . ., p}, where D j contains the parent effects of the jth predictor.Consider, for example, the predictors in model (1.3).The q + 1th predictor is x q+1 = z 1 z 2 and its parent effects are x 1 = z 1 and x 2 = z 2 .Thus D q+1 = {1, 2}.
The strong heredity principle says that if the jth predictor can be considered for inclusion, all elements of D j must be included.Note that in the garrote model, the jth predictor is included if and only if its scaling parameter is nonzero.To further incorporate the strong heredity principle, we generalize the garrote as follows min {θj},β0 We have imposed a set of inequality constraints on the scaling parameters, besides the l 1 constraint which ensures the sparsity of the estimates.Note that if θ j > 0, these linear inequalities in (2.4) force the scaling parameters in D j to be positive.Therefore, the resulting model always obeys the strong heredity principle.Furthermore, all the constraints are linear in terms of the scaling parameters, and the feasible region under these constraints is convex.Therefore, solving (2.3) remains a linear program.
The same idea can be applied to impose the weak heredity principle.The weak heredity principle says that if the jth variable is included in the model, at least one of the elements of D j must be included.Observe that max r∈Dj θ r > 0 ⇔ at least one θ r > 0, r ∈ D j and ∀j.
We could consider the following optimization problem min {θj},β0 It is easy to see that the solution always obeys the weak heredity principle.However, the feasible region under such constraints is no longer convex.It is well known that non-convexity may cause various computational problems such as local minimizer and instability of the solution, etc.To overcome the nonconvexity issue, we suggest to use the convex envelop of these constraints for the weak heredity principle min {θj},β0 Note that under (2.8) θ j > 0 implies that r∈Dj θ r > 0 and therefore at least one of its parents needs to be included in the model, which implies that the resulting model obeys the weak heredity principle.Since the constraints in (2.8) are linear and the feasible region under the constraints in (2.7) is convex, solving (2.7) remains a linear program.
For the purpose of presentation, we refer the new SVMs defined in (2.3) and (2.7) to as SHSVM and WHSVM, respectively.

Numerical studies
We use numerical examples to demonstrate the benefits of incorporating heredity principles into the SVM model.
In each simulated example, we generated 100 datasets, each with training samples of sizes n = 50, 100, and 200, and an independent test sample of size 10000.In a benchmark example, 100 random partitions of the original data were created, each with a training sample and a test sample.In each example, all classifiers were fitted on a training sample and their generalization errors were computed on a test sample.Here the generalization error of a classifier f is Pr(yf (x) < 0) under 0-1 loss.The Bayes rule minimizes the generalization error and its error is called the Bayes error (risk).Note that the Bayes rule is arg max c∈{1,−1} Pr(y = c|x) which is unknown in practice.In our simulation study we can compute the Bayes error because we know the true model.We reported the Bayes error and the averaged smallest generalization error of each competitor, thus avoiding the extra level of complexity in the comparison caused by the tuning parameter selection.
We first consider three simulation models.In the first example the true model obeys the strong heredity principle, while in the second example the true model obeys the weak heredity principle.The third example concerns the situation when the true model does not obey any heredity principle.
Simulation example 1.In the first set of simulation, the generated explanatory variables z 1 , . . ., z 7 are standard normal, where the correlation between z r and z j is ρ |r−j| , ρ = 0, 0.5.The class labels are generated from a logistic regression model log Pr(y = 1|z 1 , . . ., z 7 ) The predictor set for fitting the SVMs is {z j , z r z j , z 2 j }, r, j = 1, . . ., 7. The predictor z r z j represents the interaction between predictors z r and z j , thus its parent effects are z r and z j .The predictor z 2 j represents the quadratic effect of z j .We include the quadratic effect only if the linear main effect is included.Let θ j and θ jj be the scaling parameters for z j and z 2 j , respectively.Let θ rj be the scaling parameter for z r z j (r = j).Then the linear constraints in (2.4) become θ rj ≤ θ r and θ rj ≤ θ j , ∀r = j, r, j = 1, . . ., 7 The simulation results are summarized in Table 1.From Table 1 we see that the SHSVM significantly outperforms the l 1 and l 2 SVMs in terms of classification accuracy regardless of sample sizes, although the differences get smaller as sample sizes increase.We also computed the frequency that the fitted l 1 SVM obeys the strong heredity principle, as reported in the last column on Table 1.The low frequency indicates that the l 1 SVM is not appropriate when a strong heredity model is in demand.
Simulation example 2. In the second set of simulation, we use the same setup in example 1, except that the class labels are generated from a logistic regression model log Pr(y = 1|z 1 , . . ., z 7 ) Pr(y = −1|z 1 , . . ., z 7 ) This model obeys the weak heredity principle and violates the strong heredity principle.In order to fit the WHSVM, we note that the linear constraints in (2.8) become θ jj ≤ θ j j = 1, . . ., 7. Table 2 summarizes the simulation results.The WHSVM performs significantly better than the l 1 SVM and the l 2 SVM.The last column in Table 2 shows the frequency that the fitted l 1 SVM obeys the weak heredity principle.Again, these frequencies are pretty low.Simulation example 3. Examples 1 and 2 have demonstrated the benefits of recognizing the effect heredity.It would be interesting to investigate the performance of the SHSVM and the WHSVM when the true model actually violates the heredity principle.To this end, we considered the third example.We generated 5 explanatory variables and simulated the class labels from log Pr(y = 1|z 1 , . . ., z 5 ) Pr(y = −1|z 1 , . . ., z 5 ) = 3z 1 + 2.5z 2 + 2z 3 z 4 + 1.5z 4 z 5 + 1.
We fitted the SHSVM, WHSVM, l 2 SVM and l 1 SVM using the predictor set {z j , z r z j , z 2 j }, r, j = 1, . . ., 5. Since the true model is sparse, we expect that the l 2 SVM has the worst performance.This is confirmed by the simulation results in Table 3.We see that there is basically no difference between the WHSVM and the l 1 SVM.This observation suggests that it does not hurt to enforce the heredity principle along with the sparsity, even when the true model does not obey the heredity principle.Birth weight data.We test the proposed structured SVMs on the birth weight data that concern the birth weight of 189 infants at a US hospital [16].The problem of interest is to predict if the birth weight is lower than 2.5 kg.There are 8 explanatory variables depending upon mother's age (age), weight (lwt), race (race), smoking status (smoke), number of previous premature labors (ptl), history of hypertension (ht), uterine irritability (ui), and number of physician visits in the first trimester (f tv).The variables age and lwt are continuous while dummy variables were used to represent the discrete-valued variables.Then the predictor set was generated as in the simulation models except that the quadratic effects of dummy variables were not included.For dummy variables, the heredity principles were applied to the group level.Because the sample size is only 189, we used 5-fold cross-validation to estimate the classification error of each method.
As can be seen from Table 4, the structured SVMs significantly outperforms both the l 2 SVM and the l 1 SVM.The best l 1 SVM model identifies 10 variables including age 2 , age • lwt, age • f tv, lwt 2 , lwt • race, lwt • smoke, lwt • ptl, lwt • ht, lwt • ui, and lwt • f tv.This model does not satisfy the heredity principles, because, for instance, age 2 and age • lwt are included without their parent factor age.The frequencies of the l 1 SVM model satisfying the strong and weak heredity principles were 10/20 and 14/20, respectively.The model selected by the WHSVM includes age, lwt, and f tv together with the 10 variables in the l 1 SVM model.The SHSVM model includes additional variables race, smoke, ptl, ht, ui, and f tv in the WHSVM model.
One might wonder which heredity SVM should be used in this real data example.If the modeler does not have a strong preference in using either strong or weak heredity principle, the data suggest that the WHSVM is perhaps better than the SHSVM, since they have very similar classification performance and the WHSVM uses less variables.

Nonparametric Heredity SVMs
In the previous section we have discussed the heredity principle when each effect is represented by a single predictor.In many real world applications, we often need to nonparametrically model the main and interaction effects.Let us consider the following model where the class label y and explanatory variables z 1 , z 2 , . . ., z q are related through log Pr(y = 1|z 1 , . . ., z q ) Pr(y = −1|z 1 , . . ., z q ) = q j=1 f j (z j ) + q r,j=1 f rj (z r , z j ). (3.1) We have omitted the constant term for simplicity.The main effect of variable z j is f j (z j ) and the interaction effect between variables z r and z j is f rj (z r , z j ).Obviously, the above model is a generalization of the popular Generalized Additive Model [12].The model (3.1) can be more appropriate than the generalized additive model if interaction effects cannot be ignored.Under the strong heredity, for the interaction effect f rj (z r , z j ) to be active both its parent effects, f r (z r ) and f j (z j ), should be active, whereas under the weak heredity only one of its parent effects needs to be active.In this section we develop a method that can automatically identify significant effects while respecting the heredity principle.

Imposing heredity principles
If we assume f j (z j ) = β j z j and f rj (z r , z j ) = β rj z r z j , then the model reduces to the parametric case.We show here that the parametric assumption is not necessary in order to implement the heredity principle by using the SVS framework.Suppose that we have found a good initial estimate of the full model (3.1) and we denote the initial estimates by fj (z j ) and frj (z r , z j ).We assign scaling parameters θ j to f j (z j ) and θ rj to f rj (z r , z j ).The SHSVM can be formulated as follows Likewise, we define the WHSVM as subject to q j=1 θ j + q r,j=1 θ rj ≤ M θ j ≥ 0 θ rj ≥ 0 ∀r, j θ rj ≤ θ r + θ j ∀r, j. ( The final classifier is Sign fj (z j ) θj + q r,j=1 frj (z r , z j ) θrj .The linear inequalities in (3.3) guarantee that the SHSVM obeys the strong heredity principle.Similarly, the linear inequalities in (3.5) guarantee that the WHSVM obeys the weak heredity principle.Moreover, solving the scaling parameters is a linear program.

Computing the initial estimator
There are many nonparametric estimation methods that can give us a good initial estimator of the model (3.1).The choice of the estimation method is not essential for using the SHSVM and the WHSVM.In this work, for computational considerations, we obtain the initial estimates by using penalized B-splines [6].Penalized B-splines have been widely used in statistics for nonparametric function estimation (cf.[8], [11] and [17]).For each variable z j , we take a basis of B-spline functions b j,k (z j ) for k = 1, 2, . . ., N j for representing the function f j (z j ).Then the N r × N j dimensional tensor product basis defined by g k1,k2 (z r , z j ) = b r,k1 (z r )b j,k2 (z j ), k 1 = 1, 2, . . ., N r and k 2 = 1, 2, . . ., N j can be used for representing the interaction effect f rj (z r , z j ).With B-spline basis functions at hand, we can compute the l 2 SVM estimate of the model (3.1) by minimizing where In computing the initial estimates, although there are q variables, the actual dimension of the predictor set is q j=1 N j + q r,j=1 N j N r , which could be a large number.The quadratic penalty not only regularizes the nonparametric fit but also allows for an efficient implementation through singular value decomposition [10].Let B denote the basis functions in the predictor set.We need to solve Suppose the singular value decomposition of B is B = U DV T = RV T where R is a n × n matrix, then we solve and α = V γ and α0 = γ0 .See theorem 1 in [10].Therefore, the computations can be done in a n dimensional space instead of the original high-dimensional predictor space.

Numerical examples
We now present some numerical examples to demonstrate the performance of the nonparametric heredity SVMs.We compared the nonparametric heredity SVMs with the l 2 SVM and the Gaussian kernel SVM.In all examples, the l 2 SVM was fitted using the same B-Spline basis functions for fitting the nonparametric heredity SVMs.
Simulation example 4. We first generated explanatory variables z 1 ,. ..,z 5 from a multivariate normal distribution in which the correlation between z r and z j is 0.5 |r−j| .We considered a sparse model where the class labels were generated from a logistic regression model log Pr(y = 1|z 1 , . . ., z 5 ) Pr(y = −1|z 1 , . . ., z The true model obeys the strong heredity principle.We used five B-spline basis functions {b j,1 (z j ), . . ., b j,5 (z j )} to represent each f j (z j ), and the interaction effect f rj (z r , z j ) was represented by the tensor product basis functions {b r,1 (z r )b j,1 (z j ), b r,1 (z r )b j,2 (z j ), . .., b r,5 (z r )b j,5 (z j )}.The representing coefficients (α) were chosen as follows: (i) Coefficients of the 5 basis functions for f 1 (z 1 ) are (2.1, −2.9, 0.  size 100 from the above model and collected an independent test sample of size 10000 to compute the generalization error of each competitor.The simulation was repeated 100 times.The simulations results are summarized in Table 5 from which two interesting observations can be made.First we see that the l 2 SVM actually does better than the Gaussian kernel SVM in this example.This observation suggests that although the Gaussian kernel SVM is perhaps the most popular nonparametric SVM classifier, it is not always the best choice in all problems.Second and more importantly, the SHSVM is clearly the winner among all three competitors.Simulation example 5.In this example we considered the same setup in example 4, except that the class labels were generated from a logistic regression model As can be seen from Table 6, in this example the Gaussian kernel SVM outperforms the l 2 SVM, but the best performance is given by the WHSVM. South African Heart Disease Data.Here we demonstrate the utility of the nonparametric heredity SVMs through an analysis of the South African heart disease data [11] which consist of 462 samples of 9 risk factors (8 continuous and 1 binary).The responses indicates the presence of heart disease.Previous studies of this data suggest that nonparametric functions should be used to model the effects of these 9 risk factors.We first used the popular Gaussian kernel SVM to analyze the data whose classification error can be used as a good benchmark for comparison.To fit the SHSVM and the WHSVM, we used Bsplines to flexibly model the main effects of 8 continuous risk factors and use the tensor product basis functions of B-splines to model the interaction effects.In total, there are 33 basis functions and 480 basis functions used for representing the main effects and the interaction effects, respectively.Since we did not have an independent test set, we found the smallest 5-fold cross-validation error of each competitor.Then we repeated the whole procedure 30 times and reported the average 5-fold cross-validation errors.As can be seen from Table 7, the SHSVM does significantly better than the Gaussian kernel SVM.

Discussion
In this paper we have developed a unified framework for simultaneously incorporating the heredity principle and sparsity into the support vector machine.By adopting the scaling parameter idea from the nonnegative garrote, we have shown that both strong and weak heredity principles can be enforced by a set of linear inequality constraints on the scaling parameters.Our approach is computationally efficient, as the optimization problem a linear program.Moreover, we have also extended the framework to handle nonparametric models, which shows the flexibility of our method.The encouraging numerical results suggest that the newly proposed method is a useful addition to the classification toolbox.
To fix the main idea, we have used the penalized l 2 SVM to construct the initial classifier.Based on our experience, this choice of initial classifier worked quite well even when the dimension of predictors exceeds the sample size.It is possible to further improve the heredity SVMs by using better initial classifiers in certain problems.
Finally, we comment on the path-based computation of the structured SVMs.Yuan and Lin [22] showed that the solution path of the original nonnegative garrote is piecewise linear and constructed an efficient algorithm for building its whole solution path.One may expect the same is true for the garrote SVM.With the heredity constraints, the solution paths of θs will remain piece-wise linear as a function of their l 1 norm.However, the path-following algorithm will become considerably more complicated.It is not clear if computing the whole solution path will provide us considerable computational savings, compared with running linear programming for a grid of tuning parameters.

Table 1
Simulation example 1: The true model obeys the strong heredity principle.Compare the classification accuracy of the SHSVM, l 2 SVM and l 1 SVM.The numbers in parentheses are standard errors and the frequency is the number of times the fitted l 1 SVM obeys the strong heredity principle in 100 replications.

Table 2
Simulation example 2: The true model obeys the weak heredity principle.Compare the classification accuracy of the WHSVM, l 2 SVM and l 1 SVM.The numbers in parentheses are standard errors and the frequency is the number of times the fitted l 1 SVM obeys the weak heredity principle in 100 replications.

Table 3
Simulation example 3: Compare the SHSVM, WHSVM, l 2 SVM and l 1 SVM when the true model obeys no heredity principle.The numbers in parentheses are standard errors.

Table 4
Birth weight data: average five-fold cross validation errors with standard errors (reported in parentheses) based on 30 replications.

Table 5
Compare the SHSVM, the l 2 SVM and the Gaussian kernel SVM when the true model obeys the strong heredity principle.The numbers in parentheses are standard errors.

Table 6
Compare the WHSVM, the l 2 SVM and the Gaussian kernel SVM when the true model obeys the strong heredity principle.The numbers in parentheses are standard errors.

Table 7
South African heart disease data: average 5-fold cross-validation errors based on 30 replications.The numbers in parentheses are standard errors.