---
title: 'Metric-Aware PCA (MAPCA): A Geometric Approach'
url: https://www.emergentmind.com/topics/metric-aware-principal-component-analysis-mapca
type: topic
---

# Metric-Aware PCA (MAPCA): A Geometric Approach

Searching arXiv for the cited MAPCA-related papers to ground the article in current preprints.
Metric-Aware Principal Component Analysis (MAPCA) is used in recent literature for PCA-like procedures that replace standard Euclidean projections or orthonormality constraints with geometry-, metric-, or task-aware structure. The label has been attached to principal observable analysis on metric measure spaces, generalized eigenproblems with a symmetric positive definite metric matrix, intrinsic manifold constructions, and weighted or asymmetric alternatives to classical PCA [2506.04003], [2604.14249], [2506.00226], [1801.10341]. Taken together, these works suggest that MAPCA is better understood as a family of variance-maximizing or reconstruction-minimizing schemes in which the relevant notion of distance, covariance, whitening, or task discrepancy is no longer the default Euclidean one.

## 1. Classical baseline and the MAPCA principle

Classical PCA chooses an orthogonal projection \(P\in\mathbb R^{d\times K}\) by minimizing reconstruction error
\[
\min_{P\in\mathbb R^{d\times K},\,P^\top P=I_K}\;\|X-XPP^\top\|_F^2,
\]
or equivalently by maximizing
\[
\max_{P^\top P=I_K}\;\operatorname{trace}(P^\top A P),
\qquad A=X^\top X,
\]
so that the columns of \(P\) are the top-\(K\) eigenvectors of \(A\) [1705.06371]. In the metric-matrix formulation of MAPCA, the orthonormality constraint is replaced by
\[
\max_{W\in\mathbb R^{p\times r}}\;\operatorname{Tr}(W^\top \Sigma W)
\quad\text{subject to}\quad
W^\top M W=I_r,
\]
where \(\Sigma=(1/n)X^\top X\) is the sample covariance and \(M\) is a symmetric positive definite metric matrix; the resulting optimality condition is the generalized eigenproblem \(\Sigma W = M W\Lambda\), and the low-dimensional representation is \(Z=XW\) [2604.14249].

This suggests a common MAPCA pattern: the principal directions remain solutions of a PCA-like variational problem, but the admissible directions, the covariance proxy, or the projection geometry are changed. In different strands of the literature, the metric-aware ingredient is a Lipschitz constraint, a Riemannian metric, a diagonal or spectral metric matrix, heteroskedastic noise weights, a between-class scatter surrogate, or an asymmetric norm.

## 2. Principal observable analysis on metric spaces

In the metric-space formulation introduced as principal observable analysis, one begins with a compact metric space \((X,d)\) equipped with a Borel probability measure \(\mu\). A metric observable is a real-valued field \(f:X\to\mathbb R\) that is \(1\)-Lipschitz,
\[
|f(x)-f(y)|\le d(x,y)\quad\forall\,x,y\in X,
\]
and the set of all such observables is denoted \(O^1(X)\). Each observable induces a push-forward probability measure
\[
f_\sharp\mu=\mu(f^{-1}(\cdot))
\]
on \(\mathbb R\), so the geometry of \((X,d,\mu)\) is probed through one-dimensional reductions. The observable mean is
\[
M_\mu(f)=\mathbb E_\mu[f]=\int_X f(x)\,d\mu(x),
\]
the centered observables are
\[
O^1_c(X)=\{f\in O^1(X):M_\mu(f)=0\},
\]
and the observable covariance is the positive semidefinite bilinear form
\[
\Sigma_\mu(f,g)=\int_X f(x)g(x)\,d\mu(x).
\]
For \(f\in O^1(X)\), the variance is
\[
\operatorname{Var}_\mu(f)=\Sigma_\mu\bigl(f-M_\mu(f),\,f-M_\mu(f)\bigr).
\]
In \(L^2(\mu)\) language, \(\Sigma_\mu\) is the restriction of \(\langle f,g\rangle_{L^2(\mu)}=\int_X f(x)g(x)\,d\mu(x)\) to \(O^1_c(X)\times O^1_c(X)\) [2506.04003].

