# A Safe Screening Rule for Sparse Logistic Regression

The l1-regularized logistic regression (or sparse logistic regression) is a widely used method for simultaneous classification and feature selection. Although many recent efforts have been devoted to its efficient implementation, its application to high dimensional data still poses significant challenges. In this paper, we present a fast and effective sparse logistic regression screening rule (Slores) to identify the 0 components in the solution vector, which may lead to a substantial reduction in the number of features to be entered to the optimization. An appealing feature of Slores is that the data set needs to be scanned only once to run the screening and its computational cost is negligible compared to that of solving the sparse logistic regression problem. Moreover, Slores is independent of solvers for sparse logistic regression, thus Slores can be integrated with any existing solver to improve the efficiency. We have evaluated Slores using high-dimensional data sets from different applications. Extensive experimental results demonstrate that Slores outperforms the existing state-of-the-art screening rules and the efficiency of solving sparse logistic regression is improved by one magnitude in general.

## Authors

• 39 publications
• 21 publications
• 61 publications
• 33 publications
• 60 publications
• ### Graph-Sparse Logistic Regression

We introduce Graph-Sparse Logistic Regression, a new algorithm for class...
12/15/2017 ∙ by Alexander LeNail, et al. ∙ 0

• ### An Efficient Pseudo-likelihood Method for Sparse Binary Pairwise Markov Network Estimation

The pseudo-likelihood method is one of the most popular algorithms for l...
02/27/2017 ∙ by Sinong Geng, et al. ∙ 0

• ### Efficient Mixed-Norm Regularization: Algorithms and Safe Screening Methods

Sparse learning has recently received increasing attention in many areas...
07/16/2013 ∙ by Jie Wang, et al. ∙ 0

• ### Extreme Sparse Multinomial Logistic Regression: A Fast and Robust Framework for Hyperspectral Image Classification

Although the sparse multinomial logistic regression (SMLR) has provided ...
09/08/2017 ∙ by Faxian Cao, et al. ∙ 0

• ### Identification of Cancer - Mesothelioma Disease Using Logistic Regression and Association Rule

Malignant Pleural Mesothelioma (MPM) or malignant mesothelioma (MM) is a...
12/11/2018 ∙ by Avishek Choudhury, et al. ∙ 0

• ### PIANO: A Fast Parallel Iterative Algorithm for Multinomial and Sparse Multinomial Logistic Regression

Multinomial Logistic Regression is a well-studied tool for classificatio...
02/21/2020 ∙ by R. Jyothi, et al. ∙ 0

• ### Bayesian Group Selection in Logistic Regression with Application to MRI Data Analysis

We consider Bayesian logistic regression models with group-structured co...
12/04/2019 ∙ by Kyoungjae Lee, et al. ∙ 0

## Code Repositories

### biglasso

biglasso: Extending Lasso Model Fitting to Big Data in R

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

Logistic regression (LR) is a popular and well established classification method that has been widely used in many domains such as machine learning

[5, 8], text mining [4, 9], image processing [10, 17], bioinformatics [1, 15, 22, 30, 31], medical and social sciences [2, 19] etc. When the number of feature variables is large compared to the number of training samples, logistic regression is prone to over-fitting. To reduce over-fitting, regularization has been shown to be a promising approach. Typical examples include and regularization. Although regularized LR is more challenging to solve compared to regularized LR, it has received much attention in the last few years and the interest in it is growing [23, 27, 31] due to the increasing prevalence of high-dimensional data. The most appealing property of regularized LR is the sparsity of the resulting models, which is equivalent to feature selection.

In the past few years, many algorithms have been proposed to efficiently solve the regularized LR [6, 14, 13, 20]. However, for large-scale problems, solving the regularized LR with higher accuracy remains challenging. One promising solution is by “screening”, that is, we first identify the “inactive” features, which have coefficients in the solution and then discard them from the optimization. This would result in a reduced feature matrix and substantial savings in computational cost and memory size. In [7], El Ghaoui et al. proposed novel screening rules, called “SAFE”, to accelerate the optimization for a class of regularized problems, including LASSO [25], regularized LR and

