# regression on Manifold using Kernel Dimension Reduction

An Algorithm for finding a new linear map for dimension reduction.

## Introduction

This paper <ref>[1] Jen Nilsson, Fei Sha, Michael I. Jordan, Regression on Manifold using Kernel Dimension Reduction, 2007 - cs.utah.edu </ref>introduces a new algorithm for discovering a manifold that best preserves the information relevant to a non-linear regression. The approach introduced by the authors involves combining the machinery of Kernel Dimension Reduction (KDR) with Laplacian Eigenmaps by optimizing the cross-covariance operators in kernel feature space.

Two main challenges that we usually come across in supervised learning are making a choice of manifold to represent the covariance vector and to choose a function to represent the boundary for classification (i.e. regression surface). As a result of these two complexities, most of the research in supervised learning has been focused on learning linear manifolds. The authors introduce a new algorithm that makes use of methodologies developed in Sufficient Dimension Reduction (SDR) and Kernel Dimension Reduction (KDR). The algorithm is called Manifold Kernel Dimension Reduction (mKDR).

## Sufficient Dimension Reduction

The purpose of Sufficient Dimension Reduction (SDR) is to find a linear subspace S such that the response vector Y is conditionally independent of the covariate vector X. More specifically, let $(X,B_X)$ and $(Y,B_Y)$ be measurable spaces of covariates X and response variable Y. SDR aims to find a linear subspace $S \subset X$ such that $S$ contains as much predictive information about the response $Y$ as the original covariate space. As seen before in (Fukumizu, K., Bach, F. R., & Jordan, M. I. (2004))<ref>Fukumizu, K., Bach, F. R., & Jordan, M. I. (2004):Kernel Dimensionality Reduction for Supervised Learning</ref> this can be written more formally as a conditional independence assertion.

$Y \perp B^T X | B^T X$ $\Longleftrightarrow Y \perp (X - B^T X) | B^T X$. <ref>[2] Jen Nilsson, Fei Sha, Michael I. Jordan, Regression on Manifold using Kernel Dimension Reduction, 2007 - cs.utah.edu </ref>

The above statement says that $S \subset X$ such that the conditional probability density function $p_{Y|X}(y|x)\,$ is preserved in the sense that $p_{Y|X}(y|x) = p_{Y|B^T X}(y|b^T x)\,$ for all $x \in X \,$ and $y \in Y \,$, where $B^T X\,$ is the orthogonal projection of $X\,$ onto $S\,$. The subspace $S\,$ is referred to as a dimension reduction subspace. Note that $S\,$ is not unique.

We can define a minimal subspace as the intersection of all dimension reduction subspaces $S\,$. However, a minimal subspaces will not necessarily satisfy the conditional independence assertion specified above. But when it does, it is referred to as the central subspace.

This is one of the primary goals of the method i.e. to find a central subspace. Several approaches have been introduced in the past, mostly based on inverse regression (Li, 1991)<ref>Sliced inverse regression for dimension reduction. Journal of the American Statistical Association, 86, 316–327</ref> (Li, 1992)<ref>On principal Hessian directions for data visualization and dimension reduction: Another application of Stein’s lemma. Journal of the American Statistical Association, 86, 316–342.</ref>. The main intuition behind this approach is to find $\mathbb{E[} X|Y \mathbb{]}$ becuase if the the forward regression model $P(X|Y)$ is concenterated in a subspace of $X$, then $\mathbb{E[} X|Y \mathbb{]}$ should also lie in $X$ (See Li. 1991 for more details<ref>Sliced inverse regression for dimension reduction. Journal of the American Statistical Association, 86, 316–327</ref>). Unfortunately, such an approach proposes a difficulty of making strong assumptions on the distribution of X (e.g. the distribution should be elliptical) and the methods of inverse regression fail if such assumptions are not satisfied. In order to overcome this problem, the authors turn to the description of KDR, i.e. an approach to SDR which does not make such strong assumptions.

## Kernel Dimension Reduction

The framework for Kernel Dimension Reduction was primarily described by Kenji Fukumizu <ref>Fukumizu, K., Bach, F. R., & Jordan, M. I. (2004). Dimensionality reduction for supervised learning with reproducing kernel Hilbert spaces. Journal of Machine Learning Research, 5, 73–99.</ref><ref>Fukumizu, K., Bach, F. R., & Jordan, M. I. (2006). Kernel dimension reduction in regression (Technical Report). Department of Statistics, University of California, Berkeley.</ref>. The key idea behind KDR is to map random variables X and Y to Reproducing Kernel Hilbert Spaces (RHKS). Before going ahead, we make some preliminary definitions.

