# Semidefinite embedding

(Redirected from Maximum variance unfolding)

Semidefinite embedding (SDE) or maximum variance unfolding (MVU) is an algorithm in computer science that uses semidefinite programming to perform non-linear dimensionality reduction of high-dimensional vectorial input data. MVU can be viewed as a non-linear generalization of Principal component analysis.

Non-linear dimensionality reduction algorithms attempt to map high-dimensional data onto a low-dimensional Euclidean vector space. Maximum variance Unfolding is a member of the manifold learning family, which also include algorithms such as isomap and locally linear embedding. In manifold learning, the input data is assumed to be sampled from a low dimensional manifold that is embedded inside of a higher-dimensional vector space. The main intuition behind MVU is to exploit the local linearity of manifolds and create a mapping that preserves local neighbourhoods at every point of the underlying manifold.

MVU creates a mapping from the high dimensional input vectors to some low dimensional Euclidean vector space in the following steps:

A neighbourhood graph is created. Each input is connected with its k-nearest input vectors (according to Euclidean distance metric) and all k-nearest neighbors are connected with each other. If the data is sampled well enough, the resulting graph is a discrete approximation of the underlying manifold.

The neighbourhood graph is "unfolded" with the help of semidefinite programming. Instead of learning the output vectors directly, the semidefinite programming aims to find an inner product matrix that maximizes the pairwise distances between any two inputs that are not connected in the neighbourhood graph while preserving the nearest neighbors distances.

The low-dimensional embedding is finally obtained by application of multidimensional scaling on the learned inner product matrix.

The steps of applying semidefinite programming followed by a linear dimensionality reduction step to recover a low-dimensional embedding into a Euclidean space were first proposed by Linial, London, and Rabinovich.

## Optimization Formulation

Let ${\displaystyle X\,\!}$ be the original input and ${\displaystyle Y\,\!}$ be the embedding. If ${\displaystyle i,j\,\!}$ are two neighbors, then the local isometry constraint that needs to be satisfied is:

${\displaystyle |X_{i}-X_{j}|^{2}=|Y_{i}-Y_{j}|^{2}\,\!}$

Let ${\displaystyle G,K\,\!}$ be the Gram matrices of ${\displaystyle X\,\!}$ and ${\displaystyle Y\,\!}$ (i.e.: ${\displaystyle G_{ij}=X_{i}\cdot X_{j},K_{ij}=Y_{i}\cdot Y_{j}\,\!}$). We can express the above constraint for every neighbor points ${\displaystyle i,j\,\!}$ in term of ${\displaystyle G,K\,\!}$:

${\displaystyle G_{ii}+G_{jj}-G_{ij}-G_{ji}=K_{ii}+K_{jj}-K_{ij}-K_{ji}\,\!}$

In addition, we also want to constrain the embedding ${\displaystyle Y\,\!}$ to center at the origin:

${\displaystyle \sum _{i}Y_{i}=0\Leftrightarrow (\sum _{i}Y_{i})\cdot (\sum _{i}Y_{i})=0\Leftrightarrow \sum _{i,j}Y_{i}\cdot Y_{j}=0\Leftrightarrow \sum _{i,j}K_{ij}=0}$

As described above, except the distances of neighbor points are preserved, the algorithm aims to maximize the pairwise distance of every pair of points. The objective function to be maximized is:

${\displaystyle T(Y)={\dfrac {1}{2N}}\sum _{i,j}|Y_{i}-Y_{j}|^{2}}$

Intuitively, maximizing the function above is equivalent to pulling the points as far away from each other as possible and therefore "unfold" the manifold. The local isometry constraint prevents the objective function from going to infinity. Proof:

Let ${\displaystyle \tau =max\{\eta _{ij}|Y_{i}-Y_{j}|^{2}\}\,\!}$ where ${\displaystyle \eta _{ij}=1\,\!}$ if i and j are neighbors and ${\displaystyle \eta _{ij}=0\,\!}$ otherwise.

Since the graph has N points, the distance between any two points ${\displaystyle |Y_{i}-Y_{j}|^{2}\leq N\tau \,\!}$. We can then bound the objective function as follow:

${\displaystyle T(Y)={\dfrac {1}{2N}}\sum _{i,j}|Y_{i}-Y_{j}|^{2}\leq {\dfrac {1}{2N}}\sum _{i,j}(N\tau )^{2}={\dfrac {N^{3}\tau ^{2}}{2}}\,\!}$

The objective function can be rewritten purely in the form of the Gram matrix:

{\displaystyle {\begin{aligned}T(Y)&{}={\dfrac {1}{2N}}\sum _{i,j}|Y_{i}-Y_{j}|^{2}\\&{}={\dfrac {1}{2N}}(\sum _{i,j}(Y_{i}^{2}+Y_{j}^{2}-Y_{i}\cdot Y_{j}-Y_{j}\cdot Y_{i})\\&{}={\dfrac {1}{2N}}(\sum _{i,j}Y_{i}^{2}+\sum _{i,j}Y_{j}^{2}-\sum _{i,j}Y_{i}\cdot Y_{j}-\sum _{i,j}Y_{j}\cdot Y_{i})\\&{}={\dfrac {1}{2N}}(\sum _{i,j}Y_{i}^{2}+\sum _{i,j}Y_{j}^{2}-0-0)\\&{}={\dfrac {1}{N}}(\sum _{i}Y_{i}^{2})={\dfrac {1}{N}}(Tr(K))\\\end{aligned}}\,\!}

Finally, the optimization can be formulated as:

Maximize ${\displaystyle Tr(K)\,\!}$

Subject to ${\displaystyle K\succeq 0\,\!}$ and ${\displaystyle \forall i,j\,\!}$ where ${\displaystyle \eta _{ij}=1,G_{ii}+G_{jj}-G_{ij}-G_{ji}=K_{ii}+K_{jj}-K_{ij}-K_{ji}\,\!}$

After the Gram matrix ${\displaystyle K\,\!}$ is learned by semidefinite programming, the output ${\displaystyle Y\,\!}$ can be obtained via Cholesky decomposition. In particular, the Gram matrix can be written as ${\displaystyle K_{ij}=\sum _{\alpha =1}^{N}(\lambda _{\alpha }V_{\alpha i}V_{\alpha j})\,\!}$ where ${\displaystyle V_{\alpha i}\,\!}$ is the i-th element of eigenvector ${\displaystyle V_{\alpha }\,\!}$ of the eigenvalue ${\displaystyle \lambda _{\alpha }\,\!}$.

It follows that the ${\displaystyle \alpha \,\!}$-th element of the output ${\displaystyle Y_{i}\,\!}$ is ${\displaystyle {\sqrt {\lambda _{\alpha }}}V_{\alpha i}\,\!}$.