Euclidean Gradient not converging for L(Q)=|h Q Qᵀ g|² with Q=I−2vvᴴ (complex sphere)

19 views
Skip to first unread message

Keyvan Aslansefat

unread,
Sep 4, 2025, 5:34:29 PM (2 days ago) Sep 4
to Manopt

I have a real-valued loss function as follows:

where . I obtained the gradient of L wrt  as follows:

Moreover, the matrix  itself can be written as , where , and has a unit norm, i.e., spherecomplexfactory. I calculated the gradient of L with respect to  as follows, assuming v is constant, but the optimization problem is not converging.

Does anybody have an idea about the problem? I code is as follows:

M = spherecomplexfactory(K, 1);
P.M = M;
P.cost = @(v) -costFun(hr, ht, v);
P.egrad = @(v) -gradFun(P, hr, ht, v);
[v, ~] = conjugategradient(P, [], []);
checkgradient(P)
function c = costFun(hr, ht, v)
I = eye(length(hr));
Q = (I-2*v*v');
Theta = Q*Q.';
c = abs(hr*(Theta)*ht)^2;
end
function g = gradFun(P, hr, ht, v)
I = eye(length(hr));
Q = (I-2*v*v');
Theta = Q*Q.';
G = 2*hr*Theta*ht*((conj(ht)*conj(hr)).' + (conj(ht)*conj(hr)))*conj(Q);
g = -2*G*v;
end




Nicolas Boumal

unread,
Sep 5, 2025, 12:47:48 AM (yesterday) Sep 5
to Manopt
Hello,
If you believe the issues may come from an incorrect derivation of the gradient because the variable is complex, then I suggest you write v = u + iw (separate v into real and imaginary parts, so that u and v are two real vectors), and compute the gradient with respect to u and v (as one normally would for a function of real variables). Then, you can recombine these into a complex vector (gradient wrt u + i gradient wrt w).
Best,
Nicolas
Reply all
Reply to author
Forward
0 new messages