Status: Inaccurate/Solved And linsysolve: Schur complement matrix not positive definite

Hi! There is a problem in my simulation when using cvx. My purpose is to estimate the matrix S and the sign of BS is equal to Z. But the S calculated by cvx results in BS ==H, i.e, B*S-H == 0. It is not subject to my aim. And I has also tried to change the solvers to sedumi or mosek. However, It doesn’t work.
The following is the problem model:
Problem Model
And the matlab code is showd as
indent preformatted text by 4 spaces

    % Lasso quesiton in MMV model
function [X,idx] = Cvx_CS_Th_M(Z,B,K,H)
[~,N] = size(B);
L = size(Z,2);
cvx_begin 
    variable S(N,L) complex
    minimize sum(norms(S,2,2))
    subject to
        real(B*S-H).*real(Z)>=0;
        imag(B*S-H).*imag(Z)>=0;
cvx_end
row_norm = sum(abs(X).^2,2);
[~,idx_vec]=sort(row_norm,'descend');
idx = idx_vec(1:K);
end

Calling SDPT3 4.0: 3456 variables, 432 equality constraints

num. of constraints = 432
dim. of socp var = 3024, num. of socp blk = 432
dim. of linear var = 432


SDPT3: Infeasible path-following algorithms


version predcorr gam expon scale_data
NT 1 0.000 1 0
it pstep dstep pinfeas dinfeas gap prim-obj dual-obj cputime

0|0.000|0.000|4.5e+01|2.8e+01|3.0e+05| 1.142965e+03 0.000000e+00| 0:0:00| chol 2 2
1|1.000|0.508|9.6e-05|1.4e+01|1.6e+05| 3.148374e+03 -3.893701e+00| 0:0:00| chol 1 1
2|1.000|0.977|3.7e-05|4.0e-01|7.1e+03| 2.673668e+03 -5.250377e-01| 0:0:00| chol 1 1
3|0.712|0.874|1.5e-05|7.5e-02|1.7e+03| 1.085809e+03 -6.048111e-01| 0:0:01| chol 1 1
4|0.821|0.787|3.9e-06|2.2e-02|5.2e+02| 4.132097e+02 -8.975130e-01| 0:0:01| chol 1 1
5|0.937|1.000|2.8e-07|8.1e-04|6.8e+01| 6.581068e+01 -8.666917e-01| 0:0:01| chol 1 1
6|0.596|0.531|1.1e-07|4.2e-04|3.2e+01| 3.207541e+01 -6.265875e-02| 0:0:01| chol 1 1
7|0.399|0.570|6.9e-08|1.9e-04|2.2e+01| 2.297170e+01 1.525467e+00| 0:0:01| chol 1 1
8|0.642|0.322|2.5e-08|1.3e-04|1.0e+01| 1.243864e+01 2.164350e+00| 0:0:01| chol 1 1
9|0.288|0.454|1.8e-08|6.9e-05|7.7e+00| 1.025852e+01 2.550344e+00| 0:0:02| chol 1 1
10|0.456|0.445|9.6e-09|3.8e-05|4.7e+00| 7.407481e+00 2.716724e+00| 0:0:02| chol 1 1
11|0.687|0.479|3.0e-09|2.0e-05|2.1e+00| 5.043203e+00 2.905026e+00| 0:0:02| chol 1 1
12|0.605|0.649|1.2e-09|7.0e-06|1.0e+00| 3.957578e+00 2.945240e+00| 0:0:02| chol 1 1
13|0.891|0.920|1.3e-10|5.6e-07|1.7e-01| 3.161937e+00 2.995562e+00| 0:0:02| chol 1 1
14|0.946|0.977|6.9e-12|1.3e-08|9.0e-03| 3.008811e+00 2.999851e+00| 0:0:02| chol 1 1
15|0.976|0.989|1.8e-13|1.4e-10|2.2e-04| 3.000213e+00 2.999996e+00| 0:0:03| chol 2 2
16|0.923|1.000|1.2e-11|1.0e-12|2.4e-05| 3.000023e+00 3.000000e+00| 0:0:03| chol 3 4
17|0.898|0.996|1.6e-10|1.5e-12|3.3e-06| 3.000003e+00 3.000000e+00| 0:0:03| chol 14 27
18|0.525|0.980|4.7e-10|2.3e-12|1.8e-06| 3.000002e+00 3.000000e+00| 0:0:03| chol
linsysolve: Schur complement matrix not positive definite
switch to LU factor. lu 30 30
19|0.475|0.997|1.1e-08|3.4e-12|1.1e-06| 3.000001e+00 3.000000e+00| 0:0:03| lu 11 30
20|0.379|1.000|7.2e-08|5.1e-12|7.0e-07| 3.000001e+00 3.000000e+00| 0:0:04| lu 11 30
21|0.287|0.837|8.3e-08|8.4e-12|5.1e-07| 3.000000e+00 3.000000e+00| 0:0:04| lu 11 ^13
22|0.291|0.645|8.5e-08|1.4e-11|3.8e-07| 3.000000e+00 3.000000e+00| 0:0:04| lu 11 30
23|0.120|0.107|1.1e-07|3.0e-11|3.3e-07| 3.000000e+00 3.000000e+00| 0:0:04| lu 11 ^23
24|0.073|0.094|9.6e-08|5.3e-11|3.1e-07| 3.000000e+00 3.000000e+00| 0:0:04|
stop: progress is too slow
lack of progress in infeas

