Using operator relative entropy cone in Julia

Question

Is it possible to optimize over the following operator relative entropy cone natively in Julia:

\text{cl}\{(A, B, C)\in H^n_+ \times H^n_+ \times H^n: C \succeq - A^{1/2} \log(A^{-1/2} B A^{-1/2}) A^{1/2}\}

where cl stands for the closure, H^n is the space of n\times n Hermitian matrices, H^n_+ is the space of n\times n PSD Hermitian matrices.

Context

Thanks!

Hi @zhouhh17, welcome to the forum :smile:

I don’t think there has been any progress. You’re still limited to the trace. But I’m not an expert in this area, so someone might come along to correct me. Let me know if you need an example using the trace. You could use Hypatia via JuMP, or you could use Convex.jl.

Hi odow. Thank you for the information.
I’m new to this field and have only used frameworks and solvers as a user, never contributed code or developed one. Maybe I could try customizing this cone later.

  • Is implementing this cone a good choice for a beginner? (I’m unfamiliar with the theory part and those self-concordant barrier function stuff, so I don’t know how hard it is.)
  • Are there beginner examples for customizing a cone?

Thanks!

What do you mean by “customizing a cone”? Are you trying to develop a software kit?
or you merely want to solve a convex conic optimization instance?

In order to implement a cone you need to do five things:

  1. Solve the central point equation to determine the starting point
  2. Write a function to test whether a point belongs to the cone
  3. Write functions to compute the gradient, Hessian, and third-order derivative of the barrier function

Now for this cone specifically the central point and the derivatives are already known, so you’d only need to implement them. Problem is, they are rather nasty. I’d say it’s straightforward but difficult. The best you to do it is get a similar cone, modify it function by function, and use ForwardDiff to test whether you are writing down the derivatives correctly.

As for beginner examples, I’m afraid all easy cones have been implemented already. You could as an exercise reimplement the second-order cone, for example.

Convex.jl has Convex.Constraint((T, X, Y), RelativeEntropyEpiConeSquare(size(X, 1), m, k, e)) but it looks a little different from your definition (Supported Operations · Convex.jl). This uses an extended formulation ported from CVXQUAD rather than directly implementing the cone.

Could we use Enzyme or something similar to write out the derivatives for us? Why do they have to be done manually?

I tried Enzyme, no luck. ForwardDiff worked, but it was too slow and unstable to be useful.

It’s specially problematic when the functions have a restricted domain (like here), and the derivatives diverge in the boundary. When we’re close to the boundary (which always happens when solving a conic problem) ForwardDiff produces garbage.