# residual Component Analysis: Generalizing PCA for more flexible inference in linear-Gaussian models

## Contents

## Introduction

Probabilistic principle component analysis (PPCA) is a method based on an isotropic error model to estimate the principal axes when any data vector has one or more missing values. It assumes that the values are missing at random through the data set. This means that whether a data value is missing or not does not depend on the latent variable given the observed data values. PPCA decomposes the covariance of a data vector [math] y[/math] in [math]\mathbb{R}^p[/math], into a low-rank term and a spherical noise term.Tipping, M. E. and Bishop, C.M. Probabilistic principle component analysis. Journal of the Royal Statistical Society. Series B(Statistical Methodology), 61(3):611-622,1999

</ref> with the resultwhere [math]U_q[/math] are [math]q[/math] principle eigenvectors of the sample covariance [math]\tilde S[/math], with [math]\tilde S = n^{-1}Y^TY[/math] and [math]L^q[/math] is a diagonal matrix with elements [math]l_{i,i} = (\lambda_i - \sigma^2)^{1/2}[/math], where [math]\lambda_i[/math] is the ith eigenvalue of the sample covariance and [math]\sigma^2[/math] is the noise variance. This max-likelihood solution is rotation invariant; [math]R[/math] is an arbitrary rotation matrix. The matrix [math]W[/math] spans the principle subspace of the data and the model is known as probabilistic PCA. In face, we can get the traditional MLE by using Expectation Maximization algorithm when [math] \sigma [/math] goes into 0.

The underlying assumption of the model is that the data set can be represented by [math]Y = XW^T+E[/math] where [math]X[/math] in [math]\mathbb{R}^{n \times p}[/math] is a matrix of [math]q[/math] dimensional latent variables and [math]E[/math] is a matrix of noise variables [math] e_{ij} \sim \mathcal{N} (0,\sigma^2)[/math]. The marginal log-likelihood above is obtained by placing an isotropic prior independently on the elements of [math]X[/math] with [math]x_{ij} \sim \mathcal{N}(0,1)[/math].

It is shown<ref name="lawerence2005"> Lawrence N.D. Probabilistic non-linear principle component analysis with Gaussian process latent variable models. Journal of Machine Learning . MIT Press, Cambridge, MA, 2006.

</ref> that the PCA solution is also obtained for log-likelihoods of the form

The question this papers attempts to answer is that given [math]\Sigma[/math] how can we solve for [math]X[/math]( respectively [math]W[/math]), and for what values of [math]\Sigma[/math] we can formulate useful new algorithm for machine learning? This paper shows that the maximum likelihood solution for [math]X[/math] is simply based on generalized eigenvalue problem (GEP) on the sample-covariance matrix. Hence the low-rank term [math]XX^T[/math] can be optimized for general [math]\Sigma[/math]. The authors call this approach residual component analysis (RCA).

## Maximum likelihood RCA

**Theorem:** The maximum likelihood estimate of the parameter [math]X[/math] in the likelihood model in equation (*), for positive-definite and invertible [math]\Sigma[/math], is
[math]X_{ML} = \Sigma S(D-I)^{1/2}[/math] where [math]S[/math] is the solution to the generalized eigenvalue problem [math]\frac{1}{p}YY^TS=\Sigma SD[/math], with its columns as the generalised eigenvectors and [math]D[/math] is diagonal with the corresponding generalized eigenvalues.

<proof>

The RCA log-likelihood is given byWhere [math]K=XX^T+\Sigma[/math].

Since [math]\Sigma[/math] is positive-deifinite we can consider the eigen-decompostion on [math]\Sigma[/math]

[math]\Sigma = U \Lambda U^T[/math]

where [math]U U^T = U^T U=I[/math] and [math]\Lambda[/math] is diagonal.

The projection of the covariance on to this eigen-basis, scaled by the eigenvalues gives

[math]\hat K = \Lambda^{-1/2}U^T K U \Lambda^{-1/2} =\Lambda^{-1/2}U^T (XX^T+\Sigma) U \Lambda^{-1/2}[/math].

Note that

[math] \Lambda^{-1/2}U^T \Sigma U \Lambda^{-1/2} = \Lambda^{-1/2}U^T U \Lambda U^T U \Lambda^{-1/2} = \Lambda^{-1/2} \Lambda \Lambda^{-1/2}=I [/math]

Hence

[math] \hat K=\Lambda^{-1/2}U^TXX^TU\Lambda^{-1/2} +I [/math]

Then solve the maximum likelihood solution of for [math]\hat X[/math]. Relating the stationary point of[math]\hat X[/math] to the solution for [math]X[/math]and then we proceed by expressing this eigenvalue problem in terms of [math]YY^T[/math]. Eventually we can recover X up to an arbitrary rotation (R, which for convenience is normally set to I), via the first q generalised eigenvectors of[math](1/q)YY^T[/math],

</proof>

Aside from [math]\Sigma[/math], we note a subtle difference from the PPCA solution for [math]W[/math]: Whereas PPCA explicitly subtracts the noise variance from the [math]q[/math] retained principal eigenvalues, RCA implicitly incorporates any noise terms into [math]\Sigma[/math] and standardises them when it projects the total covariance onto the eigen-basis of [math]\Sigma[/math]. Thus we get a reduction of unity from the retained generalised eigenvalues from the theorem. For [math]\Sigma=I[/math] the two solutions are identical.