number of iterations = 24
primal objective value = 3.00000035e+00
dual objective value = 3.00000000e+00
gap := trace(XZ) = 5.10e-07
relative gap = 7.29e-08
actual relative gap = 4.98e-08
rel. primal infeas (scaled problem) = 8.26e-08
rel. dual " " " = 8.42e-12
rel. primal infeas (unscaled problem) = 0.00e+00
rel. dual " " " = 0.00e+00
norm(X), norm(y), norm(Z) = 2.4e+00, 1.6e+00, 2.5e+01
norm(A), norm(b), norm© = 4.3e+02, 1.4e+01, 2.2e+01
Total CPU time (secs) = 4.38
CPU time per iteration = 0.18
termination code = -5
DIMACS: 4.0e-07 0.0e+00 9.2e-11 0.0e+00 5.0e-08 7.3e-08


Status: Inaccurate/Solved
Optimal value (cvx_optval): +3

Sorry I can’t understand your question. Show your mosek output if convenient, so that the experts might read something useful from it. And maybe your data for reproducing.

Your formulation is incorrect for your aim. B*S = H satisfies the constraints in your CvX program. if that is not an acceptable solution, then you need to change to a different problem formulation. I don’t understand the notation in the image and have no idea what the formulation in the image is doing, but your CVX formulation is different.