$\mathbb{D}$:- Reproducing Kernel Hilbert Space A Hilbert space is a (possibly infinite dimension) inner product space that is a complete metric space. Elements of a Hilbert space may be functions. A reproducing kernel Hilbert space is a Hilbert space of functions on some set $T$ such that there exists a function $K$ (known as the reproducing kernel) on $T \times T$, where for any $t \in T$, $K( \cdot , t )$ is in the RKHS.

$\mathbb{D}$:- Cross-Covariance Operators Let $({ H}_1, k_1)$ and $({H}_2, k_2)$ be RKHS over $(\Omega_1, { B}_1)$ and $(\Omega_2, {B}_2)$, respectively, with $k_1$ and $k_2$ measurable. For a random vector $(X, Y)$ on $\Omega_1 \times \Omega_2$. Using the Reisz representation theorem, one may show that there exists a unique operator $\Sigma_{YX}$ from $H_1$ to $H_2$ such that
$\lt g, \Sigma_{YX} f\gt _{H_2} = \mathbb{E}_{XY} [f(X)g(Y)] - \mathbb{E}[f(X)]\mathbb{E}[g(Y)]$
holds for all $f \in H_1$ and $g \in H_2$, which is called the cross-covariance operator.

$\mathbb{D}$:- Condtional Covariance Operators Let $(H_1, k_1)$ and $(H_2, k_2)$ be RKHS on $\Omega_1 \times \Omega_2$, and let $(X,Y)$ be a random vector on measurable space $\Omega_1 \times \Omega_2$. The conditonal cross-covariance operator of $(Y,Y)$ given $X$ is defined by
$\Sigma_{YY|x}: = \Sigma_{YY} - \Sigma_{YX}\Sigma_{XX}^{-1}\Sigma_{XY}$.

$\mathbb{D}$ :- Conditional Covariance Operators and Condtional Indpendence Let $(H_{11}, k_{11})$, $(H_{12},k_{12})$ and $(H_2, k_2)$ be RKHS on measurable space $\Omega_{11}$, $\Omega_{12}$ and $\Omega_2$, respectively, with continuous and bounded kernels. Let $(X,Y)=(U,V,Y)$ be a random vector on $\Omega_{11}\times \Omega_{12} \times \Omega_{2}$, where $X = (U,V)$, and let $H_1 = H_{11} \otimes H_{12}$ be the dirct product. It is assume that $\mathbb{E}_{Y|U} [g(Y)|U= \cdot] \in H_{11}$ and $\mathbb{E}_{Y|X} [g(Y)|X= \cdot] \in H_{1}$ for all $g \in H_2$. Then we have
$\Sigma_{YY|U} \ge \Sigma_{YY|X}$,
where the inequality refers to the order of self-adjoint operators. Furthermore, if $H_2$ is probability-deremining,
$\Sigma_{YY|X} = \Sigma_{YY|U} \Leftrightarrow Y \perp X|U$.
Therefore, the effective subspace S can be found by minimizing the following function:
$\min_S\quad \Sigma_{YY|U}$,$s.t. \quad U = \Pi_S X$.

Note here for
$\Sigma_{YY|U} \ge \Sigma_{YY|X}$,
in the sense of operator, the inequality means the variance of $Y$ given data $U$ is bigger than the variance of $Y$ given data $X$, which makes sense that $U$ is just a part of the whole data $X$.

Now that we have defined cross-covariance operators, we are finally ready to link the cross covariance operators to the central subspace. Consider any subspace $S \in X$. Then we can map this subspace to a RKHS $H_S$ with a kernel function $K_S$. Furthermore, we define the conditional cross covariance operator as $\Sigma_{YY|S}$ as if we were to regress $Y$ on $S$. Then, intuitively, the residual error from $\Sigma_{YY|S}$ should be greater than that from $\Sigma_{YY|S}$. Fukumizu etl al. (2006) <ref>Fukumizu, K., Bach, F. R., & Jordan, M. I. (2006). Kernel dimension reduction in regression (Technical Report). Department of Statistics, University of California, Berkeley.</ref> formalized that it would be trues unless $S$ contains the central subspace. The intuition is formalized in the following theorem.

$\mathfrak{Theorem 1:-}$ Suppose $Z = B^T B X \in S$ where $B \in \mathbb{R}^{D \times d}$ is a projection matrix such that $B^T B$ is an identity matrix. Further assume Gaussian RBF kernels for $K_X, K_Y, and K_S$. Then