Principal observables are defined by a variance-maximization principle. A first principal observable \(\phi_1\) is any centered \(1\)-Lipschitz function of maximal variance,
\[
\phi_1
=
\arg\max_{f\in O^1_c(X)}\operatorname{Var}_\mu(f)
=
\arg\max_{\substack{f\in O^1_c(X)\\ \|f\|_{\operatorname{Lip}}=1}}
\langle f,\Sigma_\mu f\rangle_{L^2(\mu)}.
\]
Inductively, \(\phi_k\) is obtained by maximizing the same quadratic form under \(L^2(\mu)\)-orthogonality to \(\phi_1,\dots,\phi_{k-1}\) and the constraint \(\|f\|_{\operatorname{Lip}}=1\). Abstractly this yields the eigenproblem
\[
\Sigma_\mu f=\lambda f,\qquad f\in O^1_c(X),
\]
so the principal observables play the role of normalized covariance eigenfunctions.

The discrete implementation takes \(X_n=\{x_1,\dots,x_n\}\) with uniform counting measure \(\mu_n\), represents an observable by its value vector \((f(x_i))_{i=1}^n\), and uses the empirical covariance
\[
\Sigma_{\mu_n}(f,g)
=
\frac1n\sum_{i=1}^n (f(x_i)-\bar f)(g(x_i)-\bar g),
\qquad
\bar f=\frac1n\sum_i f(x_i).
\]
The \(1\)-Lipschitz condition becomes the finite system of linear inequalities
\[
|f(x_i)-f(x_j)|\le d(x_i,x_j)\qquad(\forall\,i<j).
\]
The \(k\)-th principal observable is therefore found by a convex–quadratic maximization, or equivalently a difference-of-convex program, with linear Lipschitz constraints, centering, and orthogonality constraints. The practical workflow is: build the distance matrix \(D=(d(x_i,x_j))\) or only edge lengths on a sparse graph; solve
\[
\max f^\top K f
\]
subject to \(Af\le b\), \(\sum_i f(x_i)=0\), and \(\sum_i f(x_i)\phi_\ell(x_i)=0\) for \(\ell<k\); extract \(f=\phi_k\); orthogonalize and normalize; repeat. If there are \(m\) active Lipschitz constraints, a general interior-point solver costs roughly \(O((n+m)^3)\), while tailored convex–concave programming can exploit sparsity and structure.

The outputs are both geometric and functional. The solutions embed the original metric space into \(\ell_\infty^k\), and after normalization \(u_0\equiv1\), \(u_i=\phi_i/\|\phi_i\|_{L^2(\mu)}\), any signal \(f:X\to\mathbb R\) admits the observable-domain expansion
\[
f=\sum_{i\ge 0}\langle f,u_i\rangle_{L^2(\mu)}\,u_i
\approx
\sum_{i=0}^k a_i u_i,
\qquad
a_i=\int_X f(x)u_i(x)\,d\mu(x).
\]
Truncation to the first \(k\) modes gives the best \(L^2(\mu)\) approximation among all \(1\)-Lipschitz expansions of the same form. Reported examples include a line graph of \(501\) points, a binary tree benchmark, protein interaction networks, and rotating T-shape images from COIL-100, where \(72\) views in \(\mathbb R^{16384}\) yield a nearly circular \(2\)-D embedding.

## 3. Metric matrices, spectral bias, and scale invariance

In the unified scale-invariant representation-learning framework, MAPCA is the generalized eigenproblem
\[
\Sigma w_i=\lambda_i M w_i,\qquad i=1,\dots,r,
\]
with \(w_i^\top M w_j=\delta_{ij}\). The choice of \(M\) determines the representation geometry, and the variance explained by the \(i\)-th component is \(\lambda_i\). A central one-parameter family is
\[
M(\beta)=\Sigma^\beta,\qquad \beta\in[0,1].
\]
If \(\Sigma=V\Lambda V^\top\), then \(\Sigma^\beta=V\Lambda^\beta V^\top\), the generalized eigenproblem reduces to the ordinary eigenproblem for \(\Sigma^{1-\beta}\), and the solutions satisfy
\[
u_i=v_i,\qquad
w_i=\Sigma^{-\beta/2}v_i,\qquad
\lambda_i\bigl(M(\beta)\bigr)=\lambda_i(\Sigma)^{1-\beta}.
\]
The effective operator \(A(\beta)=\Sigma^{1-\beta}\) has condition number
\[
\kappa(\beta)=\frac{\lambda_1(\Sigma^{1-\beta})}{\lambda_p(\Sigma^{1-\beta})}
=
\left(\frac{\lambda_1}{\lambda_p}\right)^{1-\beta},
\]
which decreases monotonically from \(\kappa(0)=\lambda_1/\lambda_p\) at standard PCA to \(\kappa(1)=1\) at full output whitening. In this formulation, \(\beta\) continuously trades off spectral bias against isotropy [2604.14249].