regularized support vector machines. Inspired by SAFE, Tibshirani

et al. [24] proposed “strong rules” for a large class of regularized problems, including LASSO, elastic net, regularized LR and more general convex problems. In [29, 28], Xiang et al. proposed “DOME” rules to further improve SAFE rules for LASSO based on the observation that SAFE rules can be understood as a special case of the general “sphere test”. Although both strong rules and the sphere tests are more effective in discarding features than SAFE for solving LASSO, it is worthwhile to mention that strong rules may mistakenly discard features that have non-zero coefficients in the solution and the sphere tests are not easy to be generalized to handle the regularized LR. To the best of our knowledge, the SAFE rule is the only screening test for the regularized LR that is “safe”, that is, it only discards features that are guaranteed to be absent from the resulting models.

In this paper, we develop novel screening rules, called “Slores”, for the

regularized LR. The proposed screening tests detect inactive features by estimating an upper bound of the inner product between each feature vector and the “dual optimal solution” of the

regularized LR, which is unknown. The more accurate the estimation is, the more inactive features can be detected. An accurate estimation of such an upper bound turns out to be quite challenging. Indeed most of the key ideas/insights behind existing “safe” screening rules for LASSO heavily rely on the least square loss, which are not applicable for the regularized LR case due to the presence of the logistic loss. To this end, we propose a novel framework to accurately estimate an upper bound. Our key technical contribution is to formulate the estimation of an upper bound of the inner product as a constrained convex optimization problem and show that it admits a closed form solution. Therefore, the estimation of the inner product can be computed efficiently. Our extensive experiments have shown that Slores discards far more features than SAFE yet requires much less computational efforts. In contrast with strong rules, Slores is “safe”, i.e., it never discards features which have non-zero coefficients in the solution. To illustrate the effectiveness of Slores, we compare Slores, strong rule and SAFE on a data set of prostate cancer along a sequence of parameters equally spaced on the scale from to , where is the parameter for the penalty and is the smallest tuning parameter [12] such that the solution of the regularized LR is [please refer to Eq. (1)]. The data matrix contains patients with features. To measure the performance of different screening rules, we compute the rejection ratio which is the ratio between the number of features discarded by screening rules and the number of features with 0 coefficients in the solution. Therefore, the larger the rejection ratio is, the more effective the screening rule is. The results are shown in Fig. 1. Clearly, Slores discards far more features than SAFE especially when is large while the strong rule is not applicable when . We present more experimental results and discussions to demonstrate the effectiveness of Slores in Section 6.

## 2 Basics and Motivations

In this section, we briefly review the basics of the regularized LR and then motivate the general screening rules via the KKT conditions. Suppose we are given a set of training samples and the associate labels , where and for all . The regularized logistic regression is:

 minβ,c1mm∑i=1log(1+exp(−⟨β,¯xi⟩−bic))+λ∥β∥1, (LRPλ)

where and are the model parameters to be estimated, , and is the tuning parameter. Let the data matrix be with the row being and the column being .

Let and for . The dual problem of (LRP) (please refer to the supplement) is given by

 minθ{g(θ)=1mm∑i=1f(θi):∥¯XTθ∥∞≤mλ,⟨θ,b⟩=0,θ∈C}. (LRDλ)

To simplify notations, we denote the feasible set of problem (LRD) as , and let and be the optimal solutions of problems (LRP) and (LRD) respectively. In [12], the authors have shown that for some special choice of the tuning parameter , both of (LRP) and (LRD) have closed form solutions. In fact, let , , and and be the cardinalities of and respectively. We define

 λmax=1m∥¯XTθ∗λmax∥∞, (1)

