-
Notifications
You must be signed in to change notification settings - Fork 92
add nuclear norm and spectral norm cone sets (for general/nonsymmetric matrices) #976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #976 +/- ##
==========================================
- Coverage 95.23% 95.21% -0.03%
==========================================
Files 98 98
Lines 11002 11048 +46
==========================================
+ Hits 10478 10519 +41
- Misses 524 529 +5
Continue to review full report at Codecov.
|
ref: #705 for discussion of how to define complex generalizations of cones such as the spectral/nuclear cones. If that issue is resolved soon then I'll generalize for complex in this PR. The complex cones just have complex matrix entries but the epigraph variable stays real. |
Another question is whether these should fall under the "matrix sets", which are currently all symmetric matrix sets, or whether there should be abstract |
What should I name the bridge file? something like norm_spec_nuc_to_psd? I'll need to rename the norm_to_lp file to something like norm_one_inf_to_lp, because "norm" isn't specific enough anymore. That's breaking I suppose? |
Bridges seem challenging. I can't infer the row_dim and column_dim of the matrix from the length of a vector alone, so I don't know how to implement some of the functions that other bridges implement. Could we merge this without any bridges (after I remove the bridge file)? Or just not implement many of the bridge functions? |
No, changing file name is not breaking.
Could you elaborate on this ?
Yes, but we should make sure now if the set definition will need to change for the bridging to work. |
I'll try. So take the I suppose an option is to parametrize the bridge type by the Several of the other sets I want to add are in the same boat: a vector dimension alone is not enough information to construct the extended formulation. |
Your bridge does not have to be a |
Thanks @blegat. Which existing bridge would be most similar to this one, so that I can base it on a prototype? |
|
@blegat this is ready for review I think |
I'm seeing some fragility when running the new contconic spec/nuc tests with solvers, so I think I'll change those instances |
Hypatia is passing the new conic tests both with and without the new bridges. |
Can you add ConstraintPrimalStart and ConstraintDualStart? See #684 |
If that was implemented already for NormOne then I could use that as a template. But it's not and the other bridges are set map bridges, which I don't understand. I would prefer to get this PR merged before discussing that further. |
See also #994 |
@blegat I added constraint primal start for spectral cone and constraint dual start for nuclear cone. Not sure how to do con dual start for spectral or con primal start for nuclear. |
X = 2 * dual[[trimap(i, j) for j in 1:column_dim for i in (column_dim + 1):side_dim]] | ||
return vcat(t, X) | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For ConstraintDualStart, I would set all trimap(i, i)
to the dual of t
divided by 2side_dim
. It might not be the only possibility but it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK should I make another PR for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wrong, that won't make the matrix PSD.
In fact, it's easier to discuss the ConstraintPrimalStart of NormNuclearBridge.
So suppose you have X and t set.
[A X'; X B] >= 0 is equivalent to A >= X' inv(B) X. If X = U S V', then, it's equivalent to
V' * A * V <= S * U' * inv(B) * U * S
then, by choosing A = V * S * V' and B = U * S * U', you get
S <= S * inv(S) * S which is satisfied.
As the trace must sum up to t, you set A = V * S * V' * (t / tr(S)) and B = U * S * U' * (t / tr(S).
The matrix [A X'; X B] >= will be PSD iff t >= sum sigma_i(X) so it seems like a good candidate for starting value :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if that works for constraint primal start of NormNuclear then should it also work for constraint dual start of NormSpectral?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was just easier to reason in the primal than in the dual ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK rather than having you explain the details to me, it's probably easier if you implement those new start functions
These cones are dual to each other. I've added the definitions in sets.jl and when we are agreed on those, I'll finish off the rest including bridges for SDP extended formulations. An important decision to make is how to handle the (general/nonsymmetric) matrix part in the definition, like whether to vectorize it row-major or column-major.