I'm working on a convex optimization problem formulated as follows (you can find the explanation below):
This problem is cast as a semi-definite programming (SDP), fed to the CVXPY modelling framework, and solved using the Mosek solver. Please find attached the full code containing the definition of a function that computes the solution of the SDP and the input data.
The optimization variables V and X are matrices of size p x p and num x p respectively, where num = d^2 is typically very large i.e., > 6000 and p=2 (for my case).
The constraint for positive semi-definiteness in terms of X and V is given through the positive semi-definiteness of the block matrix (say M) M=cp.bmat([[V, X.T @ R.conj().T], [R @ X, np.identity(num)]]) >> 0. This is inferred from the positive semi-definiteness condition on the
Schur complement of the identity block of M i.e., V - X.T @ R.conj().T @ R @ X. Another constraint reads: X.T @ dersmatrix == np.identity(p).
R and dersmatrix are matrices of size num x num and num x p respectively, which are constructed previously in my code. W is a p x p weight matrix in the objective function cp.trace(W @ V). Note that: p --> n, num --> \tilde{r}, dersmatrix --> partial derivative of s_\theta in the above image.
For example, when d=81, num=6561, resulting in extremely large sizes for X, R, and dersmatrix, which significantly slows down the solution.
As one possible solution to obtain speed-up, I identified that R is quite sparse and tried to exploit its sparsity using R_spr=csr_matrix(R), which modifies the positive semi-definiteness constraint to cp.bmat([[V, X.T @ R_spr.conj().T], [R_spr @ X, np.identity(num)]]) >> 0. However, this still does not seem to yield faster results.
Having already optimized my code for the construction of the R matrix, I am looking for some suggestions to optimize the SDP part of my code when dealing such very large matrices using Mosek solver, especially for d>=81. In addition to this, it is possible that the block matrix form of the constraint could be slowing down the CVXPY compilation as it is of size (d^2+p) x (d^2+p).
As working examples, I have also attached the input data for NumPy arrays for d=25 and d=81. Any ideas on increasing the performance of Mosek for this problem would be much helpful. Thanks.
Kind regards,