-) $\Sigma_{YY|X} \prec \Sigma_{YY|Z}$ where $\prec$ stands for "less than or equal to" in some operator partial ordering.

-) $\Sigma_{YY|X} = \Sigma_{YY|Z}$ if and only if $Y \bot (X - B^T X)|B^T X$, that is, $S$ is a central subspace

One thing to note about the theorem specifically is that it doesn't impose any strong assumptions on the distribution of X, Y or their marginal distribution $\mathbb{P}$(Y|X). (See Fukumizu et. al. 2006). This theorem leads to the new algorithm for estimating the central subspace characterized by B. Let $\{x_i,y_i\}_{i=1}^{N}$ denote the N samples from the joint distribution of $\mathbb{P}$(X, Y) and let $K_Y \in \mathbb{R}^{N \times N}$ and $K_Z \in \mathbb{R}^{N \times N}$ denote the Gram matrices comuted over yi and zi = BT xi}. Then Fukumizu et al. (2006) <ref>Fukumizu, K., Bach, F. R., & Jordan, M. I. (2006). Kernel dimension reduction in regression (Technical Report). Department of Statistics, University of California, Berkeley.</ref> show that this problem can be formulated as

$\min Tr \mathbb{[}K_Y^C(K_Z^C + N \in I^{-1}) \mathbb{]}$ such that $B^T B = I$

where I is the Identity matrix and $\epsilon$ is a regularization coefficient. The matrix KC denotes the centered kernel matrices

$K^c = \left(I - \frac{1}{N}ee^T \right) K\left(I - \frac{1}{N}ee^T \right)$

where e is a vector of all ones.

## Manifold Learning

Let $\{x_i,y_i\}_{i=1}^{N}$ denote N data points sampled from the submanifold. Laplacian eigenmaps also appeal to a simple geometric intuition: namely, that nearby high dimensional inputs should be mapped to nearby low dimensional outputs. To this end, a positive weight Wij is associated with inputs xi and xj if either input is among the other’s k-nearest neighbors. Usually, the values of the weights are either chosen to be constant, say Wij = 1/k, or exponentially decaying, as $W_{ij} = exp \left(\frac{- \|x_i - x_j \|^2}{\sigma^2}\right)$. Let D denote the diagonal matrix with elements $D_{ii} = \sum_{\forall j}W_{ij}$. Then the outputs yi can be chosen such that it minimizes the cost function:

$\Psi(Y) = \sum_{\forall ij} \frac{W_ij\|y_i - y_j \|^2}{\sqrt{D_{ii}D_{jj}}}$ (6)

The embedding is computed from the bottom eigenvectors of the matrix $\Psi = I - D^{- \frac{1}{2}} W D^{- \frac{1}{2}}$ where the matrix $\Psi$ is a symmetrized, normalized form of the graph Laplacian, given by D - W.

As an example, the figure below shows some of the first non-constant eigenvectors (mapped onto 2-D) for data points sampled from a 3-D torus. The image intesities correspond to high and low values of the eigen vectors. The variation in the intensities can be interpreted as the high and low frequency components of the harmonic functions. Intuitively, these eigenvectors can be used to approximate smooth functions on the manifold.

## Manifold Kernel Dimension Reduction

The new algorithm introduced by the authors is called Manifold Kernal Dimension Reduction (mKDR) which combines ideas from supervised manifold learning and Kernel Dimension Reduction.

In essence the algorithm is has three main elements:

(1) Compute a Low-Dimension embedding of the covariates X; (2) Parametrize the central subspace as a linear transformation of the lower-dimensional embedding; (3) Compute the coefficients of the optimal linear map using the Kernel Dimension Reduction framework

The linear map achieved from the algorithm yields directions in the low-dimensional embedding that contribute most significantly to the central subspace. the authors start by illustrating the derivation of the algorithm and then outline the mKDR algorithm.

### Derivation

For an M-Dimensional embedding $U \in \mathcal{U} \subset \mathbb{R}^{M \times N}$ generated by graph laplacian, choose M eigenvectors $\{v_m\}_{m=1}^{M}$ (see below for a choice of M).Then continuing from the KDR framework, consider a Kernel function that maps a point BTxi in the central subspace to the Reproducing Kernel Hilbert Space (RKHS). Construct the mapping K(;) as

$K \left(; B^T x_i \right) \approx \Phi u_i$

