L1-norm principal component analysis



L1-norm principal component analysis (L1-PCA) is a general method for multivariate data analysis. L1-PCA is often preferred over standard L2-norm principal component analysis (PCA) when the analyzed data may contain outliers (faulty values or corruptions).

Both L1-PCA and standard PCA seek a collection of orthogonal directions (principal components) that define a subspace wherein data representation is maximized according to the selected criterion. Standard PCA quantifies data representation as the aggregate of the L2-norm of the data point projections into the subspace, or equivalently the aggregate Euclidean distance of the original points from their subspace-projected representations. L1-PCA uses instead the aggregate of the L1-norm of the data point projections into the subspace. In PCA and L1-PCA, the number of principal components (PCs) is lower than the rank of the analyzed matrix, which coincides with the dimensionality of the space defined by the original data points. Therefore, PCA or L1-PCA are commonly employed for dimensionality reduction for the purpose of data denoising or compression. Among the advantages of standard PCA that contributed to its high popularity are low-cost computational implementation by means of singular-value decomposition (SVD) and statistical optimality when the data set is generated by a true multivariate normal data source.

However, in modern big data sets, data often include corrupted, faulty points, commonly referred to as outliers. Standard PCA is known to be sensitive to outliers, even when they appear as a small fraction of the processed data. The reason is that the L2-norm formulation of L2-PCA places squared emphasis on the magnitude of each coordinate of each data point, ultimately overemphasizing peripheral points, such as outliers. On the other hand, following an L1-norm formulation, L1-PCA places linear emphasis on the coordinates of each data point, effectively restraining outliers.

Formulation
Consider any matrix $$\mathbf X = [\mathbf x_1, \mathbf x_2, \ldots, \mathbf x_N] \in \mathbb R^{D \times N}$$ consisting of $$N$$ $$D$$-dimensional data points. Define $$r=rank(\mathbf X)$$. For integer $$K$$ such that $$1 \leq K < r$$, L1-PCA is formulated as:

For $$K=1$$, ($$) simplifies to finding the L1-norm principal component (L1-PC) of $$\mathbf X$$ by

In ($$)-($$), L1-norm $$\| \cdot \|_1$$ returns the sum of the absolute entries of its argument and L2-norm $$\| \cdot \|_2$$ returns the sum of the squared entries of its argument. If one substitutes $$\| \cdot \|_1$$ in ($$) by the Frobenius/L2-norm $$\| \cdot \|_F$$, then the problem becomes standard PCA and it is solved by the matrix $$\mathbf Q$$ that contains the $$K$$ dominant singular vectors of $$\mathbf X$$ (i.e., the singular vectors that correspond to the $$K$$ highest singular values).

The maximization metric in ($$) can be expanded as

Solution
For any matrix $$\mathbf A \in \mathbb R^{m \times n}$$ with $$m \geq n$$, define $$\Phi(\mathbf A)$$ as the nearest (in the L2-norm sense) matrix to $$\mathbf A$$ that has orthonormal columns. That is, define

Procrustes Theorem states that if $$\mathbf A$$ has SVD $$\mathbf U_{m \times n} \boldsymbol \Sigma_{n \times n} \mathbf V_{n \times n}^\top$$, then $$\Phi(\mathbf A)=\mathbf U \mathbf V^\top $$.

Markopoulos, Karystinos, and Pados showed that, if $$\mathbf B_{\text{BNM}}$$ is the exact solution to the binary nuclear-norm maximization (BNM) problem

then

is the exact solution to L1-PCA in ($$). The nuclear-norm $$\| \cdot \|_*$$ in ($$) returns the summation of the singular values of its matrix argument and can be calculated by means of standard SVD. Moreover, it holds that, given the solution to L1-PCA, $$\mathbf Q_{\text{L1}}$$, the solution to BNM can be obtained as

where $$\text{sgn}(\cdot)$$ returns the $$\{\pm 1\}$$-sign matrix of its matrix argument (with no loss of generality, we can consider $$\text{sgn}(0)=1$$). In addition, it follows that $$ \| \mathbf X^\top \mathbf Q_{\text{L1}}\|_1 = \| \mathbf X \mathbf B_{\text{BNM}}\|_*$$. BNM in ($$) is a combinatorial problem over antipodal binary variables. Therefore, its exact solution can be found through exhaustive evaluation of all $$2^{NK}$$ elements of its feasibility set, with asymptotic cost $$\mathcal O(2^{NK})$$. Therefore, L1-PCA can also be solved, through BNM, with cost $$\mathcal O(2^{NK})$$ (exponential in the product of the number of data points with the number of the sought-after components). It turns out that L1-PCA can be solved optimally (exactly) with polynomial complexity in $$N$$ for fixed data dimension $$D$$, $$\mathcal{O}(N^{rK-K+1})$$.

