Support vector machine with hypergraph-based pairwise constraints

Although support vector machine (SVM) has become a powerful tool for pattern classification and regression, a major disadvantage is it fails to exploit the underlying correlation between any pair of data points as much as possible. Inspired by the modified pairwise constraints trick, in this paper, we propose a novel classifier termed as support vector machine with hypergraph-based pairwise constraints to improve the performance of the classical SVM by introducing a new regularization term with hypergraph-based pairwise constraints (HPC). The new classifier is expected to not only learn the structural information of each point itself, but also acquire the prior distribution knowledge about each constrained pair by combining the discrimination metric and hypergraph learning together. Three major contributions of this paper can be summarized as follows: (1) acquiring the high-order relationships between different samples by hypergraph learning; (2) presenting a more reasonable discriminative regularization term by combining the discrimination metric and hypergraph learning; (3) improving the performance of the existing SVM classifier by introducing HPC regularization term. And the comprehensive experimental results on twenty-five datasets demonstrate the validity and advantage of our approach.

A common disadvantage of the existing large margin classifiers, including SVM, is that they fail to exploit the prior structural information which may be very important for classification effectiveness. In fact, for different problems, different classes may have different underlying data structural information. Thus, it is desirable that a classifier should be adaptable to the discriminant boundaries to fit the geometric structures of the data, especially for improving the generalization performance of the classifier. Recently, some efficient algorithms related to SVM have been developed to give more weightage to the structural information, which provide a novel view to design a classifier, i.e., a classifier should be sensitive to the prior structural distribution of the data (Yeung et al. 2007). Currently, there are mainly two strategies to design various algorithms based on the structural distribution of the training data. The first one is cluster assumptionbased (Rigollet 2007), which assumes that the training data contains several clusters, and then deduces several popular large margin classifiers, such as ellipsoidal kernel machine (EKM) (Shivaswamy and Jebara 2007), minimax probability machine (MPM) (Lanckriet et al. 2002), maxi-min margin machine (M4) (Huang et al. 2004), and structured large margin machine (SLMM) (Yeung et al. 2007), structural regularized support vector machine (SRSVM) (Xue et al. 2011). The second strategy is manifold assumption-based, which assumes that the training data actually lies on a low-dimensional submanifold in the input space. A typical paradigm in this strategy is Laplacian support vector machine (Lap-SVM) (Belkin et al. 2004), which constructs a Laplacian graph for each class by exploiting the local neighborhoods of each data to form the corresponding Laplacian matrix to reflect the geometric structure of each class data. And then they are embedded into the traditional SVM framework as additional manifold regularization terms.
Even though the above modified SVM methods utilize the prior structural information of the training data to adjust the discriminant boundaries, there still might be some useful knowledge neglected, for example, the additional regularization term only indicates the relationship between two corresponding samples, without considering the highorder relationship between several samples.
The traditional pairwise constraints (PC) method (Hu et al. 2008;Yu et al. 2012a, b;Qian et al. 2013), which is powerful in semi-supervised or unsupervised learning tasks, mainly pays attention to the discrimination distance between two patterns while neglecting the spatial distance that might be also important. To overcome this drawback (Zhu et al. 2015), designed a new strategy to combine the discrimination metric based on the traditional PC and the Euclidean distance measure together, i.e., the modified pairwise constraints (MPC) method. In MPC, the spatial measure strategy is based on the simple-graph-constructing. However, the simple graph learning methods only consider the pairwise relationship between two samples and ignore the high-order relationship between several samples. Hypergraph learning (Zhou et al. 2006;Yu et al. 2012a, b;Wei et al. 2015) aims to get the relationship between several samples in a higher order, and thus achieves a promising performance in many applications. Inspired by the above studies, we design a novel hypergraph-based pairwise constraints (HPC) regularization term, which not only acquires the discriminative information about each constrained pair, but also considers the higher order relationship between different patterns. In this paper, we introduce the newly-designed HPC regularization term into SVM, and present a novel algorithm, i.e., support vector machine with hypergraph-based pairwise constraints (HPCSVM). This HPCSVM not only retains the superior characteristics of SVM, but also has its additional advantages: (1) getting comparable or better classification accuracies compared to SVM and its variants; (2) acquiring high-order relationship between several samples by hypergraph learning; (3) presenting a more reasonable discriminative regularization term by combining the discrimination metric and the hypergraph learning.
The rest of this paper is organized as follows. In Background" section, brief overviews of SVM and hypergraph learning are given. In "Support vector machine with hypergraph-based pairwise constraints" section, we first introduce the newly-designed HPC regularization term, and then detail the proposed HPCSVM, both the linear and nonlinear cases are included. "Experiments" section discusses the comprehensive experimental results on the UCI benchmark datasets to investigate the feasibility and validity of our proposed algorithm, and "Conclusion" section concludes the paper.