If you want to have signs be the same, but not allow either of the signs to be “zero”, then you need to bound those items away from zero with some tolerance, such as ... >= 1e-5, rather than … >= 0`.

I‘m sorry to give the vague description. In my problem, \tilde{{Z}} = \tilde{\Psi}S+N-H_R and N is unknown noise. What we knew are \tilde{\Psi}, H_{R} and the sign information of \tilde{Z}.

S is a row-sparse matrix and there are only a few non-zeros row in S. The indices of non-zeros row is desired.

The mosek output is showed as

Calling Mosek 9.1.9: 3456 variables, 432 equality constraints
------------------------------------------------------------

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (6) of matrix 'A'.
MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (7) of matrix 'A'.
MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (8) of matrix 'A'.
MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (9) of matrix 'A'.
MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (10) of matrix 'A'.
MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (11) of matrix 'A'.
MOSEK warning 710: #31 (nearly) zero elements are specified in sparse col '' (12) of matrix 'A'.
MOSEK warning 710: #31 (nearly) zero elements are specified in sparse col '' (13) of matrix 'A'.
MOSEK warning 710: #31 (nearly) zero elements are specified in sparse col '' (14) of matrix 'A'.
MOSEK warning 710: #31 (nearly) zero elements are specified in sparse col '' (15) of matrix 'A'.
Warning number 710 is disabled.
Problem
 Name                   :                 
 Objective sense        : min             
 Type                   : CONIC (conic optimization problem)
 Constraints            : 432             
 Cones                  : 432             
 Scalar variables       : 3456            
 Matrix variables       : 0               
 Integer variables      : 0               

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 1                 time                   : 0.00            
Lin. dep.  - tries                  : 1                 time                   : 0.00            
Lin. dep.  - number                 : 0               
Presolve terminated. Time: 0.05    
Problem
 Name                   :                 
 Objective sense        : min             
 Type                   : CONIC (conic optimization problem)
 Constraints            : 432             
 Cones                  : 432             
 Scalar variables       : 3456            
 Matrix variables       : 0               
 Integer variables      : 0               

Optimizer  - threads                : 16              
Optimizer  - solved problem         : the primal      
Optimizer  - Constraints            : 432
Optimizer  - Cones                  : 432
Optimizer  - Scalar variables       : 3456              conic                  : 3024            
Optimizer  - Semi-definite variables: 0                 scalarized             : 0               
Factor     - setup time             : 0.03              dense det. time        : 0.00            
Factor     - ML order time          : 0.02              GP order time          : 0.00            
Factor     - nonzeros before factor : 9.35e+04          after factor           : 9.35e+04        
Factor     - dense dim.             : 0                 flops                  : 1.57e+08        
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME  
0   2.0e+00  0.0e+00  4.3e+02  0.00e+00   4.320000000e+02   0.000000000e+00   1.0e+00  0.14  
1   3.1e-01  1.8e-15  2.2e+01  9.98e-01   6.251088838e+01   1.314913653e+00   1.6e-01  0.33  
2   4.5e-02  2.7e-15  8.0e-01  1.21e+00   9.515053810e+00   2.814138004e+00   2.3e-02  0.36  
3   2.0e-02  6.2e-15  2.4e-01  1.33e+00   5.587222931e+00   2.948885516e+00   1.0e-02  0.38  
4   4.8e-03  3.0e-14  2.8e-02  1.19e+00   3.562384140e+00   2.991447327e+00   2.4e-03  0.41  
5   5.2e-05  2.7e-14  3.1e-05  1.05e+00   3.005988603e+00   2.999940562e+00   2.6e-05  0.44  
6   1.0e-07  7.6e-13  2.8e-09  1.00e+00   3.000012033e+00   2.999999880e+00   5.3e-08  0.45  
7   7.4e-12  9.6e-12  2.0e-13  1.00e+00   3.000000001e+00   3.000000000e+00   3.8e-12  0.48  
Optimizer terminated. Time: 0.53    


Interior-point solution summary
 Problem status  : PRIMAL_AND_DUAL_FEASIBLE
 Solution status : OPTIMAL
 Primal.  obj: 3.0000000009e+00    nrm: 2e+00    Viol.  con: 4e-12    var: 9e-13    cones: 4e-16  
 Dual.    obj: 3.0000000000e+00    nrm: 1e+00    Viol.  con: 0e+00    var: 5e-12    cones: 0e+00  
Optimizer summary
 Optimizer                 -                        time: 0.53    
   Interior-point          - iterations : 7         time: 0.48    
     Basis identification  -                        time: 0.00    
       Primal              - iterations : 0         time: 0.00    
       Dual                - iterations : 0         time: 0.00    
       Clean primal        - iterations : 0         time: 0.00    
       Clean dual          - iterations : 0         time: 0.00    
   Simplex                 -                        time: 0.00    
     Primal simplex        - iterations : 0         time: 0.00    
     Dual simplex          - iterations : 0         time: 0.00    
   Mixed integer           - relaxations: 0         time: 0.00    

------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +3

Thanks for your advice. I will try it soon.

I have tried to change the constraint as >=1e-5 and it didn’t work. And I also adjust the 1e-5 to 1e-4, 1e-3 and the result has little changes. But I found that when H_R becomes zero or is deleted, the true S is optimized rather than B*S=H

The MOSEK log output looks exemplary. The only thing that could be suspicious are those warnings about tiny inputs. If the elements of Z are almost zero then talking about their sign is meaningless. Maybe that is the issue.

Thanks for your comment. Do your word means the warnings indicate the elements of input data \tilde{Z} are nearly zero? In my matlab code, Z= \textrm{sign}(\tilde{Z}) when \tilde{Z} is truth data whose elements are varies from -7 to 7 generally.

maybe there are elements of magnitude 11e-6, 1e-7, e-8,. 1e-9, 1e-10, or smaller. Perhaps given the range of -7 to 7, these very small magnitude numbers should be exactly zero, and are not zero, only due to roundoff in how they were generated?

Thanks for your explanation. Indeed, the truth data \tilde{Z} is related to a variable whose value is generated randomly. The range (-7, 7) is the statistical result from 100 repeated trials and the minimum amplitude of element is more than 1e-2 in each trial.
En… can I have a more question? According to your reply, Is the matrix A in the warning
MOSEK warning 710: #13 (nearly) zero elements are specified in sparse col '' (6) of matrix 'A'."
the matrix Z in my matlab code?

I think the matrix A might be the matrix that CVX puts into MOSEK, which it is hard to know exactly, because CVX needs to pre-process your data (modeling) before putting them into MOSEK.

Okay, I get it! Thank you, Jack.