For the special case of $$K=1$$ (single L1-PC of $$\mathbf X$$), BNM takes the binary-quadratic-maximization (BQM) form

The transition from ($$) to ($$) for $$K=1$$ holds true, since the unique singular value of $$\mathbf X \mathbf b$$ is equal to $$\| \mathbf X \mathbf b\|_2 = \sqrt{\mathbf b^\top \mathbf X^\top \mathbf X \mathbf b}$$, for every $$\mathbf b $$. Then, if $$\mathbf b_{\text{BNM}}$$ is the solution to BQM in ($$), it holds that

is the exact L1-PC of $$\mathbf X$$, as defined in ($$). In addition, it holds that $$\mathbf b_{\text{BNM}} = \text{sgn}(\mathbf X^\top \mathbf q_{\text{L1}})$$ and $$ \| \mathbf X^\top \mathbf q_{\text{L1}}\|_1 = \| \mathbf X \mathbf b_{\text{BNM}}\|_2$$.

Exact solution of exponential complexity
As shown above, the exact solution to L1-PCA can be obtained by the following two-step process: 1. Solve the problem in ($$) to obtain $$\mathbf B_{\text{BNM}}$$. 2. Apply SVD on $$\mathbf X\mathbf B_{\text{BNM}}$$ to obtain $$\mathbf Q_{\text{L1}}$$.

BNM in ($$) can be solved by exhaustive search over the domain of $$\mathbf B$$ with cost $$\mathcal{O}(2^{NK})$$.

Exact solution of polynomial complexity
Also, L1-PCA can be solved optimally with cost $$\mathcal{O}(N^{rK-K+1})$$, when $$r=rank(\mathbf X)$$ is constant with respect to $$N$$ (always true for finite data dimension $$D$$).

Approximate efficient solvers
In 2008, Kwak proposed an iterative algorithm for the approximate solution of L1-PCA for $$K=1$$. This iterative method was later generalized for $$K>1$$ components. Another approximate efficient solver was proposed by McCoy and Tropp by means of semi-definite programming (SDP). Most recently, L1-PCA (and BNM in ($$)) were solved efficiently by means of bit-flipping iterations (L1-BF algorithm).

L1-BF algorithm
1 function L1BF($$\mathbf X$$, $$K$$): 2     Initialize $$\mathbf B^{(0)} \in \{\pm 1\}^{N \times K}$$ and $$\mathcal L \leftarrow \{1,2,\ldots, NK\}$$ 3     Set $$t \leftarrow 0$$ and $$\omega \leftarrow \| \mathbf X \mathbf B^{(0)} \|_*$$ 4     Until termination (or $$T$$ iterations) 5         $$\mathbf B \leftarrow \mathbf B^{(t)}$$, $$t' \leftarrow t$$ 6         For $$x \in \mathcal L$$ 7             $$k \leftarrow \lceil \frac{x}{N} \rceil$$, $$n \leftarrow x-N(k-1)$$ 8             $$[\mathbf B]_{n,k} \leftarrow - [\mathbf B]_{n,k}$$                // flip bit 9             $$a(n,k) \leftarrow \| \mathbf X \mathbf B \|_*$$               // calculated by SVD or faster (see ) 10             if $$a(n,k)>\omega$$ 11                 $$\mathbf B^{(t)} \leftarrow  \mathbf B$$, $$t' \leftarrow t+1$$ 12                 $$\omega \leftarrow  a(n,k)$$ 13             end 14             if $$t'=t$$                    // no bit was flipped 15                 if $$\mathcal L = \{1,2, \ldots, NK\}$$ 16                     terminate 17                 else 18                     $$\mathcal L \leftarrow \{1,2, \ldots, NK\}$$

The computational cost of L1-BF is $$\mathcal O (ND min\{N,D\} + N^2K^2(K^2 + r))$$.

Complex data
L1-PCA has also been generalized to process complex data. For complex L1-PCA, two efficient algorithms were proposed in 2018.

Tensor data
L1-PCA has also been extended for the analysis of tensor data, in the form of L1-Tucker, the L1-norm robust analogous of standard Tucker decomposition. Two algorithms for the solution of L1-Tucker are L1-HOSVD and L1-HOOI.

Code
MATLAB code for L1-PCA is available at MathWorks.