# Kernel Geometric Mean Metric Learning
## 3 Main Results  
### Optimization Problem  
The core of the kernel method is to transform the linearly inseparable point set in the low-dimensional space into the high-dimensional space through a nonlinear transformation \(\Phi(\cdot)\), making it linearly separable. In this process, it is not necessary to know the specific analytical expression of the nonlinear transformation, but only know the inner product \(\langle\Phi(x),\Phi(x^{\prime})\rangle\) after the transformation of the two samples \(x,x^{\prime}\), and \(\langle\Phi(x),\Phi(x^{\prime})\rangle\) can be represented by a kernel function, i.e., \(\langle\Phi(x),\Phi(x^{\prime})\rangle=k(x,x^{\prime})\), where \(k(x,x^{\prime})\) is a kernel function. For ease of presentation, we first derive the model using \(\Phi(\cdot)\) and then replace it with the kernel function to obtain the final kernel geometric mean metric learning algorithm. Let \(D_{\Phi}^{+}\) and \(D_{\Phi}^{-}\) represent the similarity sample set \(D^{+}\) and the non-similar pair sample set \(D^{-}\) mapped to the point set in the high-dimensional space \(\mathcal{F}\), that is  
\[\left\{ \begin{array}{l}D_{\Phi}^{+}=\big{\{}\big{(}\Phi(x_{1i}),\Phi(x_{2i}) \big{)}\mid\[PERSON](x_{1i}),\Phi(x_{2i})\in\mathcal{F}\text{ are in the same class},i=1,2,\ldots,n\big{\}},\\ D_{\[PERSON]}^{-}=\big{\{}\big{(}\[PERSON](\overline{x}_{1j}),\[PERSON](\overline{x}_{2j}) \big{)}\mid\[PERSON](\overline{x}_{1j}),\[PERSON](\overline{x}_{2j})\in\mathcal{F} \text{ are in different class}\,j=1,2,\ldots,m\big{\}}.\end{array} \right. \tag{4}\]  
In high dimensional space, the objective function (2) can be written in the following form:  
\[ \begin{split}&\min_{M_{\Phi}>0}\sum_{(\[PERSON](x_{1i}),\[PERSON](x_{2i}) )\in D_{\Phi}^{+}}d_{M_{\Phi}}(\[PERSON](x_{1i}),\[PERSON](x_{2i}))+\sum_{\big{(}\[PERSON]( \overline{x}_{1j}),\[PERSON](\overline{x}_{2j})\big{)}\in D_{\Phi}^{-}}d_{M_{ \Phi}^{-1}}\big{(}\[PERSON](\overline{x}_{1j}),\[PERSON](\overline{x}_{2j})\big{)}\\ =&\min_{M_{\Phi}>0}\sum_{(\[PERSON](x_{1i}),\[PERSON](x_{2i}))\in D_{ \Phi}^{+}}(\[PERSON](x_{1i})-\[PERSON](x_{2i}))^{\mathrm{T}}M_{\Phi}(\[PERSON](x_{1i})-\[PERSON]( x_{2i}))\\ &+\sum_{\big{(}\[PERSON](\overline{x}_{1j}),\[PERSON](\overline{x}_{2j}) \big{)}\in D_{\Phi}^{-}}\big{(}\[PERSON](\overline{x}_{1j})-\[PERSON](\overline{x}_{2j })\big{)}^{\mathrm{T}}M_{\Phi}^{-1}\big{(}\[PERSON](\overline{x}_{1j})-\[PERSON]( \overline{x}_{2j})\big{)}.\end{split}  \tag{5}\]  
where \(d_{M_{\Phi}}(\Phi(x_{1i}),\Phi(x_{2i}))=(\[PERSON](x_{1i})-\Phi(x_{2i}))^{\mathrm{ T}}M_{\Phi}(\Phi(x_{1i})-\Phi(x_{2i}))\) represents the distance metric in the high dimensional space and \(M_{\Phi}\) is the metric matrix. Rewriting the distance uses traces, Equation (5) can be turned into the following optimization problem:  
\[ \begin{split}&\min_{M_{\Phi}>0}\sum_{(\Phi(x_{1i}),\Phi(x_{2i}))\in D _{\Phi}^{+}}\text{tr}\Big{(}M_{\Phi}(\Phi(x_{1i})-\Phi(x_{2i}))(\Phi(x_{1i})- \Phi(x_{2i}))^{\text{T}}\Big{)}\\ &+\sum_{(\[PERSON](\overline{x}_{1j}),\[PERSON](\overline{x}_{2j}))\in D_ {\Phi}^{-}}\text{tr}\Big{(}M_{\Phi}^{-1}\big{(}\[PERSON](\overline{x}_{1j})-\[PERSON]( \overline{x}_{2j})\big{)}\big{(}\[PERSON](\overline{x}_{1j})-\[PERSON](\overline{x}_{2j })\big{)}^{\text{T}}\Big{)}\\ &=\min_{M_{\Phi}>0}\text{tr}(M_{\Phi}S_{\Phi})+\text{tr}\Big{(}M_ {\Phi}^{-1}D_{\Phi}\Big{)}\\ &\overset{\triangle}{=}\min_{M_{\Phi}>0}h(M_{\Phi}),\end{split}  \tag{6}\]  
where \(S_{\Phi}\), \(D_{\Phi}\) are  
\[ \begin{split} S_{\Phi}&=\sum_{(\Phi(x_{1i}),\Phi(x _{2i}))\in D_{\Phi}^{+}}(\Phi(x_{1i})-\Phi(x_{2i}))(\Phi(x_{1i})-\Phi(x_{2i}))^ {\text{T}},\\ D_{\Phi}&=\sum_{(\Phi(\overline{x}_{1j}),\Phi( \overline{x}_{2j}))\in D_{\Phi}^{-}}\big{(}\Phi(\overline{x}_{1j})-\Phi( \overline{x}_{2j})\big{)}\big{(}\Phi(\overline{x}_{1j})-\Phi(\overline{x}_{2j })\big{)}^{\text{T}}.\end{split}