where

 [θ∗λmax]i={m−m,if i∈P,m+m,if i∈N,i=1,…,m. (2)

( denotes the component of a vector.) Then, it is known [12] that and whenever . When , it is known that (LRD) has a unique optimal solution. (For completeness, we include the proof in the supplement.) We can now write the KKT conditions of problems (LRP) and (LRD) as

 (3)

In view of Eq. (3), we can see that

 |⟨θ∗λ,¯xj⟩|

In other words, if , then the KKT conditions imply that the coefficient of in the solution is and thus the feature can be safely removed from the optimization of (LRP). However, for the general case in which , (R1) is not applicable since it assumes the knowledge of . Although it is unknown, we can still estimate a region which contains . As a result, if , we can also conclude that by (R1). In other words, (R1) can be relaxed as

 (R1′)

In this paper, (R1) serves as the foundation for constructing our screening rules, Slores. From (R1), it is easy to see that screening rules with smaller are more aggressive in discarding features. To give a tight estimation of , we need to restrict the region which includes as small as possible. In Section 3, we show that the estimation of the upper bound can be obtained via solving a convex optimization problem. We show in Section 4 that the convex optimization problem admits a closed form solution and derive Slores in Section 5 based on (R1).

## 3 Estimating the Upper Bound via Solving a Convex Optimization Problem

In this section, we present a novel framework to estimate an upper bound of . In the subsequent development, we assume a parameter and the corresponding dual optimal are given. In our Slores rule to be presented in Section 5, we set and to be and given in Eqs. (1) and (2). We formulate the estimation of as a constrained convex optimization problem in this section, which will be shown to admit a closed form solution in Section 4.

For the dual function , it follows that Since is a diagonal matrix, it follows that , where

is the identity matrix. Thus,

is strongly convex with modulus [18]. Rigorously, we have the following lemma.

###### Lemma 1.

Let and , then

 a).g(θ2)−g(θ1)≥⟨∇g(θ1),θ2−θ1⟩+2m∥θ2−θ1∥22. (4)

b). If , the inequality in (4) becomes a strict inequality, i.e., “” becomes “”.

Given , it is easy to see that both of and belong to . Therefore, Lemma 1 can be a useful tool to bound with the knowledge of . In fact, we have the following theorem.

###### Theorem 2.

Let , then the following holds:

 a).∥θ∗λ−θ∗λ0∥22≤m2[g(λλ0θ∗λ0)−g(θ∗λ0)+(1−λλ0)⟨∇g(θ∗λ0),θ∗λ0⟩] (5)

b). If , the inequality in (5) becomes a strict inequality, i.e., “” becomes “”.

###### Proof.

a). It is easy to see that , and . Therefore, both of and belong to the set . By Lemma 1, we have

 ∥θ∗λ−θ∗λ0∥22 ≤m2[g(θ∗λ)−g(θ∗λ0)+⟨∇g(θ∗λ0),θ∗λ0−θ∗λ⟩]. (6)

Let . It is easy to see that

 θλ∈C,∥¯XTθλ∥∞=λλ0∥¯XTθ∗λ0∥∞≤mλ,⟨θλ,b⟩=λλ0⟨θ∗λ0,b⟩=0.

Therefore, we can see that and thus

 g(θ∗λ)=minθ∈Fλg(θ)≤g(θλ)=g(λλ0θ∗λ0).

Then the inequality in (6) becomes

 ∥θ∗λ−θ∗λ0∥22≤m2[g(λλ0θ∗λ0)−g(θ∗λ0)+⟨∇g(θ∗λ0),θ∗λ0−θ∗λ⟩]. (7)

On the other hand, by noting that (LRD) is feasible, we can see that the Slater’s conditions holds and thus the KKT conditions [21] lead to:

 0∈∇g(θ∗λ)+p∑j=1η+j¯xj+p∑j′=1η−i(−¯xi)+γb+NC(θ∗λ), (8)

where , and is the normal cone of at [21]. Because and is an open set, is an interior point of and thus [21]. Therefore, Eq. (8) becomes:

 ∇g(θ∗λ)+p∑j=1η+j¯xj+p∑j′=1η−j′(−¯xj′)+γb=0. (9)

Let , and . We can see that . By the complementary slackness condition, if , we have . Therefore,

 ⟨∇g(θ∗λ0),θ∗λ0⟩+∑j∈I+λ0η+j⟨θ∗λ0,¯xj⟩+∑j′∈I−λ0η−j′⟨θ∗λ0,−¯xj′⟩+γ⟨θ∗λ0,b⟩=0 ⇔ −1mλ0⟨∇g(θ∗λ0),θ∗λ0⟩=∑j∈I+λ0η+j+∑j′∈I−λ0η−j′

