# A Structural SVM Based Approach for Binary Classification under Class Imbalance

Authors: Fan Cheng; Kang Yang; Lei Zhang
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

Class imbalance situations, where one class is rare compared to the other, arise frequently in machine learning applications. It is well known that the usual misclassification error is not suitable in such settings. A wide range of performance measures such as AM and QM have been proposed for this problem. However, due to computational difficulties, few learning techniques have been developed to directly optimize for AM or QM metric. To fill the gap, in this paper, we present a general structural SVM framework for directly optimizing AM and QM. We define the loss functions oriented to AM and QM, respectively, and adopt the cutting plane algorithm to solve the outer optimization. For the inner problem of finding the most violated constraint, we propose two efficient algorithms for the AM and QM problem. Empirical studies on the various imbalanced datasets justify the effectiveness of the proposed approach.


---

## Body

## 1. Introduction

Classification problem with class imbalance where one class is rare compared to the other is a common yet important problem in supervised learning. It arises in many applications, ranging from medical diagnosis and text retrieval to credit risk prediction and fraud detection [1–4]. Due to its practical importance, it has been identified as one of the ten most challenging problems in data mining research [5]. For reasons of simplicity and with no loss in generality, only binary classification problems under class imbalance are considered in this paper. However, it is important to keep in mind that the class imbalance problem is pervasive in other areas as well such as multiclass classification and association rule mining.It is well known that the usual binary learning algorithms are ill-suited in the imbalanced domains, because those classifiers will cause a bias towards the majority class and result in a lower sensitivity in detecting the minority class examples [6]. In the literature of solving class imbalance problems, a variety of approaches have been proposed, which can be mainly categorized into two groups: the data-oriented methods and the algorithm-oriented methods.The data-oriented methods use various sampling techniques to oversample instances in the minor class [6–8] or undersample those in the major class [9, 10], so that the resulting data is balanced. A typical example is the SMOTE approach [6] which increases the number of minor class instances by creating synthetic samples.The second group algorithm-oriented methods aim at the extension and modification of existing classification algorithms so that they can be more effective in dealing with imbalanced data. For example, Liu et al. and Kang and Ramamohanarao have presented two different modified decision tree algorithms for improving the standard C4.5, such as CCPDT [11] and HeDEx [12], while Köknar-Tezel et al., Joachims et al., and Lipton et al. have proposed various approaches to improve traditional SVM’s performance on the imbalanced settings [13–22].Those two groups are both effective and it is difficult to say which one is better. However, since, in this paper, our goal is to improve the existing statistical learning algorithm, in the following we are interested in algorithm-oriented method and propose a modified SVM approach by directly optimizing imbalance measure. It seems that our algorithm is similar to the algorithms in [15–22]; however, we design different objective functions and use different optimization techniques with theirs. More specifically, this paper makes the following contributions.(1)
We adopt 1-slack structural SVM as the framework and define the loss functions oriented to AM and QM, which are rarely considered in the literature of optimizing imbalance metrics.(2)
We show that the QM loss is a lower bound of the AM one, which means our QM classifier may be more accurate than the AM one.(3)
For the inner computational challenge of the AM loss, we propose to decompose it nicely and apply the Hardy-Littlewood-Polya inequality to solve it inO(nlog⁡n) time, while, for the case of QM, such decomposition is impossible. We present an efficiently greedy method for solving this problem, which also requires O(nlog⁡n) time.(4)
Empirical evaluations on the imbalanced datasets demonstrate that the proposed algorithms are not only significantly better than standard binary learning algorithm but also competitive to other existing imbalanced algorithms.The remainder of the paper is organized as follows. In Section 2 the related work is presented. Section 3 discusses the details of our proposed algorithms and the empirical results on the benchmark datasets are reported in Section 4. Section 5 concludes the paper and discusses the future work.


## 2. Related Work

### 2.1. Problem Setup and Notations

As discussed in Introduction, in this paper, we only consider the binary classification problem. Given training datasetD={(xi,yi)}i=1n, where xi∈Rd is the ith example and yi∈{+1,-1} is the corresponding class label. The binary classification problem is to construct a classifier function f(x), which gives generalization performance. We assume that the classifier function is of the form f(x)=w·x and the decision function of the form y-=sign(f(x)) is used when finding the label of an unseen example. Note that we have not included the bias term in the classifier function for notational convenience. However, it can be incorporated in a straightforward way.In machine learning area, a common way to find the linear parameterw∈Rd is minimizing a regularized risk function:(1)w=argminw⁡12w2+Cn∑i=1nlxi,yi,w,where C>0 is a constant that controls the trade-off between training error minimization and margin maximization. l is a suitable loss function which measures the discrepancy between a true label yi and a predicted value from using w. Different loss functions yield different learners. One of the most famous loss functions is the hinge loss in SVM, which has the form of l(xi,yi,w)=max(0,1-yiwxi).


### 2.2. Relevant Background

Standard SVM has been used to optimize an estimation of classification error on the training set and was shown to be a very powerful tool for classification problems when data is balanced. However, if the data is highly imbalanced, classification error is not always a good measure, and the standard SVM can be misleading. To solve this problem, a number of modified algorithms have been proposed. For example, Köknar-Tezel and Latecki [13] and Shao et al. [14] proposed approaches to improve SVM on imbalanced datasets, which they called GP and WLTSVM, respectively. But their works are both focused on improving sampling techniques (e.g., modifying SMOTE in GP) for SVM and do not solve the problem of training bias in the design of SVM learning algorithm per se. Recently, with the advances in learning to rank, direct optimization of the ranking measure technique has been extended to design SVM for imbalanced setting and a variety of algorithm-oriented methods have been proposed. Joachims [15] and Aiolli [16] presented algorithms to optimize AUC for the imbalanced data, and the experimental results on the unbalanced sets proved their effectiveness. Along the lines of the above works, Paisitkriangkrai and Narasimhan et al. further gave algorithms by optimizing partial AUC and successfully applied their approaches to the real-world tasks [17–19]. Optimizing the F-measure is another popular method for imbalance learning. Joachims [15], Chinta et al. [20], Maratea et al. [21], and Lipton et al. [22] used different approximates to the F-measure and designed different classifies. Numerical experiments on the benchmark datasets demonstrated their algorithms’ effectiveness.However, it is well known that, in evaluating imbalanced setting, there are many other performance measures besides AUC and F-measure, which include AM (arithmetic mean) [23] and QM (quadratic mean) [24]. The AM is the arithmetic mean of the true positive and true negative rates and can be defined as(2)AM=TPR+TNR2.The QM is a quadratic mean measure and is defined as(3)QM=1-FPR2+FNR22,where(4)TPR=Psign⁡fx=1∣y=1,TNR=Psign⁡fx=-1∣y=-1,FPR=Psign⁡fx=1∣y=-1=1-TNR,FNR=Psign⁡fx=-1∣y=1=1-TPR.Although AM and QM are popular in the imbalanced setting, surprisingly, little has been focused on designing the algorithms based on them. Until very recently, Menon provided a consistent algorithm, which aimed at directly optimizing AM measure [25]. This approach is effective, but it is only suitable for the AM measure; whether it can be extended to other measures such as QM is still unknown. In contrast to Menon’s work, in this paper, we will present a general learning framework, whose loss function allows us to incorporate different imbalanced measure. We exploit it for optimizing AM and QM. In the following, we will discuss our approach in detail.