A distinguishing theoretical result concerns invariance under diagonal feature rescaling. If \(C=\operatorname{diag}(c_1,\dots,c_p)\) and the rescaled covariance is \(\widetilde\Sigma=C\Sigma C\), then the MAPCA spectrum and eigenvectors satisfy \(\widetilde\lambda_i=\lambda_i\) and \(\widetilde w_i=C^{-1}w_i\) for all \(i\) if and only if
\[
\widetilde M = CMC.
\]
The diagonal metric \(M=D=\operatorname{diag}(\sigma_1^2,\dots,\sigma_p^2)\) satisfies this exactly, so IPCA is strictly invariant under arbitrary diagonal rescaling. By contrast, for the \(\beta\)-family,
\[
\widetilde M(\beta)=(C\Sigma C)^\beta\neq C\Sigma^\beta C
\]
unless \(\beta\in\{0,1\}\) or \(C\propto I\). A common misconception is therefore avoided: in this formulation, metric awareness does not imply scale invariance.

The same framework also places several classical and self-supervised objectives into a single geometric language. Standard PCA corresponds to \(M=I\). IPCA corresponds to \(M=D\), described as the diagonal regression metric and rooted in Frisch (1928). Full output whitening, ZCA whitening, and Barlow Twins correspond to \(M=\Sigma\), for which all generalized eigenvalues equal \(1\). VICReg’s variance term corresponds geometrically to \(M=D\). W-MSE, although described as whitening-based, corresponds to \(M=\Sigma^{-1}\), formally \(\beta=-1\), so the effective operator becomes \(\Sigma^2\): the spectral bias is amplified rather than compressed. The distinction between input whitening and output whitening becomes precise only at the level of the metric matrix.

## 4. Intrinsic manifold and Riemannian formulations

One intrinsic manifold-valued formulation starts from probabilistic PCA and replaces Euclidean latent structure by stochastic development on a manifold \(M\). Let \(X_t\in\mathbb R^k\) satisfy \(dX_t=\circ dB_t\), choose a base point \(p\in M\) and an initial frame \(u_0\in F_pM\), and let \(H_1,\dots,H_d\) be the horizontal vector fields on the frame bundle \(FM\) induced by a connection \(\nabla\). The development process \(U_t\) solves
\[
dU_t=\sum_{i=1}^d H_i(U_t)\circ dX_t^i,\qquad U_0=u_0,
\]
and its projection \(Y_t=\pi(U_t)\) is an anisotropic diffusion on \(M\) with infinitesimal covariance encoded by \(u_0\). Since \(u\) and \(uR\) with \(R\in O(d)\) induce the same covariance, the construction can be passed to the quotient \(\operatorname{Sym}^+M=FM/O(d)\), the bundle of positive-definite covariant \(2\)-tensors \(\Sigma^{-1}\). The resulting sub-Riemannian geometry is governed by
\[
\langle v,w\rangle_{\Sigma^{-1}(u)}
=
\langle u^{-1}\pi_*v,\,u^{-1}\pi_*w\rangle_{\mathbb R^d}
\]
on the horizontal bundle. A central geometric fact is that curvature makes the horizontal distribution non-integrable whenever \(R^\nabla\neq 0\), so there is usually no global \(k\)-dimensional submanifold whose tangent spaces are exactly the principal directions; the construction therefore works with stochastic flows rather than principal subspaces [1801.10341].

The associated statistical model introduces parameters \((m,u,\sigma)\), with \(m\in M\), \(u\in F_mM\), and \(\sigma\ge0\), and defines a marginal law \(\mu(m,u,\sigma)\) for \(Y_1\). The log-likelihood
\[
\ell(m,u,\sigma)=\sum_{i=1}^n \ln p(y_i;m,u,\sigma)
\]
has no closed form in general and is approximated either by short-time asymptotics or by conditioned diffusion-bridge simulation. Estimation can be performed by maximum likelihood or EM: the E-step simulates bridges of \(U_t\) conditioned on \(\pi(U_1)=y_i\), while the M-step updates \((m,u,\sigma)\), usually by stochastic gradient ascent. Principal coordinates are then the conditional expectations \(\bar x_i=\mathbb E[X_1\mid \pi(U_1)=y_i]\in\mathbb R^k\). The paper’s examples on \(S^2\) and an embedded ellipsoid emphasize that tangent-space PCA can overestimate orthogonal variance when curvature is high, whereas the intrinsic model lets covariance “roll” with the connection.