Similarly, we have

 ⟨∇g(θ∗λ0),θ∗λ⟩+∑j∈I+λ0η+j⟨θ∗λ,¯xj⟩+∑j′∈I−λ0η−j′⟨θ∗λ,−¯xj′⟩+γ⟨θ∗λ,b⟩=0 ⇔ −⟨∇g(θ∗λ0),θ∗λ⟩=∑j∈I+λ0η+j⟨θ∗λ,¯xj⟩+∑j′∈I−λ0η−j′⟨θ∗λ,−¯xj′⟩ ≤∑j∈I+λ0η+j|⟨θ∗λ,¯xj⟩|+∑j′∈I−λ0η−j′|⟨θ∗λ,−¯xj′⟩| ≤mλ{∑j∈I+λ0η+j+∑j′∈I−λ0η−j′} =−λλ0⟨g(θ∗λ0),θ∗λ0⟩

Recall (7), the inequality in (5) follows.

b). The proof is the same as part a) by noting part b) of Lemma 1. ∎

Theorem 2 implies that is inside a ball centred at with radius

 r=√m2[g(λλ0θ∗λ0)−g(θ∗λ0)+(1−λλ0)⟨∇g(θ∗λ0),θ∗λ0⟩]. (10)

Recall that to make our screening rules more aggressive in discarding features, we need to get a tight upper bound of [please see (R1)]. Thus, it is desirable to further restrict the possible region of . Clearly, we can see that

 ⟨θ∗λ,b⟩=0 (11)

since is feasible for problem (LRD). On the other hand, we call the set defined in the proof of Theorem 2 the “active set” of . In fact, we have the following lemma for the active set.

###### Lemma 3.

Given the optimal solution of problem (LRD), the active set is not empty if .

Since , we can see that is not empty by Lemma 3. We pick and set

 ¯x∗=sign(⟨θ∗λ0,¯xj0⟩)¯xj0. (12)

It follows that . Due to the feasibility of for problem (LRD), satisfies

 ⟨θ∗λ,¯x∗⟩≤mλ. (13)

As a result, Theorem 2, Eq. (11) and (13) imply that is contained in the following set:

 Aλλ0:={θ:∥θ−θ∗λ0∥22≤r2,⟨θ,b⟩=0,⟨θ,¯x∗⟩≤mλ}.

Since , we can see that Therefore, (R1) implies that if

 T(θ∗λ,¯xj;θ∗λ0):=maxθ∈Aλλ0|⟨θ,¯xj⟩| (UBP)

is smaller than , we can conclude that and can be discarded from the optimization of (LRP). Notice that, we replace the notations and with and to emphasize their dependence on . Clearly, as long as we can solve for , (R1) would be an applicable screening rule to discard features which have coefficients in . We give a closed form solution of problem (42) in the next section.

## 4 Solving the Convex Optimization Problem (UBP)

In this section, we show how to solve the convex optimization problem (42) based on the standard Lagrangian multiplier method. We first transform problem (42) into a pair of convex minimization problem (UBP) via Eq. (15) and then show that the strong duality holds for (UBP) in Lemma 6. The strong duality guarantees the applicability of the Lagrangian multiplier method. We then give the closed form solution of (UBP) in Theorem 8. After we solve problem (UBP), it is straightforward to compute the solution of problem (42) via Eq. (15).

Before we solve (42) for the general case, it is worthwhile to mention a special case in which . Clearly, is the projection operator which projects a vector onto the orthogonal complement of the space spanned by . In fact, we have the following theorem.

###### Theorem 4.

Let , and assume is known. For , if , then .

Because of (R1), we immediately have the following corollary.

###### Corollary 5.

Let and . If , then .

For the general case in which , let

 T+(θ∗λ,¯xj;θ∗λ0):=maxθ∈Aλλ0⟨θ,+¯xj⟩,T−(θ∗λ,¯xj;θ∗λ0):=maxθ∈Aλλ0⟨θ,−¯xj⟩. (14)