The posterior density for the RCA probabilistic model (primal case) and [math]\mu_y=0[/math].where [math] \Sigma_{x|y} = (W^T_{ML} \Sigma^{-1}W_{ML} + I)^{-1}[/math].

## Low Rank Plus Sparse Inverse

The graphical model optimised by the EM/RCA hybrid algorithm.Marginalizing [math]X[/math], yields

Where [math]q(Z)[/math] is the variational distribution and [math] \Sigma = \Lambda^{-1}+ \sigma^2I[/math], which we wish to optimise for some known [math]W[/math]. This is an intractable problem, so instead we optimized the lower bound in an EM fashion.

**E-step**: Replacing [math]q(Z)[/math] with the posterior [math]p(Z|Y,\Lambda ')[/math] for a current estimate [math]\Lambda '[/math], amounts to the E-step for updating the posterior density of [math]\,z_n|y_n[/math] with

**M-step**: Then for fixed [math]Z'[/math], the only free parameter in the expected complete data log likelihood [math]Q = {\mathbb{E}}_{Z|Y} (log p(Z', \Lambda))[/math] is [math]\Lambda[/math].

Therefore,

This amounts to standard GLASSO optimization with covariance matrix.

**RCA-step**: After one interation of EM, we update [math]W[/math] via RCA based on the newly estimated [math]\Lambda[/math],

Iterate until the lower-bound converge.

## Experiments

We describe three experiments with EM/RCA and one purely with RCA analysing the residual left from a Gaussian process (GP) in a time-series.

The four experiments with EM/RCA are as following:

**Experiment (1)**, simulation: the authors consider an artificial dataset sampled from the generative model to illustrate the effects of confounders on the estimation of the sparse-inverse covariance.

Figure (a) shows the precision-recall curve for GLASSO and EM/RCA. The EM/RCA curve shows significantly better performance than GLASSO on the confounded data, while the dashed line shows the performance of GLASSO on similarly generated data without the confounding effects [math](W = 0)[/math]. We note that EM/RCA performs better on confounded data than GLASSO on non-confounded data, because of the lower signal-to-noise ratio in the non-confounded data.

**Experiment (2)**, reconstruction of a biological network, we applied EM/RCA on the protein-signaling data of <ref name="Sachs2008">
Sachs, K., Perez, O., Pe’er, D., Lauffenburger, D. A., and Nolan, G. P. Causal protein-signaling networks derived from multiparameter single-cell data. Science, 308:523– 529, April 2008.
</ref>. Figure (b), EM/RCA performs slightly better than all other methods. Figure 4 shows the reconstructed networks for recall 0.4. We note that EM/RCA is more conservative in calling edges.

**Experiment (3)**, reconstruction of human form, the objective here is to reconstruct the underlying connectivity of a human being, given only the 3 dimensional locations of 31 sensors placed about the figures body. The aim is to construct a model which recovers connectivity between these points. EM/RCA method also showed promising result.

Figure 5 shows the comparison in the form of recall/precision curves between GLASSO and the EM/RCA implementation of a sparse-inverse plus lowrank model. As can be seen, the EM/RCA algorithm outperforms the GLASSO. The recovered stickmen of EM/RCA and GLASSO are shown in figure 6.

**Experiment (4)**, differences in gene-expression profiles, the authors applied the RCA method to address the common challenge in data analysis is to summarize the difference between treatment and control samples. Assuming that both time-series are identical, implies [math]y^T = (y_1^T y_2^T)[/math] can be modeled by a Gaussian process (GP) with a temporal covariance function, y is distributed as N(0, K), where [math]K \in R^{n\times n}[/math] for [math]n=n_1+n_2[/math]is structured such that both y1 and y2 are generated from the same function. A RBF kernel is used.

For the figure above, (a)RBF kernel computed on augmented time- input vectors of gene-expression. The kernel is computed across times [math](0 : 20 : 240, 0, 20, 40, 60, 120, 180, 240)[/math], jointly for control and treatment. (b) shows the ROC curves of RCA and BATS variants with different noise models. We note that RCA outperforms BATS in terms the area under the ROC curve for all of its noise models.

## Discussion

RCA is an algorithm for describing a low-dimensional representation of the residuals of a data set, given partial explanation by a covariance matrix [math]\Sigma[/math].The low-rank component of the model can be determined through a generalized eigenvalue problem. The paper illustrated how a treatment and a control time series could have their differences highlighted through appropriate selection of [math]\Sigma[/math](in this case we used an RBF kernel). The paper also introduced an algorithm for fitting a variant of CCA where the private spaces are explained through low dimensional latent variables.

Full covariance matrix model is often run into problem as their parameterization scales with [math]D^2[/math]. This technique combined sparse-inverse covariance (as in GLASSO) with low rank (as in probabilistic PCA) approaches, and have good effect in the experiment. It was demonstrated to good effect in a motion capture and protein network example.

Another way to impose sparsity is to put a prior such as Laplace prior or Jeffrey prior on the covariance matrix in probabilistic PCA, which is closely related to Bayesian PCA.

## References

<references />