SDPNAL$+$: A Majorized Semismooth Newton-CG Augmented Lagrangian Method for Semidefinite Programming with Nonnegative Constraints
Liuqin Yang, Defeng Sun, Kim-Chuan Toh
Introduction
Let be a pointed closed convex cone whose interior and be a polyhedral convex cone in a finite-dimensional Euclidean space such that is non-empty. For any cone , we denote the dual cone of by . For any closed convex set , we denote the metric projection of onto by and the tangent cone of at by , respectively. We will make extensive use of the Moreau decomposition theorem in , which states that for any and any closed convex cone . Let be the space of real symmetric matrices and be the cone of positive semidefinite matrices in . In this paper, we focus on the case where , . We are particularly interested in the case where , the cone of real symmetric matrices whose elements are all nonnegative, though the algorithm which we will design later is also applicable to other cases. For any matrix , we use to indicate that is a real symmetric positive definite matrix.
Consider the semidefinite programming (SDP) with an additional polyhedral cone constraint, which we name as SDP:
where and are given data, is a given linear map whose adjoint is denoted as . Note that is allowed in (1), in which case there is no additional polyhedral cone constraint imposed on . We assume that the matrix is invertible, i.e., is surjective. The dual of (P) is given by
The optimality conditions (KKT conditions) for (P) and (D) can be written as follows:
In order for the KKT conditions (5) to have solutions, throughout this paper we make the following blanket assumption.
(a) For problem (P), there exists a feasible solution such that
(b) For problem (D), there exists a feasible solution such that
It is known from convex analysis (e.g, [2, Corollary 5.3.6]) that under Assumption 1, the strong duality for (P) and (D) holds and the KKT conditions (5) have solutions.
For a given , define the augmented Lagrangian function for the dual problem (D) as follows:
where . We can consider the following inexact augmented Lagrangian method to solve (D). Specifically, given , , perform the following steps at the -th iteration:
where , . For a general discussion on the convergence of the augmented Lagrangian method for solving convex optimization problems and beyond, see .
Note that problem (P) can be reformulated as a standard SDP in the primal form by replacing the constraint with two constraints and . In , SDPNAL introduced by Zhao, Sun and Toh is applied to solve such a reformulated problem. It works quite well for nondegenerate SDPs, especially those without the constraint . However, many of the tested SDPs (with the constraint ) in are degenerate and SDPNAL is unable to solve those problems efficiently. Motivated by our desire to overcome the aforementioned difficulty in solving degenerate SDPs and to improve the performance of SDPNAL, we present here a majorized semismooth Newton-CG augmented Lagrangian method by directly working on (P) instead of its reformulated problem. We call this new method SDPNAL since it is a much enhanced version of SDPNAL and it is designed for SDP problems (P).
The remaining parts of this paper are organized as follows. In Section 2, we introduce a majorized semismooth Newton-CG method for solving the inner minimization problems of the augmented Lagrangian method and analyze the convergence for solving these inner problems. Section 3 presents the SDPNAL dual approach. Section 4 is on numerical issues. There we report numerical results for a variety of SDP and SDP problems. We make an extensive numerical comparison with two other competitive first order methods based codes: (1) an alternating direction method of multiplier (ADMM) based solver called SDPAD by Wen et al. and (2) a two-easy-block-decomposition hybrid proximal extragradient method called 2EBD-HPE by Monteiro et al. . Numerical results show that SDPNAL is both fast and robust in achieving accurate solutions.
For the first time, we are able to solve all the difficult SDP problems arising from the relaxations of quadratic assignment problems (QAPs) tested in SDPNAL to an accuracy of efficiently, while SDPAD and 2EBD-HPE successfully solve 30 and 16 problems, respectively. In addition, SDPNAL appears to be the only viable method currently available to solve large scale SDPs arising from rank-1 tensor approximation problems constructed by Nie and Wang . The largest rank-1 tensor approximation problem solved is nonsym(21,4), in which its resulting SDP problem has matrix dimension and the number of equality constraints . Finally, in order to demonstrate the power of the proposed majorized semismooth Newton-CG procedure, we list the numerical results by only running the convergent ADMM with -block constraints (ADMM+ in short) introduced by Sun et al. . As one may observe, although ADMM+ outperforms both SDPAD and 2EBD-HPE, it can still encounter numerical difficulty in solving some hard problems such as those arising from QAPs to high accuracy. The superior numerical performance of SDPNAL over solvers based purely on first order methods such as SDPAD and 2EBD-HPE clearly shows the necessity of exploiting second order methods such as the semismooth Newton-CG method in order to solve hard SDP and SDP problems to high accuracy efficiently. While there has been a recent focus on using first order methods such as those based on ADMM or accelerated proximal gradient methods to solve structured convex optimization problems arising from machine learning and statistics, the extensive numerical results we obtained here for matrix conic programming problems serve to demonstrate that second order methods with good local convergence property are essential, if used wisely, for mitigating the inherent slow local convergence of first order methods, especially on difficult problems.
A Majorized Semismooth Newton-CG Method for Inner Problems
Let and be fixed. In this section we will present a majorized semismooth Newton-CG method for solving the following inner problems involved in the augmented Lagrangian method (9a):
Note that problem (10) is the dual of the following problem:
Since the objective function in (11) is strongly concave, (11) has a unique optimal solution. In order for its dual problem (10) to have a bounded solution set, we need the following generalized Slater condition.
There exists a positive definite matrix such that
where denotes the relative interior of .
Note that in (12), is actually a linear subspace of as is assumed to be in the relative interior part of the polyhedral cone . When , Assumption 2 is equivalent to saying that
From [16, Theorems and ], we have the following useful lemma.
Suppose that Assumption 2 holds. Then for any , the level set is a closed and bounded convex set.
In order to introduce our majorized semismooth Newton-CG method for solving (16), we need to majorize the second part of the objective function in (16) by a convex, but not necessarily strongly convex, quadratic function. Specifically, for given and , since
where , we know that for ,
where . Thus is a majorization function of at because and . In order to find an optimal solution for problem (16), for , we solve the following problem
Note that we can only solve problem (19a) inexactly by an iterative method. Here we will introduce a semismooth Newton-CG (SNCG) method for solving (19a). Specifically, for fixed , we need to consider the following problem of the form
The objective function in (20) is continuously differentiable and solving (20) is equivalent to solving the following nonsmooth equation:
Since is strongly semismooth , we can design a SNCG method as in to solve (21), and expect fast superlinear or even quadratic convergence.
where denotes the Hadamard product of two matrices and
where is the Clarke subdifferential of at . Note that from , we know that
Now we will introduce the SNCG algorithm for solving (20). Choose . Then the algorithm can be stated as follows.
Algorithm SNCG: A Semismooth Newton-CG Algorithm (SNCG). Given , , , , and . Perform the th iteration as follows. Step 1. Given a maximum number of CG iterations , compute Apply the conjugate gradient (CG) algorithm , to find an approximation solution to (30) where is defined as in (27) and . Step 2. Set , where is the first nonnegative integer for which (31) Step 3. Set .
The convergence results for the above SNCG algorithm are stated in Theorems 2.2 and 2.3 below. We shall omit the proofs as they can be proved in the same fashion as in [25, Theorems 3.4 and 3.5].
Suppose that Assumption 2 holds. Then Algorithm SNCG generates a bounded sequence and any accumulation point of is an optimal solution to problem (20).
Suppose that Assumption 2 holds. Let be an accumulation point of the infinite sequence generated by Algorithm SNCG for solving the problem (20). Suppose that at each step , when the CG algorithm terminates, the tolerance is achieved (e.g., when ), i.e.,
Assume that the constraint nondegenerate condition
holds at , where denotes the lineality space of . Then the whole sequence converges to and
Given and , we will use the following stopping criteria for terminating Algorithm SNCG:
,
.
We can now state our majorized semismooth Newton-CG method for solving (16) as follows:
Algorithm MSNCG: A Majorized Semismooth Newton-CG Algorithm (MSNCG). Given , . Perform the th iteration as follows. Step 1. Starting with as the initial point, apply Algorithm SNCG to minimize to find satisfying (A1) and (A2). Step 2. Compute and .
Next, we establish the convergence of Algorithm MSNCG. For notational convenience, for any and , let . Define the linear map by
Let and . Then problem (16) is equivalent to
and the function in (17) can be rewritten as
Furthermore, is an optimal solution of
if and only if is an optimal solution of problem (19a) and In addition, conditions (A1) and (A2) are equivalent to the following two conditions, respectively,
Suppose that Assumption 2 holds. Then for Algorithm MSNCG, (A1) and (A2) are achievable.
If , then one can take to satisfy (A1) and (A2).
Next, we assume that . Then is not an optimal solution of problem (37). Let be an arbitrary optimal solution of problem (37). Then . So i.e.,
we obtain that This implies
Then by using (40), (41), (42) and the fact that , we know that for given and , there exists such that
Suppose that Assumption 2 holds. Let Algorithm MSNCG be executed with stopping criteria (A1) and (A2). Then it generates a bounded sequence and any accumulation point of is an optimal solution to problem (16) and hence is an optimal solution to problem (10), where . Furthermore, as .
By (38), we have . Hence, the sequence is nonincreasing.
By Lemma 2.1, we know that the level set is a closed and bounded convex set. Then the sequence is bounded and so is the sequence . Let be an accumulation point of . Then and as . Furthermore, as .
Since as , we obtain from (44) that
For any , denote . Then we have
By direct computations, we have for ,
Thus, by (45) and the fact that as , we derive that as . Since is an accumulation point of , we obtain that . By the convexity of , is an optimal solution of problem (36).
Finally, by using (45) and (46), we know that as . ∎
A Majorized Semismooth Newton-CG Augmented Lagrangian Method
For any and , denote
Since the inner problems in (10) are solved inexactly, we will use the following standard stopping criteria considered in to terminate Algorithm MSNCG:
, , .
, , .
, .
Just like SDPNAL, each iteration of the MSNCG algorithm can be quite expensive. Thus it is crucial for us to find a reasonably good initial point to warm start Algorithm SDPNAL. We can certainly do so by solving the inner problem (10) by using any gradient descent type method. However, for this purpose we find that ADMM+ introduced by Sun, Toh and Yang is usually more efficient than other choices. Now we can present our SDPNAL algorithm as follows.
Algorithm SDPNAL: A Majorized Semismooth Newton-CG Augmented Lagrangian Algorithm (SDPNAL) Stage 1. Use ADMM+ to generate an initial point Stage 2. For perform the th iteration as follows: (a) Using as the initial point, apply Algorithm MSNCG to minimize to find MSNCG and satisfying (B1), (B2) or (B3). (b) Update for some or .
As mentioned in the introduction, if (P) is reformulated as a standard SDP and Algorithm SDPNAL is applied to this reformulated form, then SDPNAL reduces to SDPNAL proposed in .
We can obtain similar theorems on the convergence of SDPNAL as SDPNAL ([25, Theorems 4.1 and 4.2]). The global convergence of Algorithm SDPNAL follows from Rockafellar [18, Theorem ] and [17, Theorem ] without much difficulty.
Suppose that Assumption 2 holds. Let Algorithm SDPNAL be executed with stopping criterion (B1). If there exists such that
then the sequence generated by Algorithm SDPNAL is bounded and converges to , where is some optimal solution to (P), and is asymptotically minimizing for (D) with .
If is bounded, then the sequence is also bounded, and all of its accumulation points of the sequence are optimal solutions to (D).
Next we state the local linear convergence of Algorithm SDPNAL.
Suppose that Assumption 2 holds. Let Algorithm SDPNAL be executed with stopping criteria (B1) and (B2). Assume that (D) satisfies condition (49). If the second order sufficient conditions (in the sense of the conditions in [1, Theorem ]) holds at , where is an optimal solution to (P), then the generated sequence is bounded and converges to the unique optimal solution with , and
for some with the property that if for any sufficiently large . The conclusions of Theorem 3.1 about are also valid.
The conclusions of Theorem 3.2 follow from the results in [18, Theorem 2] and [17, Theorem 5 and Proposition 3] combined with [1, Theorem ]. ∎
Numerical Experiments
+ and SDP Problem Sets In our numerical experiments, we test the following SDP and SDP problem sets.
(i) SDP problems coming from the relaxation of a binary integer nonconvex quadratic (BIQ) programming:
This problem has been shown in that under some mild assumptions, it can equivalently be reformulated as the following completely positive programming (CPP) problem:
where denotes the -dimensional completely positive cone. It is well known that even though is convex, it is computationally intractable. To solve the CPP problem, one would typically relax to , and the relaxed problem has the form (P):
where the polyhedral cone . In our numerical experiments, the test data for and are taken from Biq Mac Library maintained by Wiegele, which is available at http://biqmac.uni-klu.ac.at/biqmaclib.html.
(ii) SDP and SDP problems arising from the relaxation of maximum stable set problems. Given a graph with edge set , the SDP and SDP relaxation and of the maximum stable set problem are given by
where and denotes the th column of the identity matrix, . In our numerical experiments, we test the graph instances considered in , , and .
(iii) SDP relaxation for computing lower bounds for quadratic assignment problems (QAPs). Let be the set of permutation matrices. Given matrices , the QAP is given by
For a matrix , we will identify it with the -vector . For a matrix , we let be the block corresponding to in the matrix . It is shown in that is bounded below by the following number generated from the SDP relaxation of (59):
where is the matrix of ones, and if , and otherwise, . In our numerical experiments, the test instances are taken from the QAP Library .
(iv) SDP relaxations of clustering problems (RCPs) described in [14, eq. (13), up to a constant]:
where is the so-called affinity matrix whose entries represent the similarities of the objects in the dataset, is the vector of ones, and is the number of clusters, . All the data sets we tested are from the UCI Machine Learning Repository (available at http://archive.ics.uci.edu/ml/datasets.html). For some large data instances, we only select the first rows. For example, the original data instance “spambase” has 4601 rows, we select the first 1500 rows to obtain the test problem “spambase-large.2” for which the number “2” means that there are clusters.
(v) SDP+ problems arising from the SDP relaxation of frequency assignment problems (FAPs) . The explicit description of the SDP in the form () is given in [4, eq. (5)]:
where is an integer, is the Laplacian matrix, with being the th standard unit vector and is the vector of all ones. Let
where .
We should mention that we can easily extend our algorithm to handle the following more general SDP problem:
where is a given matrix. Thus (73) can also be solved by our proposed algorithm.
(vi) SDP relaxations for rank-1 tensor approximations (R1TA) :
It is shown in that (76) can be transformed into a standard SDP (up to a constant):
where is a constant matrix and is a linear map, which depend on .
2 Numerical Results
In this subsection, we compare the performance of our SDPNAL algorithm with two other competitive publicly available first order methods based codes for solving large-scale SDP and SDP problems: an ADMM based solver, called SDPADhttp://www.bicmr.org/~wenzw/code/SDPAD-release-beta2.zip (release-beta2, released in December 2012) developed in and a two-easy-block-decomposition hybrid proximal extragradient method, which was called 2EBD-HPEwww2.isye.gatech.edu/~cod3/CamiloOrtiz/Software_files/2EBD-HPE_v0.2/2EBD-HPE_v0.2.zip (v0.2, released on May 31, 2013) and we call it 2EBD here, introduced in . Since we use the convergent ADMM with -block constraints introduced by Sun et al. (which was called ADMM3c but we call it ADMM here to indicate that it is an enhanced version of ADMM with convergence guantantee) to warm start SDPNAL, we also list the numerical results obtained by running ADMM alone for the purpose of demonstrating the power and the importance of the proposed majorized semismooth Newton-CG algorithm for solving difficult SDP and SDP problems.
All our computational results for the tested SDP and SDP problems are obtained by running Matlab on a Linux server having 6 cores with 12 Intel Xeon X5650 processors at 2.67GHz and 32G RAM.
Note that numerically it is difficult to compute in the criterion (B3) for terminating Algorithm MSNCG directly, where . Fortunately, by using the fact that for any closed convex cone and , it holds that , we have from that
where . In order to avoid computing , we majorize the second part of (78) by a simpler term. Specifically, by using the fact that for any and , , we have
where is the at the penultimate iteration when we compute MSNCG . Note that . Thus for a given , we can replace (B3) by the following criterion for terminating Algorithm MSNCG:
\max\Big{\{}\|{\cal A}(X^{k}+\sigma_{k}R_{D}^{k+1})-b\|,\zeta\sigma_{k}\|Z^{k+1}-\widetilde{Z}^{k}\|\Big{\}}\leq(\delta^{{}^{\prime}}_{k}/\sigma_{k})\|X^{k+1}-X^{k}\|, .
In our numerical experiments, we measure the accuracy of an approximate optimal solution for (P) and (D) by using the following relative residual:
where , , , , , , , . Additionally, we compute the relative gap by
Let be a given accuracy tolerance. We terminate both SDPNAL and ADMM when
Note that SDPAD can be used to solve SDP problems of form (P) with directly and we stop SDPAD when where is defined as in (79). However, it is shown recently that the direct extension of ADMM to the multi-block case is not necessarily convergent . Hence SDPAD, which is essentially an implementation of the direct extension of ADMM with the step length set at for solving the dual of SDP problems, does not have convergence guarantee in theory.
The implementation of 2EBD including its termination, along with ADMM and SDPAD, is done in the same way as in . For 2EBD, we reformulate QAP, RCP and R1TA problems as SDP problems in the standard form as these problems do not appear to have obvious two-easy blocks structures.
In our numerical experiments, we also use a restart strategy for SDPNAL if it is not able to achieve the required accuracy for the tested SDP problems. For some problems, even though and can reach the required accuracy tolerance, or may stay above the required tolerance or stagnate. This may happen, as in the case for SDPNAL, because many of these SDP problems are degenerate at the optimal solutions. One way to overcome this difficulty is to apply ADMM to (P) using the most recently computed to restart SDPNAL when its progress is not satisfactory. From this point of view, our proposed algorithm is quite flexible.
Table 4.2 shows the number of problems that have been successfully solved to the accuracy of in by each of the four solvers SDPNAL, ADMM, SDPAD and 2EBD, with the maximum number of iterations set at or the maximum computation time set at hours. As can be seen, only SDPNAL can solve all the problems to the accuracy of . In particular, for the first time, we are able to solve all the difficult SDP problems arising from QAP problems to an accuracy of efficiently, while ADMM, SDPAD and 2EBD can successfully solve 39, 30 and 16 problems, respectively.
The authors would like to thank Jiawang Nie and Li Wang for sharing their codes on semidefinite relaxations of rank-1 tensor approximation problems.