Support vector machine
SVM is a powerful and promising paradigm for pattern classification and regression. It emerges from research in statistical learning theory about how to regulate the tradeoff between empirical risk and structural complexity. And its main attempt is to reduce the generalization error by maximizing the margin between two parallel supporting hyperplanes.
Given a training dataset T = {(x 1 , y 1 ), . . . , (x l , y l )}, where x i ∈ R n , y i ∈ {+1, −1}, i = 1, 2, . . . , l. SVM searches for an optimal separating hyperplane to correctly separate the positive points and the negative points defined as where w ∈ R n and b ∈ R.
By introducing the regularization term 1 2 w 2 and the slack variable ξ = (ξ 1 , ξ 2 , · · · , ξ l ) T , the optimization problem corresponding to SVM can be expressed as where C > 0 is a penalty parameter. Note that the minimization of the regularization term 1 2 w 2 is equivalent to the maximization of the margin between two classes. Generally, rather than solving (2), we solve its dual problem to get the appropriate margin classifier.
Using the dual optimization technique, one can show that the dual problem of (2) can be expressed as where α i , i = 1, . . . , l, are the Lagrangian multipliers.

Hypergraph learning
Hypergraph learning is derived from the theory of simple graph learning. In a simple graph, an edge is connected with two samples and the weight of the edge only indicates the relationship between two corresponding samples. While in reality, the high-order relationship between several samples is critical. Thus we can completely represent the complex relationships among samples by using hypergraph, in which each hyperedge could connect more than two samples. Below we give out a concrete example ( Fig. 1) to show the difference between simple graph and hypergraph.
Given a dataset V = {x 1 , . . . , x l }, where x i ∈ R n , i = 1, 2, . . . , l. Hypergraph G = (V , E, W ) is composed of the vertex set V and the hyperedge set E. W is a diagonal matrix with its diagonal elements indicating the weights of the hyperedges. Each hyperedge e is a subset of V , and the weight of hyperedge e is denoted as w(e). The incidence matrix ϕ |V |×|E | of G is defined as follows The degree of a vertice v is defined as The degree of a hyperedge e is defined as The weight of a hyperedge e is defined as where x e is the centroid vertex of the hyperedge e. And the distance between two samples is where Then, the adjacency matrix P of the hypergraph G is defined as P = ϕWD −1 e ϕ T , where D e is a diagonal matrix with its diagonal elements indicating the degrees of hyperedges, ϕ T is the transpose of ϕ.

Support vector machine with hypergraph-based pairwise constraints
In theory, the connection between the intra-class patterns should be as strong as possible, while the connection between inter-class patterns should be as weak as possible. In this section, we present an HPC strategy to strengthen the connection of intra-class patterns and weaken the connection of inter-class patterns, and then introduce this novel trick into SVM. More specifically, on the one hand, the relationships between several samples in a higher order are acquired by hypergraph learning, on the other hand, a more reasonable discriminative regularization term is presented by combining the discrimination metric and hypergraph learning, at last, this novel regularization term is introduced into SVM to get a better classifier.

Hypergraph-based pairwise constraints
This subsection first introduces the previous work of PC, and then presents an MPC strategy to overcome the drawback of PC without acquiring the spatial distribution of samples, finally, an HPC strategy combining hypergraph learning is proposed.

