Second order derivative of the squared Frobenius norm

338 Views Asked by At

I have a matrix $X$ of size $k\times d$. $k$ might be constrained to be equal to $d$.

I'm searching for the derivative of the following equation with respect to $X$:

$\Vert X^TX\Vert_F^2$

I tried to rewrite it using the trace:

$Tr(X^TX(X^TX)^H)$ but it doesn't seem to lead me anywhere.

I also tried to follow a similar question, but in my problem, the variable inside the norm is quadratic.

Any idea?

1

There are 1 best solutions below

0
On BEST ANSWER

Introduce a new symmetric matrix variable $$\eqalign{ M &= X^TX \cr dM &= dX^T\,X + X^T\,dX \cr }$$ Then write the function using the trace/Frobenius product, i.e. $$A:B={\rm tr}(A^TB)$$ This makes finding the differential and gradient much easier. $$\eqalign{ \phi &= \|M\|_F^2 = M:M \cr d\phi &= 2M:dM \cr &= 2M:(dX^T\,X + X^T\,dX) \cr &= 2MX^T:dX^T + 2XM:dX \cr &= 2XM^T:dX + 2XM:dX \cr &= 4XM:dX \cr \frac{\partial\phi}{\partial X} &= 4XM = 4XX^TX \cr }$$