where $\Phi u_i$ is a linear expression approximating the Kernel Function. Note that, $\Phi \in \mathbb{R}^{M \times M}$ is a linear map independent of xi and our aim now is to find $\Phi$. This can be done through the KDR framework by minimizing the cost function [[Tr $\mathbb{[} K_Y^C(K_Z^C + N \in I) \mathbb{]}$]] for statistical independence between yi and xi. Then the Gram Matrix is approximated and parametrized by the linear map $\,\Phi$ i.e.

$\lt K(;B^T x_i),K(B^T x_j)\gt \approx u_i^T \Phi^T \Phi u_j$

Define $\,\Omega = \Phi^T \Phi$. Then, continuing from the earlier minimization problem, the matrix KCZ can be approximated by

$K_Z^C \approx U^T \Omega U$

which allows us to formulate the problem as

Minimize: Tr $\mathcal{[} K^C_Y(U^T \Omega U + N \epsilon I)^-1 \mathcal{]}$ such that: $\Omega \succeq 0$

           Tr $(\Omega)= 1$


The above optimization problem is nonlinear and nonconvex. The second constraint of unit trace is added becuase the objective function attains arbitrarily small value with infimum of zero if $\Omega$ grows arbitrarily large. Furthermore, the matrix $\,\Omega$ needs to be constrained in the cone of positive semidefinitive matrices i.e. $\Omega \succeq 0$ in order to compute the linear map $\,\Phi$ as the square root of $\,\Omega$.

Once we get our linear map, we can find the matrix B inverting the map that we initially constructed (i.e. $\,K \left(; B^T x_i \right) \approx \Phi u_i$). The authors did point out however, that in case of regression using reduced dimensionality it is sufficient to regress Y on the central subspace$\,\Phi U$.

The problem of choosing dimensionality is an open problem in case of KDR. One suggested strategy is to choose M relatively larger than a conservative prior estimate d of the central subspace. In this situation, we hope/rely on the fact that the solution to the above described optimization problem leads to a low rank of the linear map $\,\Phi$. Thus, r = RANK($\,\Phi$) provides an emperical estimate of d.



## Experimental Results

### Regression on Torus

In this section we analyze data points lying on the surface of a torus, illustrated in Fig. 1. A torus can be constructed by rotating a 2-D cycle in $R^3$ with respect to an axis. Hence giving any data point on the surface two degrees of freedom: the rotated angle $\theta_r$ with respect to the axis and the polar angle $\theta_p$ on the cycle. Our synthesized data set is formed by sampling these two angles from the Cartesian product $[0 2\pi] × [0 2\pi]$. As a result of that the 3-D coordinates of our torus will be $\mathbf{x_1=(2+cos\theta_r)cos\theta_p, x_2=(2+cos\theta_r)sin\theta_p}$ and $\mathbf{x_3=sin\theta_r}$. After that we embed the torus in $\mathbf{x \in R^{10}}$ by augmenting the coordinates with 7-dimensional all-zero or random vectors. For setting up the regression problem, we define the response by $\mathbf{y=\sigma[-17(\sqrt((\theta_r-\pi)^2+(\theta_p-\pi)^2)-0.6\pi)]}$ where $\sigma[.]$ is the sigmoid function. The colors on the surface of the torus in Fig. 1 correspond to the value of the response.

The mKDR was applied to the torus data set generated from 961 uniformly sampled angles $\theta_p$ and $\theta_r$ and $M = 50$ bottom eigenvectors from the graph Laplacian were used. The mKDR algorithm then computed the matrix $\mathbf{ \Phi \in R^{50 \times 50}}$ that minimizes the empirical conditional covariance operator; This matrix turned out to be of nearly rank 1 and can be approximated by $\mathbf{a^T a}$ where $\mathbf{a}$ is the eigenvector corresponding to the largest eigenvalue. Hence, we projected the 50-D embedding of the graph Laplacian onto this principal direction $\mathbf{a}$.

$\mathbf{a^T a}$

## Further Research

This paper presented a new algorithm for dimensionality reduction that is appropriate when supervised information is available. The algorithm stands out not only because of its higher predictive power, but also because it combines the ideas from two strands of research i.e. Sufficient Dimension Reduction from Statistics and Manifold Learning from the Machine Learning literature. The ideas from two diverse fields is essentially connected by the ideas proposed in the methodology of Kernel Dimension Reduction.

As illustrated in the examples above, the algorithm finds a lower dimension and predictive subspaces and revealed some interesting patterns. Overall, the mKDR algorithm is a particular instantiation of the framework of kernel dimension reduction. Thus, it inherits all the advantages of the kernel methods in general, including the abuility to handle multivariate response variables and non-vectorial data.

## References

(this section will be updated shortly)