The traditional pairwise constraints method
PC, i.e., the must-link and cannot-link constraints, were first introduced in Lange et al. (2005). In detail, the must-link means a pair of samples should be allotted to the same cluster, while the cannot-link performs the opposite operation. Since then, efforts have been made to apply PC to both clustering (Hu et al. 2008;Zeng et al. 2012;Qian et al. 2013) and supervised classification (Ko et al. 2007;Li et al. 2012) tasks. Besides, it is also utilized for semi-supervised classification (Goldberg et al. 2007;Zhang et al. 2010 The form of the traditional PC discussed in this paper goes along the same lines as that was defined in (Qian et al. 2013;Ko et al. 2007;Li et al. 2012) where x i and x j are two samples, whose labels are y i and y j , respectively, and z ij = y i y j . This form gives out a discrimination metric to strengthen the connection of intra-class samples and weaken the connection of inter-class samples, which plays a similar role as the Laplacian loss in (Hu et al. 2008).

Modified pairwise constraints method
The traditional PC method might lose its efficacy when dealing with classification problem because it learns the relationship between each pair of samples from the prediction function without acquiring the spatial distribution of samples. To overcome this drawback (Zhu et al. 2015), combined the spatial information and the traditional PC and presented a modified PC as where x i and x j are two samples, whose labels are y i and y j respectively, z ij = y i y j , and the spatial measure strategy is adopted as where, N k (x i ) contains the k-nearest neighbors of the sample x i , γ is the coefficient to control the influence of t, and t is the mean squared mutual distance between each pair samples.
In MPC, the weight w ij is relatively large when the two samples are spatially close to each other, while w ij becomes relatively small when the two samples are spatially away from each other, which is the most commonly used spatial distribution learning strategy.

Hypergraph-based pairwise constraints method
In MPC, the spatial measure strategy is essentially based on simple graph. So, the weight only indicates the relationship between the two corresponding samples. While in reality, relationships among the samples of our interest are more complex than pairwise. Therefore, we consider using hypergraph instead of the simple graph to completely represent the complex relationships among the samples.
Extract the vertex set V = {x 1 , . . . , x l } from the given training set T = {(x 1 , y 1 ), . . . , (x l , y l )}, then establish a hypergraph G = (V , E, W ) as in "Hypergraph learning" section. The adjacency matrix P of hypergraph G is defined as P = ϕWD −1 e ϕ T , where ϕ, W , D e represent the same meaning as in "Hypergraph learning" section. We present the hypergraph-based PC as follows where x i and x j are two samples, whose labels are y i and y j , respectively, and z ij = y i y j .
To be more feasible and effective, here we adopt the distance measure strategy as follows where γ is the coefficient to control the influence of σ 2 , and Linear case SVM aims to find an optimal separating hyperplane, which is defined as f (x) = (w · x) + b = 0, to correctly separate the two class points. According to Formula (16), the hypergraph-based regularization term R pc is formulated as U is a all-one matrix and · is the Hadamard product. Similarly, we can also formulate the regularization term corresponding to the negative hyperplane.
By adding the proposed regularization term R pc into SVM, we construct the optimization problems as follows: where c, c 1 > 0 are the parameters used to denote the trade-off among each term in the objective function, ξ i , i = 1, . . . , l, are the slack variables, and s is a vector of ones of appropriate dimensions.
The first term of (20) has the same effect as in SVM, i.e., maximizing the margin between two disjoint half planes. The second term is the discriminative information regularization term, which exploits the similarity and the dissimilarity of the labels through utilizing pairwise constraint information. If the two items belong to the same class, we encode the similarity between x i and x j as , the examples which have the same label should have the approximate real values. If the two items belong to different classes, we encode the dissimilarity between x i and x j as p ij (f (x i ) + f (x j )) 2 , and minimization of this penalty term tends to compel f (x i ) ≈ −f (x j ), i.e., the real values of the examples which have different labels should be close to a pair of opposite number. And p ij is the weight between two patterns, which implies the relationship between several samples in a higher order. The third term is the empirical risk, which restricts that negative samples should lie below the bounding plane (w · x) + b = −1, while positive samples should lie above the bounding plane (w · x) + b = 1.
In order to solve the problem (20), we construct its matrix form where y is a label vector of all the samples, and · is the Hadamard product. By introducing the Lagrangian function of (21) where α = (α 1 , α 2 , . . . , α l ) T and β = (β 1 , β 2 , . . . , β l ) T are the Lagrange multiplier vectors. And the Karush-Kuhn-Tucker (K.K.T) conditions for (22) are given by where y • M defines a matrix of the same size as M, of which the ith row is y i · M i . Since β ≥ 0, from (25) we have Next, combining (23) and (24)  To avoid the positive semi-definite matrix H + c 1 J T L ′ J being irreversible, a regularization term εI(ε > 0) is introduced. Then, (32) gets modified to the following formulation Finally, the Wolfe's dual of (21) is derived as follows Suppose the solution of (34) is α * = (α * 1 , . . . , α * l ) T , then the augmented vector of (32) can be obtained. And a new testing sample x is classified as +1 or −1 according to the final decision function as follows

Nonlinear case
In order to extend our HPCSVM to the nonlinear case, we rewrite the decision function as: where �(·) is a nonlinear mapping from a low dimensional space to a higher dimensional Hilbert space. According to Hilbert space theory (Schölkopf and Smola 2002), w can be expressed as w = l i=1 u i �(x i ). So the decision function can be expressed as: where K (·) stands for a kernel function: . So the nonlinear optimization problems can be expressed as where c, c 1 > 0 are the predefined parameters, ξ i , i = 1, . . . , l, are the slack variables, s is a vector of ones of appropriate dimensions, and M ∈ R l×n includes all of the samples. Similarly, we rewrite the matrix form of (38) as follows Adopting the similar process to the linear case, we can derive the dual formulation of (39) as follows where y is a label vector of all the samples,

Furthermore, we can get
Once the augmented vector of (41) is obtained, a new testing sample x is classified as +1 or −1 according to the final decision function as follows

Analysis of algorithm
According to statistical theory, the training points are generated independently and identically according to an unkow but fixed probability distribution, i.e., all the training points should have some degree of underlying correlation. However, in SVM and its many variants, the potential structural information of the training data has not been taken into account when constructing optimization problems. In this paper, we present a novel discriminative regularization term named R pc with hypergraph-based PC method, which is expected to acquire the prior distribution knowl-edge about each constrained pair with both the discrimination metric from the traditional PC and the high-order relationship between different samples from hypergraph learning, and then introduce it into SVM. Now we analyze our proposed HPCSVM concretely: 1. Inheriting the maximal-margin principle. In SVMs, the minimization of the regularization term 1 2 w 2 is equivalent to the maximization of the margin between the two parallel supporting hyperplanes. In our HPCSVM, we still choose the same regularization term w 2 to reflect the capacity of the decision function and the size of margin. 2. Extracting the potential structural information of the data. In SVM and its many variants, the optimal separating hyperplane is established with considering each sample independently, i.e., without considering the relationship between every pair of samples. In our algorithm, we design a novel HPC regularization term to extract the discriminative information about each constrained pair as the potential structural information, and then apply it to adjust the separating hyperplane. 3. Getting the relationship between several samples in a higher order. In MPC, the spatial measure strategy is essentially based on simple graph. While in reality, relationships among the samples are more complex than pairwise. Therefore, we use a hypergraph instead of the simple graph to completely represent the complex relationships among the samples and propose a novel discriminative information regularization term named HPC. 4. The limitation of our HPCSVM. A limitation of HPCSVM is that it cannot handle large-scale problems. There are two main reasons leading to such a limitation. On the one hand, our HPCSVM has to find the k-nearest neighbors for all the samples in the stage of the establishment of hypergraph. On the other hand, the computation and storage of kernel function are the bottlenecks of almost all SVMs, so does the HPCSVM.

Experiments
In this section, we demonstrate the validity and efficiency of our proposed method HPCSVM on twenty-five benchmark datasets from UCI machine learning repository by comparing with SVM, LSSVM, structural regularized support vector machine (SRSVM) and support vector machine with modified pairwise constraints (MPCSVM). To make the results more convincing, we use five-fold cross-validation (Duda et al. 2001) to estimate the accuracy of each experiment. More specifically, the training set is randomly partitioned into five subsets which are roughly of equal size, and one of those subsets is reserved as the testing set whereas the remaining subsets serve as the training set. This process is repeated five times until all of the five subsets have been set to be a testing one once, and the average of the five accuracies is regarded as the classification accuracy of each experiment. All the algorithms are written in MATLAB 2012a on Windows 7 running on a PC with system configuration Intel(R) Core(TM) 2 Duo CPU E7500 (2.93 GHz) with 2.00 GB of RAM. And the evaluation criterion of each algorithm is the classification accuracy of the testing examples, which is defined as follows: where TP, TN, FP and FN are the numbers of true positive, true negative, false positive and false negative on the testing examples, respectively.

Parameter selection
In our experiments, we adopt the grid search method to get the optimal parameters. In addition, for the nonlinear case, all the algorithms adopt Gaussian kernel K (x, y) = exp(−σ ||x − y|| 2 ) for the decision space. As for the tuning parameters, i.e., the Gaussian kernel parameter σ, the penalty parameter c, and the trade-off parameter c 1 are all selected from the set: {10 −2 , 10 −1 , 10 0 , 10 1 , 10 2 }. And the optimal value k for k-nearest neighbors in MPCSVM and HPCSVM is searched from the set: {3, 4, 5, 6, 10, 15}. For large-scale problems, the range of all the parameters will be narrowed uniformly due to the long training time.

Experimental results and discussions
We experiment our HPCSVM on twenty-five real-world datasets from the UCI machine learning repository. These datasets represent a wide range of fields (include pathology, finance, agronomy and so on), sizes (from 100 to 1473) and features (from 3 to 60). All the datasets are normalized such that the feature's scale is in [0, 1] before training.

Comparisons of different methods
In order to prove our proposed method be better, we compare the experimental results of various methods mentioned above. The main objects and motivations of the comparison are shown in Table 1.

Result comparisons and discussion
This subsection describes empirical comparisons of various models, such as SVM, LSSVM, SRSVM, MPCSVM and HPCSVM. The average classification accuracies and standard deviations are reported in Tables 2 and 3    comparison results in italic face are the best results. Table 2 shows the performance of linear HPCSVM with that of linear SVM, LSSVM, SRSVM and MPCSVM. Table 3 gives the performance of nonlinear HPCSVM with that of nonlinear SVM, LSSVM, SRSVM and MPCSVM. By comparing, we find: 1. SRSVM versus SVM: In SRSVM, we adopt the Ward's linkage clustering to capture the underlying data distribution within classes, and then the structural information is directly embedded into the objective function by the minimization of the compactness between the estimated clusters. For both linear and nonlinear classifiers, we can find that, except for Tic-tac-toe, all the remaining experimental results of SRSVM are much better than that of SVM. In a word, the comparison between these two methods illustrates the prior structural information within classes in the data is effective for classification. 2. MPCSVM versus SVM: In MPCSVM, we adopt the MPC trick to extract the discriminative information, then introduce the coresponding regularization term into SVM. For linear classifiers, we can find that, except for Tic-tac-toe, all the remaining experimental results of MPCSVM are better than that of SVM. For nonlinear classifiers, MPCSVM and SVM get the same experimental results on Sonar and Tic-tactoe, while for other twenty-three datasets, all the experimental results of MPCSVM are superior to that of SVM. Thus, we may safely draw the conclusion, the discriminative information about each constrained pair in data is effective for classification. 3. MPCSVM versus SRSVM: For both linear and nonlinear classifiers, there exist sixteen datasets whose experimental results of MPCSVM are better than that of SRSVM, respectively, even if the datasets are not exactly the same in the two cases. Thus, we may safely draw the conclusion, the discriminative information about each constrained pair is more effective than the structures in the data within classes for classification. 4. HPCSVM versus MPCSVM: In our HPCSVM, we adopt the HPC trick to extract the discriminative information in data, then introduce the coresponding regularization term into SVM. For linear classifiers, we can find that, HPCSVM and MPCSVM get the same experimental results on nine datasets, while for other sixteen datasets, there are twelve datasets whose experimental results of HPCSVM are better than that of MPCSVM. For nonlinear classifiers, there exist only six datasets whose experimental results of HPCSVM are poorer than that of MPCSVM. So, the comparison of these two methods demenstrates that the discriminative information with highorder relationship between different samples is more reasonable. 5. HPCSVM versus LSSVM: For linear classifiers, except for Tic-tac-toe, all the remaining experimental results of HPCSVM are better than that of LSSVM. For nonlinear classifiers, except for Seeds, Sonar and Tic-tac-toe, the remaining twenty-two experimental results of HPCSVM are better than that of LSSVM. Hence, the comparison of these two methods illustrates our proposed HPCSVM is not only better than SVM, but also better than its variants.
From Tables 2, 3, we may safely draw the conclusion, as long as the discriminative information regularization term is adopted, the best results always appear in the last two columns, i.e., experimental results on the twenty-five benchmark datasets demonstrate the discriminative information about each constrained pair in data is more effective than the structural information within classes for classification. Furthermore, we remodify the recently presented MPC regularization term with HPC method, which is expected to acquire the high-order relationship between different samples. And the comparison of the last two columns demonstrates the discriminative information with high-order relationship between several samples is more reasonable than with the pairwise relationship between two samples. In the following paper, we further analyze the statistically significant difference between results and the influence of parameter k in our HPCSVM.

Statistical test
In statistics, the Holm-Bonferroni test is a simple method for multiple Student's t test. For this, first, we order the p value of each dataset in ascending order as p (1) , p (2) , p (3) , p (4) , and denote the associated hypotheses as H (1) , H (2) , H (3) , H (4) . For the given significance level α = 0.05, let m be the minimal index such that Then, the null hypotheses H (1) , . . . , H (m−1) are rejected and H (m) , . . . , H (4) are not rejected. In this way, we can find that, for the linear case, among the 100 null hypotheses, there exist 4 hypotheses which are judged that our method has significant advantage over others, while for the nonlinear case, there only exist 2. These test results illustrate that our method is not obviously better than others. However, it is worth mentioning that HPCSVM obtains the better accuracies than the other algorithms on most datasets. This indicates that HPCSVM does not reduce any generalization performance compared with others.

Influence of cluster parameter
Below, in order to investigate the influence of cluster parameter k in our HPCSVM, we perform an experiment on a relatively large dataset, i.e., Diabetes. And the value of k ranges from 2 to 15. The comprehensive experimental results are shown in Fig. 2, which shows the tendency of testing precision as the growth of k. Note that, for both linear and nonlinear cases, the testing precision first increases and then decreases as the growth of k. The main reason may be, a too small k could easily remove some useful information, whereas, a too large k could introduce some noise points, and both of the two cases could reduce the prediction accuracy. Thus, an appropriate parameter k is very important.

Conclusion
As we know, the potential structural information of the training data is ignored by SVM. In order to mitigate this shortcoming, in this paper, we present a novel algorithm termed as HPCSVM to improve the generalization performance of SVM. More specifically, on the one hand, we could acquire the high-order relationships between different samples by hypergraph learning, on the other hand, we present a more reasonable discriminative (44) p (m) > α 4 + 1 − m regularization term by combining the discrimination metric and hypergraph learning together, at last, we introduce this novel regularization term into SVM to adjust the optimal separating hyperplane which is obtained by SVM. As expected, the novel model yields better generalization performance than SVM and its variants. However, it has more tuning parameters, so, effective model selection for the new method is an open research area.
Authors' contributions QLH and LJ conceived of the study, carried out its design and drafted the manuscript. ML and LZ performed the laboratory data collection and conducted the experimental results' analysis. All authors read and approved the final manuscript.