## 2.1. Problem Setup and Notations

As discussed in Introduction, in this paper, we only consider the binary classification problem. Given training datasetD={(xi,yi)}i=1n, where xi∈Rd is the ith example and yi∈{+1,-1} is the corresponding class label. The binary classification problem is to construct a classifier function f(x), which gives generalization performance. We assume that the classifier function is of the form f(x)=w·x and the decision function of the form y-=sign(f(x)) is used when finding the label of an unseen example. Note that we have not included the bias term in the classifier function for notational convenience. However, it can be incorporated in a straightforward way.In machine learning area, a common way to find the linear parameterw∈Rd is minimizing a regularized risk function:(1)w=argminw⁡12w2+Cn∑i=1nlxi,yi,w,where C>0 is a constant that controls the trade-off between training error minimization and margin maximization. l is a suitable loss function which measures the discrepancy between a true label yi and a predicted value from using w. Different loss functions yield different learners. One of the most famous loss functions is the hinge loss in SVM, which has the form of l(xi,yi,w)=max(0,1-yiwxi).


## 2.2. Relevant Background

Standard SVM has been used to optimize an estimation of classification error on the training set and was shown to be a very powerful tool for classification problems when data is balanced. However, if the data is highly imbalanced, classification error is not always a good measure, and the standard SVM can be misleading. To solve this problem, a number of modified algorithms have been proposed. For example, Köknar-Tezel and Latecki [13] and Shao et al. [14] proposed approaches to improve SVM on imbalanced datasets, which they called GP and WLTSVM, respectively. But their works are both focused on improving sampling techniques (e.g., modifying SMOTE in GP) for SVM and do not solve the problem of training bias in the design of SVM learning algorithm per se. Recently, with the advances in learning to rank, direct optimization of the ranking measure technique has been extended to design SVM for imbalanced setting and a variety of algorithm-oriented methods have been proposed. Joachims [15] and Aiolli [16] presented algorithms to optimize AUC for the imbalanced data, and the experimental results on the unbalanced sets proved their effectiveness. Along the lines of the above works, Paisitkriangkrai and Narasimhan et al. further gave algorithms by optimizing partial AUC and successfully applied their approaches to the real-world tasks [17–19]. Optimizing the F-measure is another popular method for imbalance learning. Joachims [15], Chinta et al. [20], Maratea et al. [21], and Lipton et al. [22] used different approximates to the F-measure and designed different classifies. Numerical experiments on the benchmark datasets demonstrated their algorithms’ effectiveness.However, it is well known that, in evaluating imbalanced setting, there are many other performance measures besides AUC and F-measure, which include AM (arithmetic mean) [23] and QM (quadratic mean) [24]. The AM is the arithmetic mean of the true positive and true negative rates and can be defined as(2)AM=TPR+TNR2.The QM is a quadratic mean measure and is defined as(3)QM=1-FPR2+FNR22,where(4)TPR=Psign⁡fx=1∣y=1,TNR=Psign⁡fx=-1∣y=-1,FPR=Psign⁡fx=1∣y=-1=1-TNR,FNR=Psign⁡fx=-1∣y=1=1-TPR.Although AM and QM are popular in the imbalanced setting, surprisingly, little has been focused on designing the algorithms based on them. Until very recently, Menon provided a consistent algorithm, which aimed at directly optimizing AM measure [25]. This approach is effective, but it is only suitable for the AM measure; whether it can be extended to other measures such as QM is still unknown. In contrast to Menon’s work, in this paper, we will present a general learning framework, whose loss function allows us to incorporate different imbalanced measure. We exploit it for optimizing AM and QM. In the following, we will discuss our approach in detail.


## 3. DOPMID: Direct Optimization of Performance Measure for Imbalanced Dataset

### 3.1. The Framework of DOPMID