Clearly, we have

 T(θ∗λ,¯xj;θ∗λ0)=max{T+(θ∗λ,¯xj;θ∗λ0),T−(θ∗λ,¯xj;θ∗λ0)}. (15)

Therefore, we can solve problem (42) by solving the two sub-problems in (14).

Let . Then problems in (14) can be written uniformly as

 Tξ(θ∗λ,¯xj;θ∗λ0)=maxθ∈Aλλ0⟨θ,ξ¯xj⟩. (UBPs)

To make use of the standard Lagrangian multiplier method, we transform problem (UBP) to the following minimization problem:

 −Tξ(θ∗λ,¯xj;θ∗λ0) =minθ∈Aλλ0⟨θ,−ξ¯xj⟩ (UBP′)

by noting that .

###### Lemma 6.

Let and assume is known. The strong duality holds for problem (UBP). Moreover, problem (UBP) admits an optimal solution in .

Because the strong duality holds for problem (UBP) by Lemma 6, the Lagrangian multiplier method is applicable for (UBP). In general, we need to first solve the dual problem and then recover the optimal solution of the primal problem via KKT conditions. Recall that and are defined by Eq. (10) and (12) respectively. Lemma 7 derives the dual problems of (UBP) for different cases.

###### Lemma 7.

Let and assume is known. For and , let . Denote

 U1={(u1,u2):u1>0,u2≥0}% and U2={(u1,u2):u1=0,u2=−⟨P¯x,P¯x∗⟩∥P¯x∗∥22}.

a). If , the dual problem of (UBP) is equivalent to:

 max(u1,u2)∈U1¯g(u1,u2)=−12u1∥P¯x+u2P¯x∗∥22+u2m(λ0−λ)+⟨θ∗λ0,¯x⟩−12u1r2. (UBD′)

Moreover, attains its maximum in .

b). If , the dual problem of (UBP) is equivalent to:

 max(u1,u2)∈U1∪U2¯¯g(u1,u2)={¯g(u1,u2),if (u1,u2)∈U1,−∥P¯x∥2∥P¯x∗∥2mλ,if (u1,u2)∈U2. (UBD′′)

We can now solve problem (UBP) in the following theorem.

###### Theorem 8.

Let , and assume is known. For and , let .

1. If then

 Tξ(θ∗λ,¯xj;θ∗λ0)=r∥P¯x∥2−⟨θ∗λ0,¯x⟩; (16)
2. If then

 Tξ(θ∗λ,¯xj;θ∗λ0)=r∥P¯x+u∗2P¯x∗∥2−u∗2m(λ0−λ)−⟨θ∗λ0,¯x⟩, (17)

where

 u∗2 =−a1+√Δ2a2, (18) a2 =∥P¯x∗∥42(1−d2), a1 =2⟨P¯x,P¯x∗⟩∥P¯x∗∥22(1−d2), a0 =⟨P¯x,P¯x∗⟩2−d2∥P¯x∥22∥P¯x∗∥22, Δ =a21−4a2a0=4d2(1−d2)∥P¯x∗∥42(∥P¯x∥22∥P¯x∗∥22−⟨P¯x,P¯x∗⟩2).

Notice that, although the dual problems of (UBP) in Lemma 7 are different, the resulting upper bound can be given by Theorem 8 in a uniform way. The tricky part is how to deal with the extremal cases in which . To avoid the lengthy discussion of Theorem 8, we omit the proof in the main text and include the details in the supplement.

## 5 The proposed Slores Rule for ℓ1 Regularized Logistic Regression

Using (R1), we are now ready to construct the screening rules for the Regularized Logistic Regression. By Corollary 5, we can see that the orthogonality between the feature and the response vector implies the absence of from the resulting model. For the general case in which , (R1) implies that if then the feature can be discarded from the optimization of (LRP). Notice that, letting , and have been solved by Theorem 8. Rigorously, we have the following theorem.

###### Theorem 9 (Slores).

Let and assume is known.

1. If , then ;

2. If and either of the following holds:

1. ,

2. ,

then .

Based on Theorem 9, we construct the Slores rule as summarized below in Algorithm 1.