how to compute euclidean hessian

203 views
Skip to first unread message

Yi Hong

unread,
Jun 5, 2013, 5:17:51 PM6/5/13
to manopt...@googlegroups.com
How to compute euclidean hessian? Are there any references?

Thanks a lot.

Yi Hong

unread,
Jun 5, 2013, 5:19:47 PM6/5/13
to manopt...@googlegroups.com
It's for matrix, like f(Q) = ||Q'AQ -B||f. Thanks!

BM

unread,
Jun 6, 2013, 5:22:51 PM6/6/13
to
Hello Yi,

Let us consider the function, f(Q) = ||Q'AQ -B||f ^2 (squared frobenius norm).

The Euclidean gradient is = A' Q S + A Q S' where S = 2(Q'AQ -B). (Checked)

Now, the Euclidean Hessian operator along a direction Z (we require the directional derivative of the Euclidean gradient along the direction Z) is given systematically using the Chain rule. Below is the formula

Euclidean Hess [Z] = A'ZS + A'Q S_star + AZS' + AQS_star'  (Checked)
where  S =  2(Q'AQ -B) and S_star = 2(Z'AQ + Q'AZ).

Do check this out and let us know if this sounds okay. Once formalized, you can use tools like 'checkgradient' and 'checkhessian' to see if this works out.

Regards,
BM

Qiuwei Li

unread,
Jul 27, 2015, 11:14:44 AM7/27/15
to Manopt, bam...@gmail.com
HI BM,

I obtain that S_star=2(Z'A'Q+Q'A'Z). Maybe I am wrong. Can you check that?

Thanks,
QW

BM

unread,
Jul 27, 2015, 12:12:44 PM7/27/15
to Manopt, liqiu...@gmail.com
Hello Qiuwei,

I have checked again. You derivation seems to be incorrect. The derivations that I had shown earlier in the thread are correct. Below is the Manopt code for the confirmation. 

Regards,
BM
Test_Hessian.png
Test_Hessian.html
Test_Hessian_01.png

Qiuwei Li

unread,
Aug 16, 2015, 11:29:39 AM8/16/15
to Manopt, liqiu...@gmail.com
Thanks, BM,

Thanks for helping me understand the technique of computing the Hessian. 

Regards,
Qiuwei

lineya...@gmail.com

unread,
Sep 23, 2016, 6:09:04 AM9/23/16
to Manopt
在 2013年6月7日星期五 UTC+8上午5:22:51,BM写道:
Hi BM,
Thanks for you explanation and I have understood how it works with this objective function. Now I have a function y = f(X_ij - X_ik), and I know how to compute the objective function, gradient function and hessian function of the scalar case. They are all a given matlab function, which is almost like a black box, and I know f(x), f'(x) and f''(x), but I don't know how to get the directional derivative of Euclidean gradient. Do you have any idea? Thanks a lot.

BM

unread,
Sep 23, 2016, 11:48:58 AM9/23/16
to Manopt
Hello, 

I am glad that it helped you. 

Euclidean derivative along a direction, say h, is simply = f''(x) h, i.e., it is the multiplication of the Hessian to the direction h. 

problem.ehess = @ehess;
function dir_derivative = ehess(x, h)
dir_derivative = f''(x)*h; % f''(x) is the black box computation of the Hessian.
end

Does this help?

Regards,
BM

lineya...@gmail.com

unread,
Sep 24, 2016, 1:12:14 AM9/24/16
to Manopt
Sorry that I didn't make myself clear. What I have f(x), f'(x) and f''(x) is elementwise function. However, the problem I meet is y = \sum_{(i,j,k) in Omega} f(X_{ij}-X{ik})。 According to the rule, grad(X) = [f'(X_{ij}-X_{ik})]_{ij}+[-f'(X_{ij}-X_{ik})]_{ik}. The first term is added at the (i,j)-th element of grad(X), while the second term is added at (i,k)-th. But I don't know how to get the directional derivative of gradient. Would you please give me a little more tips? Thanks.

Kai

BM

unread,
Sep 24, 2016, 1:54:01 PM9/24/16
to Manopt
Hello Kai, 

Could you share a Matlab file where you have written down the cost and gradient computations explicitly. This will be helpful in driving the directional derivative.

Regards,
BM

Reply all
Reply to author
Forward
0 new messages