We referred to the classifier we presented as DOPMID (Direct Optimization of Performance Measure for Imbalanced Dataset). The framework of DOPMID is based on structural SVM proposed by Joachims et al. [26]. Specifically, we use the 1-slack SVM formulation, presented in (OP1) (optimization problem 1), to learn a linear w∈Rd. Note that the following approach can be extended to nonlinear function/non-Euclidean instance spaces by using kernels [27]:(5)OP1min⁡w,ξ≥012wTw+Cξs.t.∀y-∈Y:wTψx,y-ψx,y-≥Δy,y--ξ.For simplicity, in the paper, we assume that the training dataset D={(xi,yi)}i=1n has been ordered by the positive instances ahead of the negative ones, and we define x={x1+,…,x#pos+,x1-,…,x#neg-}, y={y1+,…,y#pos+,y1-,…,y#neg-}, where #pos is the number of the positive instances, #neg is the number of the negative instances, and (#pos)+(#neg)=n. y- stands for any possible permutation of predicted list from using the parameter w. ψ represents a mapping function from input list to output list. Δ(y,y-)→R is a function used to measure the difference between the real output y and the predicted output y-. This function must satisfy the following conditions:(6)1for∀y=y-,Δy,y-=0;2for∀y≠y-,Δy,y->0.In contrast to the traditional SVM which has n slack ξi, there is only a single slack variable ξ in the (OP1) above. We refer to it as the “1-slack” SVM.


### 3.2. The Loss Functions Oriented to AM and QM

For the framework above, we need to further define the functionsψ(x,y) and Δ(y,y-), in order to determine the optimization target.In this paper, we first defineψ(x,y) as(7)ψx,y=∑i=1nyixi.Then we define Δ(y,y-) oriented to AM and QM, respectively, as(8)ΔAMy,y-=∑i=1#pos1y-i≠yi/#pos+∑i=#pos+1n1y-i≠yi/#neg2,(9)ΔQMy,y-=∑i=1#pos1y-i≠yi/#pos2+∑i=#pos+1n1y-i≠yi/#neg22.In equality (8) and (9), the function 1() is an indicator function, which can be demonstrated as(10)1a=1ifais  true0others.It is obvious that ΔAM(y,y-) and ΔQM(y,y-) defined in (8) and (9) satisfy the constraint conditions in (6). It has been proved that if the function Δ satisfies (6), the slack ξ is a convex upper bound on the training loss regularized by the norm of the weight vector [26].In the following, we will show the fact that althoughξAM, ξQM are both upper bound, ξQM is a lower bound than ξAM.Lemma 1.
ξ
Q
M defined by (9) is a lower bound than ξAM defined by (8).Proof.
Since the slackξ is a convex upper bound on the training loss, we can rewrite (OP1) as (11)minw,ξ≥0⁡12wTw+CΔy,y--wTψx,y-ψx,y-︸ξ.Then we replace (8) and (9) with Δ(y,y-) and get the AM bound and QM bound, respectively:(12)ξAM=∑i=1#pos1y-i≠yi/#pos+∑i=#pos+1n1y-i≠yi/#neg2-wTψx,y-ψx,y-,(13)ξQM=∑i=1#pos1y-i≠yi/#pos2+∑i=#pos+1n1y-i≠yi/#neg22-wTψx,y-ψx,y-,(14)ξQM-ξAM=∑i=1#pos1y-i≠yi/#pos2+∑i=#pos+1n1y-i≠yi/#neg22-∑i=1#pos1y-i≠yi/#pos+∑i=#pos+1n1y-i≠yi/#neg2.We can simplify (14) as(15)∑i=1#pos1y-i≠yi#pos2+∑i=#pos+1n1y-i≠yi#neg2-∑i=1#pos1y-i≠yi#pos-∑i=#pos+1n1y-i≠yi#neg.Since(16)0≤∑i=1#pos1y-i≠yi#pos≤1,we obtain(17)∑i=1#pos1y-i≠yi#pos2≤∑i=1#pos1y-i≠yi#pos.Since (18)0≤∑i=#pos+1n1y-i≠yi#neg≤1,we obtain(19)∑i=#pos+1n1y-i≠yi#neg2≤∑i=#pos+1n1y-i≠yi#neg.Combining inequality (17) and (19), we get(20)∑i=1#pos1y-i≠yi#pos2+∑i=#pos+1n1y-i≠yi#neg2-∑i=1#pos1y-i≠yi#pos-∑i=#pos+1n1y-i≠yi#neg≤0which means that ξQM-ξAM≤0 and proves the claim.We can solve the (OP1) by substituting (7), (8), and (9) with (5), but unfortunately there is still a question: for each y-∈Y, inequality (5) has an exponential number of constraints. To solve this problem, we propose to use the cutting plane algorithm, which is based on the fact that, for any ε>0, a small subset of the constraints is sufficient to find an ε-approximate solution to the problem. The detail of the cutting plane algorithm is shown in Algorithm 1.Algorithm 1:Cutting plane algorithm for solving (OP1) within tolerance ε.
Step  1. Input: x=x1+,…,x#pos+,x1-,…,x#neg-,  y=y1+,…,y#pos+,y1-,…,y#neg-, C, ε>0
Step  2. W←⌀
Step  3. repeat
Step  4.     (w,ξ)←min⁡w,ξ≥0⁡(1/2)wTw+Cξ
s.t.∀y-∈W:wT[ψ(x,y)-ψ(x,y-)]≥Δ(y,y-)-ξ
Step  5.          y^←arg⁡max⁡y^∈Y{Δ(y,y^)+wTψ(x,y^)}     (OP2)
Step  6.     W←W∪{y^}
Step  7. until  Δ(y,y^)-wT[ψ(x,y)-ψ(x,y^)]≤ξ+ε
Step  8. Output: (w,ξ)The algorithm starts with no constraints and iteratively finds for each possible outputy^ associated with the most violated constraint. If the corresponding constraint is violated by more than ε we introduce y^ into working set W and resolve (OP1) with the updated W. It can be shown that Algorithm 1’s outer loop is guaranteed to halt within O1/ε iterations for any desired precision ε [26].Since the quadratic program in each iteration of this algorithm is of constant size, the only bottleneck in the algorithm is how to solve the (OP2), which is known as the problem of “finding the most violated constraint.” In the following, we will show how it can be performed efficiently for the AM loss and QM loss, respectively.


### 3.3. Efficient Algorithms for Finding the Most Violated Constraint

First of all, we rewrite (7) as(21)ψx,y=∑i=1nyixi=∑i=1#posyixi+∑i=#pos+1nyixi.


#### 3.3.1. The Algorithm for AM Loss

Substituting (8) and (21) with (OP2), it follows thatOP3arg⁡maxy^∈Y⁡Δy,y^+wTψx,y^=arg⁡maxy^∈Y⁡∑i=1#pos1y^i≠yi/#pos+∑i=#pos+1n1y^i≠yi/#neg2+∑i=1#poswTy^ixi+∑i=#pos+1nwTy^ixi=arg⁡maxy^∈Y⁡1-∑i=1#pos1y^i=yi/#pos+∑i=#pos+1n1y^i=yi/#neg2+∑i=1#poswTy^ixi+∑i=#pos+1nwTy^ixi=arg⁡maxy^∈Y⁡∑i=1#poswTy^ixi-1y^i=yi2·#pos+∑i=#pos+1nwTy^ixi-1y^i=yi2·#neg=arg⁡maxy^∈Y⁡∑i=1#posΓi#pos+∑i=#pos+1nΓi#neg,where Γi#pos=wTy^ixi-1y^i=yi/2·#pos and Γi#neg=wTy^ixi-1(y^i=yi)/2·#neg.We can calculateΓi#pos and Γi#neg according to current weight wT; hence we apply the Hardy-Littlewood-Polya inequality and observe that OP3 is maximized by sorting the terms Γi#pos, Γi#neg in decreasing order. Note that this permutation is easily obtained by applying Quick Sort in O(nlog⁡n) time.


#### 3.3.2. The Algorithm for QM Loss

Unlike for the AM loss, the (OP2) can be decomposed linearly in the instances. The (OP2) for the QM loss is quite different and needs a substantially extended algorithm, which we will describe in the following. First, we substitute (9) and (21) with (OP2). This givesOP4arg⁡maxy^∈Y⁡Δy,y^+wTψx,y^=arg⁡maxy^∈Y⁡∑i=1#pos1y^i≠yi/#pos2+∑i=#pos+1n1y^i≠yi/#neg22+∑i=1#poswTy^ixi+∑i=#pos+1nwTy^ixi.From the above, we can see that the decomposition technology used in OP3 is not suitable for OP4, since ∑i=1#pos2 and ∑i=#pos+1n2 can no longer be absorbed in ∑i=1#pos and ∑i=#pos+1n. To solve this problem, in the following, we will provide a more trick optimization for the OP4. The algorithm we proposed is based on the fact that, for each y-i in Y, there is only two possible values, which denote +1, −1. So in the following we will present an efficient algorithm, which can find argmaxy^∈Y in O(nlog⁡n) time (see Algorithm 2).Algorithm 2:Algorithm for computing arg max with QP4 for QM loss.
Step  1. Input: x=x1+,…,x#pos+,x1-,…,x#neg-, y=y1+,…,y#pos+,y1-,…,y#neg-, current weight wT
Step  2. Sort i:y1+,…,y#pos+→(i1P,…,i#posP) in descending order by current wTxi+
Step  3. Sort i:y1-,…,y#neg-→(i1N,…,i#negN) in descending order by current wTxi-
Step  4. y^=(yi1P,…,yi#posP,yi1N,…,yi#negN)
Step  5. fmax⁡← compute OP4 with y^
Step  6. fork=0,…,#posdo
Step  7.   l←#pos-k
Step  8.   yi1P~=+1,…,yikP~=+1andyik+1P~=-1,…,yi#posP~=-1
Step  9.   fort=0,…,#negdo
Step  10.     v←#neg-t
Step  11.     yi1N~=+1,…,yivN~=+1andyiv+1N~=-1,…,yi#negN~=-1
Step  12.     fcom← compute OP4 with yi1P~,…,yi#posP~,yi1N~,…,yi#negN~
Step  13.     iffcom>fmax⁡
Step  14.          fmax⁡=fcom
Step  15.          y^=(yi1P~,…,yi#posP~,yi1N~,…,y1#negN~)
Step  16.     endif
Step  17.   endfor
Step  18. endfor
Step  19. Output: (y^)The idea behind Algorithm2 is the fact that the most violated constraint y^ must have the following form: k(0≤k≤#pos) positive instances are labeled positive and other positive ones are labeled negative; t(0≤t≤#neg) negative instances are classified as negative and other negative ones are classified as positive. So we can get y^ by testing each y~i with +1, −1. Specifically, Algorithm 2 starts with a “perfect classification” (Step 2 to Step 5) and then uses the greedy algorithm to find the most violated constraint y^ with maximum value for OP4 (Step 6 to Step 18).Algorithm2 is very efficient, and its running time can be split into two parts. The first part is the sort (Step 2, Step 3), which requires O(nlog⁡n). The second part is the following steps, which requires O(#pos·#neg) time. Though in the worst case this is O(n2), the number of the positive instances in the imbalanced datasets is very small, which means the running time for the second part is simply O(n). So Algorithm 2 has complexity of O(nlog⁡n).


## 3.1. The Framework of DOPMID

We referred to the classifier we presented as DOPMID (Direct Optimization of Performance Measure for Imbalanced Dataset). The framework of DOPMID is based on structural SVM proposed by Joachims et al. [26]. Specifically, we use the 1-slack SVM formulation, presented in (OP1) (optimization problem 1), to learn a linear w∈Rd. Note that the following approach can be extended to nonlinear function/non-Euclidean instance spaces by using kernels [27]:(5)OP1min⁡w,ξ≥012wTw+Cξs.t.∀y-∈Y:wTψx,y-ψx,y-≥Δy,y--ξ.For simplicity, in the paper, we assume that the training dataset D={(xi,yi)}i=1n has been ordered by the positive instances ahead of the negative ones, and we define x={x1+,…,x#pos+,x1-,…,x#neg-}, y={y1+,…,y#pos+,y1-,…,y#neg-}, where #pos is the number of the positive instances, #neg is the number of the negative instances, and (#pos)+(#neg)=n. y- stands for any possible permutation of predicted list from using the parameter w. ψ represents a mapping function from input list to output list. Δ(y,y-)→R is a function used to measure the difference between the real output y and the predicted output y-. This function must satisfy the following conditions:(6)1for∀y=y-,Δy,y-=0;2for∀y≠y-,Δy,y->0.In contrast to the traditional SVM which has n slack ξi, there is only a single slack variable ξ in the (OP1) above. We refer to it as the “1-slack” SVM.


## 3.2. The Loss Functions Oriented to AM and QM

For the framework above, we need to further define the functionsψ(x,y) and Δ(y,y-), in order to determine the optimization target.In this paper, we first defineψ(x,y) as(7)ψx,y=∑i=1nyixi.Then we define Δ(y,y-) oriented to AM and QM, respectively, as(8)ΔAMy,y-=∑i=1#pos1y-i≠yi/#pos+∑i=#pos+1n1y-i≠yi/#neg2,(9)ΔQMy,y-=∑i=1#pos1y-i≠yi/#pos2+∑i=#pos+1n1y-i≠yi/#neg22.In equality (8) and (9), the function 1() is an indicator function, which can be demonstrated as(10)1a=1ifais  true0others.It is obvious that ΔAM(y,y-) and ΔQM(y,y-) defined in (8) and (9) satisfy the constraint conditions in (6). It has been proved that if the function Δ satisfies (6), the slack ξ is a convex upper bound on the training loss regularized by the norm of the weight vector [26].In the following, we will show the fact that althoughξAM, ξQM are both upper bound, ξQM is a lower bound than ξAM.Lemma 1.
ξ
Q
M defined by (9) is a lower bound than ξAM defined by (8).Proof.
Since the slackξ is a convex upper bound on the training loss, we can rewrite (OP1) as (11)minw,ξ≥0⁡12wTw+CΔy,y--wTψx,y-ψx,y-︸ξ.Then we replace (8) and (9) with Δ(y,y-) and get the AM bound and QM bound, respectively:(12)ξAM=∑i=1#pos1y-i≠yi/#pos+∑i=#pos+1n1y-i≠yi/#neg2-wTψx,y-ψx,y-,(13)ξQM=∑i=1#pos1y-i≠yi/#pos2+∑i=#pos+1n1y-i≠yi/#neg22-wTψx,y-ψx,y-,(14)ξQM-ξAM=∑i=1#pos1y-i≠yi/#pos2+∑i=#pos+1n1y-i≠yi/#neg22-∑i=1#pos1y-i≠yi/#pos+∑i=#pos+1n1y-i≠yi/#neg2.We can simplify (14) as(15)∑i=1#pos1y-i≠yi#pos2+∑i=#pos+1n1y-i≠yi#neg2-∑i=1#pos1y-i≠yi#pos-∑i=#pos+1n1y-i≠yi#neg.Since(16)0≤∑i=1#pos1y-i≠yi#pos≤1,we obtain(17)∑i=1#pos1y-i≠yi#pos2≤∑i=1#pos1y-i≠yi#pos.Since (18)0≤∑i=#pos+1n1y-i≠yi#neg≤1,we obtain(19)∑i=#pos+1n1y-i≠yi#neg2≤∑i=#pos+1n1y-i≠yi#neg.Combining inequality (17) and (19), we get(20)∑i=1#pos1y-i≠yi#pos2+∑i=#pos+1n1y-i≠yi#neg2-∑i=1#pos1y-i≠yi#pos-∑i=#pos+1n1y-i≠yi#neg≤0which means that ξQM-ξAM≤0 and proves the claim.We can solve the (OP1) by substituting (7), (8), and (9) with (5), but unfortunately there is still a question: for each y-∈Y, inequality (5) has an exponential number of constraints. To solve this problem, we propose to use the cutting plane algorithm, which is based on the fact that, for any ε>0, a small subset of the constraints is sufficient to find an ε-approximate solution to the problem. The detail of the cutting plane algorithm is shown in Algorithm 1.Algorithm 1:Cutting plane algorithm for solving (OP1) within tolerance ε.
Step  1. Input: x=x1+,…,x#pos+,x1-,…,x#neg-,  y=y1+,…,y#pos+,y1-,…,y#neg-, C, ε>0
Step  2. W←⌀
Step  3. repeat
Step  4.     (w,ξ)←min⁡w,ξ≥0⁡(1/2)wTw+Cξ
s.t.∀y-∈W:wT[ψ(x,y)-ψ(x,y-)]≥Δ(y,y-)-ξ
Step  5.          y^←arg⁡max⁡y^∈Y{Δ(y,y^)+wTψ(x,y^)}     (OP2)
Step  6.     W←W∪{y^}
Step  7. until  Δ(y,y^)-wT[ψ(x,y)-ψ(x,y^)]≤ξ+ε
Step  8. Output: (w,ξ)The algorithm starts with no constraints and iteratively finds for each possible outputy^ associated with the most violated constraint. If the corresponding constraint is violated by more than ε we introduce y^ into working set W and resolve (OP1) with the updated W. It can be shown that Algorithm 1’s outer loop is guaranteed to halt within O1/ε iterations for any desired precision ε [26].Since the quadratic program in each iteration of this algorithm is of constant size, the only bottleneck in the algorithm is how to solve the (OP2), which is known as the problem of “finding the most violated constraint.” In the following, we will show how it can be performed efficiently for the AM loss and QM loss, respectively.


## 3.3. Efficient Algorithms for Finding the Most Violated Constraint

First of all, we rewrite (7) as(21)ψx,y=∑i=1nyixi=∑i=1#posyixi+∑i=#pos+1nyixi.


### 3.3.1. The Algorithm for AM Loss

Substituting (8) and (21) with (OP2), it follows thatOP3arg⁡maxy^∈Y⁡Δy,y^+wTψx,y^=arg⁡maxy^∈Y⁡∑i=1#pos1y^i≠yi/#pos+∑i=#pos+1n1y^i≠yi/#neg2+∑i=1#poswTy^ixi+∑i=#pos+1nwTy^ixi=arg⁡maxy^∈Y⁡1-∑i=1#pos1y^i=yi/#pos+∑i=#pos+1n1y^i=yi/#neg2+∑i=1#poswTy^ixi+∑i=#pos+1nwTy^ixi=arg⁡maxy^∈Y⁡∑i=1#poswTy^ixi-1y^i=yi2·#pos+∑i=#pos+1nwTy^ixi-1y^i=yi2·#neg=arg⁡maxy^∈Y⁡∑i=1#posΓi#pos+∑i=#pos+1nΓi#neg,where Γi#pos=wTy^ixi-1y^i=yi/2·#pos and Γi#neg=wTy^ixi-1(y^i=yi)/2·#neg.We can calculateΓi#pos and Γi#neg according to current weight wT; hence we apply the Hardy-Littlewood-Polya inequality and observe that OP3 is maximized by sorting the terms Γi#pos, Γi#neg in decreasing order. Note that this permutation is easily obtained by applying Quick Sort in O(nlog⁡n) time.


### 3.3.2. The Algorithm for QM Loss

Unlike for the AM loss, the (OP2) can be decomposed linearly in the instances. The (OP2) for the QM loss is quite different and needs a substantially extended algorithm, which we will describe in the following. First, we substitute (9) and (21) with (OP2). This givesOP4arg⁡maxy^∈Y⁡Δy,y^+wTψx,y^=arg⁡maxy^∈Y⁡∑i=1#pos1y^i≠yi/#pos2+∑i=#pos+1n1y^i≠yi/#neg22+∑i=1#poswTy^ixi+∑i=#pos+1nwTy^ixi.From the above, we can see that the decomposition technology used in OP3 is not suitable for OP4, since ∑i=1#pos2 and ∑i=#pos+1n2 can no longer be absorbed in ∑i=1#pos and ∑i=#pos+1n. To solve this problem, in the following, we will provide a more trick optimization for the OP4. The algorithm we proposed is based on the fact that, for each y-i in Y, there is only two possible values, which denote +1, −1. So in the following we will present an efficient algorithm, which can find argmaxy^∈Y in O(nlog⁡n) time (see Algorithm 2).Algorithm 2:Algorithm for computing arg max with QP4 for QM loss.
Step  1. Input: x=x1+,…,x#pos+,x1-,…,x#neg-, y=y1+,…,y#pos+,y1-,…,y#neg-, current weight wT
Step  2. Sort i:y1+,…,y#pos+→(i1P,…,i#posP) in descending order by current wTxi+
Step  3. Sort i:y1-,…,y#neg-→(i1N,…,i#negN) in descending order by current wTxi-
Step  4. y^=(yi1P,…,yi#posP,yi1N,…,yi#negN)
Step  5. fmax⁡← compute OP4 with y^
Step  6. fork=0,…,#posdo
Step  7.   l←#pos-k
Step  8.   yi1P~=+1,…,yikP~=+1andyik+1P~=-1,…,yi#posP~=-1
Step  9.   fort=0,…,#negdo
Step  10.     v←#neg-t
Step  11.     yi1N~=+1,…,yivN~=+1andyiv+1N~=-1,…,yi#negN~=-1
Step  12.     fcom← compute OP4 with yi1P~,…,yi#posP~,yi1N~,…,yi#negN~
Step  13.     iffcom>fmax⁡
Step  14.          fmax⁡=fcom
Step  15.          y^=(yi1P~,…,yi#posP~,yi1N~,…,y1#negN~)
Step  16.     endif
Step  17.   endfor
Step  18. endfor
Step  19. Output: (y^)The idea behind Algorithm2 is the fact that the most violated constraint y^ must have the following form: k(0≤k≤#pos) positive instances are labeled positive and other positive ones are labeled negative; t(0≤t≤#neg) negative instances are classified as negative and other negative ones are classified as positive. So we can get y^ by testing each y~i with +1, −1. Specifically, Algorithm 2 starts with a “perfect classification” (Step 2 to Step 5) and then uses the greedy algorithm to find the most violated constraint y^ with maximum value for OP4 (Step 6 to Step 18).Algorithm2 is very efficient, and its running time can be split into two parts. The first part is the sort (Step 2, Step 3), which requires O(nlog⁡n). The second part is the following steps, which requires O(#pos·#neg) time. Though in the worst case this is O(n2), the number of the positive instances in the imbalanced datasets is very small, which means the running time for the second part is simply O(n). So Algorithm 2 has complexity of O(nlog⁡n).


## 3.3.1. The Algorithm for AM Loss

Substituting (8) and (21) with (OP2), it follows thatOP3arg⁡maxy^∈Y⁡Δy,y^+wTψx,y^=arg⁡maxy^∈Y⁡∑i=1#pos1y^i≠yi/#pos+∑i=#pos+1n1y^i≠yi/#neg2+∑i=1#poswTy^ixi+∑i=#pos+1nwTy^ixi=arg⁡maxy^∈Y⁡1-∑i=1#pos1y^i=yi/#pos+∑i=#pos+1n1y^i=yi/#neg2+∑i=1#poswTy^ixi+∑i=#pos+1nwTy^ixi=arg⁡maxy^∈Y⁡∑i=1#poswTy^ixi-1y^i=yi2·#pos+∑i=#pos+1nwTy^ixi-1y^i=yi2·#neg=arg⁡maxy^∈Y⁡∑i=1#posΓi#pos+∑i=#pos+1nΓi#neg,where Γi#pos=wTy^ixi-1y^i=yi/2·#pos and Γi#neg=wTy^ixi-1(y^i=yi)/2·#neg.We can calculateΓi#pos and Γi#neg according to current weight wT; hence we apply the Hardy-Littlewood-Polya inequality and observe that OP3 is maximized by sorting the terms Γi#pos, Γi#neg in decreasing order. Note that this permutation is easily obtained by applying Quick Sort in O(nlog⁡n) time.


## 3.3.2. The Algorithm for QM Loss

Unlike for the AM loss, the (OP2) can be decomposed linearly in the instances. The (OP2) for the QM loss is quite different and needs a substantially extended algorithm, which we will describe in the following. First, we substitute (9) and (21) with (OP2). This givesOP4arg⁡maxy^∈Y⁡Δy,y^+wTψx,y^=arg⁡maxy^∈Y⁡∑i=1#pos1y^i≠yi/#pos2+∑i=#pos+1n1y^i≠yi/#neg22+∑i=1#poswTy^ixi+∑i=#pos+1nwTy^ixi.From the above, we can see that the decomposition technology used in OP3 is not suitable for OP4, since ∑i=1#pos2 and ∑i=#pos+1n2 can no longer be absorbed in ∑i=1#pos and ∑i=#pos+1n. To solve this problem, in the following, we will provide a more trick optimization for the OP4. The algorithm we proposed is based on the fact that, for each y-i in Y, there is only two possible values, which denote +1, −1. So in the following we will present an efficient algorithm, which can find argmaxy^∈Y in O(nlog⁡n) time (see Algorithm 2).Algorithm 2:Algorithm for computing arg max with QP4 for QM loss.
Step  1. Input: x=x1+,…,x#pos+,x1-,…,x#neg-, y=y1+,…,y#pos+,y1-,…,y#neg-, current weight wT
Step  2. Sort i:y1+,…,y#pos+→(i1P,…,i#posP) in descending order by current wTxi+
Step  3. Sort i:y1-,…,y#neg-→(i1N,…,i#negN) in descending order by current wTxi-
Step  4. y^=(yi1P,…,yi#posP,yi1N,…,yi#negN)
Step  5. fmax⁡← compute OP4 with y^
Step  6. fork=0,…,#posdo
Step  7.   l←#pos-k
Step  8.   yi1P~=+1,…,yikP~=+1andyik+1P~=-1,…,yi#posP~=-1
Step  9.   fort=0,…,#negdo
Step  10.     v←#neg-t
Step  11.     yi1N~=+1,…,yivN~=+1andyiv+1N~=-1,…,yi#negN~=-1
Step  12.     fcom← compute OP4 with yi1P~,…,yi#posP~,yi1N~,…,yi#negN~
Step  13.     iffcom>fmax⁡
Step  14.          fmax⁡=fcom
Step  15.          y^=(yi1P~,…,yi#posP~,yi1N~,…,y1#negN~)
Step  16.     endif
Step  17.   endfor
Step  18. endfor
Step  19. Output: (y^)The idea behind Algorithm2 is the fact that the most violated constraint y^ must have the following form: k(0≤k≤#pos) positive instances are labeled positive and other positive ones are labeled negative; t(0≤t≤#neg) negative instances are classified as negative and other negative ones are classified as positive. So we can get y^ by testing each y~i with +1, −1. Specifically, Algorithm 2 starts with a “perfect classification” (Step 2 to Step 5) and then uses the greedy algorithm to find the most violated constraint y^ with maximum value for OP4 (Step 6 to Step 18).Algorithm2 is very efficient, and its running time can be split into two parts. The first part is the sort (Step 2, Step 3), which requires O(nlog⁡n). The second part is the following steps, which requires O(#pos·#neg) time. Though in the worst case this is O(n2), the number of the positive instances in the imbalanced datasets is very small, which means the running time for the second part is simply O(n). So Algorithm 2 has complexity of O(nlog⁡n).


## 4. Experiments

### 4.1. Datasets and Baselines

The main goal of our experiments is to evaluate whether the classifiers we proposed can outperform the existing binary classifiers in the imbalanced setting. In particular, we select three datasets with varying degrees of class imbalance, taken from the libsvm dataset repository (downloaded from:http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/), which are named as satimage, w1a, and vowel. The characteristics of those sets are summarized in Table 1.Table 1
Characteristics of the imbalanced datasets.
Dataset
#Examples
#Features
Min (%)
Satimage
6435
36
0.0973
w1a
49749
300
0.0291
Vowel
990
10
0.0909The “#Examples” and “#Features” denote the number of examples and features, respectively. “Min(%)” represents the proportion of examples in the minority class.On those imbalanced datasets, we compare our classifiers (DOPMID-AM, DOPMID-QM) against the following classifiers: SVM-Hinge [28], safe-level-SMOTE [7], CCPDT [11], SVM-F1 [22], and AM-Consist [25]. Among them, SVM-Hinge is a traditional balanced binary classifier which seeks to minimize the hinge loss, and the latter four algorithms are all for the imbalanced setting. We choose those four as comparisons because we are interested in how our algorithms perform, when compared with other imbalanced algorithms. In the following experiments, unless otherwise noted, the parameters C of our algorithms are all chosen in the set {2-10,…,210}, and the error parameters ε of algorithms are set to 0.001.


### 4.2. Experimental Results

The experimental results are reported in terms of AM [23], QM [24], and F1 [15], which are all commonly adopted as the performance metrics for evaluating imbalanced learning classifiers. More specifically, we compare our proposed classifiers from the following two aspects.


#### 4.2.1. Comparison with SVM-Hinge

We design this comparison in order to see whether the algorithms we proposed above can really be better-behaved than the standard SVM on the imbalanced datasets. The experimental results on the three sets are illustrated in Figure1.Figure 1
The performance comparison between DOPMID and SVM-Hinge.
(a)
The results in terms of AM
(b)
The results in terms of QM
(c)
The results in terms of F1From Figure1, we can see that as expected, on all the three datasets, DOPMID-AM and DOPMID-QM are significantly better than SVM-Hinge in terms of all the measures. Due to space limitation, we only report the statistics measured by AM as an example. When compared with SVM-Hinge, DOPMID-AM increases 32.21% on satimage set, 14.42% on w1a set, and 6.87% on the vowel set, while, for the DOPMID-QM, the improvement corresponds to 33.80%, 14.42%, and 13.87%, respectively. All the results prove the effectiveness of our method and once again indicate that we can obtain a more accurate unbalanced classifier by directly optimizing the imbalanced evaluation metrics.Meanwhile, it can be seen from the figures that DOPMID-QM outperforms DOPMID-AM on most of the points. More specifically, on the experimental sets, DOPMID-QM is better than DOPMID-AM with 6 out of all the 9 points and is similar to DOPMID-AM with the other three points. These results, thus, suggest that DOPMID-QM can be more accurate than DOPMID-AM. This may be due to the fact that the loss function of DOPMID-QM is lower than the DOPMID-AM’s, which can create more precise classifier. This observation is also consistent with Chen’s conjure that it is possible to create more accurate model by defining tighter bound [29].


#### 4.2.2. Comparison with Other Imbalanced Algorithms

In the second section, we are interested in how our algorithms perform, when compared with other imbalanced binary classifiers. More specifically, we compare our DOPMID with safe-level-SMOTE, CCPDT, and SVM-F1 and AM-Consist. We choose those four algorithms, because as discussed in Introduction, they represent two different methods for dealing with imbalanced problem. Safe-level-SMOTE uses oversampling technique and belongs to the data-oriented method. We adopt it instead of SMOTE, since it can produce better accuracy than SMOTE by using different weight degrees on the synthetic examples [7]. The latter three algorithms all belong to algorithm-oriented methods. CCPDT is an efficient decision tree algorithm, which improved C4.5 on imbalanced datasets by using Fisher’s exact test to prune branches of tree. SVM-F1 and AM-Consist are both SVM based approaches. SVM-F1 modified traditional SVM by optimizing F1 measure, while AM-Consist is a very recently proposed consistent classifier that aims at optimizing AM measure, which is the same as DOPMID-AM. We include it to make the effectiveness of our algorithms more convincing. It should be noted that, in the paper [25], the authors have proposed two consistent AM algorithms named as Plugin and Balanced, respectively. In our experiments, we select the Balanced as the AM-Consist, because a detailed analysis in their supplementary material shows that the Balanced performs better than the Plugin. Figure 2 depicts the behaviors of those algorithms on the satimage, w1a, and vowel datasets.Figure 2
The performance comparison between DOPMID and other imbalanced binary algorithms.
(a)
The results in terms of AM
(b)
The results in terms of QM
(c)
The results in terms of F1As can be seen from Figure2, the performance of algorithms in comparison varies from one dataset to another, and there is no one algorithm that can outperform other algorithms on all the datasets. For example, when measured by AM, safe-level-SMOTE performs best on vowel set, while it is the worst one on the other two sets. SVM-F1 performs well on satimage and w1a in terms of F1; however, it yields poor performances on w1a and vowel in terms of QM. Similarly, CCPDT achieves a better performance than AM-Consist on satimage dataset, but it is worse than AM-Consist on w1a set. Different from those comparison algorithms, DOPMID-QM we proposed appears to perform more stably across all the datasets. Statistics show that when compared with other imbalanced classifiers, DOPMID-QM performs best on 4 of 9 points and is the second best on 4 of 9 points. It is the third best one on the w1a when measured by F1. All those demonstrate that even compared with others imbalanced binary classifiers, our DOPMID-QM approach is still effective and is suitable for the imbalanced settings.Finally, we compare our DOPMID-AM with AM-Consist, because they both improve traditional SVM by optimizing AM measure. The results from Figure2 are somewhat surprising where DOPMID-AM wins 5 of 9 points and fails in 4 points. More specifically, when compared with DOPMID-AM, AM-Consist performs better on w1a set and yields poorer performances on the other two sets. One possible explanation is that AM-Consist is a consistent algorithm and may be more suitable for the set with large number of examples (such as w1a dataset).


## 4.1. Datasets and Baselines

The main goal of our experiments is to evaluate whether the classifiers we proposed can outperform the existing binary classifiers in the imbalanced setting. In particular, we select three datasets with varying degrees of class imbalance, taken from the libsvm dataset repository (downloaded from:http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/), which are named as satimage, w1a, and vowel. The characteristics of those sets are summarized in Table 1.Table 1
Characteristics of the imbalanced datasets.
Dataset
#Examples
#Features
Min (%)
Satimage
6435
36
0.0973
w1a
49749
300
0.0291
Vowel
990
10
0.0909The “#Examples” and “#Features” denote the number of examples and features, respectively. “Min(%)” represents the proportion of examples in the minority class.On those imbalanced datasets, we compare our classifiers (DOPMID-AM, DOPMID-QM) against the following classifiers: SVM-Hinge [28], safe-level-SMOTE [7], CCPDT [11], SVM-F1 [22], and AM-Consist [25]. Among them, SVM-Hinge is a traditional balanced binary classifier which seeks to minimize the hinge loss, and the latter four algorithms are all for the imbalanced setting. We choose those four as comparisons because we are interested in how our algorithms perform, when compared with other imbalanced algorithms. In the following experiments, unless otherwise noted, the parameters C of our algorithms are all chosen in the set {2-10,…,210}, and the error parameters ε of algorithms are set to 0.001.


## 4.2. Experimental Results

The experimental results are reported in terms of AM [23], QM [24], and F1 [15], which are all commonly adopted as the performance metrics for evaluating imbalanced learning classifiers. More specifically, we compare our proposed classifiers from the following two aspects.


### 4.2.1. Comparison with SVM-Hinge

We design this comparison in order to see whether the algorithms we proposed above can really be better-behaved than the standard SVM on the imbalanced datasets. The experimental results on the three sets are illustrated in Figure1.Figure 1
The performance comparison between DOPMID and SVM-Hinge.
(a)
The results in terms of AM
(b)
The results in terms of QM
(c)
The results in terms of F1From Figure1, we can see that as expected, on all the three datasets, DOPMID-AM and DOPMID-QM are significantly better than SVM-Hinge in terms of all the measures. Due to space limitation, we only report the statistics measured by AM as an example. When compared with SVM-Hinge, DOPMID-AM increases 32.21% on satimage set, 14.42% on w1a set, and 6.87% on the vowel set, while, for the DOPMID-QM, the improvement corresponds to 33.80%, 14.42%, and 13.87%, respectively. All the results prove the effectiveness of our method and once again indicate that we can obtain a more accurate unbalanced classifier by directly optimizing the imbalanced evaluation metrics.Meanwhile, it can be seen from the figures that DOPMID-QM outperforms DOPMID-AM on most of the points. More specifically, on the experimental sets, DOPMID-QM is better than DOPMID-AM with 6 out of all the 9 points and is similar to DOPMID-AM with the other three points. These results, thus, suggest that DOPMID-QM can be more accurate than DOPMID-AM. This may be due to the fact that the loss function of DOPMID-QM is lower than the DOPMID-AM’s, which can create more precise classifier. This observation is also consistent with Chen’s conjure that it is possible to create more accurate model by defining tighter bound [29].


### 4.2.2. Comparison with Other Imbalanced Algorithms

In the second section, we are interested in how our algorithms perform, when compared with other imbalanced binary classifiers. More specifically, we compare our DOPMID with safe-level-SMOTE, CCPDT, and SVM-F1 and AM-Consist. We choose those four algorithms, because as discussed in Introduction, they represent two different methods for dealing with imbalanced problem. Safe-level-SMOTE uses oversampling technique and belongs to the data-oriented method. We adopt it instead of SMOTE, since it can produce better accuracy than SMOTE by using different weight degrees on the synthetic examples [7]. The latter three algorithms all belong to algorithm-oriented methods. CCPDT is an efficient decision tree algorithm, which improved C4.5 on imbalanced datasets by using Fisher’s exact test to prune branches of tree. SVM-F1 and AM-Consist are both SVM based approaches. SVM-F1 modified traditional SVM by optimizing F1 measure, while AM-Consist is a very recently proposed consistent classifier that aims at optimizing AM measure, which is the same as DOPMID-AM. We include it to make the effectiveness of our algorithms more convincing. It should be noted that, in the paper [25], the authors have proposed two consistent AM algorithms named as Plugin and Balanced, respectively. In our experiments, we select the Balanced as the AM-Consist, because a detailed analysis in their supplementary material shows that the Balanced performs better than the Plugin. Figure 2 depicts the behaviors of those algorithms on the satimage, w1a, and vowel datasets.Figure 2
The performance comparison between DOPMID and other imbalanced binary algorithms.
(a)
The results in terms of AM
(b)
The results in terms of QM
(c)
The results in terms of F1As can be seen from Figure2, the performance of algorithms in comparison varies from one dataset to another, and there is no one algorithm that can outperform other algorithms on all the datasets. For example, when measured by AM, safe-level-SMOTE performs best on vowel set, while it is the worst one on the other two sets. SVM-F1 performs well on satimage and w1a in terms of F1; however, it yields poor performances on w1a and vowel in terms of QM. Similarly, CCPDT achieves a better performance than AM-Consist on satimage dataset, but it is worse than AM-Consist on w1a set. Different from those comparison algorithms, DOPMID-QM we proposed appears to perform more stably across all the datasets. Statistics show that when compared with other imbalanced classifiers, DOPMID-QM performs best on 4 of 9 points and is the second best on 4 of 9 points. It is the third best one on the w1a when measured by F1. All those demonstrate that even compared with others imbalanced binary classifiers, our DOPMID-QM approach is still effective and is suitable for the imbalanced settings.Finally, we compare our DOPMID-AM with AM-Consist, because they both improve traditional SVM by optimizing AM measure. The results from Figure2 are somewhat surprising where DOPMID-AM wins 5 of 9 points and fails in 4 points. More specifically, when compared with DOPMID-AM, AM-Consist performs better on w1a set and yields poorer performances on the other two sets. One possible explanation is that AM-Consist is a consistent algorithm and may be more suitable for the set with large number of examples (such as w1a dataset).


## 4.2.1. Comparison with SVM-Hinge

We design this comparison in order to see whether the algorithms we proposed above can really be better-behaved than the standard SVM on the imbalanced datasets. The experimental results on the three sets are illustrated in Figure1.Figure 1
The performance comparison between DOPMID and SVM-Hinge.
(a)
The results in terms of AM
(b)
The results in terms of QM
(c)
The results in terms of F1From Figure1, we can see that as expected, on all the three datasets, DOPMID-AM and DOPMID-QM are significantly better than SVM-Hinge in terms of all the measures. Due to space limitation, we only report the statistics measured by AM as an example. When compared with SVM-Hinge, DOPMID-AM increases 32.21% on satimage set, 14.42% on w1a set, and 6.87% on the vowel set, while, for the DOPMID-QM, the improvement corresponds to 33.80%, 14.42%, and 13.87%, respectively. All the results prove the effectiveness of our method and once again indicate that we can obtain a more accurate unbalanced classifier by directly optimizing the imbalanced evaluation metrics.Meanwhile, it can be seen from the figures that DOPMID-QM outperforms DOPMID-AM on most of the points. More specifically, on the experimental sets, DOPMID-QM is better than DOPMID-AM with 6 out of all the 9 points and is similar to DOPMID-AM with the other three points. These results, thus, suggest that DOPMID-QM can be more accurate than DOPMID-AM. This may be due to the fact that the loss function of DOPMID-QM is lower than the DOPMID-AM’s, which can create more precise classifier. This observation is also consistent with Chen’s conjure that it is possible to create more accurate model by defining tighter bound [29].


## 4.2.2. Comparison with Other Imbalanced Algorithms

In the second section, we are interested in how our algorithms perform, when compared with other imbalanced binary classifiers. More specifically, we compare our DOPMID with safe-level-SMOTE, CCPDT, and SVM-F1 and AM-Consist. We choose those four algorithms, because as discussed in Introduction, they represent two different methods for dealing with imbalanced problem. Safe-level-SMOTE uses oversampling technique and belongs to the data-oriented method. We adopt it instead of SMOTE, since it can produce better accuracy than SMOTE by using different weight degrees on the synthetic examples [7]. The latter three algorithms all belong to algorithm-oriented methods. CCPDT is an efficient decision tree algorithm, which improved C4.5 on imbalanced datasets by using Fisher’s exact test to prune branches of tree. SVM-F1 and AM-Consist are both SVM based approaches. SVM-F1 modified traditional SVM by optimizing F1 measure, while AM-Consist is a very recently proposed consistent classifier that aims at optimizing AM measure, which is the same as DOPMID-AM. We include it to make the effectiveness of our algorithms more convincing. It should be noted that, in the paper [25], the authors have proposed two consistent AM algorithms named as Plugin and Balanced, respectively. In our experiments, we select the Balanced as the AM-Consist, because a detailed analysis in their supplementary material shows that the Balanced performs better than the Plugin. Figure 2 depicts the behaviors of those algorithms on the satimage, w1a, and vowel datasets.Figure 2
The performance comparison between DOPMID and other imbalanced binary algorithms.
(a)
The results in terms of AM
(b)
The results in terms of QM
(c)
The results in terms of F1As can be seen from Figure2, the performance of algorithms in comparison varies from one dataset to another, and there is no one algorithm that can outperform other algorithms on all the datasets. For example, when measured by AM, safe-level-SMOTE performs best on vowel set, while it is the worst one on the other two sets. SVM-F1 performs well on satimage and w1a in terms of F1; however, it yields poor performances on w1a and vowel in terms of QM. Similarly, CCPDT achieves a better performance than AM-Consist on satimage dataset, but it is worse than AM-Consist on w1a set. Different from those comparison algorithms, DOPMID-QM we proposed appears to perform more stably across all the datasets. Statistics show that when compared with other imbalanced classifiers, DOPMID-QM performs best on 4 of 9 points and is the second best on 4 of 9 points. It is the third best one on the w1a when measured by F1. All those demonstrate that even compared with others imbalanced binary classifiers, our DOPMID-QM approach is still effective and is suitable for the imbalanced settings.Finally, we compare our DOPMID-AM with AM-Consist, because they both improve traditional SVM by optimizing AM measure. The results from Figure2 are somewhat surprising where DOPMID-AM wins 5 of 9 points and fails in 4 points. More specifically, when compared with DOPMID-AM, AM-Consist performs better on w1a set and yields poorer performances on the other two sets. One possible explanation is that AM-Consist is a consistent algorithm and may be more suitable for the set with large number of examples (such as w1a dataset).


## 5. Conclusion

AM and QM are popular used performance measures in the imbalanced setting. In this paper, we have proposed a structural SVM based method, termed DOPMID for optimizing them. Specifically, we designed the objective functions oriented to AM and QM, respectively, and showed that the QM function is a tighter bound of the AM one. For the problem that the objective functions have exponential number of constraints, we introduce the cutting plane algorithm for outer optimization, which only needsO(1/ε) time. Then, for the inner computational challenge of the AM loss, we presented to decompose it nicely and applied the Hardy-Littlewood-Polya inequality to solve it, while, for the QM loss, we proposed an efficiently greedy algorithm, which still only required O(nlog⁡n) time. Our experiments on the imbalanced datasets showed that DOPMID is superior to the existing baseline techniques in terms of performance and stability. In future work, we hope to extend our approach to the multiclassification under class imbalance.



---

*Source: 269856-2015-09-16.xml*