A second manifold formulation, termed Riemannian Principal Component Analysis, works through tangent-space linearization at the Fréchet mean
\[
\mu=\arg\min_{p\in M}\sum_{i=1}^n d_M(p,x_i)^2.
\]
Using the logarithm map \(u_i=\Log_\mu(x_i)\in T_\mu M\), one defines the empirical covariance operator
\[
C=\frac1n\sum_{i=1}^n u_i\otimes u_i,
\]
and solves
\[
C\,v=\lambda v,\qquad \langle v,v\rangle_{g_\mu}=1.
\]
The principal geodesics are \(\gamma_v(t)=\exp_\mu(tv)\), and the coordinates of \(x_i\) in \(r\) dimensions are \(t_{is}=\langle \Log_\mu(x_i),v_s\rangle_{g_\mu}\). When \(M=\mathbb R^p\) with the identity metric, \(\Log_\mu(x_i)=x_i-\mu\), \(\exp_\mu(u)=\mu+u\), and the usual Euclidean PCA covariance is recovered. The algorithmic pipeline is: compute the Fréchet mean, map the data with \(\Log_\mu\), build \(C\), solve the eigenproblem in \(T_\mu M\), reconstruct geodesics if desired, and project the data. Reported experiments include synthetic \(10\)-dimensional clustered data, where classical PCA’s first two components explain \(25.58\%\) of total variance versus \(43.38\%\) for R-PCA with a local UMAP-derived metric, and Olivetti faces, where first-plane inertia is \(39.22\%\) for PCA and \(39.59\%\) for R-PCA, with clearer subject separation [2506.00226].

## 5. Weighted, supervised, and asymmetric variants

Beyond geometry in the strict metric-space or manifold sense, several papers make PCA metric-aware by redefining the loss, covariance surrogate, or optimization norm.

| Variant | Core objective or proxy | Source |
|---|---|---|
| Noise-weighted EM-PCA | Minimize \(\chi^2(P,C)=\sum_{i,j}W_{ij}[X_{ij}-(PC)_{ij}]^2\) with \(W_{ij}=1/\sigma_{ij}^2\) and \(W_{ij}=0\) for missing data | [1208.4122] |
| Maximum Margin Principal Components | Apply PCA to a between-class scatter matrix \(A_Z=\sum_j z_j z_j^\top\) built from margin-difference proxies | [1705.06371] |
| Asymmetric-norm PCA | Minimize asymmetric \(L_2\) error or maximize \(\tau\)-variance in quantile/expectile geometry | [1401.3229] |

In noise-weighted EM-PCA, the data matrix \(X\) is approximated by \(PC\), but heteroskedastic uncertainties enter explicitly through \(W_{ij}\). The E-step solves
\[
c_j=(P^\top V_j^{-1}P)^{-1}P^\top V_j^{-1}x_j,
\]
or, in the diagonal-noise case,
\[
c_j=(P^\top W_jP)^{-1}P^\top W_jx_j,
\]
and the M-step updates principal components one at a time by weighted least squares, followed by renormalization. Missing values are handled by setting their weights to zero. The method is reported to recover underlying sine modes in simulated data with heteroskedastic noise and missing chunks, and to produce much cleaner eigenspectra than classical PCA on SDSS DR7 QSO spectra. Numerical stabilization may require replacing \((P^\top W_jP)^{-1}\) by \((P^\top W_jP+\lambda I)^{-1}\) for a tiny ridge parameter, and convergence is typically rapid, although saddle points can occur when data are extremely patchy.

Maximum Margin Principal Components adapts PCA to binary classification by preserving the empirical margin distribution rather than least-squares reconstruction. For a classifier \(w\), the signed margins are \(m_i=y_i(w^\top x_i)\). Since \(w\) is not known a priori, the method builds proxy difference vectors \(z\) and runs ordinary eigendecomposition on \(A_Z=\sum_j z_j z_j^\top\). The main variants are M-PCA0 using all opposite-class pairs \(z_{ij}=x_i-x_j\), M-PCA1a replacing the opposite class by its mean, M-PCA1b replacing means by coordinate-wise medoids, and M-PCA2 using opposite-class nearest neighbors. After computing the top-\(K\) eigenvectors of \(A_Z\), one projects \(X\) and trains any linear classifier in the reduced space. On benchmark datasets, these variants typically outperformed vanilla PCA and were often competitive with Partial Least Squares and Lasso; for example, on Ionosphere with \(K=5\), SVM error was \(26.7\%\pm3.0\) for PCA versus \(22.1\%\pm2.8\) for M-PCA1b, and on Colon with \(K=12\), logistic error was \(13.5\%\pm8.9\) for PCA versus \(12.7\%\pm9.3\) for M-PCA1b.

Asymmetric-norm PCA replaces the symmetric \(L_2\) geometry of ordinary PCA by quantile or expectile norms. For \(\tau\in(0,1)\),
\[
\|x\|_{\tau,2}^2
=
\tau\|x_+\|_2^2+(1-\tau)\|x_-\|_2^2,
\]
and the first principal expectile component is
\[
\phi_\tau^\ast
=
\arg\max_{\phi\in\mathbb R^p,\ \|\phi\|_2=1}
\operatorname{Var}_\tau(\phi^\top Y_1,\dots,\phi^\top Y_n).
\]
A difficulty specific to this setting is that there is no natural basis and no canonical nested sequence of subspaces. The paper therefore proposes LAWS, TopDown, BottomUp, and PrincipalExpectile algorithms based on iterative least squares and weight updates. Theoretical results include convergence of LAWS to critical points, finite-time bounds for univariate expectiles, and consistency of the empirical principal expectile component under uniqueness. In the Chinese weather dataset, the first two principal expectile components explain approximately \(90\%\) of variance at \(\tau=0.95\), approximately \(65\%\) at \(\tau=0.50\), and approximately \(89\%\) at \(\tau=0.05\), emphasizing that tail variation depends materially on \(\tau\).

## 6. Outputs, applications, and recurring misconceptions

The literature surveyed here suggests that MAPCA should not be treated as a single standardized algorithm. In one usage, the principal directions are \(1\)-Lipschitz scalar fields on a metric space rather than linear forms on \(\mathbb R^p\), and the output is both an embedding into \(\ell_\infty^k\) and an orthonormal basis for signal processing [2506.04003]. In another, the output is a generalized eigenspace determined by a metric matrix \(M\), with explicit control over spectral bias and isotropy [2604.14249]. On manifolds, the principal coordinates may be conditional expectations of latent Euclidean variables under a diffusion model, or coordinates in the tangent space at the Fréchet mean under the Riemannian metric [1801.10341], [2506.00226]. In weighted, supervised, and asymmetric settings, the output may instead be a denoised low-rank factorization, a discriminative subspace, or tail-focused expectile components [1208.4122], [1705.06371], [1401.3229].

Several recurring misconceptions are explicitly resolved by these papers. First, metric awareness does not automatically mean scale invariance: in the generalized eigenproblem framework, exact invariance under diagonal rescaling holds if and only if \(\widetilde M=CMC\), which is satisfied by the diagonal metric but not by intermediate members of the \(\beta\)-family [2604.14249]. Second, manifold principal directions need not integrate to a global principal submanifold, because curvature makes the relevant horizontal distribution non-integrable [1801.10341]. Third, asymmetric-norm PCA does not inherit the canonical nested basis structure of ordinary PCA [1401.3229]. Fourth, observable MAPCA is not defined by linear projections \(x\mapsto w^\top x\), but by \(1\)-Lipschitz probes \(f:X\to\mathbb R\) [2506.04003].

The application range is correspondingly broad: shapes, networks, images, and signals overlaid on geometric objects; sparse graphs; protein interaction networks; rotating object images; manifold-valued shape or surface data; noisy spectra with missing entries; binary classification benchmarks; and weather curves. What unifies these cases is not a single implementation, but the replacement of classical PCA’s fixed Euclidean geometry by a geometry that is intrinsic to the data, the observation process, or the downstream task.

Source: https://www.emergentmind.com/topics/metric-aware-principal-component-analysis-mapca